@imtbl/sdk 1.44.0-alpha.3 → 1.44.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/{BridgeWidget-673d6a8d.js → BridgeWidget-7cf47476.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-5c13ce6c.js → OnRampWidget-cfd90d1f.js} +1 -1
- package/dist/browser/checkout/{SaleWidget-f4e81633.js → SaleWidget-af87c5f8.js} +1 -1
- package/dist/browser/checkout/{SpendingCapHero-98bdf024.js → SpendingCapHero-e9affcbd.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-3929b5bc.js → SwapWidget-79b73ef6.js} +1 -1
- package/dist/browser/checkout/{TopUpView-cb134948.js → TopUpView-88c0926b.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-c7f8b7d9.js → WalletWidget-84da6986.js} +1 -1
- package/dist/browser/checkout/{auto-track-8112e696.js → auto-track-2f0bec35.js} +1 -1
- package/dist/browser/checkout/{balance-43a6d0fc.js → balance-10f77dac.js} +1 -1
- package/dist/browser/checkout/{index-81fdebbf.js → index-4beb9833.js} +2 -2
- package/dist/browser/checkout/{index-f56bf7f4.js → index-5d738f0a.js} +1 -1
- package/dist/browser/checkout/{index-c9d8eca6.js → index-73d05f47.js} +1 -1
- package/dist/browser/checkout/{index-32a5dcd1.js → index-a359b5f2.js} +1 -1
- package/dist/browser/checkout/{index-d760fc7e.js → index-ae8e08c9.js} +1 -1
- package/dist/browser/checkout/{index-724cc6ea.js → index-b75a5ba6.js} +1 -1
- package/dist/browser/checkout/{index-9f9486d8.js → index-b937fa7f.js} +1 -1
- package/dist/browser/checkout/index-ba3ce546.js +1 -0
- package/dist/browser/checkout/{index.umd-4d3083b9.js → index.umd-b2664745.js} +1 -1
- package/dist/browser/checkout/{retry-febade36.js → retry-823d9f10.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/checkout.js +4 -4
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.cjs +7 -7
- package/dist/index.js +7 -7
- package/dist/minting_backend.js +2 -2
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +4 -4
- package/dist/webhook.js +1 -1
- package/dist/x.js +3 -3
- package/package.json +1 -1
- package/dist/browser/checkout/index-0ba9df7a.js +0 -1
|
@@ -89,7 +89,7 @@ var e,t,n,r=ut&&ut.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)thro
|
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
90
|
*/function Ble(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ule=new Set,zle={};function Hle(e,t){Wle(e,t),Wle(e+"Capture",t)}function Wle(e,t){for(zle[e]=t,e=0;e<t.length;e++)Ule.add(t[e])}var Vle=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Gle=Object.prototype.hasOwnProperty,qle=/^[: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]*$/,Kle={},Xle={};function Yle(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Zle={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Zle[e]=new Yle(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Zle[t]=new Yle(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Zle[e]=new Yle(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Zle[e]=new Yle(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){Zle[e]=new Yle(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Zle[e]=new Yle(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Zle[e]=new Yle(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Zle[e]=new Yle(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Zle[e]=new Yle(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Jle=/[\-:]([a-z])/g;function Qle(e){return e[1].toUpperCase()}function $le(e,t,n,r){var i=Zle.hasOwnProperty(t)?Zle[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Gle.call(Xle,e)||!Gle.call(Kle,e)&&(qle.test(e)?Xle[e]=!0:(Kle[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(Jle,Qle);Zle[t]=new Yle(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(Jle,Qle);Zle[t]=new Yle(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(Jle,Qle);Zle[t]=new Yle(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Zle[e]=new Yle(e,1,!1,e.toLowerCase(),null,!1,!1)})),Zle.xlinkHref=new Yle("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Zle[e]=new Yle(e,1,!1,e.toLowerCase(),null,!0,!0)}));var ede=jle.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,tde=Symbol.for("react.element"),nde=Symbol.for("react.portal"),rde=Symbol.for("react.fragment"),ide=Symbol.for("react.strict_mode"),ade=Symbol.for("react.profiler"),ode=Symbol.for("react.provider"),sde=Symbol.for("react.context"),cde=Symbol.for("react.forward_ref"),ude=Symbol.for("react.suspense"),lde=Symbol.for("react.suspense_list"),dde=Symbol.for("react.memo"),fde=Symbol.for("react.lazy"),pde=Symbol.for("react.offscreen"),hde=Symbol.iterator;function mde(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=hde&&e[hde]||e["@@iterator"])?e:null}var yde,bde=Object.assign;function gde(e){if(void 0===yde)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);yde=t&&t[1]||""}return"\n"+yde+e}var vde=!1;function wde(e,t){if(!e||vde)return"";vde=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var c="\n"+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=o&&0<=s);break}}}finally{vde=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gde(e):""}function Tde(e){switch(e.tag){case 5:return gde(e.type);case 16:return gde("Lazy");case 13:return gde("Suspense");case 19:return gde("SuspenseList");case 0:case 2:case 15:return e=wde(e.type,!1);case 11:return e=wde(e.type.render,!1);case 1:return e=wde(e.type,!0);default:return""}}function Ede(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case rde:return"Fragment";case nde:return"Portal";case ade:return"Profiler";case ide:return"StrictMode";case ude:return"Suspense";case lde:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case sde:return(e.displayName||"Context")+".Consumer";case ode:return(e._context.displayName||"Context")+".Provider";case cde:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case dde:return null!==(t=e.displayName||null)?t:Ede(e.type)||"Memo";case fde:t=e._payload,e=e._init;try{return Ede(e(t))}catch(e){}}return null}function Ade(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=(e=t.render).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 Ede(t);case 8:return t===ide?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function xde(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ode(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Cde(e){e._valueTracker||(e._valueTracker=function(e){var t=Ode(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ide(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ode(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function _de(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Pde(e,t){var n=t.checked;return bde({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Sde(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=xde(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function kde(e,t){null!=(t=t.checked)&&$le(e,"checked",t,!1)}function Rde(e,t){kde(e,t);var n=xde(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Mde(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mde(e,t.type,xde(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Nde(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Mde(e,t,n){"number"===t&&_de(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dde=Array.isArray;function Lde(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+xde(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function jde(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(Ble(91));return bde({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fde(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(Ble(92));if(Dde(n)){if(1<n.length)throw Error(Ble(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:xde(n)}}function Bde(e,t){var n=xde(t.value),r=xde(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ude(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function zde(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Hde(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?zde(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Wde,Vde=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Wde=Wde||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wde.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Gde(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var qde={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},Kde=["Webkit","ms","Moz","O"];function Xde(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||qde.hasOwnProperty(e)&&qde[e]?(""+t).trim():t+"px"}function Yde(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Xde(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(qde).forEach((function(e){Kde.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qde[t]=qde[e]}))}));var Zde=bde({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 Jde(e,t){if(t){if(Zde[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(Ble(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(Ble(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ble(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(Ble(62))}}function Qde(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 $de=null;function efe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tfe=null,nfe=null,rfe=null;function ife(e){if(e=Jme(e)){if("function"!=typeof tfe)throw Error(Ble(280));var t=e.stateNode;t&&(t=$me(t),tfe(e.stateNode,e.type,t))}}function afe(e){nfe?rfe?rfe.push(e):rfe=[e]:nfe=e}function ofe(){if(nfe){var e=nfe,t=rfe;if(rfe=nfe=null,ife(e),t)for(e=0;e<t.length;e++)ife(t[e])}}function sfe(e,t){return e(t)}function cfe(){}var ufe=!1;function lfe(e,t,n){if(ufe)return e(t,n);ufe=!0;try{return sfe(e,t,n)}finally{ufe=!1,(null!==nfe||null!==rfe)&&(cfe(),ofe())}}function dfe(e,t){var n=e.stateNode;if(null===n)return null;var r=$me(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(Ble(231,t,typeof n));return n}var ffe=!1;if(Vle)try{var pfe={};Object.defineProperty(pfe,"passive",{get:function(){ffe=!0}}),window.addEventListener("test",pfe,pfe),window.removeEventListener("test",pfe,pfe)}catch(cJe){ffe=!1}function hfe(e,t,n,r,i,a,o,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var mfe=!1,yfe=null,bfe=!1,gfe=null,vfe={onError:function(e){mfe=!0,yfe=e}};function wfe(e,t,n,r,i,a,o,s,c){mfe=!1,yfe=null,hfe.apply(vfe,arguments)}function Tfe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Efe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Afe(e){if(Tfe(e)!==e)throw Error(Ble(188))}function xfe(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Tfe(e)))throw Error(Ble(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Afe(i),e;if(a===r)return Afe(i),t;a=a.sibling}throw Error(Ble(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(Ble(189))}}if(n.alternate!==r)throw Error(Ble(190))}if(3!==n.tag)throw Error(Ble(188));return n.stateNode.current===n?e:t}(e),null!==e?Ofe(e):null}function Ofe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ofe(e);if(null!==t)return t;e=e.sibling}return null}var Cfe=Fle.unstable_scheduleCallback,Ife=Fle.unstable_cancelCallback,_fe=Fle.unstable_shouldYield,Pfe=Fle.unstable_requestPaint,Sfe=Fle.unstable_now,kfe=Fle.unstable_getCurrentPriorityLevel,Rfe=Fle.unstable_ImmediatePriority,Nfe=Fle.unstable_UserBlockingPriority,Mfe=Fle.unstable_NormalPriority,Dfe=Fle.unstable_LowPriority,Lfe=Fle.unstable_IdlePriority,jfe=null,Ffe=null;var Bfe=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Ufe(e)/zfe|0)|0},Ufe=Math.log,zfe=Math.LN2;var Hfe=64,Wfe=4194304;function Vfe(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gfe(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=Vfe(s):0!==(a&=o)&&(r=Vfe(a))}else 0!==(o=n&~i)?r=Vfe(o):0!==a&&(r=Vfe(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Bfe(t)),r|=e[n],t&=~i;return r}function qfe(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Kfe(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Xfe(){var e=Hfe;return 0==(4194240&(Hfe<<=1))&&(Hfe=64),e}function Yfe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zfe(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-Bfe(t)]=n}function Jfe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Bfe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Qfe=0;function $fe(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var epe,tpe,npe,rpe,ipe,ape=!1,ope=[],spe=null,cpe=null,upe=null,lpe=new Map,dpe=new Map,fpe=[],ppe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hpe(e,t){switch(e){case"focusin":case"focusout":spe=null;break;case"dragenter":case"dragleave":cpe=null;break;case"mouseover":case"mouseout":upe=null;break;case"pointerover":case"pointerout":lpe.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dpe.delete(t.pointerId)}}function mpe(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=Jme(t))&&tpe(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function ype(e){var t=Zme(e.target);if(null!==t){var n=Tfe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Efe(n)))return e.blockedOn=t,void ipe(e.priority,(function(){npe(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bpe(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=_pe(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Jme(n))&&tpe(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);$de=r,n.target.dispatchEvent(r),$de=null,t.shift()}return!0}function gpe(e,t,n){bpe(e)&&n.delete(t)}function vpe(){ape=!1,null!==spe&&bpe(spe)&&(spe=null),null!==cpe&&bpe(cpe)&&(cpe=null),null!==upe&&bpe(upe)&&(upe=null),lpe.forEach(gpe),dpe.forEach(gpe)}function wpe(e,t){e.blockedOn===t&&(e.blockedOn=null,ape||(ape=!0,Fle.unstable_scheduleCallback(Fle.unstable_NormalPriority,vpe)))}function Tpe(e){function t(t){return wpe(t,e)}if(0<ope.length){wpe(ope[0],e);for(var n=1;n<ope.length;n++){var r=ope[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==spe&&wpe(spe,e),null!==cpe&&wpe(cpe,e),null!==upe&&wpe(upe,e),lpe.forEach(t),dpe.forEach(t),n=0;n<fpe.length;n++)(r=fpe[n]).blockedOn===e&&(r.blockedOn=null);for(;0<fpe.length&&null===(n=fpe[0]).blockedOn;)ype(n),null===n.blockedOn&&fpe.shift()}var Epe=ede.ReactCurrentBatchConfig,Ape=!0;function xpe(e,t,n,r){var i=Qfe,a=Epe.transition;Epe.transition=null;try{Qfe=1,Cpe(e,t,n,r)}finally{Qfe=i,Epe.transition=a}}function Ope(e,t,n,r){var i=Qfe,a=Epe.transition;Epe.transition=null;try{Qfe=4,Cpe(e,t,n,r)}finally{Qfe=i,Epe.transition=a}}function Cpe(e,t,n,r){if(Ape){var i=_pe(e,t,n,r);if(null===i)Eme(e,t,r,Ipe,n),hpe(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return spe=mpe(spe,e,t,n,r,i),!0;case"dragenter":return cpe=mpe(cpe,e,t,n,r,i),!0;case"mouseover":return upe=mpe(upe,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return lpe.set(a,mpe(lpe.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,dpe.set(a,mpe(dpe.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(hpe(e,r),4&t&&-1<ppe.indexOf(e)){for(;null!==i;){var a=Jme(i);if(null!==a&&epe(a),null===(a=_pe(e,t,n,r))&&Eme(e,t,r,Ipe,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Eme(e,t,r,null,n)}}var Ipe=null;function _pe(e,t,n,r){if(Ipe=null,null!==(e=Zme(e=efe(r))))if(null===(t=Tfe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Efe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ipe=e,null}function Ppe(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kfe()){case Rfe:return 1;case Nfe:return 4;case Mfe:case Dfe:return 16;case Lfe:return 536870912;default:return 16}default:return 16}}var Spe=null,kpe=null,Rpe=null;function Npe(){if(Rpe)return Rpe;var e,t,n=kpe,r=n.length,i="value"in Spe?Spe.value:Spe.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Rpe=i.slice(e,1<t?1-t:void 0)}function Mpe(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Dpe(){return!0}function Lpe(){return!1}function jpe(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Dpe:Lpe,this.isPropagationStopped=Lpe,this}return bde(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Dpe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Dpe)},persist:function(){},isPersistent:Dpe}),t}var Fpe,Bpe,Upe,zpe={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hpe=jpe(zpe),Wpe=bde({},zpe,{view:0,detail:0}),Vpe=jpe(Wpe),Gpe=bde({},Wpe,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rhe,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Upe&&(Upe&&"mousemove"===e.type?(Fpe=e.screenX-Upe.screenX,Bpe=e.screenY-Upe.screenY):Bpe=Fpe=0,Upe=e),Fpe)},movementY:function(e){return"movementY"in e?e.movementY:Bpe}}),qpe=jpe(Gpe),Kpe=jpe(bde({},Gpe,{dataTransfer:0})),Xpe=jpe(bde({},Wpe,{relatedTarget:0})),Ype=jpe(bde({},zpe,{animationName:0,elapsedTime:0,pseudoElement:0})),Zpe=bde({},zpe,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jpe=jpe(Zpe),Qpe=jpe(bde({},zpe,{data:0})),$pe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ehe={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},the={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nhe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=the[e])&&!!t[e]}function rhe(){return nhe}var ihe=bde({},Wpe,{key:function(e){if(e.key){var t=$pe[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Mpe(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ehe[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rhe,charCode:function(e){return"keypress"===e.type?Mpe(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Mpe(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ahe=jpe(ihe),ohe=jpe(bde({},Gpe,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),she=jpe(bde({},Wpe,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rhe})),che=jpe(bde({},zpe,{propertyName:0,elapsedTime:0,pseudoElement:0})),uhe=bde({},Gpe,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),lhe=jpe(uhe),dhe=[9,13,27,32],fhe=Vle&&"CompositionEvent"in window,phe=null;Vle&&"documentMode"in document&&(phe=document.documentMode);var hhe=Vle&&"TextEvent"in window&&!phe,mhe=Vle&&(!fhe||phe&&8<phe&&11>=phe),yhe=String.fromCharCode(32),bhe=!1;function ghe(e,t){switch(e){case"keyup":return-1!==dhe.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vhe(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var whe=!1;var The={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ehe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!The[e.type]:"textarea"===t}function Ahe(e,t,n,r){afe(r),0<(t=xme(t,"onChange")).length&&(n=new Hpe("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var xhe=null,Ohe=null;function Che(e){yme(e,0)}function Ihe(e){if(Ide(Qme(e)))return e}function _he(e,t){if("change"===e)return t}var Phe=!1;if(Vle){var She;if(Vle){var khe="oninput"in document;if(!khe){var Rhe=document.createElement("div");Rhe.setAttribute("oninput","return;"),khe="function"==typeof Rhe.oninput}She=khe}else She=!1;Phe=She&&(!document.documentMode||9<document.documentMode)}function Nhe(){xhe&&(xhe.detachEvent("onpropertychange",Mhe),Ohe=xhe=null)}function Mhe(e){if("value"===e.propertyName&&Ihe(Ohe)){var t=[];Ahe(t,Ohe,e,efe(e)),lfe(Che,t)}}function Dhe(e,t,n){"focusin"===e?(Nhe(),Ohe=n,(xhe=t).attachEvent("onpropertychange",Mhe)):"focusout"===e&&Nhe()}function Lhe(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ihe(Ohe)}function jhe(e,t){if("click"===e)return Ihe(t)}function Fhe(e,t){if("input"===e||"change"===e)return Ihe(t)}var Bhe="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Uhe(e,t){if(Bhe(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Gle.call(t,i)||!Bhe(e[i],t[i]))return!1}return!0}function zhe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hhe(e,t){var n,r=zhe(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=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=zhe(r)}}function Whe(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Whe(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Vhe(){for(var e=window,t=_de();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=_de((e=t.contentWindow).document)}return t}function Ghe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function qhe(e){var t=Vhe(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Whe(n.ownerDocument.documentElement,n)){if(null!==r&&Ghe(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Hhe(n,a);var o=Hhe(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Khe=Vle&&"documentMode"in document&&11>=document.documentMode,Xhe=null,Yhe=null,Zhe=null,Jhe=!1;function Qhe(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Jhe||null==Xhe||Xhe!==_de(r)||("selectionStart"in(r=Xhe)&&Ghe(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Zhe&&Uhe(Zhe,r)||(Zhe=r,0<(r=xme(Yhe,"onSelect")).length&&(t=new Hpe("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xhe)))}function $he(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var eme={animationend:$he("Animation","AnimationEnd"),animationiteration:$he("Animation","AnimationIteration"),animationstart:$he("Animation","AnimationStart"),transitionend:$he("Transition","TransitionEnd")},tme={},nme={};function rme(e){if(tme[e])return tme[e];if(!eme[e])return e;var t,n=eme[e];for(t in n)if(n.hasOwnProperty(t)&&t in nme)return tme[e]=n[t];return e}Vle&&(nme=document.createElement("div").style,"AnimationEvent"in window||(delete eme.animationend.animation,delete eme.animationiteration.animation,delete eme.animationstart.animation),"TransitionEvent"in window||delete eme.transitionend.transition);var ime=rme("animationend"),ame=rme("animationiteration"),ome=rme("animationstart"),sme=rme("transitionend"),cme=new Map,ume="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function lme(e,t){cme.set(e,t),Hle(t,[e])}for(var dme=0;dme<ume.length;dme++){var fme=ume[dme];lme(fme.toLowerCase(),"on"+(fme[0].toUpperCase()+fme.slice(1)))}lme(ime,"onAnimationEnd"),lme(ame,"onAnimationIteration"),lme(ome,"onAnimationStart"),lme("dblclick","onDoubleClick"),lme("focusin","onFocus"),lme("focusout","onBlur"),lme(sme,"onTransitionEnd"),Wle("onMouseEnter",["mouseout","mouseover"]),Wle("onMouseLeave",["mouseout","mouseover"]),Wle("onPointerEnter",["pointerout","pointerover"]),Wle("onPointerLeave",["pointerout","pointerover"]),Hle("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hle("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hle("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hle("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hle("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hle("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pme="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),hme=new Set("cancel close invalid load scroll toggle".split(" ").concat(pme));function mme(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,o,s,c){if(wfe.apply(this,arguments),mfe){if(!mfe)throw Error(Ble(198));var u=yfe;mfe=!1,yfe=null,bfe||(bfe=!0,gfe=u)}}(r,t,void 0,e),e.currentTarget=null}function yme(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break e;mme(i,s,u),a=c}else for(o=0;o<r.length;o++){if(c=(s=r[o]).instance,u=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break e;mme(i,s,u),a=c}}}if(bfe)throw e=gfe,bfe=!1,gfe=null,e}function bme(e,t){var n=t[Kme];void 0===n&&(n=t[Kme]=new Set);var r=e+"__bubble";n.has(r)||(Tme(t,e,2,!1),n.add(r))}function gme(e,t,n){var r=0;t&&(r|=4),Tme(n,e,r,t)}var vme="_reactListening"+Math.random().toString(36).slice(2);function wme(e){if(!e[vme]){e[vme]=!0,Ule.forEach((function(t){"selectionchange"!==t&&(hme.has(t)||gme(t,!1,e),gme(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[vme]||(t[vme]=!0,gme("selectionchange",!1,t))}}function Tme(e,t,n,r){switch(Ppe(t)){case 1:var i=xpe;break;case 4:i=Ope;break;default:i=Cpe}n=i.bind(null,t,n,e),i=void 0,!ffe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Eme(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var c=o.tag;if((3===c||4===c)&&((c=o.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=Zme(s)))return;if(5===(c=o.tag)||6===c){r=a=o;continue e}s=s.parentNode}}r=r.return}lfe((function(){var r=a,i=efe(n),o=[];e:{var s=cme.get(e);if(void 0!==s){var c=Hpe,u=e;switch(e){case"keypress":if(0===Mpe(n))break e;case"keydown":case"keyup":c=ahe;break;case"focusin":u="focus",c=Xpe;break;case"focusout":u="blur",c=Xpe;break;case"beforeblur":case"afterblur":c=Xpe;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=qpe;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=Kpe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=she;break;case ime:case ame:case ome:c=Ype;break;case sme:c=che;break;case"scroll":c=Vpe;break;case"wheel":c=lhe;break;case"copy":case"cut":case"paste":c=Jpe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=ohe}var l=0!=(4&t),d=!l&&"scroll"===e,f=l?null!==s?s+"Capture":null:s;l=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=dfe(h,f))&&l.push(Ame(h,m,p)))),d)break;h=h.return}0<l.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:l}))}}if(0==(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===$de||!(u=n.relatedTarget||n.fromElement)||!Zme(u)&&!u[qme])&&(c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Zme(u):null)&&(u!==(d=Tfe(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(c=null,u=r),c!==u)){if(l=qpe,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=ohe,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==c?s:Qme(c),p=null==u?s:Qme(u),(s=new l(m,h+"leave",c,n,i)).target=d,s.relatedTarget=p,m=null,Zme(i)===r&&((l=new l(f,h+"enter",u,n,i)).target=p,l.relatedTarget=d,m=l),d=m,c&&u)e:{for(f=u,h=0,p=l=c;p;p=Ome(p))h++;for(p=0,m=f;m;m=Ome(m))p++;for(;0<h-p;)l=Ome(l),h--;for(;0<p-h;)f=Ome(f),p--;for(;h--;){if(l===f||null!==f&&l===f.alternate)break e;l=Ome(l),f=Ome(f)}l=null}else l=null;null!==c&&Cme(o,s,c,l,!1),null!==u&&null!==d&&Cme(o,d,u,l,!0)}if("select"===(c=(s=r?Qme(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var y=_he;else if(Ehe(s))if(Phe)y=Fhe;else{y=Lhe;var b=Dhe}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=jhe);switch(y&&(y=y(e,r))?Ahe(o,y,n,i):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&Mde(s,"number",s.value)),b=r?Qme(r):window,e){case"focusin":(Ehe(b)||"true"===b.contentEditable)&&(Xhe=b,Yhe=r,Zhe=null);break;case"focusout":Zhe=Yhe=Xhe=null;break;case"mousedown":Jhe=!0;break;case"contextmenu":case"mouseup":case"dragend":Jhe=!1,Qhe(o,n,i);break;case"selectionchange":if(Khe)break;case"keydown":case"keyup":Qhe(o,n,i)}var g;if(fhe)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else whe?ghe(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(mhe&&"ko"!==n.locale&&(whe||"onCompositionStart"!==v?"onCompositionEnd"===v&&whe&&(g=Npe()):(kpe="value"in(Spe=i)?Spe.value:Spe.textContent,whe=!0)),0<(b=xme(r,v)).length&&(v=new Qpe(v,e,null,n,i),o.push({event:v,listeners:b}),g?v.data=g:null!==(g=vhe(n))&&(v.data=g))),(g=hhe?function(e,t){switch(e){case"compositionend":return vhe(t);case"keypress":return 32!==t.which?null:(bhe=!0,yhe);case"textInput":return(e=t.data)===yhe&&bhe?null:e;default:return null}}(e,n):function(e,t){if(whe)return"compositionend"===e||!fhe&&ghe(e,t)?(e=Npe(),Rpe=kpe=Spe=null,whe=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mhe&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=xme(r,"onBeforeInput")).length&&(i=new Qpe("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}yme(o,t)}))}function Ame(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xme(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=dfe(e,n))&&r.unshift(Ame(e,a,i)),null!=(a=dfe(e,t))&&r.push(Ame(e,a,i))),e=e.return}return r}function Ome(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Cme(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,c=s.alternate,u=s.stateNode;if(null!==c&&c===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(c=dfe(n,a))&&o.unshift(Ame(n,c,s)):i||null!=(c=dfe(n,a))&&o.push(Ame(n,c,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Ime=/\r\n?/g,_me=/\u0000|\uFFFD/g;function Pme(e){return("string"==typeof e?e:""+e).replace(Ime,"\n").replace(_me,"")}function Sme(e,t,n){if(t=Pme(t),Pme(e)!==t&&n)throw Error(Ble(425))}function kme(){}var Rme=null,Nme=null;function Mme(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Dme="function"==typeof setTimeout?setTimeout:void 0,Lme="function"==typeof clearTimeout?clearTimeout:void 0,jme="function"==typeof Promise?Promise:void 0,Fme="function"==typeof queueMicrotask?queueMicrotask:void 0!==jme?function(e){return jme.resolve(null).then(e).catch(Bme)}:Dme;function Bme(e){setTimeout((function(){throw e}))}function Ume(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Tpe(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Tpe(t)}function zme(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Hme(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Wme=Math.random().toString(36).slice(2),Vme="__reactFiber$"+Wme,Gme="__reactProps$"+Wme,qme="__reactContainer$"+Wme,Kme="__reactEvents$"+Wme,Xme="__reactListeners$"+Wme,Yme="__reactHandles$"+Wme;function Zme(e){var t=e[Vme];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qme]||n[Vme]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Hme(e);null!==e;){if(n=e[Vme])return n;e=Hme(e)}return t}n=(e=n).parentNode}return null}function Jme(e){return!(e=e[Vme]||e[qme])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Qme(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(Ble(33))}function $me(e){return e[Gme]||null}var eye=[],tye=-1;function nye(e){return{current:e}}function rye(e){0>tye||(e.current=eye[tye],eye[tye]=null,tye--)}function iye(e,t){tye++,eye[tye]=e.current,e.current=t}var aye={},oye=nye(aye),sye=nye(!1),cye=aye;function uye(e,t){var n=e.type.contextTypes;if(!n)return aye;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function lye(e){return null!=(e=e.childContextTypes)}function dye(){rye(sye),rye(oye)}function fye(e,t,n){if(oye.current!==aye)throw Error(Ble(168));iye(oye,t),iye(sye,n)}function pye(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(Ble(108,Ade(e)||"Unknown",i));return bde({},n,r)}function hye(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||aye,cye=oye.current,iye(oye,e),iye(sye,sye.current),!0}function mye(e,t,n){var r=e.stateNode;if(!r)throw Error(Ble(169));n?(e=pye(e,t,cye),r.__reactInternalMemoizedMergedChildContext=e,rye(sye),rye(oye),iye(oye,e)):rye(sye),iye(sye,n)}var yye=null,bye=!1,gye=!1;function vye(e){null===yye?yye=[e]:yye.push(e)}function wye(){if(!gye&&null!==yye){gye=!0;var e=0,t=Qfe;try{var n=yye;for(Qfe=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}yye=null,bye=!1}catch(t){throw null!==yye&&(yye=yye.slice(e+1)),Cfe(Rfe,wye),t}finally{Qfe=t,gye=!1}}return null}var Tye=[],Eye=0,Aye=null,xye=0,Oye=[],Cye=0,Iye=null,_ye=1,Pye="";function Sye(e,t){Tye[Eye++]=xye,Tye[Eye++]=Aye,Aye=e,xye=t}function kye(e,t,n){Oye[Cye++]=_ye,Oye[Cye++]=Pye,Oye[Cye++]=Iye,Iye=e;var r=_ye;e=Pye;var i=32-Bfe(r)-1;r&=~(1<<i),n+=1;var a=32-Bfe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,_ye=1<<32-Bfe(t)+i|n<<i|r,Pye=a+e}else _ye=1<<a|n<<i|r,Pye=e}function Rye(e){null!==e.return&&(Sye(e,1),kye(e,1,0))}function Nye(e){for(;e===Aye;)Aye=Tye[--Eye],Tye[Eye]=null,xye=Tye[--Eye],Tye[Eye]=null;for(;e===Iye;)Iye=Oye[--Cye],Oye[Cye]=null,Pye=Oye[--Cye],Oye[Cye]=null,_ye=Oye[--Cye],Oye[Cye]=null}var Mye=null,Dye=null,Lye=!1,jye=null;function Fye(e,t){var n=uTe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Bye(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Mye=e,Dye=zme(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Mye=e,Dye=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Iye?{id:_ye,overflow:Pye}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=uTe(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Mye=e,Dye=null,!0);default:return!1}}function Uye(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function zye(e){if(Lye){var t=Dye;if(t){var n=t;if(!Bye(e,t)){if(Uye(e))throw Error(Ble(418));t=zme(n.nextSibling);var r=Mye;t&&Bye(e,t)?Fye(r,n):(e.flags=-4097&e.flags|2,Lye=!1,Mye=e)}}else{if(Uye(e))throw Error(Ble(418));e.flags=-4097&e.flags|2,Lye=!1,Mye=e}}}function Hye(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Mye=e}function Wye(e){if(e!==Mye)return!1;if(!Lye)return Hye(e),Lye=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Mme(e.type,e.memoizedProps)),t&&(t=Dye)){if(Uye(e))throw Vye(),Error(Ble(418));for(;t;)Fye(e,t),t=zme(t.nextSibling)}if(Hye(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(Ble(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Dye=zme(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Dye=null}}else Dye=Mye?zme(e.stateNode.nextSibling):null;return!0}function Vye(){for(var e=Dye;e;)e=zme(e.nextSibling)}function Gye(){Dye=Mye=null,Lye=!1}function qye(e){null===jye?jye=[e]:jye.push(e)}var Kye=ede.ReactCurrentBatchConfig;function Xye(e,t){if(e&&e.defaultProps){for(var n in t=bde({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Yye=nye(null),Zye=null,Jye=null,Qye=null;function $ye(){Qye=Jye=Zye=null}function ebe(e){var t=Yye.current;rye(Yye),e._currentValue=t}function tbe(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function nbe(e,t){Zye=e,Qye=Jye=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Jge=!0),e.firstContext=null)}function rbe(e){var t=e._currentValue;if(Qye!==e)if(e={context:e,memoizedValue:t,next:null},null===Jye){if(null===Zye)throw Error(Ble(308));Jye=e,Zye.dependencies={lanes:0,firstContext:e}}else Jye=Jye.next=e;return t}var ibe=null;function abe(e){null===ibe?ibe=[e]:ibe.push(e)}function obe(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,abe(t)):(n.next=i.next,i.next=n),t.interleaved=n,sbe(e,r)}function sbe(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var cbe=!1;function ube(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lbe(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function dbe(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fbe(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&owe)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,sbe(e,n)}return null===(i=r.interleaved)?(t.next=t,abe(r)):(t.next=i.next,i.next=t),r.interleaved=t,sbe(e,n)}function pbe(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Jfe(e,n)}}function hbe(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function mbe(e,t,n,r){var i=e.updateQueue;cbe=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var c=s,u=c.next;c.next=null,null===o?a=u:o.next=u,o=c;var l=e.alternate;null!==l&&((s=(l=l.updateQueue).lastBaseUpdate)!==o&&(null===s?l.firstBaseUpdate=u:s.next=u,l.lastBaseUpdate=c))}if(null!==a){var d=i.baseState;for(o=0,l=u=c=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==l&&(l=l.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=bde({},d,f);break e;case 2:cbe=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(u=l=p,c=d):l=l.next=p,o|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===l&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);hwe|=o,e.lanes=o,e.memoizedState=d}}function ybe(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(Ble(191,i));i.call(r)}}}var bbe=(new jle.Component).refs;function gbe(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:bde({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var vbe={isMounted:function(e){return!!(e=e._reactInternals)&&Tfe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rwe(),i=Nwe(e),a=dbe(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=fbe(e,a,i))&&(Mwe(t,e,i,r),pbe(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rwe(),i=Nwe(e),a=dbe(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=fbe(e,a,i))&&(Mwe(t,e,i,r),pbe(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rwe(),r=Nwe(e),i=dbe(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=fbe(e,i,r))&&(Mwe(t,e,r,n),pbe(t,e,r))}};function wbe(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!Uhe(n,r)||!Uhe(i,a))}function Tbe(e,t,n){var r=!1,i=aye,a=t.contextType;return"object"==typeof a&&null!==a?a=rbe(a):(i=lye(t)?cye:oye.current,a=(r=null!=(r=t.contextTypes))?uye(e,i):aye),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vbe,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ebe(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vbe.enqueueReplaceState(t,t.state,null)}function Abe(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=bbe,ube(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=rbe(a):(a=lye(t)?cye:oye.current,i.context=uye(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(gbe(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&vbe.enqueueReplaceState(i,i.state,null),mbe(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function xbe(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(Ble(309));var r=n.stateNode}if(!r)throw Error(Ble(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===bbe&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(Ble(284));if(!n._owner)throw Error(Ble(290,e))}return e}function Obe(e,t){throw e=Object.prototype.toString.call(t),Error(Ble(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cbe(e){return(0,e._init)(e._payload)}function Ibe(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=dTe(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=mTe(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===rde?l(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===fde&&Cbe(a)===t.type)?((r=i(t,n.props)).ref=xbe(e,t,n),r.return=e,r):((r=fTe(n.type,n.key,n.props,null,e.mode,r)).ref=xbe(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=yTe(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function l(e,t,n,r,a){return null===t||7!==t.tag?((t=pTe(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=mTe(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case tde:return(n=fTe(t.type,t.key,t.props,null,e.mode,n)).ref=xbe(e,null,t),n.return=e,n;case nde:return(t=yTe(t,e.mode,n)).return=e,t;case fde:return d(e,(0,t._init)(t._payload),n)}if(Dde(t)||mde(t))return(t=pTe(t,e.mode,n,null)).return=e,t;Obe(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case tde:return n.key===i?c(e,t,n,r):null;case nde:return n.key===i?u(e,t,n,r):null;case fde:return f(e,t,(i=n._init)(n._payload),r)}if(Dde(n)||mde(n))return null!==i?null:l(e,t,n,r,null);Obe(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case tde:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case nde:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case fde:return p(e,t,n,(0,r._init)(r._payload),i)}if(Dde(r)||mde(r))return l(t,e=e.get(n)||null,r,i,null);Obe(t,r)}return null}function h(i,o,s,c){for(var u=null,l=null,h=o,m=o=0,y=null;null!==h&&m<s.length;m++){h.index>m?(y=h,h=null):y=h.sibling;var b=f(i,h,s[m],c);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(i,h),o=a(b,o,m),null===l?u=b:l.sibling=b,l=b,h=y}if(m===s.length)return n(i,h),Lye&&Sye(i,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],c))&&(o=a(h,o,m),null===l?u=h:l.sibling=h,l=h);return Lye&&Sye(i,m),u}for(h=r(i,h);m<s.length;m++)null!==(y=p(h,i,m,s[m],c))&&(e&&null!==y.alternate&&h.delete(null===y.key?m:y.key),o=a(y,o,m),null===l?u=y:l.sibling=y,l=y);return e&&h.forEach((function(e){return t(i,e)})),Lye&&Sye(i,m),u}function m(i,o,s,c){var u=mde(s);if("function"!=typeof u)throw Error(Ble(150));if(null==(s=u.call(s)))throw Error(Ble(151));for(var l=u=null,h=o,m=o=0,y=null,b=s.next();null!==h&&!b.done;m++,b=s.next()){h.index>m?(y=h,h=null):y=h.sibling;var g=f(i,h,b.value,c);if(null===g){null===h&&(h=y);break}e&&h&&null===g.alternate&&t(i,h),o=a(g,o,m),null===l?u=g:l.sibling=g,l=g,h=y}if(b.done)return n(i,h),Lye&&Sye(i,m),u;if(null===h){for(;!b.done;m++,b=s.next())null!==(b=d(i,b.value,c))&&(o=a(b,o,m),null===l?u=b:l.sibling=b,l=b);return Lye&&Sye(i,m),u}for(h=r(i,h);!b.done;m++,b=s.next())null!==(b=p(h,i,m,b.value,c))&&(e&&null!==b.alternate&&h.delete(null===b.key?m:b.key),o=a(b,o,m),null===l?u=b:l.sibling=b,l=b);return e&&h.forEach((function(e){return t(i,e)})),Lye&&Sye(i,m),u}return function e(r,a,s,c){if("object"==typeof s&&null!==s&&s.type===rde&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case tde:e:{for(var u=s.key,l=a;null!==l;){if(l.key===u){if((u=s.type)===rde){if(7===l.tag){n(r,l.sibling),(a=i(l,s.props.children)).return=r,r=a;break e}}else if(l.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===fde&&Cbe(u)===l.type){n(r,l.sibling),(a=i(l,s.props)).ref=xbe(r,l,s),a.return=r,r=a;break e}n(r,l);break}t(r,l),l=l.sibling}s.type===rde?((a=pTe(s.props.children,r.mode,c,s.key)).return=r,r=a):((c=fTe(s.type,s.key,s.props,null,r.mode,c)).ref=xbe(r,a,s),c.return=r,r=c)}return o(r);case nde:e:{for(l=s.key;null!==a;){if(a.key===l){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=i(a,s.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=yTe(s,r.mode,c)).return=r,r=a}return o(r);case fde:return e(r,a,(l=s._init)(s._payload),c)}if(Dde(s))return h(r,a,s,c);if(mde(s))return m(r,a,s,c);Obe(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,s)).return=r,r=a):(n(r,a),(a=mTe(s,r.mode,c)).return=r,r=a),o(r)):n(r,a)}}var _be=Ibe(!0),Pbe=Ibe(!1),Sbe={},kbe=nye(Sbe),Rbe=nye(Sbe),Nbe=nye(Sbe);function Mbe(e){if(e===Sbe)throw Error(Ble(174));return e}function Dbe(e,t){switch(iye(Nbe,t),iye(Rbe,e),iye(kbe,Sbe),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hde(null,"");break;default:t=Hde(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}rye(kbe),iye(kbe,t)}function Lbe(){rye(kbe),rye(Rbe),rye(Nbe)}function jbe(e){Mbe(Nbe.current);var t=Mbe(kbe.current),n=Hde(t,e.type);t!==n&&(iye(Rbe,e),iye(kbe,n))}function Fbe(e){Rbe.current===e&&(rye(kbe),rye(Rbe))}var Bbe=nye(0);function Ube(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zbe=[];function Hbe(){for(var e=0;e<zbe.length;e++)zbe[e]._workInProgressVersionPrimary=null;zbe.length=0}var Wbe=ede.ReactCurrentDispatcher,Vbe=ede.ReactCurrentBatchConfig,Gbe=0,qbe=null,Kbe=null,Xbe=null,Ybe=!1,Zbe=!1,Jbe=0,Qbe=0;function $be(){throw Error(Ble(321))}function ege(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bhe(e[n],t[n]))return!1;return!0}function tge(e,t,n,r,i,a){if(Gbe=a,qbe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wbe.current=null===e||null===e.memoizedState?Fge:Bge,e=n(r,i),Zbe){a=0;do{if(Zbe=!1,Jbe=0,25<=a)throw Error(Ble(301));a+=1,Xbe=Kbe=null,t.updateQueue=null,Wbe.current=Uge,e=n(r,i)}while(Zbe)}if(Wbe.current=jge,t=null!==Kbe&&null!==Kbe.next,Gbe=0,Xbe=Kbe=qbe=null,Ybe=!1,t)throw Error(Ble(300));return e}function nge(){var e=0!==Jbe;return Jbe=0,e}function rge(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Xbe?qbe.memoizedState=Xbe=e:Xbe=Xbe.next=e,Xbe}function ige(){if(null===Kbe){var e=qbe.alternate;e=null!==e?e.memoizedState:null}else e=Kbe.next;var t=null===Xbe?qbe.memoizedState:Xbe.next;if(null!==t)Xbe=t,Kbe=e;else{if(null===e)throw Error(Ble(310));e={memoizedState:(Kbe=e).memoizedState,baseState:Kbe.baseState,baseQueue:Kbe.baseQueue,queue:Kbe.queue,next:null},null===Xbe?qbe.memoizedState=Xbe=e:Xbe=Xbe.next=e}return Xbe}function age(e,t){return"function"==typeof t?t(e):t}function oge(e){var t=ige(),n=t.queue;if(null===n)throw Error(Ble(311));n.lastRenderedReducer=e;var r=Kbe,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var s=o=null,c=null,u=a;do{var l=u.lane;if((Gbe&l)===l)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:l,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(s=c=d,o=r):c=c.next=d,qbe.lanes|=l,hwe|=l}u=u.next}while(null!==u&&u!==a);null===c?o=r:c.next=s,Bhe(r,t.memoizedState)||(Jge=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,qbe.lanes|=a,hwe|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sge(e){var t=ige(),n=t.queue;if(null===n)throw Error(Ble(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);Bhe(a,t.memoizedState)||(Jge=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function cge(){}function uge(e,t){var n=qbe,r=ige(),i=t(),a=!Bhe(r.memoizedState,i);if(a&&(r.memoizedState=i,Jge=!0),r=r.queue,Tge(fge.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Xbe&&1&Xbe.memoizedState.tag){if(n.flags|=2048,yge(9,dge.bind(null,n,r,i,t),void 0,null),null===swe)throw Error(Ble(349));0!=(30&Gbe)||lge(n,t,i)}return i}function lge(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=qbe.updateQueue)?(t={lastEffect:null,stores:null},qbe.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function dge(e,t,n,r){t.value=n,t.getSnapshot=r,pge(t)&&hge(e)}function fge(e,t,n){return n((function(){pge(t)&&hge(e)}))}function pge(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bhe(e,n)}catch(e){return!0}}function hge(e){var t=sbe(e,1);null!==t&&Mwe(t,e,1,-1)}function mge(e){var t=rge();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:age,lastRenderedState:e},t.queue=e,e=e.dispatch=Nge.bind(null,qbe,e),[t.memoizedState,e]}function yge(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=qbe.updateQueue)?(t={lastEffect:null,stores:null},qbe.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function bge(){return ige().memoizedState}function gge(e,t,n,r){var i=rge();qbe.flags|=e,i.memoizedState=yge(1|t,n,void 0,void 0===r?null:r)}function vge(e,t,n,r){var i=ige();r=void 0===r?null:r;var a=void 0;if(null!==Kbe){var o=Kbe.memoizedState;if(a=o.destroy,null!==r&&ege(r,o.deps))return void(i.memoizedState=yge(t,n,a,r))}qbe.flags|=e,i.memoizedState=yge(1|t,n,a,r)}function wge(e,t){return gge(8390656,8,e,t)}function Tge(e,t){return vge(2048,8,e,t)}function Ege(e,t){return vge(4,2,e,t)}function Age(e,t){return vge(4,4,e,t)}function xge(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Oge(e,t,n){return n=null!=n?n.concat([e]):null,vge(4,4,xge.bind(null,t,e),n)}function Cge(){}function Ige(e,t){var n=ige();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ege(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _ge(e,t){var n=ige();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ege(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pge(e,t,n){return 0==(21&Gbe)?(e.baseState&&(e.baseState=!1,Jge=!0),e.memoizedState=n):(Bhe(n,t)||(n=Xfe(),qbe.lanes|=n,hwe|=n,e.baseState=!0),t)}function Sge(e,t){var n=Qfe;Qfe=0!==n&&4>n?n:4,e(!0);var r=Vbe.transition;Vbe.transition={};try{e(!1),t()}finally{Qfe=n,Vbe.transition=r}}function kge(){return ige().memoizedState}function Rge(e,t,n){var r=Nwe(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Mge(e))Dge(t,n);else if(null!==(n=obe(e,t,n,r))){Mwe(n,e,r,Rwe()),Lge(n,t,r)}}function Nge(e,t,n){var r=Nwe(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mge(e))Dge(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Bhe(s,o)){var c=t.interleaved;return null===c?(i.next=i,abe(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=obe(e,t,i,r))&&(Mwe(n,e,r,i=Rwe()),Lge(n,t,r))}}function Mge(e){var t=e.alternate;return e===qbe||null!==t&&t===qbe}function Dge(e,t){Zbe=Ybe=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lge(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Jfe(e,n)}}var jge={readContext:rbe,useCallback:$be,useContext:$be,useEffect:$be,useImperativeHandle:$be,useInsertionEffect:$be,useLayoutEffect:$be,useMemo:$be,useReducer:$be,useRef:$be,useState:$be,useDebugValue:$be,useDeferredValue:$be,useTransition:$be,useMutableSource:$be,useSyncExternalStore:$be,useId:$be,unstable_isNewReconciler:!1},Fge={readContext:rbe,useCallback:function(e,t){return rge().memoizedState=[e,void 0===t?null:t],e},useContext:rbe,useEffect:wge,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,gge(4194308,4,xge.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gge(4194308,4,e,t)},useInsertionEffect:function(e,t){return gge(4,2,e,t)},useMemo:function(e,t){var n=rge();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rge();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Rge.bind(null,qbe,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},rge().memoizedState=e},useState:mge,useDebugValue:Cge,useDeferredValue:function(e){return rge().memoizedState=e},useTransition:function(){var e=mge(!1),t=e[0];return e=Sge.bind(null,e[1]),rge().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qbe,i=rge();if(Lye){if(void 0===n)throw Error(Ble(407));n=n()}else{if(n=t(),null===swe)throw Error(Ble(349));0!=(30&Gbe)||lge(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,wge(fge.bind(null,r,a,e),[e]),r.flags|=2048,yge(9,dge.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=rge(),t=swe.identifierPrefix;if(Lye){var n=Pye;t=":"+t+"R"+(n=(_ye&~(1<<32-Bfe(_ye)-1)).toString(32)+n),0<(n=Jbe++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Qbe++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Bge={readContext:rbe,useCallback:Ige,useContext:rbe,useEffect:Tge,useImperativeHandle:Oge,useInsertionEffect:Ege,useLayoutEffect:Age,useMemo:_ge,useReducer:oge,useRef:bge,useState:function(){return oge(age)},useDebugValue:Cge,useDeferredValue:function(e){return Pge(ige(),Kbe.memoizedState,e)},useTransition:function(){return[oge(age)[0],ige().memoizedState]},useMutableSource:cge,useSyncExternalStore:uge,useId:kge,unstable_isNewReconciler:!1},Uge={readContext:rbe,useCallback:Ige,useContext:rbe,useEffect:Tge,useImperativeHandle:Oge,useInsertionEffect:Ege,useLayoutEffect:Age,useMemo:_ge,useReducer:sge,useRef:bge,useState:function(){return sge(age)},useDebugValue:Cge,useDeferredValue:function(e){var t=ige();return null===Kbe?t.memoizedState=e:Pge(t,Kbe.memoizedState,e)},useTransition:function(){return[sge(age)[0],ige().memoizedState]},useMutableSource:cge,useSyncExternalStore:uge,useId:kge,unstable_isNewReconciler:!1};function zge(e,t){try{var n="",r=t;do{n+=Tde(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function Hge(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Wge(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Vge="function"==typeof WeakMap?WeakMap:Map;function Gge(e,t,n){(n=dbe(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ewe||(Ewe=!0,Awe=r),Wge(0,t)},n}function qge(e,t,n){(n=dbe(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Wge(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){Wge(0,t),"function"!=typeof r&&(null===xwe?xwe=new Set([this]):xwe.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Kge(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Vge;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rTe.bind(null,e,t,n),t.then(e,e))}function Xge(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Yge(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=dbe(-1,1)).tag=2,fbe(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Zge=ede.ReactCurrentOwner,Jge=!1;function Qge(e,t,n,r){t.child=null===e?Pbe(t,null,n,r):_be(t,e.child,n,r)}function $ge(e,t,n,r,i){n=n.render;var a=t.ref;return nbe(t,i),r=tge(e,t,n,r,a,i),n=nge(),null===e||Jge?(Lye&&n&&Rye(t),t.flags|=1,Qge(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Eve(e,t,i))}function eve(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||lTe(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=fTe(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,tve(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:Uhe)(o,r)&&e.ref===t.ref)return Eve(e,t,i)}return t.flags|=1,(e=dTe(a,r)).ref=t.ref,e.return=t,t.child=e}function tve(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(Uhe(a,r)&&e.ref===t.ref){if(Jge=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,Eve(e,t,i);0!=(131072&e.flags)&&(Jge=!0)}}return ive(e,t,n,r,i)}function nve(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},iye(dwe,lwe),lwe|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,iye(dwe,lwe),lwe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,iye(dwe,lwe),lwe|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,iye(dwe,lwe),lwe|=r;return Qge(e,t,i,n),t.child}function rve(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ive(e,t,n,r,i){var a=lye(n)?cye:oye.current;return a=uye(t,a),nbe(t,i),n=tge(e,t,n,r,a,i),r=nge(),null===e||Jge?(Lye&&r&&Rye(t),t.flags|=1,Qge(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Eve(e,t,i))}function ave(e,t,n,r,i){if(lye(n)){var a=!0;hye(t)}else a=!1;if(nbe(t,i),null===t.stateNode)Tve(e,t),Tbe(t,n,r),Abe(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,u=n.contextType;"object"==typeof u&&null!==u?u=rbe(u):u=uye(t,u=lye(n)?cye:oye.current);var l=n.getDerivedStateFromProps,d="function"==typeof l||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||c!==u)&&Ebe(t,o,r,u),cbe=!1;var f=t.memoizedState;o.state=f,mbe(t,r,o,i),c=t.memoizedState,s!==r||f!==c||sye.current||cbe?("function"==typeof l&&(gbe(t,n,l,r),c=t.memoizedState),(s=cbe||wbe(t,n,s,r,f,c,u))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,lbe(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Xye(t.type,s),o.props=u,d=t.pendingProps,f=o.context,"object"==typeof(c=n.contextType)&&null!==c?c=rbe(c):c=uye(t,c=lye(n)?cye:oye.current);var p=n.getDerivedStateFromProps;(l="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||f!==c)&&Ebe(t,o,r,c),cbe=!1,f=t.memoizedState,o.state=f,mbe(t,r,o,i);var h=t.memoizedState;s!==d||f!==h||sye.current||cbe?("function"==typeof p&&(gbe(t,n,p,r),h=t.memoizedState),(u=cbe||wbe(t,n,u,r,f,h,c)||!1)?(l||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,c),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,c)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=c,r=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ove(e,t,n,r,a,i)}function ove(e,t,n,r,i,a){rve(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&mye(t,n,!1),Eve(e,t,a);r=t.stateNode,Zge.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=_be(t,e.child,null,a),t.child=_be(t,null,s,a)):Qge(e,t,s,a),t.memoizedState=r.state,i&&mye(t,n,!0),t.child}function sve(e){var t=e.stateNode;t.pendingContext?fye(0,t.pendingContext,t.pendingContext!==t.context):t.context&&fye(0,t.context,!1),Dbe(e,t.containerInfo)}function cve(e,t,n,r,i){return Gye(),qye(i),t.flags|=256,Qge(e,t,n,r),t.child}var uve,lve,dve,fve,pve={dehydrated:null,treeContext:null,retryLane:0};function hve(e){return{baseLanes:e,cachePool:null,transitions:null}}function mve(e,t,n){var r,i=t.pendingProps,a=Bbe.current,o=!1,s=0!=(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),iye(Bbe,1&a),null===e)return zye(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=i.children,e=i.fallback,o?(i=t.mode,o=t.child,s={mode:"hidden",children:s},0==(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=s):o=hTe(s,i,0,null),e=pTe(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=hve(n),t.memoizedState=pve,e):yve(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,o){if(n)return 256&t.flags?(t.flags&=-257,bve(e,t,o,r=Hge(Error(Ble(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=hTe({mode:"visible",children:r.children},i,0,null),(a=pTe(a,i,o,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&_be(t,e.child,null,o),t.child.memoizedState=hve(o),t.memoizedState=pve,a);if(0==(1&t.mode))return bve(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,bve(e,t,o,r=Hge(a=Error(Ble(419)),r,void 0))}if(s=0!=(o&e.childLanes),Jge||s){if(null!==(r=swe)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|o))?0:i)&&i!==a.retryLane&&(a.retryLane=i,sbe(e,i),Mwe(r,e,i,-1))}return Kwe(),bve(e,t,o,r=Hge(Error(Ble(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=aTe.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Dye=zme(i.nextSibling),Mye=t,Lye=!0,jye=null,null!==e&&(Oye[Cye++]=_ye,Oye[Cye++]=Pye,Oye[Cye++]=Iye,_ye=e.id,Pye=e.overflow,Iye=t),t=yve(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,a,n);if(o){o=i.fallback,s=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&s)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=dTe(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?o=dTe(r,o):(o=pTe(o,s,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,s=null===(s=e.child.memoizedState)?hve(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=pve,i}return e=(o=e.child).sibling,i=dTe(o,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function yve(e,t){return(t=hTe({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function bve(e,t,n,r){return null!==r&&qye(r),_be(t,e.child,null,n),(e=yve(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function gve(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),tbe(e.return,t,n)}function vve(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function wve(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Qge(e,t,r.children,n),0!=(2&(r=Bbe.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&gve(e,n,t);else if(19===e.tag)gve(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(iye(Bbe,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Ube(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vve(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Ube(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vve(t,!0,n,null,a);break;case"together":vve(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Tve(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Eve(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),hwe|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(Ble(153));if(null!==t.child){for(n=dTe(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=dTe(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ave(e,t){if(!Lye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xve(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ove(e,t,n){var r=t.pendingProps;switch(Nye(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xve(t),null;case 1:case 17:return lye(t.type)&&dye(),xve(t),null;case 3:return r=t.stateNode,Lbe(),rye(sye),rye(oye),Hbe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Wye(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==jye&&(Fwe(jye),jye=null))),lve(e,t),xve(t),null;case 5:Fbe(t);var i=Mbe(Nbe.current);if(n=t.type,null!==e&&null!=t.stateNode)dve(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(Ble(166));return xve(t),null}if(e=Mbe(kbe.current),Wye(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Vme]=t,r[Gme]=a,e=0!=(1&t.mode),n){case"dialog":bme("cancel",r),bme("close",r);break;case"iframe":case"object":case"embed":bme("load",r);break;case"video":case"audio":for(i=0;i<pme.length;i++)bme(pme[i],r);break;case"source":bme("error",r);break;case"img":case"image":case"link":bme("error",r),bme("load",r);break;case"details":bme("toggle",r);break;case"input":Sde(r,a),bme("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},bme("invalid",r);break;case"textarea":Fde(r,a),bme("invalid",r)}for(var o in Jde(n,a),i=null,a)if(a.hasOwnProperty(o)){var s=a[o];"children"===o?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&Sme(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&Sme(r.textContent,s,e),i=["children",""+s]):zle.hasOwnProperty(o)&&null!=s&&"onScroll"===o&&bme("scroll",r)}switch(n){case"input":Cde(r),Nde(r,a,!0);break;case"textarea":Cde(r),Ude(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=kme)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{o=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=zde(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=o.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),"select"===n&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Vme]=t,e[Gme]=r,uve(e,t,!1,!1),t.stateNode=e;e:{switch(o=Qde(n,r),n){case"dialog":bme("cancel",e),bme("close",e),i=r;break;case"iframe":case"object":case"embed":bme("load",e),i=r;break;case"video":case"audio":for(i=0;i<pme.length;i++)bme(pme[i],e);i=r;break;case"source":bme("error",e),i=r;break;case"img":case"image":case"link":bme("error",e),bme("load",e),i=r;break;case"details":bme("toggle",e),i=r;break;case"input":Sde(e,r),i=Pde(e,r),bme("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=bde({},r,{value:void 0}),bme("invalid",e);break;case"textarea":Fde(e,r),i=jde(e,r),bme("invalid",e)}for(a in Jde(n,i),s=i)if(s.hasOwnProperty(a)){var c=s[a];"style"===a?Yde(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&Vde(e,c):"children"===a?"string"==typeof c?("textarea"!==n||""!==c)&&Gde(e,c):"number"==typeof c&&Gde(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(zle.hasOwnProperty(a)?null!=c&&"onScroll"===a&&bme("scroll",e):null!=c&&$le(e,a,c,o))}switch(n){case"input":Cde(e),Nde(e,r,!1);break;case"textarea":Cde(e),Ude(e);break;case"option":null!=r.value&&e.setAttribute("value",""+xde(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?Lde(e,!!r.multiple,a,!1):null!=r.defaultValue&&Lde(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=kme)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return xve(t),null;case 6:if(e&&null!=t.stateNode)fve(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(Ble(166));if(n=Mbe(Nbe.current),Mbe(kbe.current),Wye(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vme]=t,(a=r.nodeValue!==n)&&null!==(e=Mye))switch(e.tag){case 3:Sme(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Sme(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Vme]=t,t.stateNode=r}return xve(t),null;case 13:if(rye(Bbe),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Lye&&null!==Dye&&0!=(1&t.mode)&&0==(128&t.flags))Vye(),Gye(),t.flags|=98560,a=!1;else if(a=Wye(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(Ble(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(Ble(317));a[Vme]=t}else Gye(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;xve(t),a=!1}else null!==jye&&(Fwe(jye),jye=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&Bbe.current)?0===fwe&&(fwe=3):Kwe())),null!==t.updateQueue&&(t.flags|=4),xve(t),null);case 4:return Lbe(),lve(e,t),null===e&&wme(t.stateNode.containerInfo),xve(t),null;case 10:return ebe(t.type._context),xve(t),null;case 19:if(rye(Bbe),null===(a=t.memoizedState))return xve(t),null;if(r=0!=(128&t.flags),null===(o=a.rendering))if(r)Ave(a,!1);else{if(0!==fwe||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=Ube(e))){for(t.flags|=128,Ave(a,!1),null!==(r=o.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(o=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return iye(Bbe,1&Bbe.current|2),t.child}e=e.sibling}null!==a.tail&&Sfe()>wwe&&(t.flags|=128,r=!0,Ave(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Ube(o))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ave(a,!0),null===a.tail&&"hidden"===a.tailMode&&!o.alternate&&!Lye)return xve(t),null}else 2*Sfe()-a.renderingStartTime>wwe&&1073741824!==n&&(t.flags|=128,r=!0,Ave(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(null!==(n=a.last)?n.sibling=o:t.child=o,a.last=o)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Sfe(),t.sibling=null,n=Bbe.current,iye(Bbe,r?1&n|2:1&n),t):(xve(t),null);case 22:case 23:return Wwe(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&lwe)&&(xve(t),6&t.subtreeFlags&&(t.flags|=8192)):xve(t),null;case 24:case 25:return null}throw Error(Ble(156,t.tag))}function Cve(e,t){switch(Nye(t),t.tag){case 1:return lye(t.type)&&dye(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Lbe(),rye(sye),rye(oye),Hbe(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Fbe(t),null;case 13:if(rye(Bbe),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(Ble(340));Gye()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return rye(Bbe),null;case 4:return Lbe(),null;case 10:return ebe(t.type._context),null;case 22:case 23:return Wwe(),null;default:return null}}uve=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},lve=function(){},dve=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Mbe(kbe.current);var a,o=null;switch(n){case"input":i=Pde(e,i),r=Pde(e,r),o=[];break;case"select":i=bde({},i,{value:void 0}),r=bde({},r,{value:void 0}),o=[];break;case"textarea":i=jde(e,i),r=jde(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=kme)}for(u in Jde(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(zle.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(s=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==s&&(null!=c||null!=s))if("style"===u)if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(o=o||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(zle.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&bme("scroll",e),o||s===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},fve=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ive=!1,_ve=!1,Pve="function"==typeof WeakSet?WeakSet:Set,Sve=null;function kve(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){nTe(e,t,n)}else n.current=null}function Rve(e,t,n){try{n()}catch(n){nTe(e,t,n)}}var Nve=!1;function Mve(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&Rve(t,n,a)}i=i.next}while(i!==r)}}function Dve(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Lve(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function jve(e){var t=e.alternate;null!==t&&(e.alternate=null,jve(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Vme],delete t[Gme],delete t[Kme],delete t[Xme],delete t[Yme])),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 Fve(e){return 5===e.tag||3===e.tag||4===e.tag}function Bve(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Fve(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Uve(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=kme));else if(4!==r&&null!==(e=e.child))for(Uve(e,t,n),e=e.sibling;null!==e;)Uve(e,t,n),e=e.sibling}function zve(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(zve(e,t,n),e=e.sibling;null!==e;)zve(e,t,n),e=e.sibling}var Hve=null,Wve=!1;function Vve(e,t,n){for(n=n.child;null!==n;)Gve(e,t,n),n=n.sibling}function Gve(e,t,n){if(Ffe&&"function"==typeof Ffe.onCommitFiberUnmount)try{Ffe.onCommitFiberUnmount(jfe,n)}catch(e){}switch(n.tag){case 5:_ve||kve(n,t);case 6:var r=Hve,i=Wve;Hve=null,Vve(e,t,n),Wve=i,null!==(Hve=r)&&(Wve?(e=Hve,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Hve.removeChild(n.stateNode));break;case 18:null!==Hve&&(Wve?(e=Hve,n=n.stateNode,8===e.nodeType?Ume(e.parentNode,n):1===e.nodeType&&Ume(e,n),Tpe(e)):Ume(Hve,n.stateNode));break;case 4:r=Hve,i=Wve,Hve=n.stateNode.containerInfo,Wve=!0,Vve(e,t,n),Hve=r,Wve=i;break;case 0:case 11:case 14:case 15:if(!_ve&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)||0!=(4&a))&&Rve(n,t,o),i=i.next}while(i!==r)}Vve(e,t,n);break;case 1:if(!_ve&&(kve(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){nTe(n,t,e)}Vve(e,t,n);break;case 21:Vve(e,t,n);break;case 22:1&n.mode?(_ve=(r=_ve)||null!==n.memoizedState,Vve(e,t,n),_ve=r):Vve(e,t,n);break;default:Vve(e,t,n)}}function qve(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Pve),t.forEach((function(t){var r=oTe.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Kve(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;null!==s;){switch(s.tag){case 5:Hve=s.stateNode,Wve=!1;break e;case 3:case 4:Hve=s.stateNode.containerInfo,Wve=!0;break e}s=s.return}if(null===Hve)throw Error(Ble(160));Gve(a,o,i),Hve=null,Wve=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){nTe(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Xve(t,e),t=t.sibling}function Xve(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kve(t,e),Yve(e),4&r){try{Mve(3,e,e.return),Dve(3,e)}catch(t){nTe(e,e.return,t)}try{Mve(5,e,e.return)}catch(t){nTe(e,e.return,t)}}break;case 1:Kve(t,e),Yve(e),512&r&&null!==n&&kve(n,n.return);break;case 5:if(Kve(t,e),Yve(e),512&r&&null!==n&&kve(n,n.return),32&e.flags){var i=e.stateNode;try{Gde(i,"")}catch(t){nTe(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,o=null!==n?n.memoizedProps:a,s=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===s&&"radio"===a.type&&null!=a.name&&kde(i,a),Qde(s,o);var u=Qde(s,a);for(o=0;o<c.length;o+=2){var l=c[o],d=c[o+1];"style"===l?Yde(i,d):"dangerouslySetInnerHTML"===l?Vde(i,d):"children"===l?Gde(i,d):$le(i,l,d,u)}switch(s){case"input":Rde(i,a);break;case"textarea":Bde(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?Lde(i,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?Lde(i,!!a.multiple,a.defaultValue,!0):Lde(i,!!a.multiple,a.multiple?[]:"",!1))}i[Gme]=a}catch(t){nTe(e,e.return,t)}}break;case 6:if(Kve(t,e),Yve(e),4&r){if(null===e.stateNode)throw Error(Ble(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){nTe(e,e.return,t)}}break;case 3:if(Kve(t,e),Yve(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Tpe(t.containerInfo)}catch(t){nTe(e,e.return,t)}break;case 4:default:Kve(t,e),Yve(e);break;case 13:Kve(t,e),Yve(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(vwe=Sfe())),4&r&&qve(e);break;case 22:if(l=null!==n&&null!==n.memoizedState,1&e.mode?(_ve=(u=_ve)||l,Kve(t,e),_ve=u):Kve(t,e),Yve(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!l&&0!=(1&e.mode))for(Sve=e,l=e.child;null!==l;){for(d=Sve=l;null!==Sve;){switch(p=(f=Sve).child,f.tag){case 0:case 11:case 14:case 15:Mve(4,f,f.return);break;case 1:kve(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){nTe(r,n,e)}}break;case 5:kve(f,f.return);break;case 22:if(null!==f.memoizedState){$ve(d);continue}}null!==p?(p.return=f,Sve=p):$ve(d)}l=l.sibling}e:for(l=null,d=e;;){if(5===d.tag){if(null===l){l=d;try{i=d.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,o=null!=(c=d.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,s.style.display=Xde("display",o))}catch(t){nTe(e,e.return,t)}}}else if(6===d.tag){if(null===l)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(t){nTe(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;l===d&&(l=null),d=d.return}l===d&&(l=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Kve(t,e),Yve(e),4&r&&qve(e);case 21:}}function Yve(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Fve(n)){var r=n;break e}n=n.return}throw Error(Ble(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Gde(i,""),r.flags&=-33),zve(e,Bve(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;Uve(e,Bve(e),a);break;default:throw Error(Ble(161))}}catch(t){nTe(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Zve(e,t,n){Sve=e,Jve(e)}function Jve(e,t,n){for(var r=0!=(1&e.mode);null!==Sve;){var i=Sve,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Ive;if(!o){var s=i.alternate,c=null!==s&&null!==s.memoizedState||_ve;s=Ive;var u=_ve;if(Ive=o,(_ve=c)&&!u)for(Sve=i;null!==Sve;)c=(o=Sve).child,22===o.tag&&null!==o.memoizedState?ewe(i):null!==c?(c.return=o,Sve=c):ewe(i);for(;null!==a;)Sve=a,Jve(a),a=a.sibling;Sve=i,Ive=s,_ve=u}Qve(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,Sve=a):Qve(e)}}function Qve(e){for(;null!==Sve;){var t=Sve;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:_ve||Dve(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!_ve)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Xye(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&ybe(t,a,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ybe(t,o,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var l=u.memoizedState;if(null!==l){var d=l.dehydrated;null!==d&&Tpe(d)}}}break;default:throw Error(Ble(163))}_ve||512&t.flags&&Lve(t)}catch(e){nTe(t,t.return,e)}}if(t===e){Sve=null;break}if(null!==(n=t.sibling)){n.return=t.return,Sve=n;break}Sve=t.return}}function $ve(e){for(;null!==Sve;){var t=Sve;if(t===e){Sve=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Sve=n;break}Sve=t.return}}function ewe(e){for(;null!==Sve;){var t=Sve;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Dve(4,t)}catch(e){nTe(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){nTe(t,i,e)}}var a=t.return;try{Lve(t)}catch(e){nTe(t,a,e)}break;case 5:var o=t.return;try{Lve(t)}catch(e){nTe(t,o,e)}}}catch(e){nTe(t,t.return,e)}if(t===e){Sve=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Sve=s;break}Sve=t.return}}var twe,nwe=Math.ceil,rwe=ede.ReactCurrentDispatcher,iwe=ede.ReactCurrentOwner,awe=ede.ReactCurrentBatchConfig,owe=0,swe=null,cwe=null,uwe=0,lwe=0,dwe=nye(0),fwe=0,pwe=null,hwe=0,mwe=0,ywe=0,bwe=null,gwe=null,vwe=0,wwe=1/0,Twe=null,Ewe=!1,Awe=null,xwe=null,Owe=!1,Cwe=null,Iwe=0,_we=0,Pwe=null,Swe=-1,kwe=0;function Rwe(){return 0!=(6&owe)?Sfe():-1!==Swe?Swe:Swe=Sfe()}function Nwe(e){return 0==(1&e.mode)?1:0!=(2&owe)&&0!==uwe?uwe&-uwe:null!==Kye.transition?(0===kwe&&(kwe=Xfe()),kwe):0!==(e=Qfe)?e:e=void 0===(e=window.event)?16:Ppe(e.type)}function Mwe(e,t,n,r){if(50<_we)throw _we=0,Pwe=null,Error(Ble(185));Zfe(e,n,r),0!=(2&owe)&&e===swe||(e===swe&&(0==(2&owe)&&(mwe|=n),4===fwe&&Bwe(e,uwe)),Dwe(e,r),1===n&&0===owe&&0==(1&t.mode)&&(wwe=Sfe()+500,bye&&wye()))}function Dwe(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Bfe(a),s=1<<o,c=i[o];-1===c?0!=(s&n)&&0==(s&r)||(i[o]=qfe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=Gfe(e,e===swe?uwe:0);if(0===r)null!==n&&Ife(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ife(n),1===t)0===e.tag?function(e){bye=!0,vye(e)}(Uwe.bind(null,e)):vye(Uwe.bind(null,e)),Fme((function(){0==(6&owe)&&wye()})),n=null;else{switch($fe(r)){case 1:n=Rfe;break;case 4:n=Nfe;break;case 16:default:n=Mfe;break;case 536870912:n=Lfe}n=sTe(n,Lwe.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Lwe(e,t){if(Swe=-1,kwe=0,0!=(6&owe))throw Error(Ble(327));var n=e.callbackNode;if(eTe()&&e.callbackNode!==n)return null;var r=Gfe(e,e===swe?uwe:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Xwe(e,r);else{t=r;var i=owe;owe|=2;var a=qwe();for(swe===e&&uwe===t||(Twe=null,wwe=Sfe()+500,Vwe(e,t));;)try{Zwe();break}catch(t){Gwe(e,t)}$ye(),rwe.current=a,owe=i,null!==cwe?t=0:(swe=null,uwe=0,t=fwe)}if(0!==t){if(2===t&&(0!==(i=Kfe(e))&&(r=i,t=jwe(e,i))),1===t)throw n=pwe,Vwe(e,0),Bwe(e,r),Dwe(e,Sfe()),n;if(6===t)Bwe(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Bhe(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=Xwe(e,r))&&(0!==(a=Kfe(e))&&(r=a,t=jwe(e,a))),1===t))throw n=pwe,Vwe(e,0),Bwe(e,r),Dwe(e,Sfe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ble(345));case 2:case 5:$we(e,gwe,Twe);break;case 3:if(Bwe(e,r),(130023424&r)===r&&10<(t=vwe+500-Sfe())){if(0!==Gfe(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Rwe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Dme($we.bind(null,e,gwe,Twe),t);break}$we(e,gwe,Twe);break;case 4:if(Bwe(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Bfe(r);a=1<<o,(o=t[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=Sfe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nwe(r/1960))-r)){e.timeoutHandle=Dme($we.bind(null,e,gwe,Twe),r);break}$we(e,gwe,Twe);break;default:throw Error(Ble(329))}}}return Dwe(e,Sfe()),e.callbackNode===n?Lwe.bind(null,e):null}function jwe(e,t){var n=bwe;return e.current.memoizedState.isDehydrated&&(Vwe(e,t).flags|=256),2!==(e=Xwe(e,t))&&(t=gwe,gwe=n,null!==t&&Fwe(t)),e}function Fwe(e){null===gwe?gwe=e:gwe.push.apply(gwe,e)}function Bwe(e,t){for(t&=~ywe,t&=~mwe,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Bfe(t),r=1<<n;e[n]=-1,t&=~r}}function Uwe(e){if(0!=(6&owe))throw Error(Ble(327));eTe();var t=Gfe(e,0);if(0==(1&t))return Dwe(e,Sfe()),null;var n=Xwe(e,t);if(0!==e.tag&&2===n){var r=Kfe(e);0!==r&&(t=r,n=jwe(e,r))}if(1===n)throw n=pwe,Vwe(e,0),Bwe(e,t),Dwe(e,Sfe()),n;if(6===n)throw Error(Ble(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$we(e,gwe,Twe),Dwe(e,Sfe()),null}function zwe(e,t){var n=owe;owe|=1;try{return e(t)}finally{0===(owe=n)&&(wwe=Sfe()+500,bye&&wye())}}function Hwe(e){null!==Cwe&&0===Cwe.tag&&0==(6&owe)&&eTe();var t=owe;owe|=1;var n=awe.transition,r=Qfe;try{if(awe.transition=null,Qfe=1,e)return e()}finally{Qfe=r,awe.transition=n,0==(6&(owe=t))&&wye()}}function Wwe(){lwe=dwe.current,rye(dwe)}function Vwe(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Lme(n)),null!==cwe)for(n=cwe.return;null!==n;){var r=n;switch(Nye(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&dye();break;case 3:Lbe(),rye(sye),rye(oye),Hbe();break;case 5:Fbe(r);break;case 4:Lbe();break;case 13:case 19:rye(Bbe);break;case 10:ebe(r.type._context);break;case 22:case 23:Wwe()}n=n.return}if(swe=e,cwe=e=dTe(e.current,null),uwe=lwe=t,fwe=0,pwe=null,ywe=mwe=hwe=0,gwe=bwe=null,null!==ibe){for(t=0;t<ibe.length;t++)if(null!==(r=(n=ibe[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}ibe=null}return e}function Gwe(e,t){for(;;){var n=cwe;try{if($ye(),Wbe.current=jge,Ybe){for(var r=qbe.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ybe=!1}if(Gbe=0,Xbe=Kbe=qbe=null,Zbe=!1,Jbe=0,iwe.current=null,null===n||null===n.return){fwe=1,pwe=t,cwe=null;break}e:{var a=e,o=n.return,s=n,c=t;if(t=uwe,s.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,l=s,d=l.tag;if(0==(1&l.mode)&&(0===d||11===d||15===d)){var f=l.alternate;f?(l.updateQueue=f.updateQueue,l.memoizedState=f.memoizedState,l.lanes=f.lanes):(l.updateQueue=null,l.memoizedState=null)}var p=Xge(o);if(null!==p){p.flags&=-257,Yge(p,o,s,0,t),1&p.mode&&Kge(a,u,t),c=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(c),t.updateQueue=m}else h.add(c);break e}if(0==(1&t)){Kge(a,u,t),Kwe();break e}c=Error(Ble(426))}else if(Lye&&1&s.mode){var y=Xge(o);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),Yge(y,o,s,0,t),qye(zge(c,s));break e}}a=c=zge(c,s),4!==fwe&&(fwe=2),null===bwe?bwe=[a]:bwe.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,hbe(a,Gge(0,c,t));break e;case 1:s=c;var b=a.type,g=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==g&&"function"==typeof g.componentDidCatch&&(null===xwe||!xwe.has(g)))){a.flags|=65536,t&=-t,a.lanes|=t,hbe(a,qge(a,s,t));break e}}a=a.return}while(null!==a)}Qwe(n)}catch(e){t=e,cwe===n&&null!==n&&(cwe=n=n.return);continue}break}}function qwe(){var e=rwe.current;return rwe.current=jge,null===e?jge:e}function Kwe(){0!==fwe&&3!==fwe&&2!==fwe||(fwe=4),null===swe||0==(268435455&hwe)&&0==(268435455&mwe)||Bwe(swe,uwe)}function Xwe(e,t){var n=owe;owe|=2;var r=qwe();for(swe===e&&uwe===t||(Twe=null,Vwe(e,t));;)try{Ywe();break}catch(t){Gwe(e,t)}if($ye(),owe=n,rwe.current=r,null!==cwe)throw Error(Ble(261));return swe=null,uwe=0,fwe}function Ywe(){for(;null!==cwe;)Jwe(cwe)}function Zwe(){for(;null!==cwe&&!_fe();)Jwe(cwe)}function Jwe(e){var t=twe(e.alternate,e,lwe);e.memoizedProps=e.pendingProps,null===t?Qwe(e):cwe=t,iwe.current=null}function Qwe(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Ove(n,t,lwe)))return void(cwe=n)}else{if(null!==(n=Cve(n,t)))return n.flags&=32767,void(cwe=n);if(null===e)return fwe=6,void(cwe=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(cwe=t);cwe=t=e}while(null!==t);0===fwe&&(fwe=5)}function $we(e,t,n){var r=Qfe,i=awe.transition;try{awe.transition=null,Qfe=1,function(e,t,n,r){do{eTe()}while(null!==Cwe);if(0!=(6&owe))throw Error(Ble(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ble(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Bfe(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,a),e===swe&&(cwe=swe=null,uwe=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Owe||(Owe=!0,sTe(Mfe,(function(){return eTe(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=awe.transition,awe.transition=null;var o=Qfe;Qfe=1;var s=owe;owe|=4,iwe.current=null,function(e,t){if(Rme=Ape,Ghe(e=Vhe())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var o=0,s=-1,c=-1,u=0,l=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(s=o+i),d!==a||0!==r&&3!==d.nodeType||(c=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=o),f===a&&++l===r&&(c=o),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nme={focusedElem:e,selectionRange:n},Ape=!1,Sve=t;null!==Sve;)if(e=(t=Sve).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Sve=e;else for(;null!==Sve;){t=Sve;try{var h=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,y=h.memoizedState,b=t.stateNode,g=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:Xye(t.type,m),y);b.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(Ble(163))}}catch(e){nTe(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Sve=e;break}Sve=t.return}h=Nve,Nve=!1}(e,n),Xve(n,e),qhe(Nme),Ape=!!Rme,Nme=Rme=null,e.current=n,Zve(n),Pfe(),owe=s,Qfe=o,awe.transition=a}else e.current=n;if(Owe&&(Owe=!1,Cwe=e,Iwe=i),a=e.pendingLanes,0===a&&(xwe=null),function(e){if(Ffe&&"function"==typeof Ffe.onCommitFiberRoot)try{Ffe.onCommitFiberRoot(jfe,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),Dwe(e,Sfe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ewe)throw Ewe=!1,e=Awe,Awe=null,e;0!=(1&Iwe)&&0!==e.tag&&eTe(),a=e.pendingLanes,0!=(1&a)?e===Pwe?_we++:(_we=0,Pwe=e):_we=0,wye()}(e,t,n,r)}finally{awe.transition=i,Qfe=r}return null}function eTe(){if(null!==Cwe){var e=$fe(Iwe),t=awe.transition,n=Qfe;try{if(awe.transition=null,Qfe=16>e?16:e,null===Cwe)var r=!1;else{if(e=Cwe,Cwe=null,Iwe=0,0!=(6&owe))throw Error(Ble(331));var i=owe;for(owe|=4,Sve=e.current;null!==Sve;){var a=Sve,o=a.child;if(0!=(16&Sve.flags)){var s=a.deletions;if(null!==s){for(var c=0;c<s.length;c++){var u=s[c];for(Sve=u;null!==Sve;){var l=Sve;switch(l.tag){case 0:case 11:case 15:Mve(8,l,a)}var d=l.child;if(null!==d)d.return=l,Sve=d;else for(;null!==Sve;){var f=(l=Sve).sibling,p=l.return;if(jve(l),l===u){Sve=null;break}if(null!==f){f.return=p,Sve=f;break}Sve=p}}}var h=a.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Sve=a}}if(0!=(2064&a.subtreeFlags)&&null!==o)o.return=a,Sve=o;else e:for(;null!==Sve;){if(0!=(2048&(a=Sve).flags))switch(a.tag){case 0:case 11:case 15:Mve(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Sve=b;break e}Sve=a.return}}var g=e.current;for(Sve=g;null!==Sve;){var v=(o=Sve).child;if(0!=(2064&o.subtreeFlags)&&null!==v)v.return=o,Sve=v;else e:for(o=g;null!==Sve;){if(0!=(2048&(s=Sve).flags))try{switch(s.tag){case 0:case 11:case 15:Dve(9,s)}}catch(e){nTe(s,s.return,e)}if(s===o){Sve=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Sve=w;break e}Sve=s.return}}if(owe=i,wye(),Ffe&&"function"==typeof Ffe.onPostCommitFiberRoot)try{Ffe.onPostCommitFiberRoot(jfe,e)}catch(e){}r=!0}return r}finally{Qfe=n,awe.transition=t}}return!1}function tTe(e,t,n){e=fbe(e,t=Gge(0,t=zge(n,t),1),1),t=Rwe(),null!==e&&(Zfe(e,1,t),Dwe(e,t))}function nTe(e,t,n){if(3===e.tag)tTe(e,e,n);else for(;null!==t;){if(3===t.tag){tTe(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===xwe||!xwe.has(r))){t=fbe(t,e=qge(t,e=zge(n,e),1),1),e=Rwe(),null!==t&&(Zfe(t,1,e),Dwe(t,e));break}}t=t.return}}function rTe(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Rwe(),e.pingedLanes|=e.suspendedLanes&n,swe===e&&(uwe&n)===n&&(4===fwe||3===fwe&&(130023424&uwe)===uwe&&500>Sfe()-vwe?Vwe(e,0):ywe|=n),Dwe(e,t)}function iTe(e,t){0===t&&(0==(1&e.mode)?t=1:(t=Wfe,0==(130023424&(Wfe<<=1))&&(Wfe=4194304)));var n=Rwe();null!==(e=sbe(e,t))&&(Zfe(e,t,n),Dwe(e,n))}function aTe(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iTe(e,n)}function oTe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ble(314))}null!==r&&r.delete(t),iTe(e,n)}function sTe(e,t){return Cfe(e,t)}function cTe(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function uTe(e,t,n,r){return new cTe(e,t,n,r)}function lTe(e){return!(!(e=e.prototype)||!e.isReactComponent)}function dTe(e,t){var n=e.alternate;return null===n?((n=uTe(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function fTe(e,t,n,r,i,a){var o=2;if(r=e,"function"==typeof e)lTe(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case rde:return pTe(n.children,i,a,t);case ide:o=8,i|=8;break;case ade:return(e=uTe(12,n,t,2|i)).elementType=ade,e.lanes=a,e;case ude:return(e=uTe(13,n,t,i)).elementType=ude,e.lanes=a,e;case lde:return(e=uTe(19,n,t,i)).elementType=lde,e.lanes=a,e;case pde:return hTe(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ode:o=10;break e;case sde:o=9;break e;case cde:o=11;break e;case dde:o=14;break e;case fde:o=16,r=null;break e}throw Error(Ble(130,null==e?e:typeof e,""))}return(t=uTe(o,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function pTe(e,t,n,r){return(e=uTe(7,e,r,t)).lanes=n,e}function hTe(e,t,n,r){return(e=uTe(22,e,r,t)).elementType=pde,e.lanes=n,e.stateNode={isHidden:!1},e}function mTe(e,t,n){return(e=uTe(6,e,null,t)).lanes=n,e}function yTe(e,t,n){return(t=uTe(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bTe(e,t,n,r,i){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=Yfe(0),this.expirationTimes=Yfe(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yfe(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gTe(e,t,n,r,i,a,o,s,c){return e=new bTe(e,t,n,s,c),1===t?(t=1,!0===a&&(t|=8)):t=0,a=uTe(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ube(a),e}function vTe(e){if(!e)return aye;e:{if(Tfe(e=e._reactInternals)!==e||1!==e.tag)throw Error(Ble(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(Ble(171))}if(1===e.tag){var n=e.type;if(lye(n))return pye(e,n,t)}return t}function wTe(e,t,n,r,i,a,o,s,c){return(e=gTe(n,r,!0,e,0,a,0,s,c)).context=vTe(null),n=e.current,(a=dbe(r=Rwe(),i=Nwe(n))).callback=null!=t?t:null,fbe(n,a,i),e.current.lanes=i,Zfe(e,i,r),Dwe(e,r),e}function TTe(e,t,n,r){var i=t.current,a=Rwe(),o=Nwe(i);return n=vTe(n),null===t.context?t.context=n:t.pendingContext=n,(t=dbe(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=fbe(i,t,o))&&(Mwe(e,i,o,a),pbe(e,i,o)),o}function ETe(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ATe(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function xTe(e,t){ATe(e,t),(e=e.alternate)&&ATe(e,t)}twe=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||sye.current)Jge=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Jge=!1,function(e,t,n){switch(t.tag){case 3:sve(t),Gye();break;case 5:jbe(t);break;case 1:lye(t.type)&&hye(t);break;case 4:Dbe(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;iye(Yye,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(iye(Bbe,1&Bbe.current),t.flags|=128,null):0!=(n&t.child.childLanes)?mve(e,t,n):(iye(Bbe,1&Bbe.current),null!==(e=Eve(e,t,n))?e.sibling:null);iye(Bbe,1&Bbe.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return wve(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),iye(Bbe,Bbe.current),r)break;return null;case 22:case 23:return t.lanes=0,nve(e,t,n)}return Eve(e,t,n)}(e,t,n);Jge=0!=(131072&e.flags)}else Jge=!1,Lye&&0!=(1048576&t.flags)&&kye(t,xye,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Tve(e,t),e=t.pendingProps;var i=uye(t,oye.current);nbe(t,n),i=tge(null,t,r,e,i,n);var a=nge();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lye(r)?(a=!0,hye(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ube(t),i.updater=vbe,t.stateNode=i,i._reactInternals=t,Abe(t,r,e,n),t=ove(null,t,r,!0,a,n)):(t.tag=0,Lye&&a&&Rye(t),Qge(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Tve(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return lTe(e)?1:0;if(null!=e){if((e=e.$$typeof)===cde)return 11;if(e===dde)return 14}return 2}(r),e=Xye(r,e),i){case 0:t=ive(null,t,r,e,n);break e;case 1:t=ave(null,t,r,e,n);break e;case 11:t=$ge(null,t,r,e,n);break e;case 14:t=eve(null,t,r,Xye(r.type,e),n);break e}throw Error(Ble(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,ive(e,t,r,i=t.elementType===r?i:Xye(r,i),n);case 1:return r=t.type,i=t.pendingProps,ave(e,t,r,i=t.elementType===r?i:Xye(r,i),n);case 3:e:{if(sve(t),null===e)throw Error(Ble(387));r=t.pendingProps,i=(a=t.memoizedState).element,lbe(e,t),mbe(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=cve(e,t,r,n,i=zge(Error(Ble(423)),t));break e}if(r!==i){t=cve(e,t,r,n,i=zge(Error(Ble(424)),t));break e}for(Dye=zme(t.stateNode.containerInfo.firstChild),Mye=t,Lye=!0,jye=null,n=Pbe(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Gye(),r===i){t=Eve(e,t,n);break e}Qge(e,t,r,n)}t=t.child}return t;case 5:return jbe(t),null===e&&zye(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,Mme(r,i)?o=null:null!==a&&Mme(r,a)&&(t.flags|=32),rve(e,t),Qge(e,t,o,n),t.child;case 6:return null===e&&zye(t),null;case 13:return mve(e,t,n);case 4:return Dbe(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_be(t,null,r,n):Qge(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,$ge(e,t,r,i=t.elementType===r?i:Xye(r,i),n);case 7:return Qge(e,t,t.pendingProps,n),t.child;case 8:case 12:return Qge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,iye(Yye,r._currentValue),r._currentValue=o,null!==a)if(Bhe(a.value,o)){if(a.children===i.children&&!sye.current){t=Eve(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){o=a.child;for(var c=s.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=dbe(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var l=(u=u.shared).pending;null===l?c.next=c:(c.next=l.next,l.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),tbe(a.return,n,t),s.lanes|=n;break}c=c.next}}else if(10===a.tag)o=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(Ble(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),tbe(o,n,t),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===t){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}Qge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,nbe(t,n),r=r(i=rbe(i)),t.flags|=1,Qge(e,t,r,n),t.child;case 14:return i=Xye(r=t.type,t.pendingProps),eve(e,t,r,i=Xye(r.type,i),n);case 15:return tve(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xye(r,i),Tve(e,t),t.tag=1,lye(r)?(e=!0,hye(t)):e=!1,nbe(t,n),Tbe(t,r,i),Abe(t,r,i,n),ove(null,t,r,!0,e,n);case 19:return wve(e,t,n);case 22:return nve(e,t,n)}throw Error(Ble(156,t.tag))};var OTe="function"==typeof reportError?reportError:function(e){console.error(e)};function CTe(e){this._internalRoot=e}function ITe(e){this._internalRoot=e}function _Te(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function PTe(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function STe(){}function kTe(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=ETe(o);s.call(e)}}TTe(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=ETe(o);a.call(e)}}var o=wTe(t,r,e,0,null,!1,0,"",STe);return e._reactRootContainer=o,e[qme]=o.current,wme(8===e.nodeType?e.parentNode:e),Hwe(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=ETe(c);s.call(e)}}var c=gTe(e,0,!1,null,0,!1,0,"",STe);return e._reactRootContainer=c,e[qme]=c.current,wme(8===e.nodeType?e.parentNode:e),Hwe((function(){TTe(t,c,n,r)})),c}(n,t,e,i,r);return ETe(o)}ITe.prototype.render=CTe.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(Ble(409));TTe(e,t,null,null)},ITe.prototype.unmount=CTe.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Hwe((function(){TTe(null,e,null,null)})),t[qme]=null}},ITe.prototype.unstable_scheduleHydration=function(e){if(e){var t=rpe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fpe.length&&0!==t&&t<fpe[n].priority;n++);fpe.splice(n,0,e),0===n&&ype(e)}},epe=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vfe(t.pendingLanes);0!==n&&(Jfe(t,1|n),Dwe(t,Sfe()),0==(6&owe)&&(wwe=Sfe()+500,wye()))}break;case 13:Hwe((function(){var t=sbe(e,1);if(null!==t){var n=Rwe();Mwe(t,e,1,n)}})),xTe(e,1)}},tpe=function(e){if(13===e.tag){var t=sbe(e,134217728);if(null!==t)Mwe(t,e,134217728,Rwe());xTe(e,134217728)}},npe=function(e){if(13===e.tag){var t=Nwe(e),n=sbe(e,t);if(null!==n)Mwe(n,e,t,Rwe());xTe(e,t)}},rpe=function(){return Qfe},ipe=function(e,t){var n=Qfe;try{return Qfe=e,t()}finally{Qfe=n}},tfe=function(e,t,n){switch(t){case"input":if(Rde(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=$me(r);if(!i)throw Error(Ble(90));Ide(r),Rde(r,i)}}}break;case"textarea":Bde(e,n);break;case"select":null!=(t=n.value)&&Lde(e,!!n.multiple,t,!1)}},sfe=zwe,cfe=Hwe;var RTe={usingClientEntryPoint:!1,Events:[Jme,Qme,$me,afe,ofe,zwe]},NTe={findFiberByHostInstance:Zme,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},MTe={bundleType:NTe.bundleType,version:NTe.version,rendererPackageName:NTe.rendererPackageName,rendererConfig:NTe.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ede.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=xfe(e))?null:e.stateNode},findFiberByHostInstance:NTe.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var DTe=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!DTe.isDisabled&&DTe.supportsFiber)try{jfe=DTe.inject(MTe),Ffe=DTe}catch(cJe){}}Nle.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RTe,Nle.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!_Te(t))throw Error(Ble(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:nde,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},Nle.createRoot=function(e,t){if(!_Te(e))throw Error(Ble(299));var n=!1,r="",i=OTe;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=gTe(e,1,!1,null,0,n,0,r,i),e[qme]=t.current,wme(8===e.nodeType?e.parentNode:e),new CTe(t)},Nle.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(Ble(188));throw e=Object.keys(e).join(","),Error(Ble(268,e))}return e=null===(e=xfe(t))?null:e.stateNode},Nle.flushSync=function(e){return Hwe(e)},Nle.hydrate=function(e,t,n){if(!PTe(t))throw Error(Ble(200));return kTe(null,e,t,!0,n)},Nle.hydrateRoot=function(e,t,n){if(!_Te(e))throw Error(Ble(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",o=OTe;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=wTe(t,null,e,1,null!=n?n:null,i,0,a,o),e[qme]=t.current,wme(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ITe(t)},Nle.render=function(e,t,n){if(!PTe(t))throw Error(Ble(200));return kTe(null,e,t,!1,n)},Nle.unmountComponentAtNode=function(e){if(!PTe(e))throw Error(Ble(40));return!!e._reactRootContainer&&(Hwe((function(){kTe(null,null,e,!1,(function(){e._reactRootContainer=null,e[qme]=null}))})),!0)},Nle.unstable_batchedUpdates=zwe,Nle.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!PTe(n))throw Error(Ble(200));if(null==e||void 0===e._reactInternals)throw Error(Ble(38));return kTe(e,t,n,!1,r)},Nle.version="18.2.0-next-9e3b772b8-20220608",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Rle.exports=Nle;var LTe=Rle.exports;function jTe(e){var t=e.children,n=e.selector,r=aV.useContext(Boe),i=aV.useRef(null),a=aK(aV.useState(!1),2),o=a[0],s=a[1];return one((function(){return i.current=r?r.querySelector(n):document.querySelector(n),i.current&&s(!0),function(){return s(!1)}}),[n]),o&&i.current?LTe.createPortal(t,i.current):null}function FTe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function BTe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FTe(Object(n),!0).forEach((function(t){cK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FTe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UTe(e){switch(e){case"topLeft":return{top:"base.spacing.x6",left:"base.spacing.x6",marginRight:"base.spacing.x4"};case"topCenter":return{top:"base.spacing.x6",left:"50%",translate:"-50% 0",marginLeft:"base.spacing.x4",marginRight:"base.spacing.x4"};case"bottomLeft":return{bottom:"base.spacing.x6",left:"base.spacing.x6",marginRight:"base.spacing.x4"};case"bottomRight":return{bottom:"base.spacing.x6",right:"base.spacing.x6",marginLeft:"base.spacing.x4"};case"bottomCenter":return{bottom:"base.spacing.x6",left:"50%",translate:"-50% 0",marginLeft:"base.spacing.x4",marginRight:"base.spacing.x4"};default:return{top:"base.spacing.x6",right:"base.spacing.x6",marginLeft:"base.spacing.x6"}}}var zTe="12px",HTe="-12px",WTe="-12px",VTe="12px",GTe="0px";function qTe(){var e=tne((function(e){return e.toastList})).state,t=aV.useMemo((function(){return{topLeft:e.filter((function(e){var t=e.position,n=t.x;return"top"===t.y&&"left"===n})),topCenter:e.filter((function(e){var t=e.position,n=t.x;return"top"===t.y&&"center"===n})),topRight:e.filter((function(e){var t=e.position,n=t.x;return"top"===t.y&&"right"===n})),bottomLeft:e.filter((function(e){var t=e.position,n=t.x;return"bottom"===t.y&&"left"===n})),bottomRight:e.filter((function(e){var t=e.position,n=t.x;return"bottom"===t.y&&"right"===n})),bottomCenter:e.filter((function(e){var t=e.position,n=t.x;return"bottom"===t.y&&"center"===n}))}}),[e]);return Eq(F0,{children:Object.keys(t).map((function(e){var n=e,r=t[n];return 0===r.length?null:Eq(P3,{"data-toast-group":n,testId:"toastsContainer--".concat(n),sx:BTe(BTe(BTe({},x3),UTe(n)),{},{gap:"base.spacing.x2",position:"fixed",zIndex:"base.zLevel.toast",alignItems:"center"}),rc:Eq(k0.div,{initial:BTe(BTe(BTe(BTe(BTe(BTe({opacity:0},"topRight"===n&&{x:zTe}),"topLeft"===n&&{x:HTe}),"topCenter"===n&&{y:WTe}),"bottomRight"===n&&{x:zTe}),"bottomLeft"===n&&{x:HTe}),"bottomCenter"===n&&{y:VTe}),exit:BTe(BTe(BTe(BTe(BTe(BTe({opacity:0},"topRight"===n&&{x:zTe}),"topLeft"===n&&{x:HTe}),"topCenter"===n&&{y:WTe}),"bottomRight"===n&&{x:zTe}),"bottomLeft"===n&&{x:HTe}),"bottomCenter"===n&&{y:VTe}),animate:BTe(BTe(BTe(BTe(BTe(BTe({opacity:1},"topRight"===n&&{x:GTe}),"topLeft"===n&&{x:GTe}),"topCenter"===n&&{y:GTe}),"bottomRight"===n&&{x:GTe}),"bottomLeft"===n&&{x:GTe}),"bottomCenter"===n&&{y:GTe}),transition:{duration:I7.base.motion.normal.fast.jsDuration,ease:I7.base.motion.normal.fast.jsEase}}),children:Eq(F0,{children:r.map((function(e){var t=e.id,r=e.content,i=e.hideDismissButton,a=e.variant,o=e.onCloseToast,s=e.buttonsPosition,c=e.testId,u=e.sx,l=void 0===u?{}:u,d=function(e,t){var n=t;Array.isArray(t)||(n=[t]);var r=[],i=[],a=q0(e);return aV.Children.forEach(a,(function(e){i9(e,n)?r.push(e):i.push(e)})),{subcomponents:r,otherChildren:0===i.length?null:1===i.length?i[0]:i}}(r,[Yue,zue,Gue]),f=d.otherChildren;return Aq(P3,{"data-id":t,testId:null!=c?c:"toastsContainer__toast",sx:U0(BTe(BTe({},"right"===s?BTe(BTe({},A3),{},{alignItems:"center",justifyContent:"space-between"}):BTe({},x3)),{},{gap:"base.spacing.x4",bg:"base.color.translucent.standard.1000",p:"base.spacing.x2",pr:"base.spacing.x3",pl:"base.spacing.x9",brad:"base.borderRadius.x6",minw:"230px",maxw:"450px",minh:"64px",boxShadow:"base.shadow.500",position:"relative"}),l),rc:Eq(k0.div,{initial:BTe(BTe(BTe(BTe(BTe(BTe({opacity:0},"topRight"===n&&{x:zTe}),"topLeft"===n&&{x:HTe}),"topCenter"===n&&{y:WTe}),"bottomRight"===n&&{x:zTe}),"bottomLeft"===n&&{x:HTe}),"bottomCenter"===n&&{y:VTe}),exit:BTe(BTe(BTe(BTe(BTe(BTe({opacity:0},"topRight"===n&&{x:zTe}),"topLeft"===n&&{x:zTe}),"topCenter"===n&&{y:WTe}),"bottomRight"===n&&{x:zTe}),"bottomLeft"===n&&{x:HTe}),"bottomCenter"===n&&{y:VTe}),animate:BTe(BTe(BTe(BTe(BTe(BTe({opacity:1},"topRight"===n&&{x:GTe}),"topLeft"===n&&{x:GTe}),"topCenter"===n&&{y:GTe}),"bottomRight"===n&&{x:GTe}),"bottomLeft"===n&&{x:GTe}),"bottomCenter"===n&&{y:GTe}),transition:{duration:I7.base.motion.normal.fast.jsDuration,ease:I7.base.motion.normal.fast.jsEase}}),children:[Eq(P3,{testId:"toastVariantBar",sx:{top:"base.spacing.x2",bottom:"base.spacing.x2",position:"absolute",left:"base.spacing.x2",width:"6px",brad:"base.borderRadius.x6",bg:"base.color.status.".concat(a,".bright")}}),aV.Children.map(r,(function(e){return g1(e,Yue)?e:null})),Aq(P3,{sx:BTe(BTe(BTe({},A3),"bottomRight"===s?{justifyContent:"flex-end"}:{}),{},{gap:"base.spacing.x1"}),children:[aV.Children.map(r,(function(e){return g1(e,zue)||g1(e,Gue)?e:null})),i?null:Eq(Gue,{testId:"dismissToastButton",onClick:function(){null==o||o()},children:"Dismiss"})]}),f]},t)}))})},n)}))})}var KTe="modal-container",XTe="drawer-container",YTe="popover-container",ZTe="toast-container";function JTe(e){var t=e.children,n=e.modalContainerId,r=e.drawerContainerId,i=e.popoverContainerId,a=e.toastContainerId,o=aV.useContext(Ple),s=x5().base.zLevel;return Aq(ene,{children:[t,Eq(jTe,{selector:n?"#".concat(n):"#".concat(KTe).concat(o),children:Eq(cle,{hasExternalContainer:Boolean(n)})}),!n&&Eq("div",{id:"".concat(KTe).concat(o)}),Eq(jTe,{selector:r?"#".concat(r):"#".concat(XTe).concat(o),children:Eq(ale,{hasExternalContainer:Boolean(r)})}),!r&&Eq("div",{id:"".concat(XTe).concat(o)}),Eq(jTe,{selector:i?"".concat(i):"#".concat(YTe).concat(o),children:Eq(vle,{})}),!i&&Eq("div",{id:"".concat(YTe).concat(o),css:U0(kle,{zIndex:s.popover})}),Eq(jTe,{selector:a?"#".concat(a):"#".concat(ZTe).concat(o),children:Eq(qTe,{})}),!a&&Eq("div",{id:"".concat(ZTe).concat(o)})]})}var QTe=40;function $Te(e){var t=e.resizeDebounceDuration,n=void 0===t?QTe:t,r=I8((function(e){return e})).setState;return Ote("resize",X4((function(){r({width:window.innerWidth,height:window.innerHeight})}),n),{current:"undefined"!=typeof window?window:null}),I9((function(){return r({width:window.innerWidth,height:window.innerHeight})}),[]),null}var eEe="tooltip-container";function tEe(e){var t=e.children,n=aV.useContext(Ple),r=x5().base.zLevel;return Aq(Hse,{children:[t,Eq(jTe,{selector:"#".concat(eEe).concat(n),children:Eq(_le,{})}),Eq("div",{id:"".concat(eEe).concat(n),css:U0(kle,{zIndex:r.tooltip})})]})}var nEe={"*, *::before, *::after":{boxSizing:"border-box"},"html, body":{height:"100%",margin:0},"pre, p, h1, h2, h3, h4, h5, h6":{margin:0},body:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",textRendering:"optimizeLegibility"}},rEe={name:"thqmy6",styles:"@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');{}@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');{}"};function iEe(e){return e?[]:[rEe,{"@font-face":{fontFamily:"Suisse-Intl",fontWeight:400,fontStyle:"normal",fontDisplay:"swap",src:"url('https://biome.immutable.com/hosted-assets/fonts/suisseintl-regular.woff2')\n format('woff2')"}},{"@font-face":{fontFamily:"Suisse-Intl",fontWeight:600,fontStyle:"normal",fontDisplay:"swap",src:"url('https://biome.immutable.com/hosted-assets/fonts/suisseintl-medium.woff2')\n format('woff2')"}},{"@font-face":{fontFamily:"Suisse-Intl",fontWeight:700,fontStyle:"normal",fontDisplay:"swap",src:"url('https://biome.immutable.com/hosted-assets/fonts/suisseintl-bold.woff2')\n format('woff2')"}}]}var aEe=["base"];function oEe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sEe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oEe(Object(n),!0).forEach((function(t){cK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oEe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cEe(e,t){var n;if(function(e){return"string"!=typeof e&&"number"!=typeof e&&!Array.isArray(e)&&null!=e}(e))for(n in e){var r=e[n];"object"===oK(r)?e[n]=cEe(e[n],t):"string"==typeof r&&r.includes("base.")&&(e[n]=m5(t,r))}return e}var uEe=I7;function lEe(e){var t=e.children,n=e.theme,r=void 0===n?uEe:n,i=e.globalSx,a=void 0===i?{}:i,o=e.skipFontLoad,s=void 0!==o&&o,c=aV.useMemo((function(){return function(e){var t=e.base,n=uK(e,aEe),r=t.color;return sEe({base:sEe(sEe({},t),{},{color:cEe(r,e),breakpointAsArray:Object.values(t.breakpoint)})},n)}(r)}),[r]),u=O5(U0(nEe,a),c);return Aq(mq,{theme:c,children:[Eq(dK,{styles:[].concat(X0(iEe(s)),[u,"",""])}),t]})}var dEe=aV.createContext({toggleTheme:function(){},currentTheme:{base:O7}});function fEe(e){var t=e.children,n=e.lightTheme,r=void 0===n?{base:O7}:n,i=e.darkTheme,a=void 0===i?{base:C7}:i,o=e.autoPickTheme,s=void 0!==o&&o,c=e.globalSx,u=e.skipFontLoad,l=aK(aV.useState(r),2),d=l[0],f=l[1],p=aV.useCallback((function(){f(d.base===O7?a:r)}),[d.base,a,r]),h=aV.useCallback((function(e){f(e.matches?a:r)}),[r,a]);aV.useEffect((function(){if(s){var e=function(e,t){var n,r;return null!==(n=window)&&void 0!==n&&null!==(r=n.matchMedia)&&void 0!==r&&r.call(n,"(prefers-color-scheme: dark)").matches?t:e}(r,a);e.base.colorMode!==d.base.colorMode&&f(e),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",h)}}),[]);var m=aV.useMemo((function(){return{toggleTheme:p,currentTheme:d}}),[d,p]);return Eq(dEe.Provider,{value:m,children:Eq(lEe,{theme:d,globalSx:c,skipFontLoad:u,children:t})})}var pEe="0.24.1";function hEe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mEe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hEe(Object(n),!0).forEach((function(t){cK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hEe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yEe(e){var t=e.children,n=e.skipFontLoad,r=e.withThemeToggle,i=e.resizeDebounceDuration,a=void 0===i?QTe:i,o=e.modalContainerId,s=e.drawerContainerId,c=e.popoverContainerId,u=e.toastContainerId,l=e.shadowRoot,d=e.globalSx,f=mEe(mEe({},e),{},r?{theme:void 0}:{autoPickTheme:void 0,lightTheme:void 0,darkTheme:void 0}),p=f.autoPickTheme,h=f.lightTheme,m=f.darkTheme,y=f.theme,b=Aq(C8,{children:[Eq($Te,{resizeDebounceDuration:a}),Eq(tEe,{children:Eq(JTe,{modalContainerId:o,drawerContainerId:s,popoverContainerId:c,toastContainerId:u,children:t})})]});return Eq(Sle,{children:Eq(Boe.Provider,{value:l,children:r?Eq(fEe,{lightTheme:h,darkTheme:m,globalSx:d,autoPickTheme:p,skipFontLoad:n,children:b}):Eq(lEe,{theme:y,globalSx:d,skipFontLoad:n,children:b})})})}console.log("\n @biom3/react\n \n version: ".concat(pEe,"\n\n"));var bEe="__lodash_hash_undefined__",gEe=1/0,vEe="[object Function]",wEe="[object GeneratorFunction]",TEe="[object Symbol]",EEe=/^\./,AEe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xEe=/\\(\\)?/g,OEe=/^\[object .+?Constructor\]$/,CEe="object"==typeof ut&&ut&&ut.Object===Object&&ut,IEe="object"==typeof self&&self&&self.Object===Object&&self,_Ee=CEe||IEe||Function("return this")();var PEe=Array.prototype,SEe=Function.prototype,kEe=Object.prototype,REe=_Ee["__core-js_shared__"],NEe=function(){var e=/[^.]+$/.exec(REe&&REe.keys&&REe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),MEe=SEe.toString,DEe=kEe.hasOwnProperty,LEe=kEe.toString,jEe=RegExp("^"+MEe.call(DEe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),FEe=_Ee.Symbol,BEe=PEe.splice,UEe=JEe(_Ee,"Map"),zEe=JEe(Object,"create"),HEe=FEe?FEe.prototype:void 0,WEe=HEe?HEe.toString:void 0;function VEe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function GEe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qEe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function KEe(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function XEe(e){if(!$Ee(e)||(t=e,NEe&&NEe in t))return!1;var t,n=function(e){var t=$Ee(e)?LEe.call(e):"";return t==vEe||t==wEe}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?jEe:OEe;return n.test(function(e){if(null!=e){try{return MEe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function YEe(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&LEe.call(e)==TEe}(e))return WEe?WEe.call(e):"";var t=e+"";return"0"==t&&1/e==-gEe?"-0":t}function ZEe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function JEe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return XEe(n)?n:void 0}function QEe(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(QEe.Cache||qEe),n}function $Ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}VEe.prototype.clear=function(){this.__data__=zEe?zEe(null):{}},VEe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},VEe.prototype.get=function(e){var t=this.__data__;if(zEe){var n=t[e];return n===bEe?void 0:n}return DEe.call(t,e)?t[e]:void 0},VEe.prototype.has=function(e){var t=this.__data__;return zEe?void 0!==t[e]:DEe.call(t,e)},VEe.prototype.set=function(e,t){return this.__data__[e]=zEe&&void 0===t?bEe:t,this},GEe.prototype.clear=function(){this.__data__=[]},GEe.prototype.delete=function(e){var t=this.__data__,n=KEe(t,e);return!(n<0)&&(n==t.length-1?t.pop():BEe.call(t,n,1),!0)},GEe.prototype.get=function(e){var t=this.__data__,n=KEe(t,e);return n<0?void 0:t[n][1]},GEe.prototype.has=function(e){return KEe(this.__data__,e)>-1},GEe.prototype.set=function(e,t){var n=this.__data__,r=KEe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},qEe.prototype.clear=function(){this.__data__={hash:new VEe,map:new(UEe||GEe),string:new VEe}},qEe.prototype.delete=function(e){return ZEe(this,e).delete(e)},qEe.prototype.get=function(e){return ZEe(this,e).get(e)},qEe.prototype.has=function(e){return ZEe(this,e).has(e)},qEe.prototype.set=function(e,t){return ZEe(this,e).set(e,t),this},QEe((function(e){var t;e=null==(t=e)?"":YEe(t);var n=[];return EEe.test(e)&&n.push(""),e.replace(AEe,(function(e,t,r,i){n.push(r?i.replace(xEe,"$1"):t||e)})),n})),QEe.Cache=qEe;var eAe={size:{600:"6px",500:"5px",400:"4px",300:"3px",200:"2px",100:"1px"}},tAe={size:{600:"64px",500:"48px",400:"32px",300:"24px",250:"20px",200:"16px",100:"12px"}},nAe={family:{heading:{primary:"'Suisse-Intl', sans-serif",secondary:"'Suisse-Intl', sans-serif"},body:{primary:"'Roboto', sans-serif",secondary:"'Roboto Mono', monospace"}},decoration:{underline:"underline",lineThrough:"line-through",none:"none"},casing:{uppercase:"uppercase",none:"none"}},rAe={body:{large:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:400},bold:{fontWeight:500}},medium:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:400},bold:{fontWeight:500}},small:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"12px",lineHeight:"16px",fontWeight:400},bold:{fontWeight:700}},xxSmall:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400},bold:{fontWeight:700}}},caption:{medium:{regular:{fontSize:"14px",lineHeight:"20px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"14px",lineHeight:"20px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}},small:{regular:{fontSize:"10px",lineHeight:"14px",fontWeight:400,casing:"uppercase",letterSpacing:"2px"},bold:{fontSize:"10px",lineHeight:"14px",fontWeight:700,casing:"uppercase",letterSpacing:"2px"}}},heading:{xxLarge:{regular:{fontSize:"96px",lineHeight:"112px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xLarge:{regular:{fontSize:"64px",lineHeight:"72px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},large:{regular:{fontSize:"40px",lineHeight:"48px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},medium:{regular:{fontSize:"28px",lineHeight:"32px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},small:{regular:{fontSize:"20px",lineHeight:"28px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}},xSmall:{regular:{fontSize:"16px",lineHeight:"24px",fontWeight:600},light:{fontWeight:400},bold:{fontWeight:700}}}},iAe={x1:"4px",x2:"8px",x3:"12px",x4:"16px",x5:"20px",x6:"24px",x7:"28px",x8:"32px",x9:"36px",x10:"40px",x11:"44px",x12:"48px",x13:"52px",x14:"56px",x15:"60px",x16:"64px",x17:"68px",x18:"72px",x19:"76px",x20:"80px",x21:"84px",x22:"88px",x23:"92px",x24:"96px",x25:"100px",x26:"104px",x27:"108px",x28:"112px",x29:"116px",x30:"120px",x31:"124px",x32:"128px",x33:"132px",x34:"136px",x35:"140px",x36:"144px",x37:"148px",x38:"152px",x39:"156px",x40:"160px",x41:"164px",x42:"168px",x43:"172px",x44:"176px",x45:"180px",x46:"184px",x47:"188px",x48:"192px",x49:"196px",x50:"200px"},aAe={x1:"2px",x2:"4px",x3:"6px",x4:"8px",x5:"10px",x6:"12px",x7:"14px",x8:"16px",x9:"18px",x10:"20px",x11:"22px",x12:"24px",x13:"26px",x14:"28px",x15:"30px",x16:"32px",x17:"34px",x18:"36px",x19:"38px",x20:"40px",x21:"42px",x22:"44px",x23:"46px",x24:"48px",x25:"50px"},oAe={small:450,medium:768,large:1024,xLarge:1280,xxLarge:1536,xxxLarge:1920},sAe={tooltip:12,toast:11,popover:10,modal:9,drawer:8},cAe={normal:{gentle:{cssDuration:"0.4s",jsDuration:.4,cssEase:"ease-in-out",jsEase:"easeInOut"},fast:{cssDuration:"0.25s",jsDuration:.25,cssEase:"ease-in-out",jsEase:"easeInOut"}},bounce:{gentle:{cssDuration:"0.7s",jsDuration:.7,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]},fast:{cssDuration:"0.45s",jsDuration:.45,cssEase:"cubic-bezier(0.47, 1.74, 0.41, 0.8)",jsEase:[.47,1.74,.41,.8]}}},uAe={colorMode:"onLight",color:{brand:{1:"#131313",2:"#FFFFFF",3:"#E0E0E0",4:"#868686",5:"#36E0F8",6:"#1F8290"},neutral:{1e3:"#E7E7E7",900:"#ECECEC",800:"#F1F1F1",700:"#F6F6F6",600:"#FAFAFA",500:"#FFFFFF"},accent:{1:"#B026BD",2:"#1FD3F5",3:"#67C6E0",4:"#5AA0D9",5:"#8395E5",6:"#D8EFF4",7:"#F5BDD0",8:"#EC98CA"},translucent:{emphasis:{500:"#0D0D0D1F",400:"#0D0D0D1A",300:"#0D0D0D14",200:"#0D0D0D0F",100:"#0D0D0D0A"},standard:{1e3:"#0D0D0DFF",900:"#0D0D0DE0",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D1A",150:"#0D0D0D14",100:"#0D0D0D0A",50:"#0D0D0D05"},inverse:{1e3:"#FFFFFFFF",900:"#FFFFFFE6",800:"#FFFFFFCC",700:"#FFFFFFA3",600:"#FFFFFF7A",500:"#FFFFFF3D",400:"#FFFFFF29",300:"#FFFFFF1F",200:"#FFFFFF14",150:"#FFFFFF0F",100:"#FFFFFF0A",50:"#FFFFFF05"}},status:{guidance:{bright:"#36E0F8",dim:"#9AEFFB"},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FBFF6D",dim:"#FCFEBF"},fatal:{bright:"#BB3049",dim:"#EA6385"}},fixed:{black:{1e3:"#0D0D0D",100:"#0D0D0D14"},white:{1e3:"#FFFFFF",100:"#FFFFFF14"}},text:{highlight:"#36E0F866",heading:{primary:"base.color.brand.1",secondary:"base.color.brand.4",emphasis:"base.gradient.1",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},body:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},caption:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.3"}},link:{primary:"base.color.accent.1",secondary:"base.color.brand.1",inverse:{primary:"#f191fa",secondary:"base.color.brand.2"}},status:{success:{primary:"#426336",secondary:"#486D3B"},guidance:{primary:"#206A74",secondary:"#22727E"},attention:{primary:"base.color.status.attention.bright",secondary:"base.color.status.attention.dim"},fatal:{primary:"base.color.status.fatal.bright",secondary:"base.color.status.fatal.dim"}}},overlay:"base.color.translucent.standard.600"},gradient:{1:{spectrum:"linear-gradient(90.68deg, #F191FA 0%, #83E3F0 99.82%)",blendMode:"normal",svgDefs:'<linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#F191FA" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'<radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'<radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 8px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:iAe,borderRadius:aAe,font:nAe,text:rAe,breakpoint:oAe,icon:tAe,border:eAe,zLevel:sAe,motion:cAe},lAe={colorMode:"onDark",color:{brand:{1:"#F3F3F3",2:"#131313",3:"#E0E0E0",4:"#B6B6B6",5:"#36E0F8",6:"#1F8290"},neutral:{1e3:"#0D0D0D",900:"#131313",800:"#1C1C1C",700:"#202020",600:"#252525",500:"#292929"},accent:{1:"#F191FA",2:"#36E0F8",3:"#6FD6F2",4:"#61ADEB",5:"#99A8EA",6:"#E4F4F7",7:"#F8D1DE",8:"#F2B7DA"},translucent:{emphasis:{500:"#F3F3F329",400:"#F3F3F31F",300:"#F3F3F31A",200:"#F3F3F314",100:"#F3F3F30F"},standard:{1e3:"#F3F3F3",900:"#F3F3F3E0",800:"#F3F3F3CC",700:"#F3F3F3A3",600:"#F3F3F37A",500:"#F3F3F33D",400:"#F3F3F329",300:"#F3F3F31F",200:"#F3F3F314",150:"#F3F3F30F",100:"#F3F3F30A",50:"#F3F3F305"},inverse:{1e3:"#0D0D0D",900:"#0D0D0DE0",800:"#0D0D0DCC",700:"#0D0D0DA3",600:"#0D0D0D7A",500:"#0D0D0D3D",400:"#0D0D0D29",300:"#0D0D0D1F",200:"#0D0D0D14",150:"#0D0D0D0F",100:"#0D0D0D0A",50:"#0D0D0D05"}},status:{guidance:{bright:"#36E0F8",dim:"#94E9F5 "},success:{bright:"#ABF790",dim:"#D5FAC7"},attention:{bright:"#FAFD7E",dim:"#F6F8B9"},fatal:{bright:"#FF637F",dim:"#F9ABB9"}},fixed:{black:{1e3:"#131313",100:"#13131314"},white:{1e3:"#F3F3F3",100:"#F3F3F314"}},text:{highlight:"#36E0F833",heading:{primary:"base.color.brand.1",secondary:"base.color.brand.4",emphasis:"base.gradient.1",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.4"}},body:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.4"}},caption:{primary:"base.color.brand.1",secondary:"base.color.brand.4",inverse:{primary:"base.color.brand.2",secondary:"base.color.brand.4"}},link:{primary:"base.color.accent.1",secondary:"base.color.brand.1",inverse:{primary:"#b026bd",secondary:"base.color.brand.2"}},status:{success:{primary:"base.color.status.success.bright",secondary:"base.color.status.success.dim"},guidance:{primary:"base.color.status.guidance.bright",secondary:"base.color.status.guidance.dim"},attention:{primary:"base.color.status.attention.bright",secondary:"base.color.status.attention.dim"},fatal:{primary:"base.color.status.fatal.bright",secondary:"base.color.status.fatal.dim"}}},overlay:"base.color.translucent.standard.500"},gradient:{1:{spectrum:"linear-gradient(105.76deg, #F191FA -46.96%, #83E3F0 99.99%)",blendMode:"normal",svgDefs:'\n <linearGradient id="gradient-1-singleLayer" x1="0" y1="0" x2="24" y2="0.214702"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9A2F6" />\n <stop offset="1" stop-color="#83E3F0" />\n </linearGradient>',svgDefIds:"gradient-1-singleLayer"},2:{spectrum:"radial-gradient(96.87% 65.57% at 54.34% 93.79%, #FCF5EE 0%, rgba(236, 190, 225, 0) 71.51%), radial-gradient(73.48% 242.97% at 26.54% 26.42%, #A3EEF8 0%, #A4DCF5 17.71%, #A6AEEC 38.02%, #ECBEE1 100%)",blendMode:"normal, normal",svgDefs:'\n <radialGradient id="gradient-2-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.7777 4.75595) rotate(44.9817) scale(18.6995 39.6574)">\n <stop stop-color="#A3EEF8" />\n <stop offset="0.177083" stop-color="#A4DCF5" />\n <stop offset="0.380208" stop-color="#A6AEEC" />\n <stop offset="1" stop-color="#ECBEE1" />\n </radialGradient>\n <radialGradient id="gradient-2-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(9.7806 16.8827) rotate(84.265) scale(9.68552 18.5286)">\n <stop stop-color="#FCF5EE" />\n <stop offset="0.715135" stop-color="#ECBEE1" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-2-bottomLayer, gradient-2-topLayer"},3:{spectrum:"radial-gradient(100% 100% at 24.5% 100%, rgba(106, 160, 242, 0.9) 0%, rgba(198, 229, 247, 0) 100%), linear-gradient(81.66deg, rgba(124, 246, 251, 0.48) 9.38%, rgba(254, 253, 248, 0.7) 98.47%), radial-gradient(4009.6% 10453.55% at 0% 0%, #7EF8FE 0%, #7ABFEC 30.21%, #AEC3ED 45.54%, #DEF3F6 61.46%, #FAF9F3 100%)",blendMode:"normal, normal, normal",svgDefs:'\n <radialGradient id="gradient-3-bottomLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="rotate(60.6728) scale(36.75 1550.85)">\n <stop stop-color="#7EF8FE" />\n <stop offset="0.302083" stop-color="#7ABFEC" />\n <stop offset="0.455396" stop-color="#AEC3ED" />\n <stop offset="0.614583" stop-color="#DEF3F6" />\n <stop offset="1" stop-color="#FAF9F3" />\n </radialGradient>\n <linearGradient id="gradient-3-middleLayer" x1="-1.26123e-07" y1="4.8" x2="24" y2="2.16"\n gradientUnits="userSpaceOnUse">\n <stop stop-color="#7CF6FB" stop-opacity="0.48" />\n <stop offset="1" stop-color="#FEFDF8" stop-opacity="0.7" />\n </linearGradient>\n <radialGradient id="gradient-3-topLayer" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"\n gradientTransform="translate(4.41 18) rotate(-52.9472) scale(22.5541)">\n <stop stop-color="#6AA0F2" />\n <stop offset="1" stop-color="#C6E5F7" stop-opacity="0" />\n </radialGradient>',svgDefIds:"gradient-3-bottomLayer,\n gradient-3-middleLayer,\n gradient-3-topLayer"}},shadow:{100:"0px 1px 2px rgba(0, 0, 0, 0.16), 0px 1px 4px 1px rgba(0, 0, 0, 0.32)",200:"0px 2px 6px 2px rgba(0, 0, 0, 0.16), 0px 1px 2px rgba(0, 0, 0, 0.32)",300:"0px 4px 8px 4px rgba(0, 0, 0, 0.16), 0px 1px 4px rgba(0, 0, 0, 0.32)",400:"0px 6px 10px 4px rgba(0, 0, 0, 0.16), 0px 2px 4px rgba(0, 0, 0, 0.32)",500:"0px 8px 12px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.32)"},spacing:iAe,borderRadius:aAe,font:nAe,text:rAe,breakpoint:oAe,icon:tAe,border:eAe,zLevel:sAe,motion:cAe},{version:dAe}={name:"@biom3/design-tokens",version:"0.4.0",main:"./src/index.ts",module:"./src/index.ts",types:"./src/index.ts",directories:{css:"css",fonts:"fonts"},license:"Apache-2.0",sideEffects:!1,scripts:{lint:"npm run typecheck && npm run lint:check","lint:check":"biome check ./","lint:check:fix":"biome check --apply ./","format:fix":"biome format --write ./",typecheck:"tsc --noEmit",prebuild:"rm -rf ./dist",build:"npm run build:tokens; npm run build:ts",pack:"npm pack","prebuild:tokens":"rm -rf ./css; mkdir css;","build:tokens":"ts-node ./src/packageScripts/dumpTokens.ts","build:ts":"tsup src/index.ts --dts","publish-package":"if can-npm-publish; then cd dist; npm publish --access public; else echo 'Skipping package npm publish'; fi"},dependencies:{"lodash.get":"^4.4.2"},devDependencies:{"@biomejs/biome":"1.7.0","@types/node":"^18.15.11","can-npm-publish":"^1.3.6",nodemon:"^2.0.20","prepend-file":"^2.0.1","@repo/ts-config":"*","ts-node":"^10.9.2",tsup:"^7.2.0",typescript:"^5.4.5"}};console.log(`\n @biom3/design-tokens\n \n version: ${dAe}\n\n`);const fAe=e=>e.toLowerCase()===BH.LIGHT.toLowerCase()?uAe:lAe;const pAe={width:"clamp(320px, 100vw, 430px)",minHeight:"500px",height:"100vh",maxHeight:"650px",position:"relative",overflow:"hidden",borderRadius:"base.borderRadius.x4"},hAe={position:"relative",display:"flex",flexDirection:"column",backgroundColor:"base.color.neutral.1000",height:"100%",width:"100%"},mAe=e=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",position:e?"absolute":"relative",zIndex:1}),yAe=e=>({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",backgroundColor:e??""}),bAe={flex:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},gAe={flex:"1 0 0",width:"100%"},vAe={display:"flex",flexDirection:"column",flex:"1 0 0",width:"100%"},wAe={...pAe};function TAe({id:e,config:t,children:n,globalSx:r}){const i=fAe(t.theme),a=aV.useId().replaceAll(":","-");return Eq(yEe,{globalSx:r,theme:{base:i},drawerContainerId:`${e}${a}`,modalContainerId:`${e}${a}`,children:Eq(P3,{sx:wAe,id:`${e}${a}`,children:n})})}var EAe=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}();function AAe(e,t,n){t.split&&(t=t.split("."));for(var r,i,a=0,o=t.length,s=e;a<o&&"__proto__"!==(i=t[a++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=a===o?n:typeof(r=s[i])==typeof t?r:0*t[a]!=0||~(""+t[a]).indexOf(".")?{}:[]}var xAe=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return U_(t,e),t}(Error);function OAe(e){return"string"==typeof e}function CAe(e){return"number"==typeof e}function IAe(e){return"function"==typeof e}function _Ae(e){return null!=e}function PAe(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var SAe="is not a string",kAe="is not an object",RAe="is nil";function NAe(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function MAe(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return NAe(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var DAe,LAe="onRemoveFromFuture",jAe=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return U_(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,a=void 0===i?2:i,o=e.attempt,s=e.maxTimeout,c=void 0===s?1/0:s;return Math.min(t*r*Math.pow(a,o),c)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(LAe)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(EAe),FAe=256,BAe=[];FAe--;)BAe[FAe]=(FAe+256).toString(16).substring(1);function UAe(){var e,t=0,n="";if(!DAe||FAe+16>256){for(DAe=Array(t=256);t--;)DAe[t]=256*Math.random()|0;t=FAe=0}for(;t<16;t++)e=DAe[FAe+t],n+=6==t?BAe[15&e|64]:8==t?BAe[63&e|128]:BAe[e],1&t&&t>1&&t<11&&(n+="-");return FAe++,n}var zAe=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,a=z_(z_({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete a.time;var o=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[o]&&(o="".concat(o,"-").concat(Math.random())),z_(z_({},e),((n={})[o]=a,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),HAe=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return z_(z_({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),WAe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U_(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(HAe),VAe=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},GAe=function(){function e(e,t,n,r){void 0===t&&(t=UAe()),void 0===n&&(n=new WAe),void 0===r&&(r=new zAe),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new VAe({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return AAe(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function qAe(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return q_(this,void 0,void 0,(function(){var t;return K_(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof VAe&&"middleware_cancellation"===n.type)throw n;return n instanceof VAe?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function KAe(e,t){return qAe(e,t).then((function(t){if(t instanceof GAe)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var XAe=function(e){function t(t){var n,r,i,a=e.call(this)||this;return a.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,a=e();return"object"==typeof(t=a)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),a.finally((function(){return 0==--i&&r()}))),a}}),a.plugins=[],a.failedInitializations=[],a.flushing=!1,a.queue=t,a.queue.on(LAe,(function(){a.scheduleFlush(0)})),a}return U_(t,e),t.prototype.register=function(e,t,n){return q_(this,void 0,void 0,(function(){var r=this;return K_(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return q_(this,void 0,void 0,(function(){var r;return K_(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return q_(this,void 0,void 0,(function(){var t;return K_(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return q_(this,void 0,void 0,(function(){var t=this;return K_(this,(function(n){return[2,new Promise((function(n){var r=function(i,a){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return q_(this,void 0,void 0,(function(){var t=this;return K_(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return q_(this,void 0,void 0,(function(){var t,n,r,i;return K_(this,(function(a){switch(a.label){case 0:return[4,this.criticalTasks.done()];case 1:a.sent(),t=Date.now(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=a.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=a.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof VAe&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return q_(this,void 0,void 0,(function(){var e,t;return K_(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var a=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(a=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:a)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),n=function(e,t){var n={};return e.forEach((function(e){var r,i=void 0;if("string"==typeof t){var a=e[t];i="string"!=typeof a?JSON.stringify(a):a}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=eP(eP([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n}(t,"type"),r=n.before,i=void 0===r?[]:r,a=n.enrichment,o=void 0===a?[]:a,s=n.destination,c=void 0===s?[]:s,u=n.after;return{before:i,enrichment:o,destinations:c,after:void 0===u?[]:u}},t.prototype.flushOne=function(e){var t,n;return q_(this,void 0,void 0,(function(){var r,i,a,o,s,c,u,l,d,f,p,h,m,y;return K_(this,(function(b){switch(b.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,a=r.enrichment,o=0,s=i,b.label=1;case 1:return o<s.length?(c=s[o],[4,KAe(e,c)]):[3,4];case 2:(f=b.sent())instanceof GAe&&(e=f),this.emit("message_enriched",e,c),b.label=3;case 3:return o++,[3,1];case 4:u=0,l=a,b.label=5;case 5:return u<l.length?(d=l[u],[4,qAe(e,d)]):[3,8];case 6:(f=b.sent())instanceof GAe&&(e=f),this.emit("message_enriched",e,d),b.label=7;case 7:return u++,[3,5];case 8:return p=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),h=p.destinations,m=p.after,[4,new Promise((function(t,n){setTimeout((function(){var r=h.map((function(t){return qAe(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return b.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=m.map((function(t){return qAe(e,t)})),[4,Promise.all(y)];case 10:return b.sent(),[2,e]}}))}))},t}(EAe);function YAe(e,t,n,r){return q_(this,void 0,void 0,(function(){var i,a;return K_(this,(function(o){switch(o.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return a=o.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:a=o.sent(),o.label=4;case 4:return(null==r?void 0:r.callback)?[4,MAe(a,r.callback,(s=i,c=r.timeout,u=Date.now()-s,Math.max((null!=c?c:300)-u,0)))]:[3,6];case 5:a=o.sent(),o.label=6;case 6:return(null==r?void 0:r.debug)&&a.flush(),[2,a]}var s,c,u}))}))}function ZAe(e,t,n,r){var i,a=[e,t,n,r],o=PAe(e)?e.event:e;if(!o||!OAe(o))throw new Error("Event missing");var s=PAe(e)?null!==(i=e.properties)&&void 0!==i?i:{}:PAe(t)?t:{},c={};return IAe(n)||(c=null!=n?n:{}),PAe(e)&&!IAe(t)&&(c=null!=t?t:{}),[o,s,c,a.find(IAe)]}function JAe(e,t,n,r,i){var a,o,s=null,c=null,u=[e,t,n,r,i],l=u.filter(OAe);void 0!==l[0]&&void 0!==l[1]&&(s=l[0],c=l[1]),1===l.length&&(s=null,c=l[0]);var d=u.find(IAe),f=u.filter((function(e){return null===c?PAe(e):PAe(e)||null===e})),p=null!==(a=f[0])&&void 0!==a?a:{},h=null!==(o=f[1])&&void 0!==o?o:{};return[s,c,p,h,d]}var QAe=function(e){return function(){for(var t,n,r,i,a,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var c;c=null!==(r=null!==(t=o.find(OAe))&&void 0!==t?t:null===(n=o.find(CAe))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var u=o.filter((function(e){return null===c?PAe(e):PAe(e)||null===e})),l=null!==(i=u[0])&&void 0!==i?i:{},d=null!==(a=u[1])&&void 0!==a?a:{},f=o.find(IAe);return[c,l,d,f]}};function $Ae(e,t,n,r){CAe(e)&&(e=e.toString()),CAe(t)&&(t=t.toString());var i=[e,t,n,r],a=i.filter(OAe),o=a[0],s=void 0===o?e:o,c=a[1],u=void 0===c?null:c,l=i.filter(PAe)[0];return[s,u,void 0===l?{}:l,i.find(IAe)]}function exe(){return"undefined"!=typeof window}function txe(){return!exe()}function nxe(){return!exe()||window.navigator.onLine}function rxe(){return!nxe()}function ixe(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,a=[],o=[],s={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return a},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){a.push(t=t.toLowerCase()),o.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(c())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}var axe=Object.freeze({__proto__:null,default:ixe}),oxe=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},sxe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=oxe();return(n&&n.fetch||ixe).apply(void 0,e)},cxe="1.54.0";
|
|
91
91
|
/*! js-cookie v3.0.1 | MIT */
|
|
92
|
-
function uxe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var lxe=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=uxe({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in i)i[o]&&(a+="; "+o,!0!==i[o]&&(a+="="+i[o].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var a=n[i].split("="),o=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(r[s]=t.read(o,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",uxe({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,uxe({},this.attributes,t))},withConverter:function(t){return e(uxe({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function dxe(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function fxe(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",a=n[r],o={domain:"."+a};try{if(lxe.set(i,"1",o),lxe.get(i))return lxe.remove(i,o),a}catch(e){return}}}var pxe=function(){function e(t){void 0===t&&(t=e.defaults),this.options=z_(z_({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:fxe(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var n=lxe.get(e);if(null==n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?lxe.set(e,t,this.opts()):null===t?lxe.remove(e,this.opts()):lxe.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return lxe.remove(e,this.opts())},e}(),hxe=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}(),mxe=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!==(t=this.cache[e])&&void 0!==t?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}(),yxe={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function bxe(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(yxe).includes(e)}))}var gxe,vxe=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(t=i.get(e)))return t}catch(t){console.warn("Can't access ".concat(e,": ").concat(t))}}return null},e.prototype.set=function(e,t){this.stores.forEach((function(n){try{n.set(e,t)}catch(t){console.warn("Can't set ".concat(e,": ").concat(t))}}))},e.prototype.clear=function(e){this.stores.forEach((function(t){try{t.remove(e)}catch(t){console.warn("Can't remove ".concat(e,": ").concat(t))}}))},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}();function wxe(e){var t=e.map((function(e){var t,n;switch(!function(e){return"object"==typeof e&&void 0!==e.name}(e)?t=e:(t=e.name,n=e.settings),t){case yxe.Cookie:return new pxe(n);case yxe.LocalStorage:return new hxe;case yxe.Memory:return new mxe;default:throw new Error("Unknown Store Type: ".concat(e))}}));return t}function Txe(e,t){return e.map((function(e){return t&&e===yxe.Cookie?{name:e,settings:t}:e}))}function Exe(){if(gxe)return gxe;var e=fxe(window.location.href);return gxe={expires:31536e6,secure:!1,path:"/"},e&&(gxe.domain=e),gxe}var Axe="npm";function xxe(){return Axe}function Oxe(e,t,n,r){var i,a,o,s,c,u,l=e.user();t.context=null!==(a=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==a?a:{};var d=t.context,f="string"==typeof(null===(o=d.page)||void 0===o?void 0:o.search)?null===(s=d.page)||void 0===s?void 0:s.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,d.userAgent=navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===d.locale&&void 0!==p&&(d.locale=p),!d.library){var h=xxe();d.library="web"===h?{name:"analytics.js",version:"next-".concat(cxe)}:{name:"analytics.js",version:"npm:next-".concat(cxe)}}f&&!d.campaign&&(d.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],a=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var o=r.substr(4);"campaign"===o&&(o="name"),e[o]=dxe(a)}return e}),{})}(f)),function(e,t,n){var r=new vxe(n?[]:[new pxe(Exe())]),i=r.get("s:context.referrer"),a=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),a=i[0],o=i[1];if(t[a])return{id:o,type:t[a]}}}(e);(a=null!=a?a:i)&&(t&&(t.referrer=z_(z_({},t.referrer),a)),r.set("s:context.referrer",a))}(f,d,null!==(c=e.options.disableClientPersistence)&&void 0!==c&&c),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var m=e.queue.failedInitializations||[];m.length>0&&(t._metadata={failedInitializations:m});var y=[],b=[];for(var g in r){var v=r[g];"Segment.io"===g&&y.push(g),"bundled"===v.bundlingStatus&&y.push(g),"unbundled"===v.bundlingStatus&&b.push(g)}for(var w=0,T=(null==n?void 0:n.unbundledIntegrations)||[];w<T.length;w++){var E=T[w];b.includes(E)||b.push(E)}var A=null!==(u=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==u?u:{},x=[];y.sort().forEach((function(e){var t;(null!==(t=A[e])&&void 0!==t?t:[]).forEach((function(e){x.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=z_(z_({},t._metadata),{bundled:y.sort(),unbundled:b.sort(),bundledIds:x}));var O=function(){var e=lxe.get("_ga");if(e&&e.startsWith("amp"))return e}();return O&&(d.amp={id:O}),t}var Cxe="api.segment.io/v1";function Ixe(e){console.error("Error sending segment performance metrics",e)}var _xe,Pxe=function(){function e(e){var t,n,r,i,a=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Cxe,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var o=!1,s=function(){o||(o=!0,a.flush().catch(Ixe),o=!1,setTimeout(s,a.flushTimer))};s()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:z_(z_({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(cxe):"npm:next-".concat(cxe)})}}(e,t,xxe());this.queue.push(n),e.includes("error")&&this.flush().catch(Ixe)}},e.prototype.flush=function(){return q_(this,void 0,void 0,(function(){var e=this;return K_(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ixe(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return q_(this,void 0,void 0,(function(){var e,t,n;return K_(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,sxe(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Sxe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U_(t,e),t.initRemoteMetrics=function(e){_xe=new Pxe(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==_xe||_xe.increment(t,null!=r?r:[])},t}(HAe),kxe=function(e){function t(t,n){return e.call(this,t,n,new Sxe)||this}return U_(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(GAe),Rxe={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&r)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&r)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&r)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&r)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|a>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|a>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function o(e){var t,r,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<u?e.subarray(t-64):new Uint8Array(0)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),a=new Uint8Array(i);for(n=0;n<r;n+=1)a[n]=e.charCodeAt(n);return t?a:i}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return c(a("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,a,o,s,c=this.byteLength,u=t(n,c),l=c;return r!==e&&(l=t(r,c)),u>l?new ArrayBuffer(0):(i=l-u,a=new ArrayBuffer(i),o=new Uint8Array(a),s=new Uint8Array(this,u,i),o.set(s),a)}}(),h.prototype.append=function(e){return this.appendBinary(u(e)),this},h.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},h.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(e,t){var r,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,n(this._hash,e)},h.hash=function(e,t){return h.hashBinary(u(e),t)},h.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),a=r.length;for(this._length+=e.byteLength,t=64;t<=a;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<a?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r[t]<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var e=h.prototype.getState.call(this);return e.buff=d(e.buff),e},h.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),h.prototype.setState.call(this,e)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},h}()}(Rxe);var Nxe=lt(Rxe.exports),Mxe=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(z_(z_({},this.baseEvent()),{event:e,type:"track",properties:t,options:z_({},n),integrations:z_({},r)}))},e.prototype.page=function(e,t,n,r,i){var a,o={type:"page",properties:z_({},n),options:z_({},r),integrations:z_({},i)};return null!==e&&(o.category=e,o.properties=null!==(a=o.properties)&&void 0!==a?a:{},o.properties.category=e),null!==t&&(o.name=t),this.normalize(z_(z_({},this.baseEvent()),o))},e.prototype.screen=function(e,t,n,r,i){var a={type:"screen",properties:z_({},n),options:z_({},r),integrations:z_({},i)};return null!==e&&(a.category=e),null!==t&&(a.name=t),this.normalize(z_(z_({},this.baseEvent()),a))},e.prototype.identify=function(e,t,n,r){return this.normalize(z_(z_({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:z_({},n),integrations:z_({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(z_(z_({},this.baseEvent()),{type:"group",traits:t,options:z_({},n),integrations:z_({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:z_({},n),integrations:z_({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(z_(z_({},i),this.baseEvent())):this.normalize(z_(z_({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],a=null!==(t=e.options)&&void 0!==t?t:{};delete a.integrations;var o=Object.keys(a),s=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},c={};return o.forEach((function(e){"context"!==e&&(i.includes(e)?AAe(c,e,a[e]):AAe(s,e,a[e]))})),[s,c]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return z_(z_({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),a=z_(z_({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),o=this.context(e),s=o[0],c=o[1];e.options;var u=H_(e,["options"]),l=z_(z_(z_({timestamp:new Date},u),{context:s,integrations:a}),c),d="ajs-next-"+Nxe.hash(JSON.stringify(l)+UAe());return z_(z_({},l),{messageId:d})},e}(),Dxe={getItem:function(){},setItem:function(){},removeItem:function(){}};try{Dxe=exe()&&window.localStorage?window.localStorage:Dxe}catch(e){console.warn("Unable to access localStorage",e)}function Lxe(e){var t=Dxe.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new kxe(e.event,e.id)}))}function jxe(e){var t=Dxe.getItem(e);return t?JSON.parse(t):{}}function Fxe(e){Dxe.removeItem(e)}function Bxe(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=Dxe.getItem(r),a=i?JSON.parse(i):null,o=null===a||function(e){return(new Date).getTime()>e}(a);if(o)return Dxe.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void Dxe.removeItem(r);!o&&n<3?setTimeout((function(){Bxe(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Uxe=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),o=[],s={};return Bxe(n,(function(){try{o=Lxe(i),s=jxe(a),Fxe(i),Fxe(a),r.queue=eP(eP([],o,!0),r.queue,!0),r.seen=z_(z_({},s),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=eP(eP([],r.queue,!0),r.future,!0);try{Bxe(n,(function(){!function(e,t){var n=Lxe(e),r=eP(eP([],t,!0),n,!0).reduce((function(e,t){var n;return z_(z_({},e),((n={})[t.id]=t,n))}),{});Dxe.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=jxe(e);Dxe.setItem(e,JSON.stringify(z_(z_({},n),t)))}(a,r.seen)}))}catch(e){console.error(e)}}})),r}return U_(t,e),t}(jAe),zxe=function(e){function t(t){return e.call(this,"string"==typeof t?new Uxe(4,t):t)||this}return U_(t,e),t.prototype.flush=function(){return q_(this,void 0,void 0,(function(){return K_(this,(function(t){return rxe()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(XAe);function Hxe(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);a&&"function"==typeof a.value&&(e[i]=e[i].bind(e))}}return e}var Wxe={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Vxe=function(){function e(e,t){void 0===e&&(e=Wxe);var n,r,i,a,o=this;this.options={},this.id=function(e){if(o.options.disable)return null;var t=o.identityStore.getAndSync(o.idKey);void 0!==e&&(o.identityStore.set(o.idKey,e),e!==t&&null!==t&&null!==e&&o.anonymousId(null));var n=o.identityStore.getAndSync(o.idKey);if(n)return n;var r=o.legacyUserStore.get(Wxe.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(o.options.disable)return null;if(void 0===e){var r=null!==(t=o.identityStore.getAndSync(o.anonKey))&&void 0!==t?t:null===(n=o.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(o.identityStore.set(o.anonKey,null),o.identityStore.getAndSync(o.anonKey)):(o.identityStore.set(o.anonKey,null!=e?e:UAe()),o.identityStore.getAndSync(o.anonKey))},this.traits=function(e){var t;if(!o.options.disable)return null===e&&(e={}),e&&o.traitsStore.set(o.traitsKey,null!=e?e:{}),null!==(t=o.traitsStore.get(o.traitsKey))&&void 0!==t?t:{}},this.options=z_(z_({},Wxe),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Wxe.cookie.key,this.traitsKey=null!==(a=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==a?a:Wxe.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,(function(e){return e===yxe.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==yxe.Cookie}));var s=this.legacyUserStore.get(Wxe.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),Hxe(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=z_(z_({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[yxe.LocalStorage,yxe.Cookie,yxe.Memory];return e.disable?new vxe([]):e.persist?(void 0!==e.storage&&null!==e.storage&&bxe(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==yxe.LocalStorage}))),n&&(r=r.filter(n)),new vxe(wxe(Txe(r,t)))):new vxe([new mxe])},e.defaults=Wxe,e}(),Gxe={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},qxe=function(e){function t(t,n){void 0===t&&(t=Gxe);var r=e.call(this,z_(z_({},Gxe),t),n)||this;return r.anonymousId=function(e){},Hxe(r),r}return U_(t,e),t}(Vxe),Kxe="This is being deprecated and will be not be available in future releases of Analytics JS",Xxe=oxe(),Yxe=null==Xxe?void 0:Xxe.analytics;function Zxe(){console.warn(Kxe)}var Jxe=function(e){function t(t,n,r,i,a){var o,s,c,u=this;(u=e.call(this)||this)._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=Zxe,u.addIntegrationMiddleware=Zxe,u.listeners=Zxe,u.addEventListener=Zxe,u.removeAllListeners=Zxe,u.removeListener=Zxe,u.removeEventListener=Zxe,u.hasListeners=Zxe,u.add=Zxe,u.addIntegration=Zxe;var l=null==n?void 0:n.cookie,d=null!==(o=null==n?void 0:n.disableClientPersistence)&&void 0!==o&&o;u.settings=t,u.settings.timeout=null!==(s=u.settings.timeout)&&void 0!==s?s:300,u.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new jAe(r,[]):new Uxe(r,e);return new zxe(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,d);var f=null==n?void 0:n.storage;return u._universalStorage=u.createStore(d,f,l),u._user=null!=i?i:new Vxe(z_({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=a?a:new qxe(z_({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new Mxe(u._user),u.integrations=null!==(c=null==n?void 0:n.integrations)&&void 0!==c?c:{},u.options=null!=n?n:{},Hxe(u),u}return U_(t,e),t.prototype.createStore=function(e,t,n){return e?new vxe([new mxe]):t&&bxe(t)?new vxe(wxe(Txe(t.stores,n))):new vxe(wxe([yxe.LocalStorage,{name:yxe.Cookie,settings:n},yxe.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return K_(this,(function(c){return t=ZAe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return K_(this,(function(u){return t=JAe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.page(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return K_(this,(function(c){return t=QAe(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],this._user.identify(n,r),o=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=QAe(this._group).apply(void 0,t),i=r[0],a=r[1],o=r[2],s=r[3];this._group.identify(i,a);var c=this._group.id(),u=this._group.traits(),l=this.eventFactory.group(c,u,o,this.integrations);return this._dispatch(l,s).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return K_(this,(function(c){return t=$Ae.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return K_(this,(function(u){return t=JAe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.screen(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r=this;return K_(this,(function(i){switch(i.label){case 0:return t=kxe.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r=this;return K_(this,(function(i){switch(i.label){case 0:return t=kxe.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return q_(this,void 0,void 0,(function(){var n;return K_(this,(function(r){return n=new kxe(e),rxe()&&!this.options.retryQueue?[2,n]:[2,YAe(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return q_(this,void 0,void 0,(function(){var t=this;return K_(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return q_(t,void 0,void 0,(function(){var t,n,r;return K_(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return XCe}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()}));return r.forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return q_(this,void 0,void 0,(function(){return K_(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return mKe}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),q_(this,void 0,void 0,(function(){return K_(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Kxe),window.analytics=null!=Yxe?Yxe:this,this},t.prototype.normalize=function(e){return console.warn(Kxe),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Kxe),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return cxe},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return q_(this,void 0,void 0,(function(){return K_(this,(function(e){return console.warn(Kxe),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return q_(this,void 0,void 0,(function(){return K_(this,(function(t){switch(t.label){case 0:return console.warn(Kxe),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Kxe),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Kxe);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(EAe);function Qxe(){return"undefined"!=typeof process&&process.env?process.env:{}}var $xe,eOe=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,tOe=function(){var e=function(){var e;return null!=$xe?$xe:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=eOe.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},nOe=function(){var e=tOe();return"".concat(e,"/next-integrations")};function rOe(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],a=t[1];return z_(z_({},e),"object"==typeof a?((n={})[i]=a,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],a=t[1];return z_(z_({},e),((n={})[i]=z_(z_({},a),r[i]),n))}),{})}function iOe(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function aOe(){var e=iOe();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function oOe(e){void 0===e&&(e="");var t=iOe();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function sOe(e){var t=e.event;t.context=t.context||{};var n={path:aOe(),referrer:document.referrer,search:location.search,title:document.title,url:oOe(location.search)},r=void 0;return"page"===t.type&&(r=t.properties&&function(e,t){return Object.assign.apply(Object,eP([{}],t.map((function(t){var n;if(e&&Object.prototype.hasOwnProperty.call(e,t))return(n={})[t]=e[t],n})),!1))}(t.properties,Object.keys(n)),t.properties=z_(z_(z_({},n),t.properties),t.name?{name:t.name}:{})),t.context.page=z_(z_(z_({},n),r),t.context.page),e}var cOe={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:sOe,alias:sOe,track:sOe,identify:sOe,group:sOe};function uOe(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function lOe(e,t){var n=uOe(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,a=window.document.createElement("script");a.type="text/javascript",a.src=e,a.async=!0,a.setAttribute("status","loading");for(var o=0,s=Object.entries(null!=t?t:{});o<s.length;o++){var c=s[o],u=c[0],l=c[1];a.setAttribute(u,l)}a.onload=function(){a.onerror=a.onload=null,a.setAttribute("status","loaded"),n(a)},a.onerror=function(){a.onerror=a.onload=null,a.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var d=window.document.getElementsByTagName("script")[0];null===(i=d.parentElement)||void 0===i||i.insertBefore(a,d)}))}function dOe(e){var t=uOe(e);return void 0!==t&&t.remove(),Promise.resolve()}var fOe={},pOe={},hOe={},mOe={exports:{}};!function(e){function t(e){return function(t,n,r,a){var o,s=a&&function(e){return"function"==typeof e}(a.normalizer)?a.normalizer:i;n=s(n);for(var c=!1;!c;)u();function u(){for(o in t){var e=s(o);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[o];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}o=void 0,c=!0}if(o)return null==t?t:e(t,o,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,a){return t(r).call(this,e,n,i,a),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mOe);var yOe=mOe.exports,bOe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hOe,"__esModule",{value:!0});var gOe=bOe(yOe);function vOe(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return gOe.default(n,"address."+e)||gOe.default(n,e)||(t?gOe.default(n,"address."+t):null)||(t?gOe.default(n,t):null)||gOe.default(r,"address."+e)||gOe.default(r,e)||(t?gOe.default(r,"address."+t):null)||(t?gOe.default(r,t):null)}}hOe.default=function(e){e.zip=vOe("postalCode","zip"),e.country=vOe("country"),e.street=vOe("street"),e.state=vOe("state"),e.city=vOe("city"),e.region=vOe("region")};var wOe={};Object.defineProperty(wOe,"__esModule",{value:!0}),wOe.clone=void 0,wOe.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var TOe={};Object.defineProperty(TOe,"__esModule",{value:!0});var EOe={Salesforce:!0};TOe.default=function(e){return!EOe[e]};var AOe={},xOe=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;AOe.parse=function(e){var t=[1,5,6,7,11,12],n=xOe.exec(e),r=0;if(!n)return new Date(e);for(var i,a=0;i=t[a];a++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var o=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(o)},AOe.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&xOe.test(e))};var OOe={},COe=/\d{13}/;OOe.is=function(e){return COe.test(e)},OOe.parse=function(e){return e=parseInt(e,10),new Date(e)};var IOe={},_Oe=/\d{10}/;IOe.is=function(e){return _Oe.test(e)},IOe.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var POe=AOe,SOe=OOe,kOe=IOe,ROe=Object.prototype.toString;var NOe=function(e){return t=e,"[object Date]"===ROe.call(t)?e:function(e){return"[object Number]"===ROe.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):POe.is(e)?POe.parse(e):SOe.is(e)?SOe.parse(e):kOe.is(e)?kOe.parse(e):new Date(e);var t,n};var MOe=AOe,DOe=LOe;function LOe(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=LOe(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=LOe(n,t)})),e}(e,t):MOe.is(e,t)?MOe.parse(e):e}var jOe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pOe,"__esModule",{value:!0}),pOe.Facade=void 0;var FOe=jOe(hOe),BOe=wOe,UOe=jOe(TOe),zOe=jOe(NOe),HOe=jOe(yOe),WOe=jOe(DOe);function VOe(e,t){t=t||{},this.raw=BOe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=BOe.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?zOe.default(e.timestamp):new Date,t.traverse&&WOe.default(e),this.opts=t,this.obj=e}pOe.Facade=VOe;var GOe=VOe.prototype;function qOe(e){return BOe.clone(e)}GOe.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=HOe.default(n,t.join("."))),this.opts.clone?qOe(n):n):n},GOe.field=function(e){var t=this.obj[e];return this.opts.clone?qOe(t):t},VOe.proxy=function(e){return function(){return this.proxy(e)}},VOe.field=function(e){return function(){return this.field(e)}},VOe.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?BOe.clone(n):n]),n||[]}},VOe.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},GOe.json=function(){var e=this.opts.clone?BOe.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},GOe.rawEvent=function(){return this.raw},GOe.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?BOe.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||HOe.default(r,e);return"object"!=typeof i&&(i=HOe.default(this.options(),e)),"object"==typeof i?i:{}}},GOe.context=GOe.options,GOe.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&UOe.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},GOe.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},GOe.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},GOe.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},GOe.sessionId=GOe.anonymousId,GOe.groupId=VOe.proxy("options.groupId"),GOe.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},GOe.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},GOe.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},GOe.userAgent=VOe.proxy("context.userAgent"),GOe.timezone=VOe.proxy("context.timezone"),GOe.timestamp=VOe.field("timestamp"),GOe.channel=VOe.field("channel"),GOe.ip=VOe.proxy("context.ip"),GOe.userId=VOe.field("userId"),FOe.default(GOe);var KOe={},XOe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(KOe,"__esModule",{value:!0}),KOe.Alias=void 0;var YOe=XOe($o),ZOe=pOe;function JOe(e,t){ZOe.Facade.call(this,e,t)}KOe.Alias=JOe,YOe.default(JOe,ZOe.Facade),JOe.prototype.action=function(){return"alias"},JOe.prototype.type=JOe.prototype.action,JOe.prototype.previousId=function(){return this.field("previousId")||this.field("from")},JOe.prototype.from=JOe.prototype.previousId,JOe.prototype.userId=function(){return this.field("userId")||this.field("to")},JOe.prototype.to=JOe.prototype.userId;var QOe={},$Oe={};Object.defineProperty($Oe,"__esModule",{value:!0});var eCe=/.+\@.+\..+/;$Oe.default=function(e){return eCe.test(e)};var tCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(QOe,"__esModule",{value:!0}),QOe.Group=void 0;var nCe=tCe($o),rCe=tCe($Oe),iCe=tCe(NOe),aCe=pOe;function oCe(e,t){aCe.Facade.call(this,e,t)}QOe.Group=oCe,nCe.default(oCe,aCe.Facade);var sCe=oCe.prototype;sCe.action=function(){return"group"},sCe.type=sCe.action,sCe.groupId=aCe.Facade.field("groupId"),sCe.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return iCe.default(e)},sCe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return rCe.default(t)?t:void 0},sCe.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},sCe.name=aCe.Facade.proxy("traits.name"),sCe.industry=aCe.Facade.proxy("traits.industry"),sCe.employees=aCe.Facade.proxy("traits.employees"),sCe.properties=function(){return this.field("traits")||this.field("properties")||{}};var cCe={},uCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cCe,"__esModule",{value:!0}),cCe.Identify=void 0;var lCe=pOe,dCe=uCe(yOe),fCe=uCe($o),pCe=uCe($Oe),hCe=uCe(NOe),mCe=function(e){return e.trim()};function yCe(e,t){lCe.Facade.call(this,e,t)}cCe.Identify=yCe,fCe.default(yCe,lCe.Facade);var bCe=yCe.prototype;bCe.action=function(){return"identify"},bCe.type=bCe.action,bCe.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bCe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return pCe.default(t)?t:void 0},bCe.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return hCe.default(e)},bCe.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return hCe.default(e)},bCe.companyName=function(){return this.proxy("traits.company.name")},bCe.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mCe(e);var t=this.firstName(),n=this.lastName();return t&&n?mCe(t+" "+n):void 0},bCe.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mCe(e);var t=this.proxy("traits.name");return"string"==typeof t?mCe(t).split(" ")[0]:void 0},bCe.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mCe(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mCe(t).indexOf(" ");if(-1!==n)return mCe(t.substr(n+1))}},bCe.uid=function(){return this.userId()||this.username()||this.email()},bCe.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bCe.age=function(){var e=this.birthday(),t=dCe.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bCe.avatar=function(){var e=this.traits();return dCe.default(e,"avatar")||dCe.default(e,"photoUrl")||dCe.default(e,"avatarUrl")},bCe.position=function(){var e=this.traits();return dCe.default(e,"position")||dCe.default(e,"jobTitle")},bCe.username=lCe.Facade.proxy("traits.username"),bCe.website=lCe.Facade.one("traits.website"),bCe.websites=lCe.Facade.multi("traits.website"),bCe.phone=lCe.Facade.one("traits.phone"),bCe.phones=lCe.Facade.multi("traits.phone"),bCe.address=lCe.Facade.proxy("traits.address"),bCe.gender=lCe.Facade.proxy("traits.gender"),bCe.birthday=lCe.Facade.proxy("traits.birthday");var gCe={},vCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gCe,"__esModule",{value:!0}),gCe.Track=void 0;var wCe=vCe($o),TCe=pOe,ECe=cCe,ACe=vCe($Oe),xCe=vCe(yOe);function OCe(e,t){TCe.Facade.call(this,e,t)}gCe.Track=OCe,wCe.default(OCe,TCe.Facade);var CCe=OCe.prototype;CCe.action=function(){return"track"},CCe.type=CCe.action,CCe.event=TCe.Facade.field("event"),CCe.value=TCe.Facade.proxy("properties.value"),CCe.category=TCe.Facade.proxy("properties.category"),CCe.id=TCe.Facade.proxy("properties.id"),CCe.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},CCe.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},CCe.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},CCe.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},CCe.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},CCe.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},CCe.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},CCe.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},CCe.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},CCe.sku=TCe.Facade.proxy("properties.sku"),CCe.tax=TCe.Facade.proxy("properties.tax"),CCe.name=TCe.Facade.proxy("properties.name"),CCe.price=TCe.Facade.proxy("properties.price"),CCe.total=TCe.Facade.proxy("properties.total"),CCe.repeat=TCe.Facade.proxy("properties.repeat"),CCe.coupon=TCe.Facade.proxy("properties.coupon"),CCe.shipping=TCe.Facade.proxy("properties.shipping"),CCe.discount=TCe.Facade.proxy("properties.discount"),CCe.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},CCe.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},CCe.description=TCe.Facade.proxy("properties.description"),CCe.plan=TCe.Facade.proxy("properties.plan"),CCe.subtotal=function(){var e=xCe.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},CCe.products=function(){var e=this.properties(),t=xCe.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},CCe.quantity=function(){return(this.obj.properties||{}).quantity||1},CCe.currency=function(){return(this.obj.properties||{}).currency||"USD"},CCe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},CCe.query=TCe.Facade.proxy("options.query"),CCe.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},CCe.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},CCe.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return ACe.default(t)?t:void 0},CCe.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},CCe.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},CCe.identify=function(){var e=this.json();return e.traits=this.traits(),new ECe.Identify(e,this.opts)};var ICe={},_Ce=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ICe,"__esModule",{value:!0}),ICe.Page=void 0;var PCe=_Ce($o),SCe=pOe,kCe=gCe,RCe=_Ce($Oe);function NCe(e,t){SCe.Facade.call(this,e,t)}ICe.Page=NCe,PCe.default(NCe,SCe.Facade);var MCe=NCe.prototype;MCe.action=function(){return"page"},MCe.type=MCe.action,MCe.category=SCe.Facade.field("category"),MCe.name=SCe.Facade.field("name"),MCe.title=SCe.Facade.proxy("properties.title"),MCe.path=SCe.Facade.proxy("properties.path"),MCe.url=SCe.Facade.proxy("properties.url"),MCe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},MCe.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=null==this[i]?this.proxy("properties."+i):this[i]();if(null==a)continue;t[e[i]]=a,i!==e[i]&&delete t[i]}return t},MCe.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return RCe.default(t)?t:void 0},MCe.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},MCe.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},MCe.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new kCe.Track(t,this.opts)};var DCe={},LCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(DCe,"__esModule",{value:!0}),DCe.Screen=void 0;var jCe=LCe($o),FCe=ICe,BCe=gCe;function UCe(e,t){FCe.Page.call(this,e,t)}DCe.Screen=UCe,jCe.default(UCe,FCe.Page),UCe.prototype.action=function(){return"screen"},UCe.prototype.type=UCe.prototype.action,UCe.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},UCe.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new BCe.Track(t,this.opts)};var zCe={},HCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zCe,"__esModule",{value:!0}),zCe.Delete=void 0;var WCe=HCe($o),VCe=pOe;function GCe(e,t){VCe.Facade.call(this,e,t)}function qCe(e,t){var n=new fOe.Facade(e,t);return"track"===e.type&&(n=new fOe.Track(e,t)),"identify"===e.type&&(n=new fOe.Identify(e,t)),"page"===e.type&&(n=new fOe.Page(e,t)),"alias"===e.type&&(n=new fOe.Alias(e,t)),"group"===e.type&&(n=new fOe.Group(e,t)),"screen"===e.type&&(n=new fOe.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function KCe(e,t,n){return q_(this,void 0,void 0,(function(){function r(t,n){return q_(this,void 0,void 0,(function(){var r,i,a;return K_(this,(function(o){switch(o.label){case 0:return r=!1,i=null,[4,n({payload:qCe(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return o.sent(),r||null===i||(i.integrations=z_(z_({},t.integrations),((a={})[e]=!1,a))),[2,i]}}))}))}var i,a,o,s,c;return K_(this,(function(e){switch(e.label){case 0:i=qCe(t,{clone:!0,traverse:!1}).rawEvent(),a=0,o=n,e.label=1;case 1:return a<o.length?(s=o[a],[4,r(i,s)]):[3,4];case 2:if(null===(c=e.sent()))return[2,null];i=c,e.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))}zCe.Delete=GCe,WCe.default(GCe,VCe.Facade),GCe.prototype.type=function(){return"delete"},function(e){var t=ut&&ut.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=pOe;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=KOe;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=QOe;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var a=cCe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return a.Identify}});var o=gCe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return o.Track}});var s=ICe;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var c=DCe;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return c.Screen}});var u=zCe;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return u.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:a.Identify,Track:o.Track,Page:s.Page,Screen:c.Screen,Delete:u.Delete})}(fOe);var XCe=Object.freeze({__proto__:null,applyDestinationMiddleware:KCe,sourceMiddlewarePlugin:function(e,t){function n(n){return q_(this,void 0,void 0,(function(){var r;return K_(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:qCe(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new VAe({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),YCe=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return q_(this,void 0,void 0,(function(){var t;return K_(this,(function(n){switch(n.label){case 0:return[4,KCe(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new VAe({retry:!1,reason:"dropped by destination middleware"})),[2,new kxe(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return q_(t,void 0,void 0,(function(){var t;return K_(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function ZCe(e,t,n,r,i){var a,o,s;return q_(this,void 0,void 0,(function(){var c,u,l,d,f=this;return K_(this,(function(p){switch(p.label){case 0:return c=[],u=tOe(),l=null!==(o=null===(a=e.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==o?o:[],d=(null!==(s=e.remotePlugins)&&void 0!==s?s:[]).map((function(e){return q_(f,void 0,void 0,(function(){var a,o,s,d,f,p,h,m,y;return K_(this,(function(b){switch(b.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];b.label=1;case 1:if(b.trys.push([1,12,,13]),a=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];o=e.url.split("/"),s=o[o.length-2],d=e.url.replace(s,btoa(s).replace(/=/g,"")),b.label=2;case 2:return b.trys.push([2,4,,6]),[4,lOe(d.replace(a,u))];case 3:return b.sent(),[3,6];case 4:return b.sent(),[4,lOe(e.url.replace(a,u))];case 5:return b.sent(),[3,6];case 6:return[3,9];case 7:return[4,lOe(e.url.replace(a,u))];case 8:b.sent(),b.label=9;case 9:return f=e.libraryName,"function"!=typeof window[f]?[3,11]:[4,(0,window[f])(z_(z_({},e.settings),n[e.name]))];case 10:p=b.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(h=Array.isArray(p)?p:[p]),m=l.filter((function(t){return t.destinationName===e.creationName})),h.forEach((function(t){var n=new YCe(e.creationName,t);m.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),b.label=11;case 11:return[3,13];case 12:return y=b.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return p.sent(),[2,c.filter(Boolean)]}}))}))}var JCe=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},QCe=500;function $Ce(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function eIe(e,t){var n,r,i,a=[],o=!1,s=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,c=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function u(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey,i=t.map((function(e){var t=e;return t.sentAt,H_(t,["sentAt"])}));return sxe("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function l(){return q_(this,void 0,void 0,(function(){var e;return K_(this,(function(t){return a.length?(e=a,a=[],[2,u(e)]):[2]}))}))}return JCe((function(e){if((o=e)&&a.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){$Ce(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(a).map(u);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return q_(this,void 0,void 0,(function(){var e;return K_(this,(function(n){return a.push(t),e=a.length>=s||function(e){return $Ce(e)>=QCe-50}(a),[2,e||o?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),c)))]}))}))}}}var tIe=function(e,t){return q_(void 0,void 0,void 0,(function(){var n;return K_(this,(function(r){return n=function(r){return q_(void 0,void 0,void 0,(function(){var i;return K_(this,(function(a){switch(a.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[a.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function nIe(e,t){return q_(this,void 0,void 0,(function(){var n,r=this;return K_(this,(function(i){switch(i.label){case 0:return n=[],rxe()?[2,t]:[4,tIe((function(){return t.length>0&&!rxe()}),(function(){return q_(r,void 0,void 0,(function(){var r,i;return K_(this,(function(a){switch(a.label){case 0:return(r=t.pop())?[4,qAe(r,e)]:[2];case 1:return i=a.sent(),i instanceof kxe||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function rIe(e,t,n,r){var i=this;e||setTimeout((function(){return q_(i,void 0,void 0,(function(){var e,i;return K_(this,(function(a){switch(a.label){case 0:return e=!0,[4,nIe(n,t)];case 1:return i=a.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function iIe(e){return q_(this,void 0,void 0,(function(){var t;return K_(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function aIe(e,t,n){var r,i,a;return q_(this,void 0,void 0,(function(){function o(r){return q_(this,void 0,void 0,(function(){var i,a;return K_(this,(function(o){return rxe()?(c.push(r),rIe(l,c,b,rIe),[2,r]):(u.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),a=qCe(r.event).json(),"track"===r.event.type&&delete a.traits,"alias"===r.event.type&&(a=function(e,t){var n,r,i,a,o=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:o.id())&&void 0!==i?i:o.anonymousId(),t.userId=null!==(a=t.userId)&&void 0!==a?a:t.to,delete t.from,delete t.to,t}(e,a)),[2,m.dispatch("".concat(p,"/").concat(i),Oxe(e,a,t,n)).then((function(){return r})).catch((function(){return c.pushWithBackoff(r),rIe(l,c,b,rIe),r})).finally((function(){u.delete(r)}))])}))}))}var s,c,u,l,d,f,p,h,m,y,b;return K_(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(u)),u.clear()})),s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",c=e.options.disableClientPersistence?new jAe(e.queue.queue.maxAttempts,[]):new Uxe(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),u=new Set,l=!1,d=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Cxe,f=null!==(a=null==t?void 0:t.protocol)&&void 0!==a?a:"https",p="".concat(f,"://").concat(d),h=null==t?void 0:t.deliveryStrategy,m="batching"===(null==h?void 0:h.strategy)?eIe(d,h.config):(g=null==h?void 0:h.config,{dispatch:function(e,t){return sxe(e,{keepalive:null==g?void 0:g.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,iIe(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return b={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:o,identify:o,page:o,alias:o,group:o,screen:o},c.todo&&rIe(l,c,b,rIe),[2,b]}var g}))}))}function oIe(e){var t,n=e.event;!function(e){if(!_Ae(e))throw new xAe("Event",RAe);if("object"!=typeof e)throw new xAe("Event",kAe)}(n),function(e){if(!OAe(e.type))throw new xAe(".type",SAe)}(n),"track"===n.type&&function(e){if(!OAe(e.event))throw new xAe(".event",SAe)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!PAe(r))throw new xAe(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!_Ae(n))throw new xAe(t,RAe);if(!OAe(n))throw new xAe(t,SAe)}(n),e}var sIe={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:oIe,identify:oIe,page:oIe,alias:oIe,group:oIe,screen:oIe},cIe=function(e,t,n){n.getCalls(e).forEach((function(e){hIe(t,e).catch(console.error)}))},uIe=function(e,t){return q_(void 0,void 0,void 0,(function(){var n,r,i;return K_(this,(function(a){switch(a.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),a.label=1;case 1:return n<r.length?(i=r[n],[4,hIe(e,i).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},lIe=cIe.bind(window,"on"),dIe=cIe.bind(window,"setAnonymousId"),fIe=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){hIe(e,t).catch(console.error)}),0)}))},pIe=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function hIe(e,t){return q_(this,void 0,void 0,(function(){var n,r;return K_(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(a=n)&&null!==a&&"then"in a&&"function"==typeof a.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var a}))}))}var mIe=function(){function e(e){var t=this;this._preInitBuffer=new pIe,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=cxe,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var a=(n=t.instance)[e].apply(n,r);return Promise.resolve(a)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function yIe(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var bIe,gIe,vIe=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(yIe)},wIe=null!==(bIe=(gIe=oxe()).__SEGMENT_INSPECTOR__)&&void 0!==bIe?bIe:gIe.__SEGMENT_INSPECTOR__={};function TIe(e,t){return q_(this,void 0,void 0,(function(){return K_(this,(function(n){switch(n.label){case 0:return t.push.apply(t,vIe()),[4,uIe(e,t)];case 1:return n.sent(),t.push.apply(t,vIe()),fIe(e,t),t.clear(),[2]}}))}))}function EIe(e,t,n,r,i,a,o){var s,c,u;return q_(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w,T,E=this;return K_(this,(function(A){switch(A.label){case 0:return function(e){var t,n,r;return"test"!==Qxe().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return EZe})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=A.sent(),[3,3];case 2:d=void 0,A.label=3;case 3:return l=d,x=t,"test"!==Qxe().NODE_ENV&&Object.keys(x.integrations).length>1||o.length>0?[4,Promise.resolve().then((function(){return PZe})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,o)}))]:[3,5];case 4:return p=A.sent(),[3,6];case 5:p=[],A.label=6;case 6:return f=p,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return SZe})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:A.sent(),A.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then((function(){return kZe})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return m=A.sent(),[3,11];case 10:m=void 0,A.label=11;case 11:return h=m,y=rOe(t,i),[4,ZCe(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return b=A.sent(),g=eP(eP(eP([sIe,cOe],a,!0),f,!0),b,!0),h&&g.push(h),!1===(null===(c=r.integrations)||void 0===c?void 0:c.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(w=(v=g).push,[4,aIe(n,y["Segment.io"],t.integrations)]);case 13:w.apply(v,[A.sent()]),A.label=14;case 14:return[4,n.register.apply(n,g)];case 15:return T=A.sent(),Object.entries(null!==(u=t.enabledMiddleware)&&void 0!==u?u:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return RZe})).then((function(e){var r=e.remoteMiddlewares;return q_(E,void 0,void 0,(function(){var e,a;return K_(this,(function(o){switch(o.label){case 0:return[4,r(T,t,i.obfuscate)];case 1:return e=o.sent(),a=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(a)]}}))}))}))]:[3,17];case 16:A.sent(),A.label=17;case 17:return[2,T]}var x}))}))}function AIe(e,t,n){var r,i,a,o,s,c,u;return void 0===t&&(t={}),q_(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w;return K_(this,(function(T){switch(T.label){case 0:return e.cdnURL&&(O=e.cdnURL,window.analytics&&(window.analytics._cdn=O),$xe=O),null===(r=e.cdnSettings)||void 0===r?[3,1]:(d=r,[3,3]);case 1:return[4,(E=e.writeKey,A=e.cdnURL,x=null!=A?A:tOe(),sxe("".concat(x,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:d=T.sent(),T.label=3;case 3:return l=d,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),f=null===(a=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,p=z_({retryQueue:f},t),function(e){var t;null===(t=wIe.attach)||void 0===t||t.call(wIe,e)}(h=new Jxe(e,p)),m=null!==(o=e.plugins)&&void 0!==o?o:[],y=null!==(s=e.classicIntegrations)&&void 0!==s?s:[],Sxe.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,vIe()),dIe(e,t),lIe(e,t)}(h,n),[4,EIe(e.writeKey,l,h,p,t,m,y)];case 4:return b=T.sent(),g=null!==(c=window.location.search)&&void 0!==c?c:"",v=null!==(u=window.location.hash)&&void 0!==u?u:"",(w=g.length?g:v.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,h.queryString(w).catch(console.error)]:[3,6];case 5:T.sent(),T.label=6;case 6:return h.initialized=!0,h.emit("initialize",e,t),t.initialPageview&&h.page().catch(console.error),[4,TIe(h,n)];case 7:return T.sent(),[2,[h,b]]}var E,A,x,O}))}))}var xIe=function(e){function t(){var t,n,r,i=this,a=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),o=a.promise,s=a.resolve;return i=e.call(this,(function(e){return o.then((function(t){return AIe(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return s([e,t])},i}return U_(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(mIe),OIe=Object.create,CIe=Object.defineProperty,IIe=Object.getOwnPropertyDescriptor,_Ie=Object.getOwnPropertyNames,PIe=Object.getOwnPropertySymbols,SIe=Object.getPrototypeOf,kIe=Object.prototype.hasOwnProperty,RIe=Object.prototype.propertyIsEnumerable,NIe=(e,t,n)=>t in e?CIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MIe=(e,t)=>{for(var n in t||(t={}))kIe.call(t,n)&&NIe(e,n,t[n]);if(PIe)for(var n of PIe(t))RIe.call(t,n)&&NIe(e,n,t[n]);return e},DIe=(e,t)=>function(){return t||(0,e[_Ie(e)[0]])((t={exports:{}}).exports,t),t.exports},LIe=(e,t,n)=>(n=null!=e?OIe(SIe(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of _Ie(t))kIe.call(e,n)||undefined===n||CIe(e,n,{get:()=>t[n],enumerable:!(r=IIe(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?n:CIe(n,"default",{value:e,enumerable:!0}),e)),jIe=DIe({"../../node_modules/react-is/cjs/react-is.production.min.js"(e){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case l:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case h:case s:return e;default:return t}}case r:return t}}}function T(e){return w(e)===l}e.AsyncMode=u,e.ConcurrentMode=l,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=h,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return T(e)||w(e)===u},e.isConcurrentMode=T,e.isContextConsumer=function(e){return w(e)===c},e.isContextProvider=function(e){return w(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===i},e.isLazy=function(e){return w(e)===m},e.isMemo=function(e){return w(e)===h},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===o},e.isStrictMode=function(e){return w(e)===a},e.isSuspense=function(e){return w(e)===f},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===o||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===b||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y)},e.typeOf=w}}),FIe=DIe({"../../node_modules/react-is/index.js"(e,t){t.exports=jIe()}}),BIe=DIe({"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(e,t){var n=FIe(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function s(e){return n.isMemo(e)?a:o[e.$$typeof]||r}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(p){var a=f(n);a&&a!==p&&e(t,a,r)}var o=u(n);l&&(o=o.concat(l(n)));for(var h=s(t),m=s(n),y=0;y<o.length;++y){var b=o[y];if(!(i[b]||r&&r[b]||m&&m[b]||h&&h[b])){var g=d(n,b);try{c(t,b,g)}catch(e){}}}}return t}}}),UIe=DIe({"../../node_modules/@babel/runtime/helpers/extends.js"(e,t){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(this,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});function zIe(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}var HIe=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(t){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),WIe="-ms-",VIe="-moz-",GIe="-webkit-",qIe="comm",KIe="rule",XIe="decl",YIe="@keyframes",ZIe=Math.abs,JIe=String.fromCharCode,QIe=Object.assign;function $Ie(e){return e.trim()}function e_e(e,t,n){return e.replace(t,n)}function t_e(e,t){return e.indexOf(t)}function n_e(e,t){return 0|e.charCodeAt(t)}function r_e(e,t,n){return e.slice(t,n)}function i_e(e){return e.length}function a_e(e){return e.length}function o_e(e,t){return t.push(e),e}var s_e=1,c_e=1,u_e=0,l_e=0,d_e=0,f_e="";function p_e(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:s_e,column:c_e,length:o,return:""}}function h_e(e,t){return QIe(p_e("",null,null,"",null,null,0),e,{length:-e.length},t)}function m_e(){return d_e=l_e<u_e?n_e(f_e,l_e++):0,c_e++,10===d_e&&(c_e=1,s_e++),d_e}function y_e(){return n_e(f_e,l_e)}function b_e(){return l_e}function g_e(e,t){return r_e(f_e,e,t)}function v_e(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function w_e(e){return s_e=c_e=1,u_e=i_e(f_e=e),l_e=0,[]}function T_e(e){return f_e="",e}function E_e(e){return $Ie(g_e(l_e-1,O_e(91===e?e+2:40===e?e+1:e)))}function A_e(e){for(;(d_e=y_e())&&d_e<33;)m_e();return v_e(e)>2||v_e(d_e)>3?"":" "}function x_e(e,t){for(;--t&&m_e()&&!(d_e<48||d_e>102||d_e>57&&d_e<65||d_e>70&&d_e<97););return g_e(e,b_e()+(t<6&&32==y_e()&&32==m_e()))}function O_e(e){for(;m_e();)switch(d_e){case e:return l_e;case 34:case 39:34!==e&&39!==e&&O_e(d_e);break;case 40:41===e&&O_e(e);break;case 92:m_e()}return l_e}function C_e(e,t){for(;m_e()&&e+d_e!==57&&(e+d_e!==84||47!==y_e()););return"/*"+g_e(t,l_e-1)+"*"+JIe(47===e?e:m_e())}function I_e(e){for(;!v_e(y_e());)m_e();return g_e(e,l_e)}function __e(e){return T_e(P_e("",null,null,null,[""],e=w_e(e),0,[0],e))}function P_e(e,t,n,r,i,a,o,s,c){for(var u=0,l=0,d=o,f=0,p=0,h=0,m=1,y=1,b=1,g=0,v="",w=i,T=a,E=r,A=v;y;)switch(h=g,g=m_e()){case 40:if(108!=h&&58==n_e(A,d-1)){-1!=t_e(A+=e_e(E_e(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:A+=E_e(g);break;case 9:case 10:case 13:case 32:A+=A_e(h);break;case 92:A+=x_e(b_e()-1,7);continue;case 47:switch(y_e()){case 42:case 47:o_e(k_e(C_e(m_e(),b_e()),t,n),c);break;default:A+="/"}break;case 123*m:s[u++]=i_e(A)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==b&&(A=e_e(A,/\f/g,"")),p>0&&i_e(A)-d&&o_e(p>32?R_e(A+";",r,n,d-1):R_e(e_e(A," ","")+";",r,n,d-2),c);break;case 59:A+=";";default:if(o_e(E=S_e(A,t,n,u,l,i,s,v,w=[],T=[],d),a),123===g)if(0===l)P_e(A,t,E,E,w,a,d,s,T);else switch(99===f&&110===n_e(A,3)?100:f){case 100:case 108:case 109:case 115:P_e(e,E,E,r&&o_e(S_e(e,E,E,0,0,i,s,v,i,w=[],d),T),i,T,d,s,r?w:T);break;default:P_e(A,E,E,E,[""],T,0,s,T)}}u=l=p=0,m=b=1,v=A="",d=o;break;case 58:d=1+i_e(A),p=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==(d_e=l_e>0?n_e(f_e,--l_e):0,c_e--,10===d_e&&(c_e=1,s_e--),d_e))continue;switch(A+=JIe(g),g*m){case 38:b=l>0?1:(A+="\f",-1);break;case 44:s[u++]=(i_e(A)-1)*b,b=1;break;case 64:45===y_e()&&(A+=E_e(m_e())),f=y_e(),l=d=i_e(v=A+=I_e(b_e())),g++;break;case 45:45===h&&2==i_e(A)&&(m=0)}}return a}function S_e(e,t,n,r,i,a,o,s,c,u,l){for(var d=i-1,f=0===i?a:[""],p=a_e(f),h=0,m=0,y=0;h<r;++h)for(var b=0,g=r_e(e,d+1,d=ZIe(m=o[h])),v=e;b<p;++b)(v=$Ie(m>0?f[b]+" "+g:e_e(g,/&\f/g,f[b])))&&(c[y++]=v);return p_e(e,t,n,0===i?KIe:s,c,u,l)}function k_e(e,t,n){return p_e(e,t,n,qIe,JIe(d_e),r_e(e,2,-2),0)}function R_e(e,t,n,r){return p_e(e,t,n,XIe,r_e(e,0,r),r_e(e,r+1,-1),r)}function N_e(e,t){for(var n="",r=a_e(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function M_e(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case XIe:return e.return=e.return||e.value;case qIe:return"";case YIe:return e.return=e.value+"{"+N_e(e.children,r)+"}";case KIe:e.value=e.props.join(",")}return i_e(n=N_e(e.children,r))?e.return=e.value+"{"+n+"}":""}function D_e(e){var t=a_e(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function L_e(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var j_e=function(e,t,n){for(var r=0,i=0;r=i,i=y_e(),38===r&&12===i&&(t[n]=1),!v_e(i);)m_e();return g_e(e,l_e)},F_e=new WeakMap,B_e=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||F_e.get(n))&&!r){F_e.set(e,!0);for(var i=[],a=function(e,t){return T_e(function(e,t){var n=-1,r=44;do{switch(v_e(r)){case 0:38===r&&12===y_e()&&(t[n]=1),e[n]+=j_e(l_e-1,t,n);break;case 2:e[n]+=E_e(r);break;case 4:if(44===r){e[++n]=58===y_e()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=JIe(r)}}while(r=m_e());return e}(w_e(e),t))}(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var u=0;u<o.length;u++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[u]):o[u]+" "+a[s]}}},U_e=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function z_e(e,t){switch(function(e,t){return 45^n_e(e,0)?(((t<<2^n_e(e,0))<<2^n_e(e,1))<<2^n_e(e,2))<<2^n_e(e,3):0}(e,t)){case 5103:return GIe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return GIe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return GIe+e+VIe+e+WIe+e+e;case 6828:case 4268:return GIe+e+WIe+e+e;case 6165:return GIe+e+WIe+"flex-"+e+e;case 5187:return GIe+e+e_e(e,/(\w+).+(:[^]+)/,GIe+"box-$1$2"+WIe+"flex-$1$2")+e;case 5443:return GIe+e+WIe+"flex-item-"+e_e(e,/flex-|-self/,"")+e;case 4675:return GIe+e+WIe+"flex-line-pack"+e_e(e,/align-content|flex-|-self/,"")+e;case 5548:return GIe+e+WIe+e_e(e,"shrink","negative")+e;case 5292:return GIe+e+WIe+e_e(e,"basis","preferred-size")+e;case 6060:return GIe+"box-"+e_e(e,"-grow","")+GIe+e+WIe+e_e(e,"grow","positive")+e;case 4554:return GIe+e_e(e,/([^-])(transform)/g,"$1"+GIe+"$2")+e;case 6187:return e_e(e_e(e_e(e,/(zoom-|grab)/,GIe+"$1"),/(image-set)/,GIe+"$1"),e,"")+e;case 5495:case 3959:return e_e(e,/(image-set\([^]*)/,GIe+"$1$`$1");case 4968:return e_e(e_e(e,/(.+:)(flex-)?(.*)/,GIe+"box-pack:$3"+WIe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+GIe+e+e;case 4095:case 3583:case 4068:case 2532:return e_e(e,/(.+)-inline(.+)/,GIe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(i_e(e)-1-t>6)switch(n_e(e,t+1)){case 109:if(45!==n_e(e,t+4))break;case 102:return e_e(e,/(.+:)(.+)-([^]+)/,"$1"+GIe+"$2-$3$1"+VIe+(108==n_e(e,t+3)?"$3":"$2-$3"))+e;case 115:return~t_e(e,"stretch")?z_e(e_e(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==n_e(e,t+1))break;case 6444:switch(n_e(e,i_e(e)-3-(~t_e(e,"!important")&&10))){case 107:return e_e(e,":",":"+GIe)+e;case 101:return e_e(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+GIe+(45===n_e(e,14)?"inline-":"")+"box$3$1"+GIe+"$2$3$1"+WIe+"$2box$3")+e}break;case 5936:switch(n_e(e,t+11)){case 114:return GIe+e+WIe+e_e(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return GIe+e+WIe+e_e(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return GIe+e+WIe+e_e(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return GIe+e+WIe+e+e}return e}var H_e,W_e,V_e="undefined"!=typeof document,G_e=V_e?void 0:(H_e=function(){return L_e((function(){var e={};return function(t){return e[t]}}))},W_e=new WeakMap,function(e){if(W_e.has(e))return W_e.get(e);var t=H_e();return W_e.set(e,t),t}),q_e=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case XIe:e.return=z_e(e.value,e.length);break;case YIe:return N_e([h_e(e,{value:e_e(e.value,"@","@"+GIe)})],r);case KIe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return N_e([h_e(e,{props:[e_e(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return N_e([h_e(e,{props:[e_e(t,/:(plac\w+)/,":"+GIe+"input-$1")]}),h_e(e,{props:[e_e(t,/:(plac\w+)/,":-moz-$1")]}),h_e(e,{props:[e_e(t,/:(plac\w+)/,WIe+"input-$1")]})],r)}return""}))}}],K_e=function(e){var t=e.key;if(V_e&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||q_e,o={},s=[];V_e&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)})));var c,u=[B_e,U_e];if(V_e){var l,d=[M_e,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=D_e(u.concat(a,d));i=function(e,t,n,r){l=n,N_e(__e(e?e+"{"+t.styles+"}":t.styles),f),r&&(y.inserted[t.name]=!0)}}else{var p=[M_e],h=D_e(u.concat(a,p)),m=G_e(a)(t);i=function(e,t,n,r){var i=t.name,a=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=N_e(__e(e?e+"{"+t.styles+"}":t.styles),h)),m[n]}(e,t);return void 0===y.compat?(r&&(y.inserted[i]=!0),a):r?void(y.inserted[i]=a):a}}var y={key:t,sheet:new HIe({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return y.sheet.hydrate(s),y},X_e="undefined"!=typeof document,Y_e=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===X_e&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Z_e={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},J_e=/[A-Z]|^ms/g,Q_e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$_e=function(e){return 45===e.charCodeAt(1)},ePe=function(e){return null!=e&&"boolean"!=typeof e},tPe=L_e((function(e){return $_e(e)?e:e.replace(J_e,"-$&").toLowerCase()})),nPe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Q_e,(function(e,t,n){return iPe={name:t,styles:n,next:iPe},t}))}return 1===Z_e[e]||$_e(e)||"number"!=typeof t||0===t?t:t+"px"};function rPe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return iPe={name:n.name,styles:n.styles,next:iPe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)iPe={name:r.name,styles:r.styles,next:iPe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=rPe(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=a+"{"+t[o]+"}":ePe(o)&&(r+=tPe(a)+":"+nPe(a,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=rPe(e,t,o);switch(a){case"animation":case"animationName":r+=tPe(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var c=0;c<o.length;c++)ePe(o[c])&&(r+=tPe(a)+":"+nPe(a,o[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=iPe,a=n(e);return iPe=i,rPe(e,t,a)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var iPe,aPe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,oPe="undefined"!=typeof document,sPe=!!aV.useInsertionEffect&&aV.useInsertionEffect,cPe=oPe&&sPe||function(e){return e()},uPe="undefined"!=typeof document,lPe={}.hasOwnProperty,dPe=aV.createContext("undefined"!=typeof HTMLElement?K_e({key:"css"}):null);dPe.Provider;var fPe=function(e){return aV.forwardRef((function(t,n){var r=aV.useContext(dPe);return e(t,r,n)}))};uPe||(fPe=function(e){return function(t){var n=aV.useContext(dPe);return null===n?(n=K_e({key:"css"}),aV.createElement(dPe.Provider,{value:n},e(t,n))):e(t,n)}});var pPe,hPe=aV.createContext({}),mPe="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yPe=function(e,t){var n={};for(var r in t)lPe.call(t,r)&&(n[r]=t[r]);return n[mPe]=e,n},bPe=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Y_e(t,n,r);var i=cPe((function(){return function(e,t,n){Y_e(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",a=t;do{var o=e.insert(t===a?"."+r:"",a,e.sheet,!0);X_e||void 0===o||(i+=o),a=a.next}while(void 0!==a);if(!X_e&&0!==i.length)return i}}(t,n,r)}));if(!uPe&&void 0!==i){for(var a,o=n.name,s=n.next;void 0!==s;)o+=" "+s.name,s=s.next;return aV.createElement("style",((a={})["data-emotion"]=t.key+" "+o,a.dangerouslySetInnerHTML={__html:i},a.nonce=t.sheet.nonce,a))}return null},gPe=fPe((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[mPe],a=[r],o="";"string"==typeof e.className?o=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";iPe=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=rPe(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=rPe(n,t,e[o]),r&&(i+=a[o]);aPe.lastIndex=0;for(var s,c="";null!==(s=aPe.exec(i));)c+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+c;return{name:u,styles:i,next:iPe}}(a,void 0,aV.useContext(hPe));o+=t.key+"-"+s.name;var c={};for(var u in e)!lPe.call(e,u)||"css"===u||u===mPe||(c[u]=e[u]);return c.ref=n,c.className=o,aV.createElement(aV.Fragment,null,aV.createElement(bPe,{cache:t,serialized:s,isStringTag:"string"==typeof i}),aV.createElement(i,c))})),vPe=gPe;LIe(UIe()),LIe(BIe()),function(e){e.CONNECT="Connect",e.WALLET="Wallet",e.ON_RAMP="OnRamp",e.SWAP="Swap",e.BRIDGE="Bridge",e.SALE="PrimarySale"}(pPe||(pPe={}));const{AnalyticsProvider:wPe,useAnalytics:TPe}=function({appName:e,writeKey:t}){const n=aV.createContext(void 0);return{AnalyticsProvider:function({children:r,loaderOverride:i=xIe,log:a=console.log}){const[o,s]=aV.useState(t),c=aV.useMemo((()=>o?i.load({writeKey:o}):function(e,t){const n=e.load({writeKey:"",cdnSettings:{integrations:{}}},{integrations:{All:!1}});return["identify","group","alias","page","track"].forEach((e=>{n.on(e,((...n)=>t(MIe({method:e},n))))})),n}(i,a)),[i,o,a]),u=aV.useCallback((({userJourney:t,screen:n,action:r,extras:i={}})=>{const a=[e+zIe(t)+zIe(n)+zIe(r)].join("");return c.page(a,i)}),[c]),l=aV.useCallback((t=>{var n=t,{userJourney:r,screen:i,action:a,extras:o={}}=n,s=((e,t)=>{var n={};for(var r in e)kIe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&PIe)for(var r of PIe(e))t.indexOf(r)<0&&RIe.call(e,r)&&(n[r]=e[r]);return n})(n,["userJourney","screen","action","extras"]);let u="";"control"in s&&"controlType"in s&&(u=zIe(s.control)+zIe(s.controlType));const l=[e+zIe(r)+zIe(i),u+zIe(a)].join("_");return c.track(l,MIe({},o))}),[c]),d=aV.useCallback((()=>{return e=this,null,t=function*(){const e=("undefined"==typeof document?"":document.cookie).split("; ").find((e=>e.startsWith("ajs_user_id=")));if(e){const t=e.split("=")[1];return c.identify(t)}return Promise.reject(new Error("No user ID found in cookie"))},new Promise(((n,r)=>{var i=e=>{try{o(t.next(e))}catch(e){r(e)}},a=e=>{try{o(t.throw(e))}catch(e){r(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);o((t=t.apply(e,null)).next())}));var e,t}),[c]),f=aV.useMemo((()=>({page:u,track:l,identifyFromCookie:d,identify:c.identify,group:c.group,alias:c.alias,updateWriteKey:s})),[c,u,l,d]);return function(e,t,n){return lPe.call(t,"css")?mV.jsx(vPe,yPe(e,t),n):mV.jsx(e,t,n)}(n.Provider,{value:f,children:r})},useAnalytics:function(){const e=aV.useContext(n);if(!e)throw new Error("useAnalytics: Store not found");return e}}}({writeKey:"",appName:"checkout"});function EPe({children:e,checkout:t}){const{updateWriteKey:n}=TPe(),r=aV.useCallback((async()=>{try{return await(t?.config?.remote.getConfig("telemetry"))}catch(e){console.error("unable to fetch telemetry config: ",e)}}),[t]);return aV.useEffect((()=>{(async()=>{const e=await r();e&&n(e.segmentPublishableKey)})()}),[r]),Eq(Tq,{children:e})}function APe({children:e,checkout:t}){return Eq(wPe,{children:Eq(EPe,{checkout:t,children:e})})}function xPe({header:e,footer:t,children:n,heroContent:r,testId:i,floatHeader:a=!1,footerBackgroundColor:o,bodyStyleOverrides:s}){return Eq(P3,{sx:pAe,children:Aq(P3,{testId:i,sx:hAe,children:[e&&Eq(P3,{sx:mAe(a),children:e}),Aq(P3,{sx:bAe,children:[r&&Eq(P3,{sx:gAe,children:r}),n&&Eq(P3,{sx:{...vAe,...s},children:n})]}),t&&Eq(P3,{sx:yAe(o),children:t})]})})}function OPe({loadingText:e,textDuration:t}){const n=Array.isArray(e)?e:[e],r=t||2500;return Eq(xPe,{children:Eq(Nue,{visible:!0,children:Eq(Nue.Content,{children:Eq(Nue.Content.LoopingText,{text:[...n],textDuration:r})})})})}function CPe(e){switch(e){case UH.ETHEREUM:return zH.ETHEREUM;case UH.IMTBL_ZKEVM_TESTNET:return zH.IMTBL_ZKEVM_TESTNET;case UH.IMTBL_ZKEVM_MAINNET:return zH.IMTBL_ZKEVM_MAINNET;case UH.IMTBL_ZKEVM_DEVNET:return zH.IMTBL_ZKEVM_DEVNET;case UH.SEPOLIA:return zH.SEPOLIA;default:return""}}function IPe(e){switch(e){case UH.ETHEREUM:return HH.ETHEREUM;case UH.IMTBL_ZKEVM_TESTNET:return HH.IMTBL_ZKEVM_TESTNET;case UH.IMTBL_ZKEVM_MAINNET:return HH.IMTBL_ZKEVM_MAINNET;case UH.IMTBL_ZKEVM_DEVNET:return HH.IMTBL_ZKEVM_DEVNET;case UH.SEPOLIA:return HH.SEPOLIA;default:return""}}function _Pe(e){switch(e){case HH.ETHEREUM:return UH.ETHEREUM;case HH.IMTBL_ZKEVM_TESTNET:return UH.IMTBL_ZKEVM_TESTNET;case HH.IMTBL_ZKEVM_MAINNET:return UH.IMTBL_ZKEVM_MAINNET;case HH.IMTBL_ZKEVM_DEVNET:return UH.IMTBL_ZKEVM_DEVNET;case HH.SEPOLIA:return UH.SEPOLIA;default:return 0}}var PPe;!function(e){e.GLOBAL="global",e.DRAWER="drawer",e.LOADER="loader"}(PPe||(PPe={}));const SPe=aV.createContext({loader:null,isLoading:!1,showLoader:()=>{},hideLoader:()=>{},handovers:{},addHandover:()=>{},closeHandover:()=>{}}),kPe=({id:e}={})=>{const t=aV.useContext(SPe);if(!t)throw new Error("useHandover must be used within a HandoverProvider");const{handovers:n,closeHandover:r,addHandover:i,loader:a,isLoading:o,showLoader:s,hideLoader:c}=t;return{loader:a,isLoading:o,showLoader:s,hideLoader:c,handover:aV.useMemo((()=>n[e??"global"]),[e,n]),getHandover:aV.useCallback((e=>n[e]),[n]),addHandover:i,closeHandover:r}};function RPe({url:e,inputValue:t=0}){const n="State",r={src:e,autoplay:!0,layout:new iue.Layout({fit:iue.Fit.Contain}),stateMachines:n},{rive:i,RiveComponent:a}=iue.useRive(r),o=iue.useStateMachineInput(i,n,"mode");return aV.useEffect((()=>{i&&o&&(o.value=t)}),[i,o,t]),Eq(P3,{sx:{h:"240px",flexShrink:0},rc:Eq(a,{})})}const NPe={hidden:{y:8,opacity:0},show:e=>({height:"100%",y:0,opacity:1,transition:{delay:.1*e,duration:.2,ease:"easeOut"}}),exit:{y:-8,opacity:0}};function MPe({id:e,children:t}){const{handover:n,loader:r}=kPe({id:e});let i=[];return n?.children&&(i=oV.isValidElement(n.children)&&n.children.type===aV.Fragment?n.children.props.children:n.children),Aq(Tq,{children:[t,r&&Eq(Nue,{visible:!0,children:Eq(Nue.Content,{children:Eq(Nue.Content.LoopingText,{text:[...r.text],textDuration:r.duration})})}),n&&(i||n.animationUrl)&&Aq(N3,{sx:{backgroundColor:"base.color.neutral.1000",position:"absolute",zIndex:"1",textAlign:"center",flex:1,top:"0px",bottom:"0px",left:"0px",right:"0px"},children:[n?.animationUrl&&n?.animationUrl.length>0&&Eq(RPe,{url:n.animationUrl,inputValue:n.inputValue},n.animationUrl),Eq(N3,{sx:{height:"100%",px:"base.spacing.x6",py:"base.spacing.x10",textAlign:"center",flex:1},gap:"base.spacing.x4",children:Eq(F0,{children:oV.Children.map(i,((e,t)=>Eq(k0.div,{variants:NPe,custom:t,initial:"hidden",animate:"show",exit:"exit",children:e},e?.key??`Key${t}`)))})})]})]})}function DPe({children:e}){const[t,n]=aV.useState({}),[r,i]=aV.useState({}),[a,o]=aV.useState({}),[s,c]=aV.useState(null),u=aV.useMemo((()=>null!==s),[s]),l=aV.useCallback((()=>{c(null)}),[c]),d=aV.useCallback(((e=PPe.GLOBAL)=>{n((t=>{const n={...t},r=n[e];return delete n[e],r?.onClose&&r.onClose(),n}))}),[n]),f=aV.useCallback(((e,s=!1)=>{if(a[e])return;const c={...r},u=c[e]??[];if(u.length>0){const t=u.shift();if(t){n((n=>({...n,[e]:t})));const r=t.duration??0,i=Math.max(r,2e3);o((t=>({...t,[e]:!0}))),setTimeout((()=>{o((t=>({...t,[e]:!1})))}),i)}else delete c[e],s&&d(e),i(c)}else{const n=t[e];n?.duration&&n.duration>0&&d(e)}}),[r,a,t,d]),p=(e,t=PPe.GLOBAL)=>{i((n=>{const r={...n},i=[...r[t]??[]];return i.push(e),r[t]=i,r}))};aV.useEffect((()=>{Object.keys(r).forEach((e=>{f(e)}))}),[r,a,f]);const h=aV.useMemo((()=>({loader:s,isLoading:u,hideLoader:l,showLoader:e=>{const t=Array.isArray(e.text)?e.text:[e.text];c({...e,text:[...t]})},handovers:t,addHandover:p,closeHandover:d})),[s,u,l,t,p,d]);return Eq(SPe.Provider,{value:h,children:Eq(MPe,{id:"global",children:e})})}const LPe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class jPe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||LPe,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new jPe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new jPe(this.logger,e)}}var FPe=new jPe;let BPe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==t)):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){[].concat(this.observers[e]).forEach((e=>{e(...n)}))}if(this.observers["*"]){[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}};function UPe(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function zPe(e){return null==e?"":""+e}function HPe(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}const a="string"!=typeof t?[].concat(t):t.split(".");for(;a.length>1;){if(i())return{};const t=r(a.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return i()?{}:{obj:e,k:r(a.shift())}}function WPe(e,t,n){const{obj:r,k:i}=HPe(e,t,Object);r[i]=n}function VPe(e,t){const{obj:n,k:r}=HPe(e,t);if(n)return n[r]}function GPe(e,t,n){for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):GPe(e[r],t[r],n):e[r]=t[r]);return e}function qPe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var KPe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function XPe(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>KPe[e])):e}const YPe=[" ",",","?","!",";"];function ZPe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let e=0;e<r.length;++e){if(!i)return;if("string"==typeof i[r[e]]&&e+1<r.length)return;if(void 0===i[r[e]]){let a=2,o=r.slice(e,e+a).join(n),s=i[o];for(;void 0===s&&r.length>e+a;)a++,o=r.slice(e,e+a).join(n),s=i[o];if(void 0===s)return;if(null===s)return null;if(t.endsWith(o)){if("string"==typeof s)return s;if(o&&"string"==typeof s[o])return s[o]}const c=r.slice(e+a).join(n);return c?ZPe(s,c,n):void 0}i=i[r[e]]}return i}function JPe(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class QPe extends BPe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."));const s=VPe(this.data,o);return s||!a||"string"!=typeof n?s:ZPe(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),r=t,t=o[1]),this.addNamespaces(t),WPe(this.data,o,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=VPe(this.data,o)||{};r?GPe(s,n,i):s={...s,...n},WPe(this.data,o,s),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var $Pe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))})),t}};const eSe={};class tSe extends BPe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=FPe.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=YPe.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let a=!i.test(e);if(!a){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a}(e,n,r));if(a&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),s=o[o.length-1],c=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:a}const l=this.resolve(e,t);let d=l&&l.res;const f=l&&l.usedKey||a,p=l&&l.exactUsedKey||a,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof m||"[object Array]"!==h)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(l.res=e,l.usedParams=this.getUsedParamsDetails(t),l):e}if(i){const e="[object Array]"===h,n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const a=`${r}${i}${e}`;n[e]=this.translate(a,{...t,joinArrays:!1,ns:o}),n[e]===a&&(n[e]=d[e])}d=n}}else if(y&&"string"==typeof m&&"[object Array]"===h)d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,o=!1;const u=void 0!==t.count&&"string"!=typeof t.count,f=tSe.hasDefaultValue(t),p=u?this.pluralResolver.getSuffix(c,t.count,t):"",h=t.ordinal&&u?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",m=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=m),this.isValidLookup(d)||(o=!0,d=a);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:d,b=f&&m!==d&&this.options.updateMissing;if(o||r||b){if(this.logger.log(b?"updateKey":"missingKey",c,s,a,b?m:d),i){const e=this.resolve(a,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=f&&r!==d?r:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,b,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],a+n,t[`defaultValue${n}`]||m)}))})):r(e,a,m))}d=this.extendTranslation(d,e,t,l,n),o&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${a}`),(o||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(l.res=d,l.usedParams=this.getUsedParamsDetails(t),l):d}extendTranslation(e,t,n,r,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(o){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),o){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return i&&i[0]===r[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):a.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s="string"==typeof o?[o]:o;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=$Pe.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,o),c=s.key;n=c;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const l=void 0!==o.count&&"string"!=typeof o.count,d=l&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);u.forEach((e=>{this.isValidLookup(t)||(a=e,!eSe[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(eSe[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;i=n;const a=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,c,n,e,o);else{let e;l&&(e=this.pluralResolver.getSuffix(n,o.count,o));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(a.push(c+e),o.ordinal&&0===e.indexOf(r)&&a.push(c+e.replace(r,this.options.pluralSeparator)),d&&a.push(c+t)),f){const n=`${c}${this.options.contextSeparator}${o.context}`;a.push(n),l&&(a.push(n+e),o.ordinal&&0===e.indexOf(r)&&a.push(n+e.replace(r,this.options.pluralSeparator)),d&&a.push(n+t))}}let s;for(;s=a.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,o))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function nSe(e){return e.charAt(0).toUpperCase()+e.slice(1)}class rSe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=FPe.create("languageUtils")}getScriptPartFromCode(e){if(!(e=JPe(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=JPe(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nSe(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nSe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=nSe(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))})),r}}let iSe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],aSe={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const oSe=["v1","v2","v3"],sSe=["v4"],cSe={zero:0,one:1,two:2,few:3,many:4,other:5};class uSe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=FPe.create("pluralResolver"),this.options.compatibilityJSON&&!sSe.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return iSe.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:aSe[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(JPe(e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>cSe[e]-cSe[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!oSe.includes(this.options.compatibilityJSON)}}function lSe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(e,t,n){const r=VPe(e,n);return void 0!==r?r:VPe(t,n)}(e,t,n);return!a&&i&&"string"==typeof n&&(a=ZPe(e,n,r),void 0===a&&(a=ZPe(t,n,r))),a}class dSe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=FPe.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:XPe,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?qPe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?qPe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?qPe(t.nestingPrefix):t.nestingPrefixEscaped||qPe("$t("),this.nestingSuffix=t.nestingSuffix?qPe(t.nestingSuffix):t.nestingSuffixEscaped||qPe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let i,a,o;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=lSe(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(lSe(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(o=0;i=t.regex.exec(e);){const n=i[1].trim();if(a=u(n),void 0===a)if("function"==typeof l){const t=l(e,i,r);a="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else"string"==typeof a||this.useRawValueToEscape||(a=zPe(a));const s=t.safeValue(a);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function o(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let a=`{${r[1]}`;e=r[0],a=this.interpolate(a,i);const o=a.match(/'/g),s=a.match(/"/g);(o&&o.length%2==0&&!s||s.length%2!=0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...a},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,c=!0}if(r=t(o.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=zPe(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function fSe(e){const t={};return function(n,r,i){const a=r+JSON.stringify(i);let o=t[a];return o||(o=e(JPe(r),i),t[a]=o),o(n)}}class pSe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=FPe.create("formatter"),this.options=e,this.formats={number:fSe(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:fSe(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:fSe(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:fSe(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:fSe(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=fSe(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:i,formatOptions:a}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(!e)return;const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=i),"false"===i&&(n[t.trim()]=!1),"true"===i&&(n[t.trim()]=!0),isNaN(i)||(n[t.trim()]=parseInt(i,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[i]){let t=e;try{const o=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class hSe extends BPe{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=FPe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},a={},o={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===a[o]&&(a[o]=!0):(this.state[o]=1,r=!1,void 0===a[o]&&(a[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(o[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],a=r[1];t&&this.emit("failedLoading",i,a,t),n&&this.store.addResourceBundle(i,a,n),this.state[e]=t?-1:2;const o={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:a}=HPe(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[i],a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{o[e]||(o[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===o[e][t]&&(o[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});this.readingCalls++;const o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,a)}),i):a(o,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,o);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>o(null,e))).catch(o):o(null,n)}catch(e){o(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)}))}saveMissing(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,s):c(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>o(null,e))).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function mSe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ySe(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function bSe(){}class gSe extends BPe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=ySe(e),this.services={},this.logger=FPe,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=mSe();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...ySe(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?FPe.init(i(this.modules.logger),this.options):FPe.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=pSe);const n=new rSe(this.options);this.store=new QPe(this.options.resources,this.options);const a=this.services;a.logger=FPe,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new uSe(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new dSe(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new hSe(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new tSe(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=bSe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const a=UPe(),o=()=>{const e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?o():setTimeout(o,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bSe;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=UPe();return e||(e=this.languages),t||(t=this.options.ns),n||(n=bSe),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&$Pe.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=UPe();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,a)=>{a?(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{a(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let a;if("object"!=typeof t){for(var o=arguments.length,s=new Array(o>2?o-2:0),c=2;c<o;c++)s[c-2]=arguments[c];a=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else a={...t};a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix=a.keyPrefix||n||i.keyPrefix;const u=r.options.keySeparator||".";let l;return l=a.keyPrefix&&Array.isArray(e)?e.map((e=>`${a.keyPrefix}${u}${e}`)):a.keyPrefix?`${a.keyPrefix}${u}${e}`:e,r.t(l,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const a=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,a);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(n,e)||r&&!a(i,e)))}loadNamespaces(e,t){const n=UPe();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=UPe();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0));return i.length?(this.options.preload=r.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new rSe(mSe());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new gSe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bSe;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new gSe(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new QPe(this.store.data,r),i.services.resourceStore=i.store),i.translator=new tSe(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vSe=gSe.createInstance();function wSe(e){return wSe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wSe(e)}function TSe(e){var t=function(e,t){if("object"!=wSe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wSe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wSe(t)?t:String(t)}function ESe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TSe(r.key),r)}}vSe.createInstance=gSe.createInstance,vSe.createInstance,vSe.dir,vSe.init,vSe.loadResources,vSe.reloadResources,vSe.use,vSe.changeLanguage,vSe.getFixedT,vSe.t,vSe.exists,vSe.setDefaultNamespace,vSe.hasLoadedNamespace,vSe.loadNamespaces,vSe.loadLanguages;var ASe=[],xSe=ASe.forEach,OSe=ASe.slice;var CSe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ISe=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),a="".concat(e,"=").concat(i);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!CSe.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(r.domain)}if(r.path){if(!CSe.test(r.path))throw new TypeError("option path is invalid");a+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}(e,encodeURIComponent(t),i)},_Se=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},PSe={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=_Se(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&ISe(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},SSe={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var a=r[i].indexOf("=");if(a>0)r[i].substring(0,a)===e.lookupQuerystring&&(t=r[i].substring(a+1))}}return t}},kSe=null,RSe=function(){if(null!==kSe)return kSe;try{kSe="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){kSe=!1}return kSe},NSe={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&RSe()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&RSe()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},MSe=null,DSe=function(){if(null!==MSe)return MSe;try{MSe="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){MSe=!1}return MSe},LSe={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&DSe()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&DSe()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},jSe={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},FSe={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},BSe={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},USe={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var zSe=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return xSe.call(OSe.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(e){return e.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(PSe),this.addDetector(SSe),this.addDetector(NSe),this.addDetector(LSe),this.addDetector(jSe),this.addDetector(FSe),this.addDetector(BSe),this.addDetector(USe)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),n=n.map((function(e){return t.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}],n&&ESe(t.prototype,n),r&&ESe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function HSe(){return HSe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HSe.apply(this,arguments)}zSe.type="languageDetector";var WSe=lt({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),VSe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function GSe(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(WSe[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var i=new RegExp(VSe),a=null;null!==(a=i.exec(e));)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var qSe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,KSe=/^\s*$/,XSe=Object.create(null);function YSe(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(YSe,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var ZSe={parse:function(e,t){t||(t={}),t.components||(t.components=XSe);var n,r=[],i=[],a=-1,o=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(qSe,(function(s,c){if(o){if(s!=="</"+n.name+">")return;o=!1}var u,l="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),f=c+s.length,p=e.charAt(f);if(d){var h=GSe(s);return a<0?(r.push(h),r):((u=i[a]).children.push(h),r)}if(l&&(a++,"tag"===(n=GSe(s)).type&&t.components[n.name]&&(n.type="component",o=!0),n.voidElement||o||!p||"<"===p||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===a&&r.push(n),(u=i[a-1])&&u.children.push(n),i[a]=n),(!l||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=-1===a?r:i[a]),!o&&"<"!==p&&p)){u=-1===a?r:i[a].children;var m=e.indexOf("<",f),y=e.slice(f,-1===m?void 0:m);KSe.test(y)&&(y=" "),(m>-1&&a+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+YSe("",t)}),"")}};function JSe(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const QSe={};function $Se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&QSe[t[0]]||("string"==typeof t[0]&&(QSe[t[0]]=new Date),JSe(...t))}const eke=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function tke(e,t,n){e.loadNamespaces(t,eke(e,n))}function nke(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,eke(e,r))}const rke=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ike={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ake=e=>ike[e];let oke,ske={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(rke,ake)};function cke(){return ske}function uke(){return oke}function lke(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function dke(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?fke(t):t}function fke(e){return Array.isArray(e)?e:[e]}function pke(e,t){if(!e)return"";let n="";const r=fke(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach(((e,r)=>{if("string"==typeof e)n+=`${e}`;else if(aV.isValidElement(e)){const a=Object.keys(e.props).length,o=i.indexOf(e.type)>-1,s=e.props.children;if(!s&&o&&0===a)n+=`<${e.type}/>`;else if(s||o&&0===a)if(e.props.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(o&&1===a&&"string"==typeof s)n+=`<${e.type}>${s}</${e.type}>`;else{const e=pke(s,t);n+=`<${r}>${e}</${r}>`}else n+=`<${r}></${r}>`}else if(null===e)JSe("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"==typeof e){const{format:t,...r}=e,i=Object.keys(r);if(1===i.length){const e=t?`${i[0]}, ${t}`:i[0];n+=`{{${e}}}`}else JSe("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else JSe("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function hke(e,t,n,r,i,a){if(""===t)return[];const o=r.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(o.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!s&&!a)return[t];const c={};!function e(t){fke(t).forEach((t=>{"string"!=typeof t&&(lke(t)?e(dke(t)):"object"!=typeof t||aV.isValidElement(t)||Object.assign(c,t))}))}(e);const u=ZSe.parse(`<0>${t}</0>`),l={...c,...i};function d(e,t,n){const r=dke(e),i=p(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((e=>aV.isValidElement(e)))}(r)&&0===i.length||e.props&&e.props.i18nIsDynamicList?r:i}function f(e,t,n,r,i){e.dummy?(e.children=t,n.push(aV.cloneElement(e,{key:r},i?void 0:t))):n.push(...aV.Children.map([e],(e=>{const n={...e.props};return delete n.i18nIsDynamicList,oV.createElement(e.type,HSe({},n,{key:r,ref:e.ref},i?{}:{children:t}))})))}function p(t,i,c){const u=fke(t);return fke(i).reduce(((t,i,h)=>{const m=i.children&&i.children[0]&&i.children[0].content&&n.services.interpolator.interpolate(i.children[0].content,l,n.language);if("tag"===i.type){let a=u[parseInt(i.name,10)];1!==c.length||a||(a=c[0][i.name]),a||(a={});const y=0!==Object.keys(i.attrs).length?function(e,t){const n={...t};return n.props=Object.assign(e.props,t.props),n}({props:i.attrs},a):a,b=aV.isValidElement(y),g=b&&lke(i,!0)&&!i.voidElement,v=s&&"object"==typeof y&&y.dummy&&!b,w="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof y){const e=n.services.interpolator.interpolate(y,l,n.language);t.push(e)}else if(lke(y)||g){f(y,d(y,i,c),t,h)}else if(v){f(y,p(u,i.children,c),t,h)}else if(Number.isNaN(parseFloat(i.name)))if(w){f(y,d(y,i,c),t,h,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&o.indexOf(i.name)>-1)if(i.voidElement)t.push(aV.createElement(i.name,{key:`${i.name}-${h}`}));else{const e=p(u,i.children,c);t.push(aV.createElement(i.name,{key:`${i.name}-${h}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=p(u,i.children,c);t.push(`<${i.name}>${e}</${i.name}>`)}else if("object"!=typeof y||b)f(y,m,t,h,1!==i.children.length||!m);else{const e=i.children[0]?m:null;e&&t.push(e)}}else if("text"===i.type){const e=r.transWrapTextNodes,o=a?r.unescape(n.services.interpolator.interpolate(i.content,l,n.language)):n.services.interpolator.interpolate(i.content,l,n.language);e?t.push(aV.createElement(e,{key:`${i.name}-${h}`},o)):t.push(o)}return t}),[])}return dke(p([{dummy:!0,children:e||[]}],u,fke(e||[]))[0])}function mke(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const m=d||uke();if(!m)return $Se("You will need to pass in an i18next instance by using i18nextReactModule"),t;const y=f||m.t.bind(m)||(e=>e);a&&(o.context=a);const b={...cke(),...m.options&&m.options.react};let g=l||y.ns||m.options&&m.options.defaultNS;g="string"==typeof g?[g]:g||["translation"];const v=pke(t,b),w=c||v||b.transEmptyNodeValue||i,{hashTransKey:T}=b,E=i||(T?T(v||w):v||w);m.options&&m.options.interpolation&&m.options.interpolation.defaultVariables&&(s=s&&Object.keys(s).length>0?{...s,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables});const A=s?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},x={...o,count:n,...s,...A,defaultValue:w,ns:g},O=E?y(E,x):w;u&&Object.keys(u).forEach((e=>{const t=u[e];"function"==typeof t.type||!t.props||!t.props.children||O.indexOf(`${e}/>`)<0&&O.indexOf(`${e} />`)<0||(u[e]=oV.createElement((function(){return oV.createElement(oV.Fragment,null,t)}),null))}));const C=hke(u||t,O,m,b,x,p),I=void 0!==r?r:b.defaultTransParent;return I?aV.createElement(I,h,C):C}const yke={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ske={...ske,...e}}(e.options.react),function(e){oke=e}(e)}},bke=aV.createContext();class gke{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function vke(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const{i18n:m,defaultNS:y}=aV.useContext(bke)||{},b=d||m||uke(),g=f||b&&b.t.bind(b);return mke({children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o,values:s,defaults:c,components:u,ns:l||g&&g.ns||y||b&&b.options&&b.options.defaultNS,i18n:b,t:f,shouldUnescape:p,...h})}const wke=(e,t)=>{const n=aV.useRef();return aV.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current};function Tke(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=aV.useContext(bke)||{},a=n||r||uke();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new gke),!a){$Se("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react&&void 0!==a.options.react.wait&&$Se("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...cke(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o;let u=e||i||a.options&&a.options.defaultNS;u="string"==typeof u?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);const l=(a.isInitialized||a.initializedStoreOnce)&&u.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],i=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const o=(e,n)=>{const r=t.services.backendConnector.state[`${e}|${n}`];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(r,e)||i&&!o(a,e)))}(e,t,n):($Se("i18n.languages were undefined or empty",t.languages),!0)}(e,a,o)));function d(){return a.getFixedT(t.lng||null,"fallback"===o.nsMode?u:u[0],c)}const[f,p]=aV.useState(d);let h=u.join();t.lng&&(h=`${t.lng}${h}`);const m=wke(h),y=aV.useRef(!0);aV.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=o;function r(){y.current&&p(d)}return y.current=!0,l||s||(t.lng?nke(a,t.lng,u,(()=>{y.current&&p(d)})):tke(a,u,(()=>{y.current&&p(d)}))),l&&m&&m!==h&&y.current&&p(d),e&&a&&a.on(e,r),n&&a&&a.store.on(n,r),()=>{y.current=!1,e&&a&&e.split(" ").forEach((e=>a.off(e,r))),n&&a&&n.split(" ").forEach((e=>a.store.off(e,r)))}}),[a,h]);const b=aV.useRef(!0);aV.useEffect((()=>{y.current&&!b.current&&p(d),b.current=!1}),[a,c]);const g=[f,a,l];if(g.t=f,g.i18n=a,g.ready=l,l)return g;if(!l&&!s)return g;throw new Promise((e=>{t.lng?nke(a,t.lng,u,(()=>e())):tke(a,u,(()=>e()))}))}const Eke={en:{translation:{views:{CONNECT_WALLET:{body:{heading:"Connect a wallet",content:"You'll need to connect or create a digital wallet to buy, sell, trade and store your tokens and collectibles."},walletSelection:{heading:"Choose a wallet"},nonPassportDrawer:{heading:"Non-Passport users will need IMX for gas.",body1:"We recommend using <layerswapLink>Layerswap</layerswapLink> to bridge funds onto Immutable zkEVM, with refuel switched on so you receive some IMX.",body2:"Alternatively, pay and play easily with a gas free Immutable Passport.",buttonText:"Proceed anyway"}},CONNECT_SUCCESS:{status:"Connection secure",action:"Continue"},READY_TO_CONNECT:{header:{title:"Connect"},metamask:{body:{heading:"Check for the pop-up from MetaMask",content:"Follow the prompts in the MetaMask popup to connect"},footer:{buttonText1:"Ready to connect",buttonText2:"Try again"}},passport:{body:{heading:"Connect with Immutable Passport",content:"Follow the prompts to connect with Immutable Passport"},footer:{buttonText1:"Continue",buttonText2:"Try again"}}},SWITCH_NETWORK:{eth:{heading:"You'll need to switch to the {{networkName}} network",body:"You'll be prompted to switch networks in your wallet.",button:{text:"Ready to Switch",retryText:"Try Again"}},zkEVM:{heading:"You’ll be asked to switch to the Immutable zkEVM network",body:"Check for the pop-up from MetaMask and 'Approve' to switch. If this is the first time, MetaMask will also ask you to add the network.",bodyWalletConnect:"Check for the pop-up from your wallet to switch. If this is the first time, your wallet will also ask you to add the network.",button:{text:"Ready to Switch",retryText:"Try Again"}}},ERROR_VIEW:{heading:"Something's gone wrong",body:["You can try again or contact","support","for help."],actionText:"Try again"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"Swapping is not available in your region"},body:{swap:"Please refer to <quickswapLink>Quickswap’s</quickswapLink> website for further information."}},LOADING_VIEW:{text:"Loading"},WALLET_BALANCES:{header:{title:"Wallet"},networkStatus:{heading:"Network"},totalTokenBalance:{heading:"Tokens",totalHeading:"Value"},tokenBalancesList:{noTokensFound:"No tokens found"},addCoins:"Add tokens"},SETTINGS:{header:{title:"Settings"},disconnectButton:{label:"Disconnect Wallet"},walletAddress:{label:"Wallet Address"},transferAssetsL1Warning:{heading:"Do not send assets to Passport on Ethereum",body:"Passport does not yet exist on Ethereum, so your funds will get lost there. Only transfer on Immutable zkEVM or Immutable X. "}},COIN_INFO:{metamask:{heading:"Tokens and collectibles are native to networks",body:"You can switch networks to add tokens or move them from one network to another"},passport:{heading:"Tokens and collectibles are native to networks",body1:"This network is called Immutable zkEVM. If you have other tokens in your Passport and can’t see them here, they might be on another network. ",body2:" for more info.",linkText:"Visit our FAQs"}},SWAP:{header:{title:"Swap tokens"},content:{title:"What would you like to swap?",fiatPricePrefix:"≈ USD",availableBalancePrefix:"Available"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"What are you swapping from?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"What are you swapping to?"},buttonText:"Swap",conversionRate:"1 {{fromSymbol}} ≈ {{rate}} {{toSymbol}}, inclusive of {{fee}}% fee"},fees:{title:"Fees total"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noFromTokenSelected:"Select a token to swap",noToTokenSelected:"Select a token to receive"},success:{text:"Success",actionText:"Continue"},failed:{text:"Transaction rejected",actionText:"Try again"},rejected:{text:"Price surge",actionText:"Review & try again"},IN_PROGRESS:{loading:{text:"Swap in progress"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"Now you'll just need to confirm the transaction",body:"Follow the prompts in your wallet."},footer:{buttonText:"Okay",retryText:"Try again"}},approveSpending:{content:{metamask:{heading:"You'll be asked to set a spending cap for this transaction",body:"Input at least {{amount}} for this transaction and future transactions, then follow the prompts."},passport:{heading:"You'll be asked to approve a spending cap for this transaction",body:"Follow the prompts in your wallet to approve the spending cap."}},footer:{buttonText:"Got it",retryText:"Try again"},loading:{text:"Approving spending cap"}}},ONRAMP:{header:{title:"Add tokens"},initialLoadingText:"Taking you to Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak is processing your order"}},IN_PROGRESS:{content:{heading:"Order in progress",body1:"You’ll receive an email from Transak when complete. This can take up to 3 mins.",body2:"You can close this window, the transaction will be reflected in your wallet once complete."}},SUCCESS:{text:"Tokens are on the way",actionText:"Done"},FAIL:{text:"Transaction failed",actionText:"Try again"}},TOP_UP_VIEW:{header:{title:"How would you like to add tokens?"},topUpOptions:{onramp:{heading:"Buy tokens"},debit:{heading:"Buy with Debit Card",caption:"The recommended way to buy tokens",subcaption:"Fees ",disabledCaption:""},credit:{heading:"Buy with Credit Card",caption:"Not recommended due to failures & charges",subcaption:"Fees ",disabledCaption:""},swap:{heading:"Swap tokens on this network",caption:"Immutable zkEVM only",subcaption:"Fees",disabledCaption:"Not available in your region"},bridge:{heading:"Transfer tokens from another wallet",caption:"Immutable zkEVM only",subcaption:"Fees ",disabledCaption:""},advanced:{heading:"Bridge tokens from another network",caption:"Multiple network and CEX options available",subcaption:"Fees ",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"Crunching numbers"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"Quantity x{{qty}}"},coinsDrawer:{header:"Pay with...",caption1:"Tokens",caption2:"Balance",divider:"More options",stepType:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}",delta:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}"}},fee:"Swap fee ~ {{symbol}} {{amount}}"},orderReview:{heading:"Payment summary",continue:"Proceed",payWith:{SWAP:"Swap & Pay with {{symbol}}",SUFFICIENT:"Pay with {{symbol}}"},balance:"Balance {{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"Crunching numbers"},currency:{usdEstimate:"≈ USD $",fees:"Fees"},fundingRouteDrawer:{header:"Available balance"},fundingRouteSelect:{heading:"Pay with your",noRoutesAvailable:"Insufficient token balance. Please proceed with card instead.",continue:"Continue",payWithCardInstead:"No thanks, I'll pay with card",payWithCard:"Pay with card"}},PAYMENT_METHODS:{header:{heading:"How would you like to pay?"},options:{crypto:{heading:"Tokens",caption:"Pay with the tokens in your wallet, or buy tokens with card",disabledCaption:"Currently not available for this purchase"},debit:{heading:"Debit Card",caption:"The recommended way to pay with card.",disabledCaption:"Unavailable for your selection. We recommend adding tokens"},credit:{heading:"Credit Card",caption:"Not recommended since transactions may be blocked by your bank.",disabledCaption:"Unavailable for your selection. We recommend adding tokens"}},topUp:{heading:"You’ll need to add some tokens",subheading:{both:"Add {{erc20.value}} {{erc20.symbol}} and {{native.value}} {{native.symbol}} to cover this purchase plus gas.",erc20:"Add {{erc20.value}} {{erc20.symbol}} to your balance through one of the following options.",native:"Add {{native.value}} {{native.symbol}} for gas, through one of the following options."}},loading:{ready1:"Collecting your order",ready2:"Talking to wallet",ready3:"Readying assets",processing1:"Initialising payment",processing2:"Securing your assets",processing3:"Finalising payment"},handover:{initial:"Preparing Order",approve:{before:"Waiting for approval in your wallet",beforeWithCta:{heading:"Please approve your tokens",ctaButton:"Open wallet"},pending:"Waiting for approval",after:"Tokens ready for item purchase"},execute:{before:"Waiting for confirmation in your wallet",beforeWithCta:{heading:"Please confirm this purchase",ctaButton:"Open wallet"},pending:"Waiting for purchase confirmation",after:"Processing purchase"},success:"Purchase complete",error:{heading:"Unable to complete purchase"}},creditCardWarningDrawer:{heading:"We recommend debit over credit",body:"Most banks will charge cash advance fees or block the transaction altogether when using credit card on these types of purchases.",ctaButton:"Try anyway"}},PAY_WITH_COINS:{header:{heading:"Pay with your",caption:"Using the token balance in your wallet"},button:{buyNow:"Buy now"}},PAY_WITH_CARD:{screenTitle:"Pay with card",loading:"Taking you to Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"Transaction failed",primaryAction:"Try again",secondaryAction:"View details"},SERVICE_BREAKDOWN:{description:"Sorry, we're unable to process your payment right now. Please try again in a few minutes.",secondaryAction:"Dismiss"},PRODUCT_NOT_FOUND:{description:"Sorry, this item is no longer available",secondaryAction:"Dismiss"},INSUFFICIENT_STOCK:{description:"Sorry, the requested quantity is not in stock. Consider buying a smaller quantity.",secondaryAction:"Dismiss"},TRANSAK_FAILED:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},WALLET_FAILED:{description:"Sorry, we're unable to process this right now.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED_NO_FUNDS:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED:{description:"You'll need to approve the transaction in your wallet to proceed.",primaryAction:"Try again",secondaryAction:"Cancel"},WALLET_POPUP_BLOCKED:{description:"You'll need to allow pop-ups in your browser to proceed.",primaryAction:"I've fixed this, Try again",secondaryAction:"Cancel"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"Sorry, something went wrong while moving funds. Please try again.",primaryAction:"Try again",secondaryAction:"Cancel"},DEFAULT_ERROR:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},INVALID_PARAMETERS:{description:"Sorry, we're unable to process your order. Missing information from client",secondaryAction:"Dismiss"}}},SALE_SUCCESS:{text:"Order completed",actionText:"Continue"},WALLET_NETWORK_SELECTION:{layoutHeading:"Move",heading:"Where would you like to move funds between?",fromFormInput:{heading:"From",selectDefaultText:"Select wallet and network",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"Select wallet and network",walletSelectorHeading:"To wallet",networkSelectorHeading:"To network"},submitButton:{text:"Next"}},BRIDGE_FORM:{header:{title:"Move tokens"},fees:{title:"Gas Fee",fiatPricePrefix:"≈ USD $"},content:{title:"How much would you like to move?",fiatPricePrefix:"≈ USD",availableBalancePrefix:"Available"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"What would you like to move?"},buttonText:"Review"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noTokenSelected:"Select a token to move"}},BRIDGE_REVIEW:{layoutHeading:"Move",heading:"Ok, how does this look?",fromLabel:{amountHeading:"Moving",heading:"From"},toLabel:{heading:"To"},fees:{heading:"Gas fee"},submitButton:{buttonText:"Confirm move"},fiatPricePrefix:"≈ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"Transaction failed",actionText:"Review & Try again"}},APPROVE_TRANSACTION:{content:{heading:"Approve the transaction in your wallet",body:"Follow the prompts in your wallet popup to confirm."},footer:{buttonText:"Okay",retryText:"Try again"},loadingView:{text:"Initiating move"}},IN_PROGRESS:{heading:"Move in progress",body1:"Your funds have been sent, with less than 20 mins remaining until they're received. You can return and view progress by clicking on the rocket icon.",body2:"You can close this window.",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"In progress",passportDashboard:"View the full transaction history in your",status:{withdrawalPending:{actionButtonText:"Proceed",withdrawalDelayText:"This move has been paused, please return ",withdrawalReadyText:"Action required to receive your tokens",caption:"Paused"},inProgress:{heading:"In Progress",txnEstimate:"Usually takes 20 mins",stepInfo:"View Details"},emptyState:{notConnected:{body:"Connect your wallet to view the transactions",buttonText:"Connect"}},noTransactions:{body:"You're all done here.",passport:{body:"View your completed transactions in ",link:"Passport"}}},changeWallet:{buttonText:"Change wallet"},fiatPricePrefix:"≈ USD $",support:{body1:"Need help?",body2:" Contact ",body3:"support",supportLink:"https://support.immutable.com/en/",passport:{body1:"Or view completed transactions in your ",body2:"Passport"}},walletSelection:{heading:"Choose a wallet to view"}},CLAIM_WITHDRAWAL:{content:{heading:"Follow the prompts to receive your tokens on ",body:"You’ll be asked to pay a small gas fee to claim your withdrawal.",body2:"Destination wallet address: "},footer:{buttonText:"Continue",retryText:"Try again"},IN_PROGRESS:{loading:{text:"Processing"},success:{text:"Success",actionText:"Done"},failure:{text:"Transaction failed",actionText:"Try again"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap is a third party app. Immutable neither builds, owns, operates or deploys Quickswap. For further info, refer to Quickswap’s website."}},wallets:{passport:{heading:"Immutable Passport",description:"Your gaming wallet to pay with card, manage items & more."},metamask:{heading:"MetaMask",description:"Digital wallet for accessing blockchain applications and web3."},walletconnect:{heading:"Other wallets",description:"Allows you to connect with any blockchain mobile wallet including MetaMask."},browserwallet:{heading:"Browser wallets",description:"Digital wallet for accessing blockchain applications and web3."},recommended:"Recommended"},drawers:{feesBreakdown:{heading:"Fees",total:"Total fees",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"Gas fee"},approvalFee:{label:"Approval fee"},swapGasFee:{label:"Gas fee"},swapSecondaryFee:{label:"{{amount}} Swap fee (factored into quote)"},serviceFee:{depositLabel:"zkEVM gas fees",withdrawLabel:"Ethereum gas fees"}}},transactionFailed:{content:{heading1:"We’ll need you to confirm in your",heading2:"wallet before proceeding",body1:"When the MetaMask pop up appears, be sure to",body2:"sign the transaction"},buttons:{retry:"Got it",cancel:"Dismiss"}},coinSelector:{option:{fiatPricePrefix:"≈ USD $"},noCoins:"You have no available tokens to select in your wallet."},notEnoughGas:{content:{heading:"You'll need more {{token}} for gas",body:"Your {{token}} balance is too low to cover the gas fee on this move, so you'll need to add more before proceeding."},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX tokens",copyAddress:"Copy wallet address",cancel:"Dismiss"}},notEnoughImx:{content:{noImx:{heading:"You'll need IMX tokens to swap",body:"Swap fees are paid in IMX tokens, so you'll need to add this before you can swap"},insufficientImx:{heading:"You'll need more IMX tokens",body:"In order to cover the fees for the amount specified, you'll need to add more IMX tokens"}},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX tokens",cancel:"Dismiss"}},notEnoughEthWithdrawal:{content:{heading1:"Insufficient",heading2:"for gas",body1:"Add",body2:"to your destination account, or select another account to pay the gas. Your destination account will remain the same."},buttons:{retry:"Pay gas with another account",dismiss:"Dismiss"}},unableToSwap:{heading:"Unable to swap this token",body:"This token pairing isn't available to swap right now. Try another selection.",buttons:{cancel:"Dismiss"}},networkSwitch:{heading:"Switch network in your {{wallet}}",manualSwitch:{body:"You'll need to open your mobile wallet and switch to the {{chain}} network to proceed"},controlledSwitch:{body:"You'll need to switch to the {{chain}} network to proceed"},switchButton:"Switch to {{chain}}"},walletConnectionError:{unableToConnect:{heading:"Unable to connect",body:"Check your wallet and try again, or close and try a different option",actionButtonText:"Try again"},changedYourMind:{heading:"Changed your mind?",body:"Make sure pop ups are enabled and follow the prompts in your wallet to connect",actionButtonText:"Try again"}}}}},ja:{translation:{views:{CONNECT_WALLET:{body:{heading:"ウォレットを接続する",content:"トークンや収集品を購入、販売、取引、保管するには、デジタルウォレットを接続するか、新しいデジタルウォレットを作成する必要があります。"},walletSelection:{heading:"ウォレットを選択"},nonPassportDrawer:{heading:"パスポート未使用者はガス代としてIMXが必要です。",body1:"資金をImmutable zkEVMにブリッジするには、<layerswapLink>Layerswap</layerswapLink>の使用をお勧めします。リファエルをオンにしてIMXを受け取ります。",body2:"または、ガス無料のImmutable Passportで簡単に支払いとプレイができます。",buttonText:"それでも進む"}},CONNECT_SUCCESS:{status:"接続が安全です",action:"続ける"},READY_TO_CONNECT:{header:{title:"接続する"},metamask:{body:{heading:"MetaMaskからのポップアップを確認する",content:"MetaMaskのポップアップに従って接続してください"},footer:{buttonText1:"接続する準備ができました",buttonText2:"再試行する"}},passport:{body:{heading:"Immutable Passportで接続する",content:"Immutable Passportに接続するためのプロンプトに従ってください"},footer:{buttonText1:"続ける",buttonText2:"再試行する"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}}ネットワークに切り替える必要があります",body:"MetaMaskでネットワークを切り替えるように求められます。必要に応じて後で切り替えることができます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}},zkEVM:{heading:"Immutable zkEVMネットワークに切り替えるように求められます",body:"MetaMaskからのポップアップを確認し、「承認」して切り替えてください。これが初めての場合、MetaMaskはネットワークを追加するように求めることもあります。",bodyWalletConnect:"ウォレットからのポップアップを確認して切り替えます。これが初めての場合、ウォレットはネットワークの追加を求めます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}}},ERROR_VIEW:{heading:"何かがうまくいかない",body:["もう一度やってみるか、","サポート","に連絡して助けを求めることができます。"],actionText:"もう一度試す"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"お住まいの地域では交換が利用できません"},body:{swap:"<quickswapLink>Quickswap</quickswapLink>のウェブサイトで詳細情報をご覧ください。"}},LOADING_VIEW:{text:"読み込み中"},WALLET_BALANCES:{header:{title:"ウォレット"},networkStatus:{heading:"ネットワーク"},totalTokenBalance:{heading:"トークン",totalHeading:"価値"},tokenBalancesList:{noTokensFound:"トークンが見つかりません"},addCoins:"トークンを追加する"},SETTINGS:{header:{title:"設定"},disconnectButton:{label:"ウォレットを切断"},walletAddress:{label:"ウォレットアドレス"},transferAssetsL1Warning:{heading:"Ethereumのパスポートに資産を送らないでください",body:"パスポートはまだEthereumに存在していないため、そこに資金を送ると失われます。Immutable zkEVMまたはImmutable Xでのみ転送してください。"}},COIN_INFO:{metamask:{heading:"トークンとコレクタブルはネットワークに固有のものです",body:"トークンを追加したり、別のネットワークに移動したりするには、ネットワークを切り替えることができます"},passport:{heading:"トークンとコレクタブルはネットワークに固有のものです",body1:"このネットワークは Immutable zkEVM と呼ばれています。パスポートに他のトークンがあり、ここに表示されない場合、それらは別のネットワーク上にあるかもしれません。",body2:"詳細については、",linkText:"FAQをご覧ください"}},SWAP:{header:{title:"トークンを交換する"},content:{title:"何をスワップしたいですか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},swapForm:{from:{label:"出金元",inputPlaceholder:"0",selectorTitle:"何からスワップしたいですか?"},to:{label:"宛先",inputPlaceholder:"0",selectorTitle:"何にスワップしたいですか?"},buttonText:"スワップ"},fees:{title:"手数料合計"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高不足",noFromTokenSelected:"交換するトークンを選択してください",noToTokenSelected:"受け取るトークンを選択してください"},success:{text:"成功",actionText:"続行"},failed:{text:"トランザクションが拒否されました",actionText:"もう一度試す"},rejected:{text:"価格が急騰しています",actionText:"レビューしてもう一度試す"},IN_PROGRESS:{loading:{text:"スワップ進行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"これでトランザクションを承認する必要があります",body:"ウォレットのプロンプトに従ってください。"},footer:{buttonText:"はい",retryText:"もう一度試す"}},approveSpending:{content:{metamask:{heading:"このトランザクションのために支出上限を設定するように求められます",body:["少なくとも入力してください","このトランザクションおよび将来のトランザクションのために、その後、プロンプトに従ってください。"]},passport:{heading:"このトランザクションのために支出上限を承認するように求められます",body:"ウォレットのプロンプトに従って支出上限を承認してください。"}},footer:{buttonText:"了解",retryText:"もう一度試す"},loading:{text:"支出上限を承認しています"}}},ONRAMP:{header:{title:"トークンを追加する"},initialLoadingText:"Transakに移動しています",IN_PROGRESS_LOADING:{loading:{text:"Transakが注文を処理しています"}},IN_PROGRESS:{content:{heading:"注文進行中",body1:"完了するとTransakからメールが届きます。これには最大3分かかる場合があります。",body2:"このウィンドウを閉じても、トランザクションは完了次第ウォレットに反映されます。"}},SUCCESS:{text:"トークンがまもなく到着します",actionText:"完了"},FAIL:{text:"トランザクションが失敗しました",actionText:"もう一度試す"}},TOP_UP_VIEW:{header:{title:"どのようにトークンを追加しますか?"},topUpOptions:{onramp:{heading:"トークンを購入する"},debit:{heading:"デビットカードで購入",caption:"トークンを購入する推奨方法",subcaption:"手数料",disabledCaption:""},credit:{heading:"クレジットカードで購入",caption:"失敗や手数料のためおすすめできません",subcaption:"手数料",disabledCaption:""},swap:{heading:"このネットワークでトークンをスワップ",caption:"イミュータブル zkEVM のみ",subcaption:"手数料",disabledCaption:"お住まいの地域では利用できません"},bridge:{heading:"他のウォレットからトークンを送金する",caption:"イミュータブル zkEVM のみ",subcaption:"手数料",disabledCaption:""},advanced:{heading:"他のネットワークからトークンをブリッジする",caption:"複数のネットワークとCEXのオプションが利用可能",subcaption:"手数料",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"数字を計算中"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支払い方法…",caption1:"トークン",caption2:"残高",divider:"その他のオプション",stepType:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う",delta:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う"}},fee:"交換手数料 ~ {{symbol}} {{amount}}"},orderReview:{heading:"支払いの概要",continue:"続行",payWith:{SWAP:"{{symbol}}でスワップ&支払い",SUFFICIENT:"{{symbol}}で支払う"},balance:"残高{{amount}}"}},PAYMENT_METHODS:{header:{heading:"どの支払い方法をご希望ですか?"},options:{crypto:{heading:"トークン",caption:"ウォレット内のトークンで支払うか、カードでトークンを購入してください",disabledCaption:"現在、この支払い方法は利用できません。"},debit:{heading:"デビットカード",caption:"カードでの支払いに推奨される方法です。",disabledCaption:"こちらの選択は利用できません。トークンを追加することをお勧めします"},credit:{heading:"クレジットカード",caption:"銀行によって取引がブロックされる可能性があるため、推奨されません。",disabledCaption:"こちらの選択は利用できません。トークンを追加することをお勧めします"}},topUp:{heading:"トークンを追加する必要があります",subheading:{both:"この購入とガスをカバーするために{{erc20.value}} {{erc20.symbol}}と{{native.value}} {{native.symbol}}を追加する必要があります。",erc20:"残高が不足しているため、{{erc20.value}} {{erc20.symbol}}を追加する必要があります。",native:"残高が不足しているため、{{native.value}} {{native.symbol}}を追加する必要があります。"}},loading:{ready1:"注文を受け取り中",ready2:"ウォレットと通信中",ready3:"資産を準備中",processing1:"支払いを初期化中",processing2:"資産を確保中",processing3:"支払いを完了中"},handover:{initial:"注文を準備中",approve:{before:"ウォレットで承認を待っています",beforeWithCta:{heading:"トークンを承認してください",ctaButton:"ウォレットを開く"},pending:"承認を待っています",after:"トークンはアイテム購入の準備ができています"},execute:{before:"ウォレットで確認を待っています",beforeWithCta:{heading:"この購入を確認してください",ctaButton:"ウォレットを開く"},pending:"購入確認を待っています",after:"購入を処理中"},success:"購入完了",error:{heading:"購入を完了できません"}},creditCardWarningDrawer:{heading:"デビットカードの使用をお勧めします",body:"この種の購入にクレジットカードを使用する場合、ほとんどの銀行は現金前払い手数料を請求するか、または取引を完全にブロックします。",ctaButton:"それでも試す"}},PAY_WITH_COINS:{header:{heading:"あなたので支払う",caption:"ウォレット内のトークン残高を使用する"},button:{buyNow:"今すぐ購入"}},PAY_WITH_CARD:{screenTitle:"カードで支払う",loading:"Transakに移動しています"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"トランザクションが失敗しました",primaryAction:"もう一度試す",secondaryAction:"詳細を表示"},SERVICE_BREAKDOWN:{description:"申し訳ありませんが、現在お支払いを処理できません。数分後にもう一度お試しください。",secondaryAction:"閉じる"},PRODUCT_NOT_FOUND:{description:"申し訳ありませんが、このアイテムはもう利用できません。",secondaryAction:"閉じる"},INSUFFICIENT_STOCK:{description:"申し訳ありませんが、ご希望の数量は在庫がありません。少ない数量の購入をご検討ください。",secondaryAction:"閉じる"},TRANSAK_FAILED:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},WALLET_FAILED:{description:"申し訳ありませんが、現在これを処理できません。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED_NO_FUNDS:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED:{description:"取引を承認するには、ウォレットで承認する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},WALLET_POPUP_BLOCKED:{description:"続行するには、ブラウザでポップアップを許可する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"資金を移動する際に何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},DEFAULT_ERROR:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},INVALID_PARAMETERS:{description:"申し訳ありませんが、ご注文を処理できません。クライアントからの情報が不足しています。",secondaryAction:"閉じる"}}},SALE_SUCCESS:{text:"注文が完了しました",actionText:"続行"},WALLET_NETWORK_SELECTION:{layoutHeading:"移動",heading:"どこに資金を移動させたいですか?",fromFormInput:{heading:"From",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"To wallet",networkSelectorHeading:"To network"},submitButton:{text:"次へ"}},BRIDGE_FORM:{header:{title:"トークンを移動する"},fees:{title:"ガス手数料",fiatPricePrefix:"≈ USD $"},content:{title:"いくら移動しますか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"移動するコインを選択"},buttonText:"確認"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高が不足しています",noTokenSelected:"移動するトークンを選択してください"}},BRIDGE_REVIEW:{layoutHeading:"移動",heading:"これはどう見えますか?",fromLabel:{amountHeading:"移動中",heading:"From"},toLabel:{heading:"To"},fees:{heading:"ガス手数料"},submitButton:{buttonText:"移動を確認"},fiatPricePrefix:"≈ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"トランザクションが失敗しました",actionText:"再確認してもう一度試す"}},APPROVE_TRANSACTION:{content:{heading:"ウォレットでトランザクションを承認してください",body:"ウォレットのポップアップで表示されるプロンプトに従って承認してください。"},footer:{buttonText:"OK",retryText:"もう一度試す"},loadingView:{text:"移動を開始しています"}},IN_PROGRESS:{heading:"移動進行中",body1:"資金は送信されました。受信まで残り20分未満です。進捗状況は、ロケットアイコンをクリックして戻って確認できます。",body2:"このウィンドウを閉じてもよろしいです。",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"進行中",passportDashboard:"完全な取引履歴を表示する",status:{withdrawalPending:{actionButtonText:"続行",withdrawalDelayText:"この移動は一時停止されました。戻ってください",withdrawalReadyText:"トークンを受け取るにはアクションが必要です",caption:"一時停止中"},inProgress:{heading:"進行中",txnEstimate:"通常、20分かかります",stepInfo:"詳細を表示"},emptyState:{notConnected:{body:"トランザクションを表示するにはウォレットを接続してください",buttonText:"接続する"}},noTransactions:{body:"ここで完了しました。",passport:{body:"完了した取引は",link:"パスポート"}}},changeWallet:{buttonText:"ウォレットを変更する"},fiatPricePrefix:"≈ USD $",support:{body1:"サポートが必要ですか?",body2:" お問い合わせは ",body3:"サポートへ",supportLink:"https://support.immutable.com/ja/",passport:{body1:"または、完了した取引をご覧になるには ",body2:"パスポート"}},walletSelection:{heading:"表示するウォレットを選択"}},CLAIM_WITHDRAWAL:{content:{heading:"プロンプトに従ってトークンを受け取る",body:"引き出しを請求するには小額のガス手数料が必要です。",body2:"目的地ウォレットアドレス:"},footer:{buttonText:"続行",retryText:"もう一度試す"},IN_PROGRESS:{loading:{text:"処理中"},success:{text:"成功",actionText:"完了"},failure:{text:"取引失敗",actionText:"再試行"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswapはサードパーティアプリケーションです。ImmutableはQuickswapをビルド、所有、運営、デプロイしていません。詳細については、Quickswapのウェブサイトを参照してください。"}},wallets:{passport:{heading:"Immutable Passport",description:"カードで支払い、アイテムを管理するなど、ゲーム用ウォレットです。"},metamask:{heading:"MetaMask",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},walletconnect:{heading:"その他のウォレット",description:"MetaMaskを含む任意のブロックチェーンモバイルウォレットに接続できます。"},browserwallet:{heading:"ブラウザウォレット",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},recommended:"推奨"},drawers:{feesBreakdown:{heading:"手数料の内訳",total:"総手数料",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"ガス手数料"},approvalFee:{label:"承認手数料"},swapGasFee:{label:"ガス手数料"},swapSecondaryFee:{label:"{{amount}} スワップ手数料(見積もりに含まれる)"},serviceFee:{depositLabel:"zkEVM ガス手数料",withdrawLabel:"Ethereum ガス手数料"}}},transactionFailed:{content:{heading1:"続行する前に、",heading2:"ウォレットで確認が必要です",body1:"MetaMaskのポップアップが表示されたら、",body2:"トランザクションに署名してください"},buttons:{retry:"了解",cancel:"閉じる"}},coinSelector:{option:{fiatPricePrefix:"約USD $"},noCoins:"ウォレットには選択可能なトークンがありません。"},notEnoughGas:{content:{heading:"{{token}}が不足しています",body:"この操作のガス手数料をカバーするには{{token}}残高が十分にありません。続行する前に、もっと{{token}}を追加する必要があります。"},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXトークンを追加する",copyAddress:"ウォレットアドレスをコピー",cancel:"閉じる"}},notEnoughImx:{content:{noImx:{heading:"スワップするにはIMXトークンが必要です",body:"スワップ手数料はIMXトークンで支払われるため、スワップを行う前にIMXトークンを追加する必要があります"},insufficientImx:{heading:"もっとIMXトークンが必要です",body:"指定された金額の手数料をカバーするために、もっとIMXトークンを追加する必要があります"}},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXトークンを追加する",cancel:"閉じる"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"ガス用",body1:"追加",body2:"あなたの宛先アカウントに追加するか、別のアカウントを選択してガスを支払います。宛先アカウントは変更されません。"},buttons:{retry:"別のアカウントでガスを支払う",dismiss:"閉じる"}},unableToSwap:{heading:"このトークンを交換できません",body:"このトークンペアリングは現在交換できません。別のものを選択してください",buttons:{cancel:"閉じる"}},networkSwitch:{heading:"あなたの{{wallet}}でネットワークを切り替える",manualSwitch:{body:"続行するにはモバイルウォレットを開き、{{chain}}ネットワークに切り替える必要があります"},controlledSwitch:{body:"{{chain}}ネットワークに切り替える必要があります"},switchButton:"{{chain}}に切り替える"},walletConnectionError:{unableToConnect:{heading:"接続できません",body:"ウォレットを確認してもう一度お試しください。または、閉じて別のオプションを試してください。",actionButtonText:"もう一度試す"},changedYourMind:{heading:"考えを変えましたか?",body:"ポップアップが有効になっていることを確認し、ウォレットのプロンプトに従って接続してください。",actionButtonText:"もう一度試す"}}}}},ko:{translation:{views:{CONNECT_WALLET:{body:{heading:"지갑 연결",content:"토큰과 수집품을 구매, 판매, 거래 및 보관하려면 디지털 지갑을 연결하거나 새 디지털 지갑을 만들어야 합니다. "},walletSelection:{heading:"지갑 선택"},nonPassportDrawer:{heading:"비 패스포트 사용자는 가스 비용으로 IMX가 필요합니다.",body1:"자금을 Immutable zkEVM으로 브리징하기 위해 <layerswapLink>Layerswap</layerswapLink>을 사용하는 것을 권장합니다. 리퓨엘이 켜져 있으면 IMX를 받을 수 있습니다.",body2:"또는 가스 비용이 없는 Immutable Passport로 쉽게 결제하고 플레이하세요.",buttonText:"어쨌든 진행"}},CONNECT_SUCCESS:{status:"연결이 안전함",action:"계속하기"},READY_TO_CONNECT:{header:{title:"연결 준비됨"},metamask:{body:{heading:"MetaMask에서 팝업을 확인하세요",content:"MetaMask 팝업의 안내에 따라 연결하세요"},footer:{buttonText1:"연결 준비됨",buttonText2:"다시 시도"}},passport:{body:{heading:"Immutable Passport로 연결",content:"Immutable Passport와 연결하기 위한 안내를 따르세요"},footer:{buttonText1:"계속",buttonText2:"다시 시도"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}} 네트워크로 전환해야 합니다",body:"MetaMask에서 네트워크 전환을 요청받게 됩니다. 필요할 때 다시 전환할 수 있습니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}},zkEVM:{heading:"Immutable zkEVM 네트워크로 전환하라는 요청을 받게 됩니다",body:"MetaMask 팝업에서 '승인'을 선택하고 전환하세요. 처음이라면 MetaMask에서 네트워크 추가를 요구할 수도 있습니다.",bodyWalletConnect:"지갑에서 팝업을 확인하여 전환하십시오. 처음이라면 지갑에서 네트워크 추가를 요청합니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}}},ERROR_VIEW:{heading:"문제가 발생했습니다",body:["다시 시도하거나","지원팀에","도움을 요청하세요."],actionText:"다시 시도"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"귀하의 지역에서는 스왑이 가능하지 않습니다"},body:{swap:"자세한 정보는 <quickswapLink>Quickswap</quickswapLink> 웹사이트를 참조하십시오."}},LOADING_VIEW:{text:"로딩 중"},WALLET_BALANCES:{header:{title:"지갑"},networkStatus:{heading:"네트워크"},totalTokenBalance:{heading:"토큰",totalHeading:"가치"},tokenBalancesList:{noTokensFound:"토큰을 찾을 수 없습니다"},addCoins:"토큰 추가"},SETTINGS:{header:{title:"설정"},disconnectButton:{label:"지갑 연결 해제"},walletAddress:{label:"지갑 주소"},transferAssetsL1Warning:{heading:"이더리움에 있는 패스포트로 자산을 보내지 마세요",body:"패스포트는 아직 이더리움에 존재하지 않으므로 자금이 손실됩니다. Immutable zkEVM 또는 Immutable X에서만 전송하세요."}},COIN_INFO:{metamask:{heading:"토큰과 수집품은 네트워크에 고유합니다",body:"네트워크를 변경하여 토큰을 추가하거나 한 네트워크에서 다른 네트워크로 이동할 수 있습니다"},passport:{heading:"토큰과 수집품은 네트워크에 고유합니다",body1:"이 네트워크는 Immutable zkEVM이라고 합니다. 패스포트에 다른 토큰이 있어 여기에 표시되지 않는 경우, 다른 네트워크에 있을 수 있습니다.",body2:" 자세한 정보를 위해 우리의 FAQ를 방문하세요.",linkText:"FAQ 방문하기"}},SWAP:{header:{title:"토큰 교환"},content:{title:"무엇을 교환하고 싶으신가요?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"무엇을 교환하고 싶으신가요?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"무엇을 받으시겠습니까?"},buttonText:"교환"},fees:{title:"수수료 총액"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noFromTokenSelected:"교환할 토큰을 선택하세요",noToTokenSelected:"받을 토큰을 선택하세요"},success:{text:"성공",actionText:"계속하기"},failed:{text:"거래 거절됨",actionText:"다시 시도"},rejected:{text:"가격 급등",actionText:"검토하고 다시 시도하세요"},IN_PROGRESS:{loading:{text:"교환 진행 중"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"이제 거래를 확인하기만 하면 됩니다",body:"지갑의 안내를 따르세요."},footer:{buttonText:"확인",retryText:"다시 시도"}},approveSpending:{content:{metamask:{heading:"이 거래에 대한 지출 한도를 설정하라는 요청을 받게 될 것입니다",body:"이 거래 및 향후 거래를 위해 최소 {{amount}}을 입력한 후, 안내를 따르세요."},passport:{heading:"이 거래에 대한 지출 한도 승인을 받게 됩니다",body:"지출 한도를 승인하기 위해 지갑의 안내를 따르세요."}},footer:{buttonText:"알겠습니다",retryText:"다시 시도"},loading:{text:"지출 한도 승인 중"}}},ONRAMP:{header:{title:"토큰 추가"},initialLoadingText:"Transak으로 이동하는 중",IN_PROGRESS_LOADING:{loading:{text:"Transak가 주문을 처리 중입니다"}},IN_PROGRESS:{content:{heading:"주문 진행 중",body1:"완료되면 Transak에서 이메일을 받게 됩니다. 최대 3분이 소요될 수 있습니다.",body2:"이 창을 닫을 수 있으며, 완료되면 거래가 지갑에 반영됩니다."}},SUCCESS:{text:"토큰이 전달 중입니다",actionText:"완료"},FAIL:{text:"거래 실패",actionText:"다시 시도"}},TOP_UP_VIEW:{header:{title:"토큰을 어떻게 추가하시겠습니까?"},topUpOptions:{onramp:{heading:"토큰 구매"},debit:{heading:"직불 카드로 구매",caption:"토큰을 구매하는 권장 방법",subcaption:"수수료",disabledCaption:""},credit:{heading:"신용 카드로 구매",caption:"실패 및 요금 때문에 권장하지 않습니다",subcaption:"수수료",disabledCaption:""},swap:{heading:"이 네트워크에서 토큰 교환",caption:"불변 zkEVM 전용",subcaption:"수수료",disabledCaption:"귀하의 지역에서 사용할 수 없음"},bridge:{heading:"다른 지갑에서 토큰을 전송",caption:"불변 zkEVM 전용",subcaption:"수수료",disabledCaption:""},advanced:{heading:"다른 네트워크에서 토큰 브리지",caption:"여러 네트워크 및 CEX 옵션 사용 가능",subcaption:"수수료",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"숫자 계산 중"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"수량 x{{qty}}"},coinsDrawer:{header:"결제 수단...",caption1:"토큰",caption2:"잔액",divider:"더 많은 옵션",stepType:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불",delta:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불"}},fee:"교환 수수료 ~ {{symbol}} {{amount}}"},orderReview:{heading:"결제 요약",continue:"계속",payWith:{SWAP:"{{symbol}}로 스왑 및 결제하기",SUFFICIENT:"{{symbol}}로 결제"},balance:"잔액 {{amount}}"}},PAYMENT_METHODS:{header:{heading:"어떤 결제 방법을 원하시나요?"},options:{crypto:{heading:"토큰",caption:"지갑에 있는 토큰으로 지불하거나 카드로 토큰을 구매하세요",disabledCaption:"현재 이 구매에는 사용할 수 없습니다."},debit:{heading:"직불카드",caption:"카드로 결제하는 권장 방법입니다.",disabledCaption:"선택한 항목을 사용할 수 없습니다. 토큰 추가를 권장합니다. "},credit:{heading:"신용카드",caption:"은행에서 거래를 차단할 수 있으므로 권장하지 않습니다.",disabledCaption:"선택한 항목을 사용할 수 없습니다. 토큰 추가를 권장합니다. "}},topUp:{heading:"토큰을 추가해야 합니다",subheading:{both:"이 구매 및 가스를 포함하여 이를 커버하기 위해 {{erc20.value}} {{erc20.symbol}} 및 {{native.value}} {{native.symbol}}를 추가하십시오.",erc20:"다음 옵션 중 하나를 통해 균형에 {{erc20.value}} {{erc20.symbol}}를 추가하십시오.",native:"다음 옵션 중 하나를 통해 가스에 {{native.value}} {{native.symbol}}를 추가하십시오."}},loading:{ready1:"주문 수집 중",ready2:"지갑과 대화 중",ready3:"자산 준비 중",processing1:"결제 초기화 중",processing2:"자산 보호 중",processing3:"결제 완료 중"},handover:{initial:"주문 준비 중",approve:{before:"지갑에서 승인을 기다리고 있습니다",beforeWithCta:{heading:"토큰을 승인해 주세요",ctaButton:"지갑 열기"},pending:"승인을 기다리고 있습니다",after:"토큰이 아이템 구매 준비되었습니다"},execute:{before:"지갑에서 확인을 기다리고 있습니다",beforeWithCta:{heading:"이 구매를 확인해 주세요",ctaButton:"지갑 열기"},pending:"구매 확인을 기다리고 있습니다",after:"구매 처리 중"},success:"구매 완료",error:{heading:"구매를 완료할 수 없습니다"}},creditCardWarningDrawer:{heading:"신용카드보다는 체크카드 사용을 권장합니다",body:"이런 종류의 구매에 신용카드를 사용할 경우 대부분의 은행에서 현금 서비스 수수료를 부과하거나 거래를 전체적으로 차단할 수 있습니다.",ctaButton:"그래도 시도하기"}},PAY_WITH_COINS:{header:{heading:"코인으로 결제",caption:"지갑 안의 토큰 잔액을 사용하기"},button:{buyNow:"지금 구매"}},PAY_WITH_CARD:{screenTitle:"카드로 결제",loading:"Transak으로 이동하는 중"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"거래 실패",primaryAction:"다시 시도",secondaryAction:"세부 정보 보기"},SERVICE_BREAKDOWN:{description:"죄송합니다, 현재 지불 처리가 불가능합니다. 몇 분 후에 다시 시도하세요.",secondaryAction:"닫기"},PRODUCT_NOT_FOUND:{description:"죄송합니다, 이 상품은 더 이상 구매할 수 없습니다.",secondaryAction:"닫기"},INSUFFICIENT_STOCK:{description:"죄송합니다. 요청하신 수량은 재고가 없습니다. 더 적은 수량을 고려해 주십시오.",secondaryAction:"닫기"},TRANSAK_FAILED:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},WALLET_FAILED:{description:"죄송합니다, 지금은 이를 처리할 수 없습니다.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED_NO_FUNDS:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED:{description:"거래를 진행하려면 지갑에서 거래 승인이 필요합니다.",primaryAction:"다시 시도",secondaryAction:"취소"},WALLET_POPUP_BLOCKED:{description:"계속 진행하려면 브라우저에서 팝업을 허용해야 합니다.",primaryAction:"이 문제를 해결했습니다. 다시 시도하세요.",secondaryAction:"취소"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"죄송합니다, 자금 이동 중 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"취소"},DEFAULT_ERROR:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},INVALID_PARAMETERS:{description:"죄송합니다. 주문을 처리할 수 없습니다. 고객으로부터의 정보가 누락되었습니다.",secondaryAction:"닫기"}}},SALE_SUCCESS:{text:"주문 완료",actionText:"계속"},WALLET_NETWORK_SELECTION:{layoutHeading:"이동",heading:"자금을 어디에서 어디로 이동하시겠습니까?",fromFormInput:{heading:"From",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑에서",networkSelectorHeading:"네트워크에서"},toFormInput:{heading:"To",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑으로",networkSelectorHeading:"To network"},submitButton:{text:"다음"}},BRIDGE_FORM:{header:{title:"토큰 이동"},fees:{title:"가스 요금",fiatPricePrefix:"≈ USD $"},content:{title:"얼마나 많이 이동하시겠습니까?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"무엇을 이동하고 싶으신가요?"},buttonText:"검토"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noTokenSelected:"이동할 토큰을 선택하세요"}},BRIDGE_REVIEW:{layoutHeading:"이동",heading:"이렇게 보이면 괜찮으십니까?",fromLabel:{amountHeading:"이동 중",heading:"From"},toLabel:{heading:"To"},fees:{heading:"가스 요금"},submitButton:{buttonText:"이동 확인"},fiatPricePrefix:"≈ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"거래 실패",actionText:"검토하고 다시 시도하세요"}},APPROVE_TRANSACTION:{content:{heading:"지갑에서 거래 승인",body:"지갑 팝업의 안내를 따라 확인하세요."},footer:{buttonText:"확인",retryText:"다시 시도"},loadingView:{text:"이동 시작 중"}},IN_PROGRESS:{heading:"이동 중",body1:"자금이 송금되었습니다. 수령까지 남은 시간은 20분 미만입니다. 로켓 아이콘을 클릭하여 진행 상황을 확인할 수 있습니다.",body2:"이 창을 닫아도 됩니다.",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"진행 중",passportDashboard:"전체 거래 내역을 확인하세요",status:{withdrawalPending:{actionButtonText:"계속",withdrawalDelayText:"이 이동은 일시 중지되었습니다. 돌아가세요",withdrawalReadyText:"토큰을 받으려면 조치가 필요합니다",caption:"일시중지됨"},inProgress:{heading:"진행 중",txnEstimate:"보통 20분 소요됩니다",stepInfo:"세부 정보 보기"},emptyState:{notConnected:{body:"트랜잭션을 보려면 지갑을 연결하세요",buttonText:"연결하다"}},noTransactions:{body:"여기까지 완료되었습니다.",passport:{body:"완료된 거래는",link:"패스포트"}}},changeWallet:{buttonText:"지갑 변경"},fiatPricePrefix:"≈ USD $",support:{body1:"도움이 필요하신가요?",body2:" 문의하기 ",body3:"지원팀",supportLink:"https://support.immutable.com/ko/",passport:{body1:"또는 귀하의 ",body2:"패스포트"}},walletSelection:{heading:"보려는 지갑 선택"}},CLAIM_WITHDRAWAL:{content:{heading:"프롬프트를 따라 토큰을 받으세요",body:"출금을 청구하려면 소액의 가스 수수료를 지불해야 합니다.",body2:"목적지 지갑 주소: "},footer:{buttonText:"계속",retryText:"다시 시도"},IN_PROGRESS:{loading:{text:"처리 중"},success:{text:"성공",actionText:"완료"},failure:{text:"거래 실패",actionText:"다시 시도"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap는 타사 앱입니다. Immutable은 Quickswap를 만들거나 소유하거나 운영하거나 배포하지 않습니다. 자세한 정보는 Quickswap의 웹사이트를 참조하십시오."}},wallets:{passport:{heading:"Immutable Passport",description:"카드로 결제하고, 아이템을 관리하는 게임용 지갑입니다."},metamask:{heading:"MetaMask",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},walletconnect:{heading:"기타 지갑",description:"MetaMask를 포함한 모든 블록체인 모바일 지갑에 연결할 수 있습니다."},browserwallet:{heading:"브라우저 지갑",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},recommended:"추천"},drawers:{feesBreakdown:{heading:"수수료 내역",total:"수수료 총액",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"가스 수수료"},approvalFee:{label:"승인 수수료"},swapGasFee:{label:"가스 수수료"},swapSecondaryFee:{label:"{{amount}} 스왑 수수료 (견적에 포함)"},serviceFee:{depositLabel:"zkEVM 가스 수수료",withdrawLabel:"Ethereum 가스 수수료"}}},transactionFailed:{content:{heading1:"계속하기 전에 지갑에서 확인이 필요합니다",heading2:"지갑 확인 필요",body1:"MetaMask 팝업이 나타날 때 거래에",body2:"서명을 꼭 하십시오"},buttons:{retry:"알겠습니다",cancel:"취소"}},coinSelector:{option:{fiatPricePrefix:"대략 USD $"},noCoins:"지갑에 선택할 수 있는 토큰이 없습니다"},notEnoughGas:{content:{heading:"가스를 위해 {{token}}이 더 필요합니다",body:"이 작업에 필요한 가스 수수료를 지불하기 위해 {{token}} 잔액이 너무 낮습니다. 계속하기 전에 더 추가해야 합니다."},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 토큰 추가 ",copyAddress:"지갑 주소 복사",cancel:"취소"}},notEnoughImx:{content:{noImx:{heading:"스왑하려면 IMX 토큰이 필요합니다",body:"스왑 수수료는 IMX 토큰으로 지불되므로 스왑을 하기 전에 IMX 토큰을 추가해야 합니다"},insufficientImx:{heading:"더 많은 IMX 토큰이 필요합니다",body:"지정된 금액에 대한 수수료를 충당하기 위해 더 많은 IMX 토큰을 추가해야 합니다"}},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 토큰 추가 ",cancel:"취소"}},notEnoughEthWithdrawal:{content:{heading1:"부족함",heading2:"가스용",body1:"추가",body2:"목적지 계정에 추가하거나 다른 계정을 선택하여 가스를 지불하십시오. 목적지 계정은 그대로 유지됩니다."},buttons:{retry:"다른 계정으로 가스 지불",dismiss:"닫기"}},unableToSwap:{heading:"이 토큰을 교환할 수 없습니다",body:"이 토큰 페어링은 현재 교환할 수 없습니다. 다른 선택을 시도해 보세요",buttons:{cancel:"취소"}},networkSwitch:{heading:"귀하의 {{wallet}}에서 네트워크를 전환하세요",manualSwitch:{body:"계속하려면 모바일 지갑을 열고 {{chain}} 네트워크로 전환해야 합니다"},controlledSwitch:{body:"{{chain}} 네트워크로 전환해야 합니다"},switchButton:"{{chain}}로 전환하기"},walletConnectionError:{unableToConnect:{heading:"연결할 수 없음",body:"지갑을 확인한 후 다시 시도하거나 닫고 다른 옵션을 시도하세요.",actionButtonText:"다시 시도"},changedYourMind:{heading:"생각을 바꾸셨나요?",body:"팝업이 활성화되어 있는지 확인하고 지갑의 프롬프트를 따라 연결하세요.",actionButtonText:"다시 시도"}}}}},zh:{translation:{views:{CONNECT_WALLET:{body:{heading:"连接钱包",content:"您需要连接或创建一个数字钱包,以购买、出售、交易和存储您的代币和收藏品。"},walletSelection:{heading:"选择一个钱包"},nonPassportDrawer:{heading:"非Passport用户需要IMX来支付燃气费。",body1:"我们建议使用<layerswapLink>Layerswap</layerswapLink>将资金桥接到Immutable zkEVM,并打开加油功能,以便您能收到一些IMX。",body2:"或者,可以使用免燃气费的Immutable Passport轻松支付和玩游戏。",buttonText:"继续操作"}},CONNECT_SUCCESS:{status:"连接安全",action:"继续"},READY_TO_CONNECT:{header:{title:"连接"},metamask:{body:{heading:"检查MetaMask的弹窗",content:"按照MetaMask弹窗中的提示进行连接"},footer:{buttonText1:"准备好连接",buttonText2:"再试一次"}},passport:{body:{heading:"使用Immutable Passport连接",content:"按照提示使用Immutable Passport进行连接"},footer:{buttonText1:"继续",buttonText2:"再试一次"}}},SWITCH_NETWORK:{eth:{heading:"您需要切换到{{networkName}}网络",body:"MetaMask将提示您切换网络。需要时可以切回。",button:{text:"准备切换",retryText:"再试一次"}},zkEVM:{heading:"将要求您切换到Immutable zkEVM网络",body:"检查MetaMask的弹窗并选择'批准'以切换。如果这是第一次,MetaMask还会要求您添加网络。",bodyWalletConnect:"请检查您的钱包弹出窗口以进行切换。如果这是第一次,您的钱包还会要求您添加网络。",button:{text:"准备切换",retryText:"再试一次"}}},ERROR_VIEW:{heading:"出了些问题",body:["您可以再试一次或联系","支持","寻求帮助。"],actionText:"再试一次"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"您所在的地区不支持兑换"},body:{swap:"请参考<quickswapLink>Quickswap</quickswapLink>的网站了解更多信息。"}},LOADING_VIEW:{text:"加载中"},WALLET_BALANCES:{header:{title:"钱包"},networkStatus:{heading:"网络"},totalTokenBalance:{heading:"代币",totalHeading:"价值"},tokenBalancesList:{noTokensFound:"未发现代币"},addCoins:"添加代币"},SETTINGS:{header:{title:"设置"},disconnectButton:{label:"断开钱包连接"},walletAddress:{label:"钱包地址"},transferAssetsL1Warning:{heading:"不要将资产发送到以太坊上的Passport",body:"Passport尚未存在于以太坊上,因此您的资金将在那里丢失。仅在Immutable zkEVM或Immutable X上转账。"}},COIN_INFO:{metamask:{heading:"代币和收藏品是网络的原生物",body:"您可以切换网络来添加代币或将它们从一个网络移动到另一个网络"},passport:{heading:"代币和收藏品是网络的原生物",body1:"该网络称为 Immutable zkEVM。如果您的护照中有其他代币并且在这里看不到它们,它们可能在其他网络上。",body2:"欲了解更多信息,请",linkText:"访问我们的常见问题"}},SWAP:{header:{title:"交换代币"},content:{title:"您想要兑换什么?",fiatPricePrefix:"约合美元",availableBalancePrefix:"可用余额"},swapForm:{from:{label:"从",inputPlaceholder:"0",selectorTitle:"您想从哪里兑换?"},to:{label:"至",inputPlaceholder:"0",selectorTitle:"您想兑换到哪里?"},buttonText:"兑换"},fees:{title:"总费用"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noFromTokenSelected:"选择要交换的代币",noToTokenSelected:"选择要接收的代币"},success:{text:"成功",actionText:"继续"},failed:{text:"交易被拒绝",actionText:"再试一次"},rejected:{text:"价格飙升",actionText:"审查并重试"},IN_PROGRESS:{loading:{text:"交换进行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"现在您只需要确认交易",body:"按照钱包中的提示操作。"},footer:{buttonText:"好的",retryText:"再试一次"}},approveSpending:{content:{metamask:{heading:"您将被要求为这笔交易设置支出上限",body:"至少输入{{amount}}用于本次及未来交易,然后按照提示操作。"},passport:{heading:"您将被要求批准这笔交易的支出上限",body:"按照钱包中的提示批准支出上限。"}},footer:{buttonText:"明白",retryText:"再试一次"},loading:{text:"批准支出上限"}}},ONRAMP:{header:{title:"添加代币"},initialLoadingText:"带您前往Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak正在处理您的订单"}},IN_PROGRESS:{content:{heading:"订单进行中",body1:"当完成时,您将从Transak收到一封电子邮件。这可能需要长达3分钟的时间。",body2:"您可以关闭这个窗口,一旦交易完成,将会反映在您的钱包中。"}},SUCCESS:{text:"代币正在传送中",actionText:"完成"},FAIL:{text:"交易失败",actionText:"再试一次"}},TOP_UP_VIEW:{header:{title:"你想如何添加代币?"},topUpOptions:{onramp:{heading:"购买代币"},debit:{heading:"用借记卡购买",caption:"推荐的购买代币方法",subcaption:"费用",disabledCaption:""},credit:{heading:"用信用卡购买",caption:"由于失败和费用,不推荐使用",subcaption:"费用",disabledCaption:""},swap:{heading:"在此网络上交换代币",caption:"仅限不可变 zkEVM",subcaption:"费用",disabledCaption:"您所在的地区不可用"},bridge:{heading:"从另一个钱包转移代币",caption:"仅限不可变 zkEVM",subcaption:"费用",disabledCaption:""},advanced:{heading:"从另一个网络桥接代币",caption:"多种网络和CEX选项可用",subcaption:"费用",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"正在计算数字"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支付方式…",caption1:"代币",caption2:"余额",divider:"更多选项",stepType:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}",delta:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}"}},fee:"交换费用 ~ {{symbol}} {{amount}}"},orderReview:{heading:"付款摘要",continue:"继续",payWith:{SWAP:"使用{{symbol}}进行交换和支付",SUFFICIENT:"使用{{symbol}}支付"},balance:"余额{{amount}}"}},PAYMENT_METHODS:{header:{heading:"您希望如何支付?"},options:{crypto:{heading:"代币",caption:"使用钱包里的代币付款,或用银行卡购买代币",disabledCaption:"目前无法进行此购买。"},debit:{heading:"借记卡",caption:"使用卡支付的推荐方式。",disabledCaption:"无法选择。我们建议添加代币。"},credit:{heading:"信用卡",caption:"不推荐使用,因为您的银行可能会阻止交易。",disabledCaption:"无法选择。我们建议添加代币。"}},topUp:{heading:"你需要添加一些代币",subheading:{both:"添加{{erc20.value}} {{erc20.symbol}}和{{native.value}} {{native.symbol}}以支付本次购买及燃气费。",erc20:"通过以下选项之一将{{erc20.value}} {{erc20.symbol}}添加到您的余额。",native:"通过以下选项之一,为燃气添加{{native.value}} {{native.symbol}}。"}},loading:{ready1:"正在收集您的订单",ready2:"正在与钱包交流",ready3:"正在准备资产",processing1:"正在初始化支付",processing2:"正在保护您的资产",processing3:"正在完成支付"},handover:{initial:"准备订单中",approve:{before:"等待您的钱包批准",beforeWithCta:{heading:"请批准您的代币",ctaButton:"打开钱包"},pending:"等待批准",after:"代币已准备好购买物品"},execute:{before:"等待您的钱包确认",beforeWithCta:{heading:"请确认此次购买",ctaButton:"打开钱包"},pending:"等待购买确认",after:"处理中"},success:"购买完成",error:{heading:"无法完成购买"}},creditCardWarningDrawer:{heading:"我们推荐使用借记卡而非信用卡",body:"在这类购买中使用信用卡时,大多数银行将收取现金预付费用或完全阻止交易。",ctaButton:"尝试一下"}},PAY_WITH_COINS:{header:{heading:"用您的硬币支付",caption:"使用您钱包中的代币余额"},button:{buyNow:"立即购买"}},PAY_WITH_CARD:{screenTitle:"用卡支付",loading:"带您前往Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"交易失败",primaryAction:"再试一次",secondaryAction:"查看详情"},SERVICE_BREAKDOWN:{description:"抱歉,我们现在无法处理您的付款。请几分钟后再试。",secondaryAction:"关闭"},PRODUCT_NOT_FOUND:{description:"抱歉,所请求的数量缺货。请考虑购买较少数量。",secondaryAction:"关闭"},INSUFFICIENT_STOCK:{description:"抱歉,库存不足。请考虑购买较少数量。",secondaryAction:"关闭"},TRANSAK_FAILED:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},WALLET_FAILED:{description:"抱歉,我们现在无法处理。请返回。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED_NO_FUNDS:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED:{description:"您需要在钱包中批准交易才能继续。",primaryAction:"再试一次",secondaryAction:"取消"},WALLET_POPUP_BLOCKED:{description:"您需要允许浏览器中的弹出窗口才能继续。",primaryAction:"我已经解决了这个问题,再试一次",secondaryAction:"取消"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"抱歉,转移资金时出错。请再试一次。",primaryAction:"再试一次",secondaryAction:"取消"},DEFAULT_ERROR:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},INVALID_PARAMETERS:{description:"抱歉,我们无法处理您的订单。客户提供的信息不完整。",secondaryAction:"关闭"}}},SALE_SUCCESS:{text:"订单已完成",actionText:"继续"},WALLET_NETWORK_SELECTION:{layoutHeading:"转移资金",heading:"您想在哪两个地方之间转移资金?",fromFormInput:{heading:"从",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"来自钱包",networkSelectorHeading:"来自网络"},toFormInput:{heading:"至",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"至钱包",networkSelectorHeading:"To network"},submitButton:{text:"下一步"}},BRIDGE_FORM:{header:{title:"移动代币"},fees:{title:"燃气费",fiatPricePrefix:"≈ 美元 $"},content:{title:"您想要转移多少金额?",fiatPricePrefix:"约美元",availableBalancePrefix:"可用余额"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"您想要转移什么?"},buttonText:"审阅"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noTokenSelected:"选择要移动的代币"}},BRIDGE_REVIEW:{layoutHeading:"转移资金",heading:"这样看起来怎么样?",fromLabel:{amountHeading:"正在转移",heading:"从"},toLabel:{heading:"至"},fees:{heading:"燃气费"},submitButton:{buttonText:"确认转移"},fiatPricePrefix:"≈ 美元 $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"交易失败",actionText:"审查并重试"}},APPROVE_TRANSACTION:{content:{heading:"在您的钱包中批准交易",body:"按照钱包弹出窗口中的提示进行确认。"},footer:{buttonText:"好的",retryText:"再试一次"},loadingView:{text:"开始转移"}},IN_PROGRESS:{heading:"转移进行中",body1:"您的资金已经发送,距离收到不到20分钟。您可以点击火箭图标返回并查看进展。",body2:"您可以关闭这个窗口。",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"进行中",passportDashboard:"在您的完整交易历史中查看",status:{withdrawalPending:{actionButtonText:"继续",withdrawalDelayText:"此操作已暂停,请返回",withdrawalReadyText:"需要采取措施来接收您的代币",caption:"已暂停"},inProgress:{heading:"进行中",txnEstimate:"通常需要20分钟",stepInfo:"查看详情"},emptyState:{notConnected:{body:"连接您的钱包以查看交易",buttonText:"连接"}},noTransactions:{body:"您已完成所有操作。",passport:{body:"在",link:"护照"}}},changeWallet:{buttonText:"更换钱包"},fiatPricePrefix:"≈ 美元 $",support:{body1:"需要帮助吗?",body2:" 联系 ",body3:"支持",supportLink:"https://support.immutable.com/en/",passport:{body1:"或在您的 ",body2:"护照"}},walletSelection:{heading:"选择要查看的钱包"}},CLAIM_WITHDRAWAL:{content:{heading:"按提示操作以接收您的代币",body:"您将被要求支付一笔小额燃气费以领取您的提款。",body2:"目标钱包地址:"},footer:{buttonText:"继续",retryText:"重试"},IN_PROGRESS:{loading:{text:"处理中"},success:{text:"成功",actionText:"完成"},failure:{text:"交易失败",actionText:"请重试"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap是第三方应用。Immutable不构建、拥有、操作或部署Quickswap。更多信息请参阅Quickswap的网站。"}},wallets:{passport:{heading:"Immutable Passport",description:"您的游戏钱包,可以用卡支付、管理物品等。"},metamask:{heading:"MetaMask",description:"用于访问区块链应用和web3的数字钱包。"},walletconnect:{heading:"其他钱包",description:"允许您连接任何区块链移动钱包,包括MetaMask。"},browserwallet:{heading:"浏览器钱包",description:"用于访问区块链应用和web3的数字钱包。"},recommended:"推荐"},drawers:{feesBreakdown:{heading:"费用分解",total:"费用总计",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"气体费用"},approvalFee:{label:"批准费"},swapGasFee:{label:"气体费用"},swapSecondaryFee:{label:"{{amount}} 交换费(已计入报价)"},serviceFee:{depositLabel:"zkEVM 气体费用",withdrawLabel:"Ethereum 气体费用"}}},transactionFailed:{content:{heading1:"在继续前我们需要您在钱包中确认",heading2:"钱包确认",body1:"当MetaMask弹出时,请确保",body2:"签署交易"},buttons:{retry:"明白了",cancel:"关闭"}},coinSelector:{option:{fiatPricePrefix:"约美元 $"},noCoins:"您的钱包中没有可选择的代币。"},notEnoughGas:{content:{heading:"您需要更多{{token}}来支付燃气费",body:"您的{{token}}余额不足以支付此操作的燃气费,因此在继续之前,您需要添加更多{{token}}。"},buttons:{adjustAmount:"调整金额",addMoreImx:"添加 IMX 代币",copyAddress:"复制钱包地址",cancel:"关闭"}},notEnoughImx:{content:{noImx:{heading:"您需要IMX代币进行交换",body:"交换费用以IMX代币支付,因此在交换之前,您需要添加IMX代币"},insufficientImx:{heading:"您需要更多的IMX代币",body:"为了支付指定金额的费用,您需要添加更多的IMX代币"}},buttons:{adjustAmount:"调整金额",addMoreImx:"添加 IMX 代币",cancel:"关闭"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"用于燃气",body1:"添加",body2:"到您的目标账户,或选择另一个账户支付燃气费。您的目标账户将保持不变。"},buttons:{retry:"使用另一个账户支付燃气费",dismiss:"取消"}},unableToSwap:{heading:"无法交换此代币",body:"这种代币配对当前无法交换。请尝试选择其他选项",buttons:{cancel:"关闭"}},networkSwitch:{heading:"在您的{{wallet}}中切换网络",manualSwitch:{body:"您需要打开您的移动钱包并切换到{{chain}}网络才能继续进行"},controlledSwitch:{body:"您需要切换到{{chain}}网络才能继续进行"},switchButton:"切换到{{chain}}"},walletConnectionError:{unableToConnect:{heading:"无法连接",body:"请检查您的钱包并重试,或关闭并尝试其他选项。",actionButtonText:"重试"},changedYourMind:{heading:"改变主意了吗?",body:"确保弹出窗口已启用,并按照钱包中的提示进行连接。",actionButtonText:"重试"}}}}}};var Ake;vSe.use(yke).use(zSe).init({fallbackLng:"en",resources:Eke,interpolation:{escapeValue:!1}});var xke=LTe;Ake=xke.createRoot,xke.hydrateRoot;const Oke="development",Cke="native",Ike=18,_ke=6,Pke=700,Ske="IMX",kke="ETH",Rke="https://support.immutable.com/en/",Nke={retryIntervalMs:1e4,retries:60,nonRetryable:e=>e?.data?.code>=500||e.type===aW.GET_ERC20_BALANCE_ERROR,nonRetryableSilently:e=>e.type===aW.WEB3_PROVIDER_ERROR},Mke={retryIntervalMs:1e4,retries:60,nonRetryableSilently:e=>!!e},Dke=qt.SANDBOX,Lke=BH.DARK;YH.METAMASK;const jke=3e4,Fke={[Oke]:"https://checkout-cdn.dev.immutable.com",[qt.SANDBOX]:"https://checkout-cdn.sandbox.immutable.com",[qt.PRODUCTION]:"https://checkout-cdn.immutable.com"},Bke={[Oke]:"https://testnet.axelarscan.io/gmp/",[qt.SANDBOX]:"https://testnet.axelarscan.io/gmp/",[qt.PRODUCTION]:"https://axelarscan.io/gmp/"},Uke={[Oke]:"https://passport.sandbox.immutable.com/",[qt.SANDBOX]:"https://passport.sandbox.immutable.com/",[qt.PRODUCTION]:"https://passport.immutable.com/"};qt.SANDBOX,qt.PRODUCTION;const zke=91e3;function Hke(e){return e&&Object.values(qt).includes(e)?e:Dke}function Wke(e,t){return t?"true"===t||"false"!==t&&e:e}const Vke=e=>e.isProduction?UH.ETHEREUM:UH.SEPOLIA,Gke=e=>e.isDevelopment?UH.IMTBL_ZKEVM_DEVNET:e.isProduction?UH.IMTBL_ZKEVM_MAINNET:UH.IMTBL_ZKEVM_TESTNET;UH.IMTBL_ZKEVM_DEVNET,UH.IMTBL_ZKEVM_TESTNET,UH.IMTBL_ZKEVM_MAINNET,UH.ETHEREUM,UH.SEPOLIA,UH.IMTBL_ZKEVM_DEVNET,UH.IMTBL_ZKEVM_MAINNET,UH.IMTBL_ZKEVM_TESTNET,UH.ETHEREUM,UH.SEPOLIA;const qke={[UH.IMTBL_ZKEVM_DEVNET]:zH.IMTBL_ZKEVM_DEVNET,[UH.IMTBL_ZKEVM_MAINNET]:zH.IMTBL_ZKEVM_MAINNET,[UH.IMTBL_ZKEVM_TESTNET]:zH.IMTBL_ZKEVM_TESTNET,[UH.ETHEREUM]:zH.ETHEREUM,[UH.SEPOLIA]:zH.SEPOLIA},Kke="IMTBL_WIDGET_PROVIDER_EVENT";var Xke;function Yke(e,t){e.provider.on(Xke.CHAIN_CHANGED,t)}function Zke(e,t){e.provider.removeListener(Xke.CHAIN_CHANGED,t)}function Jke(){window.dispatchEvent(new CustomEvent(Kke))}function Qke(e){var t;t=Jke,e.provider.removeListener(Xke.ACCOUNTS_CHANGED,t),Zke(e,Jke),function(e,t){e.provider.on(Xke.ACCOUNTS_CHANGED,t)}(e,Jke),Yke(e,Jke)}function $ke(e){const t=new CustomEvent(IH.IMTBL_WIDGETS_PROVIDER,{detail:{type:_H.PROVIDER_UPDATED,data:e}});void 0!==window&&window.dispatchEvent(t)}!function(e){e.CHAIN_CHANGED="chainChanged",e.ACCOUNTS_CHANGED="accountsChanged"}(Xke||(Xke={}));class eRe{checkout;targetId;reactRoot;widgetElement;properties;parameters;web3Provider;eventHandlers=new Map;eventHandlersFunction;eventTopic="";constructor(e,t){const n=this.getValidatedProperties(t);this.parameters={},this.checkout=e,this.properties=n,this.web3Provider=t?.provider,this.web3Provider&&Qke(this.web3Provider),this.setupProviderUpdatedListener(),this.setupDisconnectProviderListener(),this.setLanguage(t.config?.language)}async setLanguage(e){null!=e&&(await vSe.changeLanguage(e),console.log("Language changed:",e))}unmount(){this.parameters=this.getValidatedParameters({}),this.reactRoot?.unmount(),document.getElementById(this.targetId)?.replaceChildren(),this.reactRoot=void 0}mount(e,t){this.parameters=this.getValidatedParameters({...this.parameters??{},...t??{}}),this.targetId=e;const n=document.getElementById(e);this.widgetElement||(this.widgetElement=document.createElement("div")),0===n?.children.length?n?.appendChild(this.widgetElement):n?.replaceChildren(this.widgetElement),!this.reactRoot&&n&&this.widgetElement&&(this.reactRoot=Ake(this.widgetElement)),this.setLanguage(t?.language),this.render()}update(e){this.properties=this.getValidatedProperties({config:{...this.properties.config??{},...e.config??{}}}),e.provider&&console.warn("Updating a widget provider through the update() method is not supported yet"),this.setLanguage(e.config?.language),this.render()}addListener(e,t){this.eventHandlers.set(e,t),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)}removeListener(e){this.eventHandlers.delete(e),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlers.size<=0||(this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction))}strongConfig(){return e={theme:this.properties.config?.theme,environment:this.checkout.config.environment,isOnRampEnabled:this.checkout.config.isOnRampEnabled,isSwapEnabled:this.checkout.config.isSwapEnabled,isBridgeEnabled:this.checkout.config.isBridgeEnabled},{theme:(t=e?.theme,t&&Object.values(BH).includes(t)?t:Lke),environment:Hke(e?.environment),isOnRampEnabled:Wke(!0,e?.isOnRampEnabled?.toString()),isSwapEnabled:Wke(!0,e?.isSwapEnabled?.toString()),isBridgeEnabled:Wke(!0,e?.isBridgeEnabled?.toString())};var e,t}setupProviderUpdatedListener(){window.addEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.handleProviderUpdatedEvent);const e=this;window.addEventListener(Kke,(()=>e.handleEIP1193ProviderEvents(e)))}setupDisconnectProviderListener(){window.addEventListener(IH.IMTBL_WALLET_WIDGET_EVENT,this.handleDisconnectEvent)}handleEIP1193ProviderEvents(e){e.web3Provider&&(e.web3Provider=new Md(e.web3Provider.provider)),e.render()}handleProviderUpdatedEvent=e=>{const t=this;switch(e.detail.type){case _H.PROVIDER_UPDATED:{const n=e.detail.data;t.web3Provider=n.provider,this.render();break}}};handleDisconnectEvent=e=>{const t=this;if(e.detail.type===SH.DISCONNECT_WALLET)t.web3Provider=void 0,this.render()}}const tRe=oV.lazy((()=>Promise.resolve().then((function(){return Fqe}))));class nRe extends eRe{eventTopic=IH.IMTBL_CONNECT_WIDGET_EVENT;getValidatedProperties({config:e}){return{config:e}}getValidatedParameters(e){const t=e;return!e.targetChainId&&this.checkout.config.isProduction?t.targetChainId=UH.IMTBL_ZKEVM_MAINNET:e.targetChainId&&this.checkout.config.isProduction&&e.targetChainId!==UH.ETHEREUM&&e.targetChainId!==UH.IMTBL_ZKEVM_MAINNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.PRODUCTION} environment, defaulting to ${CPe(UH.IMTBL_ZKEVM_MAINNET)}, chainId ${UH.IMTBL_ZKEVM_MAINNET}`),t.targetChainId=UH.IMTBL_ZKEVM_MAINNET),e.targetChainId||this.checkout.config.environment!==qt.SANDBOX?e.targetChainId&&this.checkout.config.environment===qt.SANDBOX&&e.targetChainId!==UH.SEPOLIA&&e.targetChainId!==UH.IMTBL_ZKEVM_TESTNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.SANDBOX} environment, defaulting to ${CPe(UH.IMTBL_ZKEVM_TESTNET)}, chainId ${UH.IMTBL_ZKEVM_TESTNET}`),t.targetChainId=UH.IMTBL_ZKEVM_TESTNET):t.targetChainId=UH.IMTBL_ZKEVM_TESTNET,e}render(){if(!this.reactRoot)return;const{t:e}=vSe;this.reactRoot.render(Eq(oV.StrictMode,{children:Eq(APe,{checkout:this.checkout,children:Eq(TAe,{id:"connect-container",config:this.strongConfig(),children:Eq(DPe,{children:Eq(aV.Suspense,{fallback:Eq(OPe,{loadingText:e("views.LOADING_VIEW.text")}),children:Eq(tRe,{config:this.strongConfig(),checkout:this.checkout,targetWalletRdns:this.parameters.targetWalletRdns,targetChainId:this.parameters.targetChainId,blocklistWalletRdns:this.parameters.blocklistWalletRdns})})})})})}))}}const rRe={width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"base.spacing.x4",paddingBottom:"base.spacing.x10"},iRe={maxHeight:"base.spacing.x20",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x5"},aRe={width:"base.icon.size.400"},oRe={display:"flex",flexDirection:"column",paddingX:"base.spacing.x4",paddingBottom:"base.spacing.x4"},sRe={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"base.spacing.x2",color:"base.color.text.body.primary"},cRe={display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",color:"base.color.text.body.secondary"};function uRe({actionText:e,onActionClick:t,hideActionButton:n=!1,loading:r=!1,variant:i="secondary"}){return Eq(P3,{testId:"footer-button-container",sx:rRe,children:!n&&Eq(T3,{testId:"footer-button",size:"large",sx:{width:"100%"},variant:i,disabled:r,onClick:t,children:r?Eq(T3.Icon,{icon:"Loading",sx:aRe}):e})})}const lRe=e=>({backgroundColor:e?"transparent":""}),dRe=(e=!1)=>({backgroundColor:e?"base.color.translucent.standard.200":""});var fRe;!function(e){e.LOADING_VIEW="LOADING_VIEW",e.ERROR_VIEW="ERROR_VIEW",e.SERVICE_UNAVAILABLE_ERROR_VIEW="SERVICE_UNAVAILABLE_ERROR_VIEW",e.TOP_UP_VIEW="TOP_UP_VIEW"}(fRe||(fRe={}));const pRe={view:{type:fRe.LOADING_VIEW},history:[]};var hRe;!function(e){e.UPDATE_VIEW="UPDATE_VIEW",e.GO_BACK="GO_BACK",e.GO_BACK_TO="GO_BACK_TO"}(hRe||(hRe={}));const mRe=aV.createContext({viewState:pRe,viewDispatch:()=>{}});mRe.displayName="ViewContext";const yRe=(e,t)=>{switch(t.payload.type){case hRe.UPDATE_VIEW:{const{view:n,currentViewData:r}=t.payload;n.type===fRe.ERROR_VIEW&&console.error(n.error);const{history:i}=e;return 0!==i.length&&i[i.length-1].type===n.type||(r&&(i[i.length-1]={...i[i.length-1],data:r}),i.push(n)),{...e,view:n,history:i}}case hRe.GO_BACK:{if(e.history.length<=1)return{...e};const t=e.history.slice(0,-1);return{...e,history:t,view:t[t.length-1]}}case hRe.GO_BACK_TO:{if(e.history.length<=1)return{...e};const{history:n}=e,r=[...n];let i=!1;for(let a=n.length-1;a>=0;a--){if(e.history[a].type===t.payload.view.type){i=!0;break}r.pop()}return i?{...e,history:r,view:r[r.length-1]}:{...e}}default:return e}};function bRe({title:e,showBack:t=!1,transparent:n=!1,onBackButtonClick:r,onCloseButtonClick:i,rightActions:a}){const{viewDispatch:o}=aV.useContext(mRe);return Aq(hoe,{testId:"header-navigation-container",sx:lRe(n),contentAlign:t?"center":"left",size:"small",children:[t&&Eq(hoe.LeftButtCon,{sx:dRe(n),icon:"ArrowBackward",iconVariant:"bold",onClick:()=>{r?r():(async()=>{o({payload:{type:hRe.GO_BACK}})})()},testId:"back-button"}),Eq(hoe.Title,{testId:"header-title",size:"small",children:e}),Aq(hoe.RightSlot,{children:[a,i&&Eq(s4,{iconVariant:"bold",sx:dRe(n),icon:"Close",onClick:i,testId:"close-button"})]})]})}const gRe={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},vRe={justifyContent:"flex-end"},wRe={position:"relative",height:"305px",width:"100%"};function TRe(){return Aq(P3,{sx:wRe,children:[Aq("svg",{width:"430",height:"306",viewBox:"0 0 430 306",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Eq("rect",{x:"-1",y:"0.978516",width:"446",height:"305",fill:"url(#paint0_linear_3034_48563)"}),Eq("defs",{children:Aq("linearGradient",{id:"paint0_linear_3034_48563",x1:"222",y1:"0.978516",x2:"222",y2:"305.979",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#01003F",stopOpacity:"0"}),Eq("stop",{offset:"1",stopColor:"#6B4292",stopOpacity:"0.432292"})]})})]}),Eq(P3,{sx:gRe,children:Aq("svg",{width:"174",height:"180",viewBox:"0 0 174 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Eq("path",{opacity:"0.5",d:"M135.919 70.8386C136.877 67.1564 136.676 62.3424 133.109 57.2929C129.543 52.2434 125.073 50.4446 121.282 50.116",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),Eq("path",{opacity:"0.5",d:"M128.95 72.1044C129.792 69.2107 129.738 65.4595 127.01 61.5982C124.283 57.7368 120.766 56.4311 117.757 56.2577",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),Eq("rect",{x:"49.3672",y:"30.5654",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 49.3672 30.5654)",fill:"url(#paint0_linear_2795_41752)"}),Eq("g",{filter:"url(#filter0_d_2795_41752)",children:Eq("circle",{cx:"118.481",cy:"67.6248",r:"2.23855",transform:"rotate(54.7665 118.481 67.6248)",fill:"#D0D2E2"})}),Eq("path",{d:"M47.6489 31.7791L28.5344 45.2796C27.5854 45.9499 27.3595 47.2625 28.0297 48.2115L48.5554 77.2724L54.7482 38.184L50.5808 32.2837C49.9105 31.3347 48.5979 31.1088 47.6489 31.7791Z",fill:"#D9D9D9",fillOpacity:"0.1"}),Eq("line",{x1:"63.724",y1:"50.8925",x2:"41.1729",y2:"66.8203",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"67.0235",y1:"79.3011",x2:"38.1813",y2:"38.4654",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"55.9759",y1:"39.9228",x2:"33.4249",y2:"55.8506",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"71.0423",y1:"61.2538",x2:"48.4913",y2:"77.1816",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("rect",{x:"101.025",y:"103.704",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 101.025 103.704)",fill:"url(#paint1_linear_2795_41752)"}),Eq("line",{x1:"115.384",y1:"124.032",x2:"92.8331",y2:"139.96",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"118.684",y1:"152.44",x2:"89.8414",y2:"111.604",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"107.632",y1:"113.06",x2:"85.0811",y2:"128.988",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"122.702",y1:"134.393",x2:"100.151",y2:"150.321",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("path",{d:"M96.3684 97.1098C97.0387 98.0588 96.8127 99.3715 95.8637 100.042L53.3683 130.056C50.5214 132.067 46.5834 131.389 44.5726 128.542L35.9266 116.301C33.9158 113.454 34.5936 109.516 37.4406 107.505L79.936 77.4907C80.8849 76.8204 82.1976 77.0464 82.8679 77.9953L96.3684 97.1098Z",fill:"url(#paint2_linear_2795_41752)"}),Eq("path",{d:"M123.831 88.136C124.166 88.6105 124.053 89.2668 123.578 89.6019L123.336 89.7733C113.846 96.476 100.719 94.2165 94.0166 84.7267L93.7517 84.3516C87.049 74.8617 89.3085 61.7351 98.7983 55.0325L99.041 54.8611C99.5154 54.526 100.172 54.6389 100.507 55.1134L123.831 88.136Z",fill:"url(#paint3_linear_2795_41752)"}),Aq("defs",{children:[Aq("filter",{id:"filter0_d_2795_41752",x:"114.664",y:"63.808",width:"7.63206",height:"7.63303",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Eq("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Eq("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"}),Eq("feMorphology",{radius:"0.525916",operator:"dilate",in:"SourceAlpha",result:"effect1_dropShadow_2795_41752"}),Eq("feOffset",{}),Eq("feGaussianBlur",{stdDeviation:"0.525916"}),Eq("feComposite",{in2:"hardAlpha",operator:"out"}),Eq("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.384314 0 0 0 0 0.4 0 0 0 0 0.580392 0 0 0 1 0"}),Eq("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2795_41752"}),Eq("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2795_41752",result:"shape"})]}),Aq("linearGradient",{id:"paint0_linear_2795_41752",x1:"53.8443",y1:"29.4462",x2:"98.6153",y2:"58.1742",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),Eq("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),Eq("stop",{offset:"1",stopColor:"#2D203D"})]}),Aq("linearGradient",{id:"paint1_linear_2795_41752",x1:"105.502",y1:"102.585",x2:"150.273",y2:"131.313",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),Eq("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),Eq("stop",{offset:"1",stopColor:"#2D203D"})]}),Aq("linearGradient",{id:"paint2_linear_2795_41752",x1:"88.8945",y1:"89.2396",x2:"42.7826",y2:"120.454",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#7676A3"}),Eq("stop",{offset:"1",stopColor:"#EDEFF5"})]}),Aq("linearGradient",{id:"paint3_linear_2795_41752",x1:"112.599",y1:"72.2342",x2:"91.9662",y2:"86.3506",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#DEDFEB"}),Eq("stop",{offset:"0.916667",stopColor:"#656997"})]})]})]})})]})}const ERe={paddingX:"base.spacing.x4",paddingTop:"base.spacing.x10"},ARe={marginTop:"base.spacing.x3"},xRe={color:"base.color.text.body.secondary"};function ORe(e){const{heading:t,children:n}=e;return Aq(P3,{sx:ERe,children:[Eq(Hee,{testId:"simple-text-body__heading",size:"small",children:t}),Eq(P3,{sx:ARe,children:Eq(J7,{testId:"simple-text-body__body",size:"small",sx:xRe,children:n})})]})}function CRe({actionText:e,onActionClick:t,errorEventAction:n,errorEventActionLoading:r=!1,onCloseClick:i}){const{t:a}=Tke();"function"==typeof n&&n();return Eq(xPe,{header:Eq(bRe,{transparent:!0,onCloseButtonClick:i}),footer:Eq(uRe,{loading:r,actionText:e,onActionClick:()=>"function"==typeof t&&t()}),heroContent:Eq(TRe,{}),floatHeader:!0,testId:"error-view",children:Aq(ORe,{heading:a("views.ERROR_VIEW.heading"),children:[a("views.ERROR_VIEW.body",{returnObjects:!0})[0]," ",Eq(Iae,{size:"small",rc:Eq("a",{href:"https://support.immutable.com/en/"}),children:a("views.ERROR_VIEW.body",{returnObjects:!0})[1]})," ",a("views.ERROR_VIEW.body",{returnObjects:!0})[2]]})})}var IRe;!function(e){e.NOT_CONNECTED_NO_PROVIDER="NOT_CONNECTED_NO_PROVIDER",e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTED_WRONG_NETWORK="CONNECTED_WRONG_NETWORK",e.CONNECTED_WITH_NETWORK="CONNECTED_WITH_NETWORK",e.ERROR="ERROR",e.LOADING="LOADING"}(IRe||(IRe={}));const _Re={connectionStatus:IRe.LOADING,checkout:void 0,provider:void 0};var PRe;!function(e){e.UPDATE_CONNECTION_STATUS="UPDATE_CONNECTION_STATUS",e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER"}(PRe||(PRe={}));const SRe=aV.createContext({connectLoaderState:_Re,connectLoaderDispatch:()=>{}}),kRe=(e,t)=>{switch(t.payload.type){case PRe.UPDATE_CONNECTION_STATUS:return{...e,connectionStatus:t.payload.connectionStatus,deepLink:t.payload.deepLink};case PRe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case PRe.SET_PROVIDER:return{...e,provider:t.payload.provider};default:return e}},RRe={timx:"imx"},NRe=(e,t,n)=>e.chainId===Gke(n)?-1:e.chainId===Vke(n)?0:1,MRe=(e,t,n,r="0.00",i=2)=>{if(!e)return r;const a=RRe[t.toLowerCase()]||t.toLowerCase(),o=n.get(a);if(!o)return r;const s=parseFloat(e);return 0===parseFloat(e)||Number.isNaN(s)?r:((e,t=2)=>{const n=10**t;return(Math.round(e*n)/n).toFixed(t)})(s*o,i)},DRe=(e,t=!1)=>{const n="-.--";return e&&("0.00"!==e||t)?e:n},LRe=(e,t)=>{const n=e.indexOf(".");return parseFloat(e.substring(0,n+t+1)).toFixed(t)},jRe=(e,t=6)=>{const n=e.toString();if(-1===n.indexOf("."))return n;if("."===n[0]||0===parseInt(n[0],10)){let e=Math.min(t,6),r=LRe(n,e);if(0===parseFloat(r))for(;"0"===(r[r.length-1]||"")&&e<t&&(e+=1,r=LRe(n,e),"0"===(r[r.length-1]||"")););return r}let r=LRe(n,2);return r.endsWith(".00")&&(r=LRe(r,0)),r},FRe=e=>e===UH.IMTBL_ZKEVM_DEVNET||e===UH.IMTBL_ZKEVM_TESTNET||e===UH.IMTBL_ZKEVM_MAINNET,BRe=e=>e===UH.SEPOLIA||e===UH.ETHEREUM,URe=e=>!e||e.toLocaleLowerCase()===Cke;function zRe(e,t){return`${Fke[e??qt.PRODUCTION]}/v1/blob/img${t}`}function HRe(e,t){return`${Fke[e??qt.PRODUCTION]}/v1/blob/rive${t}`}function WRe(e,t){return zRe(e,`/chains/${t}.png`)}function VRe(e,t){return zRe(e,`/tokens/${t.toLowerCase()}.svg`)}function GRe(e,t){return t===BH.LIGHT?zRe(e,"/tokens/defaultonlight.svg"):zRe(e,"/tokens/defaultondark.svg")}function qRe(e,t=".....",n=5,r=4){return`${e.slice(0,n)}${t}${e.slice(-r)}`}function KRe(e,t){return e.toLowerCase()===t.toLowerCase()}const XRe={checkout:null,provider:null,passport:void 0,walletProviderInfo:null,walletProviderName:null,sendCloseEvent:()=>{}};var YRe;!function(e){e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER",e.SET_PASSPORT="SET_PASSPORT",e.SET_WALLET_PROVIDER_NAME="SET_WALLET_PROVIDER_NAME",e.SET_SEND_CLOSE_EVENT="SET_SEND_CLOSE_EVENT"}(YRe||(YRe={}));const ZRe=aV.createContext({connectState:XRe,connectDispatch:()=>{}});ZRe.displayName="ConnectContext";const JRe=(e,t)=>{switch(t.payload.type){case YRe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case YRe.SET_PROVIDER:return{...e,provider:t.payload.provider};case YRe.SET_PASSPORT:return{...e,passport:t.payload.passport};case YRe.SET_WALLET_PROVIDER_NAME:return{...e,walletProviderName:t.payload.walletProviderName};case YRe.SET_SEND_CLOSE_EVENT:return{...e,sendCloseEvent:t.payload.sendCloseEvent};default:return e}};var QRe;function $Re({hideLogo:e}){return Eq(P3,{testId:"footer-logo-container",sx:iRe,children:!e&&Eq(T8,{testId:"footer-logo-image",logo:"ImmutableHorizontalLockup",sx:{width:"base.spacing.x25"}})})}function eNe({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=Tke(),a=zRe(t.config.environment??qt.PRODUCTION,"/walleterroryellow.svg");return Eq(yne,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:Aq(yne.Content,{testId:"unable-to-connect-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Aq(P3,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Eq(W9,{sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"},use:Eq("img",{src:a,alt:i("drawers.walletConnectionError.unableToConnect.heading")})}),Eq(s4,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),Aq(P3,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[Eq(Hee,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.heading")}),Eq(J7,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.body")})]})]}),Eq(P3,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:Eq(T3,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.unableToConnect.actionButtonText")})})]})})}function tNe({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=Tke(),a=zRe(t.config.environment??qt.PRODUCTION,"/walleterrorred.svg");return Eq(yne,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:Aq(yne.Content,{testId:"changed-your-mind-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Aq(P3,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Eq(W9,{sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"},use:Eq("img",{src:a,alt:i("drawers.walletConnectionError.changedYourMind.heading")})}),Eq(s4,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),Aq(P3,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[Eq(Hee,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.heading")}),Eq(J7,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.body")})]})]}),Eq(P3,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:Eq(T3,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.changedYourMind.actionButtonText")})})]})})}!function(e){e.CONNECT_WALLET="CONNECT_WALLET",e.PASSPORT="PASSPORT",e.SWITCH_NETWORK="SWITCH_NETWORK",e.SUCCESS="SUCCESS"}(QRe||(QRe={}));const nNe={minw:"16px",padding:"8px",display:"flex",bg:"base.color.translucent.standard.100",overflow:"hidden",borderRadius:"4px",objectFit:"cover",objectPosition:"center",backgroundColor:"base.color.translucent.standard.200",justifyContent:"center",alignItems:"center",flexShrink:0,width:"48px",height:"48px"},rNe={width:"auto",height:"100%",objectFit:"contain",objectPosition:"50% 50%"};function iNe({src:e,alt:t,sx:n={},...r}){return Eq(P3,{className:"FramedImage AspectRatioImage",sx:{...nNe,...n},rc:Eq("span",{}),...r,children:Eq("img",{src:e,alt:t,className:"CloudImage",style:O5(rNe),loading:"lazy"})})}function aNe(e){return!0===e?.provider?.isPassport}function oNe(e){return!0===e?.provider?.isMetaMask}function sNe(e){return!0===e?.provider?.isWalletConnect}function cNe(e,t){if(oNe(e))return YH.METAMASK.toString();if(aNe(e))return YH.PASSPORT.toString();if(sNe(e))return"walletconnect";if(t&&e){const n=t.find((t=>t.provider===e.provider));if(n)return n.info.name}return"Other"}function uNe(e){let t="";switch(e){case"com.immutable.passport":t="passport";break;case"io.metamask":t="metamask";break;case"com.coinbase.wallet":t="coinbase-wallet";break;default:t=e}return t}function lNe(e){return aNe(e)}async function dNe(e,t,n){let r=!1,i=t;try{const{isConnected:n}=await e.checkIsWalletConnected({provider:t});r=n}catch(e){throw console.error(e),e}if(!r||n)try{const{provider:a}=await e.connect({provider:t,requestWalletPermissions:n});i=a,r=!0}catch(e){throw e.type===aW.USER_REJECTED_REQUEST_ERROR&&console.log("User rejected request"),console.error(e),e}return i}function fNe({rc:e=Eq("span",{}),loading:t=!1,recommended:n=!1,providerDetail:r,onWalletItemClick:i}){const{t:a}=Tke(),{isSmallScreenMode:o}=function(){const{state:e}=I8((e=>e.width));return{isSmallScreenMode:"number"==typeof e&&e<uAe.breakpoint.medium}}(),[s,c]=aV.useState(!1),u=uNe(r.info.rdns),l=u===YH.PASSPORT||u===YH.METAMASK,d={marginLeft:"65px"};return Aq(nae,{rc:aV.cloneElement(e,{onClick:async()=>{if(!t){c(!0);try{await i(r)}finally{c(!1)}}}}),testId:`wallet-list-${r.info.rdns}`,size:"medium",emphasized:!0,sx:{marginBottom:"base.spacing.x1",position:"relative"},children:[Eq(iNe,{src:r.info.icon,alt:r.info.name,sx:{position:"absolute",left:"base.spacing.x3"}}),Aq(nae.Label,{size:"medium",sx:d,children:[n&&o&&Eq(see,{variant:"guidance",isAnimated:!1,badgeContent:a("wallets.recommended"),sx:{display:"inline-flex",marginBottom:"base.spacing.x1"}}),Eq(P3,{children:r.info.name})]}),!s&&Eq(nae.IntentIcon,{}),Eq(nae.Caption,{sx:{...d},children:l&&a(`wallets.${u}.description`)}),(n||s)&&!o&&Eq(nae.Badge,{variant:"guidance",isAnimated:s,badgeContent:s?"":a("wallets.recommended")})]})}const pNe=Symbol(),hNe=Object.getPrototypeOf,mNe=new WeakMap,yNe=e=>(e=>e&&(mNe.has(e)?mNe.get(e):hNe(e)===Object.prototype||hNe(e)===Array.prototype))(e)&&e[pNe]||null,bNe=(e,t=!0)=>{mNe.set(e,t)},gNe=e=>"object"==typeof e&&null!==e,vNe=new WeakMap,wNe=new WeakSet,[TNe]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>gNe(e)&&!wNe.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),i=new WeakMap,a=((e,t,n=r)=>{const o=i.get(e);if((null==o?void 0:o[0])===t)return o[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return bNe(s,!0),i.set(e,[t,s]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(s,t))return;const r=Reflect.get(e,t),i={value:r,enumerable:!0,configurable:!0};if(wNe.has(r))bNe(r,!1);else if(r instanceof Promise)delete i.value,i.get=()=>n(r);else if(vNe.has(r)){const[e,t]=vNe.get(r);i.value=a(e,t(),n)}Object.defineProperty(s,t,i)})),Object.preventExtensions(s)}),o=new WeakMap,s=[1,1],c=(r=>{if(!gNe(r))throw new Error("object required");const i=o.get(r);if(i)return i;let u=s[0];const l=new Set,d=(e,t=++s[0])=>{u!==t&&(u=t,l.forEach((n=>n(e,t))))};let f=s[1];const p=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},h=new Map,m=e=>{var t;const n=h.get(e);n&&(h.delete(e),null==(t=n[1])||t.call(n))},y=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),b={deleteProperty(e,t){const n=Reflect.get(e,t);m(t);const r=Reflect.deleteProperty(e,t);return r&&d(["delete",[t],n]),r},set(t,r,i,a){const s=Reflect.has(t,r),u=Reflect.get(t,r,a);if(s&&(e(u,i)||o.has(i)&&e(u,o.get(i))))return!0;m(r),gNe(i)&&(i=yNe(i)||i);let f=i;if(i instanceof Promise)i.then((e=>{i.status="fulfilled",i.value=e,d(["resolve",[r],e])})).catch((e=>{i.status="rejected",i.reason=e,d(["reject",[r],e])}));else{!vNe.has(i)&&n(i)&&(f=c(i));const e=!wNe.has(f)&&vNe.get(f);e&&((e,t)=>{if(h.has(e))throw new Error("prop listener already exists");if(l.size){const n=t[3](p(e));h.set(e,[t,n])}else h.set(e,[t])})(r,e)}return Reflect.set(t,r,f,a),d(["set",[r],i,u]),!0}},g=t(y,b);o.set(r,g);const v=[y,(e=++s[1])=>(f===e||l.size||(f=e,h.forEach((([t])=>{const n=t[1](e);n>u&&(u=n)}))),u),a,e=>{l.add(e),1===l.size&&h.forEach((([e,t],n)=>{if(t)throw new Error("remove already exists");const r=e[3](p(n));h.set(n,[e,r])}));return()=>{l.delete(e),0===l.size&&h.forEach((([e,t],n)=>{t&&(t(),h.set(n,[e]))}))}}];return vNe.set(g,v),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e);"value"in t&&(g[e]=r[e],delete t.value,delete t.writable),Object.defineProperty(y,e,t)})),g}))=>[c,vNe,wNe,e,t,n,r,i,a,o,s])();function ENe(e={}){return TNe(e)}function ANe(e,t,n){const r=vNe.get(e);let i;r||console.warn("Please use proxy object");const a=[],o=r[3];let s=!1;const c=o((e=>{a.push(e),n?t(a.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(a.splice(0))})))}));return s=!0,()=>{s=!1,c()}}const xNe=ENe({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ONe={state:xNe,subscribe:e=>ANe(xNe,(()=>e(xNe))),push(e,t){e!==xNe.view&&(xNe.view=e,t&&(xNe.data=t),xNe.history.push(e))},reset(e){xNe.view=e,xNe.history=[e]},replace(e){xNe.history.length>1&&(xNe.history[xNe.history.length-1]=e,xNe.view=e)},goBack(){if(xNe.history.length>1){xNe.history.pop();const[e]=xNe.history.slice(-1);xNe.view=e}},setData(e){xNe.data=e}},CNe={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>CNe.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return CNe.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,n){if(CNe.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,n){if(!CNe.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(CNe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(CNe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(CNe.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(CNe.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=ONe.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},INe=ENe({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),_Ne={state:INe,subscribe:e=>ANe(INe.events,(()=>e(function(e,t){const n=vNe.get(e);n||console.warn("Please use proxy object");const[r,i,a]=n;return a(r,i(),t)}(INe.events[INe.events.length-1])))),initialize(){INe.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(INe.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){INe.connectedWalletId=e},click(e){if(INe.enabled){const t={type:"CLICK",name:e.name,userSessionId:INe.userSessionId,timestamp:Date.now(),data:e};INe.events.push(t)}},track(e){if(INe.enabled){const t={type:"TRACK",name:e.name,userSessionId:INe.userSessionId,timestamp:Date.now(),data:e};INe.events.push(t)}},view(e){if(INe.enabled){const t={type:"VIEW",name:e.name,userSessionId:INe.userSessionId,timestamp:Date.now(),data:e};INe.events.push(t)}}},PNe=ENe({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),SNe={state:PNe,subscribe:e=>ANe(PNe,(()=>e(PNe))),setChains(e){PNe.chains=e},setWalletConnectUri(e){PNe.walletConnectUri=e},setIsCustomDesktop(e){PNe.isCustomDesktop=e},setIsCustomMobile(e){PNe.isCustomMobile=e},setIsDataLoaded(e){PNe.isDataLoaded=e},setIsUiLoaded(e){PNe.isUiLoaded=e},setIsAuth(e){PNe.isAuth=e}},kNe=ENe({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),RNe={state:kNe,subscribe:e=>ANe(kNe,(()=>e(kNe))),setConfig(e){var t,n;_Ne.initialize(),SNe.setChains(e.chains),SNe.setIsAuth(Boolean(e.enableAuthMode)),SNe.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),SNe.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),CNe.setModalVersionInStorage(),Object.assign(kNe,e)}};var NNe=Object.defineProperty,MNe=Object.getOwnPropertySymbols,DNe=Object.prototype.hasOwnProperty,LNe=Object.prototype.propertyIsEnumerable,jNe=(e,t,n)=>t in e?NNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const FNe="https://explorer-api.walletconnect.com",BNe="wcm",UNe="js-2.6.2";async function zNe(e,t){const n=((e,t)=>{for(var n in t||(t={}))DNe.call(t,n)&&jNe(e,n,t[n]);if(MNe)for(var n of MNe(t))LNe.call(t,n)&&jNe(e,n,t[n]);return e})({sdkType:BNe,sdkVersion:UNe},t),r=new URL(e,FNe);return r.searchParams.append("projectId",RNe.state.projectId),Object.entries(n).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const HNe={getDesktopListings:async e=>zNe("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>zNe("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>zNe("/w3m/v1/getInjectedListings",e),getAllListings:async e=>zNe("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${FNe}/w3m/v1/getWalletImage/${e}?projectId=${RNe.state.projectId}&sdkType=${BNe}&sdkVersion=${UNe}`,getAssetImageUrl:e=>`${FNe}/w3m/v1/getAssetImage/${e}?projectId=${RNe.state.projectId}&sdkType=${BNe}&sdkVersion=${UNe}`};var WNe=Object.defineProperty,VNe=Object.getOwnPropertySymbols,GNe=Object.prototype.hasOwnProperty,qNe=Object.prototype.propertyIsEnumerable,KNe=(e,t,n)=>t in e?WNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const XNe=CNe.isMobile(),YNe=ENe({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ZNe={state:YNe,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=RNe.state;if("NONE"===e||"ALL"===t&&!e)return YNe.recomendedWallets;if(CNe.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await HNe.getAllListings(t),r=Object.values(n);r.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),YNe.recomendedWallets=r}else{const{chains:e,isAuth:n}=SNe.state,r=e?.join(","),i=CNe.isArray(t),a={page:1,sdks:n?"auth_v1":void 0,entries:CNe.RECOMMENDED_WALLET_AMOUNT,chains:r,version:2,excludedIds:i?t.join(","):void 0},{listings:o}=XNe?await HNe.getMobileListings(a):await HNe.getDesktopListings(a);YNe.recomendedWallets=Object.values(o)}return YNe.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))GNe.call(t,n)&&KNe(e,n,t[n]);if(VNe)for(var n of VNe(t))qNe.call(t,n)&&KNe(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=RNe.state,{recomendedWallets:i}=YNe;if("ALL"===r)return YNe.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):CNe.isArray(n)&&(t.excludedIds=n.join(",")),CNe.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),SNe.state.isAuth&&(t.sdks="auth_v1");const{page:a,search:o}=e,{listings:s,total:c}=XNe?await HNe.getMobileListings(t):await HNe.getDesktopListings(t),u=Object.values(s),l=o?"search":"wallets";return YNe[l]={listings:[...YNe[l].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl:e=>HNe.getWalletImageUrl(e),getAssetImageUrl:e=>HNe.getAssetImageUrl(e),resetSearch(){YNe.search={listings:[],total:0,page:1}}},JNe=ENe({open:!1}),QNe={state:JNe,subscribe:e=>ANe(JNe,(()=>e(JNe))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:r}=SNe.state;if(CNe.removeWalletConnectDeepLink(),SNe.setWalletConnectUri(e?.uri),SNe.setChains(e?.chains),ONe.reset("ConnectWallet"),n&&r)JNe.open=!0,t();else{const e=setInterval((()=>{const n=SNe.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),JNe.open=!0,t())}),200)}})),close(){JNe.open=!1}};var $Ne=Object.defineProperty,eMe=Object.getOwnPropertySymbols,tMe=Object.prototype.hasOwnProperty,nMe=Object.prototype.propertyIsEnumerable,rMe=(e,t,n)=>t in e?$Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const iMe=ENe({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),aMe={state:iMe,subscribe:e=>ANe(iMe,(()=>e(iMe))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(iMe.themeMode=t),n&&(iMe.themeVariables=((e,t)=>{for(var n in t||(t={}))tMe.call(t,n)&&rMe(e,n,t[n]);if(eMe)for(var n of eMe(t))nMe.call(t,n)&&rMe(e,n,t[n]);return e})({},n))}},oMe=ENe({open:!1,message:"",variant:"success"}),sMe={state:oMe,subscribe:e=>ANe(oMe,(()=>e(oMe))),openToast(e,t){oMe.open=!0,oMe.message=e,oMe.variant=t},closeToast(){oMe.open=!1}};let cMe=class{constructor(e){this.openModal=QNe.open,this.closeModal=QNe.close,this.subscribeModal=QNe.subscribe,this.setTheme=aMe.setThemeConfig,aMe.setThemeConfig(e),RNe.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((function(){return L6e}));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),SNe.setIsUiLoaded(!0)}}};var uMe=Object.freeze({__proto__:null,WalletConnectModal:cMe});function lMe(){}function dMe(){dMe.init.call(this)}function fMe(e){return void 0===e._maxListeners?dMe.defaultMaxListeners:e._maxListeners}function pMe(e,t,n,r){var i,a,o;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]):(a=e._events=new lMe,e._eventsCount=0),o){if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(i=fMe(e))&&i>0&&o.length>i){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else o=a[t]=n,++e._eventsCount;return e}function hMe(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function mMe(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function yMe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}lMe.prototype=Object.create(null),dMe.EventEmitter=dMe,dMe.usingDomains=!1,dMe.prototype.domain=void 0,dMe.prototype._events=void 0,dMe.prototype._maxListeners=void 0,dMe.defaultMaxListeners=10,dMe.init=function(){this.domain=null,dMe.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new lMe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},dMe.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},dMe.prototype.getMaxListeners=function(){return fMe(this)},dMe.prototype.emit=function(e){var t,n,r,i,a,o,s,c="error"===e;if(o=this._events)c=c&&null==o.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=o[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=yMe(e,r),a=0;a<r;++a)i[a].call(n)}(n,l,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,a=yMe(e,i),o=0;o<i;++o)a[o].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var a=e.length,o=yMe(e,a),s=0;s<a;++s)o[s].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,a){if(t)e.call(n,r,i,a);else for(var o=e.length,s=yMe(e,o),c=0;c<o;++c)s[c].call(n,r,i,a)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),a=1;a<r;a++)i[a-1]=arguments[a];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,a=yMe(e,i),o=0;o<i;++o)a[o].apply(n,r)}(n,l,this,i)}return!0},dMe.prototype.addListener=function(e,t){return pMe(this,e,t,!1)},dMe.prototype.on=dMe.prototype.addListener,dMe.prototype.prependListener=function(e,t){return pMe(this,e,t,!0)},dMe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,hMe(this,e,t)),this},dMe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,hMe(this,e,t)),this},dMe.prototype.removeListener=function(e,t){var n,r,i,a,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new lMe:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new lMe,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,o||t)}return this},dMe.prototype.off=function(e,t){return this.removeListener(e,t)},dMe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new lMe,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new lMe:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),a=0;a<i.length;++a)"removeListener"!==(r=i[a])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new lMe,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},dMe.prototype.listeners=function(e){var t,n,r=this._events;return n=r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[],n},dMe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):mMe.call(e,t)},dMe.prototype.listenerCount=mMe,dMe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var bMe=Object.freeze({__proto__:null,EventEmitter:dMe,default:dMe}),gMe={},vMe={},wMe={},TMe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(TMe),Object.defineProperty(wMe,"__esModule",{value:!0});var EMe=TMe;function AMe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function xMe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function OMe(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function CMe(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function IMe(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function _Me(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function PMe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function SMe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function kMe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),PMe(e/4294967296>>>0,t,n),PMe(e>>>0,t,n+4),t}function RMe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),SMe(e>>>0,t,n),SMe(e/4294967296>>>0,t,n+4),t}wMe.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},wMe.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},wMe.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},wMe.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},wMe.writeUint16BE=AMe,wMe.writeInt16BE=AMe,wMe.writeUint16LE=xMe,wMe.writeInt16LE=xMe,wMe.readInt32BE=OMe,wMe.readUint32BE=CMe,wMe.readInt32LE=IMe,wMe.readUint32LE=_Me,wMe.writeUint32BE=PMe,wMe.writeInt32BE=PMe,wMe.writeUint32LE=SMe,wMe.writeInt32LE=SMe,wMe.readInt64BE=function(e,t){void 0===t&&(t=0);var n=OMe(e,t),r=OMe(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},wMe.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*CMe(e,t)+CMe(e,t+4)},wMe.readInt64LE=function(e,t){void 0===t&&(t=0);var n=IMe(e,t);return 4294967296*IMe(e,t+4)+n-4294967296*(n>>31)},wMe.readUint64LE=function(e,t){void 0===t&&(t=0);var n=_Me(e,t);return 4294967296*_Me(e,t+4)+n},wMe.writeUint64BE=kMe,wMe.writeInt64BE=kMe,wMe.writeUint64LE=RMe,wMe.writeInt64LE=RMe,wMe.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,a=e/8+n-1;a>=n;a--)r+=t[a]*i,i*=256;return r},wMe.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,a=n;a<n+e/8;a++)r+=t[a]*i,i*=256;return r},wMe.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!EMe.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,a=e/8+r-1;a>=r;a--)n[a]=t/i&255,i*=256;return n},wMe.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!EMe.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,a=r;a<r+e/8;a++)n[a]=t/i&255,i*=256;return n},wMe.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},wMe.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},wMe.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},wMe.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},wMe.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},wMe.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},wMe.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},wMe.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var NMe={};Object.defineProperty(NMe,"__esModule",{value:!0}),NMe.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(vMe,"__esModule",{value:!0});var MMe=wMe,DMe=NMe,LMe=20;function jMe(e,t,n){for(var r=1634760805,i=857760878,a=2036477234,o=1797285236,s=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],d=n[19]<<24|n[18]<<16|n[17]<<8|n[16],f=n[23]<<24|n[22]<<16|n[21]<<8|n[20],p=n[27]<<24|n[26]<<16|n[25]<<8|n[24],h=n[31]<<24|n[30]<<16|n[29]<<8|n[28],m=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],g=t[15]<<24|t[14]<<16|t[13]<<8|t[12],v=r,w=i,T=a,E=o,A=s,x=c,O=u,C=l,I=d,_=f,P=p,S=h,k=m,R=y,N=b,M=g,D=0;D<LMe;D+=2)A=(A^=I=I+(k=(k^=v=v+A|0)>>>16|k<<16)|0)>>>20|A<<12,x=(x^=_=_+(R=(R^=w=w+x|0)>>>16|R<<16)|0)>>>20|x<<12,O=(O^=P=P+(N=(N^=T=T+O|0)>>>16|N<<16)|0)>>>20|O<<12,C=(C^=S=S+(M=(M^=E=E+C|0)>>>16|M<<16)|0)>>>20|C<<12,O=(O^=P=P+(N=(N^=T=T+O|0)>>>24|N<<8)|0)>>>25|O<<7,C=(C^=S=S+(M=(M^=E=E+C|0)>>>24|M<<8)|0)>>>25|C<<7,x=(x^=_=_+(R=(R^=w=w+x|0)>>>24|R<<8)|0)>>>25|x<<7,A=(A^=I=I+(k=(k^=v=v+A|0)>>>24|k<<8)|0)>>>25|A<<7,x=(x^=P=P+(M=(M^=v=v+x|0)>>>16|M<<16)|0)>>>20|x<<12,O=(O^=S=S+(k=(k^=w=w+O|0)>>>16|k<<16)|0)>>>20|O<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>16|R<<16)|0)>>>20|C<<12,A=(A^=_=_+(N=(N^=E=E+A|0)>>>16|N<<16)|0)>>>20|A<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>24|R<<8)|0)>>>25|C<<7,A=(A^=_=_+(N=(N^=E=E+A|0)>>>24|N<<8)|0)>>>25|A<<7,O=(O^=S=S+(k=(k^=w=w+O|0)>>>24|k<<8)|0)>>>25|O<<7,x=(x^=P=P+(M=(M^=v=v+x|0)>>>24|M<<8)|0)>>>25|x<<7;MMe.writeUint32LE(v+r|0,e,0),MMe.writeUint32LE(w+i|0,e,4),MMe.writeUint32LE(T+a|0,e,8),MMe.writeUint32LE(E+o|0,e,12),MMe.writeUint32LE(A+s|0,e,16),MMe.writeUint32LE(x+c|0,e,20),MMe.writeUint32LE(O+u|0,e,24),MMe.writeUint32LE(C+l|0,e,28),MMe.writeUint32LE(I+d|0,e,32),MMe.writeUint32LE(_+f|0,e,36),MMe.writeUint32LE(P+p|0,e,40),MMe.writeUint32LE(S+h|0,e,44),MMe.writeUint32LE(k+m|0,e,48),MMe.writeUint32LE(R+y|0,e,52),MMe.writeUint32LE(N+b|0,e,56),MMe.writeUint32LE(M+g|0,e,60)}function FMe(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var a,o;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");o=(a=new Uint8Array(16)).length-t.length,a.set(t,o)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");a=t,o=i}for(var s=new Uint8Array(64),c=0;c<n.length;c+=64){jMe(s,a,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^s[u-c];BMe(a,0,o)}return DMe.wipe(s),0===i&&DMe.wipe(a),r}function BMe(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}vMe.streamXOR=FMe,vMe.stream=function(e,t,n,r){return void 0===r&&(r=0),DMe.wipe(n),FMe(e,t,n,n,r)};var UMe={},zMe={};function HMe(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(zMe,"__esModule",{value:!0}),zMe.select=function(e,t,n){return~(e-1)&t|e-1&n},zMe.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},zMe.compare=HMe,zMe.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==HMe(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=zMe,n=NMe;e.DIGEST_LENGTH=16;var r=function(){function t(t){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 n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var a=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|a<<9);var o=t[8]|t[9]<<8;this._r[4]=255&(a>>>4|o<<12),this._r[5]=o>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(o>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],a=this._h[1],o=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],p=this._h[9],h=this._r[0],m=this._r[1],y=this._r[2],b=this._r[3],g=this._r[4],v=this._r[5],w=this._r[6],T=this._r[7],E=this._r[8],A=this._r[9];n>=16;){var x=e[t+0]|e[t+1]<<8;i+=8191&x;var O=e[t+2]|e[t+3]<<8;a+=8191&(x>>>13|O<<3);var C=e[t+4]|e[t+5]<<8;o+=8191&(O>>>10|C<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(C>>>7|I<<9);var _=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|_<<12),u+=_>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(_>>>14|P<<2);var S=e[t+12]|e[t+13]<<8;d+=8191&(P>>>11|S<<5);var k=e[t+14]|e[t+15]<<8,R=0,N=R;N+=i*h,N+=a*(5*A),N+=o*(5*E),N+=s*(5*T),R=(N+=c*(5*w))>>>13,N&=8191,N+=u*(5*v),N+=l*(5*g),N+=d*(5*b),N+=(f+=8191&(S>>>8|k<<8))*(5*y);var M=R+=(N+=(p+=k>>>5|r)*(5*m))>>>13;M+=i*m,M+=a*h,M+=o*(5*A),M+=s*(5*E),R=(M+=c*(5*T))>>>13,M&=8191,M+=u*(5*w),M+=l*(5*v),M+=d*(5*g),M+=f*(5*b),R+=(M+=p*(5*y))>>>13,M&=8191;var D=R;D+=i*y,D+=a*m,D+=o*h,D+=s*(5*A),R=(D+=c*(5*E))>>>13,D&=8191,D+=u*(5*T),D+=l*(5*w),D+=d*(5*v),D+=f*(5*g);var L=R+=(D+=p*(5*b))>>>13;L+=i*b,L+=a*y,L+=o*m,L+=s*h,R=(L+=c*(5*A))>>>13,L&=8191,L+=u*(5*E),L+=l*(5*T),L+=d*(5*w),L+=f*(5*v);var j=R+=(L+=p*(5*g))>>>13;j+=i*g,j+=a*b,j+=o*y,j+=s*m,R=(j+=c*h)>>>13,j&=8191,j+=u*(5*A),j+=l*(5*E),j+=d*(5*T),j+=f*(5*w);var F=R+=(j+=p*(5*v))>>>13;F+=i*v,F+=a*g,F+=o*b,F+=s*y,R=(F+=c*m)>>>13,F&=8191,F+=u*h,F+=l*(5*A),F+=d*(5*E),F+=f*(5*T);var B=R+=(F+=p*(5*w))>>>13;B+=i*w,B+=a*v,B+=o*g,B+=s*b,R=(B+=c*y)>>>13,B&=8191,B+=u*m,B+=l*h,B+=d*(5*A),B+=f*(5*E);var U=R+=(B+=p*(5*T))>>>13;U+=i*T,U+=a*w,U+=o*v,U+=s*g,R=(U+=c*b)>>>13,U&=8191,U+=u*y,U+=l*m,U+=d*h,U+=f*(5*A);var z=R+=(U+=p*(5*E))>>>13;z+=i*E,z+=a*T,z+=o*w,z+=s*v,R=(z+=c*g)>>>13,z&=8191,z+=u*b,z+=l*y,z+=d*m,z+=f*h;var H=R+=(z+=p*(5*A))>>>13;H+=i*A,H+=a*E,H+=o*T,H+=s*w,R=(H+=c*v)>>>13,H&=8191,H+=u*g,H+=l*b,H+=d*y,H+=f*m,i=N=8191&(R=(R=((R+=(H+=p*h)>>>13)<<2)+R|0)+(N&=8191)|0),a=M+=R>>>=13,o=D&=8191,s=L&=8191,c=j&=8191,u=F&=8191,l=B&=8191,d=U&=8191,f=z&=8191,p=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=a,this._h[2]=o,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=p},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,a,o=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,o[0]=this._h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this._h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(r=~r,a=0;a<10;a++)this._h[a]=this._h[a]&r|o[a];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,a=1;a<8;a++)i=(this._h[a]+this._pad[a]|0)+(i>>>16)|0,this._h[a]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(UMe),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=vMe,n=UMe,r=NMe,i=wMe,a=zMe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var o=new Uint8Array(16),s=function(){function s(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return s.prototype.seal=function(e,n,i,a){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var s=new Uint8Array(32);t.stream(this._key,o,s,4);var c,u=n.length+this.tagLength;if(a){if(a.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=a}else c=new Uint8Array(u);return t.streamXOR(this._key,o,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),i),r.wipe(o),c},s.prototype.open=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);t.stream(this._key,s,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!a.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,d=n.length-this.tagLength;if(o){if(o.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");l=o}else l=new Uint8Array(d);return t.streamXOR(this._key,s,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(s),l},s.prototype.clean=function(){return r.wipe(this._key),this},s.prototype._authenticate=function(e,t,a,s){var c=new n.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(o.subarray(s.length%16))),c.update(a),a.length%16>0&&c.update(o.subarray(a.length%16));var u=new Uint8Array(8);s&&i.writeUint64LE(s.length,u),c.update(u),i.writeUint64LE(a.length,u),c.update(u);for(var l=c.digest(),d=0;d<l.length;d++)e[d]=l[d];c.clean(),r.wipe(l),r.wipe(u)},s}();e.ChaCha20Poly1305=s}(gMe);var WMe={},VMe={},GMe={};Object.defineProperty(GMe,"__esModule",{value:!0}),GMe.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(VMe,"__esModule",{value:!0});var qMe=GMe,KMe=zMe,XMe=NMe,YMe=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),qMe.isSerializableHash(this._inner)&&qMe.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),XMe.wipe(n)}return e.prototype.reset=function(){if(!qMe.isSerializableHash(this._inner)||!qMe.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){qMe.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),qMe.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!qMe.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!qMe.isSerializableHash(this._inner)||!qMe.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!qMe.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();VMe.HMAC=YMe,VMe.hmac=function(e,t,n){var r=new YMe(e,t);r.update(n);var i=r.digest();return r.clean(),i},VMe.equal=KMe.equal,Object.defineProperty(WMe,"__esModule",{value:!0});var ZMe=VMe,JMe=NMe,QMe=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=ZMe.hmac(this._hash,n,t);this._hmac=new ZMe.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&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(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),JMe.wipe(this._buffer),JMe.wipe(this._counter),this._bufpos=0},e}(),$Me=WMe.HKDF=QMe,eDe={},tDe={},nDe={};Object.defineProperty(nDe,"__esModule",{value:!0}),nDe.BrowserRandomSource=void 0;nDe.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var rDe={};Object.defineProperty(rDe,"__esModule",{value:!0}),rDe.NodeRandomSource=void 0;const iDe=NMe;rDe.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==AC){const e=CC;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,iDe.wipe)(t),n}},Object.defineProperty(tDe,"__esModule",{value:!0}),tDe.SystemRandomSource=void 0;const aDe=nDe,oDe=rDe;tDe.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new aDe.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new oDe.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=tDe,n=wMe,r=NMe;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const a=i(4,t),o=(0,n.readUint32LE)(a);return(0,r.wipe)(a),o};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(t,n=a,o=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let s="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),o);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(s+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return s}e.randomString=o,e.randomStringForEntropy=function(t,n=a,r=e.defaultRandomSource){return o(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(eDe);var sDe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=wMe,n=NMe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=a(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=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 a(e,n,r,a,o){for(;o>=64;){for(var s=n[0],c=n[1],u=n[2],l=n[3],d=n[4],f=n[5],p=n[6],h=n[7],m=0;m<16;m++){var y=a+4*m;e[m]=t.readUint32BE(r,y)}for(m=16;m<64;m++){var b=e[m-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,v=((b=e[m-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[m]=(g+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){g=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&p)|0)+(h+(i[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;h=p,p=f,f=d,d=l+g|0,l=u,u=c,c=s,s=g+v|0}n[0]+=s,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=d,n[5]+=f,n[6]+=p,n[7]+=h,a+=64,o-=64}return a}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(sDe);var cDe={};function uDe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function lDe(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?uDe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function dDe(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=lDe(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return uDe(n)}!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=eDe,n=NMe;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const a=r([56129,1]);function o(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function s(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,_=0,P=0,S=0,k=0,R=0,N=0,M=0,D=0,L=n[0],j=n[1],F=n[2],B=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],Z=n[14],J=n[15];r=t[0],a+=r*L,o+=r*j,s+=r*F,c+=r*B,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*Z,w+=r*J,r=t[1],o+=r*L,s+=r*j,c+=r*F,u+=r*B,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*Z,T+=r*J,r=t[2],s+=r*L,c+=r*j,u+=r*F,l+=r*B,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*Z,E+=r*J,r=t[3],c+=r*L,u+=r*j,l+=r*F,d+=r*B,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*Z,A+=r*J,r=t[4],u+=r*L,l+=r*j,d+=r*F,f+=r*B,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*Z,x+=r*J,r=t[5],l+=r*L,d+=r*j,f+=r*F,p+=r*B,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*Z,O+=r*J,r=t[6],d+=r*L,f+=r*j,p+=r*F,h+=r*B,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*Z,C+=r*J,r=t[7],f+=r*L,p+=r*j,h+=r*F,m+=r*B,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*Z,I+=r*J,r=t[8],p+=r*L,h+=r*j,m+=r*F,y+=r*B,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*Z,_+=r*J,r=t[9],h+=r*L,m+=r*j,y+=r*F,b+=r*B,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,_+=r*Z,P+=r*J,r=t[10],m+=r*L,y+=r*j,b+=r*F,g+=r*B,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,_+=r*Y,P+=r*Z,S+=r*J,r=t[11],y+=r*L,b+=r*j,g+=r*F,v+=r*B,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,_+=r*X,P+=r*Y,S+=r*Z,k+=r*J,r=t[12],b+=r*L,g+=r*j,v+=r*F,w+=r*B,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,_+=r*K,P+=r*X,S+=r*Y,k+=r*Z,R+=r*J,r=t[13],g+=r*L,v+=r*j,w+=r*F,T+=r*B,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,_+=r*q,P+=r*K,S+=r*X,k+=r*Y,R+=r*Z,N+=r*J,r=t[14],v+=r*L,w+=r*j,T+=r*F,E+=r*B,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,_+=r*G,P+=r*q,S+=r*K,k+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,T+=r*j,E+=r*F,A+=r*B,x+=r*U,O+=r*z,C+=r*H,I+=r*W,_+=r*V,P+=r*G,S+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*_,p+=38*P,h+=38*S,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function d(e,t){l(e,t,t)}function f(e,t){const n=new Uint8Array(32),i=new Float64Array(80),f=r(),p=r(),h=r(),m=r(),y=r(),b=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)p[e]=i[e];f[0]=m[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;s(f,p,t),s(h,m,t),c(y,f,h),u(f,f,h),c(h,p,m),u(p,p,m),d(m,y),d(b,f),l(f,h,f),l(h,p,y),c(y,f,h),u(f,f,h),d(p,f),u(h,m,b),l(f,h,a),c(f,f,m),l(h,h,f),l(f,m,b),l(m,p,i),d(p,y),s(f,p,t),s(h,m,t)}for(let e=0;e<16;e++)i[e+16]=f[e],i[e+32]=h[e],i[e+48]=p[e],i[e+64]=m[e];const g=i.subarray(32),v=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)d(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(g,g),l(v,v,g);const w=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];o(i),o(i),o(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,s(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(w,v),w}function p(e){return f(e,i)}function h(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:p(n),secretKey:n}}e.scalarMult=f,e.scalarMultBase=p,e.generateKeyPairFromSeed=h,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=h(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.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 i=f(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}(cDe);var fDe=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},pDe=fDe;class hDe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class mDe{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return bDe(this,e)}}class yDe{constructor(e){this.decoders=e}or(e){return bDe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const bDe=(e,t)=>new yDe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class gDe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new hDe(e,t,n),this.decoder=new mDe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const vDe=({name:e,prefix:t,encode:n,decode:r})=>new gDe(e,t,n,r),wDe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=pDe(n,t);return vDe({prefix:e,name:t,encode:r,decode:e=>(e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)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")})(i(e))})},TDe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>vDe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),EDe=vDe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var ADe=Object.freeze({__proto__:null,identity:EDe});const xDe=TDe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var ODe=Object.freeze({__proto__:null,base2:xDe});const CDe=TDe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var IDe=Object.freeze({__proto__:null,base8:CDe});const _De=wDe({prefix:"9",name:"base10",alphabet:"0123456789"});var PDe=Object.freeze({__proto__:null,base10:_De});const SDe=TDe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),kDe=TDe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var RDe=Object.freeze({__proto__:null,base16:SDe,base16upper:kDe});const NDe=TDe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),MDe=TDe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),DDe=TDe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),LDe=TDe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),jDe=TDe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),FDe=TDe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),BDe=TDe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),UDe=TDe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zDe=TDe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var HDe=Object.freeze({__proto__:null,base32:NDe,base32hex:jDe,base32hexpad:BDe,base32hexpadupper:UDe,base32hexupper:FDe,base32pad:DDe,base32padupper:LDe,base32upper:MDe,base32z:zDe});const WDe=wDe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),VDe=wDe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var GDe=Object.freeze({__proto__:null,base36:WDe,base36upper:VDe});const qDe=wDe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),KDe=wDe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var XDe=Object.freeze({__proto__:null,base58btc:qDe,base58flickr:KDe});const YDe=TDe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ZDe=TDe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),JDe=TDe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),QDe=TDe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var $De=Object.freeze({__proto__:null,base64:YDe,base64pad:ZDe,base64url:JDe,base64urlpad:QDe});const eLe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),tLe=eLe.reduce(((e,t,n)=>(e[n]=t,e)),[]),nLe=eLe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const rLe=vDe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=tLe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=nLe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var iLe=Object.freeze({__proto__:null,base256emoji:rLe});new TextEncoder,new TextDecoder;const aLe={...ADe,...ODe,...IDe,...PDe,...RDe,...HDe,...GDe,...XDe,...$De,...iLe};function oLe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const sLe=oLe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),cLe=oLe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=lDe((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),uLe={utf8:sLe,"utf-8":sLe,hex:aLe.base16,latin1:cLe,ascii:cLe,binary:cLe,...aLe};function lLe(e,t="utf8"){const n=uLe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):uDe(globalThis.Buffer.from(e,"utf-8"))}function dLe(e,t="utf8"){const n=uLe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}var fLe=window&&window.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},pLe=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},hLe=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},mLe=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},yLe=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},bLe=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},gLe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,vLe=3,wLe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],TLe=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function ELe(e){return e?ALe(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new bLe:"undefined"!=typeof navigator?ALe(navigator.userAgent):function(){var e="undefined"!=typeof process&&process.version;return e?new hLe(process.version.slice(1)):null}()}function ALe(e){var t=function(e){return""!==e&&wLe.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var a=i.exec(e);return!!a&&[r,a]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new yLe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<vLe&&(i=fLe(fLe([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(vLe-i.length),!0)):i=[];var a=i.join("."),o=function(e){for(var t=0,n=TLe.length;t<n;t++){var r=TLe[t],i=r[0];if(r[1].exec(e))return i}return null}(e),s=gLe.exec(e);return s&&s[1]?new mLe(n,a,o,s[1]):new pLe(n,a,o)}var xLe,OLe={},CLe={},ILe={};var _Le,PLe={},SLe={},kLe={};var RLe,NLe,MLe,DLe,LLe={};function jLe(){return NLe||(NLe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar((_Le||(_Le=1,Object.defineProperty(kLe,"__esModule",{value:!0}),kLe.ONE_THOUSAND=kLe.ONE_HUNDRED=void 0,kLe.ONE_HUNDRED=100,kLe.ONE_THOUSAND=1e3),kLe),e),t.__exportStar((RLe||(RLe=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=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY}(LLe)),LLe),e)}(SLe)),SLe}function FLe(){return DLe||(DLe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar((xLe||(xLe=1,Object.defineProperty(ILe,"__esModule",{value:!0}),ILe.delay=void 0,ILe.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),ILe),e),t.__exportStar(function(){if(MLe)return PLe;MLe=1,Object.defineProperty(PLe,"__esModule",{value:!0}),PLe.fromMiliseconds=PLe.toMiliseconds=void 0;const e=jLe();return PLe.toMiliseconds=function(t){return t*e.ONE_THOUSAND},PLe.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},PLe}(),e)}(CLe)),CLe}var BLe,ULe={};var zLe,HLe,WLe={},VLe={};function GLe(){return HLe||(HLe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});gP.__exportStar((zLe||(zLe=1,Object.defineProperty(VLe,"__esModule",{value:!0}),VLe.IWatch=void 0,VLe.IWatch=class{}),VLe),e)}(WLe)),WLe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar(FLe(),e),t.__exportStar(function(){if(BLe)return ULe;BLe=1,Object.defineProperty(ULe,"__esModule",{value:!0}),ULe.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return ULe.Watch=e,ULe.default=e,ULe}(),e),t.__exportStar(GLe(),e),t.__exportStar(jLe(),e)}(OLe);var qLe={};function KLe(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function XLe(e){const t=KLe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(qLe,"__esModule",{value:!0}),qLe.getLocalStorage=qLe.getLocalStorageOrThrow=qLe.getCrypto=qLe.getCryptoOrThrow=JLe=qLe.getLocation=qLe.getLocationOrThrow=ZLe=qLe.getNavigator=qLe.getNavigatorOrThrow=YLe=qLe.getDocument=qLe.getDocumentOrThrow=qLe.getFromWindowOrThrow=qLe.getFromWindow=void 0,qLe.getFromWindow=KLe,qLe.getFromWindowOrThrow=XLe,qLe.getDocumentOrThrow=function(){return XLe("document")};var YLe=qLe.getDocument=function(){return KLe("document")};qLe.getNavigatorOrThrow=function(){return XLe("navigator")};var ZLe=qLe.getNavigator=function(){return KLe("navigator")};qLe.getLocationOrThrow=function(){return XLe("location")};var JLe=qLe.getLocation=function(){return KLe("location")};qLe.getCryptoOrThrow=function(){return XLe("crypto")},qLe.getCrypto=function(){return KLe("crypto")},qLe.getLocalStorageOrThrow=function(){return XLe("localStorage")},qLe.getLocalStorage=function(){return KLe("localStorage")};var QLe={};Object.defineProperty(QLe,"__esModule",{value:!0});var $Le=QLe.getWindowMetadata=void 0;const eje=qLe;$Le=QLe.getWindowMetadata=function(){let e,t;try{e=eje.getDocumentOrThrow(),t=eje.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}(),i=n("description","og:description","twitter:description","keywords"),a=t.origin,o=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],a=i.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}();return{description:i,url:a,icons:o,name:r}};var tje={},nje=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),rje="%[a-f0-9]{2}",ije=new RegExp("("+rje+")|([^%]+?)","gi"),aje=new RegExp("("+rje+")+","gi");function oje(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],oje(n),oje(r))}function sje(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(ije)||[],n=1;n<t.length;n++)t=(e=oje(t,n).join("")).match(ije)||[];return e}}var cje=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=aje.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=sje(n[0]);r!==n[0]&&(t[n[0]]=r)}n=aje.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var o=i[a];e=e.replace(new RegExp(o,"g"),t[o])}return e}(e)}},uje=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},lje=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?-1!==t.indexOf(o):t(o,s,e))&&(n[o]=s)}return n};!function(e){const t=nje,n=cje,r=uje,i=lje,a=Symbol("encodeFragmentIdentifier");function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),a="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=a?c(n,e):n;const o=i||a?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=o};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const a=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],a):r[t]=a};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const a of e.split("&")){if(""===a)continue;let[e,o]=r(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:c(o,t),n(c(e,t),o,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=f(n[e],t);else i[e]=f(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}e.extract=d,e.parse=p,e.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[",i,"]"].join("")]:[...n,[s(t,e),"[",s(i,e),"]=",s(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[]"].join("")]:[...n,[s(t,e),"[]=",s(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),":list="].join("")]:[...n,[s(t,e),":list=",s(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[s(n,e),t,s(i,e)].join("")]:[[r,s(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,s(t,e)]:[...n,[s(t,e),"=",s(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{const i=e[n];return void 0===i?"":null===i?s(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?s(n,t)+"[]":i.reduce(r(n),[]).join("&"):s(n,t)+"="+s(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(d(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),c=Object.assign(o,t.query);let u=e.stringify(c,n);u&&(u=`?${u}`);let d=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(d=`#${n[a]?s(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${d}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}(tje);const dje={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"}},fje=":";function pje(e,t){return e.includes(":")?[e]:t.chains||[]}const hje="base10",mje="base16",yje="base64pad",bje="utf8",gje=0,vje=1,wje=0,Tje=1,Eje=12,Aje=32;function xje(){return dLe(eDe.randomBytes(Aje),mje)}function Oje(e){return dLe(sDe.hash(lLe(e,bje)),mje)}function Cje(e){return Number(dLe(e,hje))}function Ije(e){const t=function(e){return lLe(`${e}`,hje)}(typeof e.type<"u"?e.type:gje);if(Cje(t)===vje&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?lLe(e.senderPublicKey,mje):void 0,r=typeof e.iv<"u"?lLe(e.iv,mje):eDe.randomBytes(Eje);return function(e){if(Cje(e.type)===vje){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return dLe(dDe([e.type,e.senderPublicKey,e.iv,e.sealed]),yje)}return dLe(dDe([e.type,e.iv,e.sealed]),yje)}({type:t,sealed:new gMe.ChaCha20Poly1305(lLe(e.symKey,mje)).seal(r,lLe(e.message,bje)),iv:r,senderPublicKey:n})}function _je(e){const t=lLe(e,yje),n=t.slice(wje,Tje),r=Tje;if(Cje(n)===vje){const e=r+Aje,i=e+Eje,a=t.slice(r,e),o=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:o,senderPublicKey:a}}const i=r+Eje,a=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:a}}function Pje(e){const t=e?.type||gje;if(t===vje){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Sje(e){return e.type===vje&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var kje=Object.defineProperty,Rje=Object.getOwnPropertySymbols,Nje=Object.prototype.hasOwnProperty,Mje=Object.prototype.propertyIsEnumerable,Dje=(e,t,n)=>t in e?kje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lje=(e,t)=>{for(var n in t||(t={}))Nje.call(t,n)&&Dje(e,n,t[n]);if(Rje)for(var n of Rje(t))Mje.call(t,n)&&Dje(e,n,t[n]);return e};const jje="ReactNative",Fje={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Bje="js";function Uje(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function zje(){return!YLe()&&!!ZLe()&&navigator.product===jje}function Hje(){return!Uje()&&!!ZLe()&&!!YLe()}function Wje(){return zje()?Fje.reactNative:Uje()?Fje.node:Hje()?Fje.browser:Fje.unknown}function Vje(e,t,n){const r=function(){if(Wje()===Fje.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:e,Version:t}=global.Platform;return[e,t].join("-")}const e=ELe();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),i=function(){var e;const t=Wje();return t===Fje.browser?[t,(null==(e=JLe())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[Bje,n].join("-"),r,i].join("/")}function Gje({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:a,useOnCloseEvent:o,bundleId:s}){const c=n.split("?"),u={auth:i,ua:Vje(e,t,r),projectId:a,useOnCloseEvent:o||void 0,origin:s||void 0},l=function(e,t){let n=tje.parse(e);return n=Lje(Lje({},n),t),tje.stringify(n)}(c[1]||"",u);return c[0]+"?"+l}function qje(e,t){return e.filter((e=>t.includes(e))).length===e.length}function Kje(e){return Object.fromEntries(e.entries())}function Xje(e){return new Map(Object.entries(e))}function Yje(e=OLe.FIVE_MINUTES,t){const n=OLe.toMiliseconds(e||OLe.FIVE_MINUTES);let r,i,a;return{resolve:e=>{a&&r&&(clearTimeout(a),r(e))},reject:e=>{a&&i&&(clearTimeout(a),i(e))},done:()=>new Promise(((e,o)=>{a=setTimeout((()=>{o(new Error(t))}),n),r=e,i=o}))}}function Zje(e,t,n){return new Promise((async(r,i)=>{const a=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(a)}))}function Jje(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function Qje(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function $je(e,t){return OLe.fromMiliseconds((t||Date.now())+OLe.toMiliseconds(e))}function eFe(e){return Date.now()>=OLe.toMiliseconds(e)}function tFe(e,t){return`${e}${t?`:${t}`:""}`}function nFe(e=[],t=[]){return[...new Set([...e,...t])]}function rFe(e){return e?.relay||{protocol:"irn"}}function iFe(e){const t=dje[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var aFe=Object.defineProperty,oFe=Object.defineProperties,sFe=Object.getOwnPropertyDescriptors,cFe=Object.getOwnPropertySymbols,uFe=Object.prototype.hasOwnProperty,lFe=Object.prototype.propertyIsEnumerable,dFe=(e,t,n)=>t in e?aFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function fFe(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),a=e[t];n[i]=a}})),n}function pFe(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),a=typeof n<"u"?e.substring(n):"",o=tje.parse(a);return{protocol:r,topic:hFe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:fFe(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function hFe(e){return e.startsWith("//")?e.substring(2):e}function mFe(e){return`${e.protocol}:${e.topic}@${e.version}?`+tje.stringify(((e,t)=>oFe(e,sFe(t)))(((e,t)=>{for(var n in t||(t={}))uFe.call(t,n)&&dFe(e,n,t[n]);if(cFe)for(var n of cFe(t))lFe.call(t,n)&&dFe(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}function yFe(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function bFe(e){return e.includes(":")}function gFe(e){return bFe(e)?e.split(":")[0]:e}const vFe={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}},wFe={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 TFe(e,t){const{message:n,code:r}=wFe[e];return{message:t?`${n} ${t}`:n,code:r}}function EFe(e,t){const{message:n,code:r}=vFe[e];return{message:t?`${n} ${t}`:n,code:r}}function AFe(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function xFe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function OFe(e){return typeof e>"u"}function CFe(e,t){return!(!t||!OFe(e))||"string"==typeof e&&!!e.trim().length}function IFe(e,t){return!(!t||!OFe(e))||"number"==typeof e&&!isNaN(e)}function _Fe(e){return!(!CFe(e,!1)||!e.includes(":"))&&2===e.split(":").length}function PFe(e){let t=!0;return AFe(e)?e.length&&(t=e.every((e=>CFe(e,!1)))):t=!1,t}function SFe(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const a=function(e,t,n){let r=null;return AFe(t)&&t.length?t.forEach((e=>{r||_Fe(e)||(r=EFe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):_Fe(e)||(r=EFe("UNSUPPORTED_CHAINS",`${n}, 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"] }`)),r}(e,pje(e,i),`${t} ${n}`);a&&(r=a)})),r}function kFe(e,t){let n=null;return AFe(e)?e.forEach((e=>{n||function(e){if(CFe(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&_Fe(e)}}return!1}(e)||(n=EFe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=EFe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function RFe(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return PFe(e?.methods)?PFe(e?.events)||(n=EFe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=EFe("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function NFe(e,t){let n=null;if(e&&xFe(e)){const r=RFe(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=kFe(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=TFe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function MFe(e){return CFe(e.protocol,!0)}function DFe(e){return typeof e<"u"&&null!==typeof e}function LFe(e,t){return!(!_Fe(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...yFe(e.accounts))})),t}(e).includes(t))}function jFe(e,t,n){return!!CFe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{yFe(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function FFe(e,t,n){return!!CFe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{yFe(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function BFe(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),a=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=yFe(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),o=Object.keys(i),s=Object.keys(a),c=UFe(Object.keys(e)),u=UFe(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),qje(o,s)||(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${o.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=yFe(t[e].accounts);i.includes(e)||(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),o.forEach((e=>{r||(qje(i[e].methods,a[e].methods)?qje(i[e].events,a[e].events)||(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function UFe(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function zFe(){const e=Wje();return new Promise((t=>{switch(e){case Fje.browser:t(Hje()&&navigator?.onLine);break;case Fje.reactNative:t(async function(){if(zje()&&typeof global<"u"&&null!=global&&global.NetInfo){const e=await(null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}());break;case Fje.node:default:t(!0)}}))}function HFe(e){switch(Wje()){case Fje.browser:!function(e){!zje()&&Hje()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Fje.reactNative:!function(e){zje()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const WFe={};let VFe=class{static get(e){return WFe[e]}static set(e,t){WFe[e]=t}static delete(e){delete WFe[e]}};const GFe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,qFe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,KFe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function XFe(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function YFe(e,t={}){if("string"!=typeof e)return e;const n=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!KFe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(GFe.test(e)||qFe.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,XFe)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function ZFe(e,...t){try{return(n=e(...t))&&"function"==typeof n.then?n:Promise.resolve(n)}catch(e){return Promise.reject(e)}var n}function JFe(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return JFe(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function QFe(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const $Fe="base64:";function eBe(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function tBe(...e){return eBe(e.join(":"))}function nBe(e){return(e=eBe(e))?e+":":""}const rBe=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function iBe(e={}){const t={mounts:{"":e.driver||rBe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const n of t.mountpoints)if(e.startsWith(n))return{base:n,relativeKey:e.slice(n.length),driver:t.mounts[n]};return{base:"",relativeKey:e,driver:t.mounts[""]}},r=(e,n)=>t.mountpoints.filter((t=>t.startsWith(e)||n&&e.startsWith(t))).map((n=>({relativeBase:e.length>n.length?e.slice(n.length):void 0,mountpoint:n,driver:t.mounts[n]}))),i=(e,n)=>{if(t.watching){n=eBe(n);for(const r of t.watchListeners)r(e,n)}},a=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},o=(e,t,r)=>{const i=new Map,a=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const r of e){const e="string"==typeof r,i=eBe(e?r:r.key),o=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},c=n(i);a(c).items.push({key:i,value:o,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=eBe(e);const{relativeKey:r,driver:i}=n(e);return ZFe(i.hasItem,r,t)},getItem(e,t={}){e=eBe(e);const{relativeKey:r,driver:i}=n(e);return ZFe(i.getItem,r,t).then((e=>YFe(e)))},getItems:(e,t)=>o(e,t,(e=>e.driver.getItems?ZFe(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:tBe(e.base,t.key),value:YFe(t.value)}))))):Promise.all(e.items.map((t=>ZFe(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:YFe(e)})))))))),getItemRaw(e,t={}){e=eBe(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?ZFe(i.getItemRaw,r,t):ZFe(i.getItem,r,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith($Fe)?(QFe(),Buffer.from(e.slice($Fe.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return s.removeItem(e);e=eBe(e);const{relativeKey:a,driver:o}=n(e);o.setItem&&(await ZFe(o.setItem,a,JFe(t),r),o.watch||i("update",e))},async setItems(e,t){await o(e,t,(async e=>{e.driver.setItems&&await ZFe(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:JFe(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>ZFe(e.driver.setItem,t.relativeKey,JFe(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return s.removeItem(e,r);e=eBe(e);const{relativeKey:a,driver:o}=n(e);if(o.setItemRaw)await ZFe(o.setItemRaw,a,t,r);else{if(!o.setItem)return;await ZFe(o.setItem,a,function(e){if("string"==typeof e)return e;QFe();const t=Buffer.from(e).toString("base64");return $Fe+t}(t),r)}o.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=eBe(e);const{relativeKey:r,driver:a}=n(e);a.removeItem&&(await ZFe(a.removeItem,r,t),(t.removeMeta||t.removeMata)&&await ZFe(a.removeItem,r+"$",t),a.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=eBe(e);const{relativeKey:r,driver:i}=n(e),a=Object.create(null);if(i.getMeta&&Object.assign(a,await ZFe(i.getMeta,r,t)),!t.nativeOnly){const e=await ZFe(i.getItem,r+"$",t).then((e=>YFe(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(a,e))}return a},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=nBe(e);const n=r(e,!0);let i=[];const a=[];for(const e of n){const n=(await ZFe(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+eBe(t))).filter((e=>!i.some((t=>e.startsWith(t)))));a.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?a.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):a.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=nBe(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return ZFe(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>oBe(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await aBe(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await a()}),async unwatch(){t.watchListeners=[],await a()},mount(e,n){if((e=nBe(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=n,t.watching&&Promise.resolve(aBe(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),s},async unmount(e,n=!0){(e=nBe(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await oBe(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=eBe(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts(e="",t={}){e=eBe(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return s}function aBe(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function oBe(e){"function"==typeof e.dispose&&await ZFe(e.dispose)}function sBe(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function cBe(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=sBe(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let uBe;function lBe(){return uBe||(uBe=cBe("keyval-store","keyval")),uBe}function dBe(e,t=lBe()){return t("readonly",(t=>sBe(t.get(e))))}function fBe(e=lBe()){return e("readonly",(e=>{if(e.getAllKeys)return sBe(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},sBe(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const pBe=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),hBe=e=>{const t=e.replace(/([\[:])?(\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,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function mBe(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return hBe(e)}catch(t){return e}}function yBe(e){return"string"==typeof e?e:pBe(e)||""}var bBe=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=cBe(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await dBe(n(e),r)>"u"),getItem:async e=>await dBe(n(e),r)??null,setItem:(e,t)=>function(e,t,n=lBe()){return n("readwrite",(n=>(n.put(t,e),sBe(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=lBe()){return t("readwrite",(t=>(t.delete(e),sBe(t.transaction))))}(n(e),r),getKeys:()=>fBe(r),clear:()=>function(e=lBe()){return e("readwrite",(e=>(e.clear(),sBe(e.transaction))))}(r)}};var gBe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vBe={exports:{}};function wBe(e){var t;return[e[0],mBe(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof gBe<"u"&&gBe.localStorage?vBe.exports=gBe.localStorage:typeof window<"u"&&window.localStorage?vBe.exports=window.localStorage:vBe.exports=new t}();const TBe=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};var EBe={},ABe={},xBe=dt(bMe),OBe={},CBe={};let IBe=class{};var _Be,PBe,SBe=dt(Object.freeze({__proto__:null,IEvents:IBe}));function kBe(){return PBe||(PBe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});gP.__exportStar(function(){if(_Be)return CBe;_Be=1,Object.defineProperty(CBe,"__esModule",{value:!0}),CBe.IHeartBeat=void 0;const e=SBe;class t extends e.IEvents{constructor(e){super()}}return CBe.IHeartBeat=t,CBe}(),e)}(OBe)),OBe}var RBe,NBe,MBe,DBe={},LBe={};function jBe(){return NBe||(NBe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});gP.__exportStar(function(){if(RBe)return LBe;RBe=1,Object.defineProperty(LBe,"__esModule",{value:!0}),LBe.HEARTBEAT_EVENTS=LBe.HEARTBEAT_INTERVAL=void 0;const e=OLe;return LBe.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,LBe.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},LBe}(),e)}(DBe)),DBe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar(function(){if(MBe)return ABe;MBe=1,Object.defineProperty(ABe,"__esModule",{value:!0}),ABe.HeartBeat=void 0;const e=gP,t=xBe,n=OLe,r=kBe(),i=jBe();class a extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||i.HEARTBEAT_INTERVAL}static init(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=new a(t);return yield e.init(),e}))}init(){return e.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return e.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),n.toMiliseconds(this.interval))}))}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return ABe.HeartBeat=a,ABe}(),e),t.__exportStar(kBe(),e),t.__exportStar(jBe(),e)}(EBe);var FBe,BBe,UBe,zBe,HBe={};function WBe(){if(zBe)return UBe;zBe=1;const e=function(){if(BBe)return FBe;function e(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}return BBe=1,FBe=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var a=n.length+1;if(1===a)return t;var o=new Array(a);o[0]=i(t);for(var s=1;s<a;s++)o[s]=i(n[s]);return o.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var u="",l=0,d=-1,f=t&&t.length||0,p=0;p<f;){if(37===t.charCodeAt(p)&&p+1<f){switch(d=d>-1?d:0,t.charCodeAt(p+1)){case 100:case 102:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Number(n[l]),d=p+2,p++;break;case 105:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Math.floor(Number(n[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===n[l])break;d<p&&(u+=t.slice(d,p));var h=typeof n[l];if("string"===h){u+="'"+n[l]+"'",d=p+2,p++;break}if("function"===h){u+=n[l].name||"<anonymous>",d=p+2,p++;break}u+=i(n[l]),d=p+2,p++;break;case 115:if(l>=c)break;d<p&&(u+=t.slice(d,p)),u+=String(n[l]),d=p+2,p++;break;case 37:d<p&&(u+=t.slice(d,p)),u+="%",d=p+2,p++,l--}++l}++p}return-1===d?t:(d<f&&(u+=t.slice(d)),u)},FBe}();UBe=r;const t=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:u,mapHttpResponse:u,wrapRequestSerializer:l,wrapResponseSerializer:l,wrapErrorSerializer:l,req:u,res:u,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function r(e){(e=e||{}).browser=e.browser||{};const n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");const u=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const l=e.serializers||{},f=function(e,t){if(Array.isArray(e)){const t=e.filter((function(e){return"!stdSerializers.err"!==e}));return t}return!0===e&&Object.keys(t)}(e.browser.serialize,l);let p=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(p=!1);"function"==typeof u&&(u.error=u.fatal=u.warn=u.info=u.debug=u.trace=u),!1===e.enabled&&(e.level="silent");const h=e.level||"info",m=Object.create(u);m.log||(m.log=d),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,i(y,m,"error","log"),i(y,m,"fatal","error"),i(y,m,"warn","error"),i(y,m,"info","log"),i(y,m,"debug","log"),i(y,m,"trace","log")}});const y={transmit:n,serialize:f,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:c(e)};return m.levels=r.levels,m.level=h,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=d,m.serializers=l,m._serialize=f,m._stdErrSerialize=p,m.child=function(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},f&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(f&&i){var c=Object.assign({},l,i),u=!0===e.browser.serialize?Object.keys(c):f;delete t.serializers,a([t],u,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=o(e,t,"error"),this.fatal=o(e,t,"fatal"),this.warn=o(e,t,"warn"),this.info=o(e,t,"info"),this.debug=o(e,t,"debug"),this.trace=o(e,t,"trace"),c&&(this.serializers=c,this._serialize=u),n&&(this._logEvent=s([].concat(e._logEvent.bindings,t)))}return d.prototype=this,new d(this)},n&&(m._logEvent=s()),m}function i(n,i,o,c){const u=Object.getPrototypeOf(i);i[o]=i.levelVal>i.levels.values[o]?d:u[o]?u[o]:t[o]||t[c]||d,function(n,i,o){if(!n.transmit&&i[o]===d)return;i[o]=function(c){return function(){const u=n.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<l.length;f++)l[f]=arguments[f];if(n.serialize&&!n.asObject&&a(l,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?c.call(d,function(t,n,i,o){t._serialize&&a(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const u={};o&&(u.time=o);u.level=r.levels.values[n];let l=1+(0|t._childLevel);l<1&&(l=1);if(null!==c&&"object"==typeof c){for(;l--&&"object"==typeof s[0];)Object.assign(u,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));void 0!==c&&(u.msg=c);return u}(this,o,l,u)):c.apply(d,l),n.transmit){const e=n.transmit.level||i.level,t=r.levels.values[e],c=r.levels.values[o];if(c<t)return;!function(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,c=t.methodValue,u=t.val,l=e._logEvent.bindings;a(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=c,r(o,e._logEvent,u),e._logEvent=s(l)}(this,{ts:u,methodLevel:o,methodValue:c,transmitLevel:e,transmitValue:r.levels.values[n.transmit.level||i.level],send:n.transmit.send,val:i.levelVal},l)}}}(i[o])}(n,i,o)}function a(e,t,n,i){for(const a in e)if(i&&e[a]instanceof Error)e[a]=r.stdSerializers.err(e[a]);else if("object"==typeof e[a]&&!Array.isArray(e[a]))for(const r in e[a])t&&t.indexOf(r)>-1&&r in n&&(e[a][r]=n[r](e[a][r]))}function o(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function s(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function c(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?f:p}function u(){return{}}function l(e){return e}function d(){}function f(){return!1}function p(){return Date.now()}return r.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"}},r.stdSerializers=n,r.stdTimeFunctions=Object.assign({},{nullTime:f,epochTime:p,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),UBe}var VBe,GBe={};function qBe(){return VBe||(VBe=1,Object.defineProperty(GBe,"__esModule",{value:!0}),GBe.PINO_CUSTOM_CONTEXT_KEY=GBe.PINO_LOGGER_DEFAULTS=void 0,GBe.PINO_LOGGER_DEFAULTS={level:"info"},GBe.PINO_CUSTOM_CONTEXT_KEY="custom_context"),GBe}var KBe,XBe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=gP,n=t.__importDefault(WBe());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(qBe(),e),t.__exportStar(function(){if(KBe)return XBe;KBe=1,Object.defineProperty(XBe,"__esModule",{value:!0}),XBe.generateChildLogger=XBe.formatChildLoggerContext=XBe.getLoggerContext=XBe.setBrowserLoggerContext=XBe.getBrowserLoggerContext=XBe.getDefaultLoggerOptions=void 0;const e=qBe();function t(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function n(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function r(n,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=void 0===n.bindings?t(n,r):n.bindings().context||"",i}function i(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const a=r(t,i);return a.trim()?`${a}/${n}`:n}return XBe.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||e.PINO_LOGGER_DEFAULTS.level})},XBe.getBrowserLoggerContext=t,XBe.setBrowserLoggerContext=n,XBe.getLoggerContext=r,XBe.formatChildLoggerContext=i,XBe.generateChildLogger=function(t,r,a=e.PINO_CUSTOM_CONTEXT_KEY){const o=i(t,r,a);return n(t.child({context:o}),o,a)},XBe}(),e)}(HBe);let YBe=class extends IBe{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},ZBe=class extends IBe{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},JBe=class{constructor(e,t){this.logger=e,this.core=t}},QBe=class extends IBe{constructor(e,t){super(),this.relayer=e,this.logger=t}},$Be=class extends IBe{constructor(e){super()}},eUe=class{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}},tUe=class extends IBe{constructor(e,t){super(),this.relayer=e,this.logger=t}},nUe=class extends IBe{constructor(e,t){super(),this.core=e,this.logger=t}},rUe=class{constructor(e,t){this.projectId=e,this.logger=t}},iUe=class{constructor(e,t){this.projectId=e,this.logger=t}},aUe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},oUe=class{constructor(e){this.client=e}};var sUe={},cUe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=wMe,n=NMe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},r.prototype.update=function(t,n){if(void 0===n&&(n=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=t[r++],n--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=t[r++],n--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)t.writeUint32BE(this._stateHi[c],e,8*c),t.writeUint32BE(this._stateLo[c],e,8*c+4);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA512=r;var i=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 a(e,n,r,a,o,s,c){for(var u,l,d,f,p,h,m,y,b=r[0],g=r[1],v=r[2],w=r[3],T=r[4],E=r[5],A=r[6],x=r[7],O=a[0],C=a[1],I=a[2],_=a[3],P=a[4],S=a[5],k=a[6],R=a[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(o,M),n[N]=t.readUint32BE(o,M+4)}for(N=0;N<80;N++){var D,L,j=b,F=g,B=v,U=w,z=T,H=E,W=A,V=O,G=C,q=I,K=_,X=P,Y=S,Z=k;if(p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,p+=65535&(l=(P>>>14|T<<18)^(P>>>18|T<<14)^(T>>>9|P<<23)),h+=l>>>16,m+=65535&(u=(T>>>14|P<<18)^(T>>>18|P<<14)^(P>>>9|T<<23)),y+=u>>>16,p+=65535&(l=P&S^~P&k),h+=l>>>16,m+=65535&(u=T&E^~T&A),y+=u>>>16,u=i[2*N],p+=65535&(l=i[2*N+1]),h+=l>>>16,m+=65535&u,y+=u>>>16,u=e[N%16],h+=(l=n[N%16])>>>16,m+=65535&u,y+=u>>>16,m+=(h+=(p+=65535&l)>>>16)>>>16,p=65535&(l=f=65535&p|h<<16),h=l>>>16,m=65535&(u=d=65535&m|(y+=m>>>16)<<16),y=u>>>16,p+=65535&(l=(O>>>28|b<<4)^(b>>>2|O<<30)^(b>>>7|O<<25)),h+=l>>>16,m+=65535&(u=(b>>>28|O<<4)^(O>>>2|b<<30)^(O>>>7|b<<25)),y+=u>>>16,h+=(l=O&C^O&I^C&I)>>>16,m+=65535&(u=b&g^b&v^g&v),y+=u>>>16,D=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,L=65535&p|h<<16,p=65535&(l=K),h=l>>>16,m=65535&(u=U),y=u>>>16,h+=(l=f)>>>16,m+=65535&(u=d),y+=u>>>16,g=j,v=F,w=B,T=U=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,E=z,A=H,x=W,b=D,C=V,I=G,_=q,P=K=65535&p|h<<16,S=X,k=Y,R=Z,O=L,N%16==15)for(M=0;M<16;M++)u=e[M],p=65535&(l=n[M]),h=l>>>16,m=65535&u,y=u>>>16,u=e[(M+9)%16],p+=65535&(l=n[(M+9)%16]),h+=l>>>16,m+=65535&u,y+=u>>>16,d=e[(M+1)%16],p+=65535&(l=((f=n[(M+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),h+=l>>>16,m+=65535&(u=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),y+=u>>>16,d=e[(M+14)%16],h+=(l=((f=n[(M+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(u=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,e[M]=65535&m|y<<16,n[M]=65535&p|h<<16}p=65535&(l=O),h=l>>>16,m=65535&(u=b),y=u>>>16,u=r[0],h+=(l=a[0])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[0]=b=65535&m|y<<16,a[0]=O=65535&p|h<<16,p=65535&(l=C),h=l>>>16,m=65535&(u=g),y=u>>>16,u=r[1],h+=(l=a[1])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[1]=g=65535&m|y<<16,a[1]=C=65535&p|h<<16,p=65535&(l=I),h=l>>>16,m=65535&(u=v),y=u>>>16,u=r[2],h+=(l=a[2])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[2]=v=65535&m|y<<16,a[2]=I=65535&p|h<<16,p=65535&(l=_),h=l>>>16,m=65535&(u=w),y=u>>>16,u=r[3],h+=(l=a[3])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[3]=w=65535&m|y<<16,a[3]=_=65535&p|h<<16,p=65535&(l=P),h=l>>>16,m=65535&(u=T),y=u>>>16,u=r[4],h+=(l=a[4])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[4]=T=65535&m|y<<16,a[4]=P=65535&p|h<<16,p=65535&(l=S),h=l>>>16,m=65535&(u=E),y=u>>>16,u=r[5],h+=(l=a[5])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[5]=E=65535&m|y<<16,a[5]=S=65535&p|h<<16,p=65535&(l=k),h=l>>>16,m=65535&(u=A),y=u>>>16,u=r[6],h+=(l=a[6])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[6]=A=65535&m|y<<16,a[6]=k=65535&p|h<<16,p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,u=r[7],h+=(l=a[7])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[7]=x=65535&m|y<<16,a[7]=R=65535&p|h<<16,s+=128,c-=128}return s}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(cUe),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=eDe,n=cUe,r=NMe;function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;new Uint8Array(32)[0]=9;const a=i(),o=i([1]),s=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function p(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function h(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function m(e,t){const n=i(),r=i();for(let e=0;e<16;e++)r[e]=t[e];p(r),p(r),p(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,h(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function y(e,t){let n=0;for(let r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function b(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return m(n,e),m(r,t),y(n,r)}function g(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function v(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function w(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function T(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,_=0,P=0,S=0,k=0,R=0,N=0,M=0,D=0,L=n[0],j=n[1],F=n[2],B=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],Z=n[14],J=n[15];r=t[0],a+=r*L,o+=r*j,s+=r*F,c+=r*B,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*Z,w+=r*J,r=t[1],o+=r*L,s+=r*j,c+=r*F,u+=r*B,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*Z,T+=r*J,r=t[2],s+=r*L,c+=r*j,u+=r*F,l+=r*B,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*Z,E+=r*J,r=t[3],c+=r*L,u+=r*j,l+=r*F,d+=r*B,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*Z,A+=r*J,r=t[4],u+=r*L,l+=r*j,d+=r*F,f+=r*B,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*Z,x+=r*J,r=t[5],l+=r*L,d+=r*j,f+=r*F,p+=r*B,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*Z,O+=r*J,r=t[6],d+=r*L,f+=r*j,p+=r*F,h+=r*B,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*Z,C+=r*J,r=t[7],f+=r*L,p+=r*j,h+=r*F,m+=r*B,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*Z,I+=r*J,r=t[8],p+=r*L,h+=r*j,m+=r*F,y+=r*B,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*Z,_+=r*J,r=t[9],h+=r*L,m+=r*j,y+=r*F,b+=r*B,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,_+=r*Z,P+=r*J,r=t[10],m+=r*L,y+=r*j,b+=r*F,g+=r*B,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,_+=r*Y,P+=r*Z,S+=r*J,r=t[11],y+=r*L,b+=r*j,g+=r*F,v+=r*B,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,_+=r*X,P+=r*Y,S+=r*Z,k+=r*J,r=t[12],b+=r*L,g+=r*j,v+=r*F,w+=r*B,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,_+=r*K,P+=r*X,S+=r*Y,k+=r*Z,R+=r*J,r=t[13],g+=r*L,v+=r*j,w+=r*F,T+=r*B,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,_+=r*q,P+=r*K,S+=r*X,k+=r*Y,R+=r*Z,N+=r*J,r=t[14],v+=r*L,w+=r*j,T+=r*F,E+=r*B,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,_+=r*G,P+=r*q,S+=r*K,k+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,T+=r*j,E+=r*F,A+=r*B,x+=r*U,O+=r*z,C+=r*H,I+=r*W,_+=r*V,P+=r*G,S+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*_,p+=38*P,h+=38*S,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function E(e,t){T(e,t,t)}function A(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)E(n,n),2!==r&&4!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function x(e,t){const n=i(),r=i(),a=i(),o=i(),s=i(),u=i(),l=i(),d=i(),f=i();w(n,e[1],e[0]),w(f,t[1],t[0]),T(n,n,f),v(r,e[0],e[1]),v(f,t[0],t[1]),T(r,r,f),T(a,e[3],t[3]),T(a,a,c),T(o,e[2],t[2]),v(o,o,o),w(s,r,n),w(u,o,a),v(l,o,a),v(d,r,n),T(e[0],s,u),T(e[1],d,l),T(e[2],l,u),T(e[3],s,d)}function O(e,t,n){for(let r=0;r<4;r++)h(e[r],t[r],n)}function C(e,t){const n=i(),r=i(),a=i();A(a,t[2]),T(n,t[0],a),T(r,t[1],a),m(e,r),e[31]^=g(n)<<7}function I(e,t,n){f(e[0],a),f(e[1],o),f(e[2],o),f(e[3],a);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;O(e,t,i),x(t,e),x(e,e),O(e,t,i)}}function _(e,t){const n=[i(),i(),i(),i()];f(n[0],u),f(n[1],l),f(n[2],o),T(n[3],u,l),I(e,n,t)}function P(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const a=new Uint8Array(32),o=[i(),i(),i(),i()];_(o,r),C(a,o);const s=new Uint8Array(64);return s.set(t),s.set(a,32),{publicKey:a,secretKey:s}}e.generateKeyPairFromSeed=P,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=P(n);return(0,r.wipe)(n),i},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};const S=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 k(e,t){let n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*S[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*S[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*S[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function R(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let t=0;t<64;t++)e[t]=0;k(e,t)}function N(e,t){const n=i(),r=i(),c=i(),u=i(),l=i(),p=i(),h=i();return f(e[2],o),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),E(c,e[1]),T(u,c,s),w(c,c,e[2]),v(u,e[2],u),E(l,u),E(p,l),T(h,p,l),T(n,h,c),T(n,n,u),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)E(n,n),1!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),T(n,n,c),T(n,n,u),T(n,n,u),T(e[0],n,u),E(r,e[0]),T(r,r,u),b(r,c)&&T(e[0],e[0],d),E(r,e[0]),T(r,r,u),b(r,c)?-1:(g(e[0])===t[31]>>7&&w(e[0],a,e[0]),T(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),a=[i(),i(),i(),i()],o=(0,n.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const s=new Uint8Array(64);s.set(o.subarray(32),32);const c=new n.SHA512;c.update(s.subarray(32)),c.update(t);const u=c.digest();c.clean(),R(u),_(a,u),C(s,a),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const l=c.digest();R(l);for(let e=0;e<32;e++)r[e]=u[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*o[t];return k(s.subarray(32),r),s},e.verify=function(t,r,a){const o=new Uint8Array(32),s=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(a.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(N(c,t))return!1;const u=new n.SHA512;u.update(a.subarray(0,32)),u.update(t),u.update(r);const l=u.digest();return R(l),I(s,c,l),_(c,a.subarray(32)),x(s,c),C(o,s),!y(a,o)},e.convertPublicKeyToX25519=function(e){let t=[i(),i(),i(),i()];if(N(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),a=t[1];v(n,o,a),w(r,o,a),A(r,r),T(n,n,r);let s=new Uint8Array(32);return m(s,n),s},e.convertSecretKeyToX25519=function(e){const t=(0,n.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const i=new Uint8Array(t.subarray(0,32));return(0,r.wipe)(t),i}}(sUe);const uUe=".",lUe="base64url",dUe="utf8",fUe="utf8",pUe=":",hUe="did",mUe="key",yUe="base58btc",bUe="z",gUe="K36";function vUe(e){return dLe(lLe(yBe(e),dUe),lUe)}function wUe(e){const t=lLe(gUe,yUe),n=bUe+dLe(dDe([t,e]),yUe);return[hUe,mUe,n].join(pUe)}function TUe(e){return dLe(e,lUe)}function EUe(e=eDe.randomBytes(32)){return sUe.generateKeyPairFromSeed(e)}async function AUe(e,t,n,r,i=OLe.fromMiliseconds(Date.now())){const a={alg:"EdDSA",typ:"JWT"},o={iss:wUe(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},s=lLe([vUe((c={header:a,payload:o}).header),vUe(c.payload)].join(uUe),fUe);var c;return function(e){return[vUe(e.header),vUe(e.payload),TUe(e.signature)].join(uUe)}({header:a,payload:o,signature:sUe.sign(r.secretKey,s)})}const xUe="INTERNAL_ERROR",OUe="SERVER_ERROR",CUe=[-32700,-32600,-32601,-32602,-32603],IUe={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[xUe]:{code:-32603,message:"Internal error"},[OUe]:{code:-32e3,message:"Server error"}},_Ue=OUe;function PUe(e){return Object.keys(IUe).includes(e)?IUe[e]:IUe[_Ue]}function SUe(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var kUe,RUe={},NUe={};var MUe,DUe={};function LUe(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function jUe(e=6){return BigInt(LUe(e))}function FUe(e,t,n){return{id:n||LUe(),jsonrpc:"2.0",method:e,params:t}}function BUe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function UUe(e,t,n){return{id:e,jsonrpc:"2.0",error:zUe(t,n)}}function zUe(e,t){return void 0===e?PUe(xUe):("string"==typeof e&&(e=Object.assign(Object.assign({},PUe(OUe)),{message:e})),void 0!==t&&(e.data=t),n=e.code,CUe.includes(n)&&(e=function(e){const t=Object.values(IUe).find((t=>t.code===e));return t||IUe[_Ue]}(e.code)),e);var n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar(function(){if(kUe)return NUe;function e(){return(null==ut?void 0:ut.crypto)||(null==ut?void 0:ut.msCrypto)||{}}function t(){const t=e();return t.subtle||t.webkitSubtle}return kUe=1,Object.defineProperty(NUe,"__esModule",{value:!0}),NUe.isBrowserCryptoAvailable=NUe.getSubtleCrypto=NUe.getBrowerCrypto=void 0,NUe.getBrowerCrypto=e,NUe.getSubtleCrypto=t,NUe.isBrowserCryptoAvailable=function(){return!!e()&&!!t()},NUe}(),e),t.__exportStar(function(){if(MUe)return DUe;function e(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function t(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}return MUe=1,Object.defineProperty(DUe,"__esModule",{value:!0}),DUe.isBrowser=DUe.isNode=DUe.isReactNative=void 0,DUe.isReactNative=e,DUe.isNode=t,DUe.isBrowser=function(){return!e()&&!t()},DUe}(),e)}(RUe);class HUe{}class WUe extends HUe{constructor(){super()}}class VUe extends WUe{constructor(e){super()}}function GUe(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==n&&new RegExp(t).test(n)}function qUe(e){return GUe(e,"^https?:")}function KUe(e){return GUe(e,"^wss?:")}function XUe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function YUe(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function ZUe(e){return YUe(e)&&"method"in e}function JUe(e){return YUe(e)&&(QUe(e)||$Ue(e))}function QUe(e){return"result"in e}function $Ue(e){return"error"in e}class eze extends VUe{constructor(e){super(e),this.events=new dMe,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(FUe(e.method,e.params||[],e.id||jUe().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(`${e.id}`,(e=>{$Ue(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),JUe(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const tze=e=>e.split("?")[0],nze=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws");var rze={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,a=9007199254740991,o="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",y="[object Null]",b="[object Object]",g="[object Promise]",v="[object Proxy]",w="[object RegExp]",T="[object Set]",E="[object String]",A="[object Symbol]",x="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",_=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[o]=S[s]=S[C]=S[u]=S[I]=S[l]=S[d]=S[f]=S[h]=S[m]=S[b]=S[w]=S[T]=S[E]=S[O]=!1;var k="object"==typeof ut&&ut&&ut.Object===Object&&ut,R="object"==typeof self&&self&&self.Object===Object&&self,N=k||R||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,L=D&&D.exports===M,j=L&&k.process,F=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),B=F&&F.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e,t){return e.has(t)}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V=Array.prototype,G=Function.prototype,q=Object.prototype,K=N["__core-js_shared__"],X=G.toString,Y=q.hasOwnProperty,Z=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=q.toString,Q=RegExp("^"+X.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=L?N.Buffer:void 0,ee=N.Symbol,te=N.Uint8Array,ne=q.propertyIsEnumerable,re=V.splice,ie=ee?ee.toStringTag:void 0,ae=Object.getOwnPropertySymbols,oe=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=Le(N,"DataView"),ue=Le(N,"Map"),le=Le(N,"Promise"),de=Le(N,"Set"),fe=Le(N,"WeakMap"),pe=Le(Object,"create"),he=Ue(ce),me=Ue(ue),ye=Ue(le),be=Ue(de),ge=Ue(fe),ve=ee?ee.prototype:void 0,we=ve?ve.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ae;++t<n;)this.add(e[t])}function Oe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ce(e,t){var n=We(e),r=!n&&He(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Ze(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!Y.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Be(u,c))||s.push(u);return s}function Ie(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}function _e(e){return null==e?void 0===e?x:y:ie&&ie in Object(e)?function(e){var t=Y.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var i=J.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return J.call(e)}(e)}function Pe(e){return Xe(e)&&_e(e)==o}function Se(e,t,n,a,c){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,a,c,f){var p=We(e),y=We(t),g=p?s:Fe(e),v=y?s:Fe(t),x=(g=g==o?b:g)==b,O=(v=v==o?b:v)==b,_=g==v;if(_&&Ve(e)){if(!Ve(t))return!1;p=!0,x=!1}if(_&&!x)return f||(f=new Oe),p||Ze(e)?Ne(e,t,n,a,c,f):function(e,t,n,a,o,s,c){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!s(new te(e),new te(t)));case u:case l:case m:return ze(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case E:return e==t+"";case h:var f=H;case T:var p=a&r;if(f||(f=W),e.size!=t.size&&!p)return!1;var y=c.get(e);if(y)return y==t;a|=i,c.set(e,t);var b=Ne(f(e),f(t),a,o,s,c);return c.delete(e),b;case A:if(we)return we.call(e)==we.call(t)}return!1}(e,t,g,n,a,c,f);if(!(n&r)){var P=x&&Y.call(e,"__wrapped__"),S=O&&Y.call(t,"__wrapped__");if(P||S){var k=P?e.value():e,R=S?t.value():t;return f||(f=new Oe),c(k,R,n,a,f)}}if(!_)return!1;return f||(f=new Oe),function(e,t,n,i,a,o){var s=n&r,c=Me(e),u=c.length,l=Me(t),d=l.length;if(u!=d&&!s)return!1;var f=u;for(;f--;){var p=c[f];if(!(s?p in t:Y.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var y=s;for(;++f<u;){var b=e[p=c[f]],g=t[p];if(i)var v=s?i(g,b,p,t,e,o):i(b,g,p,e,t,o);if(!(void 0===v?b===g||a(b,g,n,i,o):v)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var w=e.constructor,T=t.constructor;w==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof T&&T instanceof T||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,a,c,f)}(e,t,n,a,Se,c))}function ke(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(Ge(e)?Q:_).test(Ue(e));var t}function Re(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return se(e);var t,n,r,i=[];for(var a in Object(e))Y.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Ne(e,t,n,a,o,s){var c=n&r,u=e.length,l=t.length;if(u!=l&&!(c&&l>u))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,h=n&i?new xe:void 0;for(s.set(e,t),s.set(t,e);++f<u;){var m=e[f],y=t[f];if(a)var b=c?a(y,m,f,t,e,s):a(m,y,f,e,t,s);if(void 0!==b){if(b)continue;p=!1;break}if(h){if(!U(t,(function(e,t){if(!z(h,t)&&(m===e||o(m,e,n,a,s)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!o(m,y,n,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return We(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Je,je)}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ke(n)?n:void 0}Te.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Y.call(t,e)},Te.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():re.call(t,n,1),--this.size,!0)},Ee.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},Ee.prototype.has=function(e){return Ie(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ae.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(ue||Ee),string:new Te}},Ae.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ae.prototype.get=function(e){return De(this,e).get(e)},Ae.prototype.has=function(e){return De(this,e).has(e)},Ae.prototype.set=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ue||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ae(r)}return n.set(e,t),this.size=n.size,this};var je=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(ae(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Fe=_e;function Be(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(ce&&Fe(new ce(new ArrayBuffer(1)))!=I||ue&&Fe(new ue)!=h||le&&Fe(le.resolve())!=g||de&&Fe(new de)!=T||fe&&Fe(new fe)!=O)&&(Fe=function(e){var t=_e(e),n=t==b?e.constructor:void 0,r=n?Ue(n):"";if(r)switch(r){case he:return I;case me:return h;case ye:return g;case be:return T;case ge:return O}return t});var He=Pe(function(){return arguments}())?Pe:function(e){return Xe(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},We=Array.isArray;var Ve=oe||function(){return!1};function Ge(e){if(!Ke(e))return!1;var t=_e(e);return t==f||t==p||t==c||t==v}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Ye,Ze=B?(Ye=B,function(e){return Ye(e)}):function(e){return Xe(e)&&qe(e.length)&&!!S[_e(e)]};function Je(e){return null!=(t=e)&&qe(t.length)&&!Ge(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Se(e,t)}}(rze,rze.exports);var ize=lt(rze.exports),aze=dt(axe),oze=lt(self.fetch||(self.fetch=aze.default||aze));var sze=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},cze=sze;const uze=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)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")};class lze{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class dze{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return pze(this,e)}}class fze{constructor(e){this.decoders=e}or(e){return pze(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const pze=(e,t)=>new fze({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class hze{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new lze(e,t,n),this.decoder=new dze(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const mze=({name:e,prefix:t,encode:n,decode:r})=>new hze(e,t,n,r),yze=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=cze(n,t);return mze({prefix:e,name:t,encode:r,decode:e=>uze(i(e))})},bze=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>mze({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),gze=mze({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var vze=Object.freeze({__proto__:null,identity:gze});const wze=bze({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Tze=Object.freeze({__proto__:null,base2:wze});const Eze=bze({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Aze=Object.freeze({__proto__:null,base8:Eze});const xze=yze({prefix:"9",name:"base10",alphabet:"0123456789"});var Oze=Object.freeze({__proto__:null,base10:xze});const Cze=bze({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ize=bze({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var _ze=Object.freeze({__proto__:null,base16:Cze,base16upper:Ize});const Pze=bze({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sze=bze({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),kze=bze({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Rze=bze({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Nze=bze({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Mze=bze({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Dze=bze({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Lze=bze({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),jze=bze({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Fze=Object.freeze({__proto__:null,base32:Pze,base32upper:Sze,base32pad:kze,base32padupper:Rze,base32hex:Nze,base32hexupper:Mze,base32hexpad:Dze,base32hexpadupper:Lze,base32z:jze});const Bze=yze({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Uze=yze({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var zze=Object.freeze({__proto__:null,base36:Bze,base36upper:Uze});const Hze=yze({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Wze=yze({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Vze=Object.freeze({__proto__:null,base58btc:Hze,base58flickr:Wze});const Gze=bze({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),qze=bze({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Kze=bze({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Xze=bze({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Yze=Object.freeze({__proto__:null,base64:Gze,base64pad:qze,base64url:Kze,base64urlpad:Xze});const Zze=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Jze=Zze.reduce(((e,t,n)=>(e[n]=t,e)),[]),Qze=Zze.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const $ze=mze({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Jze[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Qze[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var eHe=Object.freeze({__proto__:null,base256emoji:$ze}),tHe=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=iHe;)n[r++]=255&t|nHe,t/=128;for(;t&rHe;)n[r++]=255&t|nHe,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},nHe=128,rHe=-128,iHe=Math.pow(2,31);var aHe=function e(t,n){var r,i=0,a=(n=n||0,0),o=n,s=t.length;do{if(o>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[o++],i+=a<28?(r&sHe)<<a:(r&sHe)*Math.pow(2,a),a+=7}while(r>=oHe);return e.bytes=o-n,i},oHe=128,sHe=127;var cHe=Math.pow(2,7),uHe=Math.pow(2,14),lHe=Math.pow(2,21),dHe=Math.pow(2,28),fHe=Math.pow(2,35),pHe=Math.pow(2,42),hHe=Math.pow(2,49),mHe=Math.pow(2,56),yHe=Math.pow(2,63),bHe={encode:tHe,decode:aHe,encodingLength:function(e){return e<cHe?1:e<uHe?2:e<lHe?3:e<dHe?4:e<fHe?5:e<pHe?6:e<hHe?7:e<mHe?8:e<yHe?9:10}},gHe=bHe;const vHe=(e,t,n=0)=>(gHe.encode(e,t,n),t),wHe=e=>gHe.encodingLength(e),THe=(e,t)=>{const n=t.byteLength,r=wHe(e),i=r+wHe(n),a=new Uint8Array(i+n);return vHe(e,a,0),vHe(n,a,r),a.set(t,i),new EHe(e,n,t,a)};let EHe=class{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};const AHe=({name:e,code:t,encode:n})=>new xHe(e,t,n);let xHe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?THe(this.code,t):t.then((e=>THe(this.code,e)))}throw Error("Unknown type, must be binary type")}};const OHe=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),CHe=AHe({name:"sha2-256",code:18,encode:OHe("SHA-256")}),IHe=AHe({name:"sha2-512",code:19,encode:OHe("SHA-512")});Object.freeze({__proto__:null,sha256:CHe,sha512:IHe});const _He=uze,PHe={code:0,name:"identity",encode:_He,digest:e=>THe(0,_He(e))};Object.freeze({__proto__:null,identity:PHe});new TextEncoder,new TextDecoder;const SHe={...vze,...Tze,...Aze,...Oze,..._ze,...Fze,...zze,...Vze,...Yze,...eHe};function kHe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function RHe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const NHe=RHe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),MHe=RHe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?kHe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),DHe={utf8:NHe,"utf-8":NHe,hex:SHe.base16,latin1:MHe,ascii:MHe,binary:MHe,...SHe};const LHe="core",jHe=`wc@2:${LHe}:`,FHe="error",BHe={database:":memory:"},UHe="client_ed25519_seed",zHe=OLe.ONE_DAY,HHe=OLe.SIX_HOURS,WHe="wss://relay.walletconnect.com",VHe="wss://relay.walletconnect.org",GHe="relayer_message",qHe="relayer_message_ack",KHe="relayer_connect",XHe="relayer_disconnect",YHe="relayer_error",ZHe="relayer_connection_stalled",JHe="relayer_publish",QHe="payload",$He="connect",eWe="disconnect",tWe="error",nWe=OLe.ONE_SECOND,rWe="subscription_created",iWe="subscription_deleted",aWe="subscription_sync",oWe="subscription_resubscribed",sWe=1e3*OLe.FIVE_SECONDS,cWe={wc_pairingDelete:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:0},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:0}}},uWe="pairing_create",lWe="pairing_expire",dWe="pairing_delete",fWe="pairing_ping",pWe="history_created",hWe="history_updated",mWe="history_deleted",yWe="history_sync",bWe="expirer_created",gWe="expirer_deleted",vWe="expirer_expired",wWe="expirer_sync",TWe="verify-api",EWe="https://verify.walletconnect.com",AWe="https://verify.walletconnect.org",xWe=[EWe,AWe];let OWe=class extends JBe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=Oje(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[Oje(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=HBe.generateChildLogger(e,this.name),this.core=t}get context(){return HBe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Kje(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Xje(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}};class CWe extends QBe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new dMe,this.name="publisher",this.queue=new Map,this.publishTimeout=OLe.toMiliseconds(2*OLe.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const i=n?.ttl||HHe,a=rFe(n),o=n?.prompt||!1,s=n?.tag||0,c=n?.id||jUe().toString(),u={topic:e,message:t,opts:{ttl:i,relay:a,prompt:o,tag:s,id:c}},l=setTimeout((()=>this.queue.set(c,u)),this.publishTimeout);try{await await Zje(this.rpcPublish(e,t,i,a,o,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(JHe,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(r=n?.internal)&&r.throwOnFailedPublish)throw this.removeRequestFromQueue(c),e;return}finally{clearTimeout(l)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=HBe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return HBe.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,a,o){var s,c,u,l;const d={method:iFe(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:a},id:o};return OFe(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),OFe(null==(u=d.params)?void 0:u.tag)&&(null==(l=d.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(ZHe);this.checkQueue()})),this.relayer.on(qHe,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class IWe{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var _We=Object.defineProperty,PWe=Object.defineProperties,SWe=Object.getOwnPropertyDescriptors,kWe=Object.getOwnPropertySymbols,RWe=Object.prototype.hasOwnProperty,NWe=Object.prototype.propertyIsEnumerable,MWe=(e,t,n)=>t in e?_We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DWe=(e,t)=>{for(var n in t||(t={}))RWe.call(t,n)&&MWe(e,n,t[n]);if(kWe)for(var n of kWe(t))NWe.call(t,n)&&MWe(e,n,t[n]);return e},LWe=(e,t)=>PWe(e,SWe(t));let jWe=class extends tUe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new IWe,this.events=new dMe,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=jHe,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(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=rFe(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;const t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((n,r)=>{const i=new OLe.Watch;i.start(t);const a=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(a),i.stop(t),n(!0)),i.elapsed(t)>=sWe&&(clearInterval(a),i.stop(t),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=HBe.generateChildLogger(t,this.name),this.clientId=""}get context(){return HBe.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(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=rFe(n);await this.rpcUnsubscribe(e,t,r);const i=EFe("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const n={method:iFe(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Zje(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(ZHe)}return Oje(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:iFe(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await Zje(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(ZHe)}}rpcUnsubscribe(e,t,n){const r={method:iFe(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,LWe(DWe({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,DWe({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,DWe({},t)),this.topicMap.set(t.topic,e),this.events.emit(rWe,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(iWe,LWe(DWe({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(aWe)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(oWe)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);AFe(t)&&this.onBatchSubscribe(t.map(((t,n)=>LWe(DWe({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(KHe,(async()=>{await this.onConnect()})),this.relayer.on(XHe,(()=>{this.onDisconnect()})),this.events.on(rWe,(async e=>{const t=rWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(iWe,(async e=>{const t=iWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}};var FWe=Object.defineProperty,BWe=Object.getOwnPropertySymbols,UWe=Object.prototype.hasOwnProperty,zWe=Object.prototype.propertyIsEnumerable,HWe=(e,t,n)=>t in e?FWe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let WWe=class extends $Be{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new dMe,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async e=>{this.logger.debug("Publishing Request Payload");const t=e.id,n=this.provider.request(e);this.requestsInFlight.set(t,{promise:n,request:e});try{return await this.toEstablishConnection(),await n}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}finally{this.requestsInFlight.delete(t)}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(KHe)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(YHe,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(QHe,this.onPayloadHandler),this.provider.on($He,this.onConnectHandler),this.provider.on(eWe,this.onDisconnectHandler),this.provider.on(tWe,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?HBe.generateChildLogger(e.logger,this.name):HBe.pino(HBe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new OWe(this.logger,e.core),this.subscriber=new jWe(this,this.logger),this.publisher=new CWe(this,this.logger),this.relayUrl=e?.relayUrl||WHe,this.projectId=e.projectId,this.bundleId=function(){var e;try{return zje()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}(),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 ${VHe}...`),await this.restartTransport(VHe)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return HBe.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";if(i)return i;const a=t=>{t.topic===e&&(this.subscriber.off(rWe,a),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(rWe,a)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t),n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach((async e=>{await e.promise}))),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Zje(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(oWe,(()=>{e()}))})),new Promise((async(e,t)=>{try{await Zje(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(eWe)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await zFe())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new eze(new class{constructor(e){if(this.url=e,this.events=new dMe,this.registering=!1,!KUe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(yBe(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!KUe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const r=new URLSearchParams(e).get("origin"),i=RUe.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!XUe(e)},a=new nze(e,[],i);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?a.onerror=e=>{const t=e;n(this.emitError(t.error))}:a.on("error",(e=>{n(this.emitError(e))})),a.onopen=()=>{this.onOpen(a),t(a)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?mBe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=UUe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return SUe(e,tze(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${tze(this.url)}`));return this.events.emit("register_error",t),t}}(Gje({sdkVersion:"2.11.1",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),ZUe(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,a={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))UWe.call(t,n)&&HWe(e,n,t[n]);if(BWe)for(var n of BWe(t))zWe.call(t,n)&&HWe(e,n,t[n]);return e})({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else JUe(e)&&this.events.emit(qHe,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(GHe,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=BUe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(QHe,this.onPayloadHandler),this.provider.off($He,this.onConnectHandler),this.provider.off(eWe,this.onDisconnectHandler),this.provider.off(tWe,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(ZHe,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await zFe();HFe((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(XHe),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),OLe.toMiliseconds(nWe)))}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}};var VWe=Object.defineProperty,GWe=Object.getOwnPropertySymbols,qWe=Object.prototype.hasOwnProperty,KWe=Object.prototype.propertyIsEnumerable,XWe=(e,t,n)=>t in e?VWe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YWe=(e,t)=>{for(var n in t||(t={}))qWe.call(t,n)&&XWe(e,n,t[n]);if(GWe)for(var n of GWe(t))KWe.call(t,n)&&XWe(e,n,t[n]);return e};let ZWe=class extends eUe{constructor(e,t,n,r=jHe,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!OFe(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>ize(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=YWe(YWe({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=HBe.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return HBe.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(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}},JWe=class extends ZBe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new dMe,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:$je(OLe.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(pWe,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=$Ue(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(hWe,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(mWe,n)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=HBe.generateChildLogger(t,this.name)}get context(){return HBe.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 e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:FUe(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(yWe)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(pWe,(e=>{const t=pWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(hWe,(e=>{const t=hWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(mWe,(e=>{const t=mWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{OLe.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}},QWe=class extends nUe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new dMe,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(bWe,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(gWe,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=HBe.generateChildLogger(t,this.name)}get context(){return HBe.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(e){if("string"==typeof e)return function(e){return Jje("topic",e)}(e);if("number"==typeof e)return function(e){return Jje("id",e)}(e);const{message:t}=TFe("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(wWe)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;OLe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(vWe,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(bWe,(e=>{const t=bWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(vWe,(e=>{const t=vWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(gWe,(e=>{const t=gWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}},$We=class extends rUe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=TWe,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||zje()||!Hje())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=AWe;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,AWe)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*OLe.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{if(document.getElementById(TWe))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=TWe,r.src=`${this.verifyUrl}/${this.projectId}`,r.style.display="none",document.body.append(r),this.iframe=r,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),OLe.toMiliseconds(OLe.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||EWe;return xWe.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${EWe}`),t=EWe),t},this.logger=HBe.generateChildLogger(t,this.name),this.verifyUrl=EWe,this.abortController=new AbortController,this.isDevEnv=Uje()&&process.env.IS_VITEST}get context(){return HBe.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),OLe.toMiliseconds(e))}},eVe=class extends iUe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,a=`https://echo.walletconnect.com/${this.projectId}/clients`;await oze(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=HBe.generateChildLogger(t,this.context)}};var tVe=Object.defineProperty,nVe=Object.getOwnPropertySymbols,rVe=Object.prototype.hasOwnProperty,iVe=Object.prototype.propertyIsEnumerable,aVe=(e,t,n)=>t in e?tVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oVe=(e,t)=>{for(var n in t||(t={}))rVe.call(t,n)&&aVe(e,n,t[n]);if(nVe)for(var n of nVe(t))iVe.call(t,n)&&aVe(e,n,t[n]);return e};const sVe=class e extends YBe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=LHe,this.events=new dMe,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||WHe,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:HBe.pino(HBe.getDefaultLoggerOptions({level:e?.logger||FHe}));this.logger=HBe.generateChildLogger(t,this.name),this.heartbeat=new EBe.HeartBeat,this.crypto=new class{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),wUe(EUe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=cDe.generateKeyPair();return{privateKey:dLe(e.secretKey,mje),publicKey:dLe(e.publicKey,mje)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=EUe(await this.getClientSeed()),n=xje(),r=zHe;return await AUe(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=cDe.sharedKey(lLe(e,mje),lLe(t,mje),!0);return dLe(new $Me(sDe.SHA256,n).expand(Aje),mje)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return dLe(sDe.hash(lLe(e,mje)),mje)}(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=Pje(n),i=yBe(t);if(Sje(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const a=this.getSymKey(e),{type:o,senderPublicKey:s}=r;return Ije({type:o,symKey:a,message:i,senderPublicKey:s})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=_je(e);return Pje({type:Cje(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?dLe(n.senderPublicKey,mje):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(Sje(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new gMe.ChaCha20Poly1305(lLe(e.symKey,mje)),{sealed:n,iv:r}=_je(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return dLe(i,bje)}({symKey:this.getSymKey(e),encoded:t});return mBe(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>Cje(_je(e).type),this.getPayloadSenderPublicKey=e=>{const t=_je(e);return t.senderPublicKey?dLe(t.senderPublicKey,mje):void 0},this.core=e,this.logger=HBe.generateChildLogger(t,this.name),this.keychain=n||new class{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=HBe.generateChildLogger(t,this.name)}get context(){return HBe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Kje(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Xje(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this.core,this.logger)}get context(){return HBe.getLoggerContext(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(UHe)}catch{e=xje(),await this.keychain.set(UHe,e)}return function(e,t="utf8"){const n=DHe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):kHe(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this,this.logger,e?.keychain),this.history=new JWe(this,this.logger),this.expirer=new QWe(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new class{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new class{constructor(){this.localStorage=vBe.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(wBe)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return mBe(t)}async setItem(e,t){this.localStorage.setItem(e,yBe(t))}async removeItem(e){this.localStorage.removeItem(e)}};this.storage=e;try{const t=new class{constructor(){this.indexedDb=iBe({driver:bBe({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,yBe(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const a=await e.getKeys();if(!a.length)return void n(t);const o=[];for(;a.length;){const n=a.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),o.push(n)}}await t.setItem(r,1),n(t),TBe(e,o)})(e,t,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(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}(oVe(oVe({},BHe),e?.storageOptions)),this.relayer=new WWe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new class{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new dMe,this.initialized=!1,this.storagePrefix=jHe,this.ignoredPayloadTypes=[vje],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:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=xje(),t=await this.core.crypto.setSymKey(e),n=$je(OLe.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},a=mFe({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:r,expiryTimestamp:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,n),{topic:t,uri:a}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i}=pFe(e.uri);let a;if(this.pairings.keys.includes(t)&&(a=this.pairings.get(t),a.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=i||$je(OLe.FIVE_MINUTES),s={topic:t,relay:r,expiry:o,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(uWe,s),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r})),s},this.activate=async({topic:e})=>{this.isInitialized();const t=$je(OLe.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=Yje();this.events.once(tFe("pairing_ping",e),(({error:e})=>{e?i(e):r()})),await n()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",EFe("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=FUe(t,n),i=await this.core.crypto.encode(e,r),a=cWe[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,a),r.id},this.sendResult=async(e,t,n)=>{const r=BUe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=cWe[a.request.method].res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=UUe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=cWe[a.request.method]?cWe[a.request.method].res:cWe.unregistered_method.res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,EFe("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>eFe(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit(fWe,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{QUe(t)?this.events.emit(tFe("pairing_ping",n),{}):$Ue(t)&&this.events.emit(tFe("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(dWe,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=EFe("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(EFe("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(CFe(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=TFe("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=pFe(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=TFe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=TFe("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&OLe.toMiliseconds(n?.expiryTimestamp)<Date.now()){const{message:e}=TFe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!CFe(e,!1)){const{message:t}=TFe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=TFe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=HBe.generateChildLogger(t,this.name),this.pairings=new ZWe(this.core,this.logger,this.name,this.storagePrefix)}get context(){return HBe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(GHe,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{ZUe(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):JUe(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(vWe,(async e=>{const{topic:t}=Qje(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(lWe,{topic:t}))}))}}(this,this.logger),this.verify=new $We(this.projectId||"",this.logger),this.echoClient=new eVe(this.projectId||"",this.logger)}static async init(t){const n=new e(t);await n.initialize();const r=await n.crypto.getClientId();return await n.storage.setItem("WALLETCONNECT_CLIENT_ID",r),n}get context(){return HBe.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(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}},cVe="client",uVe=`wc@2:${cVe}:`,lVe=cVe,dVe="error",fVe="WALLETCONNECT_DEEPLINK_CHOICE",pVe="Proposal expired",hVe=OLe.SEVEN_DAYS,mVe={wc_sessionPropose:{req:{ttl:OLe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:OLe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:OLe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1115}}},yVe={min:OLe.FIVE_MINUTES,max:OLe.SEVEN_DAYS},bVe="IDLE",gVe="ACTIVE",vVe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var wVe=Object.defineProperty,TVe=Object.defineProperties,EVe=Object.getOwnPropertyDescriptors,AVe=Object.getOwnPropertySymbols,xVe=Object.prototype.hasOwnProperty,OVe=Object.prototype.propertyIsEnumerable,CVe=(e,t,n)=>t in e?wVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IVe=(e,t)=>{for(var n in t||(t={}))xVe.call(t,n)&&CVe(e,n,t[n]);if(AVe)for(var n of AVe(t))OVe.call(t,n)&&CVe(e,n,t[n]);return e},_Ve=(e,t)=>TVe(e,EVe(t));class PVe extends oUe{constructor(e){super(e),this.name="engine",this.events=new dMe,this.initialized=!1,this.ignoredPayloadTypes=[vje],this.requestQueue={state:bVe,queue:[]},this.sessionRequestQueue={state:bVe,queue:[]},this.requestQueueDelay=OLe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(mVe)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),OLe.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=_Ve(IVe({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:a,relays:o}=t;let s,c=n,u=!1;if(c&&(u=this.client.core.pairing.pairings.get(c).active),!c||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const l=await this.client.core.crypto.generateKeyPair(),d=mVe.wc_sessionPropose.req.ttl||OLe.FIVE_MINUTES,f=$je(d),p=IVe({requiredNamespaces:r,optionalNamespaces:i,relays:o??[{protocol:"irn"}],proposer:{publicKey:l,metadata:this.client.metadata},expiryTimestamp:f},a&&{sessionProperties:a}),{reject:h,resolve:m,done:y}=Yje(d,pVe);if(this.events.once(tFe("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=_Ve(IVe({},t),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),m(e)}})),!c){const{message:e}=TFe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const b=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,IVe({id:b},p)),{uri:s,approval:y}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i}=e,a=this.client.proposal.get(t);let{pairingTopic:o,proposer:s,requiredNamespaces:c,optionalNamespaces:u}=a;o=o||"";const l=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(l,d);o&&t&&(await this.client.core.pairing.updateMetadata({topic:o,metadata:s.metadata}),await this.sendResult({id:t,topic:o,result:{relay:{protocol:n??"irn"},responderPublicKey:l}}),await this.client.proposal.delete(t,EFe("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:o}));const p=IVe({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:o,controller:{publicKey:l,metadata:this.client.metadata},expiry:$je(hVe)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f);const h=_Ve(IVe({},p),{topic:f,requiredNamespaces:c,optionalNamespaces:u,pairingTopic:o,acknowledged:!1,self:p.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:l});await this.client.session.set(f,h);try{await this.sendRequest({topic:f,method:"wc_sessionSettle",params:p,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(f,EFe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(f),e}return await this.setExpiry(f,$je(hVe)),{topic:f,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(f))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:n}=e,{pairingTopic:r}=this.client.proposal.get(t);r&&(await this.sendError(t,r,n),await this.client.proposal.delete(t,EFe("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n}}),{done:i,resolve:a,reject:o}=Yje();return this.events.once(tFe("session_update",r),(({error:e})=>{e?o(e):a()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:r,resolve:i,reject:a}=Yje();return this.events.once(tFe("session_extend",n),(({error:e})=>{e?a(e):i()})),await this.setExpiry(t,$je(hVe)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i=mVe.wc_sessionRequest.req.ttl}=e,a=LUe(),{done:o,resolve:s,reject:c}=Yje(i,"Request expired. Please try again.");return this.events.once(tFe("session_request",a),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:a,topic:r,method:"wc_sessionRequest",params:{request:_Ve(IVe({},n),{expiryTimestamp:$je(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:a}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(Hje()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,fVe);(async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const r="string"==typeof n?JSON.parse(n):n;let i=r?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const a=`${i}/wc?requestId=${e}&sessionTopic=${t}`,o=Wje();o===Fje.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===Fje.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(e){console.error(e)}})({id:a,topic:r,wcDeepLink:t}),e()})),o()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;QUe(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):$Ue(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:n,resolve:r,reject:i}=Yje();this.events.once(tFe("session_ping",e),(({error:e})=>{e?i(e):r()})),await n()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:EFe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=TFe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let a=!0;return!!qje(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:o}=e.namespaces[t],s=yFe(r),c=n[t];qje(pje(t,c),s)&&qje(c.methods,i)&&qje(c.events,o)||(a=!1)})),a)}(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{const{topic:t,expirerHasDeleted:n=!1,emitEvent:r=!0,id:i=0}=e,{self:a}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,EFe("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),n||this.client.core.expirer.del(t),this.client.core.storage.removeItem(fVe).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,EFe("USER_DISCONNECTED"))})),r&&this.client.events.emit("session_delete",{id:i,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,EFe("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,n=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),n?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(this.sessionRequestQueue.state=bVe,this.client.events.emit("session_request_expire",{id:e}))},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,$je(mVe.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}=e,a=r.request.expiryTimestamp||$je(mVe.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i}),a&&this.client.core.expirer.set(t,a)},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:a,clientRpcId:o,throwOnFailedPublish:s}=e,c=FUe(n,r,o);if(Hje()&&vVe.includes(n)){const e=Oje(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,c),l=mVe[n].req;return i&&(l.ttl=i),a&&(l.id=a),this.client.core.history.set(t,c),s?(l.internal=_Ve(IVe({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,l)):this.client.core.relayer.publish(t,u,l).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,a=BUe(t,r),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,t),c=mVe[s.request.method].res;i?(c.internal=_Ve(IVe({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,o,c)):this.client.core.relayer.publish(n,o,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(a)},this.sendError=async(e,t,n)=>{const r=UUe(e,n),i=await this.client.core.crypto.encode(t,r),a=await this.client.core.history.get(t,e),o=mVe[a.request.method].res;this.client.core.relayer.publish(t,i,o),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;eFe(t.expiry)&&(n=!0),this.client.core.crypto.keychain.has(t.topic)||(n=!0),n&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{eFe(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==gVe){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=gVe;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=bVe}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=TFe("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(IVe({},t.params));const i=n.expiryTimestamp||$je(mVe.wc_sessionPropose.req.ttl),a=IVe({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,a);const o=Oje(JSON.stringify(t)),s=await this.getVerifyContext(o,a.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:a,verifyContext:s})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(QUe(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const a=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const o=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});const s=await this.client.core.crypto.generateSharedKey(a,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});const c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else $Ue(t)&&(await this.client.proposal.delete(n,EFe("USER_DISCONNECTED")),this.events.emit(tFe("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:a,namespaces:o,sessionProperties:s,pairingTopic:c}=t.params,u=IVe({topic:e,relay:n,expiry:a,namespaces:o,acknowledged:!0,pairingTopic:c,requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},s&&{sessionProperties:s});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(tFe("session_connect"),{session:u}),this.cleanupDuplicatePairings(u)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;QUe(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(tFe("session_approve",n),{})):$Ue(t)&&(await this.client.session.delete(e,EFe("USER_DISCONNECTED")),this.events.emit(tFe("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=VFe.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(IVe({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_update",{id:r,topic:e,params:n}),VFe.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;QUe(t)?this.events.emit(tFe("session_update",n),{}):$Ue(t)&&this.events.emit(tFe("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,$je(hVe)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t;QUe(t)?this.events.emit(tFe("session_extend",n),{}):$Ue(t)&&this.events.emit(tFe("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{QUe(t)?this.events.emit(tFe("session_ping",n),{}):$Ue(t)&&this.events.emit(tFe("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(JHe,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:EFe("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(IVe({topic:e},r));const t=Oje(JSON.stringify(FUe("wc_sessionRequest",r,n))),i=this.client.session.get(e),a={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(a),this.addSessionRequestToSessionRequestQueue(a),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;QUe(t)?this.events.emit(tFe("session_request",n),{result:t.result}):$Ue(t)&&this.events.emit(tFe("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=VFe.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(IVe({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),VFe.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=bVe,this.processSessionRequestQueue()}),OLe.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{const n=this.client.core.history.pending;n.length>0&&n.filter((t=>t.topic===e&&"wc_sessionRequest"===t.request.method)).forEach((e=>{this.events.emit(tFe("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===gVe)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=gVe,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,FUe("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:a}=e;if(OFe(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&AFe(e)&&e.length&&e.forEach((e=>{n=MFe(e)})),n}(a,!0)){const{message:e}=TFe("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(e)}!OFe(n)&&0!==xFe(n)&&this.validateNamespaces(n,"requiredNamespaces"),!OFe(r)&&0!==xFe(r)&&this.validateNamespaces(r,"optionalNamespaces"),OFe(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&xFe(e)){const i=RFe(e,t);i&&(r=i);const a=SFe(e,t,n);a&&(r=a)}else r=TFe("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!DFe(e))throw new Error(TFe("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const a=this.client.proposal.get(t),o=NFe(n,"approve()");if(o)throw new Error(o.message);const s=BFe(a.requiredNamespaces,n,"approve()");if(s)throw new Error(s.message);if(!CFe(r,!0)){const{message:e}=TFe("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}OFe(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&IFe(e.code,!1)&&e.message&&CFe(e.message,!1))}(n)){const{message:e}=TFe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!MFe(t)){const{message:e}=TFe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const a=function(e,t){let n=null;return CFe(e?.publicKey,!1)||(n=TFe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);const o=NFe(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);if(eFe(i)){const{message:e}=TFe("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=NFe(n,"update()");if(i)throw new Error(i.message);const a=BFe(r.requiredNamespaces,n,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:a}=this.client.session.get(t);if(!LFe(a,r)){const{message:e}=TFe("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(OFe(e)||!CFe(e.method,!1))}(n)){const{message:e}=TFe("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!jFe(a,r,n.method)){const{message:e}=TFe("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return IFe(e,!1)&&e<=t.max&&e>=t.min}(i,yVe)){const{message:e}=TFe("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${yVe.min} and ${yVe.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(n){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),n}if(!function(e){return!(OFe(e)||OFe(e.result)&&OFe(e.error)||!IFe(e.id,!1)||!CFe(e.jsonrpc,!1))}(r)){const{message:e}=TFe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!LFe(i,r)){const{message:e}=TFe("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(OFe(e)||!CFe(e.name,!1))}(n)){const{message:e}=TFe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!FFe(i,r,n.name)){const{message:e}=TFe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||EWe,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!CFe(e,!1)){const{message:n}=TFe("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(GHe,(async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const r=await this.client.core.crypto.decode(t,n);try{ZUe(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):JUe(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.client.core.history.delete(t,r.id)):this.onRelayEventUnknownPayload({topic:t,payload:r})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(vWe,(async e=>{const{topic:t,id:n}=Qje(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,TFe("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(uWe,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!CFe(e,!1)){const{message:t}=TFe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=TFe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!CFe(e,!1)){const{message:t}=TFe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=TFe("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=TFe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(CFe(e,!1)){const{message:t}=TFe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=TFe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=TFe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=TFe("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class SVe extends ZWe{constructor(e,t){super(e,t,"proposal",uVe),this.core=e,this.logger=t}}let kVe=class extends ZWe{constructor(e,t){super(e,t,"session",uVe),this.core=e,this.logger=t}};class RVe extends ZWe{constructor(e,t){super(e,t,"request",uVe,(e=>e.id)),this.core=e,this.logger=t}}let NVe=class e extends aUe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=lVe,this.events=new dMe,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||lVe,this.metadata=e?.metadata||$Le()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:HBe.pino(HBe.getDefaultLoggerOptions({level:e?.logger||dVe}));this.core=e?.core||new sVe(e),this.logger=HBe.generateChildLogger(t,this.name),this.session=new kVe(this.core,this.logger),this.proposal=new SVe(this.core,this.logger),this.pendingRequest=new RVe(this.core,this.logger),this.engine=new PVe(this)}static async init(t){const n=new e(t);return await n.initialize(),n}get context(){return HBe.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(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var MVe={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:ut,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=h(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var n,r,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function T(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},b.call(v.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];T.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,n){return new Promise((function(r,a){var o=new v(e,n);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new T(i,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=f,e.Request=v,e.Response=T),t.Headers=f,t.Request=v,t.Response=T,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(MVe,MVe.exports);var DVe=lt(MVe.exports);const LVe={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class jVe{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new dMe,this.isAvailable=!1,this.registering=!1,!qUe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=yBe(e),n=await DVe(this.url,Object.assign(Object.assign({},LVe),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!qUe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=yBe({id:1,jsonrpc:"2.0",method:"test",params:[]});await DVe(e,Object.assign(Object.assign({},LVe),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?mBe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=UUe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return SUe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const FVe="error",BVe="wc@2:universal_provider:",UVe="default_chain_changed";var zVe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},HVe={exports:{}};
|
|
92
|
+
function uxe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var lxe=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=uxe({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var o in i)i[o]&&(a+="; "+o,!0!==i[o]&&(a+="="+i[o].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var a=n[i].split("="),o=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(r[s]=t.read(o,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",uxe({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,uxe({},this.attributes,t))},withConverter:function(t){return e(uxe({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function dxe(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function fxe(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",a=n[r],o={domain:"."+a};try{if(lxe.set(i,"1",o),lxe.get(i))return lxe.remove(i,o),a}catch(e){return}}}var pxe=function(){function e(t){void 0===t&&(t=e.defaults),this.options=z_(z_({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:fxe(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var n=lxe.get(e);if(null==n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?lxe.set(e,t,this.opts()):null===t?lxe.remove(e,this.opts()):lxe.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return lxe.remove(e,this.opts())},e}(),hxe=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!=n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}(),mxe=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!==(t=this.cache[e])&&void 0!==t?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}(),yxe={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function bxe(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every((function(e){return Object.values(yxe).includes(e)}))}var gxe,vxe=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(t=i.get(e)))return t}catch(t){console.warn("Can't access ".concat(e,": ").concat(t))}}return null},e.prototype.set=function(e,t){this.stores.forEach((function(n){try{n.set(e,t)}catch(t){console.warn("Can't set ".concat(e,": ").concat(t))}}))},e.prototype.clear=function(e){this.stores.forEach((function(t){try{t.remove(e)}catch(t){console.warn("Can't remove ".concat(e,": ").concat(t))}}))},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}();function wxe(e){var t=e.map((function(e){var t,n;switch(!function(e){return"object"==typeof e&&void 0!==e.name}(e)?t=e:(t=e.name,n=e.settings),t){case yxe.Cookie:return new pxe(n);case yxe.LocalStorage:return new hxe;case yxe.Memory:return new mxe;default:throw new Error("Unknown Store Type: ".concat(e))}}));return t}function Txe(e,t){return e.map((function(e){return t&&e===yxe.Cookie?{name:e,settings:t}:e}))}function Exe(){if(gxe)return gxe;var e=fxe(window.location.href);return gxe={expires:31536e6,secure:!1,path:"/"},e&&(gxe.domain=e),gxe}var Axe="npm";function xxe(){return Axe}function Oxe(e,t,n,r){var i,a,o,s,c,u,l=e.user();t.context=null!==(a=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==a?a:{};var d=t.context,f="string"==typeof(null===(o=d.page)||void 0===o?void 0:o.search)?null===(s=d.page)||void 0===s?void 0:s.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,d.userAgent=navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===d.locale&&void 0!==p&&(d.locale=p),!d.library){var h=xxe();d.library="web"===h?{name:"analytics.js",version:"next-".concat(cxe)}:{name:"analytics.js",version:"npm:next-".concat(cxe)}}f&&!d.campaign&&(d.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],a=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var o=r.substr(4);"campaign"===o&&(o="name"),e[o]=dxe(a)}return e}),{})}(f)),function(e,t,n){var r=new vxe(n?[]:[new pxe(Exe())]),i=r.get("s:context.referrer"),a=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),a=i[0],o=i[1];if(t[a])return{id:o,type:t[a]}}}(e);(a=null!=a?a:i)&&(t&&(t.referrer=z_(z_({},t.referrer),a)),r.set("s:context.referrer",a))}(f,d,null!==(c=e.options.disableClientPersistence)&&void 0!==c&&c),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var m=e.queue.failedInitializations||[];m.length>0&&(t._metadata={failedInitializations:m});var y=[],b=[];for(var g in r){var v=r[g];"Segment.io"===g&&y.push(g),"bundled"===v.bundlingStatus&&y.push(g),"unbundled"===v.bundlingStatus&&b.push(g)}for(var w=0,T=(null==n?void 0:n.unbundledIntegrations)||[];w<T.length;w++){var E=T[w];b.includes(E)||b.push(E)}var A=null!==(u=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==u?u:{},x=[];y.sort().forEach((function(e){var t;(null!==(t=A[e])&&void 0!==t?t:[]).forEach((function(e){x.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=z_(z_({},t._metadata),{bundled:y.sort(),unbundled:b.sort(),bundledIds:x}));var O=function(){var e=lxe.get("_ga");if(e&&e.startsWith("amp"))return e}();return O&&(d.amp={id:O}),t}var Cxe="api.segment.io/v1";function Ixe(e){console.error("Error sending segment performance metrics",e)}var _xe,Pxe=function(){function e(e){var t,n,r,i,a=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Cxe,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var o=!1,s=function(){o||(o=!0,a.flush().catch(Ixe),o=!1,setTimeout(s,a.flushTimer))};s()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:z_(z_({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(cxe):"npm:next-".concat(cxe)})}}(e,t,xxe());this.queue.push(n),e.includes("error")&&this.flush().catch(Ixe)}},e.prototype.flush=function(){return q_(this,void 0,void 0,(function(){var e=this;return K_(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ixe(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return q_(this,void 0,void 0,(function(){var e,t,n;return K_(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,sxe(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Sxe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U_(t,e),t.initRemoteMetrics=function(e){_xe=new Pxe(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==_xe||_xe.increment(t,null!=r?r:[])},t}(HAe),kxe=function(e){function t(t,n){return e.call(this,t,n,new Sxe)||this}return U_(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(GAe),Rxe={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&r)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&r)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&r)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&r)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|a>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|a>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function o(e){var t,r,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<u?e.subarray(t-64):new Uint8Array(0)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(l,a),l}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),a=new Uint8Array(i);for(n=0;n<r;n+=1)a[n]=e.charCodeAt(n);return t?a:i}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return c(a("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,a,o,s,c=this.byteLength,u=t(n,c),l=c;return r!==e&&(l=t(r,c)),u>l?new ArrayBuffer(0):(i=l-u,a=new ArrayBuffer(i),o=new Uint8Array(a),s=new Uint8Array(this,u,i),o.set(s),a)}}(),h.prototype.append=function(e){return this.appendBinary(u(e)),this},h.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},h.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(e,t){var r,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,n(this._hash,e)},h.hash=function(e,t){return h.hashBinary(u(e),t)},h.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),a=r.length;for(this._length+=e.byteLength,t=64;t<=a;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<a?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r[t]<<(t%4<<3);return this._finish(a,i),n=c(this._hash),e&&(n=p(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var e=h.prototype.getState.call(this);return e.buff=d(e.buff),e},h.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),h.prototype.setState.call(this,e)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},h}()}(Rxe);var Nxe=lt(Rxe.exports),Mxe=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(z_(z_({},this.baseEvent()),{event:e,type:"track",properties:t,options:z_({},n),integrations:z_({},r)}))},e.prototype.page=function(e,t,n,r,i){var a,o={type:"page",properties:z_({},n),options:z_({},r),integrations:z_({},i)};return null!==e&&(o.category=e,o.properties=null!==(a=o.properties)&&void 0!==a?a:{},o.properties.category=e),null!==t&&(o.name=t),this.normalize(z_(z_({},this.baseEvent()),o))},e.prototype.screen=function(e,t,n,r,i){var a={type:"screen",properties:z_({},n),options:z_({},r),integrations:z_({},i)};return null!==e&&(a.category=e),null!==t&&(a.name=t),this.normalize(z_(z_({},this.baseEvent()),a))},e.prototype.identify=function(e,t,n,r){return this.normalize(z_(z_({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:z_({},n),integrations:z_({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(z_(z_({},this.baseEvent()),{type:"group",traits:t,options:z_({},n),integrations:z_({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:z_({},n),integrations:z_({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(z_(z_({},i),this.baseEvent())):this.normalize(z_(z_({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],a=null!==(t=e.options)&&void 0!==t?t:{};delete a.integrations;var o=Object.keys(a),s=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},c={};return o.forEach((function(e){"context"!==e&&(i.includes(e)?AAe(c,e,a[e]):AAe(s,e,a[e]))})),[s,c]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return z_(z_({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),a=z_(z_({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),o=this.context(e),s=o[0],c=o[1];e.options;var u=H_(e,["options"]),l=z_(z_(z_({timestamp:new Date},u),{context:s,integrations:a}),c),d="ajs-next-"+Nxe.hash(JSON.stringify(l)+UAe());return z_(z_({},l),{messageId:d})},e}(),Dxe={getItem:function(){},setItem:function(){},removeItem:function(){}};try{Dxe=exe()&&window.localStorage?window.localStorage:Dxe}catch(e){console.warn("Unable to access localStorage",e)}function Lxe(e){var t=Dxe.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new kxe(e.event,e.id)}))}function jxe(e){var t=Dxe.getItem(e);return t?JSON.parse(t):{}}function Fxe(e){Dxe.removeItem(e)}function Bxe(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=Dxe.getItem(r),a=i?JSON.parse(i):null,o=null===a||function(e){return(new Date).getTime()>e}(a);if(o)return Dxe.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void Dxe.removeItem(r);!o&&n<3?setTimeout((function(){Bxe(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Uxe=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),o=[],s={};return Bxe(n,(function(){try{o=Lxe(i),s=jxe(a),Fxe(i),Fxe(a),r.queue=eP(eP([],o,!0),r.queue,!0),r.seen=z_(z_({},s),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=eP(eP([],r.queue,!0),r.future,!0);try{Bxe(n,(function(){!function(e,t){var n=Lxe(e),r=eP(eP([],t,!0),n,!0).reduce((function(e,t){var n;return z_(z_({},e),((n={})[t.id]=t,n))}),{});Dxe.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=jxe(e);Dxe.setItem(e,JSON.stringify(z_(z_({},n),t)))}(a,r.seen)}))}catch(e){console.error(e)}}})),r}return U_(t,e),t}(jAe),zxe=function(e){function t(t){return e.call(this,"string"==typeof t?new Uxe(4,t):t)||this}return U_(t,e),t.prototype.flush=function(){return q_(this,void 0,void 0,(function(){return K_(this,(function(t){return rxe()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(XAe);function Hxe(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);a&&"function"==typeof a.value&&(e[i]=e[i].bind(e))}}return e}var Wxe={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Vxe=function(){function e(e,t){void 0===e&&(e=Wxe);var n,r,i,a,o=this;this.options={},this.id=function(e){if(o.options.disable)return null;var t=o.identityStore.getAndSync(o.idKey);void 0!==e&&(o.identityStore.set(o.idKey,e),e!==t&&null!==t&&null!==e&&o.anonymousId(null));var n=o.identityStore.getAndSync(o.idKey);if(n)return n;var r=o.legacyUserStore.get(Wxe.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(o.options.disable)return null;if(void 0===e){var r=null!==(t=o.identityStore.getAndSync(o.anonKey))&&void 0!==t?t:null===(n=o.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(o.identityStore.set(o.anonKey,null),o.identityStore.getAndSync(o.anonKey)):(o.identityStore.set(o.anonKey,null!=e?e:UAe()),o.identityStore.getAndSync(o.anonKey))},this.traits=function(e){var t;if(!o.options.disable)return null===e&&(e={}),e&&o.traitsStore.set(o.traitsKey,null!=e?e:{}),null!==(t=o.traitsStore.get(o.traitsKey))&&void 0!==t?t:{}},this.options=z_(z_({},Wxe),e),this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Wxe.cookie.key,this.traitsKey=null!==(a=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==a?a:Wxe.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,(function(e){return e===yxe.Cookie})),this.traitsStore=this.createStorage(this.options,t,(function(e){return e!==yxe.Cookie}));var s=this.legacyUserStore.get(Wxe.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),Hxe(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=z_(z_({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[yxe.LocalStorage,yxe.Cookie,yxe.Memory];return e.disable?new vxe([]):e.persist?(void 0!==e.storage&&null!==e.storage&&bxe(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter((function(e){return e!==yxe.LocalStorage}))),n&&(r=r.filter(n)),new vxe(wxe(Txe(r,t)))):new vxe([new mxe])},e.defaults=Wxe,e}(),Gxe={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},qxe=function(e){function t(t,n){void 0===t&&(t=Gxe);var r=e.call(this,z_(z_({},Gxe),t),n)||this;return r.anonymousId=function(e){},Hxe(r),r}return U_(t,e),t}(Vxe),Kxe="This is being deprecated and will be not be available in future releases of Analytics JS",Xxe=oxe(),Yxe=null==Xxe?void 0:Xxe.analytics;function Zxe(){console.warn(Kxe)}var Jxe=function(e){function t(t,n,r,i,a){var o,s,c,u=this;(u=e.call(this)||this)._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=Zxe,u.addIntegrationMiddleware=Zxe,u.listeners=Zxe,u.addEventListener=Zxe,u.removeAllListeners=Zxe,u.removeListener=Zxe,u.removeEventListener=Zxe,u.hasListeners=Zxe,u.add=Zxe,u.addIntegration=Zxe;var l=null==n?void 0:n.cookie,d=null!==(o=null==n?void 0:n.disableClientPersistence)&&void 0!==o&&o;u.settings=t,u.settings.timeout=null!==(s=u.settings.timeout)&&void 0!==s?s:300,u.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new jAe(r,[]):new Uxe(r,e);return new zxe(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,d);var f=null==n?void 0:n.storage;return u._universalStorage=u.createStore(d,f,l),u._user=null!=i?i:new Vxe(z_({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),u._group=null!=a?a:new qxe(z_({persist:!d,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),u.eventFactory=new Mxe(u._user),u.integrations=null!==(c=null==n?void 0:n.integrations)&&void 0!==c?c:{},u.options=null!=n?n:{},Hxe(u),u}return U_(t,e),t.prototype.createStore=function(e,t,n){return e?new vxe([new mxe]):t&&bxe(t)?new vxe(wxe(Txe(t.stores,n))):new vxe(wxe([yxe.LocalStorage,{name:yxe.Cookie,settings:n},yxe.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return K_(this,(function(c){return t=ZAe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return K_(this,(function(u){return t=JAe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.page(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return K_(this,(function(c){return t=QAe(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],this._user.identify(n,r),o=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=QAe(this._group).apply(void 0,t),i=r[0],a=r[1],o=r[2],s=r[3];this._group.identify(i,a);var c=this._group.id(),u=this._group.traits(),l=this.eventFactory.group(c,u,o,this.integrations);return this._dispatch(l,s).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s=this;return K_(this,(function(c){return t=$Ae.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(o,a).then((function(e){return s.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r,i,a,o,s,c=this;return K_(this,(function(u){return t=JAe.apply(void 0,e),n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=this.eventFactory.screen(n,r,i,a,this.integrations),[2,this._dispatch(s,o).then((function(e){return c.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n;return K_(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return pKe}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,eP([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r=this;return K_(this,(function(i){switch(i.label){case 0:return t=kxe.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q_(this,void 0,void 0,(function(){var t,n,r=this;return K_(this,(function(i){switch(i.label){case 0:return t=kxe.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return q_(this,void 0,void 0,(function(){var n;return K_(this,(function(r){return n=new kxe(e),rxe()&&!this.options.retryQueue?[2,n]:[2,YAe(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return q_(this,void 0,void 0,(function(){var t=this;return K_(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return q_(t,void 0,void 0,(function(){var t,n,r;return K_(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return XCe}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()}));return r.forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return q_(this,void 0,void 0,(function(){return K_(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return mKe}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),q_(this,void 0,void 0,(function(){return K_(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Kxe),window.analytics=null!=Yxe?Yxe:this,this},t.prototype.normalize=function(e){return console.warn(Kxe),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Kxe),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return cxe},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return q_(this,void 0,void 0,(function(){return K_(this,(function(e){return console.warn(Kxe),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return q_(this,void 0,void 0,(function(){return K_(this,(function(t){switch(t.label){case 0:return console.warn(Kxe),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Kxe),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Kxe);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(EAe);function Qxe(){return"undefined"!=typeof process&&process.env?process.env:{}}var $xe,eOe=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,tOe=function(){var e=function(){var e;return null!=$xe?$xe:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=eOe.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},nOe=function(){var e=tOe();return"".concat(e,"/next-integrations")};function rOe(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],a=t[1];return z_(z_({},e),"object"==typeof a?((n={})[i]=a,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],a=t[1];return z_(z_({},e),((n={})[i]=z_(z_({},a),r[i]),n))}),{})}function iOe(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function aOe(){var e=iOe();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function oOe(e){void 0===e&&(e="");var t=iOe();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function sOe(e){var t=e.event;t.context=t.context||{};var n={path:aOe(),referrer:document.referrer,search:location.search,title:document.title,url:oOe(location.search)},r=void 0;return"page"===t.type&&(r=t.properties&&function(e,t){return Object.assign.apply(Object,eP([{}],t.map((function(t){var n;if(e&&Object.prototype.hasOwnProperty.call(e,t))return(n={})[t]=e[t],n})),!1))}(t.properties,Object.keys(n)),t.properties=z_(z_(z_({},n),t.properties),t.name?{name:t.name}:{})),t.context.page=z_(z_(z_({},n),r),t.context.page),e}var cOe={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:sOe,alias:sOe,track:sOe,identify:sOe,group:sOe};function uOe(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function lOe(e,t){var n=uOe(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,a=window.document.createElement("script");a.type="text/javascript",a.src=e,a.async=!0,a.setAttribute("status","loading");for(var o=0,s=Object.entries(null!=t?t:{});o<s.length;o++){var c=s[o],u=c[0],l=c[1];a.setAttribute(u,l)}a.onload=function(){a.onerror=a.onload=null,a.setAttribute("status","loaded"),n(a)},a.onerror=function(){a.onerror=a.onload=null,a.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var d=window.document.getElementsByTagName("script")[0];null===(i=d.parentElement)||void 0===i||i.insertBefore(a,d)}))}function dOe(e){var t=uOe(e);return void 0!==t&&t.remove(),Promise.resolve()}var fOe={},pOe={},hOe={},mOe={exports:{}};!function(e){function t(e){return function(t,n,r,a){var o,s=a&&function(e){return"function"==typeof e}(a.normalizer)?a.normalizer:i;n=s(n);for(var c=!1;!c;)u();function u(){for(o in t){var e=s(o);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[o];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}o=void 0,c=!0}if(o)return null==t?t:e(t,o,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,a){return t(r).call(this,e,n,i,a),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mOe);var yOe=mOe.exports,bOe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hOe,"__esModule",{value:!0});var gOe=bOe(yOe);function vOe(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return gOe.default(n,"address."+e)||gOe.default(n,e)||(t?gOe.default(n,"address."+t):null)||(t?gOe.default(n,t):null)||gOe.default(r,"address."+e)||gOe.default(r,e)||(t?gOe.default(r,"address."+t):null)||(t?gOe.default(r,t):null)}}hOe.default=function(e){e.zip=vOe("postalCode","zip"),e.country=vOe("country"),e.street=vOe("street"),e.state=vOe("state"),e.city=vOe("city"),e.region=vOe("region")};var wOe={};Object.defineProperty(wOe,"__esModule",{value:!0}),wOe.clone=void 0,wOe.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var TOe={};Object.defineProperty(TOe,"__esModule",{value:!0});var EOe={Salesforce:!0};TOe.default=function(e){return!EOe[e]};var AOe={},xOe=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;AOe.parse=function(e){var t=[1,5,6,7,11,12],n=xOe.exec(e),r=0;if(!n)return new Date(e);for(var i,a=0;i=t[a];a++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var o=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(o)},AOe.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&xOe.test(e))};var OOe={},COe=/\d{13}/;OOe.is=function(e){return COe.test(e)},OOe.parse=function(e){return e=parseInt(e,10),new Date(e)};var IOe={},_Oe=/\d{10}/;IOe.is=function(e){return _Oe.test(e)},IOe.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var POe=AOe,SOe=OOe,kOe=IOe,ROe=Object.prototype.toString;var NOe=function(e){return t=e,"[object Date]"===ROe.call(t)?e:function(e){return"[object Number]"===ROe.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):POe.is(e)?POe.parse(e):SOe.is(e)?SOe.parse(e):kOe.is(e)?kOe.parse(e):new Date(e);var t,n};var MOe=AOe,DOe=LOe;function LOe(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=LOe(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=LOe(n,t)})),e}(e,t):MOe.is(e,t)?MOe.parse(e):e}var jOe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pOe,"__esModule",{value:!0}),pOe.Facade=void 0;var FOe=jOe(hOe),BOe=wOe,UOe=jOe(TOe),zOe=jOe(NOe),HOe=jOe(yOe),WOe=jOe(DOe);function VOe(e,t){t=t||{},this.raw=BOe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=BOe.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?zOe.default(e.timestamp):new Date,t.traverse&&WOe.default(e),this.opts=t,this.obj=e}pOe.Facade=VOe;var GOe=VOe.prototype;function qOe(e){return BOe.clone(e)}GOe.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=HOe.default(n,t.join("."))),this.opts.clone?qOe(n):n):n},GOe.field=function(e){var t=this.obj[e];return this.opts.clone?qOe(t):t},VOe.proxy=function(e){return function(){return this.proxy(e)}},VOe.field=function(e){return function(){return this.field(e)}},VOe.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?BOe.clone(n):n]),n||[]}},VOe.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},GOe.json=function(){var e=this.opts.clone?BOe.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},GOe.rawEvent=function(){return this.raw},GOe.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?BOe.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||HOe.default(r,e);return"object"!=typeof i&&(i=HOe.default(this.options(),e)),"object"==typeof i?i:{}}},GOe.context=GOe.options,GOe.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&UOe.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},GOe.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},GOe.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},GOe.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},GOe.sessionId=GOe.anonymousId,GOe.groupId=VOe.proxy("options.groupId"),GOe.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},GOe.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},GOe.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},GOe.userAgent=VOe.proxy("context.userAgent"),GOe.timezone=VOe.proxy("context.timezone"),GOe.timestamp=VOe.field("timestamp"),GOe.channel=VOe.field("channel"),GOe.ip=VOe.proxy("context.ip"),GOe.userId=VOe.field("userId"),FOe.default(GOe);var KOe={},XOe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(KOe,"__esModule",{value:!0}),KOe.Alias=void 0;var YOe=XOe($o),ZOe=pOe;function JOe(e,t){ZOe.Facade.call(this,e,t)}KOe.Alias=JOe,YOe.default(JOe,ZOe.Facade),JOe.prototype.action=function(){return"alias"},JOe.prototype.type=JOe.prototype.action,JOe.prototype.previousId=function(){return this.field("previousId")||this.field("from")},JOe.prototype.from=JOe.prototype.previousId,JOe.prototype.userId=function(){return this.field("userId")||this.field("to")},JOe.prototype.to=JOe.prototype.userId;var QOe={},$Oe={};Object.defineProperty($Oe,"__esModule",{value:!0});var eCe=/.+\@.+\..+/;$Oe.default=function(e){return eCe.test(e)};var tCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(QOe,"__esModule",{value:!0}),QOe.Group=void 0;var nCe=tCe($o),rCe=tCe($Oe),iCe=tCe(NOe),aCe=pOe;function oCe(e,t){aCe.Facade.call(this,e,t)}QOe.Group=oCe,nCe.default(oCe,aCe.Facade);var sCe=oCe.prototype;sCe.action=function(){return"group"},sCe.type=sCe.action,sCe.groupId=aCe.Facade.field("groupId"),sCe.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return iCe.default(e)},sCe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return rCe.default(t)?t:void 0},sCe.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},sCe.name=aCe.Facade.proxy("traits.name"),sCe.industry=aCe.Facade.proxy("traits.industry"),sCe.employees=aCe.Facade.proxy("traits.employees"),sCe.properties=function(){return this.field("traits")||this.field("properties")||{}};var cCe={},uCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cCe,"__esModule",{value:!0}),cCe.Identify=void 0;var lCe=pOe,dCe=uCe(yOe),fCe=uCe($o),pCe=uCe($Oe),hCe=uCe(NOe),mCe=function(e){return e.trim()};function yCe(e,t){lCe.Facade.call(this,e,t)}cCe.Identify=yCe,fCe.default(yCe,lCe.Facade);var bCe=yCe.prototype;bCe.action=function(){return"identify"},bCe.type=bCe.action,bCe.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bCe.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return pCe.default(t)?t:void 0},bCe.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return hCe.default(e)},bCe.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return hCe.default(e)},bCe.companyName=function(){return this.proxy("traits.company.name")},bCe.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mCe(e);var t=this.firstName(),n=this.lastName();return t&&n?mCe(t+" "+n):void 0},bCe.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mCe(e);var t=this.proxy("traits.name");return"string"==typeof t?mCe(t).split(" ")[0]:void 0},bCe.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mCe(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mCe(t).indexOf(" ");if(-1!==n)return mCe(t.substr(n+1))}},bCe.uid=function(){return this.userId()||this.username()||this.email()},bCe.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bCe.age=function(){var e=this.birthday(),t=dCe.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bCe.avatar=function(){var e=this.traits();return dCe.default(e,"avatar")||dCe.default(e,"photoUrl")||dCe.default(e,"avatarUrl")},bCe.position=function(){var e=this.traits();return dCe.default(e,"position")||dCe.default(e,"jobTitle")},bCe.username=lCe.Facade.proxy("traits.username"),bCe.website=lCe.Facade.one("traits.website"),bCe.websites=lCe.Facade.multi("traits.website"),bCe.phone=lCe.Facade.one("traits.phone"),bCe.phones=lCe.Facade.multi("traits.phone"),bCe.address=lCe.Facade.proxy("traits.address"),bCe.gender=lCe.Facade.proxy("traits.gender"),bCe.birthday=lCe.Facade.proxy("traits.birthday");var gCe={},vCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gCe,"__esModule",{value:!0}),gCe.Track=void 0;var wCe=vCe($o),TCe=pOe,ECe=cCe,ACe=vCe($Oe),xCe=vCe(yOe);function OCe(e,t){TCe.Facade.call(this,e,t)}gCe.Track=OCe,wCe.default(OCe,TCe.Facade);var CCe=OCe.prototype;CCe.action=function(){return"track"},CCe.type=CCe.action,CCe.event=TCe.Facade.field("event"),CCe.value=TCe.Facade.proxy("properties.value"),CCe.category=TCe.Facade.proxy("properties.category"),CCe.id=TCe.Facade.proxy("properties.id"),CCe.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},CCe.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},CCe.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},CCe.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},CCe.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},CCe.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},CCe.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},CCe.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},CCe.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},CCe.sku=TCe.Facade.proxy("properties.sku"),CCe.tax=TCe.Facade.proxy("properties.tax"),CCe.name=TCe.Facade.proxy("properties.name"),CCe.price=TCe.Facade.proxy("properties.price"),CCe.total=TCe.Facade.proxy("properties.total"),CCe.repeat=TCe.Facade.proxy("properties.repeat"),CCe.coupon=TCe.Facade.proxy("properties.coupon"),CCe.shipping=TCe.Facade.proxy("properties.shipping"),CCe.discount=TCe.Facade.proxy("properties.discount"),CCe.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},CCe.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},CCe.description=TCe.Facade.proxy("properties.description"),CCe.plan=TCe.Facade.proxy("properties.plan"),CCe.subtotal=function(){var e=xCe.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},CCe.products=function(){var e=this.properties(),t=xCe.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},CCe.quantity=function(){return(this.obj.properties||{}).quantity||1},CCe.currency=function(){return(this.obj.properties||{}).currency||"USD"},CCe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},CCe.query=TCe.Facade.proxy("options.query"),CCe.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},CCe.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},CCe.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return ACe.default(t)?t:void 0},CCe.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},CCe.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},CCe.identify=function(){var e=this.json();return e.traits=this.traits(),new ECe.Identify(e,this.opts)};var ICe={},_Ce=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ICe,"__esModule",{value:!0}),ICe.Page=void 0;var PCe=_Ce($o),SCe=pOe,kCe=gCe,RCe=_Ce($Oe);function NCe(e,t){SCe.Facade.call(this,e,t)}ICe.Page=NCe,PCe.default(NCe,SCe.Facade);var MCe=NCe.prototype;MCe.action=function(){return"page"},MCe.type=MCe.action,MCe.category=SCe.Facade.field("category"),MCe.name=SCe.Facade.field("name"),MCe.title=SCe.Facade.proxy("properties.title"),MCe.path=SCe.Facade.proxy("properties.path"),MCe.url=SCe.Facade.proxy("properties.url"),MCe.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},MCe.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=null==this[i]?this.proxy("properties."+i):this[i]();if(null==a)continue;t[e[i]]=a,i!==e[i]&&delete t[i]}return t},MCe.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return RCe.default(t)?t:void 0},MCe.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},MCe.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},MCe.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new kCe.Track(t,this.opts)};var DCe={},LCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(DCe,"__esModule",{value:!0}),DCe.Screen=void 0;var jCe=LCe($o),FCe=ICe,BCe=gCe;function UCe(e,t){FCe.Page.call(this,e,t)}DCe.Screen=UCe,jCe.default(UCe,FCe.Page),UCe.prototype.action=function(){return"screen"},UCe.prototype.type=UCe.prototype.action,UCe.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},UCe.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new BCe.Track(t,this.opts)};var zCe={},HCe=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zCe,"__esModule",{value:!0}),zCe.Delete=void 0;var WCe=HCe($o),VCe=pOe;function GCe(e,t){VCe.Facade.call(this,e,t)}function qCe(e,t){var n=new fOe.Facade(e,t);return"track"===e.type&&(n=new fOe.Track(e,t)),"identify"===e.type&&(n=new fOe.Identify(e,t)),"page"===e.type&&(n=new fOe.Page(e,t)),"alias"===e.type&&(n=new fOe.Alias(e,t)),"group"===e.type&&(n=new fOe.Group(e,t)),"screen"===e.type&&(n=new fOe.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function KCe(e,t,n){return q_(this,void 0,void 0,(function(){function r(t,n){return q_(this,void 0,void 0,(function(){var r,i,a;return K_(this,(function(o){switch(o.label){case 0:return r=!1,i=null,[4,n({payload:qCe(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return o.sent(),r||null===i||(i.integrations=z_(z_({},t.integrations),((a={})[e]=!1,a))),[2,i]}}))}))}var i,a,o,s,c;return K_(this,(function(e){switch(e.label){case 0:i=qCe(t,{clone:!0,traverse:!1}).rawEvent(),a=0,o=n,e.label=1;case 1:return a<o.length?(s=o[a],[4,r(i,s)]):[3,4];case 2:if(null===(c=e.sent()))return[2,null];i=c,e.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))}zCe.Delete=GCe,WCe.default(GCe,VCe.Facade),GCe.prototype.type=function(){return"delete"},function(e){var t=ut&&ut.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=pOe;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=KOe;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=QOe;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var a=cCe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return a.Identify}});var o=gCe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return o.Track}});var s=ICe;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var c=DCe;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return c.Screen}});var u=zCe;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return u.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:a.Identify,Track:o.Track,Page:s.Page,Screen:c.Screen,Delete:u.Delete})}(fOe);var XCe=Object.freeze({__proto__:null,applyDestinationMiddleware:KCe,sourceMiddlewarePlugin:function(e,t){function n(n){return q_(this,void 0,void 0,(function(){var r;return K_(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:qCe(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new VAe({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),YCe=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return q_(this,void 0,void 0,(function(){var t;return K_(this,(function(n){switch(n.label){case 0:return[4,KCe(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new VAe({retry:!1,reason:"dropped by destination middleware"})),[2,new kxe(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return q_(t,void 0,void 0,(function(){var t;return K_(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function ZCe(e,t,n,r,i){var a,o,s;return q_(this,void 0,void 0,(function(){var c,u,l,d,f=this;return K_(this,(function(p){switch(p.label){case 0:return c=[],u=tOe(),l=null!==(o=null===(a=e.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==o?o:[],d=(null!==(s=e.remotePlugins)&&void 0!==s?s:[]).map((function(e){return q_(f,void 0,void 0,(function(){var a,o,s,d,f,p,h,m,y;return K_(this,(function(b){switch(b.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];b.label=1;case 1:if(b.trys.push([1,12,,13]),a=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];o=e.url.split("/"),s=o[o.length-2],d=e.url.replace(s,btoa(s).replace(/=/g,"")),b.label=2;case 2:return b.trys.push([2,4,,6]),[4,lOe(d.replace(a,u))];case 3:return b.sent(),[3,6];case 4:return b.sent(),[4,lOe(e.url.replace(a,u))];case 5:return b.sent(),[3,6];case 6:return[3,9];case 7:return[4,lOe(e.url.replace(a,u))];case 8:b.sent(),b.label=9;case 9:return f=e.libraryName,"function"!=typeof window[f]?[3,11]:[4,(0,window[f])(z_(z_({},e.settings),n[e.name]))];case 10:p=b.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(h=Array.isArray(p)?p:[p]),m=l.filter((function(t){return t.destinationName===e.creationName})),h.forEach((function(t){var n=new YCe(e.creationName,t);m.length&&i&&"destination"===t.type&&n.addMiddleware(i),c.push(n)})),b.label=11;case 11:return[3,13];case 12:return y=b.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return p.sent(),[2,c.filter(Boolean)]}}))}))}var JCe=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},QCe=500;function $Ce(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function eIe(e,t){var n,r,i,a=[],o=!1,s=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,c=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function u(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey,i=t.map((function(e){var t=e;return t.sentAt,H_(t,["sentAt"])}));return sxe("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:r,batch:i,sentAt:(new Date).toISOString()})})}}function l(){return q_(this,void 0,void 0,(function(){var e;return K_(this,(function(t){return a.length?(e=a,a=[],[2,u(e)]):[2]}))}))}return JCe((function(e){if((o=e)&&a.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){$Ce(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(a).map(u);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return q_(this,void 0,void 0,(function(){var e;return K_(this,(function(n){return a.push(t),e=a.length>=s||function(e){return $Ce(e)>=QCe-50}(a),[2,e||o?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),c)))]}))}))}}}var tIe=function(e,t){return q_(void 0,void 0,void 0,(function(){var n;return K_(this,(function(r){return n=function(r){return q_(void 0,void 0,void 0,(function(){var i;return K_(this,(function(a){switch(a.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[a.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function nIe(e,t){return q_(this,void 0,void 0,(function(){var n,r=this;return K_(this,(function(i){switch(i.label){case 0:return n=[],rxe()?[2,t]:[4,tIe((function(){return t.length>0&&!rxe()}),(function(){return q_(r,void 0,void 0,(function(){var r,i;return K_(this,(function(a){switch(a.label){case 0:return(r=t.pop())?[4,qAe(r,e)]:[2];case 1:return i=a.sent(),i instanceof kxe||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function rIe(e,t,n,r){var i=this;e||setTimeout((function(){return q_(i,void 0,void 0,(function(){var e,i;return K_(this,(function(a){switch(a.label){case 0:return e=!0,[4,nIe(n,t)];case 1:return i=a.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function iIe(e){return q_(this,void 0,void 0,(function(){var t;return K_(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function aIe(e,t,n){var r,i,a;return q_(this,void 0,void 0,(function(){function o(r){return q_(this,void 0,void 0,(function(){var i,a;return K_(this,(function(o){return rxe()?(c.push(r),rIe(l,c,b,rIe),[2,r]):(u.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),a=qCe(r.event).json(),"track"===r.event.type&&delete a.traits,"alias"===r.event.type&&(a=function(e,t){var n,r,i,a,o=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:o.id())&&void 0!==i?i:o.anonymousId(),t.userId=null!==(a=t.userId)&&void 0!==a?a:t.to,delete t.from,delete t.to,t}(e,a)),[2,m.dispatch("".concat(p,"/").concat(i),Oxe(e,a,t,n)).then((function(){return r})).catch((function(){return c.pushWithBackoff(r),rIe(l,c,b,rIe),r})).finally((function(){u.delete(r)}))])}))}))}var s,c,u,l,d,f,p,h,m,y,b;return K_(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(u)),u.clear()})),s=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",c=e.options.disableClientPersistence?new jAe(e.queue.queue.maxAttempts,[]):new Uxe(e.queue.queue.maxAttempts,"".concat(s,":dest-Segment.io")),u=new Set,l=!1,d=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Cxe,f=null!==(a=null==t?void 0:t.protocol)&&void 0!==a?a:"https",p="".concat(f,"://").concat(d),h=null==t?void 0:t.deliveryStrategy,m="batching"===(null==h?void 0:h.strategy)?eIe(d,h.config):(g=null==h?void 0:h.config,{dispatch:function(e,t){return sxe(e,{keepalive:null==g?void 0:g.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,iIe(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return b={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:o,identify:o,page:o,alias:o,group:o,screen:o},c.todo&&rIe(l,c,b,rIe),[2,b]}var g}))}))}function oIe(e){var t,n=e.event;!function(e){if(!_Ae(e))throw new xAe("Event",RAe);if("object"!=typeof e)throw new xAe("Event",kAe)}(n),function(e){if(!OAe(e.type))throw new xAe(".type",SAe)}(n),"track"===n.type&&function(e){if(!OAe(e.event))throw new xAe(".event",SAe)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!PAe(r))throw new xAe(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!_Ae(n))throw new xAe(t,RAe);if(!OAe(n))throw new xAe(t,SAe)}(n),e}var sIe={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:oIe,identify:oIe,page:oIe,alias:oIe,group:oIe,screen:oIe},cIe=function(e,t,n){n.getCalls(e).forEach((function(e){hIe(t,e).catch(console.error)}))},uIe=function(e,t){return q_(void 0,void 0,void 0,(function(){var n,r,i;return K_(this,(function(a){switch(a.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),a.label=1;case 1:return n<r.length?(i=r[n],[4,hIe(e,i).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},lIe=cIe.bind(window,"on"),dIe=cIe.bind(window,"setAnonymousId"),fIe=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){hIe(e,t).catch(console.error)}),0)}))},pIe=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function hIe(e,t){return q_(this,void 0,void 0,(function(){var n,r;return K_(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(a=n)&&null!==a&&"then"in a&&"function"==typeof a.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var a}))}))}var mIe=function(){function e(e){var t=this;this._preInitBuffer=new pIe,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=cxe,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var a=(n=t.instance)[e].apply(n,r);return Promise.resolve(a)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function yIe(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var bIe,gIe,vIe=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(yIe)},wIe=null!==(bIe=(gIe=oxe()).__SEGMENT_INSPECTOR__)&&void 0!==bIe?bIe:gIe.__SEGMENT_INSPECTOR__={};function TIe(e,t){return q_(this,void 0,void 0,(function(){return K_(this,(function(n){switch(n.label){case 0:return t.push.apply(t,vIe()),[4,uIe(e,t)];case 1:return n.sent(),t.push.apply(t,vIe()),fIe(e,t),t.clear(),[2]}}))}))}function EIe(e,t,n,r,i,a,o){var s,c,u;return q_(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w,T,E=this;return K_(this,(function(A){switch(A.label){case 0:return function(e){var t,n,r;return"test"!==Qxe().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return EZe})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return d=A.sent(),[3,3];case 2:d=void 0,A.label=3;case 3:return l=d,x=t,"test"!==Qxe().NODE_ENV&&Object.keys(x.integrations).length>1||o.length>0?[4,Promise.resolve().then((function(){return PZe})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,o)}))]:[3,5];case 4:return p=A.sent(),[3,6];case 5:p=[],A.label=6;case 6:return f=p,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return SZe})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:A.sent(),A.label=8;case 8:return(null===(s=r.plan)||void 0===s?void 0:s.track)?[4,Promise.resolve().then((function(){return kZe})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return m=A.sent(),[3,11];case 10:m=void 0,A.label=11;case 11:return h=m,y=rOe(t,i),[4,ZCe(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return b=A.sent(),g=eP(eP(eP([sIe,cOe],a,!0),f,!0),b,!0),h&&g.push(h),!1===(null===(c=r.integrations)||void 0===c?void 0:c.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(w=(v=g).push,[4,aIe(n,y["Segment.io"],t.integrations)]);case 13:w.apply(v,[A.sent()]),A.label=14;case 14:return[4,n.register.apply(n,g)];case 15:return T=A.sent(),Object.entries(null!==(u=t.enabledMiddleware)&&void 0!==u?u:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return RZe})).then((function(e){var r=e.remoteMiddlewares;return q_(E,void 0,void 0,(function(){var e,a;return K_(this,(function(o){switch(o.label){case 0:return[4,r(T,t,i.obfuscate)];case 1:return e=o.sent(),a=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(a)]}}))}))}))]:[3,17];case 16:A.sent(),A.label=17;case 17:return[2,T]}var x}))}))}function AIe(e,t,n){var r,i,a,o,s,c,u;return void 0===t&&(t={}),q_(this,void 0,void 0,(function(){var l,d,f,p,h,m,y,b,g,v,w;return K_(this,(function(T){switch(T.label){case 0:return e.cdnURL&&(O=e.cdnURL,window.analytics&&(window.analytics._cdn=O),$xe=O),null===(r=e.cdnSettings)||void 0===r?[3,1]:(d=r,[3,3]);case 1:return[4,(E=e.writeKey,A=e.cdnURL,x=null!=A?A:tOe(),sxe("".concat(x,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:d=T.sent(),T.label=3;case 3:return l=d,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),f=null===(a=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===a||a,p=z_({retryQueue:f},t),function(e){var t;null===(t=wIe.attach)||void 0===t||t.call(wIe,e)}(h=new Jxe(e,p)),m=null!==(o=e.plugins)&&void 0!==o?o:[],y=null!==(s=e.classicIntegrations)&&void 0!==s?s:[],Sxe.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,vIe()),dIe(e,t),lIe(e,t)}(h,n),[4,EIe(e.writeKey,l,h,p,t,m,y)];case 4:return b=T.sent(),g=null!==(c=window.location.search)&&void 0!==c?c:"",v=null!==(u=window.location.hash)&&void 0!==u?u:"",(w=g.length?g:v.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,h.queryString(w).catch(console.error)]:[3,6];case 5:T.sent(),T.label=6;case 6:return h.initialized=!0,h.emit("initialize",e,t),t.initialPageview&&h.page().catch(console.error),[4,TIe(h,n)];case 7:return T.sent(),[2,[h,b]]}var E,A,x,O}))}))}var xIe=function(e){function t(){var t,n,r,i=this,a=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),o=a.promise,s=a.resolve;return i=e.call(this,(function(e){return o.then((function(t){return AIe(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return s([e,t])},i}return U_(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(mIe),OIe=Object.create,CIe=Object.defineProperty,IIe=Object.getOwnPropertyDescriptor,_Ie=Object.getOwnPropertyNames,PIe=Object.getOwnPropertySymbols,SIe=Object.getPrototypeOf,kIe=Object.prototype.hasOwnProperty,RIe=Object.prototype.propertyIsEnumerable,NIe=(e,t,n)=>t in e?CIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MIe=(e,t)=>{for(var n in t||(t={}))kIe.call(t,n)&&NIe(e,n,t[n]);if(PIe)for(var n of PIe(t))RIe.call(t,n)&&NIe(e,n,t[n]);return e},DIe=(e,t)=>function(){return t||(0,e[_Ie(e)[0]])((t={exports:{}}).exports,t),t.exports},LIe=(e,t,n)=>(n=null!=e?OIe(SIe(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of _Ie(t))kIe.call(e,n)||undefined===n||CIe(e,n,{get:()=>t[n],enumerable:!(r=IIe(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?n:CIe(n,"default",{value:e,enumerable:!0}),e)),jIe=DIe({"../../node_modules/react-is/cjs/react-is.production.min.js"(e){var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case l:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case h:case s:return e;default:return t}}case r:return t}}}function T(e){return w(e)===l}e.AsyncMode=u,e.ConcurrentMode=l,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=m,e.Memo=h,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return T(e)||w(e)===u},e.isConcurrentMode=T,e.isContextConsumer=function(e){return w(e)===c},e.isContextProvider=function(e){return w(e)===s},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return w(e)===d},e.isFragment=function(e){return w(e)===i},e.isLazy=function(e){return w(e)===m},e.isMemo=function(e){return w(e)===h},e.isPortal=function(e){return w(e)===r},e.isProfiler=function(e){return w(e)===o},e.isStrictMode=function(e){return w(e)===a},e.isSuspense=function(e){return w(e)===f},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===o||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===b||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y)},e.typeOf=w}}),FIe=DIe({"../../node_modules/react-is/index.js"(e,t){t.exports=jIe()}}),BIe=DIe({"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(e,t){var n=FIe(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function s(e){return n.isMemo(e)?a:o[e.$$typeof]||r}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function e(t,n,r){if("string"!=typeof n){if(p){var a=f(n);a&&a!==p&&e(t,a,r)}var o=u(n);l&&(o=o.concat(l(n)));for(var h=s(t),m=s(n),y=0;y<o.length;++y){var b=o[y];if(!(i[b]||r&&r[b]||m&&m[b]||h&&h[b])){var g=d(n,b);try{c(t,b,g)}catch(e){}}}}return t}}}),UIe=DIe({"../../node_modules/@babel/runtime/helpers/extends.js"(e,t){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(this,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});function zIe(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}var HIe=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(t){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),WIe="-ms-",VIe="-moz-",GIe="-webkit-",qIe="comm",KIe="rule",XIe="decl",YIe="@keyframes",ZIe=Math.abs,JIe=String.fromCharCode,QIe=Object.assign;function $Ie(e){return e.trim()}function e_e(e,t,n){return e.replace(t,n)}function t_e(e,t){return e.indexOf(t)}function n_e(e,t){return 0|e.charCodeAt(t)}function r_e(e,t,n){return e.slice(t,n)}function i_e(e){return e.length}function a_e(e){return e.length}function o_e(e,t){return t.push(e),e}var s_e=1,c_e=1,u_e=0,l_e=0,d_e=0,f_e="";function p_e(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:s_e,column:c_e,length:o,return:""}}function h_e(e,t){return QIe(p_e("",null,null,"",null,null,0),e,{length:-e.length},t)}function m_e(){return d_e=l_e<u_e?n_e(f_e,l_e++):0,c_e++,10===d_e&&(c_e=1,s_e++),d_e}function y_e(){return n_e(f_e,l_e)}function b_e(){return l_e}function g_e(e,t){return r_e(f_e,e,t)}function v_e(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function w_e(e){return s_e=c_e=1,u_e=i_e(f_e=e),l_e=0,[]}function T_e(e){return f_e="",e}function E_e(e){return $Ie(g_e(l_e-1,O_e(91===e?e+2:40===e?e+1:e)))}function A_e(e){for(;(d_e=y_e())&&d_e<33;)m_e();return v_e(e)>2||v_e(d_e)>3?"":" "}function x_e(e,t){for(;--t&&m_e()&&!(d_e<48||d_e>102||d_e>57&&d_e<65||d_e>70&&d_e<97););return g_e(e,b_e()+(t<6&&32==y_e()&&32==m_e()))}function O_e(e){for(;m_e();)switch(d_e){case e:return l_e;case 34:case 39:34!==e&&39!==e&&O_e(d_e);break;case 40:41===e&&O_e(e);break;case 92:m_e()}return l_e}function C_e(e,t){for(;m_e()&&e+d_e!==57&&(e+d_e!==84||47!==y_e()););return"/*"+g_e(t,l_e-1)+"*"+JIe(47===e?e:m_e())}function I_e(e){for(;!v_e(y_e());)m_e();return g_e(e,l_e)}function __e(e){return T_e(P_e("",null,null,null,[""],e=w_e(e),0,[0],e))}function P_e(e,t,n,r,i,a,o,s,c){for(var u=0,l=0,d=o,f=0,p=0,h=0,m=1,y=1,b=1,g=0,v="",w=i,T=a,E=r,A=v;y;)switch(h=g,g=m_e()){case 40:if(108!=h&&58==n_e(A,d-1)){-1!=t_e(A+=e_e(E_e(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:A+=E_e(g);break;case 9:case 10:case 13:case 32:A+=A_e(h);break;case 92:A+=x_e(b_e()-1,7);continue;case 47:switch(y_e()){case 42:case 47:o_e(k_e(C_e(m_e(),b_e()),t,n),c);break;default:A+="/"}break;case 123*m:s[u++]=i_e(A)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==b&&(A=e_e(A,/\f/g,"")),p>0&&i_e(A)-d&&o_e(p>32?R_e(A+";",r,n,d-1):R_e(e_e(A," ","")+";",r,n,d-2),c);break;case 59:A+=";";default:if(o_e(E=S_e(A,t,n,u,l,i,s,v,w=[],T=[],d),a),123===g)if(0===l)P_e(A,t,E,E,w,a,d,s,T);else switch(99===f&&110===n_e(A,3)?100:f){case 100:case 108:case 109:case 115:P_e(e,E,E,r&&o_e(S_e(e,E,E,0,0,i,s,v,i,w=[],d),T),i,T,d,s,r?w:T);break;default:P_e(A,E,E,E,[""],T,0,s,T)}}u=l=p=0,m=b=1,v=A="",d=o;break;case 58:d=1+i_e(A),p=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==(d_e=l_e>0?n_e(f_e,--l_e):0,c_e--,10===d_e&&(c_e=1,s_e--),d_e))continue;switch(A+=JIe(g),g*m){case 38:b=l>0?1:(A+="\f",-1);break;case 44:s[u++]=(i_e(A)-1)*b,b=1;break;case 64:45===y_e()&&(A+=E_e(m_e())),f=y_e(),l=d=i_e(v=A+=I_e(b_e())),g++;break;case 45:45===h&&2==i_e(A)&&(m=0)}}return a}function S_e(e,t,n,r,i,a,o,s,c,u,l){for(var d=i-1,f=0===i?a:[""],p=a_e(f),h=0,m=0,y=0;h<r;++h)for(var b=0,g=r_e(e,d+1,d=ZIe(m=o[h])),v=e;b<p;++b)(v=$Ie(m>0?f[b]+" "+g:e_e(g,/&\f/g,f[b])))&&(c[y++]=v);return p_e(e,t,n,0===i?KIe:s,c,u,l)}function k_e(e,t,n){return p_e(e,t,n,qIe,JIe(d_e),r_e(e,2,-2),0)}function R_e(e,t,n,r){return p_e(e,t,n,XIe,r_e(e,0,r),r_e(e,r+1,-1),r)}function N_e(e,t){for(var n="",r=a_e(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function M_e(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case XIe:return e.return=e.return||e.value;case qIe:return"";case YIe:return e.return=e.value+"{"+N_e(e.children,r)+"}";case KIe:e.value=e.props.join(",")}return i_e(n=N_e(e.children,r))?e.return=e.value+"{"+n+"}":""}function D_e(e){var t=a_e(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function L_e(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var j_e=function(e,t,n){for(var r=0,i=0;r=i,i=y_e(),38===r&&12===i&&(t[n]=1),!v_e(i);)m_e();return g_e(e,l_e)},F_e=new WeakMap,B_e=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||F_e.get(n))&&!r){F_e.set(e,!0);for(var i=[],a=function(e,t){return T_e(function(e,t){var n=-1,r=44;do{switch(v_e(r)){case 0:38===r&&12===y_e()&&(t[n]=1),e[n]+=j_e(l_e-1,t,n);break;case 2:e[n]+=E_e(r);break;case 4:if(44===r){e[++n]=58===y_e()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=JIe(r)}}while(r=m_e());return e}(w_e(e),t))}(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var u=0;u<o.length;u++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[u]):o[u]+" "+a[s]}}},U_e=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function z_e(e,t){switch(function(e,t){return 45^n_e(e,0)?(((t<<2^n_e(e,0))<<2^n_e(e,1))<<2^n_e(e,2))<<2^n_e(e,3):0}(e,t)){case 5103:return GIe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return GIe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return GIe+e+VIe+e+WIe+e+e;case 6828:case 4268:return GIe+e+WIe+e+e;case 6165:return GIe+e+WIe+"flex-"+e+e;case 5187:return GIe+e+e_e(e,/(\w+).+(:[^]+)/,GIe+"box-$1$2"+WIe+"flex-$1$2")+e;case 5443:return GIe+e+WIe+"flex-item-"+e_e(e,/flex-|-self/,"")+e;case 4675:return GIe+e+WIe+"flex-line-pack"+e_e(e,/align-content|flex-|-self/,"")+e;case 5548:return GIe+e+WIe+e_e(e,"shrink","negative")+e;case 5292:return GIe+e+WIe+e_e(e,"basis","preferred-size")+e;case 6060:return GIe+"box-"+e_e(e,"-grow","")+GIe+e+WIe+e_e(e,"grow","positive")+e;case 4554:return GIe+e_e(e,/([^-])(transform)/g,"$1"+GIe+"$2")+e;case 6187:return e_e(e_e(e_e(e,/(zoom-|grab)/,GIe+"$1"),/(image-set)/,GIe+"$1"),e,"")+e;case 5495:case 3959:return e_e(e,/(image-set\([^]*)/,GIe+"$1$`$1");case 4968:return e_e(e_e(e,/(.+:)(flex-)?(.*)/,GIe+"box-pack:$3"+WIe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+GIe+e+e;case 4095:case 3583:case 4068:case 2532:return e_e(e,/(.+)-inline(.+)/,GIe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(i_e(e)-1-t>6)switch(n_e(e,t+1)){case 109:if(45!==n_e(e,t+4))break;case 102:return e_e(e,/(.+:)(.+)-([^]+)/,"$1"+GIe+"$2-$3$1"+VIe+(108==n_e(e,t+3)?"$3":"$2-$3"))+e;case 115:return~t_e(e,"stretch")?z_e(e_e(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==n_e(e,t+1))break;case 6444:switch(n_e(e,i_e(e)-3-(~t_e(e,"!important")&&10))){case 107:return e_e(e,":",":"+GIe)+e;case 101:return e_e(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+GIe+(45===n_e(e,14)?"inline-":"")+"box$3$1"+GIe+"$2$3$1"+WIe+"$2box$3")+e}break;case 5936:switch(n_e(e,t+11)){case 114:return GIe+e+WIe+e_e(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return GIe+e+WIe+e_e(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return GIe+e+WIe+e_e(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return GIe+e+WIe+e+e}return e}var H_e,W_e,V_e="undefined"!=typeof document,G_e=V_e?void 0:(H_e=function(){return L_e((function(){var e={};return function(t){return e[t]}}))},W_e=new WeakMap,function(e){if(W_e.has(e))return W_e.get(e);var t=H_e();return W_e.set(e,t),t}),q_e=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case XIe:e.return=z_e(e.value,e.length);break;case YIe:return N_e([h_e(e,{value:e_e(e.value,"@","@"+GIe)})],r);case KIe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return N_e([h_e(e,{props:[e_e(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return N_e([h_e(e,{props:[e_e(t,/:(plac\w+)/,":"+GIe+"input-$1")]}),h_e(e,{props:[e_e(t,/:(plac\w+)/,":-moz-$1")]}),h_e(e,{props:[e_e(t,/:(plac\w+)/,WIe+"input-$1")]})],r)}return""}))}}],K_e=function(e){var t=e.key;if(V_e&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||q_e,o={},s=[];V_e&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)})));var c,u=[B_e,U_e];if(V_e){var l,d=[M_e,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],f=D_e(u.concat(a,d));i=function(e,t,n,r){l=n,N_e(__e(e?e+"{"+t.styles+"}":t.styles),f),r&&(y.inserted[t.name]=!0)}}else{var p=[M_e],h=D_e(u.concat(a,p)),m=G_e(a)(t);i=function(e,t,n,r){var i=t.name,a=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=N_e(__e(e?e+"{"+t.styles+"}":t.styles),h)),m[n]}(e,t);return void 0===y.compat?(r&&(y.inserted[i]=!0),a):r?void(y.inserted[i]=a):a}}var y={key:t,sheet:new HIe({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return y.sheet.hydrate(s),y},X_e="undefined"!=typeof document,Y_e=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===X_e&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Z_e={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},J_e=/[A-Z]|^ms/g,Q_e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$_e=function(e){return 45===e.charCodeAt(1)},ePe=function(e){return null!=e&&"boolean"!=typeof e},tPe=L_e((function(e){return $_e(e)?e:e.replace(J_e,"-$&").toLowerCase()})),nPe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Q_e,(function(e,t,n){return iPe={name:t,styles:n,next:iPe},t}))}return 1===Z_e[e]||$_e(e)||"number"!=typeof t||0===t?t:t+"px"};function rPe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return iPe={name:n.name,styles:n.styles,next:iPe},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)iPe={name:r.name,styles:r.styles,next:iPe},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=rPe(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=a+"{"+t[o]+"}":ePe(o)&&(r+=tPe(a)+":"+nPe(a,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=rPe(e,t,o);switch(a){case"animation":case"animationName":r+=tPe(a)+":"+s+";";break;default:r+=a+"{"+s+"}"}}else for(var c=0;c<o.length;c++)ePe(o[c])&&(r+=tPe(a)+":"+nPe(a,o[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=iPe,a=n(e);return iPe=i,rPe(e,t,a)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var iPe,aPe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,oPe="undefined"!=typeof document,sPe=!!aV.useInsertionEffect&&aV.useInsertionEffect,cPe=oPe&&sPe||function(e){return e()},uPe="undefined"!=typeof document,lPe={}.hasOwnProperty,dPe=aV.createContext("undefined"!=typeof HTMLElement?K_e({key:"css"}):null);dPe.Provider;var fPe=function(e){return aV.forwardRef((function(t,n){var r=aV.useContext(dPe);return e(t,r,n)}))};uPe||(fPe=function(e){return function(t){var n=aV.useContext(dPe);return null===n?(n=K_e({key:"css"}),aV.createElement(dPe.Provider,{value:n},e(t,n))):e(t,n)}});var pPe,hPe=aV.createContext({}),mPe="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yPe=function(e,t){var n={};for(var r in t)lPe.call(t,r)&&(n[r]=t[r]);return n[mPe]=e,n},bPe=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Y_e(t,n,r);var i=cPe((function(){return function(e,t,n){Y_e(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",a=t;do{var o=e.insert(t===a?"."+r:"",a,e.sheet,!0);X_e||void 0===o||(i+=o),a=a.next}while(void 0!==a);if(!X_e&&0!==i.length)return i}}(t,n,r)}));if(!uPe&&void 0!==i){for(var a,o=n.name,s=n.next;void 0!==s;)o+=" "+s.name,s=s.next;return aV.createElement("style",((a={})["data-emotion"]=t.key+" "+o,a.dangerouslySetInnerHTML={__html:i},a.nonce=t.sheet.nonce,a))}return null},gPe=fPe((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[mPe],a=[r],o="";"string"==typeof e.className?o=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";iPe=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=rPe(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=rPe(n,t,e[o]),r&&(i+=a[o]);aPe.lastIndex=0;for(var s,c="";null!==(s=aPe.exec(i));)c+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+c;return{name:u,styles:i,next:iPe}}(a,void 0,aV.useContext(hPe));o+=t.key+"-"+s.name;var c={};for(var u in e)!lPe.call(e,u)||"css"===u||u===mPe||(c[u]=e[u]);return c.ref=n,c.className=o,aV.createElement(aV.Fragment,null,aV.createElement(bPe,{cache:t,serialized:s,isStringTag:"string"==typeof i}),aV.createElement(i,c))})),vPe=gPe;LIe(UIe()),LIe(BIe()),function(e){e.CONNECT="Connect",e.WALLET="Wallet",e.ON_RAMP="OnRamp",e.SWAP="Swap",e.BRIDGE="Bridge",e.SALE="PrimarySale"}(pPe||(pPe={}));const{AnalyticsProvider:wPe,useAnalytics:TPe}=function({appName:e,writeKey:t}){const n=aV.createContext(void 0);return{AnalyticsProvider:function({children:r,loaderOverride:i=xIe,log:a=console.log}){const[o,s]=aV.useState(t),c=aV.useMemo((()=>o?i.load({writeKey:o}):function(e,t){const n=e.load({writeKey:"",cdnSettings:{integrations:{}}},{integrations:{All:!1}});return["identify","group","alias","page","track"].forEach((e=>{n.on(e,((...n)=>t(MIe({method:e},n))))})),n}(i,a)),[i,o,a]),u=aV.useCallback((({userJourney:t,screen:n,action:r,extras:i={}})=>{const a=[e+zIe(t)+zIe(n)+zIe(r)].join("");return c.page(a,i)}),[c]),l=aV.useCallback((t=>{var n=t,{userJourney:r,screen:i,action:a,extras:o={}}=n,s=((e,t)=>{var n={};for(var r in e)kIe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&PIe)for(var r of PIe(e))t.indexOf(r)<0&&RIe.call(e,r)&&(n[r]=e[r]);return n})(n,["userJourney","screen","action","extras"]);let u="";"control"in s&&"controlType"in s&&(u=zIe(s.control)+zIe(s.controlType));const l=[e+zIe(r)+zIe(i),u+zIe(a)].join("_");return c.track(l,MIe({},o))}),[c]),d=aV.useCallback((()=>{return e=this,null,t=function*(){const e=("undefined"==typeof document?"":document.cookie).split("; ").find((e=>e.startsWith("ajs_user_id=")));if(e){const t=e.split("=")[1];return c.identify(t)}return Promise.reject(new Error("No user ID found in cookie"))},new Promise(((n,r)=>{var i=e=>{try{o(t.next(e))}catch(e){r(e)}},a=e=>{try{o(t.throw(e))}catch(e){r(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);o((t=t.apply(e,null)).next())}));var e,t}),[c]),f=aV.useMemo((()=>({page:u,track:l,identifyFromCookie:d,identify:c.identify,group:c.group,alias:c.alias,updateWriteKey:s})),[c,u,l,d]);return function(e,t,n){return lPe.call(t,"css")?mV.jsx(vPe,yPe(e,t),n):mV.jsx(e,t,n)}(n.Provider,{value:f,children:r})},useAnalytics:function(){const e=aV.useContext(n);if(!e)throw new Error("useAnalytics: Store not found");return e}}}({writeKey:"",appName:"checkout"});function EPe({children:e,checkout:t}){const{updateWriteKey:n}=TPe(),r=aV.useCallback((async()=>{try{return await(t?.config?.remote.getConfig("telemetry"))}catch(e){console.error("unable to fetch telemetry config: ",e)}}),[t]);return aV.useEffect((()=>{(async()=>{const e=await r();e&&n(e.segmentPublishableKey)})()}),[r]),Eq(Tq,{children:e})}function APe({children:e,checkout:t}){return Eq(wPe,{children:Eq(EPe,{checkout:t,children:e})})}function xPe({header:e,footer:t,children:n,heroContent:r,testId:i,floatHeader:a=!1,footerBackgroundColor:o,bodyStyleOverrides:s}){return Eq(P3,{sx:pAe,children:Aq(P3,{testId:i,sx:hAe,children:[e&&Eq(P3,{sx:mAe(a),children:e}),Aq(P3,{sx:bAe,children:[r&&Eq(P3,{sx:gAe,children:r}),n&&Eq(P3,{sx:{...vAe,...s},children:n})]}),t&&Eq(P3,{sx:yAe(o),children:t})]})})}function OPe({loadingText:e,textDuration:t}){const n=Array.isArray(e)?e:[e],r=t||2500;return Eq(xPe,{children:Eq(Nue,{visible:!0,children:Eq(Nue.Content,{children:Eq(Nue.Content.LoopingText,{text:[...n],textDuration:r})})})})}function CPe(e){switch(e){case UH.ETHEREUM:return zH.ETHEREUM;case UH.IMTBL_ZKEVM_TESTNET:return zH.IMTBL_ZKEVM_TESTNET;case UH.IMTBL_ZKEVM_MAINNET:return zH.IMTBL_ZKEVM_MAINNET;case UH.IMTBL_ZKEVM_DEVNET:return zH.IMTBL_ZKEVM_DEVNET;case UH.SEPOLIA:return zH.SEPOLIA;default:return""}}function IPe(e){switch(e){case UH.ETHEREUM:return HH.ETHEREUM;case UH.IMTBL_ZKEVM_TESTNET:return HH.IMTBL_ZKEVM_TESTNET;case UH.IMTBL_ZKEVM_MAINNET:return HH.IMTBL_ZKEVM_MAINNET;case UH.IMTBL_ZKEVM_DEVNET:return HH.IMTBL_ZKEVM_DEVNET;case UH.SEPOLIA:return HH.SEPOLIA;default:return""}}function _Pe(e){switch(e){case HH.ETHEREUM:return UH.ETHEREUM;case HH.IMTBL_ZKEVM_TESTNET:return UH.IMTBL_ZKEVM_TESTNET;case HH.IMTBL_ZKEVM_MAINNET:return UH.IMTBL_ZKEVM_MAINNET;case HH.IMTBL_ZKEVM_DEVNET:return UH.IMTBL_ZKEVM_DEVNET;case HH.SEPOLIA:return UH.SEPOLIA;default:return 0}}var PPe;!function(e){e.GLOBAL="global",e.DRAWER="drawer",e.LOADER="loader"}(PPe||(PPe={}));const SPe=aV.createContext({loader:null,isLoading:!1,showLoader:()=>{},hideLoader:()=>{},handovers:{},addHandover:()=>{},closeHandover:()=>{}}),kPe=({id:e}={})=>{const t=aV.useContext(SPe);if(!t)throw new Error("useHandover must be used within a HandoverProvider");const{handovers:n,closeHandover:r,addHandover:i,loader:a,isLoading:o,showLoader:s,hideLoader:c}=t;return{loader:a,isLoading:o,showLoader:s,hideLoader:c,handover:aV.useMemo((()=>n[e??"global"]),[e,n]),getHandover:aV.useCallback((e=>n[e]),[n]),addHandover:i,closeHandover:r}};function RPe({url:e,inputValue:t=0}){const n="State",r={src:e,autoplay:!0,layout:new iue.Layout({fit:iue.Fit.Contain}),stateMachines:n},{rive:i,RiveComponent:a}=iue.useRive(r),o=iue.useStateMachineInput(i,n,"mode");return aV.useEffect((()=>{i&&o&&(o.value=t)}),[i,o,t]),Eq(P3,{sx:{h:"240px",flexShrink:0},rc:Eq(a,{})})}const NPe={hidden:{y:8,opacity:0},show:e=>({height:"100%",y:0,opacity:1,transition:{delay:.1*e,duration:.2,ease:"easeOut"}}),exit:{y:-8,opacity:0}};function MPe({id:e,children:t}){const{handover:n,loader:r}=kPe({id:e});let i=[];return n?.children&&(i=oV.isValidElement(n.children)&&n.children.type===aV.Fragment?n.children.props.children:n.children),Aq(Tq,{children:[t,r&&Eq(Nue,{visible:!0,children:Eq(Nue.Content,{children:Eq(Nue.Content.LoopingText,{text:[...r.text],textDuration:r.duration})})}),n&&(i||n.animationUrl)&&Aq(N3,{sx:{backgroundColor:"base.color.neutral.1000",position:"absolute",zIndex:"1",textAlign:"center",flex:1,top:"0px",bottom:"0px",left:"0px",right:"0px"},children:[n?.animationUrl&&n?.animationUrl.length>0&&Eq(RPe,{url:n.animationUrl,inputValue:n.inputValue},n.animationUrl),Eq(N3,{sx:{height:"100%",px:"base.spacing.x6",py:"base.spacing.x10",textAlign:"center",flex:1},gap:"base.spacing.x4",children:Eq(F0,{children:oV.Children.map(i,((e,t)=>Eq(k0.div,{variants:NPe,custom:t,initial:"hidden",animate:"show",exit:"exit",children:e},e?.key??`Key${t}`)))})})]})]})}function DPe({children:e}){const[t,n]=aV.useState({}),[r,i]=aV.useState({}),[a,o]=aV.useState({}),[s,c]=aV.useState(null),u=aV.useMemo((()=>null!==s),[s]),l=aV.useCallback((()=>{c(null)}),[c]),d=aV.useCallback(((e=PPe.GLOBAL)=>{n((t=>{const n={...t},r=n[e];return delete n[e],r?.onClose&&r.onClose(),n}))}),[n]),f=aV.useCallback(((e,s=!1)=>{if(a[e])return;const c={...r},u=c[e]??[];if(u.length>0){const t=u.shift();if(t){n((n=>({...n,[e]:t})));const r=t.duration??0,i=Math.max(r,2e3);o((t=>({...t,[e]:!0}))),setTimeout((()=>{o((t=>({...t,[e]:!1})))}),i)}else delete c[e],s&&d(e),i(c)}else{const n=t[e];n?.duration&&n.duration>0&&d(e)}}),[r,a,t,d]),p=(e,t=PPe.GLOBAL)=>{console.log("@@@Adding handover",e,t),i((n=>{const r={...n},i=[...r[t]??[]];return i.push(e),r[t]=i,r}))};aV.useEffect((()=>{Object.keys(r).forEach((e=>{f(e)}))}),[r,a,f]);const h=aV.useMemo((()=>({loader:s,isLoading:u,hideLoader:l,showLoader:e=>{const t=Array.isArray(e.text)?e.text:[e.text];c({...e,text:[...t]})},handovers:t,addHandover:p,closeHandover:d})),[s,u,l,t,p,d]);return Eq(SPe.Provider,{value:h,children:Eq(MPe,{id:"global",children:e})})}const LPe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class jPe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||LPe,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new jPe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new jPe(this.logger,e)}}var FPe=new jPe;let BPe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==t)):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){[].concat(this.observers[e]).forEach((e=>{e(...n)}))}if(this.observers["*"]){[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}};function UPe(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function zPe(e){return null==e?"":""+e}function HPe(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}const a="string"!=typeof t?[].concat(t):t.split(".");for(;a.length>1;){if(i())return{};const t=r(a.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return i()?{}:{obj:e,k:r(a.shift())}}function WPe(e,t,n){const{obj:r,k:i}=HPe(e,t,Object);r[i]=n}function VPe(e,t){const{obj:n,k:r}=HPe(e,t);if(n)return n[r]}function GPe(e,t,n){for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):GPe(e[r],t[r],n):e[r]=t[r]);return e}function qPe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var KPe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function XPe(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>KPe[e])):e}const YPe=[" ",",","?","!",";"];function ZPe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let e=0;e<r.length;++e){if(!i)return;if("string"==typeof i[r[e]]&&e+1<r.length)return;if(void 0===i[r[e]]){let a=2,o=r.slice(e,e+a).join(n),s=i[o];for(;void 0===s&&r.length>e+a;)a++,o=r.slice(e,e+a).join(n),s=i[o];if(void 0===s)return;if(null===s)return null;if(t.endsWith(o)){if("string"==typeof s)return s;if(o&&"string"==typeof s[o])return s[o]}const c=r.slice(e+a).join(n);return c?ZPe(s,c,n):void 0}i=i[r[e]]}return i}function JPe(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class QPe extends BPe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."));const s=VPe(this.data,o);return s||!a||"string"!=typeof n?s:ZPe(this.data&&this.data[e]&&this.data[e][t],n,i)}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),r=t,t=o[1]),this.addNamespaces(t),WPe(this.data,o,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=VPe(this.data,o)||{};r?GPe(s,n,i):s={...s,...n},WPe(this.data,o,s),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var $Pe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))})),t}};const eSe={};class tSe extends BPe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=FPe.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=YPe.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let a=!i.test(e);if(!a){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a}(e,n,r));if(a&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),s=o[o.length-1],c=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:a}const l=this.resolve(e,t);let d=l&&l.res;const f=l&&l.usedKey||a,p=l&&l.exactUsedKey||a,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof m||"[object Array]"!==h)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(l.res=e,l.usedParams=this.getUsedParamsDetails(t),l):e}if(i){const e="[object Array]"===h,n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const a=`${r}${i}${e}`;n[e]=this.translate(a,{...t,joinArrays:!1,ns:o}),n[e]===a&&(n[e]=d[e])}d=n}}else if(y&&"string"==typeof m&&"[object Array]"===h)d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,o=!1;const u=void 0!==t.count&&"string"!=typeof t.count,f=tSe.hasDefaultValue(t),p=u?this.pluralResolver.getSuffix(c,t.count,t):"",h=t.ordinal&&u?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",m=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=m),this.isValidLookup(d)||(o=!0,d=a);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:d,b=f&&m!==d&&this.options.updateMissing;if(o||r||b){if(this.logger.log(b?"updateKey":"missingKey",c,s,a,b?m:d),i){const e=this.resolve(a,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=f&&r!==d?r:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,b,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],a+n,t[`defaultValue${n}`]||m)}))})):r(e,a,m))}d=this.extendTranslation(d,e,t,l,n),o&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${a}`),(o||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(l.res=d,l.usedParams=this.getUsedParamsDetails(t),l):d}extendTranslation(e,t,n,r,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(o){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),o){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return i&&i[0]===r[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):a.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s="string"==typeof o?[o]:o;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=$Pe.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,o),c=s.key;n=c;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const l=void 0!==o.count&&"string"!=typeof o.count,d=l&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);u.forEach((e=>{this.isValidLookup(t)||(a=e,!eSe[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(eSe[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;i=n;const a=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,c,n,e,o);else{let e;l&&(e=this.pluralResolver.getSuffix(n,o.count,o));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(a.push(c+e),o.ordinal&&0===e.indexOf(r)&&a.push(c+e.replace(r,this.options.pluralSeparator)),d&&a.push(c+t)),f){const n=`${c}${this.options.contextSeparator}${o.context}`;a.push(n),l&&(a.push(n+e),o.ordinal&&0===e.indexOf(r)&&a.push(n+e.replace(r,this.options.pluralSeparator)),d&&a.push(n+t))}}let s;for(;s=a.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,o))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function nSe(e){return e.charAt(0).toUpperCase()+e.slice(1)}class rSe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=FPe.create("languageUtils")}getScriptPartFromCode(e){if(!(e=JPe(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=JPe(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nSe(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nSe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=nSe(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))})),r}}let iSe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],aSe={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const oSe=["v1","v2","v3"],sSe=["v4"],cSe={zero:0,one:1,two:2,few:3,many:4,other:5};class uSe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=FPe.create("pluralResolver"),this.options.compatibilityJSON&&!sSe.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return iSe.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:aSe[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(JPe(e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>cSe[e]-cSe[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!oSe.includes(this.options.compatibilityJSON)}}function lSe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(e,t,n){const r=VPe(e,n);return void 0!==r?r:VPe(t,n)}(e,t,n);return!a&&i&&"string"==typeof n&&(a=ZPe(e,n,r),void 0===a&&(a=ZPe(t,n,r))),a}class dSe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=FPe.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:XPe,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?qPe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?qPe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?qPe(t.nestingPrefix):t.nestingPrefixEscaped||qPe("$t("),this.nestingSuffix=t.nestingSuffix?qPe(t.nestingSuffix):t.nestingSuffixEscaped||qPe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let i,a,o;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=lSe(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(lSe(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(o=0;i=t.regex.exec(e);){const n=i[1].trim();if(a=u(n),void 0===a)if("function"==typeof l){const t=l(e,i,r);a="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else"string"==typeof a||this.useRawValueToEscape||(a=zPe(a));const s=t.safeValue(a);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function o(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let a=`{${r[1]}`;e=r[0],a=this.interpolate(a,i);const o=a.match(/'/g),s=a.match(/"/g);(o&&o.length%2==0&&!s||s.length%2!=0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];i={...a},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,c=!0}if(r=t(o.call(this,n[1].trim(),i),i),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=zPe(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function fSe(e){const t={};return function(n,r,i){const a=r+JSON.stringify(i);let o=t[a];return o||(o=e(JPe(r),i),t[a]=o),o(n)}}class pSe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=FPe.create("formatter"),this.options=e,this.formats={number:fSe(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:fSe(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:fSe(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:fSe(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:fSe(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=fSe(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:i,formatOptions:a}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(!e)return;const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=i),"false"===i&&(n[t.trim()]=!1),"true"===i&&(n[t.trim()]=!0),isNaN(i)||(n[t.trim()]=parseInt(i,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[i]){let t=e;try{const o=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class hSe extends BPe{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=FPe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},a={},o={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===a[o]&&(a[o]=!0):(this.state[o]=1,r=!1,void 0===a[o]&&(a[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(o[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],a=r[1];t&&this.emit("failedLoading",i,a,t),n&&this.store.addResourceBundle(i,a,n),this.state[e]=t?-1:2;const o={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:i,k:a}=HPe(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[i],a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{o[e]||(o[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===o[e][t]&&(o[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});this.readingCalls++;const o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,a)}),i):a(o,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,o);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>o(null,e))).catch(o):o(null,n)}catch(e){o(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)}))}saveMissing(e,t,n,r,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,s):c(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>o(null,e))).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function mSe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ySe(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function bSe(){}class gSe extends BPe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=ySe(e),this.services={},this.logger=FPe,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=mSe();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...ySe(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?FPe.init(i(this.modules.logger),this.options):FPe.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=pSe);const n=new rSe(this.options);this.store=new QPe(this.options.resources,this.options);const a=this.services;a.logger=FPe,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new uSe(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new dSe(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new hSe(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new tSe(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=bSe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const a=UPe(),o=()=>{const e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?o():setTimeout(o,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bSe;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=UPe();return e||(e=this.languages),t||(t=this.options.ns),n||(n=bSe),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&$Pe.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=UPe();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,a)=>{a?(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{a(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let a;if("object"!=typeof t){for(var o=arguments.length,s=new Array(o>2?o-2:0),c=2;c<o;c++)s[c-2]=arguments[c];a=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else a={...t};a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix=a.keyPrefix||n||i.keyPrefix;const u=r.options.keySeparator||".";let l;return l=a.keyPrefix&&Array.isArray(e)?e.map((e=>`${a.keyPrefix}${u}${e}`)):a.keyPrefix?`${a.keyPrefix}${u}${e}`:e,r.t(l,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const a=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,a);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(n,e)||r&&!a(i,e)))}loadNamespaces(e,t){const n=UPe();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=UPe();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0));return i.length?(this.options.preload=r.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new rSe(mSe());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new gSe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bSe;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new gSe(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new QPe(this.store.data,r),i.services.resourceStore=i.store),i.translator=new tSe(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vSe=gSe.createInstance();function wSe(e){return wSe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wSe(e)}function TSe(e){var t=function(e,t){if("object"!=wSe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wSe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wSe(t)?t:String(t)}function ESe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TSe(r.key),r)}}vSe.createInstance=gSe.createInstance,vSe.createInstance,vSe.dir,vSe.init,vSe.loadResources,vSe.reloadResources,vSe.use,vSe.changeLanguage,vSe.getFixedT,vSe.t,vSe.exists,vSe.setDefaultNamespace,vSe.hasLoadedNamespace,vSe.loadNamespaces,vSe.loadLanguages;var ASe=[],xSe=ASe.forEach,OSe=ASe.slice;var CSe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ISe=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),a="".concat(e,"=").concat(i);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!CSe.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(r.domain)}if(r.path){if(!CSe.test(r.path))throw new TypeError("option path is invalid");a+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}(e,encodeURIComponent(t),i)},_Se=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},PSe={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=_Se(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&ISe(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},SSe={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var a=r[i].indexOf("=");if(a>0)r[i].substring(0,a)===e.lookupQuerystring&&(t=r[i].substring(a+1))}}return t}},kSe=null,RSe=function(){if(null!==kSe)return kSe;try{kSe="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){kSe=!1}return kSe},NSe={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&RSe()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&RSe()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},MSe=null,DSe=function(){if(null!==MSe)return MSe;try{MSe="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){MSe=!1}return MSe},LSe={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&DSe()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&DSe()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},jSe={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},FSe={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},BSe={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},USe={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var zSe=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return xSe.call(OSe.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(e){return e.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(PSe),this.addDetector(SSe),this.addDetector(NSe),this.addDetector(LSe),this.addDetector(jSe),this.addDetector(FSe),this.addDetector(BSe),this.addDetector(USe)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),n=n.map((function(e){return t.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}],n&&ESe(t.prototype,n),r&&ESe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function HSe(){return HSe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HSe.apply(this,arguments)}zSe.type="languageDetector";var WSe=lt({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),VSe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function GSe(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(WSe[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var i=new RegExp(VSe),a=null;null!==(a=i.exec(e));)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var qSe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,KSe=/^\s*$/,XSe=Object.create(null);function YSe(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(YSe,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var ZSe={parse:function(e,t){t||(t={}),t.components||(t.components=XSe);var n,r=[],i=[],a=-1,o=!1;if(0!==e.indexOf("<")){var s=e.indexOf("<");r.push({type:"text",content:-1===s?e:e.substring(0,s)})}return e.replace(qSe,(function(s,c){if(o){if(s!=="</"+n.name+">")return;o=!1}var u,l="/"!==s.charAt(1),d=s.startsWith("\x3c!--"),f=c+s.length,p=e.charAt(f);if(d){var h=GSe(s);return a<0?(r.push(h),r):((u=i[a]).children.push(h),r)}if(l&&(a++,"tag"===(n=GSe(s)).type&&t.components[n.name]&&(n.type="component",o=!0),n.voidElement||o||!p||"<"===p||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===a&&r.push(n),(u=i[a-1])&&u.children.push(n),i[a]=n),(!l||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=-1===a?r:i[a]),!o&&"<"!==p&&p)){u=-1===a?r:i[a].children;var m=e.indexOf("<",f),y=e.slice(f,-1===m?void 0:m);KSe.test(y)&&(y=" "),(m>-1&&a+u.length>=0||" "!==y)&&u.push({type:"text",content:y})}})),r},stringify:function(e){return e.reduce((function(e,t){return e+YSe("",t)}),"")}};function JSe(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const QSe={};function $Se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&QSe[t[0]]||("string"==typeof t[0]&&(QSe[t[0]]=new Date),JSe(...t))}const eke=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function tke(e,t,n){e.loadNamespaces(t,eke(e,n))}function nke(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,eke(e,r))}const rke=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ike={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ake=e=>ike[e];let oke,ske={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(rke,ake)};function cke(){return ske}function uke(){return oke}function lke(e,t){if(!e)return!1;const n=e.props?e.props.children:e.children;return t?n.length>0:!!n}function dke(e){if(!e)return[];const t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?fke(t):t}function fke(e){return Array.isArray(e)?e:[e]}function pke(e,t){if(!e)return"";let n="";const r=fke(e),i=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach(((e,r)=>{if("string"==typeof e)n+=`${e}`;else if(aV.isValidElement(e)){const a=Object.keys(e.props).length,o=i.indexOf(e.type)>-1,s=e.props.children;if(!s&&o&&0===a)n+=`<${e.type}/>`;else if(s||o&&0===a)if(e.props.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(o&&1===a&&"string"==typeof s)n+=`<${e.type}>${s}</${e.type}>`;else{const e=pke(s,t);n+=`<${r}>${e}</${r}>`}else n+=`<${r}></${r}>`}else if(null===e)JSe("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"==typeof e){const{format:t,...r}=e,i=Object.keys(r);if(1===i.length){const e=t?`${i[0]}, ${t}`:i[0];n+=`{{${e}}}`}else JSe("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else JSe("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),n}function hke(e,t,n,r,i,a){if(""===t)return[];const o=r.transKeepBasicHtmlNodesFor||[],s=t&&new RegExp(o.map((e=>`<${e}`)).join("|")).test(t);if(!e&&!s&&!a)return[t];const c={};!function e(t){fke(t).forEach((t=>{"string"!=typeof t&&(lke(t)?e(dke(t)):"object"!=typeof t||aV.isValidElement(t)||Object.assign(c,t))}))}(e);const u=ZSe.parse(`<0>${t}</0>`),l={...c,...i};function d(e,t,n){const r=dke(e),i=p(r,t.children,n);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((e=>aV.isValidElement(e)))}(r)&&0===i.length||e.props&&e.props.i18nIsDynamicList?r:i}function f(e,t,n,r,i){e.dummy?(e.children=t,n.push(aV.cloneElement(e,{key:r},i?void 0:t))):n.push(...aV.Children.map([e],(e=>{const n={...e.props};return delete n.i18nIsDynamicList,oV.createElement(e.type,HSe({},n,{key:r,ref:e.ref},i?{}:{children:t}))})))}function p(t,i,c){const u=fke(t);return fke(i).reduce(((t,i,h)=>{const m=i.children&&i.children[0]&&i.children[0].content&&n.services.interpolator.interpolate(i.children[0].content,l,n.language);if("tag"===i.type){let a=u[parseInt(i.name,10)];1!==c.length||a||(a=c[0][i.name]),a||(a={});const y=0!==Object.keys(i.attrs).length?function(e,t){const n={...t};return n.props=Object.assign(e.props,t.props),n}({props:i.attrs},a):a,b=aV.isValidElement(y),g=b&&lke(i,!0)&&!i.voidElement,v=s&&"object"==typeof y&&y.dummy&&!b,w="object"==typeof e&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof y){const e=n.services.interpolator.interpolate(y,l,n.language);t.push(e)}else if(lke(y)||g){f(y,d(y,i,c),t,h)}else if(v){f(y,p(u,i.children,c),t,h)}else if(Number.isNaN(parseFloat(i.name)))if(w){f(y,d(y,i,c),t,h,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&o.indexOf(i.name)>-1)if(i.voidElement)t.push(aV.createElement(i.name,{key:`${i.name}-${h}`}));else{const e=p(u,i.children,c);t.push(aV.createElement(i.name,{key:`${i.name}-${h}`},e))}else if(i.voidElement)t.push(`<${i.name} />`);else{const e=p(u,i.children,c);t.push(`<${i.name}>${e}</${i.name}>`)}else if("object"!=typeof y||b)f(y,m,t,h,1!==i.children.length||!m);else{const e=i.children[0]?m:null;e&&t.push(e)}}else if("text"===i.type){const e=r.transWrapTextNodes,o=a?r.unescape(n.services.interpolator.interpolate(i.content,l,n.language)):n.services.interpolator.interpolate(i.content,l,n.language);e?t.push(aV.createElement(e,{key:`${i.name}-${h}`},o)):t.push(o)}return t}),[])}return dke(p([{dummy:!0,children:e||[]}],u,fke(e||[]))[0])}function mke(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const m=d||uke();if(!m)return $Se("You will need to pass in an i18next instance by using i18nextReactModule"),t;const y=f||m.t.bind(m)||(e=>e);a&&(o.context=a);const b={...cke(),...m.options&&m.options.react};let g=l||y.ns||m.options&&m.options.defaultNS;g="string"==typeof g?[g]:g||["translation"];const v=pke(t,b),w=c||v||b.transEmptyNodeValue||i,{hashTransKey:T}=b,E=i||(T?T(v||w):v||w);m.options&&m.options.interpolation&&m.options.interpolation.defaultVariables&&(s=s&&Object.keys(s).length>0?{...s,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables});const A=s?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},x={...o,count:n,...s,...A,defaultValue:w,ns:g},O=E?y(E,x):w;u&&Object.keys(u).forEach((e=>{const t=u[e];"function"==typeof t.type||!t.props||!t.props.children||O.indexOf(`${e}/>`)<0&&O.indexOf(`${e} />`)<0||(u[e]=oV.createElement((function(){return oV.createElement(oV.Fragment,null,t)}),null))}));const C=hke(u||t,O,m,b,x,p),I=void 0!==r?r:b.defaultTransParent;return I?aV.createElement(I,h,C):C}const yke={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ske={...ske,...e}}(e.options.react),function(e){oke=e}(e)}},bke=aV.createContext();class gke{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function vke(e){let{children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:u,ns:l,i18n:d,t:f,shouldUnescape:p,...h}=e;const{i18n:m,defaultNS:y}=aV.useContext(bke)||{},b=d||m||uke(),g=f||b&&b.t.bind(b);return mke({children:t,count:n,parent:r,i18nKey:i,context:a,tOptions:o,values:s,defaults:c,components:u,ns:l||g&&g.ns||y||b&&b.options&&b.options.defaultNS,i18n:b,t:f,shouldUnescape:p,...h})}const wke=(e,t)=>{const n=aV.useRef();return aV.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current};function Tke(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=aV.useContext(bke)||{},a=n||r||uke();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new gke),!a){$Se("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react&&void 0!==a.options.react.wait&&$Se("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...cke(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o;let u=e||i||a.options&&a.options.defaultNS;u="string"==typeof u?[u]:u||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(u);const l=(a.isInitialized||a.initializedStoreOnce)&&u.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],i=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const o=(e,n)=>{const r=t.services.backendConnector.state[`${e}|${n}`];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(r,e)||i&&!o(a,e)))}(e,t,n):($Se("i18n.languages were undefined or empty",t.languages),!0)}(e,a,o)));function d(){return a.getFixedT(t.lng||null,"fallback"===o.nsMode?u:u[0],c)}const[f,p]=aV.useState(d);let h=u.join();t.lng&&(h=`${t.lng}${h}`);const m=wke(h),y=aV.useRef(!0);aV.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=o;function r(){y.current&&p(d)}return y.current=!0,l||s||(t.lng?nke(a,t.lng,u,(()=>{y.current&&p(d)})):tke(a,u,(()=>{y.current&&p(d)}))),l&&m&&m!==h&&y.current&&p(d),e&&a&&a.on(e,r),n&&a&&a.store.on(n,r),()=>{y.current=!1,e&&a&&e.split(" ").forEach((e=>a.off(e,r))),n&&a&&n.split(" ").forEach((e=>a.store.off(e,r)))}}),[a,h]);const b=aV.useRef(!0);aV.useEffect((()=>{y.current&&!b.current&&p(d),b.current=!1}),[a,c]);const g=[f,a,l];if(g.t=f,g.i18n=a,g.ready=l,l)return g;if(!l&&!s)return g;throw new Promise((e=>{t.lng?nke(a,t.lng,u,(()=>e())):tke(a,u,(()=>e()))}))}const Eke={en:{translation:{views:{CONNECT_WALLET:{body:{heading:"Connect a wallet",content:"You'll need to connect or create a digital wallet to buy, sell, trade and store your tokens and collectibles."},walletSelection:{heading:"Choose a wallet"},nonPassportDrawer:{heading:"Non-Passport users will need IMX for gas.",body1:"We recommend using <layerswapLink>Layerswap</layerswapLink> to bridge funds onto Immutable zkEVM, with refuel switched on so you receive some IMX.",body2:"Alternatively, pay and play easily with a gas free Immutable Passport.",buttonText:"Proceed anyway"}},CONNECT_SUCCESS:{status:"Connection secure",action:"Continue"},READY_TO_CONNECT:{header:{title:"Connect"},metamask:{body:{heading:"Check for the pop-up from MetaMask",content:"Follow the prompts in the MetaMask popup to connect"},footer:{buttonText1:"Ready to connect",buttonText2:"Try again"}},passport:{body:{heading:"Connect with Immutable Passport",content:"Follow the prompts to connect with Immutable Passport"},footer:{buttonText1:"Continue",buttonText2:"Try again"}}},SWITCH_NETWORK:{eth:{heading:"You'll need to switch to the {{networkName}} network",body:"You'll be prompted to switch networks in your wallet.",button:{text:"Ready to Switch",retryText:"Try Again"}},zkEVM:{heading:"You’ll be asked to switch to the Immutable zkEVM network",body:"Check for the pop-up from MetaMask and 'Approve' to switch. If this is the first time, MetaMask will also ask you to add the network.",bodyWalletConnect:"Check for the pop-up from your wallet to switch. If this is the first time, your wallet will also ask you to add the network.",button:{text:"Ready to Switch",retryText:"Try Again"}}},ERROR_VIEW:{heading:"Something's gone wrong",body:["You can try again or contact","support","for help."],actionText:"Try again"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"Swapping is not available in your region"},body:{swap:"Please refer to <quickswapLink>Quickswap’s</quickswapLink> website for further information."}},LOADING_VIEW:{text:"Loading"},WALLET_BALANCES:{header:{title:"Wallet"},networkStatus:{heading:"Network"},totalTokenBalance:{heading:"Tokens",totalHeading:"Value"},tokenBalancesList:{noTokensFound:"No tokens found"},addCoins:"Add tokens"},SETTINGS:{header:{title:"Settings"},disconnectButton:{label:"Disconnect Wallet"},walletAddress:{label:"Wallet Address"},transferAssetsL1Warning:{heading:"Do not send assets to Passport on Ethereum",body:"Passport does not yet exist on Ethereum, so your funds will get lost there. Only transfer on Immutable zkEVM or Immutable X. "}},COIN_INFO:{metamask:{heading:"Tokens and collectibles are native to networks",body:"You can switch networks to add tokens or move them from one network to another"},passport:{heading:"Tokens and collectibles are native to networks",body1:"This network is called Immutable zkEVM. If you have other tokens in your Passport and can’t see them here, they might be on another network. ",body2:" for more info.",linkText:"Visit our FAQs"}},SWAP:{header:{title:"Swap tokens"},content:{title:"What would you like to swap?",fiatPricePrefix:"≈ USD",availableBalancePrefix:"Available"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"What are you swapping from?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"What are you swapping to?"},buttonText:"Swap",conversionRate:"1 {{fromSymbol}} ≈ {{rate}} {{toSymbol}}, inclusive of {{fee}}% fee"},fees:{title:"Fees total"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noFromTokenSelected:"Select a token to swap",noToTokenSelected:"Select a token to receive"},success:{text:"Success",actionText:"Continue"},failed:{text:"Transaction rejected",actionText:"Try again"},rejected:{text:"Price surge",actionText:"Review & try again"},IN_PROGRESS:{loading:{text:"Swap in progress"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"Now you'll just need to confirm the transaction",body:"Follow the prompts in your wallet."},footer:{buttonText:"Okay",retryText:"Try again"}},approveSpending:{content:{metamask:{heading:"You'll be asked to set a spending cap for this transaction",body:"Input at least {{amount}} for this transaction and future transactions, then follow the prompts."},passport:{heading:"You'll be asked to approve a spending cap for this transaction",body:"Follow the prompts in your wallet to approve the spending cap."}},footer:{buttonText:"Got it",retryText:"Try again"},loading:{text:"Approving spending cap"}}},ONRAMP:{header:{title:"Add tokens"},initialLoadingText:"Taking you to Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak is processing your order"}},IN_PROGRESS:{content:{heading:"Order in progress",body1:"You’ll receive an email from Transak when complete. This can take up to 3 mins.",body2:"You can close this window, the transaction will be reflected in your wallet once complete."}},SUCCESS:{text:"Tokens are on the way",actionText:"Done"},FAIL:{text:"Transaction failed",actionText:"Try again"}},TOP_UP_VIEW:{header:{title:"How would you like to add tokens?"},topUpOptions:{onramp:{heading:"Buy tokens"},debit:{heading:"Buy with Debit Card",caption:"The recommended way to buy tokens",subcaption:"Fees ",disabledCaption:""},credit:{heading:"Buy with Credit Card",caption:"Not recommended due to failures & charges",subcaption:"Fees ",disabledCaption:""},swap:{heading:"Swap tokens on this network",caption:"Immutable zkEVM only",subcaption:"Fees",disabledCaption:"Not available in your region"},bridge:{heading:"Transfer tokens from another wallet",caption:"Immutable zkEVM only",subcaption:"Fees ",disabledCaption:""},advanced:{heading:"Bridge tokens from another network",caption:"Multiple network and CEX options available",subcaption:"Fees ",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"Crunching numbers"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"Quantity x{{qty}}"},coinsDrawer:{header:"Pay with...",caption1:"Tokens",caption2:"Balance",divider:"More options",stepType:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}",delta:{SWAP:"Swap {{symbol}} ≈ {{amount}}",ONRAMP:"Buy {{symbol}} ≈ {{amount}}",BRIDGE:"Move {{symbol}} ≈ {{amount}}",SUFFICIENT:"Pay {{symbol}} {{amount}}"}},fee:"Swap fee ~ {{symbol}} {{amount}}"},orderReview:{heading:"Payment summary",continue:"Proceed",payWith:{SWAP:"Swap & Pay with {{symbol}}",SUFFICIENT:"Pay with {{symbol}}"},balance:"Balance {{amount}}"}},FUND_WITH_SMART_CHECKOUT:{loading:{checkingBalances:"Crunching numbers"},currency:{usdEstimate:"≈ USD $",fees:"Fees"},fundingRouteDrawer:{header:"Available balance"},fundingRouteSelect:{heading:"Pay with your",noRoutesAvailable:"Insufficient token balance. Please proceed with card instead.",continue:"Continue",payWithCardInstead:"No thanks, I'll pay with card",payWithCard:"Pay with card"}},PAYMENT_METHODS:{header:{heading:"How would you like to pay?"},options:{crypto:{heading:"Tokens",caption:"Pay with the tokens in your wallet, or buy tokens with card",disabledCaption:"Currently not available for this purchase"},debit:{heading:"Debit Card",caption:"The recommended way to pay with card.",disabledCaption:"Unavailable for your selection. We recommend adding tokens"},credit:{heading:"Credit Card",caption:"Not recommended since transactions may be blocked by your bank.",disabledCaption:"Unavailable for your selection. We recommend adding tokens"}},topUp:{heading:"You’ll need to add some tokens",subheading:{both:"Add {{erc20.value}} {{erc20.symbol}} and {{native.value}} {{native.symbol}} to cover this purchase plus gas.",erc20:"Add {{erc20.value}} {{erc20.symbol}} to your balance through one of the following options.",native:"Add {{native.value}} {{native.symbol}} for gas, through one of the following options."}},loading:{ready1:"Collecting your order",ready2:"Talking to wallet",ready3:"Readying assets",processing1:"Initialising payment",processing2:"Securing your assets",processing3:"Finalising payment"},handover:{initial:"Preparing Order",approve:{before:"Waiting for approval in your wallet",beforeWithCta:{heading:"Please approve your tokens",ctaButton:"Open wallet"},pending:"Waiting for approval",after:"Tokens ready for item purchase"},execute:{before:"Waiting for confirmation in your wallet",beforeWithCta:{heading:"Please confirm this purchase",ctaButton:"Open wallet"},pending:"Waiting for purchase confirmation",after:"Processing purchase"},success:"Purchase complete",error:{heading:"Unable to complete purchase"}},creditCardWarningDrawer:{heading:"We recommend debit over credit",body:"Most banks will charge cash advance fees or block the transaction altogether when using credit card on these types of purchases.",ctaButton:"Try anyway"}},PAY_WITH_COINS:{header:{heading:"Pay with your",caption:"Using the token balance in your wallet"},button:{buyNow:"Buy now"}},PAY_WITH_CARD:{screenTitle:"Pay with card",loading:"Taking you to Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"Transaction failed",primaryAction:"Try again",secondaryAction:"View details"},SERVICE_BREAKDOWN:{description:"Sorry, we're unable to process your payment right now. Please try again in a few minutes.",secondaryAction:"Dismiss"},PRODUCT_NOT_FOUND:{description:"Sorry, this item is no longer available",secondaryAction:"Dismiss"},INSUFFICIENT_STOCK:{description:"Sorry, the requested quantity is not in stock. Consider buying a smaller quantity.",secondaryAction:"Dismiss"},TRANSAK_FAILED:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},WALLET_FAILED:{description:"Sorry, we're unable to process this right now.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED_NO_FUNDS:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Go back",secondaryAction:"Dismiss"},WALLET_REJECTED:{description:"You'll need to approve the transaction in your wallet to proceed.",primaryAction:"Try again",secondaryAction:"Cancel"},WALLET_POPUP_BLOCKED:{description:"You'll need to allow pop-ups in your browser to proceed.",primaryAction:"I've fixed this, Try again",secondaryAction:"Cancel"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"Sorry, something went wrong while moving funds. Please try again.",primaryAction:"Try again",secondaryAction:"Cancel"},DEFAULT_ERROR:{description:"Sorry, something went wrong. Please try again.",primaryAction:"Try again",secondaryAction:"Dismiss"},INVALID_PARAMETERS:{description:"Sorry, we're unable to process your order. Missing information from client",secondaryAction:"Dismiss"}}},SALE_SUCCESS:{text:"Order completed",actionText:"Continue"},WALLET_NETWORK_SELECTION:{layoutHeading:"Move",heading:"Where would you like to move funds between?",fromFormInput:{heading:"From",selectDefaultText:"Select wallet and network",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"Select wallet and network",walletSelectorHeading:"To wallet",networkSelectorHeading:"To network"},submitButton:{text:"Next"}},BRIDGE_FORM:{header:{title:"Move tokens"},fees:{title:"Gas Fee",fiatPricePrefix:"≈ USD $"},content:{title:"How much would you like to move?",fiatPricePrefix:"≈ USD",availableBalancePrefix:"Available"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"What would you like to move?"},buttonText:"Review"},validation:{noAmountInputted:"Please input amount",insufficientBalance:"Insufficient balance",noTokenSelected:"Select a token to move"}},BRIDGE_REVIEW:{layoutHeading:"Move",heading:"Ok, how does this look?",fromLabel:{amountHeading:"Moving",heading:"From"},toLabel:{heading:"To"},fees:{heading:"Gas fee"},submitButton:{buttonText:"Confirm move"},fiatPricePrefix:"≈ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"Transaction failed",actionText:"Review & Try again"}},APPROVE_TRANSACTION:{content:{heading:"Approve the transaction in your wallet",body:"Follow the prompts in your wallet popup to confirm."},footer:{buttonText:"Okay",retryText:"Try again"},loadingView:{text:"Initiating move"}},IN_PROGRESS:{heading:"Move in progress",body1:"Your funds have been sent, with less than 20 mins remaining until they're received. You can return and view progress by clicking on the rocket icon.",body2:"You can close this window.",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"In progress",passportDashboard:"View the full transaction history in your",status:{withdrawalPending:{actionButtonText:"Proceed",withdrawalDelayText:"This move has been paused, please return ",withdrawalReadyText:"Action required to receive your tokens",caption:"Paused"},inProgress:{heading:"In Progress",txnEstimate:"Usually takes 20 mins",stepInfo:"View Details"},emptyState:{notConnected:{body:"Connect your wallet to view the transactions",buttonText:"Connect"}},noTransactions:{body:"You're all done here.",passport:{body:"View your completed transactions in ",link:"Passport"}}},changeWallet:{buttonText:"Change wallet"},fiatPricePrefix:"≈ USD $",support:{body1:"Need help?",body2:" Contact ",body3:"support",supportLink:"https://support.immutable.com/en/",passport:{body1:"Or view completed transactions in your ",body2:"Passport"}},walletSelection:{heading:"Choose a wallet to view"}},CLAIM_WITHDRAWAL:{content:{heading:"Follow the prompts to receive your tokens on ",body:"You’ll be asked to pay a small gas fee to claim your withdrawal.",body2:"Destination wallet address: "},footer:{buttonText:"Continue",retryText:"Try again"},IN_PROGRESS:{loading:{text:"Processing"},success:{text:"Success",actionText:"Done"},failure:{text:"Transaction failed",actionText:"Try again"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap is a third party app. Immutable neither builds, owns, operates or deploys Quickswap. For further info, refer to Quickswap’s website."}},wallets:{passport:{heading:"Immutable Passport",description:"Your gaming wallet to pay with card, manage items & more."},metamask:{heading:"MetaMask",description:"Digital wallet for accessing blockchain applications and web3."},walletconnect:{heading:"Other wallets",description:"Allows you to connect with any blockchain mobile wallet including MetaMask."},browserwallet:{heading:"Browser wallets",description:"Digital wallet for accessing blockchain applications and web3."},recommended:"Recommended"},drawers:{feesBreakdown:{heading:"Fees",total:"Total fees",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"Gas fee"},approvalFee:{label:"Approval fee"},swapGasFee:{label:"Gas fee"},swapSecondaryFee:{label:"{{amount}} Swap fee (factored into quote)"},serviceFee:{depositLabel:"zkEVM gas fees",withdrawLabel:"Ethereum gas fees"}}},transactionFailed:{content:{heading1:"We’ll need you to confirm in your",heading2:"wallet before proceeding",body1:"When the MetaMask pop up appears, be sure to",body2:"sign the transaction"},buttons:{retry:"Got it",cancel:"Dismiss"}},coinSelector:{option:{fiatPricePrefix:"≈ USD $"},noCoins:"You have no available tokens to select in your wallet."},notEnoughGas:{content:{heading:"You'll need more {{token}} for gas",body:"Your {{token}} balance is too low to cover the gas fee on this move, so you'll need to add more before proceeding."},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX tokens",copyAddress:"Copy wallet address",cancel:"Dismiss"}},notEnoughImx:{content:{noImx:{heading:"You'll need IMX tokens to swap",body:"Swap fees are paid in IMX tokens, so you'll need to add this before you can swap"},insufficientImx:{heading:"You'll need more IMX tokens",body:"In order to cover the fees for the amount specified, you'll need to add more IMX tokens"}},buttons:{adjustAmount:"Adjust amount",addMoreImx:"Add IMX tokens",cancel:"Dismiss"}},notEnoughEthWithdrawal:{content:{heading1:"Insufficient",heading2:"for gas",body1:"Add",body2:"to your destination account, or select another account to pay the gas. Your destination account will remain the same."},buttons:{retry:"Pay gas with another account",dismiss:"Dismiss"}},unableToSwap:{heading:"Unable to swap this token",body:"This token pairing isn't available to swap right now. Try another selection.",buttons:{cancel:"Dismiss"}},networkSwitch:{heading:"Switch network in your {{wallet}}",manualSwitch:{body:"You'll need to open your mobile wallet and switch to the {{chain}} network to proceed"},controlledSwitch:{body:"You'll need to switch to the {{chain}} network to proceed"},switchButton:"Switch to {{chain}}"},walletConnectionError:{unableToConnect:{heading:"Unable to connect",body:"Check your wallet and try again, or close and try a different option",actionButtonText:"Try again"},changedYourMind:{heading:"Changed your mind?",body:"Make sure pop ups are enabled and follow the prompts in your wallet to connect",actionButtonText:"Try again"}}}}},ja:{translation:{views:{CONNECT_WALLET:{body:{heading:"ウォレットを接続する",content:"トークンや収集品を購入、販売、取引、保管するには、デジタルウォレットを接続するか、新しいデジタルウォレットを作成する必要があります。"},walletSelection:{heading:"ウォレットを選択"},nonPassportDrawer:{heading:"パスポート未使用者はガス代としてIMXが必要です。",body1:"資金をImmutable zkEVMにブリッジするには、<layerswapLink>Layerswap</layerswapLink>の使用をお勧めします。リファエルをオンにしてIMXを受け取ります。",body2:"または、ガス無料のImmutable Passportで簡単に支払いとプレイができます。",buttonText:"それでも進む"}},CONNECT_SUCCESS:{status:"接続が安全です",action:"続ける"},READY_TO_CONNECT:{header:{title:"接続する"},metamask:{body:{heading:"MetaMaskからのポップアップを確認する",content:"MetaMaskのポップアップに従って接続してください"},footer:{buttonText1:"接続する準備ができました",buttonText2:"再試行する"}},passport:{body:{heading:"Immutable Passportで接続する",content:"Immutable Passportに接続するためのプロンプトに従ってください"},footer:{buttonText1:"続ける",buttonText2:"再試行する"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}}ネットワークに切り替える必要があります",body:"MetaMaskでネットワークを切り替えるように求められます。必要に応じて後で切り替えることができます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}},zkEVM:{heading:"Immutable zkEVMネットワークに切り替えるように求められます",body:"MetaMaskからのポップアップを確認し、「承認」して切り替えてください。これが初めての場合、MetaMaskはネットワークを追加するように求めることもあります。",bodyWalletConnect:"ウォレットからのポップアップを確認して切り替えます。これが初めての場合、ウォレットはネットワークの追加を求めます。",button:{text:"切り替えの準備ができました",retryText:"再試行する"}}},ERROR_VIEW:{heading:"何かがうまくいかない",body:["もう一度やってみるか、","サポート","に連絡して助けを求めることができます。"],actionText:"もう一度試す"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"お住まいの地域では交換が利用できません"},body:{swap:"<quickswapLink>Quickswap</quickswapLink>のウェブサイトで詳細情報をご覧ください。"}},LOADING_VIEW:{text:"読み込み中"},WALLET_BALANCES:{header:{title:"ウォレット"},networkStatus:{heading:"ネットワーク"},totalTokenBalance:{heading:"トークン",totalHeading:"価値"},tokenBalancesList:{noTokensFound:"トークンが見つかりません"},addCoins:"トークンを追加する"},SETTINGS:{header:{title:"設定"},disconnectButton:{label:"ウォレットを切断"},walletAddress:{label:"ウォレットアドレス"},transferAssetsL1Warning:{heading:"Ethereumのパスポートに資産を送らないでください",body:"パスポートはまだEthereumに存在していないため、そこに資金を送ると失われます。Immutable zkEVMまたはImmutable Xでのみ転送してください。"}},COIN_INFO:{metamask:{heading:"トークンとコレクタブルはネットワークに固有のものです",body:"トークンを追加したり、別のネットワークに移動したりするには、ネットワークを切り替えることができます"},passport:{heading:"トークンとコレクタブルはネットワークに固有のものです",body1:"このネットワークは Immutable zkEVM と呼ばれています。パスポートに他のトークンがあり、ここに表示されない場合、それらは別のネットワーク上にあるかもしれません。",body2:"詳細については、",linkText:"FAQをご覧ください"}},SWAP:{header:{title:"トークンを交換する"},content:{title:"何をスワップしたいですか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},swapForm:{from:{label:"出金元",inputPlaceholder:"0",selectorTitle:"何からスワップしたいですか?"},to:{label:"宛先",inputPlaceholder:"0",selectorTitle:"何にスワップしたいですか?"},buttonText:"スワップ"},fees:{title:"手数料合計"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高不足",noFromTokenSelected:"交換するトークンを選択してください",noToTokenSelected:"受け取るトークンを選択してください"},success:{text:"成功",actionText:"続行"},failed:{text:"トランザクションが拒否されました",actionText:"もう一度試す"},rejected:{text:"価格が急騰しています",actionText:"レビューしてもう一度試す"},IN_PROGRESS:{loading:{text:"スワップ進行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"これでトランザクションを承認する必要があります",body:"ウォレットのプロンプトに従ってください。"},footer:{buttonText:"はい",retryText:"もう一度試す"}},approveSpending:{content:{metamask:{heading:"このトランザクションのために支出上限を設定するように求められます",body:["少なくとも入力してください","このトランザクションおよび将来のトランザクションのために、その後、プロンプトに従ってください。"]},passport:{heading:"このトランザクションのために支出上限を承認するように求められます",body:"ウォレットのプロンプトに従って支出上限を承認してください。"}},footer:{buttonText:"了解",retryText:"もう一度試す"},loading:{text:"支出上限を承認しています"}}},ONRAMP:{header:{title:"トークンを追加する"},initialLoadingText:"Transakに移動しています",IN_PROGRESS_LOADING:{loading:{text:"Transakが注文を処理しています"}},IN_PROGRESS:{content:{heading:"注文進行中",body1:"完了するとTransakからメールが届きます。これには最大3分かかる場合があります。",body2:"このウィンドウを閉じても、トランザクションは完了次第ウォレットに反映されます。"}},SUCCESS:{text:"トークンがまもなく到着します",actionText:"完了"},FAIL:{text:"トランザクションが失敗しました",actionText:"もう一度試す"}},TOP_UP_VIEW:{header:{title:"どのようにトークンを追加しますか?"},topUpOptions:{onramp:{heading:"トークンを購入する"},debit:{heading:"デビットカードで購入",caption:"トークンを購入する推奨方法",subcaption:"手数料",disabledCaption:""},credit:{heading:"クレジットカードで購入",caption:"失敗や手数料のためおすすめできません",subcaption:"手数料",disabledCaption:""},swap:{heading:"このネットワークでトークンをスワップ",caption:"イミュータブル zkEVM のみ",subcaption:"手数料",disabledCaption:"お住まいの地域では利用できません"},bridge:{heading:"他のウォレットからトークンを送金する",caption:"イミュータブル zkEVM のみ",subcaption:"手数料",disabledCaption:""},advanced:{heading:"他のネットワークからトークンをブリッジする",caption:"複数のネットワークとCEXのオプションが利用可能",subcaption:"手数料",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"数字を計算中"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支払い方法…",caption1:"トークン",caption2:"残高",divider:"その他のオプション",stepType:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う",delta:{SWAP:"{{symbol}}を{{amount}}でスワップ",ONRAMP:"{{symbol}}を{{amount}}で購入",BRIDGE:"{{symbol}}を{{amount}}で移動",SUFFICIENT:"{{symbol}} {{amount}}で支払う"}},fee:"交換手数料 ~ {{symbol}} {{amount}}"},orderReview:{heading:"支払いの概要",continue:"続行",payWith:{SWAP:"{{symbol}}でスワップ&支払い",SUFFICIENT:"{{symbol}}で支払う"},balance:"残高{{amount}}"}},PAYMENT_METHODS:{header:{heading:"どの支払い方法をご希望ですか?"},options:{crypto:{heading:"トークン",caption:"ウォレット内のトークンで支払うか、カードでトークンを購入してください",disabledCaption:"現在、この支払い方法は利用できません。"},debit:{heading:"デビットカード",caption:"カードでの支払いに推奨される方法です。",disabledCaption:"こちらの選択は利用できません。トークンを追加することをお勧めします"},credit:{heading:"クレジットカード",caption:"銀行によって取引がブロックされる可能性があるため、推奨されません。",disabledCaption:"こちらの選択は利用できません。トークンを追加することをお勧めします"}},topUp:{heading:"トークンを追加する必要があります",subheading:{both:"この購入とガスをカバーするために{{erc20.value}} {{erc20.symbol}}と{{native.value}} {{native.symbol}}を追加する必要があります。",erc20:"残高が不足しているため、{{erc20.value}} {{erc20.symbol}}を追加する必要があります。",native:"残高が不足しているため、{{native.value}} {{native.symbol}}を追加する必要があります。"}},loading:{ready1:"注文を受け取り中",ready2:"ウォレットと通信中",ready3:"資産を準備中",processing1:"支払いを初期化中",processing2:"資産を確保中",processing3:"支払いを完了中"},handover:{initial:"注文を準備中",approve:{before:"ウォレットで承認を待っています",beforeWithCta:{heading:"トークンを承認してください",ctaButton:"ウォレットを開く"},pending:"承認を待っています",after:"トークンはアイテム購入の準備ができています"},execute:{before:"ウォレットで確認を待っています",beforeWithCta:{heading:"この購入を確認してください",ctaButton:"ウォレットを開く"},pending:"購入確認を待っています",after:"購入を処理中"},success:"購入完了",error:{heading:"購入を完了できません"}},creditCardWarningDrawer:{heading:"デビットカードの使用をお勧めします",body:"この種の購入にクレジットカードを使用する場合、ほとんどの銀行は現金前払い手数料を請求するか、または取引を完全にブロックします。",ctaButton:"それでも試す"}},PAY_WITH_COINS:{header:{heading:"あなたので支払う",caption:"ウォレット内のトークン残高を使用する"},button:{buyNow:"今すぐ購入"}},PAY_WITH_CARD:{screenTitle:"カードで支払う",loading:"Transakに移動しています"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"トランザクションが失敗しました",primaryAction:"もう一度試す",secondaryAction:"詳細を表示"},SERVICE_BREAKDOWN:{description:"申し訳ありませんが、現在お支払いを処理できません。数分後にもう一度お試しください。",secondaryAction:"閉じる"},PRODUCT_NOT_FOUND:{description:"申し訳ありませんが、このアイテムはもう利用できません。",secondaryAction:"閉じる"},INSUFFICIENT_STOCK:{description:"申し訳ありませんが、ご希望の数量は在庫がありません。少ない数量の購入をご検討ください。",secondaryAction:"閉じる"},TRANSAK_FAILED:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},WALLET_FAILED:{description:"申し訳ありませんが、現在これを処理できません。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED_NO_FUNDS:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"戻る",secondaryAction:"閉じる"},WALLET_REJECTED:{description:"取引を承認するには、ウォレットで承認する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},WALLET_POPUP_BLOCKED:{description:"続行するには、ブラウザでポップアップを許可する必要があります。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"資金を移動する際に何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"キャンセル"},DEFAULT_ERROR:{description:"申し訳ありませんが、何かがうまくいかなかったようです。もう一度お試しください。",primaryAction:"もう一度試す",secondaryAction:"閉じる"},INVALID_PARAMETERS:{description:"申し訳ありませんが、ご注文を処理できません。クライアントからの情報が不足しています。",secondaryAction:"閉じる"}}},SALE_SUCCESS:{text:"注文が完了しました",actionText:"続行"},WALLET_NETWORK_SELECTION:{layoutHeading:"移動",heading:"どこに資金を移動させたいですか?",fromFormInput:{heading:"From",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"From wallet",networkSelectorHeading:"From network"},toFormInput:{heading:"To",selectDefaultText:"ウォレットとネットワークを選択",walletSelectorHeading:"To wallet",networkSelectorHeading:"To network"},submitButton:{text:"次へ"}},BRIDGE_FORM:{header:{title:"トークンを移動する"},fees:{title:"ガス手数料",fiatPricePrefix:"≈ USD $"},content:{title:"いくら移動しますか?",fiatPricePrefix:"約USD",availableBalancePrefix:"利用可能"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"移動するコインを選択"},buttonText:"確認"},validation:{noAmountInputted:"金額を入力してください",insufficientBalance:"残高が不足しています",noTokenSelected:"移動するトークンを選択してください"}},BRIDGE_REVIEW:{layoutHeading:"移動",heading:"これはどう見えますか?",fromLabel:{amountHeading:"移動中",heading:"From"},toLabel:{heading:"To"},fees:{heading:"ガス手数料"},submitButton:{buttonText:"移動を確認"},fiatPricePrefix:"≈ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"トランザクションが失敗しました",actionText:"再確認してもう一度試す"}},APPROVE_TRANSACTION:{content:{heading:"ウォレットでトランザクションを承認してください",body:"ウォレットのポップアップで表示されるプロンプトに従って承認してください。"},footer:{buttonText:"OK",retryText:"もう一度試す"},loadingView:{text:"移動を開始しています"}},IN_PROGRESS:{heading:"移動進行中",body1:"資金は送信されました。受信まで残り20分未満です。進捗状況は、ロケットアイコンをクリックして戻って確認できます。",body2:"このウィンドウを閉じてもよろしいです。",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"進行中",passportDashboard:"完全な取引履歴を表示する",status:{withdrawalPending:{actionButtonText:"続行",withdrawalDelayText:"この移動は一時停止されました。戻ってください",withdrawalReadyText:"トークンを受け取るにはアクションが必要です",caption:"一時停止中"},inProgress:{heading:"進行中",txnEstimate:"通常、20分かかります",stepInfo:"詳細を表示"},emptyState:{notConnected:{body:"トランザクションを表示するにはウォレットを接続してください",buttonText:"接続する"}},noTransactions:{body:"ここで完了しました。",passport:{body:"完了した取引は",link:"パスポート"}}},changeWallet:{buttonText:"ウォレットを変更する"},fiatPricePrefix:"≈ USD $",support:{body1:"サポートが必要ですか?",body2:" お問い合わせは ",body3:"サポートへ",supportLink:"https://support.immutable.com/ja/",passport:{body1:"または、完了した取引をご覧になるには ",body2:"パスポート"}},walletSelection:{heading:"表示するウォレットを選択"}},CLAIM_WITHDRAWAL:{content:{heading:"プロンプトに従ってトークンを受け取る",body:"引き出しを請求するには小額のガス手数料が必要です。",body2:"目的地ウォレットアドレス:"},footer:{buttonText:"続行",retryText:"もう一度試す"},IN_PROGRESS:{loading:{text:"処理中"},success:{text:"成功",actionText:"完了"},failure:{text:"取引失敗",actionText:"再試行"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswapはサードパーティアプリケーションです。ImmutableはQuickswapをビルド、所有、運営、デプロイしていません。詳細については、Quickswapのウェブサイトを参照してください。"}},wallets:{passport:{heading:"Immutable Passport",description:"カードで支払い、アイテムを管理するなど、ゲーム用ウォレットです。"},metamask:{heading:"MetaMask",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},walletconnect:{heading:"その他のウォレット",description:"MetaMaskを含む任意のブロックチェーンモバイルウォレットに接続できます。"},browserwallet:{heading:"ブラウザウォレット",description:"ブロックチェーンアプリケーションおよびweb3にアクセスするためのデジタルウォレット。"},recommended:"推奨"},drawers:{feesBreakdown:{heading:"手数料の内訳",total:"総手数料",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"ガス手数料"},approvalFee:{label:"承認手数料"},swapGasFee:{label:"ガス手数料"},swapSecondaryFee:{label:"{{amount}} スワップ手数料(見積もりに含まれる)"},serviceFee:{depositLabel:"zkEVM ガス手数料",withdrawLabel:"Ethereum ガス手数料"}}},transactionFailed:{content:{heading1:"続行する前に、",heading2:"ウォレットで確認が必要です",body1:"MetaMaskのポップアップが表示されたら、",body2:"トランザクションに署名してください"},buttons:{retry:"了解",cancel:"閉じる"}},coinSelector:{option:{fiatPricePrefix:"約USD $"},noCoins:"ウォレットには選択可能なトークンがありません。"},notEnoughGas:{content:{heading:"{{token}}が不足しています",body:"この操作のガス手数料をカバーするには{{token}}残高が十分にありません。続行する前に、もっと{{token}}を追加する必要があります。"},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXトークンを追加する",copyAddress:"ウォレットアドレスをコピー",cancel:"閉じる"}},notEnoughImx:{content:{noImx:{heading:"スワップするにはIMXトークンが必要です",body:"スワップ手数料はIMXトークンで支払われるため、スワップを行う前にIMXトークンを追加する必要があります"},insufficientImx:{heading:"もっとIMXトークンが必要です",body:"指定された金額の手数料をカバーするために、もっとIMXトークンを追加する必要があります"}},buttons:{adjustAmount:"金額を調整",addMoreImx:"IMXトークンを追加する",cancel:"閉じる"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"ガス用",body1:"追加",body2:"あなたの宛先アカウントに追加するか、別のアカウントを選択してガスを支払います。宛先アカウントは変更されません。"},buttons:{retry:"別のアカウントでガスを支払う",dismiss:"閉じる"}},unableToSwap:{heading:"このトークンを交換できません",body:"このトークンペアリングは現在交換できません。別のものを選択してください",buttons:{cancel:"閉じる"}},networkSwitch:{heading:"あなたの{{wallet}}でネットワークを切り替える",manualSwitch:{body:"続行するにはモバイルウォレットを開き、{{chain}}ネットワークに切り替える必要があります"},controlledSwitch:{body:"{{chain}}ネットワークに切り替える必要があります"},switchButton:"{{chain}}に切り替える"},walletConnectionError:{unableToConnect:{heading:"接続できません",body:"ウォレットを確認してもう一度お試しください。または、閉じて別のオプションを試してください。",actionButtonText:"もう一度試す"},changedYourMind:{heading:"考えを変えましたか?",body:"ポップアップが有効になっていることを確認し、ウォレットのプロンプトに従って接続してください。",actionButtonText:"もう一度試す"}}}}},ko:{translation:{views:{CONNECT_WALLET:{body:{heading:"지갑 연결",content:"토큰과 수집품을 구매, 판매, 거래 및 보관하려면 디지털 지갑을 연결하거나 새 디지털 지갑을 만들어야 합니다. "},walletSelection:{heading:"지갑 선택"},nonPassportDrawer:{heading:"비 패스포트 사용자는 가스 비용으로 IMX가 필요합니다.",body1:"자금을 Immutable zkEVM으로 브리징하기 위해 <layerswapLink>Layerswap</layerswapLink>을 사용하는 것을 권장합니다. 리퓨엘이 켜져 있으면 IMX를 받을 수 있습니다.",body2:"또는 가스 비용이 없는 Immutable Passport로 쉽게 결제하고 플레이하세요.",buttonText:"어쨌든 진행"}},CONNECT_SUCCESS:{status:"연결이 안전함",action:"계속하기"},READY_TO_CONNECT:{header:{title:"연결 준비됨"},metamask:{body:{heading:"MetaMask에서 팝업을 확인하세요",content:"MetaMask 팝업의 안내에 따라 연결하세요"},footer:{buttonText1:"연결 준비됨",buttonText2:"다시 시도"}},passport:{body:{heading:"Immutable Passport로 연결",content:"Immutable Passport와 연결하기 위한 안내를 따르세요"},footer:{buttonText1:"계속",buttonText2:"다시 시도"}}},SWITCH_NETWORK:{eth:{heading:"{{networkName}} 네트워크로 전환해야 합니다",body:"MetaMask에서 네트워크 전환을 요청받게 됩니다. 필요할 때 다시 전환할 수 있습니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}},zkEVM:{heading:"Immutable zkEVM 네트워크로 전환하라는 요청을 받게 됩니다",body:"MetaMask 팝업에서 '승인'을 선택하고 전환하세요. 처음이라면 MetaMask에서 네트워크 추가를 요구할 수도 있습니다.",bodyWalletConnect:"지갑에서 팝업을 확인하여 전환하십시오. 처음이라면 지갑에서 네트워크 추가를 요청합니다.",button:{text:"전환 준비됨",retryText:"다시 시도"}}},ERROR_VIEW:{heading:"문제가 발생했습니다",body:["다시 시도하거나","지원팀에","도움을 요청하세요."],actionText:"다시 시도"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"귀하의 지역에서는 스왑이 가능하지 않습니다"},body:{swap:"자세한 정보는 <quickswapLink>Quickswap</quickswapLink> 웹사이트를 참조하십시오."}},LOADING_VIEW:{text:"로딩 중"},WALLET_BALANCES:{header:{title:"지갑"},networkStatus:{heading:"네트워크"},totalTokenBalance:{heading:"토큰",totalHeading:"가치"},tokenBalancesList:{noTokensFound:"토큰을 찾을 수 없습니다"},addCoins:"토큰 추가"},SETTINGS:{header:{title:"설정"},disconnectButton:{label:"지갑 연결 해제"},walletAddress:{label:"지갑 주소"},transferAssetsL1Warning:{heading:"이더리움에 있는 패스포트로 자산을 보내지 마세요",body:"패스포트는 아직 이더리움에 존재하지 않으므로 자금이 손실됩니다. Immutable zkEVM 또는 Immutable X에서만 전송하세요."}},COIN_INFO:{metamask:{heading:"토큰과 수집품은 네트워크에 고유합니다",body:"네트워크를 변경하여 토큰을 추가하거나 한 네트워크에서 다른 네트워크로 이동할 수 있습니다"},passport:{heading:"토큰과 수집품은 네트워크에 고유합니다",body1:"이 네트워크는 Immutable zkEVM이라고 합니다. 패스포트에 다른 토큰이 있어 여기에 표시되지 않는 경우, 다른 네트워크에 있을 수 있습니다.",body2:" 자세한 정보를 위해 우리의 FAQ를 방문하세요.",linkText:"FAQ 방문하기"}},SWAP:{header:{title:"토큰 교환"},content:{title:"무엇을 교환하고 싶으신가요?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},swapForm:{from:{label:"From",inputPlaceholder:"0",selectorTitle:"무엇을 교환하고 싶으신가요?"},to:{label:"To",inputPlaceholder:"0",selectorTitle:"무엇을 받으시겠습니까?"},buttonText:"교환"},fees:{title:"수수료 총액"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noFromTokenSelected:"교환할 토큰을 선택하세요",noToTokenSelected:"받을 토큰을 선택하세요"},success:{text:"성공",actionText:"계속하기"},failed:{text:"거래 거절됨",actionText:"다시 시도"},rejected:{text:"가격 급등",actionText:"검토하고 다시 시도하세요"},IN_PROGRESS:{loading:{text:"교환 진행 중"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"이제 거래를 확인하기만 하면 됩니다",body:"지갑의 안내를 따르세요."},footer:{buttonText:"확인",retryText:"다시 시도"}},approveSpending:{content:{metamask:{heading:"이 거래에 대한 지출 한도를 설정하라는 요청을 받게 될 것입니다",body:"이 거래 및 향후 거래를 위해 최소 {{amount}}을 입력한 후, 안내를 따르세요."},passport:{heading:"이 거래에 대한 지출 한도 승인을 받게 됩니다",body:"지출 한도를 승인하기 위해 지갑의 안내를 따르세요."}},footer:{buttonText:"알겠습니다",retryText:"다시 시도"},loading:{text:"지출 한도 승인 중"}}},ONRAMP:{header:{title:"토큰 추가"},initialLoadingText:"Transak으로 이동하는 중",IN_PROGRESS_LOADING:{loading:{text:"Transak가 주문을 처리 중입니다"}},IN_PROGRESS:{content:{heading:"주문 진행 중",body1:"완료되면 Transak에서 이메일을 받게 됩니다. 최대 3분이 소요될 수 있습니다.",body2:"이 창을 닫을 수 있으며, 완료되면 거래가 지갑에 반영됩니다."}},SUCCESS:{text:"토큰이 전달 중입니다",actionText:"완료"},FAIL:{text:"거래 실패",actionText:"다시 시도"}},TOP_UP_VIEW:{header:{title:"토큰을 어떻게 추가하시겠습니까?"},topUpOptions:{onramp:{heading:"토큰 구매"},debit:{heading:"직불 카드로 구매",caption:"토큰을 구매하는 권장 방법",subcaption:"수수료",disabledCaption:""},credit:{heading:"신용 카드로 구매",caption:"실패 및 요금 때문에 권장하지 않습니다",subcaption:"수수료",disabledCaption:""},swap:{heading:"이 네트워크에서 토큰 교환",caption:"불변 zkEVM 전용",subcaption:"수수료",disabledCaption:"귀하의 지역에서 사용할 수 없음"},bridge:{heading:"다른 지갑에서 토큰을 전송",caption:"불변 zkEVM 전용",subcaption:"수수료",disabledCaption:""},advanced:{heading:"다른 네트워크에서 토큰 브리지",caption:"여러 네트워크 및 CEX 옵션 사용 가능",subcaption:"수수료",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"숫자 계산 중"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"수량 x{{qty}}"},coinsDrawer:{header:"결제 수단...",caption1:"토큰",caption2:"잔액",divider:"더 많은 옵션",stepType:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불",delta:{SWAP:"{{symbol}} ≈ {{amount}} 교환",ONRAMP:"{{symbol}} ≈ {{amount}} 구매",BRIDGE:"{{symbol}} ≈ {{amount}} 이동",SUFFICIENT:"{{symbol}} {{amount}} 지불"}},fee:"교환 수수료 ~ {{symbol}} {{amount}}"},orderReview:{heading:"결제 요약",continue:"계속",payWith:{SWAP:"{{symbol}}로 스왑 및 결제하기",SUFFICIENT:"{{symbol}}로 결제"},balance:"잔액 {{amount}}"}},PAYMENT_METHODS:{header:{heading:"어떤 결제 방법을 원하시나요?"},options:{crypto:{heading:"토큰",caption:"지갑에 있는 토큰으로 지불하거나 카드로 토큰을 구매하세요",disabledCaption:"현재 이 구매에는 사용할 수 없습니다."},debit:{heading:"직불카드",caption:"카드로 결제하는 권장 방법입니다.",disabledCaption:"선택한 항목을 사용할 수 없습니다. 토큰 추가를 권장합니다. "},credit:{heading:"신용카드",caption:"은행에서 거래를 차단할 수 있으므로 권장하지 않습니다.",disabledCaption:"선택한 항목을 사용할 수 없습니다. 토큰 추가를 권장합니다. "}},topUp:{heading:"토큰을 추가해야 합니다",subheading:{both:"이 구매 및 가스를 포함하여 이를 커버하기 위해 {{erc20.value}} {{erc20.symbol}} 및 {{native.value}} {{native.symbol}}를 추가하십시오.",erc20:"다음 옵션 중 하나를 통해 균형에 {{erc20.value}} {{erc20.symbol}}를 추가하십시오.",native:"다음 옵션 중 하나를 통해 가스에 {{native.value}} {{native.symbol}}를 추가하십시오."}},loading:{ready1:"주문 수집 중",ready2:"지갑과 대화 중",ready3:"자산 준비 중",processing1:"결제 초기화 중",processing2:"자산 보호 중",processing3:"결제 완료 중"},handover:{initial:"주문 준비 중",approve:{before:"지갑에서 승인을 기다리고 있습니다",beforeWithCta:{heading:"토큰을 승인해 주세요",ctaButton:"지갑 열기"},pending:"승인을 기다리고 있습니다",after:"토큰이 아이템 구매 준비되었습니다"},execute:{before:"지갑에서 확인을 기다리고 있습니다",beforeWithCta:{heading:"이 구매를 확인해 주세요",ctaButton:"지갑 열기"},pending:"구매 확인을 기다리고 있습니다",after:"구매 처리 중"},success:"구매 완료",error:{heading:"구매를 완료할 수 없습니다"}},creditCardWarningDrawer:{heading:"신용카드보다는 체크카드 사용을 권장합니다",body:"이런 종류의 구매에 신용카드를 사용할 경우 대부분의 은행에서 현금 서비스 수수료를 부과하거나 거래를 전체적으로 차단할 수 있습니다.",ctaButton:"그래도 시도하기"}},PAY_WITH_COINS:{header:{heading:"코인으로 결제",caption:"지갑 안의 토큰 잔액을 사용하기"},button:{buyNow:"지금 구매"}},PAY_WITH_CARD:{screenTitle:"카드로 결제",loading:"Transak으로 이동하는 중"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"거래 실패",primaryAction:"다시 시도",secondaryAction:"세부 정보 보기"},SERVICE_BREAKDOWN:{description:"죄송합니다, 현재 지불 처리가 불가능합니다. 몇 분 후에 다시 시도하세요.",secondaryAction:"닫기"},PRODUCT_NOT_FOUND:{description:"죄송합니다, 이 상품은 더 이상 구매할 수 없습니다.",secondaryAction:"닫기"},INSUFFICIENT_STOCK:{description:"죄송합니다. 요청하신 수량은 재고가 없습니다. 더 적은 수량을 고려해 주십시오.",secondaryAction:"닫기"},TRANSAK_FAILED:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},WALLET_FAILED:{description:"죄송합니다, 지금은 이를 처리할 수 없습니다.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED_NO_FUNDS:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"돌아가기",secondaryAction:"닫기"},WALLET_REJECTED:{description:"거래를 진행하려면 지갑에서 거래 승인이 필요합니다.",primaryAction:"다시 시도",secondaryAction:"취소"},WALLET_POPUP_BLOCKED:{description:"계속 진행하려면 브라우저에서 팝업을 허용해야 합니다.",primaryAction:"이 문제를 해결했습니다. 다시 시도하세요.",secondaryAction:"취소"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"죄송합니다, 자금 이동 중 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"취소"},DEFAULT_ERROR:{description:"죄송합니다, 문제가 발생했습니다. 다시 시도하세요.",primaryAction:"다시 시도",secondaryAction:"닫기"},INVALID_PARAMETERS:{description:"죄송합니다. 주문을 처리할 수 없습니다. 고객으로부터의 정보가 누락되었습니다.",secondaryAction:"닫기"}}},SALE_SUCCESS:{text:"주문 완료",actionText:"계속"},WALLET_NETWORK_SELECTION:{layoutHeading:"이동",heading:"자금을 어디에서 어디로 이동하시겠습니까?",fromFormInput:{heading:"From",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑에서",networkSelectorHeading:"네트워크에서"},toFormInput:{heading:"To",selectDefaultText:"지갑과 네트워크를 선택하세요",walletSelectorHeading:"지갑으로",networkSelectorHeading:"To network"},submitButton:{text:"다음"}},BRIDGE_FORM:{header:{title:"토큰 이동"},fees:{title:"가스 요금",fiatPricePrefix:"≈ USD $"},content:{title:"얼마나 많이 이동하시겠습니까?",fiatPricePrefix:"약 USD",availableBalancePrefix:"사용 가능"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"무엇을 이동하고 싶으신가요?"},buttonText:"검토"},validation:{noAmountInputted:"금액을 입력해 주세요",insufficientBalance:"잔고가 부족합니다",noTokenSelected:"이동할 토큰을 선택하세요"}},BRIDGE_REVIEW:{layoutHeading:"이동",heading:"이렇게 보이면 괜찮으십니까?",fromLabel:{amountHeading:"이동 중",heading:"From"},toLabel:{heading:"To"},fees:{heading:"가스 요금"},submitButton:{buttonText:"이동 확인"},fiatPricePrefix:"≈ USD $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"거래 실패",actionText:"검토하고 다시 시도하세요"}},APPROVE_TRANSACTION:{content:{heading:"지갑에서 거래 승인",body:"지갑 팝업의 안내를 따라 확인하세요."},footer:{buttonText:"확인",retryText:"다시 시도"},loadingView:{text:"이동 시작 중"}},IN_PROGRESS:{heading:"이동 중",body1:"자금이 송금되었습니다. 수령까지 남은 시간은 20분 미만입니다. 로켓 아이콘을 클릭하여 진행 상황을 확인할 수 있습니다.",body2:"이 창을 닫아도 됩니다.",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"진행 중",passportDashboard:"전체 거래 내역을 확인하세요",status:{withdrawalPending:{actionButtonText:"계속",withdrawalDelayText:"이 이동은 일시 중지되었습니다. 돌아가세요",withdrawalReadyText:"토큰을 받으려면 조치가 필요합니다",caption:"일시중지됨"},inProgress:{heading:"진행 중",txnEstimate:"보통 20분 소요됩니다",stepInfo:"세부 정보 보기"},emptyState:{notConnected:{body:"트랜잭션을 보려면 지갑을 연결하세요",buttonText:"연결하다"}},noTransactions:{body:"여기까지 완료되었습니다.",passport:{body:"완료된 거래는",link:"패스포트"}}},changeWallet:{buttonText:"지갑 변경"},fiatPricePrefix:"≈ USD $",support:{body1:"도움이 필요하신가요?",body2:" 문의하기 ",body3:"지원팀",supportLink:"https://support.immutable.com/ko/",passport:{body1:"또는 귀하의 ",body2:"패스포트"}},walletSelection:{heading:"보려는 지갑 선택"}},CLAIM_WITHDRAWAL:{content:{heading:"프롬프트를 따라 토큰을 받으세요",body:"출금을 청구하려면 소액의 가스 수수료를 지불해야 합니다.",body2:"목적지 지갑 주소: "},footer:{buttonText:"계속",retryText:"다시 시도"},IN_PROGRESS:{loading:{text:"처리 중"},success:{text:"성공",actionText:"완료"},failure:{text:"거래 실패",actionText:"다시 시도"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap는 타사 앱입니다. Immutable은 Quickswap를 만들거나 소유하거나 운영하거나 배포하지 않습니다. 자세한 정보는 Quickswap의 웹사이트를 참조하십시오."}},wallets:{passport:{heading:"Immutable Passport",description:"카드로 결제하고, 아이템을 관리하는 게임용 지갑입니다."},metamask:{heading:"MetaMask",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},walletconnect:{heading:"기타 지갑",description:"MetaMask를 포함한 모든 블록체인 모바일 지갑에 연결할 수 있습니다."},browserwallet:{heading:"브라우저 지갑",description:"블록체인 애플리케이션 및 web3에 접근하는 디지털 지갑입니다."},recommended:"추천"},drawers:{feesBreakdown:{heading:"수수료 내역",total:"수수료 총액",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"가스 수수료"},approvalFee:{label:"승인 수수료"},swapGasFee:{label:"가스 수수료"},swapSecondaryFee:{label:"{{amount}} 스왑 수수료 (견적에 포함)"},serviceFee:{depositLabel:"zkEVM 가스 수수료",withdrawLabel:"Ethereum 가스 수수료"}}},transactionFailed:{content:{heading1:"계속하기 전에 지갑에서 확인이 필요합니다",heading2:"지갑 확인 필요",body1:"MetaMask 팝업이 나타날 때 거래에",body2:"서명을 꼭 하십시오"},buttons:{retry:"알겠습니다",cancel:"취소"}},coinSelector:{option:{fiatPricePrefix:"대략 USD $"},noCoins:"지갑에 선택할 수 있는 토큰이 없습니다"},notEnoughGas:{content:{heading:"가스를 위해 {{token}}이 더 필요합니다",body:"이 작업에 필요한 가스 수수료를 지불하기 위해 {{token}} 잔액이 너무 낮습니다. 계속하기 전에 더 추가해야 합니다."},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 토큰 추가 ",copyAddress:"지갑 주소 복사",cancel:"취소"}},notEnoughImx:{content:{noImx:{heading:"스왑하려면 IMX 토큰이 필요합니다",body:"스왑 수수료는 IMX 토큰으로 지불되므로 스왑을 하기 전에 IMX 토큰을 추가해야 합니다"},insufficientImx:{heading:"더 많은 IMX 토큰이 필요합니다",body:"지정된 금액에 대한 수수료를 충당하기 위해 더 많은 IMX 토큰을 추가해야 합니다"}},buttons:{adjustAmount:"금액 조정",addMoreImx:"IMX 토큰 추가 ",cancel:"취소"}},notEnoughEthWithdrawal:{content:{heading1:"부족함",heading2:"가스용",body1:"추가",body2:"목적지 계정에 추가하거나 다른 계정을 선택하여 가스를 지불하십시오. 목적지 계정은 그대로 유지됩니다."},buttons:{retry:"다른 계정으로 가스 지불",dismiss:"닫기"}},unableToSwap:{heading:"이 토큰을 교환할 수 없습니다",body:"이 토큰 페어링은 현재 교환할 수 없습니다. 다른 선택을 시도해 보세요",buttons:{cancel:"취소"}},networkSwitch:{heading:"귀하의 {{wallet}}에서 네트워크를 전환하세요",manualSwitch:{body:"계속하려면 모바일 지갑을 열고 {{chain}} 네트워크로 전환해야 합니다"},controlledSwitch:{body:"{{chain}} 네트워크로 전환해야 합니다"},switchButton:"{{chain}}로 전환하기"},walletConnectionError:{unableToConnect:{heading:"연결할 수 없음",body:"지갑을 확인한 후 다시 시도하거나 닫고 다른 옵션을 시도하세요.",actionButtonText:"다시 시도"},changedYourMind:{heading:"생각을 바꾸셨나요?",body:"팝업이 활성화되어 있는지 확인하고 지갑의 프롬프트를 따라 연결하세요.",actionButtonText:"다시 시도"}}}}},zh:{translation:{views:{CONNECT_WALLET:{body:{heading:"连接钱包",content:"您需要连接或创建一个数字钱包,以购买、出售、交易和存储您的代币和收藏品。"},walletSelection:{heading:"选择一个钱包"},nonPassportDrawer:{heading:"非Passport用户需要IMX来支付燃气费。",body1:"我们建议使用<layerswapLink>Layerswap</layerswapLink>将资金桥接到Immutable zkEVM,并打开加油功能,以便您能收到一些IMX。",body2:"或者,可以使用免燃气费的Immutable Passport轻松支付和玩游戏。",buttonText:"继续操作"}},CONNECT_SUCCESS:{status:"连接安全",action:"继续"},READY_TO_CONNECT:{header:{title:"连接"},metamask:{body:{heading:"检查MetaMask的弹窗",content:"按照MetaMask弹窗中的提示进行连接"},footer:{buttonText1:"准备好连接",buttonText2:"再试一次"}},passport:{body:{heading:"使用Immutable Passport连接",content:"按照提示使用Immutable Passport进行连接"},footer:{buttonText1:"继续",buttonText2:"再试一次"}}},SWITCH_NETWORK:{eth:{heading:"您需要切换到{{networkName}}网络",body:"MetaMask将提示您切换网络。需要时可以切回。",button:{text:"准备切换",retryText:"再试一次"}},zkEVM:{heading:"将要求您切换到Immutable zkEVM网络",body:"检查MetaMask的弹窗并选择'批准'以切换。如果这是第一次,MetaMask还会要求您添加网络。",bodyWalletConnect:"请检查您的钱包弹出窗口以进行切换。如果这是第一次,您的钱包还会要求您添加网络。",button:{text:"准备切换",retryText:"再试一次"}}},ERROR_VIEW:{heading:"出了些问题",body:["您可以再试一次或联系","支持","寻求帮助。"],actionText:"再试一次"},SERVICE_UNAVAILABLE_ERROR_VIEW:{heading:{swap:"您所在的地区不支持兑换"},body:{swap:"请参考<quickswapLink>Quickswap</quickswapLink>的网站了解更多信息。"}},LOADING_VIEW:{text:"加载中"},WALLET_BALANCES:{header:{title:"钱包"},networkStatus:{heading:"网络"},totalTokenBalance:{heading:"代币",totalHeading:"价值"},tokenBalancesList:{noTokensFound:"未发现代币"},addCoins:"添加代币"},SETTINGS:{header:{title:"设置"},disconnectButton:{label:"断开钱包连接"},walletAddress:{label:"钱包地址"},transferAssetsL1Warning:{heading:"不要将资产发送到以太坊上的Passport",body:"Passport尚未存在于以太坊上,因此您的资金将在那里丢失。仅在Immutable zkEVM或Immutable X上转账。"}},COIN_INFO:{metamask:{heading:"代币和收藏品是网络的原生物",body:"您可以切换网络来添加代币或将它们从一个网络移动到另一个网络"},passport:{heading:"代币和收藏品是网络的原生物",body1:"该网络称为 Immutable zkEVM。如果您的护照中有其他代币并且在这里看不到它们,它们可能在其他网络上。",body2:"欲了解更多信息,请",linkText:"访问我们的常见问题"}},SWAP:{header:{title:"交换代币"},content:{title:"您想要兑换什么?",fiatPricePrefix:"约合美元",availableBalancePrefix:"可用余额"},swapForm:{from:{label:"从",inputPlaceholder:"0",selectorTitle:"您想从哪里兑换?"},to:{label:"至",inputPlaceholder:"0",selectorTitle:"您想兑换到哪里?"},buttonText:"兑换"},fees:{title:"总费用"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noFromTokenSelected:"选择要交换的代币",noToTokenSelected:"选择要接收的代币"},success:{text:"成功",actionText:"继续"},failed:{text:"交易被拒绝",actionText:"再试一次"},rejected:{text:"价格飙升",actionText:"审查并重试"},IN_PROGRESS:{loading:{text:"交换进行中"}}},APPROVE_ERC20:{approveSwap:{content:{heading:"现在您只需要确认交易",body:"按照钱包中的提示操作。"},footer:{buttonText:"好的",retryText:"再试一次"}},approveSpending:{content:{metamask:{heading:"您将被要求为这笔交易设置支出上限",body:"至少输入{{amount}}用于本次及未来交易,然后按照提示操作。"},passport:{heading:"您将被要求批准这笔交易的支出上限",body:"按照钱包中的提示批准支出上限。"}},footer:{buttonText:"明白",retryText:"再试一次"},loading:{text:"批准支出上限"}}},ONRAMP:{header:{title:"添加代币"},initialLoadingText:"带您前往Transak",IN_PROGRESS_LOADING:{loading:{text:"Transak正在处理您的订单"}},IN_PROGRESS:{content:{heading:"订单进行中",body1:"当完成时,您将从Transak收到一封电子邮件。这可能需要长达3分钟的时间。",body2:"您可以关闭这个窗口,一旦交易完成,将会反映在您的钱包中。"}},SUCCESS:{text:"代币正在传送中",actionText:"完成"},FAIL:{text:"交易失败",actionText:"再试一次"}},TOP_UP_VIEW:{header:{title:"你想如何添加代币?"},topUpOptions:{onramp:{heading:"购买代币"},debit:{heading:"用借记卡购买",caption:"推荐的购买代币方法",subcaption:"费用",disabledCaption:""},credit:{heading:"用信用卡购买",caption:"由于失败和费用,不推荐使用",subcaption:"费用",disabledCaption:""},swap:{heading:"在此网络上交换代币",caption:"仅限不可变 zkEVM",subcaption:"费用",disabledCaption:"您所在的地区不可用"},bridge:{heading:"从另一个钱包转移代币",caption:"仅限不可变 zkEVM",subcaption:"费用",disabledCaption:""},advanced:{heading:"从另一个网络桥接代币",caption:"多种网络和CEX选项可用",subcaption:"费用",disabledCaption:""}}},ORDER_SUMMARY:{loading:{balances:"正在计算数字"},currency:{fiat:"≈ USD ${{amount}}",price:"{{symbol}} {{amount}}"},orderItem:{quantity:"数量 x{{qty}}"},coinsDrawer:{header:"支付方式…",caption1:"代币",caption2:"余额",divider:"更多选项",stepType:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}",delta:{SWAP:"交换 {{symbol}} ≈ {{amount}}",ONRAMP:"购买 {{symbol}} ≈ {{amount}}",BRIDGE:"移动 {{symbol}} ≈ {{amount}}",SUFFICIENT:"支付 {{symbol}} {{amount}}"}},fee:"交换费用 ~ {{symbol}} {{amount}}"},orderReview:{heading:"付款摘要",continue:"继续",payWith:{SWAP:"使用{{symbol}}进行交换和支付",SUFFICIENT:"使用{{symbol}}支付"},balance:"余额{{amount}}"}},PAYMENT_METHODS:{header:{heading:"您希望如何支付?"},options:{crypto:{heading:"代币",caption:"使用钱包里的代币付款,或用银行卡购买代币",disabledCaption:"目前无法进行此购买。"},debit:{heading:"借记卡",caption:"使用卡支付的推荐方式。",disabledCaption:"无法选择。我们建议添加代币。"},credit:{heading:"信用卡",caption:"不推荐使用,因为您的银行可能会阻止交易。",disabledCaption:"无法选择。我们建议添加代币。"}},topUp:{heading:"你需要添加一些代币",subheading:{both:"添加{{erc20.value}} {{erc20.symbol}}和{{native.value}} {{native.symbol}}以支付本次购买及燃气费。",erc20:"通过以下选项之一将{{erc20.value}} {{erc20.symbol}}添加到您的余额。",native:"通过以下选项之一,为燃气添加{{native.value}} {{native.symbol}}。"}},loading:{ready1:"正在收集您的订单",ready2:"正在与钱包交流",ready3:"正在准备资产",processing1:"正在初始化支付",processing2:"正在保护您的资产",processing3:"正在完成支付"},handover:{initial:"准备订单中",approve:{before:"等待您的钱包批准",beforeWithCta:{heading:"请批准您的代币",ctaButton:"打开钱包"},pending:"等待批准",after:"代币已准备好购买物品"},execute:{before:"等待您的钱包确认",beforeWithCta:{heading:"请确认此次购买",ctaButton:"打开钱包"},pending:"等待购买确认",after:"处理中"},success:"购买完成",error:{heading:"无法完成购买"}},creditCardWarningDrawer:{heading:"我们推荐使用借记卡而非信用卡",body:"在这类购买中使用信用卡时,大多数银行将收取现金预付费用或完全阻止交易。",ctaButton:"尝试一下"}},PAY_WITH_COINS:{header:{heading:"用您的硬币支付",caption:"使用您钱包中的代币余额"},button:{buyNow:"立即购买"}},PAY_WITH_CARD:{screenTitle:"用卡支付",loading:"带您前往Transak"},SALE_FAIL:{errors:{TRANSACTION_FAILED:{description:"交易失败",primaryAction:"再试一次",secondaryAction:"查看详情"},SERVICE_BREAKDOWN:{description:"抱歉,我们现在无法处理您的付款。请几分钟后再试。",secondaryAction:"关闭"},PRODUCT_NOT_FOUND:{description:"抱歉,所请求的数量缺货。请考虑购买较少数量。",secondaryAction:"关闭"},INSUFFICIENT_STOCK:{description:"抱歉,库存不足。请考虑购买较少数量。",secondaryAction:"关闭"},TRANSAK_FAILED:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},WALLET_FAILED:{description:"抱歉,我们现在无法处理。请返回。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED_NO_FUNDS:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"返回",secondaryAction:"关闭"},WALLET_REJECTED:{description:"您需要在钱包中批准交易才能继续。",primaryAction:"再试一次",secondaryAction:"取消"},WALLET_POPUP_BLOCKED:{description:"您需要允许浏览器中的弹出窗口才能继续。",primaryAction:"我已经解决了这个问题,再试一次",secondaryAction:"取消"},FUNDING_ROUTE_EXECUTE_ERROR:{description:"抱歉,转移资金时出错。请再试一次。",primaryAction:"再试一次",secondaryAction:"取消"},DEFAULT_ERROR:{description:"抱歉,出了点问题。请再试一次。",primaryAction:"再试一次",secondaryAction:"关闭"},INVALID_PARAMETERS:{description:"抱歉,我们无法处理您的订单。客户提供的信息不完整。",secondaryAction:"关闭"}}},SALE_SUCCESS:{text:"订单已完成",actionText:"继续"},WALLET_NETWORK_SELECTION:{layoutHeading:"转移资金",heading:"您想在哪两个地方之间转移资金?",fromFormInput:{heading:"从",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"来自钱包",networkSelectorHeading:"来自网络"},toFormInput:{heading:"至",selectDefaultText:"选择钱包和网络",walletSelectorHeading:"至钱包",networkSelectorHeading:"To network"},submitButton:{text:"下一步"}},BRIDGE_FORM:{header:{title:"移动代币"},fees:{title:"燃气费",fiatPricePrefix:"≈ 美元 $"},content:{title:"您想要转移多少金额?",fiatPricePrefix:"约美元",availableBalancePrefix:"可用余额"},bridgeForm:{from:{inputPlaceholder:"0",selectorTitle:"您想要转移什么?"},buttonText:"审阅"},validation:{noAmountInputted:"请输入金额",insufficientBalance:"余额不足",noTokenSelected:"选择要移动的代币"}},BRIDGE_REVIEW:{layoutHeading:"转移资金",heading:"这样看起来怎么样?",fromLabel:{amountHeading:"正在转移",heading:"从"},toLabel:{heading:"至"},fees:{heading:"燃气费"},submitButton:{buttonText:"确认转移"},fiatPricePrefix:"≈ 美元 $"},BRIDGE_FAILURE:{bridgeFailureText:{statusText:"交易失败",actionText:"审查并重试"}},APPROVE_TRANSACTION:{content:{heading:"在您的钱包中批准交易",body:"按照钱包弹出窗口中的提示进行确认。"},footer:{buttonText:"好的",retryText:"再试一次"},loadingView:{text:"开始转移"}},IN_PROGRESS:{heading:"转移进行中",body1:"您的资金已经发送,距离收到不到20分钟。您可以点击火箭图标返回并查看进展。",body2:"您可以关闭这个窗口。",transferHeading:"Funds transferred"},TRANSACTIONS:{layoutHeading:"进行中",passportDashboard:"在您的完整交易历史中查看",status:{withdrawalPending:{actionButtonText:"继续",withdrawalDelayText:"此操作已暂停,请返回",withdrawalReadyText:"需要采取措施来接收您的代币",caption:"已暂停"},inProgress:{heading:"进行中",txnEstimate:"通常需要20分钟",stepInfo:"查看详情"},emptyState:{notConnected:{body:"连接您的钱包以查看交易",buttonText:"连接"}},noTransactions:{body:"您已完成所有操作。",passport:{body:"在",link:"护照"}}},changeWallet:{buttonText:"更换钱包"},fiatPricePrefix:"≈ 美元 $",support:{body1:"需要帮助吗?",body2:" 联系 ",body3:"支持",supportLink:"https://support.immutable.com/en/",passport:{body1:"或在您的 ",body2:"护照"}},walletSelection:{heading:"选择要查看的钱包"}},CLAIM_WITHDRAWAL:{content:{heading:"按提示操作以接收您的代币",body:"您将被要求支付一笔小额燃气费以领取您的提款。",body2:"目标钱包地址:"},footer:{buttonText:"继续",retryText:"重试"},IN_PROGRESS:{loading:{text:"处理中"},success:{text:"成功",actionText:"完成"},failure:{text:"交易失败",actionText:"请重试"}}}},footers:{quickswapFooter:{disclaimerText:"Quickswap是第三方应用。Immutable不构建、拥有、操作或部署Quickswap。更多信息请参阅Quickswap的网站。"}},wallets:{passport:{heading:"Immutable Passport",description:"您的游戏钱包,可以用卡支付、管理物品等。"},metamask:{heading:"MetaMask",description:"用于访问区块链应用和web3的数字钱包。"},walletconnect:{heading:"其他钱包",description:"允许您连接任何区块链移动钱包,包括MetaMask。"},browserwallet:{heading:"浏览器钱包",description:"用于访问区块链应用和web3的数字钱包。"},recommended:"推荐"},drawers:{feesBreakdown:{heading:"费用分解",total:"费用总计",fees:{fiatPricePrefix:"USD $",gasFeeMove:{label:"气体费用"},approvalFee:{label:"批准费"},swapGasFee:{label:"气体费用"},swapSecondaryFee:{label:"{{amount}} 交换费(已计入报价)"},serviceFee:{depositLabel:"zkEVM 气体费用",withdrawLabel:"Ethereum 气体费用"}}},transactionFailed:{content:{heading1:"在继续前我们需要您在钱包中确认",heading2:"钱包确认",body1:"当MetaMask弹出时,请确保",body2:"签署交易"},buttons:{retry:"明白了",cancel:"关闭"}},coinSelector:{option:{fiatPricePrefix:"约美元 $"},noCoins:"您的钱包中没有可选择的代币。"},notEnoughGas:{content:{heading:"您需要更多{{token}}来支付燃气费",body:"您的{{token}}余额不足以支付此操作的燃气费,因此在继续之前,您需要添加更多{{token}}。"},buttons:{adjustAmount:"调整金额",addMoreImx:"添加 IMX 代币",copyAddress:"复制钱包地址",cancel:"关闭"}},notEnoughImx:{content:{noImx:{heading:"您需要IMX代币进行交换",body:"交换费用以IMX代币支付,因此在交换之前,您需要添加IMX代币"},insufficientImx:{heading:"您需要更多的IMX代币",body:"为了支付指定金额的费用,您需要添加更多的IMX代币"}},buttons:{adjustAmount:"调整金额",addMoreImx:"添加 IMX 代币",cancel:"关闭"}},notEnoughEthWithdrawal:{content:{heading1:"不足",heading2:"用于燃气",body1:"添加",body2:"到您的目标账户,或选择另一个账户支付燃气费。您的目标账户将保持不变。"},buttons:{retry:"使用另一个账户支付燃气费",dismiss:"取消"}},unableToSwap:{heading:"无法交换此代币",body:"这种代币配对当前无法交换。请尝试选择其他选项",buttons:{cancel:"关闭"}},networkSwitch:{heading:"在您的{{wallet}}中切换网络",manualSwitch:{body:"您需要打开您的移动钱包并切换到{{chain}}网络才能继续进行"},controlledSwitch:{body:"您需要切换到{{chain}}网络才能继续进行"},switchButton:"切换到{{chain}}"},walletConnectionError:{unableToConnect:{heading:"无法连接",body:"请检查您的钱包并重试,或关闭并尝试其他选项。",actionButtonText:"重试"},changedYourMind:{heading:"改变主意了吗?",body:"确保弹出窗口已启用,并按照钱包中的提示进行连接。",actionButtonText:"重试"}}}}}};var Ake;vSe.use(yke).use(zSe).init({fallbackLng:"en",resources:Eke,interpolation:{escapeValue:!1}});var xke=LTe;Ake=xke.createRoot,xke.hydrateRoot;const Oke="development",Cke="native",Ike=18,_ke=6,Pke=700,Ske="IMX",kke="ETH",Rke="https://support.immutable.com/en/",Nke={retryIntervalMs:1e4,retries:60,nonRetryable:e=>e?.data?.code>=500||e.type===aW.GET_ERC20_BALANCE_ERROR,nonRetryableSilently:e=>e.type===aW.WEB3_PROVIDER_ERROR},Mke={retryIntervalMs:1e4,retries:60,nonRetryableSilently:e=>!!e},Dke=qt.SANDBOX,Lke=BH.DARK;YH.METAMASK;const jke=3e4,Fke={[Oke]:"https://checkout-cdn.dev.immutable.com",[qt.SANDBOX]:"https://checkout-cdn.sandbox.immutable.com",[qt.PRODUCTION]:"https://checkout-cdn.immutable.com"},Bke={[Oke]:"https://testnet.axelarscan.io/gmp/",[qt.SANDBOX]:"https://testnet.axelarscan.io/gmp/",[qt.PRODUCTION]:"https://axelarscan.io/gmp/"},Uke={[Oke]:"https://passport.sandbox.immutable.com/",[qt.SANDBOX]:"https://passport.sandbox.immutable.com/",[qt.PRODUCTION]:"https://passport.immutable.com/"};qt.SANDBOX,qt.PRODUCTION;const zke=91e3;function Hke(e){return e&&Object.values(qt).includes(e)?e:Dke}function Wke(e,t){return t?"true"===t||"false"!==t&&e:e}const Vke=e=>e.isProduction?UH.ETHEREUM:UH.SEPOLIA,Gke=e=>e.isDevelopment?UH.IMTBL_ZKEVM_DEVNET:e.isProduction?UH.IMTBL_ZKEVM_MAINNET:UH.IMTBL_ZKEVM_TESTNET;UH.IMTBL_ZKEVM_DEVNET,UH.IMTBL_ZKEVM_TESTNET,UH.IMTBL_ZKEVM_MAINNET,UH.ETHEREUM,UH.SEPOLIA,UH.IMTBL_ZKEVM_DEVNET,UH.IMTBL_ZKEVM_MAINNET,UH.IMTBL_ZKEVM_TESTNET,UH.ETHEREUM,UH.SEPOLIA;const qke={[UH.IMTBL_ZKEVM_DEVNET]:zH.IMTBL_ZKEVM_DEVNET,[UH.IMTBL_ZKEVM_MAINNET]:zH.IMTBL_ZKEVM_MAINNET,[UH.IMTBL_ZKEVM_TESTNET]:zH.IMTBL_ZKEVM_TESTNET,[UH.ETHEREUM]:zH.ETHEREUM,[UH.SEPOLIA]:zH.SEPOLIA},Kke="IMTBL_WIDGET_PROVIDER_EVENT";var Xke;function Yke(e,t){e.provider.on(Xke.CHAIN_CHANGED,t)}function Zke(e,t){e.provider.removeListener(Xke.CHAIN_CHANGED,t)}function Jke(){window.dispatchEvent(new CustomEvent(Kke))}function Qke(e){var t;t=Jke,e.provider.removeListener(Xke.ACCOUNTS_CHANGED,t),Zke(e,Jke),function(e,t){e.provider.on(Xke.ACCOUNTS_CHANGED,t)}(e,Jke),Yke(e,Jke)}function $ke(e){const t=new CustomEvent(IH.IMTBL_WIDGETS_PROVIDER,{detail:{type:_H.PROVIDER_UPDATED,data:e}});void 0!==window&&window.dispatchEvent(t)}!function(e){e.CHAIN_CHANGED="chainChanged",e.ACCOUNTS_CHANGED="accountsChanged"}(Xke||(Xke={}));class eRe{checkout;targetId;reactRoot;widgetElement;properties;parameters;web3Provider;eventHandlers=new Map;eventHandlersFunction;eventTopic="";constructor(e,t){const n=this.getValidatedProperties(t);this.parameters={},this.checkout=e,this.properties=n,this.web3Provider=t?.provider,this.web3Provider&&Qke(this.web3Provider),this.setupProviderUpdatedListener(),this.setupDisconnectProviderListener(),this.setLanguage(t.config?.language)}async setLanguage(e){null!=e&&(await vSe.changeLanguage(e),console.log("Language changed:",e))}unmount(){this.parameters=this.getValidatedParameters({}),this.reactRoot?.unmount(),document.getElementById(this.targetId)?.replaceChildren(),this.reactRoot=void 0}mount(e,t){this.parameters=this.getValidatedParameters({...this.parameters??{},...t??{}}),this.targetId=e;const n=document.getElementById(e);this.widgetElement||(this.widgetElement=document.createElement("div")),0===n?.children.length?n?.appendChild(this.widgetElement):n?.replaceChildren(this.widgetElement),!this.reactRoot&&n&&this.widgetElement&&(this.reactRoot=Ake(this.widgetElement)),this.setLanguage(t?.language),this.render()}update(e){this.properties=this.getValidatedProperties({config:{...this.properties.config??{},...e.config??{}}}),e.provider&&console.warn("Updating a widget provider through the update() method is not supported yet"),this.setLanguage(e.config?.language),this.render()}addListener(e,t){this.eventHandlers.set(e,t),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)}removeListener(e){this.eventHandlers.delete(e),this.eventHandlersFunction&&(window.removeEventListener(this.eventTopic,this.eventHandlersFunction),window.removeEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction)),this.eventHandlers.size<=0||(this.eventHandlersFunction=e=>{const t=this.eventHandlers.get(e.detail.type);t&&t(e.detail.data)},window.addEventListener(this.eventTopic,this.eventHandlersFunction),window.addEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.eventHandlersFunction))}strongConfig(){return e={theme:this.properties.config?.theme,environment:this.checkout.config.environment,isOnRampEnabled:this.checkout.config.isOnRampEnabled,isSwapEnabled:this.checkout.config.isSwapEnabled,isBridgeEnabled:this.checkout.config.isBridgeEnabled},{theme:(t=e?.theme,t&&Object.values(BH).includes(t)?t:Lke),environment:Hke(e?.environment),isOnRampEnabled:Wke(!0,e?.isOnRampEnabled?.toString()),isSwapEnabled:Wke(!0,e?.isSwapEnabled?.toString()),isBridgeEnabled:Wke(!0,e?.isBridgeEnabled?.toString())};var e,t}setupProviderUpdatedListener(){window.addEventListener(IH.IMTBL_WIDGETS_PROVIDER,this.handleProviderUpdatedEvent);const e=this;window.addEventListener(Kke,(()=>e.handleEIP1193ProviderEvents(e)))}setupDisconnectProviderListener(){window.addEventListener(IH.IMTBL_WALLET_WIDGET_EVENT,this.handleDisconnectEvent)}handleEIP1193ProviderEvents(e){e.web3Provider&&(e.web3Provider=new Md(e.web3Provider.provider)),e.render()}handleProviderUpdatedEvent=e=>{const t=this;switch(e.detail.type){case _H.PROVIDER_UPDATED:{const n=e.detail.data;t.web3Provider=n.provider,this.render();break}}};handleDisconnectEvent=e=>{const t=this;if(e.detail.type===SH.DISCONNECT_WALLET)t.web3Provider=void 0,this.render()}}const tRe=oV.lazy((()=>Promise.resolve().then((function(){return Fqe}))));class nRe extends eRe{eventTopic=IH.IMTBL_CONNECT_WIDGET_EVENT;getValidatedProperties({config:e}){return{config:e}}getValidatedParameters(e){const t=e;return!e.targetChainId&&this.checkout.config.isProduction?t.targetChainId=UH.IMTBL_ZKEVM_MAINNET:e.targetChainId&&this.checkout.config.isProduction&&e.targetChainId!==UH.ETHEREUM&&e.targetChainId!==UH.IMTBL_ZKEVM_MAINNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.PRODUCTION} environment, defaulting to ${CPe(UH.IMTBL_ZKEVM_MAINNET)}, chainId ${UH.IMTBL_ZKEVM_MAINNET}`),t.targetChainId=UH.IMTBL_ZKEVM_MAINNET),e.targetChainId||this.checkout.config.environment!==qt.SANDBOX?e.targetChainId&&this.checkout.config.environment===qt.SANDBOX&&e.targetChainId!==UH.SEPOLIA&&e.targetChainId!==UH.IMTBL_ZKEVM_TESTNET&&(console.warn(`Cannot set targetChainId to ${e.targetChainId} in ${qt.SANDBOX} environment, defaulting to ${CPe(UH.IMTBL_ZKEVM_TESTNET)}, chainId ${UH.IMTBL_ZKEVM_TESTNET}`),t.targetChainId=UH.IMTBL_ZKEVM_TESTNET):t.targetChainId=UH.IMTBL_ZKEVM_TESTNET,e}render(){if(!this.reactRoot)return;const{t:e}=vSe;this.reactRoot.render(Eq(oV.StrictMode,{children:Eq(APe,{checkout:this.checkout,children:Eq(TAe,{id:"connect-container",config:this.strongConfig(),children:Eq(DPe,{children:Eq(aV.Suspense,{fallback:Eq(OPe,{loadingText:e("views.LOADING_VIEW.text")}),children:Eq(tRe,{config:this.strongConfig(),checkout:this.checkout,targetWalletRdns:this.parameters.targetWalletRdns,targetChainId:this.parameters.targetChainId,blocklistWalletRdns:this.parameters.blocklistWalletRdns})})})})})}))}}const rRe={width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",padding:"base.spacing.x4",paddingBottom:"base.spacing.x10"},iRe={maxHeight:"base.spacing.x20",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x5"},aRe={width:"base.icon.size.400"},oRe={display:"flex",flexDirection:"column",paddingX:"base.spacing.x4",paddingBottom:"base.spacing.x4"},sRe={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"base.spacing.x2",color:"base.color.text.body.primary"},cRe={display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",color:"base.color.text.body.secondary"};function uRe({actionText:e,onActionClick:t,hideActionButton:n=!1,loading:r=!1,variant:i="secondary"}){return Eq(P3,{testId:"footer-button-container",sx:rRe,children:!n&&Eq(T3,{testId:"footer-button",size:"large",sx:{width:"100%"},variant:i,disabled:r,onClick:t,children:r?Eq(T3.Icon,{icon:"Loading",sx:aRe}):e})})}const lRe=e=>({backgroundColor:e?"transparent":""}),dRe=(e=!1)=>({backgroundColor:e?"base.color.translucent.standard.200":""});var fRe;!function(e){e.LOADING_VIEW="LOADING_VIEW",e.ERROR_VIEW="ERROR_VIEW",e.SERVICE_UNAVAILABLE_ERROR_VIEW="SERVICE_UNAVAILABLE_ERROR_VIEW",e.TOP_UP_VIEW="TOP_UP_VIEW"}(fRe||(fRe={}));const pRe={view:{type:fRe.LOADING_VIEW},history:[]};var hRe;!function(e){e.UPDATE_VIEW="UPDATE_VIEW",e.GO_BACK="GO_BACK",e.GO_BACK_TO="GO_BACK_TO"}(hRe||(hRe={}));const mRe=aV.createContext({viewState:pRe,viewDispatch:()=>{}});mRe.displayName="ViewContext";const yRe=(e,t)=>{switch(t.payload.type){case hRe.UPDATE_VIEW:{const{view:n,currentViewData:r}=t.payload;n.type===fRe.ERROR_VIEW&&console.error(n.error);const{history:i}=e;return 0!==i.length&&i[i.length-1].type===n.type||(r&&(i[i.length-1]={...i[i.length-1],data:r}),i.push(n)),{...e,view:n,history:i}}case hRe.GO_BACK:{if(e.history.length<=1)return{...e};const t=e.history.slice(0,-1);return{...e,history:t,view:t[t.length-1]}}case hRe.GO_BACK_TO:{if(e.history.length<=1)return{...e};const{history:n}=e,r=[...n];let i=!1;for(let a=n.length-1;a>=0;a--){if(e.history[a].type===t.payload.view.type){i=!0;break}r.pop()}return i?{...e,history:r,view:r[r.length-1]}:{...e}}default:return e}};function bRe({title:e,showBack:t=!1,transparent:n=!1,onBackButtonClick:r,onCloseButtonClick:i,rightActions:a}){const{viewDispatch:o}=aV.useContext(mRe);return Aq(hoe,{testId:"header-navigation-container",sx:lRe(n),contentAlign:t?"center":"left",size:"small",children:[t&&Eq(hoe.LeftButtCon,{sx:dRe(n),icon:"ArrowBackward",iconVariant:"bold",onClick:()=>{r?r():(async()=>{o({payload:{type:hRe.GO_BACK}})})()},testId:"back-button"}),Eq(hoe.Title,{testId:"header-title",size:"small",children:e}),Aq(hoe.RightSlot,{children:[a,i&&Eq(s4,{iconVariant:"bold",sx:dRe(n),icon:"Close",onClick:i,testId:"close-button"})]})]})}const gRe={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},vRe={justifyContent:"flex-end"},wRe={position:"relative",height:"305px",width:"100%"};function TRe(){return Aq(P3,{sx:wRe,children:[Aq("svg",{width:"430",height:"306",viewBox:"0 0 430 306",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Eq("rect",{x:"-1",y:"0.978516",width:"446",height:"305",fill:"url(#paint0_linear_3034_48563)"}),Eq("defs",{children:Aq("linearGradient",{id:"paint0_linear_3034_48563",x1:"222",y1:"0.978516",x2:"222",y2:"305.979",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#01003F",stopOpacity:"0"}),Eq("stop",{offset:"1",stopColor:"#6B4292",stopOpacity:"0.432292"})]})})]}),Eq(P3,{sx:gRe,children:Aq("svg",{width:"174",height:"180",viewBox:"0 0 174 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Eq("path",{opacity:"0.5",d:"M135.919 70.8386C136.877 67.1564 136.676 62.3424 133.109 57.2929C129.543 52.2434 125.073 50.4446 121.282 50.116",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),Eq("path",{opacity:"0.5",d:"M128.95 72.1044C129.792 69.2107 129.738 65.4595 127.01 61.5982C124.283 57.7368 120.766 56.4311 117.757 56.2577",stroke:"#443F58",strokeLinecap:"round",strokeLinejoin:"round"}),Eq("rect",{x:"49.3672",y:"30.5654",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 49.3672 30.5654)",fill:"url(#paint0_linear_2795_41752)"}),Eq("g",{filter:"url(#filter0_d_2795_41752)",children:Eq("circle",{cx:"118.481",cy:"67.6248",r:"2.23855",transform:"rotate(54.7665 118.481 67.6248)",fill:"#D0D2E2"})}),Eq("path",{d:"M47.6489 31.7791L28.5344 45.2796C27.5854 45.9499 27.3595 47.2625 28.0297 48.2115L48.5554 77.2724L54.7482 38.184L50.5808 32.2837C49.9105 31.3347 48.5979 31.1088 47.6489 31.7791Z",fill:"#D9D9D9",fillOpacity:"0.1"}),Eq("line",{x1:"63.724",y1:"50.8925",x2:"41.1729",y2:"66.8203",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"67.0235",y1:"79.3011",x2:"38.1813",y2:"38.4654",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"55.9759",y1:"39.9228",x2:"33.4249",y2:"55.8506",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"71.0423",y1:"61.2538",x2:"48.4913",y2:"77.1816",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("rect",{x:"101.025",y:"103.704",width:"49.9943",height:"27.6088",rx:"2.10366",transform:"rotate(54.7665 101.025 103.704)",fill:"url(#paint1_linear_2795_41752)"}),Eq("line",{x1:"115.384",y1:"124.032",x2:"92.8331",y2:"139.96",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"118.684",y1:"152.44",x2:"89.8414",y2:"111.604",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"107.632",y1:"113.06",x2:"85.0811",y2:"128.988",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("line",{x1:"122.702",y1:"134.393",x2:"100.151",y2:"150.321",stroke:"#1E182A",strokeWidth:"0.525916"}),Eq("path",{d:"M96.3684 97.1098C97.0387 98.0588 96.8127 99.3715 95.8637 100.042L53.3683 130.056C50.5214 132.067 46.5834 131.389 44.5726 128.542L35.9266 116.301C33.9158 113.454 34.5936 109.516 37.4406 107.505L79.936 77.4907C80.8849 76.8204 82.1976 77.0464 82.8679 77.9953L96.3684 97.1098Z",fill:"url(#paint2_linear_2795_41752)"}),Eq("path",{d:"M123.831 88.136C124.166 88.6105 124.053 89.2668 123.578 89.6019L123.336 89.7733C113.846 96.476 100.719 94.2165 94.0166 84.7267L93.7517 84.3516C87.049 74.8617 89.3085 61.7351 98.7983 55.0325L99.041 54.8611C99.5154 54.526 100.172 54.6389 100.507 55.1134L123.831 88.136Z",fill:"url(#paint3_linear_2795_41752)"}),Aq("defs",{children:[Aq("filter",{id:"filter0_d_2795_41752",x:"114.664",y:"63.808",width:"7.63206",height:"7.63303",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Eq("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Eq("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"}),Eq("feMorphology",{radius:"0.525916",operator:"dilate",in:"SourceAlpha",result:"effect1_dropShadow_2795_41752"}),Eq("feOffset",{}),Eq("feGaussianBlur",{stdDeviation:"0.525916"}),Eq("feComposite",{in2:"hardAlpha",operator:"out"}),Eq("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.384314 0 0 0 0 0.4 0 0 0 0 0.580392 0 0 0 1 0"}),Eq("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2795_41752"}),Eq("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2795_41752",result:"shape"})]}),Aq("linearGradient",{id:"paint0_linear_2795_41752",x1:"53.8443",y1:"29.4462",x2:"98.6153",y2:"58.1742",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),Eq("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),Eq("stop",{offset:"1",stopColor:"#2D203D"})]}),Aq("linearGradient",{id:"paint1_linear_2795_41752",x1:"105.502",y1:"102.585",x2:"150.273",y2:"131.313",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#8395E5",stopOpacity:"0.44"}),Eq("stop",{offset:"0.526042",stopColor:"#989AD1",stopOpacity:"0.734583"}),Eq("stop",{offset:"1",stopColor:"#2D203D"})]}),Aq("linearGradient",{id:"paint2_linear_2795_41752",x1:"88.8945",y1:"89.2396",x2:"42.7826",y2:"120.454",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#7676A3"}),Eq("stop",{offset:"1",stopColor:"#EDEFF5"})]}),Aq("linearGradient",{id:"paint3_linear_2795_41752",x1:"112.599",y1:"72.2342",x2:"91.9662",y2:"86.3506",gradientUnits:"userSpaceOnUse",children:[Eq("stop",{stopColor:"#DEDFEB"}),Eq("stop",{offset:"0.916667",stopColor:"#656997"})]})]})]})})]})}const ERe={paddingX:"base.spacing.x4",paddingTop:"base.spacing.x10"},ARe={marginTop:"base.spacing.x3"},xRe={color:"base.color.text.body.secondary"};function ORe(e){const{heading:t,children:n}=e;return Aq(P3,{sx:ERe,children:[Eq(Hee,{testId:"simple-text-body__heading",size:"small",children:t}),Eq(P3,{sx:ARe,children:Eq(J7,{testId:"simple-text-body__body",size:"small",sx:xRe,children:n})})]})}function CRe({actionText:e,onActionClick:t,errorEventAction:n,errorEventActionLoading:r=!1,onCloseClick:i}){const{t:a}=Tke();"function"==typeof n&&n();return Eq(xPe,{header:Eq(bRe,{transparent:!0,onCloseButtonClick:i}),footer:Eq(uRe,{loading:r,actionText:e,onActionClick:()=>"function"==typeof t&&t()}),heroContent:Eq(TRe,{}),floatHeader:!0,testId:"error-view",children:Aq(ORe,{heading:a("views.ERROR_VIEW.heading"),children:[a("views.ERROR_VIEW.body",{returnObjects:!0})[0]," ",Eq(Iae,{size:"small",rc:Eq("a",{href:"https://support.immutable.com/en/"}),children:a("views.ERROR_VIEW.body",{returnObjects:!0})[1]})," ",a("views.ERROR_VIEW.body",{returnObjects:!0})[2]]})})}var IRe;!function(e){e.NOT_CONNECTED_NO_PROVIDER="NOT_CONNECTED_NO_PROVIDER",e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTED_WRONG_NETWORK="CONNECTED_WRONG_NETWORK",e.CONNECTED_WITH_NETWORK="CONNECTED_WITH_NETWORK",e.ERROR="ERROR",e.LOADING="LOADING"}(IRe||(IRe={}));const _Re={connectionStatus:IRe.LOADING,checkout:void 0,provider:void 0};var PRe;!function(e){e.UPDATE_CONNECTION_STATUS="UPDATE_CONNECTION_STATUS",e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER"}(PRe||(PRe={}));const SRe=aV.createContext({connectLoaderState:_Re,connectLoaderDispatch:()=>{}}),kRe=(e,t)=>{switch(t.payload.type){case PRe.UPDATE_CONNECTION_STATUS:return{...e,connectionStatus:t.payload.connectionStatus,deepLink:t.payload.deepLink};case PRe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case PRe.SET_PROVIDER:return{...e,provider:t.payload.provider};default:return e}},RRe={timx:"imx"},NRe=(e,t,n)=>e.chainId===Gke(n)?-1:e.chainId===Vke(n)?0:1,MRe=(e,t,n,r="0.00",i=2)=>{if(!e)return r;const a=RRe[t.toLowerCase()]||t.toLowerCase(),o=n.get(a);if(!o)return r;const s=parseFloat(e);return 0===parseFloat(e)||Number.isNaN(s)?r:((e,t=2)=>{const n=10**t;return(Math.round(e*n)/n).toFixed(t)})(s*o,i)},DRe=(e,t=!1)=>{const n="-.--";return e&&("0.00"!==e||t)?e:n},LRe=(e,t)=>{const n=e.indexOf(".");return parseFloat(e.substring(0,n+t+1)).toFixed(t)},jRe=(e,t=6)=>{const n=e.toString();if(-1===n.indexOf("."))return n;if("."===n[0]||0===parseInt(n[0],10)){let e=Math.min(t,6),r=LRe(n,e);if(0===parseFloat(r))for(;"0"===(r[r.length-1]||"")&&e<t&&(e+=1,r=LRe(n,e),"0"===(r[r.length-1]||"")););return r}let r=LRe(n,2);return r.endsWith(".00")&&(r=LRe(r,0)),r},FRe=e=>e===UH.IMTBL_ZKEVM_DEVNET||e===UH.IMTBL_ZKEVM_TESTNET||e===UH.IMTBL_ZKEVM_MAINNET,BRe=e=>e===UH.SEPOLIA||e===UH.ETHEREUM,URe=e=>!e||e.toLocaleLowerCase()===Cke;function zRe(e,t){return`${Fke[e??qt.PRODUCTION]}/v1/blob/img${t}`}function HRe(e,t){return`${Fke[e??qt.PRODUCTION]}/v1/blob/rive${t}`}function WRe(e,t){return zRe(e,`/chains/${t}.png`)}function VRe(e,t){return zRe(e,`/tokens/${t.toLowerCase()}.svg`)}function GRe(e,t){return t===BH.LIGHT?zRe(e,"/tokens/defaultonlight.svg"):zRe(e,"/tokens/defaultondark.svg")}function qRe(e,t=".....",n=5,r=4){return`${e.slice(0,n)}${t}${e.slice(-r)}`}function KRe(e,t){return e.toLowerCase()===t.toLowerCase()}const XRe={checkout:null,provider:null,passport:void 0,walletProviderInfo:null,walletProviderName:null,sendCloseEvent:()=>{}};var YRe;!function(e){e.SET_CHECKOUT="SET_CHECKOUT",e.SET_PROVIDER="SET_PROVIDER",e.SET_PASSPORT="SET_PASSPORT",e.SET_WALLET_PROVIDER_NAME="SET_WALLET_PROVIDER_NAME",e.SET_SEND_CLOSE_EVENT="SET_SEND_CLOSE_EVENT"}(YRe||(YRe={}));const ZRe=aV.createContext({connectState:XRe,connectDispatch:()=>{}});ZRe.displayName="ConnectContext";const JRe=(e,t)=>{switch(t.payload.type){case YRe.SET_CHECKOUT:return{...e,checkout:t.payload.checkout};case YRe.SET_PROVIDER:return{...e,provider:t.payload.provider};case YRe.SET_PASSPORT:return{...e,passport:t.payload.passport};case YRe.SET_WALLET_PROVIDER_NAME:return{...e,walletProviderName:t.payload.walletProviderName};case YRe.SET_SEND_CLOSE_EVENT:return{...e,sendCloseEvent:t.payload.sendCloseEvent};default:return e}};var QRe;function $Re({hideLogo:e}){return Eq(P3,{testId:"footer-logo-container",sx:iRe,children:!e&&Eq(T8,{testId:"footer-logo-image",logo:"ImmutableHorizontalLockup",sx:{width:"base.spacing.x25"}})})}function eNe({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=Tke(),a=zRe(t.config.environment??qt.PRODUCTION,"/walleterroryellow.svg");return Eq(yne,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:Aq(yne.Content,{testId:"unable-to-connect-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Aq(P3,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Eq(W9,{sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"},use:Eq("img",{src:a,alt:i("drawers.walletConnectionError.unableToConnect.heading")})}),Eq(s4,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),Aq(P3,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[Eq(Hee,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.heading")}),Eq(J7,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.unableToConnect.body")})]})]}),Eq(P3,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:Eq(T3,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.unableToConnect.actionButtonText")})})]})})}function tNe({visible:e,checkout:t,onCloseDrawer:n,onTryAgain:r}){const{t:i}=Tke(),a=zRe(t.config.environment??qt.PRODUCTION,"/walleterrorred.svg");return Eq(yne,{size:"threeQuarter",visible:e,onCloseDrawer:n,showHeaderBar:!1,children:Aq(yne.Content,{testId:"changed-your-mind-bottom-sheet",sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Aq(P3,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center"},children:[Eq(W9,{sx:{paddingTop:"base.spacing.x4",paddingBottom:"base.spacing.x9"},use:Eq("img",{src:a,alt:i("drawers.walletConnectionError.changedYourMind.heading")})}),Eq(s4,{icon:"Close",variant:"tertiary",sx:{pos:"absolute",top:"base.spacing.x5",left:"base.spacing.x5",backdropFilter:"blur(30px)"},onClick:n}),Aq(P3,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"base.spacing.x4",paddingX:"base.spacing.x6"},children:[Eq(Hee,{size:"medium",weight:"bold",sx:{textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.heading")}),Eq(J7,{size:"medium",weight:"regular",sx:{color:"base.color.text.body.secondary",textAlign:"center",paddingX:"base.spacing.x6"},children:i("drawers.walletConnectionError.changedYourMind.body")})]})]}),Eq(P3,{sx:{display:"flex",flexDirection:"column",paddingX:"base.spacing.x6",width:"100%"},children:Eq(T3,{size:"large",variant:"primary",sx:{width:"100%",marginBottom:"base.spacing.x10"},onClick:r,children:i("drawers.walletConnectionError.changedYourMind.actionButtonText")})})]})})}!function(e){e.CONNECT_WALLET="CONNECT_WALLET",e.PASSPORT="PASSPORT",e.SWITCH_NETWORK="SWITCH_NETWORK",e.SUCCESS="SUCCESS"}(QRe||(QRe={}));const nNe={minw:"16px",padding:"8px",display:"flex",bg:"base.color.translucent.standard.100",overflow:"hidden",borderRadius:"4px",objectFit:"cover",objectPosition:"center",backgroundColor:"base.color.translucent.standard.200",justifyContent:"center",alignItems:"center",flexShrink:0,width:"48px",height:"48px"},rNe={width:"auto",height:"100%",objectFit:"contain",objectPosition:"50% 50%"};function iNe({src:e,alt:t,sx:n={},...r}){return Eq(P3,{className:"FramedImage AspectRatioImage",sx:{...nNe,...n},rc:Eq("span",{}),...r,children:Eq("img",{src:e,alt:t,className:"CloudImage",style:O5(rNe),loading:"lazy"})})}function aNe(e){return!0===e?.provider?.isPassport}function oNe(e){return!0===e?.provider?.isMetaMask}function sNe(e){return!0===e?.provider?.isWalletConnect}function cNe(e,t){if(oNe(e))return YH.METAMASK.toString();if(aNe(e))return YH.PASSPORT.toString();if(sNe(e))return"walletconnect";if(t&&e){const n=t.find((t=>t.provider===e.provider));if(n)return n.info.name}return"Other"}function uNe(e){let t="";switch(e){case"com.immutable.passport":t="passport";break;case"io.metamask":t="metamask";break;case"com.coinbase.wallet":t="coinbase-wallet";break;default:t=e}return t}function lNe(e){return aNe(e)}async function dNe(e,t,n){let r=!1,i=t;try{const{isConnected:n}=await e.checkIsWalletConnected({provider:t});r=n}catch(e){throw console.error(e),e}if(!r||n)try{const{provider:a}=await e.connect({provider:t,requestWalletPermissions:n});i=a,r=!0}catch(e){throw e.type===aW.USER_REJECTED_REQUEST_ERROR&&console.log("User rejected request"),console.error(e),e}return i}function fNe({rc:e=Eq("span",{}),loading:t=!1,recommended:n=!1,providerDetail:r,onWalletItemClick:i}){const{t:a}=Tke(),{isSmallScreenMode:o}=function(){const{state:e}=I8((e=>e.width));return{isSmallScreenMode:"number"==typeof e&&e<uAe.breakpoint.medium}}(),[s,c]=aV.useState(!1),u=uNe(r.info.rdns),l=u===YH.PASSPORT||u===YH.METAMASK,d={marginLeft:"65px"};return Aq(nae,{rc:aV.cloneElement(e,{onClick:async()=>{if(!t){c(!0);try{await i(r)}finally{c(!1)}}}}),testId:`wallet-list-${r.info.rdns}`,size:"medium",emphasized:!0,sx:{marginBottom:"base.spacing.x1",position:"relative"},children:[Eq(iNe,{src:r.info.icon,alt:r.info.name,sx:{position:"absolute",left:"base.spacing.x3"}}),Aq(nae.Label,{size:"medium",sx:d,children:[n&&o&&Eq(see,{variant:"guidance",isAnimated:!1,badgeContent:a("wallets.recommended"),sx:{display:"inline-flex",marginBottom:"base.spacing.x1"}}),Eq(P3,{children:r.info.name})]}),!s&&Eq(nae.IntentIcon,{}),Eq(nae.Caption,{sx:{...d},children:l&&a(`wallets.${u}.description`)}),(n||s)&&!o&&Eq(nae.Badge,{variant:"guidance",isAnimated:s,badgeContent:s?"":a("wallets.recommended")})]})}const pNe=Symbol(),hNe=Object.getPrototypeOf,mNe=new WeakMap,yNe=e=>(e=>e&&(mNe.has(e)?mNe.get(e):hNe(e)===Object.prototype||hNe(e)===Array.prototype))(e)&&e[pNe]||null,bNe=(e,t=!0)=>{mNe.set(e,t)},gNe=e=>"object"==typeof e&&null!==e,vNe=new WeakMap,wNe=new WeakSet,[TNe]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>gNe(e)&&!wNe.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),i=new WeakMap,a=((e,t,n=r)=>{const o=i.get(e);if((null==o?void 0:o[0])===t)return o[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return bNe(s,!0),i.set(e,[t,s]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(s,t))return;const r=Reflect.get(e,t),i={value:r,enumerable:!0,configurable:!0};if(wNe.has(r))bNe(r,!1);else if(r instanceof Promise)delete i.value,i.get=()=>n(r);else if(vNe.has(r)){const[e,t]=vNe.get(r);i.value=a(e,t(),n)}Object.defineProperty(s,t,i)})),Object.preventExtensions(s)}),o=new WeakMap,s=[1,1],c=(r=>{if(!gNe(r))throw new Error("object required");const i=o.get(r);if(i)return i;let u=s[0];const l=new Set,d=(e,t=++s[0])=>{u!==t&&(u=t,l.forEach((n=>n(e,t))))};let f=s[1];const p=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},h=new Map,m=e=>{var t;const n=h.get(e);n&&(h.delete(e),null==(t=n[1])||t.call(n))},y=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),b={deleteProperty(e,t){const n=Reflect.get(e,t);m(t);const r=Reflect.deleteProperty(e,t);return r&&d(["delete",[t],n]),r},set(t,r,i,a){const s=Reflect.has(t,r),u=Reflect.get(t,r,a);if(s&&(e(u,i)||o.has(i)&&e(u,o.get(i))))return!0;m(r),gNe(i)&&(i=yNe(i)||i);let f=i;if(i instanceof Promise)i.then((e=>{i.status="fulfilled",i.value=e,d(["resolve",[r],e])})).catch((e=>{i.status="rejected",i.reason=e,d(["reject",[r],e])}));else{!vNe.has(i)&&n(i)&&(f=c(i));const e=!wNe.has(f)&&vNe.get(f);e&&((e,t)=>{if(h.has(e))throw new Error("prop listener already exists");if(l.size){const n=t[3](p(e));h.set(e,[t,n])}else h.set(e,[t])})(r,e)}return Reflect.set(t,r,f,a),d(["set",[r],i,u]),!0}},g=t(y,b);o.set(r,g);const v=[y,(e=++s[1])=>(f===e||l.size||(f=e,h.forEach((([t])=>{const n=t[1](e);n>u&&(u=n)}))),u),a,e=>{l.add(e),1===l.size&&h.forEach((([e,t],n)=>{if(t)throw new Error("remove already exists");const r=e[3](p(n));h.set(n,[e,r])}));return()=>{l.delete(e),0===l.size&&h.forEach((([e,t],n)=>{t&&(t(),h.set(n,[e]))}))}}];return vNe.set(g,v),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e);"value"in t&&(g[e]=r[e],delete t.value,delete t.writable),Object.defineProperty(y,e,t)})),g}))=>[c,vNe,wNe,e,t,n,r,i,a,o,s])();function ENe(e={}){return TNe(e)}function ANe(e,t,n){const r=vNe.get(e);let i;r||console.warn("Please use proxy object");const a=[],o=r[3];let s=!1;const c=o((e=>{a.push(e),n?t(a.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(a.splice(0))})))}));return s=!0,()=>{s=!1,c()}}const xNe=ENe({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ONe={state:xNe,subscribe:e=>ANe(xNe,(()=>e(xNe))),push(e,t){e!==xNe.view&&(xNe.view=e,t&&(xNe.data=t),xNe.history.push(e))},reset(e){xNe.view=e,xNe.history=[e]},replace(e){xNe.history.length>1&&(xNe.history[xNe.history.length-1]=e,xNe.view=e)},goBack(){if(xNe.history.length>1){xNe.history.pop();const[e]=xNe.history.slice(-1);xNe.view=e}},setData(e){xNe.data=e}},CNe={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>CNe.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return CNe.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,n){if(CNe.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,n){if(!CNe.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);return`${r}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(CNe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(CNe.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(CNe.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(CNe.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=ONe.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},INe=ENe({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),_Ne={state:INe,subscribe:e=>ANe(INe.events,(()=>e(function(e,t){const n=vNe.get(e);n||console.warn("Please use proxy object");const[r,i,a]=n;return a(r,i(),t)}(INe.events[INe.events.length-1])))),initialize(){INe.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(INe.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){INe.connectedWalletId=e},click(e){if(INe.enabled){const t={type:"CLICK",name:e.name,userSessionId:INe.userSessionId,timestamp:Date.now(),data:e};INe.events.push(t)}},track(e){if(INe.enabled){const t={type:"TRACK",name:e.name,userSessionId:INe.userSessionId,timestamp:Date.now(),data:e};INe.events.push(t)}},view(e){if(INe.enabled){const t={type:"VIEW",name:e.name,userSessionId:INe.userSessionId,timestamp:Date.now(),data:e};INe.events.push(t)}}},PNe=ENe({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),SNe={state:PNe,subscribe:e=>ANe(PNe,(()=>e(PNe))),setChains(e){PNe.chains=e},setWalletConnectUri(e){PNe.walletConnectUri=e},setIsCustomDesktop(e){PNe.isCustomDesktop=e},setIsCustomMobile(e){PNe.isCustomMobile=e},setIsDataLoaded(e){PNe.isDataLoaded=e},setIsUiLoaded(e){PNe.isUiLoaded=e},setIsAuth(e){PNe.isAuth=e}},kNe=ENe({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),RNe={state:kNe,subscribe:e=>ANe(kNe,(()=>e(kNe))),setConfig(e){var t,n;_Ne.initialize(),SNe.setChains(e.chains),SNe.setIsAuth(Boolean(e.enableAuthMode)),SNe.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),SNe.setIsCustomDesktop(Boolean(null==(n=e.desktopWallets)?void 0:n.length)),CNe.setModalVersionInStorage(),Object.assign(kNe,e)}};var NNe=Object.defineProperty,MNe=Object.getOwnPropertySymbols,DNe=Object.prototype.hasOwnProperty,LNe=Object.prototype.propertyIsEnumerable,jNe=(e,t,n)=>t in e?NNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const FNe="https://explorer-api.walletconnect.com",BNe="wcm",UNe="js-2.6.2";async function zNe(e,t){const n=((e,t)=>{for(var n in t||(t={}))DNe.call(t,n)&&jNe(e,n,t[n]);if(MNe)for(var n of MNe(t))LNe.call(t,n)&&jNe(e,n,t[n]);return e})({sdkType:BNe,sdkVersion:UNe},t),r=new URL(e,FNe);return r.searchParams.append("projectId",RNe.state.projectId),Object.entries(n).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const HNe={getDesktopListings:async e=>zNe("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>zNe("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>zNe("/w3m/v1/getInjectedListings",e),getAllListings:async e=>zNe("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${FNe}/w3m/v1/getWalletImage/${e}?projectId=${RNe.state.projectId}&sdkType=${BNe}&sdkVersion=${UNe}`,getAssetImageUrl:e=>`${FNe}/w3m/v1/getAssetImage/${e}?projectId=${RNe.state.projectId}&sdkType=${BNe}&sdkVersion=${UNe}`};var WNe=Object.defineProperty,VNe=Object.getOwnPropertySymbols,GNe=Object.prototype.hasOwnProperty,qNe=Object.prototype.propertyIsEnumerable,KNe=(e,t,n)=>t in e?WNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const XNe=CNe.isMobile(),YNe=ENe({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ZNe={state:YNe,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=RNe.state;if("NONE"===e||"ALL"===t&&!e)return YNe.recomendedWallets;if(CNe.isArray(e)){const t={recommendedIds:e.join(",")},{listings:n}=await HNe.getAllListings(t),r=Object.values(n);r.sort(((t,n)=>e.indexOf(t.id)-e.indexOf(n.id))),YNe.recomendedWallets=r}else{const{chains:e,isAuth:n}=SNe.state,r=e?.join(","),i=CNe.isArray(t),a={page:1,sdks:n?"auth_v1":void 0,entries:CNe.RECOMMENDED_WALLET_AMOUNT,chains:r,version:2,excludedIds:i?t.join(","):void 0},{listings:o}=XNe?await HNe.getMobileListings(a):await HNe.getDesktopListings(a);YNe.recomendedWallets=Object.values(o)}return YNe.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var n in t||(t={}))GNe.call(t,n)&&KNe(e,n,t[n]);if(VNe)for(var n of VNe(t))qNe.call(t,n)&&KNe(e,n,t[n]);return e})({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=RNe.state,{recomendedWallets:i}=YNe;if("ALL"===r)return YNe.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):CNe.isArray(n)&&(t.excludedIds=n.join(",")),CNe.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),SNe.state.isAuth&&(t.sdks="auth_v1");const{page:a,search:o}=e,{listings:s,total:c}=XNe?await HNe.getMobileListings(t):await HNe.getDesktopListings(t),u=Object.values(s),l=o?"search":"wallets";return YNe[l]={listings:[...YNe[l].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl:e=>HNe.getWalletImageUrl(e),getAssetImageUrl:e=>HNe.getAssetImageUrl(e),resetSearch(){YNe.search={listings:[],total:0,page:1}}},JNe=ENe({open:!1}),QNe={state:JNe,subscribe:e=>ANe(JNe,(()=>e(JNe))),open:async e=>new Promise((t=>{const{isUiLoaded:n,isDataLoaded:r}=SNe.state;if(CNe.removeWalletConnectDeepLink(),SNe.setWalletConnectUri(e?.uri),SNe.setChains(e?.chains),ONe.reset("ConnectWallet"),n&&r)JNe.open=!0,t();else{const e=setInterval((()=>{const n=SNe.state;n.isUiLoaded&&n.isDataLoaded&&(clearInterval(e),JNe.open=!0,t())}),200)}})),close(){JNe.open=!1}};var $Ne=Object.defineProperty,eMe=Object.getOwnPropertySymbols,tMe=Object.prototype.hasOwnProperty,nMe=Object.prototype.propertyIsEnumerable,rMe=(e,t,n)=>t in e?$Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const iMe=ENe({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),aMe={state:iMe,subscribe:e=>ANe(iMe,(()=>e(iMe))),setThemeConfig(e){const{themeMode:t,themeVariables:n}=e;t&&(iMe.themeMode=t),n&&(iMe.themeVariables=((e,t)=>{for(var n in t||(t={}))tMe.call(t,n)&&rMe(e,n,t[n]);if(eMe)for(var n of eMe(t))nMe.call(t,n)&&rMe(e,n,t[n]);return e})({},n))}},oMe=ENe({open:!1,message:"",variant:"success"}),sMe={state:oMe,subscribe:e=>ANe(oMe,(()=>e(oMe))),openToast(e,t){oMe.open=!0,oMe.message=e,oMe.variant=t},closeToast(){oMe.open=!1}};let cMe=class{constructor(e){this.openModal=QNe.open,this.closeModal=QNe.close,this.subscribeModal=QNe.subscribe,this.setTheme=aMe.setThemeConfig,aMe.setThemeConfig(e),RNe.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((function(){return L6e}));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),SNe.setIsUiLoaded(!0)}}};var uMe=Object.freeze({__proto__:null,WalletConnectModal:cMe});function lMe(){}function dMe(){dMe.init.call(this)}function fMe(e){return void 0===e._maxListeners?dMe.defaultMaxListeners:e._maxListeners}function pMe(e,t,n,r){var i,a,o;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]):(a=e._events=new lMe,e._eventsCount=0),o){if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(i=fMe(e))&&i>0&&o.length>i){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else o=a[t]=n,++e._eventsCount;return e}function hMe(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function mMe(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function yMe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}lMe.prototype=Object.create(null),dMe.EventEmitter=dMe,dMe.usingDomains=!1,dMe.prototype.domain=void 0,dMe.prototype._events=void 0,dMe.prototype._maxListeners=void 0,dMe.defaultMaxListeners=10,dMe.init=function(){this.domain=null,dMe.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new lMe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},dMe.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},dMe.prototype.getMaxListeners=function(){return fMe(this)},dMe.prototype.emit=function(e){var t,n,r,i,a,o,s,c="error"===e;if(o=this._events)c=c&&null==o.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=o[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=yMe(e,r),a=0;a<r;++a)i[a].call(n)}(n,l,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,a=yMe(e,i),o=0;o<i;++o)a[o].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var a=e.length,o=yMe(e,a),s=0;s<a;++s)o[s].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,a){if(t)e.call(n,r,i,a);else for(var o=e.length,s=yMe(e,o),c=0;c<o;++c)s[c].call(n,r,i,a)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),a=1;a<r;a++)i[a-1]=arguments[a];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,a=yMe(e,i),o=0;o<i;++o)a[o].apply(n,r)}(n,l,this,i)}return!0},dMe.prototype.addListener=function(e,t){return pMe(this,e,t,!1)},dMe.prototype.on=dMe.prototype.addListener,dMe.prototype.prependListener=function(e,t){return pMe(this,e,t,!0)},dMe.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,hMe(this,e,t)),this},dMe.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,hMe(this,e,t)),this},dMe.prototype.removeListener=function(e,t){var n,r,i,a,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new lMe:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new lMe,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,o||t)}return this},dMe.prototype.off=function(e,t){return this.removeListener(e,t)},dMe.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new lMe,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new lMe:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),a=0;a<i.length;++a)"removeListener"!==(r=i[a])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new lMe,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},dMe.prototype.listeners=function(e){var t,n,r=this._events;return n=r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[],n},dMe.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):mMe.call(e,t)},dMe.prototype.listenerCount=mMe,dMe.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var bMe=Object.freeze({__proto__:null,EventEmitter:dMe,default:dMe}),gMe={},vMe={},wMe={},TMe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(TMe),Object.defineProperty(wMe,"__esModule",{value:!0});var EMe=TMe;function AMe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function xMe(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function OMe(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function CMe(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function IMe(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function _Me(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function PMe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function SMe(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function kMe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),PMe(e/4294967296>>>0,t,n),PMe(e>>>0,t,n+4),t}function RMe(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),SMe(e>>>0,t,n),SMe(e/4294967296>>>0,t,n+4),t}wMe.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},wMe.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},wMe.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},wMe.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},wMe.writeUint16BE=AMe,wMe.writeInt16BE=AMe,wMe.writeUint16LE=xMe,wMe.writeInt16LE=xMe,wMe.readInt32BE=OMe,wMe.readUint32BE=CMe,wMe.readInt32LE=IMe,wMe.readUint32LE=_Me,wMe.writeUint32BE=PMe,wMe.writeInt32BE=PMe,wMe.writeUint32LE=SMe,wMe.writeInt32LE=SMe,wMe.readInt64BE=function(e,t){void 0===t&&(t=0);var n=OMe(e,t),r=OMe(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},wMe.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*CMe(e,t)+CMe(e,t+4)},wMe.readInt64LE=function(e,t){void 0===t&&(t=0);var n=IMe(e,t);return 4294967296*IMe(e,t+4)+n-4294967296*(n>>31)},wMe.readUint64LE=function(e,t){void 0===t&&(t=0);var n=_Me(e,t);return 4294967296*_Me(e,t+4)+n},wMe.writeUint64BE=kMe,wMe.writeInt64BE=kMe,wMe.writeUint64LE=RMe,wMe.writeInt64LE=RMe,wMe.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,a=e/8+n-1;a>=n;a--)r+=t[a]*i,i*=256;return r},wMe.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,a=n;a<n+e/8;a++)r+=t[a]*i,i*=256;return r},wMe.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!EMe.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,a=e/8+r-1;a>=r;a--)n[a]=t/i&255,i*=256;return n},wMe.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!EMe.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,a=r;a<r+e/8;a++)n[a]=t/i&255,i*=256;return n},wMe.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},wMe.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},wMe.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},wMe.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},wMe.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},wMe.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},wMe.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},wMe.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var NMe={};Object.defineProperty(NMe,"__esModule",{value:!0}),NMe.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(vMe,"__esModule",{value:!0});var MMe=wMe,DMe=NMe,LMe=20;function jMe(e,t,n){for(var r=1634760805,i=857760878,a=2036477234,o=1797285236,s=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],d=n[19]<<24|n[18]<<16|n[17]<<8|n[16],f=n[23]<<24|n[22]<<16|n[21]<<8|n[20],p=n[27]<<24|n[26]<<16|n[25]<<8|n[24],h=n[31]<<24|n[30]<<16|n[29]<<8|n[28],m=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],g=t[15]<<24|t[14]<<16|t[13]<<8|t[12],v=r,w=i,T=a,E=o,A=s,x=c,O=u,C=l,I=d,_=f,P=p,S=h,k=m,R=y,N=b,M=g,D=0;D<LMe;D+=2)A=(A^=I=I+(k=(k^=v=v+A|0)>>>16|k<<16)|0)>>>20|A<<12,x=(x^=_=_+(R=(R^=w=w+x|0)>>>16|R<<16)|0)>>>20|x<<12,O=(O^=P=P+(N=(N^=T=T+O|0)>>>16|N<<16)|0)>>>20|O<<12,C=(C^=S=S+(M=(M^=E=E+C|0)>>>16|M<<16)|0)>>>20|C<<12,O=(O^=P=P+(N=(N^=T=T+O|0)>>>24|N<<8)|0)>>>25|O<<7,C=(C^=S=S+(M=(M^=E=E+C|0)>>>24|M<<8)|0)>>>25|C<<7,x=(x^=_=_+(R=(R^=w=w+x|0)>>>24|R<<8)|0)>>>25|x<<7,A=(A^=I=I+(k=(k^=v=v+A|0)>>>24|k<<8)|0)>>>25|A<<7,x=(x^=P=P+(M=(M^=v=v+x|0)>>>16|M<<16)|0)>>>20|x<<12,O=(O^=S=S+(k=(k^=w=w+O|0)>>>16|k<<16)|0)>>>20|O<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>16|R<<16)|0)>>>20|C<<12,A=(A^=_=_+(N=(N^=E=E+A|0)>>>16|N<<16)|0)>>>20|A<<12,C=(C^=I=I+(R=(R^=T=T+C|0)>>>24|R<<8)|0)>>>25|C<<7,A=(A^=_=_+(N=(N^=E=E+A|0)>>>24|N<<8)|0)>>>25|A<<7,O=(O^=S=S+(k=(k^=w=w+O|0)>>>24|k<<8)|0)>>>25|O<<7,x=(x^=P=P+(M=(M^=v=v+x|0)>>>24|M<<8)|0)>>>25|x<<7;MMe.writeUint32LE(v+r|0,e,0),MMe.writeUint32LE(w+i|0,e,4),MMe.writeUint32LE(T+a|0,e,8),MMe.writeUint32LE(E+o|0,e,12),MMe.writeUint32LE(A+s|0,e,16),MMe.writeUint32LE(x+c|0,e,20),MMe.writeUint32LE(O+u|0,e,24),MMe.writeUint32LE(C+l|0,e,28),MMe.writeUint32LE(I+d|0,e,32),MMe.writeUint32LE(_+f|0,e,36),MMe.writeUint32LE(P+p|0,e,40),MMe.writeUint32LE(S+h|0,e,44),MMe.writeUint32LE(k+m|0,e,48),MMe.writeUint32LE(R+y|0,e,52),MMe.writeUint32LE(N+b|0,e,56),MMe.writeUint32LE(M+g|0,e,60)}function FMe(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var a,o;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");o=(a=new Uint8Array(16)).length-t.length,a.set(t,o)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");a=t,o=i}for(var s=new Uint8Array(64),c=0;c<n.length;c+=64){jMe(s,a,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^s[u-c];BMe(a,0,o)}return DMe.wipe(s),0===i&&DMe.wipe(a),r}function BMe(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}vMe.streamXOR=FMe,vMe.stream=function(e,t,n,r){return void 0===r&&(r=0),DMe.wipe(n),FMe(e,t,n,n,r)};var UMe={},zMe={};function HMe(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(zMe,"__esModule",{value:!0}),zMe.select=function(e,t,n){return~(e-1)&t|e-1&n},zMe.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},zMe.compare=HMe,zMe.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==HMe(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=zMe,n=NMe;e.DIGEST_LENGTH=16;var r=function(){function t(t){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 n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var a=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|a<<9);var o=t[8]|t[9]<<8;this._r[4]=255&(a>>>4|o<<12),this._r[5]=o>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(o>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],a=this._h[1],o=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],p=this._h[9],h=this._r[0],m=this._r[1],y=this._r[2],b=this._r[3],g=this._r[4],v=this._r[5],w=this._r[6],T=this._r[7],E=this._r[8],A=this._r[9];n>=16;){var x=e[t+0]|e[t+1]<<8;i+=8191&x;var O=e[t+2]|e[t+3]<<8;a+=8191&(x>>>13|O<<3);var C=e[t+4]|e[t+5]<<8;o+=8191&(O>>>10|C<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(C>>>7|I<<9);var _=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|_<<12),u+=_>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(_>>>14|P<<2);var S=e[t+12]|e[t+13]<<8;d+=8191&(P>>>11|S<<5);var k=e[t+14]|e[t+15]<<8,R=0,N=R;N+=i*h,N+=a*(5*A),N+=o*(5*E),N+=s*(5*T),R=(N+=c*(5*w))>>>13,N&=8191,N+=u*(5*v),N+=l*(5*g),N+=d*(5*b),N+=(f+=8191&(S>>>8|k<<8))*(5*y);var M=R+=(N+=(p+=k>>>5|r)*(5*m))>>>13;M+=i*m,M+=a*h,M+=o*(5*A),M+=s*(5*E),R=(M+=c*(5*T))>>>13,M&=8191,M+=u*(5*w),M+=l*(5*v),M+=d*(5*g),M+=f*(5*b),R+=(M+=p*(5*y))>>>13,M&=8191;var D=R;D+=i*y,D+=a*m,D+=o*h,D+=s*(5*A),R=(D+=c*(5*E))>>>13,D&=8191,D+=u*(5*T),D+=l*(5*w),D+=d*(5*v),D+=f*(5*g);var L=R+=(D+=p*(5*b))>>>13;L+=i*b,L+=a*y,L+=o*m,L+=s*h,R=(L+=c*(5*A))>>>13,L&=8191,L+=u*(5*E),L+=l*(5*T),L+=d*(5*w),L+=f*(5*v);var j=R+=(L+=p*(5*g))>>>13;j+=i*g,j+=a*b,j+=o*y,j+=s*m,R=(j+=c*h)>>>13,j&=8191,j+=u*(5*A),j+=l*(5*E),j+=d*(5*T),j+=f*(5*w);var F=R+=(j+=p*(5*v))>>>13;F+=i*v,F+=a*g,F+=o*b,F+=s*y,R=(F+=c*m)>>>13,F&=8191,F+=u*h,F+=l*(5*A),F+=d*(5*E),F+=f*(5*T);var B=R+=(F+=p*(5*w))>>>13;B+=i*w,B+=a*v,B+=o*g,B+=s*b,R=(B+=c*y)>>>13,B&=8191,B+=u*m,B+=l*h,B+=d*(5*A),B+=f*(5*E);var U=R+=(B+=p*(5*T))>>>13;U+=i*T,U+=a*w,U+=o*v,U+=s*g,R=(U+=c*b)>>>13,U&=8191,U+=u*y,U+=l*m,U+=d*h,U+=f*(5*A);var z=R+=(U+=p*(5*E))>>>13;z+=i*E,z+=a*T,z+=o*w,z+=s*v,R=(z+=c*g)>>>13,z&=8191,z+=u*b,z+=l*y,z+=d*m,z+=f*h;var H=R+=(z+=p*(5*A))>>>13;H+=i*A,H+=a*E,H+=o*T,H+=s*w,R=(H+=c*v)>>>13,H&=8191,H+=u*g,H+=l*b,H+=d*y,H+=f*m,i=N=8191&(R=(R=((R+=(H+=p*h)>>>13)<<2)+R|0)+(N&=8191)|0),a=M+=R>>>=13,o=D&=8191,s=L&=8191,c=j&=8191,u=F&=8191,l=B&=8191,d=U&=8191,f=z&=8191,p=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=a,this._h[2]=o,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=p},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,a,o=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,o[0]=this._h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this._h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(r=~r,a=0;a<10;a++)this._h[a]=this._h[a]&r|o[a];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,a=1;a<8;a++)i=(this._h[a]+this._pad[a]|0)+(i>>>16)|0,this._h[a]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(UMe),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=vMe,n=UMe,r=NMe,i=wMe,a=zMe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var o=new Uint8Array(16),s=function(){function s(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return s.prototype.seal=function(e,n,i,a){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var s=new Uint8Array(32);t.stream(this._key,o,s,4);var c,u=n.length+this.tagLength;if(a){if(a.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=a}else c=new Uint8Array(u);return t.streamXOR(this._key,o,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),i),r.wipe(o),c},s.prototype.open=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);t.stream(this._key,s,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!a.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,d=n.length-this.tagLength;if(o){if(o.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");l=o}else l=new Uint8Array(d);return t.streamXOR(this._key,s,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(s),l},s.prototype.clean=function(){return r.wipe(this._key),this},s.prototype._authenticate=function(e,t,a,s){var c=new n.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(o.subarray(s.length%16))),c.update(a),a.length%16>0&&c.update(o.subarray(a.length%16));var u=new Uint8Array(8);s&&i.writeUint64LE(s.length,u),c.update(u),i.writeUint64LE(a.length,u),c.update(u);for(var l=c.digest(),d=0;d<l.length;d++)e[d]=l[d];c.clean(),r.wipe(l),r.wipe(u)},s}();e.ChaCha20Poly1305=s}(gMe);var WMe={},VMe={},GMe={};Object.defineProperty(GMe,"__esModule",{value:!0}),GMe.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(VMe,"__esModule",{value:!0});var qMe=GMe,KMe=zMe,XMe=NMe,YMe=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),qMe.isSerializableHash(this._inner)&&qMe.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),XMe.wipe(n)}return e.prototype.reset=function(){if(!qMe.isSerializableHash(this._inner)||!qMe.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){qMe.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),qMe.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!qMe.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!qMe.isSerializableHash(this._inner)||!qMe.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!qMe.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();VMe.HMAC=YMe,VMe.hmac=function(e,t,n){var r=new YMe(e,t);r.update(n);var i=r.digest();return r.clean(),i},VMe.equal=KMe.equal,Object.defineProperty(WMe,"__esModule",{value:!0});var ZMe=VMe,JMe=NMe,QMe=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=ZMe.hmac(this._hash,n,t);this._hmac=new ZMe.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&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(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),JMe.wipe(this._buffer),JMe.wipe(this._counter),this._bufpos=0},e}(),$Me=WMe.HKDF=QMe,eDe={},tDe={},nDe={};Object.defineProperty(nDe,"__esModule",{value:!0}),nDe.BrowserRandomSource=void 0;nDe.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var rDe={};Object.defineProperty(rDe,"__esModule",{value:!0}),rDe.NodeRandomSource=void 0;const iDe=NMe;rDe.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==AC){const e=CC;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,iDe.wipe)(t),n}},Object.defineProperty(tDe,"__esModule",{value:!0}),tDe.SystemRandomSource=void 0;const aDe=nDe,oDe=rDe;tDe.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new aDe.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new oDe.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=tDe,n=wMe,r=NMe;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const a=i(4,t),o=(0,n.readUint32LE)(a);return(0,r.wipe)(a),o};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(t,n=a,o=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let s="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),o);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(s+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return s}e.randomString=o,e.randomStringForEntropy=function(t,n=a,r=e.defaultRandomSource){return o(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(eDe);var sDe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=wMe,n=NMe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=a(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=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 a(e,n,r,a,o){for(;o>=64;){for(var s=n[0],c=n[1],u=n[2],l=n[3],d=n[4],f=n[5],p=n[6],h=n[7],m=0;m<16;m++){var y=a+4*m;e[m]=t.readUint32BE(r,y)}for(m=16;m<64;m++){var b=e[m-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,v=((b=e[m-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[m]=(g+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++){g=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&p)|0)+(h+(i[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;h=p,p=f,f=d,d=l+g|0,l=u,u=c,c=s,s=g+v|0}n[0]+=s,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=d,n[5]+=f,n[6]+=p,n[7]+=h,a+=64,o-=64}return a}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(sDe);var cDe={};function uDe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function lDe(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?uDe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function dDe(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const n=lDe(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return uDe(n)}!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=eDe,n=NMe;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const a=r([56129,1]);function o(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function s(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,_=0,P=0,S=0,k=0,R=0,N=0,M=0,D=0,L=n[0],j=n[1],F=n[2],B=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],Z=n[14],J=n[15];r=t[0],a+=r*L,o+=r*j,s+=r*F,c+=r*B,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*Z,w+=r*J,r=t[1],o+=r*L,s+=r*j,c+=r*F,u+=r*B,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*Z,T+=r*J,r=t[2],s+=r*L,c+=r*j,u+=r*F,l+=r*B,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*Z,E+=r*J,r=t[3],c+=r*L,u+=r*j,l+=r*F,d+=r*B,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*Z,A+=r*J,r=t[4],u+=r*L,l+=r*j,d+=r*F,f+=r*B,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*Z,x+=r*J,r=t[5],l+=r*L,d+=r*j,f+=r*F,p+=r*B,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*Z,O+=r*J,r=t[6],d+=r*L,f+=r*j,p+=r*F,h+=r*B,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*Z,C+=r*J,r=t[7],f+=r*L,p+=r*j,h+=r*F,m+=r*B,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*Z,I+=r*J,r=t[8],p+=r*L,h+=r*j,m+=r*F,y+=r*B,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*Z,_+=r*J,r=t[9],h+=r*L,m+=r*j,y+=r*F,b+=r*B,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,_+=r*Z,P+=r*J,r=t[10],m+=r*L,y+=r*j,b+=r*F,g+=r*B,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,_+=r*Y,P+=r*Z,S+=r*J,r=t[11],y+=r*L,b+=r*j,g+=r*F,v+=r*B,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,_+=r*X,P+=r*Y,S+=r*Z,k+=r*J,r=t[12],b+=r*L,g+=r*j,v+=r*F,w+=r*B,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,_+=r*K,P+=r*X,S+=r*Y,k+=r*Z,R+=r*J,r=t[13],g+=r*L,v+=r*j,w+=r*F,T+=r*B,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,_+=r*q,P+=r*K,S+=r*X,k+=r*Y,R+=r*Z,N+=r*J,r=t[14],v+=r*L,w+=r*j,T+=r*F,E+=r*B,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,_+=r*G,P+=r*q,S+=r*K,k+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,T+=r*j,E+=r*F,A+=r*B,x+=r*U,O+=r*z,C+=r*H,I+=r*W,_+=r*V,P+=r*G,S+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*_,p+=38*P,h+=38*S,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function d(e,t){l(e,t,t)}function f(e,t){const n=new Uint8Array(32),i=new Float64Array(80),f=r(),p=r(),h=r(),m=r(),y=r(),b=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)p[e]=i[e];f[0]=m[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;s(f,p,t),s(h,m,t),c(y,f,h),u(f,f,h),c(h,p,m),u(p,p,m),d(m,y),d(b,f),l(f,h,f),l(h,p,y),c(y,f,h),u(f,f,h),d(p,f),u(h,m,b),l(f,h,a),c(f,f,m),l(h,h,f),l(f,m,b),l(m,p,i),d(p,y),s(f,p,t),s(h,m,t)}for(let e=0;e<16;e++)i[e+16]=f[e],i[e+32]=h[e],i[e+48]=p[e],i[e+64]=m[e];const g=i.subarray(32),v=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)d(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(g,g),l(v,v,g);const w=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];o(i),o(i),o(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,s(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(w,v),w}function p(e){return f(e,i)}function h(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:p(n),secretKey:n}}e.scalarMult=f,e.scalarMultBase=p,e.generateKeyPairFromSeed=h,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=h(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.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 i=f(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}(cDe);var fDe=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},pDe=fDe;class hDe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class mDe{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return bDe(this,e)}}class yDe{constructor(e){this.decoders=e}or(e){return bDe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const bDe=(e,t)=>new yDe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class gDe{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new hDe(e,t,n),this.decoder=new mDe(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const vDe=({name:e,prefix:t,encode:n,decode:r})=>new gDe(e,t,n,r),wDe=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=pDe(n,t);return vDe({prefix:e,name:t,encode:r,decode:e=>(e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)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")})(i(e))})},TDe=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>vDe({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),EDe=vDe({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var ADe=Object.freeze({__proto__:null,identity:EDe});const xDe=TDe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var ODe=Object.freeze({__proto__:null,base2:xDe});const CDe=TDe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var IDe=Object.freeze({__proto__:null,base8:CDe});const _De=wDe({prefix:"9",name:"base10",alphabet:"0123456789"});var PDe=Object.freeze({__proto__:null,base10:_De});const SDe=TDe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),kDe=TDe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var RDe=Object.freeze({__proto__:null,base16:SDe,base16upper:kDe});const NDe=TDe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),MDe=TDe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),DDe=TDe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),LDe=TDe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),jDe=TDe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),FDe=TDe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),BDe=TDe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),UDe=TDe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zDe=TDe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var HDe=Object.freeze({__proto__:null,base32:NDe,base32hex:jDe,base32hexpad:BDe,base32hexpadupper:UDe,base32hexupper:FDe,base32pad:DDe,base32padupper:LDe,base32upper:MDe,base32z:zDe});const WDe=wDe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),VDe=wDe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var GDe=Object.freeze({__proto__:null,base36:WDe,base36upper:VDe});const qDe=wDe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),KDe=wDe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var XDe=Object.freeze({__proto__:null,base58btc:qDe,base58flickr:KDe});const YDe=TDe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ZDe=TDe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),JDe=TDe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),QDe=TDe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var $De=Object.freeze({__proto__:null,base64:YDe,base64pad:ZDe,base64url:JDe,base64urlpad:QDe});const eLe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),tLe=eLe.reduce(((e,t,n)=>(e[n]=t,e)),[]),nLe=eLe.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const rLe=vDe({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=tLe[t]),"")},decode:function(e){const t=[];for(const n of e){const e=nLe[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var iLe=Object.freeze({__proto__:null,base256emoji:rLe});new TextEncoder,new TextDecoder;const aLe={...ADe,...ODe,...IDe,...PDe,...RDe,...HDe,...GDe,...XDe,...$De,...iLe};function oLe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const sLe=oLe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),cLe=oLe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=lDe((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),uLe={utf8:sLe,"utf-8":sLe,hex:aLe.base16,latin1:cLe,ascii:cLe,binary:cLe,...aLe};function lLe(e,t="utf8"){const n=uLe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):uDe(globalThis.Buffer.from(e,"utf-8"))}function dLe(e,t="utf8"){const n=uLe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}var fLe=window&&window.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},pLe=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},hLe=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},mLe=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},yLe=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},bLe=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},gLe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,vLe=3,wLe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],TLe=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function ELe(e){return e?ALe(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new bLe:"undefined"!=typeof navigator?ALe(navigator.userAgent):function(){var e="undefined"!=typeof process&&process.version;return e?new hLe(process.version.slice(1)):null}()}function ALe(e){var t=function(e){return""!==e&&wLe.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var a=i.exec(e);return!!a&&[r,a]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new yLe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<vLe&&(i=fLe(fLe([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(vLe-i.length),!0)):i=[];var a=i.join("."),o=function(e){for(var t=0,n=TLe.length;t<n;t++){var r=TLe[t],i=r[0];if(r[1].exec(e))return i}return null}(e),s=gLe.exec(e);return s&&s[1]?new mLe(n,a,o,s[1]):new pLe(n,a,o)}var xLe,OLe={},CLe={},ILe={};var _Le,PLe={},SLe={},kLe={};var RLe,NLe,MLe,DLe,LLe={};function jLe(){return NLe||(NLe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar((_Le||(_Le=1,Object.defineProperty(kLe,"__esModule",{value:!0}),kLe.ONE_THOUSAND=kLe.ONE_HUNDRED=void 0,kLe.ONE_HUNDRED=100,kLe.ONE_THOUSAND=1e3),kLe),e),t.__exportStar((RLe||(RLe=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=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY}(LLe)),LLe),e)}(SLe)),SLe}function FLe(){return DLe||(DLe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar((xLe||(xLe=1,Object.defineProperty(ILe,"__esModule",{value:!0}),ILe.delay=void 0,ILe.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}),ILe),e),t.__exportStar(function(){if(MLe)return PLe;MLe=1,Object.defineProperty(PLe,"__esModule",{value:!0}),PLe.fromMiliseconds=PLe.toMiliseconds=void 0;const e=jLe();return PLe.toMiliseconds=function(t){return t*e.ONE_THOUSAND},PLe.fromMiliseconds=function(t){return Math.floor(t/e.ONE_THOUSAND)},PLe}(),e)}(CLe)),CLe}var BLe,ULe={};var zLe,HLe,WLe={},VLe={};function GLe(){return HLe||(HLe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});gP.__exportStar((zLe||(zLe=1,Object.defineProperty(VLe,"__esModule",{value:!0}),VLe.IWatch=void 0,VLe.IWatch=class{}),VLe),e)}(WLe)),WLe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar(FLe(),e),t.__exportStar(function(){if(BLe)return ULe;BLe=1,Object.defineProperty(ULe,"__esModule",{value:!0}),ULe.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}return ULe.Watch=e,ULe.default=e,ULe}(),e),t.__exportStar(GLe(),e),t.__exportStar(jLe(),e)}(OLe);var qLe={};function KLe(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function XLe(e){const t=KLe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(qLe,"__esModule",{value:!0}),qLe.getLocalStorage=qLe.getLocalStorageOrThrow=qLe.getCrypto=qLe.getCryptoOrThrow=JLe=qLe.getLocation=qLe.getLocationOrThrow=ZLe=qLe.getNavigator=qLe.getNavigatorOrThrow=YLe=qLe.getDocument=qLe.getDocumentOrThrow=qLe.getFromWindowOrThrow=qLe.getFromWindow=void 0,qLe.getFromWindow=KLe,qLe.getFromWindowOrThrow=XLe,qLe.getDocumentOrThrow=function(){return XLe("document")};var YLe=qLe.getDocument=function(){return KLe("document")};qLe.getNavigatorOrThrow=function(){return XLe("navigator")};var ZLe=qLe.getNavigator=function(){return KLe("navigator")};qLe.getLocationOrThrow=function(){return XLe("location")};var JLe=qLe.getLocation=function(){return KLe("location")};qLe.getCryptoOrThrow=function(){return XLe("crypto")},qLe.getCrypto=function(){return KLe("crypto")},qLe.getLocalStorageOrThrow=function(){return XLe("localStorage")},qLe.getLocalStorage=function(){return KLe("localStorage")};var QLe={};Object.defineProperty(QLe,"__esModule",{value:!0});var $Le=QLe.getWindowMetadata=void 0;const eje=qLe;$Le=QLe.getWindowMetadata=function(){let e,t;try{e=eje.getDocumentOrThrow(),t=eje.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;e<n.length;e++){const r=n[e],i=["itemprop","property","name"].map((e=>r.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=r.getAttribute("content");if(e)return e}}return""}const r=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}(),i=n("description","og:description","twitter:description","keywords"),a=t.origin,o=function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e<n.length;e++){const i=n[e],a=i.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}();return{description:i,url:a,icons:o,name:r}};var tje={},nje=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),rje="%[a-f0-9]{2}",ije=new RegExp("("+rje+")|([^%]+?)","gi"),aje=new RegExp("("+rje+")+","gi");function oje(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],oje(n),oje(r))}function sje(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(ije)||[],n=1;n<t.length;n++)t=(e=oje(t,n).join("")).match(ije)||[];return e}}var cje=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=aje.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=sje(n[0]);r!==n[0]&&(t[n[0]]=r)}n=aje.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var o=i[a];e=e.replace(new RegExp(o,"g"),t[o])}return e}(e)}},uje=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},lje=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?-1!==t.indexOf(o):t(o,s,e))&&(n[o]=s)}return n};!function(e){const t=nje,n=cje,r=uje,i=lje,a=Symbol("encodeFragmentIdentifier");function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),a="string"==typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=a?c(n,e):n;const o=i||a?n.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===n?n:c(n,e);r[t]=o};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const a=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],a):r[t]=a};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const a of e.split("&")){if(""===a)continue;let[e,o]=r(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:c(o,t),n(c(e,t),o,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=f(n[e],t);else i[e]=f(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{const n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=u(n):e[t]=n,e}),Object.create(null))}e.extract=d,e.parse=p,e.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[",i,"]"].join("")]:[...n,[s(t,e),"[",s(i,e),"]=",s(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[]"].join("")]:[...n,[s(t,e),"[]=",s(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),":list="].join("")]:[...n,[s(t,e),":list=",s(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[s(n,e),t,s(i,e)].join("")]:[[r,s(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,s(t,e)]:[...n,[s(t,e),"=",s(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{const i=e[n];return void 0===i?"":null===i?s(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?s(n,t)+"[]":i.reduce(r(n),[]).join("&"):s(n,t)+"="+s(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(d(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:c(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=l(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),c=Object.assign(o,t.query);let u=e.stringify(c,n);u&&(u=`?${u}`);let d=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(t.url);return t.fragmentIdentifier&&(d=`#${n[a]?s(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${u}${d}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}(tje);const dje={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"}},fje=":";function pje(e,t){return e.includes(":")?[e]:t.chains||[]}const hje="base10",mje="base16",yje="base64pad",bje="utf8",gje=0,vje=1,wje=0,Tje=1,Eje=12,Aje=32;function xje(){return dLe(eDe.randomBytes(Aje),mje)}function Oje(e){return dLe(sDe.hash(lLe(e,bje)),mje)}function Cje(e){return Number(dLe(e,hje))}function Ije(e){const t=function(e){return lLe(`${e}`,hje)}(typeof e.type<"u"?e.type:gje);if(Cje(t)===vje&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?lLe(e.senderPublicKey,mje):void 0,r=typeof e.iv<"u"?lLe(e.iv,mje):eDe.randomBytes(Eje);return function(e){if(Cje(e.type)===vje){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return dLe(dDe([e.type,e.senderPublicKey,e.iv,e.sealed]),yje)}return dLe(dDe([e.type,e.iv,e.sealed]),yje)}({type:t,sealed:new gMe.ChaCha20Poly1305(lLe(e.symKey,mje)).seal(r,lLe(e.message,bje)),iv:r,senderPublicKey:n})}function _je(e){const t=lLe(e,yje),n=t.slice(wje,Tje),r=Tje;if(Cje(n)===vje){const e=r+Aje,i=e+Eje,a=t.slice(r,e),o=t.slice(e,i);return{type:n,sealed:t.slice(i),iv:o,senderPublicKey:a}}const i=r+Eje,a=t.slice(r,i);return{type:n,sealed:t.slice(i),iv:a}}function Pje(e){const t=e?.type||gje;if(t===vje){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Sje(e){return e.type===vje&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var kje=Object.defineProperty,Rje=Object.getOwnPropertySymbols,Nje=Object.prototype.hasOwnProperty,Mje=Object.prototype.propertyIsEnumerable,Dje=(e,t,n)=>t in e?kje(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lje=(e,t)=>{for(var n in t||(t={}))Nje.call(t,n)&&Dje(e,n,t[n]);if(Rje)for(var n of Rje(t))Mje.call(t,n)&&Dje(e,n,t[n]);return e};const jje="ReactNative",Fje={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Bje="js";function Uje(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function zje(){return!YLe()&&!!ZLe()&&navigator.product===jje}function Hje(){return!Uje()&&!!ZLe()&&!!YLe()}function Wje(){return zje()?Fje.reactNative:Uje()?Fje.node:Hje()?Fje.browser:Fje.unknown}function Vje(e,t,n){const r=function(){if(Wje()===Fje.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:e,Version:t}=global.Platform;return[e,t].join("-")}const e=ELe();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),i=function(){var e;const t=Wje();return t===Fje.browser?[t,(null==(e=JLe())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[Bje,n].join("-"),r,i].join("/")}function Gje({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:i,projectId:a,useOnCloseEvent:o,bundleId:s}){const c=n.split("?"),u={auth:i,ua:Vje(e,t,r),projectId:a,useOnCloseEvent:o||void 0,origin:s||void 0},l=function(e,t){let n=tje.parse(e);return n=Lje(Lje({},n),t),tje.stringify(n)}(c[1]||"",u);return c[0]+"?"+l}function qje(e,t){return e.filter((e=>t.includes(e))).length===e.length}function Kje(e){return Object.fromEntries(e.entries())}function Xje(e){return new Map(Object.entries(e))}function Yje(e=OLe.FIVE_MINUTES,t){const n=OLe.toMiliseconds(e||OLe.FIVE_MINUTES);let r,i,a;return{resolve:e=>{a&&r&&(clearTimeout(a),r(e))},reject:e=>{a&&i&&(clearTimeout(a),i(e))},done:()=>new Promise(((e,o)=>{a=setTimeout((()=>{o(new Error(t))}),n),r=e,i=o}))}}function Zje(e,t,n){return new Promise((async(r,i)=>{const a=setTimeout((()=>i(new Error(n))),t);try{r(await e)}catch(e){i(e)}clearTimeout(a)}))}function Jje(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function Qje(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else{if("id"!==t||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);r.id=Number(n)}return r}function $je(e,t){return OLe.fromMiliseconds((t||Date.now())+OLe.toMiliseconds(e))}function eFe(e){return Date.now()>=OLe.toMiliseconds(e)}function tFe(e,t){return`${e}${t?`:${t}`:""}`}function nFe(e=[],t=[]){return[...new Set([...e,...t])]}function rFe(e){return e?.relay||{protocol:"irn"}}function iFe(e){const t=dje[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var aFe=Object.defineProperty,oFe=Object.defineProperties,sFe=Object.getOwnPropertyDescriptors,cFe=Object.getOwnPropertySymbols,uFe=Object.prototype.hasOwnProperty,lFe=Object.prototype.propertyIsEnumerable,dFe=(e,t,n)=>t in e?aFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function fFe(e,t="-"){const n={},r="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(r)){const i=t.replace(r,""),a=e[t];n[i]=a}})),n}function pFe(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t),i=e.substring(t+1,n).split("@"),a=typeof n<"u"?e.substring(n):"",o=tje.parse(a);return{protocol:r,topic:hFe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:fFe(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function hFe(e){return e.startsWith("//")?e.substring(2):e}function mFe(e){return`${e.protocol}:${e.topic}@${e.version}?`+tje.stringify(((e,t)=>oFe(e,sFe(t)))(((e,t)=>{for(var n in t||(t={}))uFe.call(t,n)&&dFe(e,n,t[n]);if(cFe)for(var n of cFe(t))lFe.call(t,n)&&dFe(e,n,t[n]);return e})({symKey:e.symKey},function(e,t="-"){const n={};return Object.keys(e).forEach((r=>{const i="relay"+t+r;e[r]&&(n[i]=e[r])})),n}(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}function yFe(e){const t=[];return e.forEach((e=>{const[n,r]=e.split(":");t.push(`${n}:${r}`)})),t}function bFe(e){return e.includes(":")}function gFe(e){return bFe(e)?e.split(":")[0]:e}const vFe={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}},wFe={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 TFe(e,t){const{message:n,code:r}=wFe[e];return{message:t?`${n} ${t}`:n,code:r}}function EFe(e,t){const{message:n,code:r}=vFe[e];return{message:t?`${n} ${t}`:n,code:r}}function AFe(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function xFe(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function OFe(e){return typeof e>"u"}function CFe(e,t){return!(!t||!OFe(e))||"string"==typeof e&&!!e.trim().length}function IFe(e,t){return!(!t||!OFe(e))||"number"==typeof e&&!isNaN(e)}function _Fe(e){return!(!CFe(e,!1)||!e.includes(":"))&&2===e.split(":").length}function PFe(e){let t=!0;return AFe(e)?e.length&&(t=e.every((e=>CFe(e,!1)))):t=!1,t}function SFe(e,t,n){let r=null;return Object.entries(e).forEach((([e,i])=>{if(r)return;const a=function(e,t,n){let r=null;return AFe(t)&&t.length?t.forEach((e=>{r||_Fe(e)||(r=EFe("UNSUPPORTED_CHAINS",`${n}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):_Fe(e)||(r=EFe("UNSUPPORTED_CHAINS",`${n}, 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"] }`)),r}(e,pje(e,i),`${t} ${n}`);a&&(r=a)})),r}function kFe(e,t){let n=null;return AFe(e)?e.forEach((e=>{n||function(e){if(CFe(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&_Fe(e)}}return!1}(e)||(n=EFe("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):n=EFe("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function RFe(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=function(e,t){let n=null;return PFe(e?.methods)?PFe(e?.events)||(n=EFe("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=EFe("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}(e,`${t}, namespace`);r&&(n=r)})),n}function NFe(e,t){let n=null;if(e&&xFe(e)){const r=RFe(e,t);r&&(n=r);const i=function(e,t){let n=null;return Object.values(e).forEach((e=>{if(n)return;const r=kFe(e?.accounts,`${t} namespace`);r&&(n=r)})),n}(e,t);i&&(n=i)}else n=TFe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function MFe(e){return CFe(e.protocol,!0)}function DFe(e){return typeof e<"u"&&null!==typeof e}function LFe(e,t){return!(!_Fe(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...yFe(e.accounts))})),t}(e).includes(t))}function jFe(e,t,n){return!!CFe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{yFe(e.accounts).includes(t)&&n.push(...e.methods)})),n}(e,t).includes(n)}function FFe(e,t,n){return!!CFe(n,!1)&&function(e,t){const n=[];return Object.values(e).forEach((e=>{yFe(e.accounts).includes(t)&&n.push(...e.events)})),n}(e,t).includes(n)}function BFe(e,t,n){let r=null;const i=function(e){const t={};return Object.keys(e).forEach((n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach((r=>{t[r]={methods:e[n].methods,events:e[n].events}}))})),t}(e),a=function(e){const t={};return Object.keys(e).forEach((n=>{if(n.includes(":"))t[n]=e[n];else{const r=yFe(e[n].accounts);r?.forEach((r=>{t[r]={accounts:e[n].accounts.filter((e=>e.includes(`${r}:`))),methods:e[n].methods,events:e[n].events}}))}})),t}(t),o=Object.keys(i),s=Object.keys(a),c=UFe(Object.keys(e)),u=UFe(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),qje(o,s)||(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${o.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||r)return;const i=yFe(t[e].accounts);i.includes(e)||(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),o.forEach((e=>{r||(qje(i[e].methods,a[e].methods)?qje(i[e].events,a[e].events)||(r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=TFe("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))})),r}function UFe(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function zFe(){const e=Wje();return new Promise((t=>{switch(e){case Fje.browser:t(Hje()&&navigator?.onLine);break;case Fje.reactNative:t(async function(){if(zje()&&typeof global<"u"&&null!=global&&global.NetInfo){const e=await(null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}());break;case Fje.node:default:t(!0)}}))}function HFe(e){switch(Wje()){case Fje.browser:!function(e){!zje()&&Hje()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Fje.reactNative:!function(e){zje()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e)}}const WFe={};let VFe=class{static get(e){return WFe[e]}static set(e,t){WFe[e]=t}static delete(e){delete WFe[e]}};const GFe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,qFe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,KFe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function XFe(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function YFe(e,t={}){if("string"!=typeof e)return e;const n=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const e=n.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!KFe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(GFe.test(e)||qFe.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,XFe)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function ZFe(e,...t){try{return(n=e(...t))&&"function"==typeof n.then?n:Promise.resolve(n)}catch(e){return Promise.reject(e)}var n}function JFe(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return JFe(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function QFe(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const $Fe="base64:";function eBe(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function tBe(...e){return eBe(e.join(":"))}function nBe(e){return(e=eBe(e))?e+":":""}const rBe=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function iBe(e={}){const t={mounts:{"":e.driver||rBe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const n of t.mountpoints)if(e.startsWith(n))return{base:n,relativeKey:e.slice(n.length),driver:t.mounts[n]};return{base:"",relativeKey:e,driver:t.mounts[""]}},r=(e,n)=>t.mountpoints.filter((t=>t.startsWith(e)||n&&e.startsWith(t))).map((n=>({relativeBase:e.length>n.length?e.slice(n.length):void 0,mountpoint:n,driver:t.mounts[n]}))),i=(e,n)=>{if(t.watching){n=eBe(n);for(const r of t.watchListeners)r(e,n)}},a=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},o=(e,t,r)=>{const i=new Map,a=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const r of e){const e="string"==typeof r,i=eBe(e?r:r.key),o=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},c=n(i);a(c).items.push({key:i,value:o,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>r(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=eBe(e);const{relativeKey:r,driver:i}=n(e);return ZFe(i.hasItem,r,t)},getItem(e,t={}){e=eBe(e);const{relativeKey:r,driver:i}=n(e);return ZFe(i.getItem,r,t).then((e=>YFe(e)))},getItems:(e,t)=>o(e,t,(e=>e.driver.getItems?ZFe(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:tBe(e.base,t.key),value:YFe(t.value)}))))):Promise.all(e.items.map((t=>ZFe(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:YFe(e)})))))))),getItemRaw(e,t={}){e=eBe(e);const{relativeKey:r,driver:i}=n(e);return i.getItemRaw?ZFe(i.getItemRaw,r,t):ZFe(i.getItem,r,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith($Fe)?(QFe(),Buffer.from(e.slice($Fe.length),"base64")):e}(e)))},async setItem(e,t,r={}){if(void 0===t)return s.removeItem(e);e=eBe(e);const{relativeKey:a,driver:o}=n(e);o.setItem&&(await ZFe(o.setItem,a,JFe(t),r),o.watch||i("update",e))},async setItems(e,t){await o(e,t,(async e=>{e.driver.setItems&&await ZFe(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:JFe(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>ZFe(e.driver.setItem,t.relativeKey,JFe(t.value),t.options))))}))},async setItemRaw(e,t,r={}){if(void 0===t)return s.removeItem(e,r);e=eBe(e);const{relativeKey:a,driver:o}=n(e);if(o.setItemRaw)await ZFe(o.setItemRaw,a,t,r);else{if(!o.setItem)return;await ZFe(o.setItem,a,function(e){if("string"==typeof e)return e;QFe();const t=Buffer.from(e).toString("base64");return $Fe+t}(t),r)}o.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=eBe(e);const{relativeKey:r,driver:a}=n(e);a.removeItem&&(await ZFe(a.removeItem,r,t),(t.removeMeta||t.removeMata)&&await ZFe(a.removeItem,r+"$",t),a.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=eBe(e);const{relativeKey:r,driver:i}=n(e),a=Object.create(null);if(i.getMeta&&Object.assign(a,await ZFe(i.getMeta,r,t)),!t.nativeOnly){const e=await ZFe(i.getItem,r+"$",t).then((e=>YFe(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(a,e))}return a},setMeta(e,t,n={}){return this.setItem(e+"$",t,n)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=nBe(e);const n=r(e,!0);let i=[];const a=[];for(const e of n){const n=(await ZFe(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+eBe(t))).filter((e=>!i.some((t=>e.startsWith(t)))));a.push(...n),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?a.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):a.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=nBe(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return ZFe(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const n=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(n.map((n=>e.driver.removeItem(n,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>oBe(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await aBe(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await a()}),async unwatch(){t.watchListeners=[],await a()},mount(e,n){if((e=nBe(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=n,t.watching&&Promise.resolve(aBe(n,i,e)).then((n=>{t.unwatch[e]=n})).catch(console.error),s},async unmount(e,n=!0){(e=nBe(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),n&&await oBe(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=eBe(e)+":";const t=n(e);return{driver:t.driver,base:t.base}},getMounts(e="",t={}){e=eBe(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return s}function aBe(e,t,n){return e.watch?e.watch(((e,r)=>t(e,n+r))):()=>{}}async function oBe(e){"function"==typeof e.dispose&&await ZFe(e.dispose)}function sBe(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function cBe(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=sBe(n);return(e,n)=>r.then((r=>n(r.transaction(t,e).objectStore(t))))}let uBe;function lBe(){return uBe||(uBe=cBe("keyval-store","keyval")),uBe}function dBe(e,t=lBe()){return t("readonly",(t=>sBe(t.get(e))))}function fBe(e=lBe()){return e("readonly",(e=>{if(e.getAllKeys)return sBe(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},sBe(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}const pBe=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),hBe=e=>{const t=e.replace(/([\[:])?(\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,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function mBe(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return hBe(e)}catch(t){return e}}function yBe(e){return"string"==typeof e?e:pBe(e)||""}var bBe=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>t+e;let r;return e.dbName&&e.storeName&&(r=cBe(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await dBe(n(e),r)>"u"),getItem:async e=>await dBe(n(e),r)??null,setItem:(e,t)=>function(e,t,n=lBe()){return n("readwrite",(n=>(n.put(t,e),sBe(n.transaction))))}(n(e),t,r),removeItem:e=>function(e,t=lBe()){return t("readwrite",(t=>(t.delete(e),sBe(t.transaction))))}(n(e),r),getKeys:()=>fBe(r),clear:()=>function(e=lBe()){return e("readwrite",(e=>(e.clear(),sBe(e.transaction))))}(r)}};var gBe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vBe={exports:{}};function wBe(e){var t;return[e[0],mBe(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof gBe<"u"&&gBe.localStorage?vBe.exports=gBe.localStorage:typeof window<"u"&&window.localStorage?vBe.exports=window.localStorage:vBe.exports=new t}();const TBe=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};var EBe={},ABe={},xBe=dt(bMe),OBe={},CBe={};let IBe=class{};var _Be,PBe,SBe=dt(Object.freeze({__proto__:null,IEvents:IBe}));function kBe(){return PBe||(PBe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});gP.__exportStar(function(){if(_Be)return CBe;_Be=1,Object.defineProperty(CBe,"__esModule",{value:!0}),CBe.IHeartBeat=void 0;const e=SBe;class t extends e.IEvents{constructor(e){super()}}return CBe.IHeartBeat=t,CBe}(),e)}(OBe)),OBe}var RBe,NBe,MBe,DBe={},LBe={};function jBe(){return NBe||(NBe=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});gP.__exportStar(function(){if(RBe)return LBe;RBe=1,Object.defineProperty(LBe,"__esModule",{value:!0}),LBe.HEARTBEAT_EVENTS=LBe.HEARTBEAT_INTERVAL=void 0;const e=OLe;return LBe.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,LBe.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},LBe}(),e)}(DBe)),DBe}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar(function(){if(MBe)return ABe;MBe=1,Object.defineProperty(ABe,"__esModule",{value:!0}),ABe.HeartBeat=void 0;const e=gP,t=xBe,n=OLe,r=kBe(),i=jBe();class a extends r.IHeartBeat{constructor(e){super(e),this.events=new t.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||i.HEARTBEAT_INTERVAL}static init(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=new a(t);return yield e.init(),e}))}init(){return e.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return e.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),n.toMiliseconds(this.interval))}))}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return ABe.HeartBeat=a,ABe}(),e),t.__exportStar(kBe(),e),t.__exportStar(jBe(),e)}(EBe);var FBe,BBe,UBe,zBe,HBe={};function WBe(){if(zBe)return UBe;zBe=1;const e=function(){if(BBe)return FBe;function e(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}return BBe=1,FBe=function(t,n,r){var i=r&&r.stringify||e;if("object"==typeof t&&null!==t){var a=n.length+1;if(1===a)return t;var o=new Array(a);o[0]=i(t);for(var s=1;s<a;s++)o[s]=i(n[s]);return o.join(" ")}if("string"!=typeof t)return t;var c=n.length;if(0===c)return t;for(var u="",l=0,d=-1,f=t&&t.length||0,p=0;p<f;){if(37===t.charCodeAt(p)&&p+1<f){switch(d=d>-1?d:0,t.charCodeAt(p+1)){case 100:case 102:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Number(n[l]),d=p+2,p++;break;case 105:if(l>=c)break;if(null==n[l])break;d<p&&(u+=t.slice(d,p)),u+=Math.floor(Number(n[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===n[l])break;d<p&&(u+=t.slice(d,p));var h=typeof n[l];if("string"===h){u+="'"+n[l]+"'",d=p+2,p++;break}if("function"===h){u+=n[l].name||"<anonymous>",d=p+2,p++;break}u+=i(n[l]),d=p+2,p++;break;case 115:if(l>=c)break;d<p&&(u+=t.slice(d,p)),u+=String(n[l]),d=p+2,p++;break;case 37:d<p&&(u+=t.slice(d,p)),u+="%",d=p+2,p++,l--}++l}++p}return-1===d?t:(d<f&&(u+=t.slice(d)),u)},FBe}();UBe=r;const t=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:u,mapHttpResponse:u,wrapRequestSerializer:l,wrapResponseSerializer:l,wrapErrorSerializer:l,req:u,res:u,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)void 0===t[n]&&(t[n]=e[n]);return t}};function r(e){(e=e||{}).browser=e.browser||{};const n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");const u=e.browser.write||t;e.browser.write&&(e.browser.asObject=!0);const l=e.serializers||{},f=function(e,t){if(Array.isArray(e)){const t=e.filter((function(e){return"!stdSerializers.err"!==e}));return t}return!0===e&&Object.keys(t)}(e.browser.serialize,l);let p=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(p=!1);"function"==typeof u&&(u.error=u.fatal=u.warn=u.info=u.debug=u.trace=u),!1===e.enabled&&(e.level="silent");const h=e.level||"info",m=Object.create(u);m.log||(m.log=d),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,i(y,m,"error","log"),i(y,m,"fatal","error"),i(y,m,"warn","error"),i(y,m,"info","log"),i(y,m,"debug","log"),i(y,m,"trace","log")}});const y={transmit:n,serialize:f,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:c(e)};return m.levels=r.levels,m.level=h,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=d,m.serializers=l,m._serialize=f,m._stdErrSerialize=p,m.child=function(t,r){if(!t)throw new Error("missing bindings for child Pino");r=r||{},f&&t.serializers&&(r.serializers=t.serializers);const i=r.serializers;if(f&&i){var c=Object.assign({},l,i),u=!0===e.browser.serialize?Object.keys(c):f;delete t.serializers,a([t],u,c,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=o(e,t,"error"),this.fatal=o(e,t,"fatal"),this.warn=o(e,t,"warn"),this.info=o(e,t,"info"),this.debug=o(e,t,"debug"),this.trace=o(e,t,"trace"),c&&(this.serializers=c,this._serialize=u),n&&(this._logEvent=s([].concat(e._logEvent.bindings,t)))}return d.prototype=this,new d(this)},n&&(m._logEvent=s()),m}function i(n,i,o,c){const u=Object.getPrototypeOf(i);i[o]=i.levelVal>i.levels.values[o]?d:u[o]?u[o]:t[o]||t[c]||d,function(n,i,o){if(!n.transmit&&i[o]===d)return;i[o]=function(c){return function(){const u=n.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<l.length;f++)l[f]=arguments[f];if(n.serialize&&!n.asObject&&a(l,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?c.call(d,function(t,n,i,o){t._serialize&&a(i,t._serialize,t.serializers,t._stdErrSerialize);const s=i.slice();let c=s[0];const u={};o&&(u.time=o);u.level=r.levels.values[n];let l=1+(0|t._childLevel);l<1&&(l=1);if(null!==c&&"object"==typeof c){for(;l--&&"object"==typeof s[0];)Object.assign(u,s.shift());c=s.length?e(s.shift(),s):void 0}else"string"==typeof c&&(c=e(s.shift(),s));void 0!==c&&(u.msg=c);return u}(this,o,l,u)):c.apply(d,l),n.transmit){const e=n.transmit.level||i.level,t=r.levels.values[e],c=r.levels.values[o];if(c<t)return;!function(e,t,n){const r=t.send,i=t.ts,o=t.methodLevel,c=t.methodValue,u=t.val,l=e._logEvent.bindings;a(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=c,r(o,e._logEvent,u),e._logEvent=s(l)}(this,{ts:u,methodLevel:o,methodValue:c,transmitLevel:e,transmitValue:r.levels.values[n.transmit.level||i.level],send:n.transmit.send,val:i.levelVal},l)}}}(i[o])}(n,i,o)}function a(e,t,n,i){for(const a in e)if(i&&e[a]instanceof Error)e[a]=r.stdSerializers.err(e[a]);else if("object"==typeof e[a]&&!Array.isArray(e[a]))for(const r in e[a])t&&t.indexOf(r)>-1&&r in n&&(e[a][r]=n[r](e[a][r]))}function o(e,t,n){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return e[n].apply(this,r)}}function s(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function c(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?f:p}function u(){return{}}function l(e){return e}function d(){}function f(){return!1}function p(){return Date.now()}return r.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"}},r.stdSerializers=n,r.stdTimeFunctions=Object.assign({},{nullTime:f,epochTime:p,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),UBe}var VBe,GBe={};function qBe(){return VBe||(VBe=1,Object.defineProperty(GBe,"__esModule",{value:!0}),GBe.PINO_CUSTOM_CONTEXT_KEY=GBe.PINO_LOGGER_DEFAULTS=void 0,GBe.PINO_LOGGER_DEFAULTS={level:"info"},GBe.PINO_CUSTOM_CONTEXT_KEY="custom_context"),GBe}var KBe,XBe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=gP,n=t.__importDefault(WBe());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return n.default}}),t.__exportStar(qBe(),e),t.__exportStar(function(){if(KBe)return XBe;KBe=1,Object.defineProperty(XBe,"__esModule",{value:!0}),XBe.generateChildLogger=XBe.formatChildLoggerContext=XBe.getLoggerContext=XBe.setBrowserLoggerContext=XBe.getBrowserLoggerContext=XBe.getDefaultLoggerOptions=void 0;const e=qBe();function t(t,n=e.PINO_CUSTOM_CONTEXT_KEY){return t[n]||""}function n(t,n,r=e.PINO_CUSTOM_CONTEXT_KEY){return t[r]=n,t}function r(n,r=e.PINO_CUSTOM_CONTEXT_KEY){let i="";return i=void 0===n.bindings?t(n,r):n.bindings().context||"",i}function i(t,n,i=e.PINO_CUSTOM_CONTEXT_KEY){const a=r(t,i);return a.trim()?`${a}/${n}`:n}return XBe.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||e.PINO_LOGGER_DEFAULTS.level})},XBe.getBrowserLoggerContext=t,XBe.setBrowserLoggerContext=n,XBe.getLoggerContext=r,XBe.formatChildLoggerContext=i,XBe.generateChildLogger=function(t,r,a=e.PINO_CUSTOM_CONTEXT_KEY){const o=i(t,r,a);return n(t.child({context:o}),o,a)},XBe}(),e)}(HBe);let YBe=class extends IBe{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},ZBe=class extends IBe{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},JBe=class{constructor(e,t){this.logger=e,this.core=t}},QBe=class extends IBe{constructor(e,t){super(),this.relayer=e,this.logger=t}},$Be=class extends IBe{constructor(e){super()}},eUe=class{constructor(e,t,n,r){this.core=e,this.logger=t,this.name=n}},tUe=class extends IBe{constructor(e,t){super(),this.relayer=e,this.logger=t}},nUe=class extends IBe{constructor(e,t){super(),this.core=e,this.logger=t}},rUe=class{constructor(e,t){this.projectId=e,this.logger=t}},iUe=class{constructor(e,t){this.projectId=e,this.logger=t}},aUe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},oUe=class{constructor(e){this.client=e}};var sUe={},cUe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=wMe,n=NMe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},r.prototype.update=function(t,n){if(void 0===n&&(n=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=n,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&n>0;)this._buffer[this._bufferLength++]=t[r++],n--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(n>=this.blockSize&&(r=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,r,n),n%=this.blockSize);n>0;)this._buffer[this._bufferLength++]=t[r++],n--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,o=n<<3,s=n%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,s-8),t.writeUint32BE(o,this._buffer,s-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)t.writeUint32BE(this._stateHi[c],e,8*c),t.writeUint32BE(this._stateLo[c],e,8*c+4);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA512=r;var i=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 a(e,n,r,a,o,s,c){for(var u,l,d,f,p,h,m,y,b=r[0],g=r[1],v=r[2],w=r[3],T=r[4],E=r[5],A=r[6],x=r[7],O=a[0],C=a[1],I=a[2],_=a[3],P=a[4],S=a[5],k=a[6],R=a[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(o,M),n[N]=t.readUint32BE(o,M+4)}for(N=0;N<80;N++){var D,L,j=b,F=g,B=v,U=w,z=T,H=E,W=A,V=O,G=C,q=I,K=_,X=P,Y=S,Z=k;if(p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,p+=65535&(l=(P>>>14|T<<18)^(P>>>18|T<<14)^(T>>>9|P<<23)),h+=l>>>16,m+=65535&(u=(T>>>14|P<<18)^(T>>>18|P<<14)^(P>>>9|T<<23)),y+=u>>>16,p+=65535&(l=P&S^~P&k),h+=l>>>16,m+=65535&(u=T&E^~T&A),y+=u>>>16,u=i[2*N],p+=65535&(l=i[2*N+1]),h+=l>>>16,m+=65535&u,y+=u>>>16,u=e[N%16],h+=(l=n[N%16])>>>16,m+=65535&u,y+=u>>>16,m+=(h+=(p+=65535&l)>>>16)>>>16,p=65535&(l=f=65535&p|h<<16),h=l>>>16,m=65535&(u=d=65535&m|(y+=m>>>16)<<16),y=u>>>16,p+=65535&(l=(O>>>28|b<<4)^(b>>>2|O<<30)^(b>>>7|O<<25)),h+=l>>>16,m+=65535&(u=(b>>>28|O<<4)^(O>>>2|b<<30)^(O>>>7|b<<25)),y+=u>>>16,h+=(l=O&C^O&I^C&I)>>>16,m+=65535&(u=b&g^b&v^g&v),y+=u>>>16,D=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,L=65535&p|h<<16,p=65535&(l=K),h=l>>>16,m=65535&(u=U),y=u>>>16,h+=(l=f)>>>16,m+=65535&(u=d),y+=u>>>16,g=j,v=F,w=B,T=U=65535&(m+=(h+=(p+=65535&l)>>>16)>>>16)|(y+=m>>>16)<<16,E=z,A=H,x=W,b=D,C=V,I=G,_=q,P=K=65535&p|h<<16,S=X,k=Y,R=Z,O=L,N%16==15)for(M=0;M<16;M++)u=e[M],p=65535&(l=n[M]),h=l>>>16,m=65535&u,y=u>>>16,u=e[(M+9)%16],p+=65535&(l=n[(M+9)%16]),h+=l>>>16,m+=65535&u,y+=u>>>16,d=e[(M+1)%16],p+=65535&(l=((f=n[(M+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),h+=l>>>16,m+=65535&(u=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),y+=u>>>16,d=e[(M+14)%16],h+=(l=((f=n[(M+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,m+=65535&(u=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,e[M]=65535&m|y<<16,n[M]=65535&p|h<<16}p=65535&(l=O),h=l>>>16,m=65535&(u=b),y=u>>>16,u=r[0],h+=(l=a[0])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[0]=b=65535&m|y<<16,a[0]=O=65535&p|h<<16,p=65535&(l=C),h=l>>>16,m=65535&(u=g),y=u>>>16,u=r[1],h+=(l=a[1])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[1]=g=65535&m|y<<16,a[1]=C=65535&p|h<<16,p=65535&(l=I),h=l>>>16,m=65535&(u=v),y=u>>>16,u=r[2],h+=(l=a[2])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[2]=v=65535&m|y<<16,a[2]=I=65535&p|h<<16,p=65535&(l=_),h=l>>>16,m=65535&(u=w),y=u>>>16,u=r[3],h+=(l=a[3])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[3]=w=65535&m|y<<16,a[3]=_=65535&p|h<<16,p=65535&(l=P),h=l>>>16,m=65535&(u=T),y=u>>>16,u=r[4],h+=(l=a[4])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[4]=T=65535&m|y<<16,a[4]=P=65535&p|h<<16,p=65535&(l=S),h=l>>>16,m=65535&(u=E),y=u>>>16,u=r[5],h+=(l=a[5])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[5]=E=65535&m|y<<16,a[5]=S=65535&p|h<<16,p=65535&(l=k),h=l>>>16,m=65535&(u=A),y=u>>>16,u=r[6],h+=(l=a[6])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[6]=A=65535&m|y<<16,a[6]=k=65535&p|h<<16,p=65535&(l=R),h=l>>>16,m=65535&(u=x),y=u>>>16,u=r[7],h+=(l=a[7])>>>16,m+=65535&u,y+=u>>>16,y+=(m+=(h+=(p+=65535&l)>>>16)>>>16)>>>16,r[7]=x=65535&m|y<<16,a[7]=R=65535&p|h<<16,s+=128,c-=128}return s}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}(cUe),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=eDe,n=cUe,r=NMe;function i(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;new Uint8Array(32)[0]=9;const a=i(),o=i([1]),s=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t){for(let n=0;n<16;n++)e[n]=0|t[n]}function p(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function h(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function m(e,t){const n=i(),r=i();for(let e=0;e<16;e++)r[e]=t[e];p(r),p(r),p(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,h(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function y(e,t){let n=0;for(let r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function b(e,t){const n=new Uint8Array(32),r=new Uint8Array(32);return m(n,e),m(r,t),y(n,r)}function g(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function v(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function w(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function T(e,t,n){let r,i,a=0,o=0,s=0,c=0,u=0,l=0,d=0,f=0,p=0,h=0,m=0,y=0,b=0,g=0,v=0,w=0,T=0,E=0,A=0,x=0,O=0,C=0,I=0,_=0,P=0,S=0,k=0,R=0,N=0,M=0,D=0,L=n[0],j=n[1],F=n[2],B=n[3],U=n[4],z=n[5],H=n[6],W=n[7],V=n[8],G=n[9],q=n[10],K=n[11],X=n[12],Y=n[13],Z=n[14],J=n[15];r=t[0],a+=r*L,o+=r*j,s+=r*F,c+=r*B,u+=r*U,l+=r*z,d+=r*H,f+=r*W,p+=r*V,h+=r*G,m+=r*q,y+=r*K,b+=r*X,g+=r*Y,v+=r*Z,w+=r*J,r=t[1],o+=r*L,s+=r*j,c+=r*F,u+=r*B,l+=r*U,d+=r*z,f+=r*H,p+=r*W,h+=r*V,m+=r*G,y+=r*q,b+=r*K,g+=r*X,v+=r*Y,w+=r*Z,T+=r*J,r=t[2],s+=r*L,c+=r*j,u+=r*F,l+=r*B,d+=r*U,f+=r*z,p+=r*H,h+=r*W,m+=r*V,y+=r*G,b+=r*q,g+=r*K,v+=r*X,w+=r*Y,T+=r*Z,E+=r*J,r=t[3],c+=r*L,u+=r*j,l+=r*F,d+=r*B,f+=r*U,p+=r*z,h+=r*H,m+=r*W,y+=r*V,b+=r*G,g+=r*q,v+=r*K,w+=r*X,T+=r*Y,E+=r*Z,A+=r*J,r=t[4],u+=r*L,l+=r*j,d+=r*F,f+=r*B,p+=r*U,h+=r*z,m+=r*H,y+=r*W,b+=r*V,g+=r*G,v+=r*q,w+=r*K,T+=r*X,E+=r*Y,A+=r*Z,x+=r*J,r=t[5],l+=r*L,d+=r*j,f+=r*F,p+=r*B,h+=r*U,m+=r*z,y+=r*H,b+=r*W,g+=r*V,v+=r*G,w+=r*q,T+=r*K,E+=r*X,A+=r*Y,x+=r*Z,O+=r*J,r=t[6],d+=r*L,f+=r*j,p+=r*F,h+=r*B,m+=r*U,y+=r*z,b+=r*H,g+=r*W,v+=r*V,w+=r*G,T+=r*q,E+=r*K,A+=r*X,x+=r*Y,O+=r*Z,C+=r*J,r=t[7],f+=r*L,p+=r*j,h+=r*F,m+=r*B,y+=r*U,b+=r*z,g+=r*H,v+=r*W,w+=r*V,T+=r*G,E+=r*q,A+=r*K,x+=r*X,O+=r*Y,C+=r*Z,I+=r*J,r=t[8],p+=r*L,h+=r*j,m+=r*F,y+=r*B,b+=r*U,g+=r*z,v+=r*H,w+=r*W,T+=r*V,E+=r*G,A+=r*q,x+=r*K,O+=r*X,C+=r*Y,I+=r*Z,_+=r*J,r=t[9],h+=r*L,m+=r*j,y+=r*F,b+=r*B,g+=r*U,v+=r*z,w+=r*H,T+=r*W,E+=r*V,A+=r*G,x+=r*q,O+=r*K,C+=r*X,I+=r*Y,_+=r*Z,P+=r*J,r=t[10],m+=r*L,y+=r*j,b+=r*F,g+=r*B,v+=r*U,w+=r*z,T+=r*H,E+=r*W,A+=r*V,x+=r*G,O+=r*q,C+=r*K,I+=r*X,_+=r*Y,P+=r*Z,S+=r*J,r=t[11],y+=r*L,b+=r*j,g+=r*F,v+=r*B,w+=r*U,T+=r*z,E+=r*H,A+=r*W,x+=r*V,O+=r*G,C+=r*q,I+=r*K,_+=r*X,P+=r*Y,S+=r*Z,k+=r*J,r=t[12],b+=r*L,g+=r*j,v+=r*F,w+=r*B,T+=r*U,E+=r*z,A+=r*H,x+=r*W,O+=r*V,C+=r*G,I+=r*q,_+=r*K,P+=r*X,S+=r*Y,k+=r*Z,R+=r*J,r=t[13],g+=r*L,v+=r*j,w+=r*F,T+=r*B,E+=r*U,A+=r*z,x+=r*H,O+=r*W,C+=r*V,I+=r*G,_+=r*q,P+=r*K,S+=r*X,k+=r*Y,R+=r*Z,N+=r*J,r=t[14],v+=r*L,w+=r*j,T+=r*F,E+=r*B,A+=r*U,x+=r*z,O+=r*H,C+=r*W,I+=r*V,_+=r*G,P+=r*q,S+=r*K,k+=r*X,R+=r*Y,N+=r*Z,M+=r*J,r=t[15],w+=r*L,T+=r*j,E+=r*F,A+=r*B,x+=r*U,O+=r*z,C+=r*H,I+=r*W,_+=r*V,P+=r*G,S+=r*q,k+=r*K,R+=r*X,N+=r*Y,M+=r*Z,D+=r*J,a+=38*T,o+=38*E,s+=38*A,c+=38*x,u+=38*O,l+=38*C,d+=38*I,f+=38*_,p+=38*P,h+=38*S,m+=38*k,y+=38*R,b+=38*N,g+=38*M,v+=38*D,i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),i=1,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=p,e[9]=h,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function E(e,t){T(e,t,t)}function A(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)E(n,n),2!==r&&4!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function x(e,t){const n=i(),r=i(),a=i(),o=i(),s=i(),u=i(),l=i(),d=i(),f=i();w(n,e[1],e[0]),w(f,t[1],t[0]),T(n,n,f),v(r,e[0],e[1]),v(f,t[0],t[1]),T(r,r,f),T(a,e[3],t[3]),T(a,a,c),T(o,e[2],t[2]),v(o,o,o),w(s,r,n),w(u,o,a),v(l,o,a),v(d,r,n),T(e[0],s,u),T(e[1],d,l),T(e[2],l,u),T(e[3],s,d)}function O(e,t,n){for(let r=0;r<4;r++)h(e[r],t[r],n)}function C(e,t){const n=i(),r=i(),a=i();A(a,t[2]),T(n,t[0],a),T(r,t[1],a),m(e,r),e[31]^=g(n)<<7}function I(e,t,n){f(e[0],a),f(e[1],o),f(e[2],o),f(e[3],a);for(let r=255;r>=0;--r){const i=n[r/8|0]>>(7&r)&1;O(e,t,i),x(t,e),x(e,e),O(e,t,i)}}function _(e,t){const n=[i(),i(),i(),i()];f(n[0],u),f(n[1],l),f(n[2],o),T(n[3],u,l),I(e,n,t)}function P(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const a=new Uint8Array(32),o=[i(),i(),i(),i()];_(o,r),C(a,o);const s=new Uint8Array(64);return s.set(t),s.set(a,32),{publicKey:a,secretKey:s}}e.generateKeyPairFromSeed=P,e.generateKeyPair=function(e){const n=(0,t.randomBytes)(32,e),i=P(n);return(0,r.wipe)(n),i},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};const S=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 k(e,t){let n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*S[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*S[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*S[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function R(e){const t=new Float64Array(64);for(let n=0;n<64;n++)t[n]=e[n];for(let t=0;t<64;t++)e[t]=0;k(e,t)}function N(e,t){const n=i(),r=i(),c=i(),u=i(),l=i(),p=i(),h=i();return f(e[2],o),function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],t),E(c,e[1]),T(u,c,s),w(c,c,e[2]),v(u,e[2],u),E(l,u),E(p,l),T(h,p,l),T(n,h,c),T(n,n,u),function(e,t){const n=i();let r;for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)E(n,n),1!==r&&T(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(n,n),T(n,n,c),T(n,n,u),T(n,n,u),T(e[0],n,u),E(r,e[0]),T(r,r,u),b(r,c)&&T(e[0],e[0],d),E(r,e[0]),T(r,r,u),b(r,c)?-1:(g(e[0])===t[31]>>7&&w(e[0],a,e[0]),T(e[3],e[0],e[1]),0)}e.sign=function(e,t){const r=new Float64Array(64),a=[i(),i(),i(),i()],o=(0,n.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const s=new Uint8Array(64);s.set(o.subarray(32),32);const c=new n.SHA512;c.update(s.subarray(32)),c.update(t);const u=c.digest();c.clean(),R(u),_(a,u),C(s,a),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const l=c.digest();R(l);for(let e=0;e<32;e++)r[e]=u[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=l[e]*o[t];return k(s.subarray(32),r),s},e.verify=function(t,r,a){const o=new Uint8Array(32),s=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(a.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(N(c,t))return!1;const u=new n.SHA512;u.update(a.subarray(0,32)),u.update(t),u.update(r);const l=u.digest();return R(l),I(s,c,l),_(c,a.subarray(32)),x(s,c),C(o,s),!y(a,o)},e.convertPublicKeyToX25519=function(e){let t=[i(),i(),i(),i()];if(N(t,e))throw new Error("Ed25519: invalid public key");let n=i(),r=i(),a=t[1];v(n,o,a),w(r,o,a),A(r,r),T(n,n,r);let s=new Uint8Array(32);return m(s,n),s},e.convertSecretKeyToX25519=function(e){const t=(0,n.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const i=new Uint8Array(t.subarray(0,32));return(0,r.wipe)(t),i}}(sUe);const uUe=".",lUe="base64url",dUe="utf8",fUe="utf8",pUe=":",hUe="did",mUe="key",yUe="base58btc",bUe="z",gUe="K36";function vUe(e){return dLe(lLe(yBe(e),dUe),lUe)}function wUe(e){const t=lLe(gUe,yUe),n=bUe+dLe(dDe([t,e]),yUe);return[hUe,mUe,n].join(pUe)}function TUe(e){return dLe(e,lUe)}function EUe(e=eDe.randomBytes(32)){return sUe.generateKeyPairFromSeed(e)}async function AUe(e,t,n,r,i=OLe.fromMiliseconds(Date.now())){const a={alg:"EdDSA",typ:"JWT"},o={iss:wUe(r.publicKey),sub:e,aud:t,iat:i,exp:i+n},s=lLe([vUe((c={header:a,payload:o}).header),vUe(c.payload)].join(uUe),fUe);var c;return function(e){return[vUe(e.header),vUe(e.payload),TUe(e.signature)].join(uUe)}({header:a,payload:o,signature:sUe.sign(r.secretKey,s)})}const xUe="INTERNAL_ERROR",OUe="SERVER_ERROR",CUe=[-32700,-32600,-32601,-32602,-32603],IUe={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[xUe]:{code:-32603,message:"Internal error"},[OUe]:{code:-32e3,message:"Server error"}},_Ue=OUe;function PUe(e){return Object.keys(IUe).includes(e)?IUe[e]:IUe[_Ue]}function SUe(e,t,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${t}`):e}var kUe,RUe={},NUe={};var MUe,DUe={};function LUe(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function jUe(e=6){return BigInt(LUe(e))}function FUe(e,t,n){return{id:n||LUe(),jsonrpc:"2.0",method:e,params:t}}function BUe(e,t){return{id:e,jsonrpc:"2.0",result:t}}function UUe(e,t,n){return{id:e,jsonrpc:"2.0",error:zUe(t,n)}}function zUe(e,t){return void 0===e?PUe(xUe):("string"==typeof e&&(e=Object.assign(Object.assign({},PUe(OUe)),{message:e})),void 0!==t&&(e.data=t),n=e.code,CUe.includes(n)&&(e=function(e){const t=Object.values(IUe).find((t=>t.code===e));return t||IUe[_Ue]}(e.code)),e);var n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=gP;t.__exportStar(function(){if(kUe)return NUe;function e(){return(null==ut?void 0:ut.crypto)||(null==ut?void 0:ut.msCrypto)||{}}function t(){const t=e();return t.subtle||t.webkitSubtle}return kUe=1,Object.defineProperty(NUe,"__esModule",{value:!0}),NUe.isBrowserCryptoAvailable=NUe.getSubtleCrypto=NUe.getBrowerCrypto=void 0,NUe.getBrowerCrypto=e,NUe.getSubtleCrypto=t,NUe.isBrowserCryptoAvailable=function(){return!!e()&&!!t()},NUe}(),e),t.__exportStar(function(){if(MUe)return DUe;function e(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function t(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}return MUe=1,Object.defineProperty(DUe,"__esModule",{value:!0}),DUe.isBrowser=DUe.isNode=DUe.isReactNative=void 0,DUe.isReactNative=e,DUe.isNode=t,DUe.isBrowser=function(){return!e()&&!t()},DUe}(),e)}(RUe);class HUe{}class WUe extends HUe{constructor(){super()}}class VUe extends WUe{constructor(e){super()}}function GUe(e,t){const n=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==n&&new RegExp(t).test(n)}function qUe(e){return GUe(e,"^https?:")}function KUe(e){return GUe(e,"^wss?:")}function XUe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function YUe(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function ZUe(e){return YUe(e)&&"method"in e}function JUe(e){return YUe(e)&&(QUe(e)||$Ue(e))}function QUe(e){return"result"in e}function $Ue(e){return"error"in e}class eze extends VUe{constructor(e){super(e),this.events=new dMe,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(FUe(e.method,e.params||[],e.id||jUe().toString()),t)}async requestStrict(e,t){return new Promise((async(n,r)=>{if(!this.connection.connected)try{await this.open()}catch(e){r(e)}this.events.on(`${e.id}`,(e=>{$Ue(e)?r(e.error):n(e.result)}));try{await this.connection.send(e,t)}catch(e){r(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),JUe(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const tze=e=>e.split("?")[0],nze=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws");var rze={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,a=9007199254740991,o="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",y="[object Null]",b="[object Object]",g="[object Promise]",v="[object Proxy]",w="[object RegExp]",T="[object Set]",E="[object String]",A="[object Symbol]",x="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",_=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[o]=S[s]=S[C]=S[u]=S[I]=S[l]=S[d]=S[f]=S[h]=S[m]=S[b]=S[w]=S[T]=S[E]=S[O]=!1;var k="object"==typeof ut&&ut&&ut.Object===Object&&ut,R="object"==typeof self&&self&&self.Object===Object&&self,N=k||R||Function("return this")(),M=t&&!t.nodeType&&t,D=M&&e&&!e.nodeType&&e,L=D&&D.exports===M,j=L&&k.process,F=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),B=F&&F.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e,t){return e.has(t)}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V=Array.prototype,G=Function.prototype,q=Object.prototype,K=N["__core-js_shared__"],X=G.toString,Y=q.hasOwnProperty,Z=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=q.toString,Q=RegExp("^"+X.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=L?N.Buffer:void 0,ee=N.Symbol,te=N.Uint8Array,ne=q.propertyIsEnumerable,re=V.splice,ie=ee?ee.toStringTag:void 0,ae=Object.getOwnPropertySymbols,oe=$?$.isBuffer:void 0,se=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ce=Le(N,"DataView"),ue=Le(N,"Map"),le=Le(N,"Promise"),de=Le(N,"Set"),fe=Le(N,"WeakMap"),pe=Le(Object,"create"),he=Ue(ce),me=Ue(ue),ye=Ue(le),be=Ue(de),ge=Ue(fe),ve=ee?ee.prototype:void 0,we=ve?ve.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ae;++t<n;)this.add(e[t])}function Oe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ce(e,t){var n=We(e),r=!n&&He(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Ze(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!Y.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Be(u,c))||s.push(u);return s}function Ie(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}function _e(e){return null==e?void 0===e?x:y:ie&&ie in Object(e)?function(e){var t=Y.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var i=J.call(e);r&&(t?e[ie]=n:delete e[ie]);return i}(e):function(e){return J.call(e)}(e)}function Pe(e){return Xe(e)&&_e(e)==o}function Se(e,t,n,a,c){return e===t||(null==e||null==t||!Xe(e)&&!Xe(t)?e!=e&&t!=t:function(e,t,n,a,c,f){var p=We(e),y=We(t),g=p?s:Fe(e),v=y?s:Fe(t),x=(g=g==o?b:g)==b,O=(v=v==o?b:v)==b,_=g==v;if(_&&Ve(e)){if(!Ve(t))return!1;p=!0,x=!1}if(_&&!x)return f||(f=new Oe),p||Ze(e)?Ne(e,t,n,a,c,f):function(e,t,n,a,o,s,c){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!s(new te(e),new te(t)));case u:case l:case m:return ze(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case E:return e==t+"";case h:var f=H;case T:var p=a&r;if(f||(f=W),e.size!=t.size&&!p)return!1;var y=c.get(e);if(y)return y==t;a|=i,c.set(e,t);var b=Ne(f(e),f(t),a,o,s,c);return c.delete(e),b;case A:if(we)return we.call(e)==we.call(t)}return!1}(e,t,g,n,a,c,f);if(!(n&r)){var P=x&&Y.call(e,"__wrapped__"),S=O&&Y.call(t,"__wrapped__");if(P||S){var k=P?e.value():e,R=S?t.value():t;return f||(f=new Oe),c(k,R,n,a,f)}}if(!_)return!1;return f||(f=new Oe),function(e,t,n,i,a,o){var s=n&r,c=Me(e),u=c.length,l=Me(t),d=l.length;if(u!=d&&!s)return!1;var f=u;for(;f--;){var p=c[f];if(!(s?p in t:Y.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var y=s;for(;++f<u;){var b=e[p=c[f]],g=t[p];if(i)var v=s?i(g,b,p,t,e,o):i(b,g,p,e,t,o);if(!(void 0===v?b===g||a(b,g,n,i,o):v)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var w=e.constructor,T=t.constructor;w==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof T&&T instanceof T||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,a,c,f)}(e,t,n,a,Se,c))}function ke(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(Ge(e)?Q:_).test(Ue(e));var t}function Re(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return se(e);var t,n,r,i=[];for(var a in Object(e))Y.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Ne(e,t,n,a,o,s){var c=n&r,u=e.length,l=t.length;if(u!=l&&!(c&&l>u))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,h=n&i?new xe:void 0;for(s.set(e,t),s.set(t,e);++f<u;){var m=e[f],y=t[f];if(a)var b=c?a(y,m,f,t,e,s):a(m,y,f,e,t,s);if(void 0!==b){if(b)continue;p=!1;break}if(h){if(!U(t,(function(e,t){if(!z(h,t)&&(m===e||o(m,e,n,a,s)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!o(m,y,n,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return We(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Je,je)}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ke(n)?n:void 0}Te.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Y.call(t,e)},Te.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():re.call(t,n,1),--this.size,!0)},Ee.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},Ee.prototype.has=function(e){return Ie(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ae.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(ue||Ee),string:new Te}},Ae.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ae.prototype.get=function(e){return De(this,e).get(e)},Ae.prototype.has=function(e){return De(this,e).has(e)},Ae.prototype.set=function(e,t){var n=De(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ue||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ae(r)}return n.set(e,t),this.size=n.size,this};var je=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(ae(e),(function(t){return ne.call(e,t)})))}:function(){return[]},Fe=_e;function Be(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ze(e,t){return e===t||e!=e&&t!=t}(ce&&Fe(new ce(new ArrayBuffer(1)))!=I||ue&&Fe(new ue)!=h||le&&Fe(le.resolve())!=g||de&&Fe(new de)!=T||fe&&Fe(new fe)!=O)&&(Fe=function(e){var t=_e(e),n=t==b?e.constructor:void 0,r=n?Ue(n):"";if(r)switch(r){case he:return I;case me:return h;case ye:return g;case be:return T;case ge:return O}return t});var He=Pe(function(){return arguments}())?Pe:function(e){return Xe(e)&&Y.call(e,"callee")&&!ne.call(e,"callee")},We=Array.isArray;var Ve=oe||function(){return!1};function Ge(e){if(!Ke(e))return!1;var t=_e(e);return t==f||t==p||t==c||t==v}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Ye,Ze=B?(Ye=B,function(e){return Ye(e)}):function(e){return Xe(e)&&qe(e.length)&&!!S[_e(e)]};function Je(e){return null!=(t=e)&&qe(t.length)&&!Ge(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Se(e,t)}}(rze,rze.exports);var ize=lt(rze.exports),aze=dt(axe),oze=lt(self.fetch||(self.fetch=aze.default||aze));var sze=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),o=a.charCodeAt(0);if(255!==n[o])throw new TypeError(a+" is ambiguous");n[o]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var a=(e.length-t)*u+1>>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=a-1;(0!==l||d<i)&&-1!==f;f--,d++)l+=s*o[f]>>>0,o[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===o[p];)p++;for(var h=new Uint8Array(r+(a-p)),m=r;p!==a;)h[m++]=o[p++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],f=0,p=o-1;(0!==d||f<r)&&-1!==p;p--,f++)d+=256*u[p]>>>0,u[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");r=f,i++}for(var h=o-r;h!==o&&0===u[h];)h++;for(var m=c.repeat(n);h<o;++h)m+=e.charAt(u[h]);return m},decodeUnsafe:d,decode:function(e){var n=d(e);if(n)return n;throw new Error(`Non-${t} character`)}}},cze=sze;const uze=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)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")};class lze{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class dze{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return pze(this,e)}}class fze{constructor(e){this.decoders=e}or(e){return pze(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const pze=(e,t)=>new fze({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class hze{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new lze(e,t,n),this.decoder=new dze(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const mze=({name:e,prefix:t,encode:n,decode:r})=>new hze(e,t,n,r),yze=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=cze(n,t);return mze({prefix:e,name:t,encode:r,decode:e=>uze(i(e))})},bze=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>mze({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let a="",o=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],o+=8;o>n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<<n-o]),r)for(;a.length*n&7;)a+="=";return a})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;const o=new Uint8Array(a*n/8|0);let s=0,c=0,u=0;for(let t=0;t<a;++t){const a=i[e[t]];if(void 0===a)throw new SyntaxError(`Non-${r} character`);c=c<<n|a,s+=n,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o})(t,r,n,e)}),gze=mze({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var vze=Object.freeze({__proto__:null,identity:gze});const wze=bze({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Tze=Object.freeze({__proto__:null,base2:wze});const Eze=bze({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Aze=Object.freeze({__proto__:null,base8:Eze});const xze=yze({prefix:"9",name:"base10",alphabet:"0123456789"});var Oze=Object.freeze({__proto__:null,base10:xze});const Cze=bze({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ize=bze({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var _ze=Object.freeze({__proto__:null,base16:Cze,base16upper:Ize});const Pze=bze({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sze=bze({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),kze=bze({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Rze=bze({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Nze=bze({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Mze=bze({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Dze=bze({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Lze=bze({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),jze=bze({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Fze=Object.freeze({__proto__:null,base32:Pze,base32upper:Sze,base32pad:kze,base32padupper:Rze,base32hex:Nze,base32hexupper:Mze,base32hexpad:Dze,base32hexpadupper:Lze,base32z:jze});const Bze=yze({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Uze=yze({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var zze=Object.freeze({__proto__:null,base36:Bze,base36upper:Uze});const Hze=yze({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Wze=yze({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Vze=Object.freeze({__proto__:null,base58btc:Hze,base58flickr:Wze});const Gze=bze({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),qze=bze({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Kze=bze({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Xze=bze({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Yze=Object.freeze({__proto__:null,base64:Gze,base64pad:qze,base64url:Kze,base64urlpad:Xze});const Zze=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Jze=Zze.reduce(((e,t,n)=>(e[n]=t,e)),[]),Qze=Zze.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);const $ze=mze({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Jze[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Qze[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var eHe=Object.freeze({__proto__:null,base256emoji:$ze}),tHe=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=iHe;)n[r++]=255&t|nHe,t/=128;for(;t&rHe;)n[r++]=255&t|nHe,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},nHe=128,rHe=-128,iHe=Math.pow(2,31);var aHe=function e(t,n){var r,i=0,a=(n=n||0,0),o=n,s=t.length;do{if(o>=s)throw e.bytes=0,new RangeError("Could not decode varint");r=t[o++],i+=a<28?(r&sHe)<<a:(r&sHe)*Math.pow(2,a),a+=7}while(r>=oHe);return e.bytes=o-n,i},oHe=128,sHe=127;var cHe=Math.pow(2,7),uHe=Math.pow(2,14),lHe=Math.pow(2,21),dHe=Math.pow(2,28),fHe=Math.pow(2,35),pHe=Math.pow(2,42),hHe=Math.pow(2,49),mHe=Math.pow(2,56),yHe=Math.pow(2,63),bHe={encode:tHe,decode:aHe,encodingLength:function(e){return e<cHe?1:e<uHe?2:e<lHe?3:e<dHe?4:e<fHe?5:e<pHe?6:e<hHe?7:e<mHe?8:e<yHe?9:10}},gHe=bHe;const vHe=(e,t,n=0)=>(gHe.encode(e,t,n),t),wHe=e=>gHe.encodingLength(e),THe=(e,t)=>{const n=t.byteLength,r=wHe(e),i=r+wHe(n),a=new Uint8Array(i+n);return vHe(e,a,0),vHe(n,a,r),a.set(t,i),new EHe(e,n,t,a)};let EHe=class{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};const AHe=({name:e,code:t,encode:n})=>new xHe(e,t,n);let xHe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?THe(this.code,t):t.then((e=>THe(this.code,e)))}throw Error("Unknown type, must be binary type")}};const OHe=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),CHe=AHe({name:"sha2-256",code:18,encode:OHe("SHA-256")}),IHe=AHe({name:"sha2-512",code:19,encode:OHe("SHA-512")});Object.freeze({__proto__:null,sha256:CHe,sha512:IHe});const _He=uze,PHe={code:0,name:"identity",encode:_He,digest:e=>THe(0,_He(e))};Object.freeze({__proto__:null,identity:PHe});new TextEncoder,new TextDecoder;const SHe={...vze,...Tze,...Aze,...Oze,..._ze,...Fze,...zze,...Vze,...Yze,...eHe};function kHe(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function RHe(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const NHe=RHe("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),MHe=RHe("ascii","a",(e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?kHe(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t})),DHe={utf8:NHe,"utf-8":NHe,hex:SHe.base16,latin1:MHe,ascii:MHe,binary:MHe,...SHe};const LHe="core",jHe=`wc@2:${LHe}:`,FHe="error",BHe={database:":memory:"},UHe="client_ed25519_seed",zHe=OLe.ONE_DAY,HHe=OLe.SIX_HOURS,WHe="wss://relay.walletconnect.com",VHe="wss://relay.walletconnect.org",GHe="relayer_message",qHe="relayer_message_ack",KHe="relayer_connect",XHe="relayer_disconnect",YHe="relayer_error",ZHe="relayer_connection_stalled",JHe="relayer_publish",QHe="payload",$He="connect",eWe="disconnect",tWe="error",nWe=OLe.ONE_SECOND,rWe="subscription_created",iWe="subscription_deleted",aWe="subscription_sync",oWe="subscription_resubscribed",sWe=1e3*OLe.FIVE_SECONDS,cWe={wc_pairingDelete:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:0},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:0}}},uWe="pairing_create",lWe="pairing_expire",dWe="pairing_delete",fWe="pairing_ping",pWe="history_created",hWe="history_updated",mWe="history_deleted",yWe="history_sync",bWe="expirer_created",gWe="expirer_deleted",vWe="expirer_expired",wWe="expirer_sync",TWe="verify-api",EWe="https://verify.walletconnect.com",AWe="https://verify.walletconnect.org",xWe=[EWe,AWe];let OWe=class extends JBe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const n=Oje(t);let r=this.messages.get(e);return typeof r>"u"&&(r={}),typeof r[n]<"u"||(r[n]=t,this.messages.set(e,r),await this.persist()),n},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[Oje(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=HBe.generateChildLogger(e,this.name),this.core=t}get context(){return HBe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Kje(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Xje(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}};class CWe extends QBe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new dMe,this.name="publisher",this.queue=new Map,this.publishTimeout=OLe.toMiliseconds(2*OLe.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,n)=>{var r;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}});try{const i=n?.ttl||HHe,a=rFe(n),o=n?.prompt||!1,s=n?.tag||0,c=n?.id||jUe().toString(),u={topic:e,message:t,opts:{ttl:i,relay:a,prompt:o,tag:s,id:c}},l=setTimeout((()=>this.queue.set(c,u)),this.publishTimeout);try{await await Zje(this.rpcPublish(e,t,i,a,o,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(JHe,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(r=n?.internal)&&r.throwOnFailedPublish)throw this.removeRequestFromQueue(c),e;return}finally{clearTimeout(l)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=HBe.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return HBe.getLoggerContext(this.logger)}rpcPublish(e,t,n,r,i,a,o){var s,c,u,l;const d={method:iFe(r.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:i,tag:a},id:o};return OFe(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),OFe(null==(u=d.params)?void 0:u.tag)&&(null==(l=d.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:n,opts:r}=e;await this.publish(t,n,r)}))}registerEventListeners(){this.relayer.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(ZHe);this.checkQueue()})),this.relayer.on(qHe,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class IWe{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const r=n.filter((e=>e!==t));r.length?this.map.set(e,r):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var _We=Object.defineProperty,PWe=Object.defineProperties,SWe=Object.getOwnPropertyDescriptors,kWe=Object.getOwnPropertySymbols,RWe=Object.prototype.hasOwnProperty,NWe=Object.prototype.propertyIsEnumerable,MWe=(e,t,n)=>t in e?_We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DWe=(e,t)=>{for(var n in t||(t={}))RWe.call(t,n)&&MWe(e,n,t[n]);if(kWe)for(var n of kWe(t))NWe.call(t,n)&&MWe(e,n,t[n]);return e},LWe=(e,t)=>PWe(e,SWe(t));let jWe=class extends tUe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new IWe,this.events=new dMe,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=jHe,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(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const n=rFe(t),r={topic:e,relay:n};this.pending.set(e,r);const i=await this.rpcSubscribe(e,n);return this.onSubscribe(i,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;const t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((n,r)=>{const i=new OLe.Watch;i.start(t);const a=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(a),i.stop(t),n(!0)),i.elapsed(t)>=sWe&&(clearInterval(a),i.stop(t),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=HBe.generateChildLogger(t,this.name),this.clientId=""}get context(){return HBe.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(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map((async n=>await this.unsubscribeById(e,n,t))))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const r=rFe(n);await this.rpcUnsubscribe(e,t,r);const i=EFe("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const n={method:iFe(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Zje(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(ZHe)}return Oje(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:iFe(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await Zje(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(ZHe)}}rpcUnsubscribe(e,t,n){const r={method:iFe(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(e,t){this.setSubscription(e,LWe(DWe({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,DWe({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,DWe({},t)),this.topicMap.set(t.topic,e),this.events.emit(rWe,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(iWe,LWe(DWe({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(aWe)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(oWe)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);AFe(t)&&this.onBatchSubscribe(t.map(((t,n)=>LWe(DWe({},e[n]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(KHe,(async()=>{await this.onConnect()})),this.relayer.on(XHe,(()=>{this.onDisconnect()})),this.events.on(rWe,(async e=>{const t=rWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(iWe,(async e=>{const t=iWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}};var FWe=Object.defineProperty,BWe=Object.getOwnPropertySymbols,UWe=Object.prototype.hasOwnProperty,zWe=Object.prototype.propertyIsEnumerable,HWe=(e,t,n)=>t in e?FWe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let WWe=class extends $Be{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new dMe,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async e=>{this.logger.debug("Publishing Request Payload");const t=e.id,n=this.provider.request(e);this.requestsInFlight.set(t,{promise:n,request:e});try{return await this.toEstablishConnection(),await n}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}finally{this.requestsInFlight.delete(t)}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(KHe)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(YHe,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(QHe,this.onPayloadHandler),this.provider.on($He,this.onConnectHandler),this.provider.on(eWe,this.onDisconnectHandler),this.provider.on(tWe,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?HBe.generateChildLogger(e.logger,this.name):HBe.pino(HBe.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new OWe(this.logger,e.core),this.subscriber=new jWe(this,this.logger),this.publisher=new CWe(this,this.logger),this.relayUrl=e?.relayUrl||WHe,this.projectId=e.projectId,this.bundleId=function(){var e;try{return zje()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}(),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 ${VHe}...`),await this.restartTransport(VHe)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return HBe.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let r,i=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"";if(i)return i;const a=t=>{t.topic===e&&(this.subscriber.off(rWe,a),r())};return await Promise.all([new Promise((e=>{r=e,this.subscriber.on(rWe,a)})),new Promise((async n=>{i=await this.subscriber.subscribe(e,t),n()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach((async e=>{await e.promise}))),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Zje(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(oWe,(()=>{e()}))})),new Promise((async(e,t)=>{try{await Zje(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(eWe)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await zFe())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new eze(new class{constructor(e){if(this.url=e,this.events=new dMe,this.registering=!1,!KUe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(yBe(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!KUe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const r=new URLSearchParams(e).get("origin"),i=RUe.isReactNative()?{headers:{origin:r}}:{rejectUnauthorized:!XUe(e)},a=new nze(e,[],i);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?a.onerror=e=>{const t=e;n(this.emitError(t.error))}:a.on("error",(e=>{n(this.emitError(e))})),a.onopen=()=>{this.onOpen(a),t(a)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?mBe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=UUe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return SUe(e,tze(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${tze(this.url)}`));return this.events.emit("register_error",t),t}}(Gje({sdkVersion:"2.11.1",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||0===n.length)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const r=this.messages.has(t,n);return r&&this.logger.debug(`Ignoring duplicate message: ${n}`),r}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),ZUe(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:n,message:r,publishedAt:i}=t.data,a={topic:n,message:r,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var n in t||(t={}))UWe.call(t,n)&&HWe(e,n,t[n]);if(BWe)for(var n of BWe(t))zWe.call(t,n)&&HWe(e,n,t[n]);return e})({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else JUe(e)&&this.events.emit(qHe,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(GHe,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=BUe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(QHe,this.onPayloadHandler),this.provider.off($He,this.onConnectHandler),this.provider.off(eWe,this.onDisconnectHandler),this.provider.off(tWe,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(ZHe,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await zFe();HFe((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(XHe),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),OLe.toMiliseconds(nWe)))}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}};var VWe=Object.defineProperty,GWe=Object.getOwnPropertySymbols,qWe=Object.prototype.hasOwnProperty,KWe=Object.prototype.propertyIsEnumerable,XWe=(e,t,n)=>t in e?VWe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YWe=(e,t)=>{for(var n in t||(t={}))qWe.call(t,n)&&XWe(e,n,t[n]);if(GWe)for(var n of GWe(t))KWe.call(t,n)&&XWe(e,n,t[n]);return e};let ZWe=class extends eUe{constructor(e,t,n,r=jHe,i=void 0){super(e,t,n,r),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!OFe(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((n=>ize(t[n],e[n]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const n=YWe(YWe({},this.getData(e)),t);this.map.set(e,n),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=HBe.generateChildLogger(t,this.name),this.storagePrefix=r,this.getKey=i}get context(){return HBe.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(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}},JWe=class extends ZBe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new dMe,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,n)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:n}),this.records.has(t.id))return;const r={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:n,expiry:$je(OLe.THIRTY_DAYS)};this.records.set(r.id,r),this.events.emit(pWe,r)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=$Ue(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(hWe,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((n=>{if(n.topic===e){if(typeof t<"u"&&n.id!==t)return;this.records.delete(n.id),this.events.emit(mWe,n)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=HBe.generateChildLogger(t,this.name)}get context(){return HBe.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 e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:FUe(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(yWe)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(pWe,(e=>{const t=pWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(hWe,(e=>{const t=hWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(mWe,(e=>{const t=mWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{OLe.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}},QWe=class extends nUe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new dMe,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const n=this.formatTarget(e),r={target:n,expiry:t};this.expirations.set(n,r),this.checkExpiry(n,r),this.events.emit(bWe,{target:n,expiration:r})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),n=this.getExpiration(t);this.expirations.delete(t),this.events.emit(gWe,{target:t,expiration:n})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=HBe.generateChildLogger(t,this.name)}get context(){return HBe.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(e){if("string"==typeof e)return function(e){return Jje("topic",e)}(e);if("number"==typeof e)return function(e){return Jje("id",e)}(e);const{message:t}=TFe("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(wWe)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=TFe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:n}=t;OLe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(vWe,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(EBe.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(bWe,(e=>{const t=bWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(vWe,(e=>{const t=vWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(gWe,(e=>{const t=gWe;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}},$We=class extends rUe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=TWe,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||zje()||!Hje())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=AWe;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let n;try{n=await this.fetchAttestation(e.attestationId,t)}catch(r){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(r),n=await this.fetchAttestation(e.attestationId,AWe)}return n},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*OLe.ONE_SECOND),r=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===r.status?await r.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=n=>{"verify_ready"===n.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((n=>{if(document.getElementById(TWe))return n();window.addEventListener("message",t);const r=document.createElement("iframe");r.id=TWe,r.src=`${this.verifyUrl}/${this.projectId}`,r.style.display="none",document.body.append(r),this.iframe=r,e=n})),new Promise(((e,n)=>setTimeout((()=>{window.removeEventListener("message",t),n("verify iframe load timeout")}),OLe.toMiliseconds(OLe.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||EWe;return xWe.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${EWe}`),t=EWe),t},this.logger=HBe.generateChildLogger(t,this.name),this.verifyUrl=EWe,this.abortController=new AbortController,this.isDevEnv=Uje()&&process.env.IS_VITEST}get context(){return HBe.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),OLe.toMiliseconds(e))}},eVe=class extends iUe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:n,notificationType:r,enableEncrypted:i=!1}=e,a=`https://echo.walletconnect.com/${this.projectId}/clients`;await oze(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:r,token:n,always_raw:i})})},this.logger=HBe.generateChildLogger(t,this.context)}};var tVe=Object.defineProperty,nVe=Object.getOwnPropertySymbols,rVe=Object.prototype.hasOwnProperty,iVe=Object.prototype.propertyIsEnumerable,aVe=(e,t,n)=>t in e?tVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oVe=(e,t)=>{for(var n in t||(t={}))rVe.call(t,n)&&aVe(e,n,t[n]);if(nVe)for(var n of nVe(t))iVe.call(t,n)&&aVe(e,n,t[n]);return e};const sVe=class e extends YBe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=LHe,this.events=new dMe,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||WHe,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:HBe.pino(HBe.getDefaultLoggerOptions({level:e?.logger||FHe}));this.logger=HBe.generateChildLogger(t,this.name),this.heartbeat=new EBe.HeartBeat,this.crypto=new class{constructor(e,t,n){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),wUe(EUe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=cDe.generateKeyPair();return{privateKey:dLe(e.secretKey,mje),publicKey:dLe(e.publicKey,mje)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=EUe(await this.getClientSeed()),n=xje(),r=zHe;return await AUe(n,e,r,t)},this.generateSharedKey=(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=cDe.sharedKey(lLe(e,mje),lLe(t,mje),!0);return dLe(new $Me(sDe.SHA256,n).expand(Aje),mje)}(this.getPrivateKey(e),t);return this.setSymKey(r,n)},this.setSymKey=async(e,t)=>{this.isInitialized();const n=t||function(e){return dLe(sDe.hash(lLe(e,mje)),mje)}(e);return await this.keychain.set(n,e),n},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,n)=>{this.isInitialized();const r=Pje(n),i=yBe(t);if(Sje(r)){const t=r.senderPublicKey,n=r.receiverPublicKey;e=await this.generateSharedKey(t,n)}const a=this.getSymKey(e),{type:o,senderPublicKey:s}=r;return Ije({type:o,symKey:a,message:i,senderPublicKey:s})},this.decode=async(e,t,n)=>{this.isInitialized();const r=function(e,t){const n=_je(e);return Pje({type:Cje(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?dLe(n.senderPublicKey,mje):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,n);if(Sje(r)){const t=r.receiverPublicKey,n=r.senderPublicKey;e=await this.generateSharedKey(t,n)}try{const n=function(e){const t=new gMe.ChaCha20Poly1305(lLe(e.symKey,mje)),{sealed:n,iv:r}=_je(e.encoded),i=t.open(r,n);if(null===i)throw new Error("Failed to decrypt");return dLe(i,bje)}({symKey:this.getSymKey(e),encoded:t});return mBe(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>Cje(_je(e).type),this.getPayloadSenderPublicKey=e=>{const t=_je(e);return t.senderPublicKey?dLe(t.senderPublicKey,mje):void 0},this.core=e,this.logger=HBe.generateChildLogger(t,this.name),this.keychain=n||new class{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=jHe,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=TFe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=HBe.generateChildLogger(t,this.name)}get context(){return HBe.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Kje(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Xje(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this.core,this.logger)}get context(){return HBe.getLoggerContext(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(UHe)}catch{e=xje(),await this.keychain.set(UHe,e)}return function(e,t="utf8"){const n=DHe[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${e}`):kHe(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}}(this,this.logger,e?.keychain),this.history=new JWe(this,this.logger),this.expirer=new QWe(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new class{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new class{constructor(){this.localStorage=vBe.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(wBe)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return mBe(t)}async setItem(e,t){this.localStorage.setItem(e,yBe(t))}async removeItem(e){this.localStorage.removeItem(e)}};this.storage=e;try{const t=new class{constructor(){this.indexedDb=iBe({driver:bBe({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,yBe(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};(async(e,t,n)=>{const r="wc_storage_version",i=await t.getItem(r);if(i&&i>=1)return void n(t);const a=await e.getKeys();if(!a.length)return void n(t);const o=[];for(;a.length;){const n=a.shift();if(!n)continue;const r=n.toLowerCase();if(r.includes("wc@")||r.includes("walletconnect")||r.includes("wc_")||r.includes("wallet_connect")){const r=await e.getItem(n);await t.setItem(n,r),o.push(n)}}await t.setItem(r,1),n(t),TBe(e,o)})(e,t,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(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}(oVe(oVe({},BHe),e?.storageOptions)),this.relayer=new WWe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new class{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new dMe,this.initialized=!1,this.storagePrefix=jHe,this.ignoredPayloadTypes=[vje],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:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=xje(),t=await this.core.crypto.setSymKey(e),n=$je(OLe.FIVE_MINUTES),r={protocol:"irn"},i={topic:t,expiry:n,relay:r,active:!1},a=mFe({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:r,expiryTimestamp:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,n),{topic:t,uri:a}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:n,relay:r,expiryTimestamp:i}=pFe(e.uri);let a;if(this.pairings.keys.includes(t)&&(a=this.pairings.get(t),a.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const o=i||$je(OLe.FIVE_MINUTES),s={topic:t,relay:r,expiry:o,active:!1};return await this.pairings.set(t,s),this.core.expirer.set(t,o),e.activatePairing&&await this.activate({topic:t}),this.events.emit(uWe,s),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(n,t),await this.core.relayer.subscribe(t,{relay:r})),s},this.activate=async({topic:e})=>{this.isInitialized();const t=$je(OLe.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:n,resolve:r,reject:i}=Yje();this.events.once(tFe("pairing_ping",e),(({error:e})=>{e?i(e):r()})),await n()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",EFe("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,n)=>{const r=FUe(t,n),i=await this.core.crypto.encode(e,r),a=cWe[t].req;return this.core.history.set(e,r),this.core.relayer.publish(e,i,a),r.id},this.sendResult=async(e,t,n)=>{const r=BUe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=cWe[a.request.method].res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.sendError=async(e,t,n)=>{const r=UUe(e,n),i=await this.core.crypto.encode(t,r),a=await this.core.history.get(t,e),o=cWe[a.request.method]?cWe[a.request.method].res:cWe.unregistered_method.res;await this.core.relayer.publish(t,i,o),await this.core.history.resolve(r)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,EFe("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>eFe(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:n}=e;switch(n.method){case"wc_pairingPing":return this.onPairingPingRequest(t,n);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,n);default:return this.onUnknownRpcMethodRequest(t,n)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.core.history.get(t,n.id)).request.method;return"wc_pairingPing"===r?this.onPairingPingResponse(t,n):this.onUnknownRpcMethodResponse(r)},this.onPairingPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult(n,e,!0),this.events.emit(fWe,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{QUe(t)?this.events.emit(tFe("pairing_ping",n),{}):$Ue(t)&&this.events.emit(tFe("pairing_ping",n),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(dWe,{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:n,method:r}=t;try{if(this.registeredMethods.includes(r))return;const t=EFe("WC_METHOD_UNSUPPORTED",r);await this.sendError(n,e,t),this.logger.error(t)}catch(t){await this.sendError(n,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(EFe("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(CFe(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=TFe("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const n=pFe(e.uri);if(null==(t=n?.relay)||!t.protocol){const{message:e}=TFe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==n||!n.symKey){const{message:e}=TFe("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=n&&n.expiryTimestamp&&OLe.toMiliseconds(n?.expiryTimestamp)<Date.now()){const{message:e}=TFe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!CFe(e,!1)){const{message:t}=TFe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=TFe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=HBe.generateChildLogger(t,this.name),this.pairings=new ZWe(this.core,this.logger,this.name,this.storagePrefix)}get context(){return HBe.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(GHe,(async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const r=await this.core.crypto.decode(t,n);try{ZUe(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):JUe(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(vWe,(async e=>{const{topic:t}=Qje(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(lWe,{topic:t}))}))}}(this,this.logger),this.verify=new $We(this.projectId||"",this.logger),this.echoClient=new eVe(this.projectId||"",this.logger)}static async init(t){const n=new e(t);await n.initialize();const r=await n.crypto.getClientId();return await n.storage.setItem("WALLETCONNECT_CLIENT_ID",r),n}get context(){return HBe.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(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}},cVe="client",uVe=`wc@2:${cVe}:`,lVe=cVe,dVe="error",fVe="WALLETCONNECT_DEEPLINK_CHOICE",pVe="Proposal expired",hVe=OLe.SEVEN_DAYS,mVe={wc_sessionPropose:{req:{ttl:OLe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:OLe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:OLe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:OLe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:OLe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:OLe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:OLe.THIRTY_SECONDS,prompt:!1,tag:1115}}},yVe={min:OLe.FIVE_MINUTES,max:OLe.SEVEN_DAYS},bVe="IDLE",gVe="ACTIVE",vVe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var wVe=Object.defineProperty,TVe=Object.defineProperties,EVe=Object.getOwnPropertyDescriptors,AVe=Object.getOwnPropertySymbols,xVe=Object.prototype.hasOwnProperty,OVe=Object.prototype.propertyIsEnumerable,CVe=(e,t,n)=>t in e?wVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IVe=(e,t)=>{for(var n in t||(t={}))xVe.call(t,n)&&CVe(e,n,t[n]);if(AVe)for(var n of AVe(t))OVe.call(t,n)&&CVe(e,n,t[n]);return e},_Ve=(e,t)=>TVe(e,EVe(t));class PVe extends oUe{constructor(e){super(e),this.name="engine",this.events=new dMe,this.initialized=!1,this.ignoredPayloadTypes=[vje],this.requestQueue={state:bVe,queue:[]},this.sessionRequestQueue={state:bVe,queue:[]},this.requestQueueDelay=OLe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(mVe)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),OLe.toMiliseconds(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=_Ve(IVe({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:n,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:a,relays:o}=t;let s,c=n,u=!1;if(c&&(u=this.client.core.pairing.pairings.get(c).active),!c||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,s=t}const l=await this.client.core.crypto.generateKeyPair(),d=mVe.wc_sessionPropose.req.ttl||OLe.FIVE_MINUTES,f=$je(d),p=IVe({requiredNamespaces:r,optionalNamespaces:i,relays:o??[{protocol:"irn"}],proposer:{publicKey:l,metadata:this.client.metadata},expiryTimestamp:f},a&&{sessionProperties:a}),{reject:h,resolve:m,done:y}=Yje(d,pVe);if(this.events.once(tFe("session_connect"),(async({error:e,session:t})=>{if(e)h(e);else if(t){t.self.publicKey=l;const e=_Ve(IVe({},t),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),m(e)}})),!c){const{message:e}=TFe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const b=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,IVe({id:b},p)),{uri:s,approval:y}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:n,namespaces:r,sessionProperties:i}=e,a=this.client.proposal.get(t);let{pairingTopic:o,proposer:s,requiredNamespaces:c,optionalNamespaces:u}=a;o=o||"";const l=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,f=await this.client.core.crypto.generateSharedKey(l,d);o&&t&&(await this.client.core.pairing.updateMetadata({topic:o,metadata:s.metadata}),await this.sendResult({id:t,topic:o,result:{relay:{protocol:n??"irn"},responderPublicKey:l}}),await this.client.proposal.delete(t,EFe("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:o}));const p=IVe({relay:{protocol:n??"irn"},namespaces:r,pairingTopic:o,controller:{publicKey:l,metadata:this.client.metadata},expiry:$je(hVe)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f);const h=_Ve(IVe({},p),{topic:f,requiredNamespaces:c,optionalNamespaces:u,pairingTopic:o,acknowledged:!1,self:p.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:l});await this.client.session.set(f,h);try{await this.sendRequest({topic:f,method:"wc_sessionSettle",params:p,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(f,EFe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(f),e}return await this.setExpiry(f,$je(hVe)),{topic:f,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(f))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:n}=e,{pairingTopic:r}=this.client.proposal.get(t);r&&(await this.sendError(t,r,n),await this.client.proposal.delete(t,EFe("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:n}=e,r=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:n}}),{done:i,resolve:a,reject:o}=Yje();return this.events.once(tFe("session_update",r),(({error:e})=>{e?o(e):a()})),await this.client.session.update(t,{namespaces:n}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,n=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:r,resolve:i,reject:a}=Yje();return this.events.once(tFe("session_extend",n),(({error:e})=>{e?a(e):i()})),await this.setExpiry(t,$je(hVe)),{acknowledged:r}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:r,expiry:i=mVe.wc_sessionRequest.req.ttl}=e,a=LUe(),{done:o,resolve:s,reject:c}=Yje(i,"Request expired. Please try again.");return this.events.once(tFe("session_request",a),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:a,topic:r,method:"wc_sessionRequest",params:{request:_Ve(IVe({},n),{expiryTimestamp:$je(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:r,request:n,chainId:t,id:a}),e()})),new Promise((async e=>{const t=await async function(e,t){try{return await e.getItem(t)||(Hje()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,fVe);(async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const r="string"==typeof n?JSON.parse(n):n;let i=r?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));const a=`${i}/wc?requestId=${e}&sessionTopic=${t}`,o=Wje();o===Fje.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===Fje.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(e){console.error(e)}})({id:a,topic:r,wcDeepLink:t}),e()})),o()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:n}=e,{id:r}=n;QUe(n)?await this.sendResult({id:r,topic:t,result:n.result,throwOnFailedPublish:!0}):$Ue(n)&&await this.sendError(r,t,n.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:n,resolve:r,reject:i}=Yje();this.events.once(tFe("session_ping",e),(({error:e})=>{e?i(e):r()})),await n()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:n,chainId:r}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:n,chainId:r}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:EFe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=TFe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n);let a=!0;return!!qje(i,r)&&(r.forEach((t=>{const{accounts:r,methods:i,events:o}=e.namespaces[t],s=yFe(r),c=n[t];qje(pje(t,c),s)&&qje(c.methods,i)&&qje(c.events,o)||(a=!1)})),a)}(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),n=this.client.core.pairing.pairings.getAll().filter((n=>{var r,i;return(null==(r=n.peerMetadata)?void 0:r.url)&&(null==(i=n.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&n.topic&&n.topic!==t.topic}));if(0===n.length)return;this.client.logger.info(`Cleaning up ${n.length} duplicate pairing(s)`),await Promise.all(n.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{const{topic:t,expirerHasDeleted:n=!1,emitEvent:r=!0,id:i=0}=e,{self:a}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,EFe("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),n||this.client.core.expirer.del(t),this.client.core.storage.removeItem(fVe).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,EFe("USER_DISCONNECTED"))})),r&&this.client.events.emit("session_delete",{id:i,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,EFe("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,n=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),n?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(this.sessionRequestQueue.state=bVe,this.client.events.emit("session_request_expire",{id:e}))},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,$je(mVe.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:t,topic:n,params:r,verifyContext:i}=e,a=r.request.expiryTimestamp||$je(mVe.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:n,params:r,verifyContext:i}),a&&this.client.core.expirer.set(t,a)},this.sendRequest=async e=>{const{topic:t,method:n,params:r,expiry:i,relayRpcId:a,clientRpcId:o,throwOnFailedPublish:s}=e,c=FUe(n,r,o);if(Hje()&&vVe.includes(n)){const e=Oje(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,c),l=mVe[n].req;return i&&(l.ttl=i),a&&(l.id=a),this.client.core.history.set(t,c),s?(l.internal=_Ve(IVe({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,l)):this.client.core.relayer.publish(t,u,l).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:n,result:r,throwOnFailedPublish:i}=e,a=BUe(t,r),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,t),c=mVe[s.request.method].res;i?(c.internal=_Ve(IVe({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,o,c)):this.client.core.relayer.publish(n,o,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(a)},this.sendError=async(e,t,n)=>{const r=UUe(e,n),i=await this.client.core.crypto.encode(t,r),a=await this.client.core.history.get(t,e),o=mVe[a.request.method].res;this.client.core.relayer.publish(t,i,o),await this.client.core.history.resolve(r)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let n=!1;eFe(t.expiry)&&(n=!0),this.client.core.crypto.keychain.has(t.topic)||(n=!0),n&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{eFe(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==gVe){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=gVe;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=bVe}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:n}=e,r=n.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeRequest(t,n);case"wc_sessionSettle":return this.onSessionSettleRequest(t,n);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,n);case"wc_sessionExtend":return this.onSessionExtendRequest(t,n);case"wc_sessionPing":return this.onSessionPingRequest(t,n);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,n);case"wc_sessionRequest":return this.onSessionRequest(t,n);case"wc_sessionEvent":return this.onSessionEventRequest(t,n);default:return this.client.logger.info(`Unsupported request method ${r}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:n}=e,r=(await this.client.core.history.get(t,n.id)).request.method;switch(r){case"wc_sessionPropose":return this.onSessionProposeResponse(t,n);case"wc_sessionSettle":return this.onSessionSettleResponse(t,n);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,n);case"wc_sessionExtend":return this.onSessionExtendResponse(t,n);case"wc_sessionPing":return this.onSessionPingResponse(t,n);case"wc_sessionRequest":return this.onSessionRequestResponse(t,n);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:n}=TFe("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(n)},this.onSessionProposeRequest=async(e,t)=>{const{params:n,id:r}=t;try{this.isValidConnect(IVe({},t.params));const i=n.expiryTimestamp||$je(mVe.wc_sessionPropose.req.ttl),a=IVe({id:r,pairingTopic:e,expiryTimestamp:i},n);await this.setProposal(r,a);const o=Oje(JSON.stringify(t)),s=await this.getVerifyContext(o,a.proposer.metadata);this.client.events.emit("session_proposal",{id:r,params:a,verifyContext:s})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:n}=t;if(QUe(t)){const{result:r}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:r});const i=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const a=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const o=r.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});const s=await this.client.core.crypto.generateSharedKey(a,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});const c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else $Ue(t)&&(await this.client.proposal.delete(n,EFe("USER_DISCONNECTED")),this.events.emit(tFe("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidSessionSettleRequest(r);const{relay:n,controller:i,expiry:a,namespaces:o,sessionProperties:s,pairingTopic:c}=t.params,u=IVe({topic:e,relay:n,expiry:a,namespaces:o,acknowledged:!0,pairingTopic:c,requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},s&&{sessionProperties:s});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(tFe("session_connect"),{session:u}),this.cleanupDuplicatePairings(u)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:n}=t;QUe(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(tFe("session_approve",n),{})):$Ue(t)&&(await this.client.session.delete(e,EFe("USER_DISCONNECTED")),this.events.emit(tFe("session_approve",n),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:n,id:r}=t;try{const t=`${e}_session_update`,i=VFe.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidUpdate(IVe({topic:e},n)),await this.client.session.update(e,{namespaces:n.namespaces}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_update",{id:r,topic:e,params:n}),VFe.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:n}=t;QUe(t)?this.events.emit(tFe("session_update",n),{}):$Ue(t)&&this.events.emit(tFe("session_update",n),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:n}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,$je(hVe)),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_extend",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:n}=t;QUe(t)?this.events.emit(tFe("session_extend",n),{}):$Ue(t)&&this.events.emit(tFe("session_extend",n),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:n}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_ping",{id:n,topic:e})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:n}=t;setTimeout((()=>{QUe(t)?this.events.emit(tFe("session_ping",n),{}):$Ue(t)&&this.events.emit(tFe("session_ping",n),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:n}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(JHe,(async()=>{t(await this.deleteSession({topic:e,id:n}))}))})),this.sendResult({id:n,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:EFe("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:n,params:r}=t;try{this.isValidRequest(IVe({topic:e},r));const t=Oje(JSON.stringify(FUe("wc_sessionRequest",r,n))),i=this.client.session.get(e),a={id:n,topic:e,params:r,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(a),this.addSessionRequestToSessionRequestQueue(a),this.processSessionRequestQueue()}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:n}=t;QUe(t)?this.events.emit(tFe("session_request",n),{result:t.result}):$Ue(t)&&this.events.emit(tFe("session_request",n),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:n,params:r}=t;try{const t=`${e}_session_event_${r.event.name}`,i=VFe.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidEmit(IVe({topic:e},r)),this.client.events.emit("session_event",{id:n,topic:e,params:r}),VFe.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=bVe,this.processSessionRequestQueue()}),OLe.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{const n=this.client.core.history.pending;n.length>0&&n.filter((t=>t.topic===e&&"wc_sessionRequest"===t.request.method)).forEach((e=>{this.events.emit(tFe("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===gVe)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=gVe,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,FUe("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:n,optionalNamespaces:r,sessionProperties:i,relays:a}=e;if(OFe(t)||await this.isValidPairingTopic(t),!function(e,t){let n=!1;return t&&!e?n=!0:e&&AFe(e)&&e.length&&e.forEach((e=>{n=MFe(e)})),n}(a,!0)){const{message:e}=TFe("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(e)}!OFe(n)&&0!==xFe(n)&&this.validateNamespaces(n,"requiredNamespaces"),!OFe(r)&&0!==xFe(r)&&this.validateNamespaces(r,"optionalNamespaces"),OFe(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const n=function(e,t,n){let r=null;if(e&&xFe(e)){const i=RFe(e,t);i&&(r=i);const a=SFe(e,t,n);a&&(r=a)}else r=TFe("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}(e,"connect()",t);if(n)throw new Error(n.message)},this.isValidApprove=async e=>{if(!DFe(e))throw new Error(TFe("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:n,relayProtocol:r,sessionProperties:i}=e;await this.isValidProposalId(t);const a=this.client.proposal.get(t),o=NFe(n,"approve()");if(o)throw new Error(o.message);const s=BFe(a.requiredNamespaces,n,"approve()");if(s)throw new Error(s.message);if(!CFe(r,!0)){const{message:e}=TFe("MISSING_OR_INVALID",`approve() relayProtocol: ${r}`);throw new Error(e)}OFe(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:n}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&IFe(e.code,!1)&&e.message&&CFe(e.message,!1))}(n)){const{message:e}=TFe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:n,namespaces:r,expiry:i}=e;if(!MFe(t)){const{message:e}=TFe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const a=function(e,t){let n=null;return CFe(e?.publicKey,!1)||(n=TFe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);const o=NFe(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);if(eFe(i)){const{message:e}=TFe("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:n}=e;await this.isValidSessionTopic(t);const r=this.client.session.get(t),i=NFe(n,"update()");if(i)throw new Error(i.message);const a=BFe(r.requiredNamespaces,n,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:n,chainId:r,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:a}=this.client.session.get(t);if(!LFe(a,r)){const{message:e}=TFe("MISSING_OR_INVALID",`request() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(OFe(e)||!CFe(e.method,!1))}(n)){const{message:e}=TFe("MISSING_OR_INVALID",`request() ${JSON.stringify(n)}`);throw new Error(e)}if(!jFe(a,r,n.method)){const{message:e}=TFe("MISSING_OR_INVALID",`request() method: ${n.method}`);throw new Error(e)}if(i&&!function(e,t){return IFe(e,!1)&&e<=t.max&&e>=t.min}(i,yVe)){const{message:e}=TFe("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${yVe.min} and ${yVe.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:n,response:r}=e;try{await this.isValidSessionTopic(n)}catch(n){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),n}if(!function(e){return!(OFe(e)||OFe(e.result)&&OFe(e.error)||!IFe(e.id,!1)||!CFe(e.jsonrpc,!1))}(r)){const{message:e}=TFe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:n,chainId:r}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!LFe(i,r)){const{message:e}=TFe("MISSING_OR_INVALID",`emit() chainId: ${r}`);throw new Error(e)}if(!function(e){return!(OFe(e)||!CFe(e.name,!1))}(n)){const{message:e}=TFe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}if(!FFe(i,r,n.name)){const{message:e}=TFe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!DFe(e)){const{message:t}=TFe("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const n={verified:{verifyUrl:t.verifyUrl||EWe,validation:"UNKNOWN",origin:t.url||""}};try{const r=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});r&&(n.verified.origin=r.origin,n.verified.isScam=r.isScam,n.verified.validation=r.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(n)}`),n},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!CFe(e,!1)){const{message:n}=TFe("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(n)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=TFe("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(GHe,(async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const r=await this.client.core.crypto.decode(t,n);try{ZUe(r)?(this.client.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):JUe(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.client.core.history.delete(t,r.id)):this.onRelayEventUnknownPayload({topic:t,payload:r})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(vWe,(async e=>{const{topic:t,id:n}=Qje(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,TFe("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(uWe,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!CFe(e,!1)){const{message:t}=TFe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=TFe("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!CFe(e,!1)){const{message:t}=TFe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=TFe("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=TFe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(CFe(e,!1)){const{message:t}=TFe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=TFe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!function(e){return"number"==typeof e}(e)){const{message:t}=TFe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=TFe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(eFe(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=TFe("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class SVe extends ZWe{constructor(e,t){super(e,t,"proposal",uVe),this.core=e,this.logger=t}}let kVe=class extends ZWe{constructor(e,t){super(e,t,"session",uVe),this.core=e,this.logger=t}};class RVe extends ZWe{constructor(e,t){super(e,t,"request",uVe,(e=>e.id)),this.core=e,this.logger=t}}let NVe=class e extends aUe{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=lVe,this.events=new dMe,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||lVe,this.metadata=e?.metadata||$Le()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:HBe.pino(HBe.getDefaultLoggerOptions({level:e?.logger||dVe}));this.core=e?.core||new sVe(e),this.logger=HBe.generateChildLogger(t,this.name),this.session=new kVe(this.core,this.logger),this.proposal=new SVe(this.core,this.logger),this.pendingRequest=new RVe(this.core,this.logger),this.engine=new PVe(this)}static async init(t){const n=new e(t);return await n.initialize(),n}get context(){return HBe.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(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var MVe={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:ut,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=h(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var n,r,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function T(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},b.call(v.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];T.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,n){return new Promise((function(r,a){var o=new v(e,n);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new T(i,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=f,e.Request=v,e.Response=T),t.Headers=f,t.Request=v,t.Response=T,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(MVe,MVe.exports);var DVe=lt(MVe.exports);const LVe={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class jVe{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new dMe,this.isAvailable=!1,this.registering=!1,!qUe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=yBe(e),n=await DVe(this.url,Object.assign(Object.assign({},LVe),{body:t})),r=await n.json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!qUe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=yBe({id:1,jsonrpc:"2.0",method:"test",params:[]});await DVe(e,Object.assign(Object.assign({},LVe),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?mBe(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=UUe(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return SUe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const FVe="error",BVe="wc@2:universal_provider:",UVe="default_chain_changed";var zVe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},HVe={exports:{}};
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Lodash <https://lodash.com/>
|