vendor: 7,590 bytes, lines 1-18
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CrV_gTjm.js","assets/hooks.module-Cs1IMlRD.js","assets/index-DM7BmEUP.js","assets/events-DQ172AOg.js","assets/browser-C7nXKNNX.js","assets/metamask-sdk-L1y2F8t1.js","assets/index-DaLGzWHy.js","assets/index-BV8s6ez1.js","assets/index-BcMcxWVe.js","assets/index.es-hYxG9yXT.js"])))=>i.map(i=>d[i]); 2var oz=Object.defineProperty;var b4=t=>{throw TypeError(t)};var az=(t,e,n)=>e in t?oz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ae=(t,e,n)=>az(t,typeof e!="symbol"?e+"":e,n),LE=(t,e,n)=>e.has(t)||b4("Cannot "+n);var C=(t,e,n)=>(LE(t,e,"read from private field"),n?n.call(t):e.get(t)),ee=(t,e,n)=>e.has(t)?b4("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),z=(t,e,n,r)=>(LE(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),he=(t,e,n)=>(LE(t,e,"access private method"),n);var $c=(t,e,n,r)=>({set _(i){z(t,e,i,n)},get _(){return C(t,e,r)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Jk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function bme(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var UE={exports:{}},Nm={};/** 3 * @license React 4 * react-jsx-runtime.production.js 5 * 6 * Copyright (c) Meta Platforms, Inc. and affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var w4;function cz(){if(w4)return Nm;w4=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:s}}return Nm.Fragment=e,Nm.jsx=n,Nm.jsxs=n,Nm}var v4;function lz(){return v4||(v4=1,UE.exports=cz()),UE.exports}var G=lz(),FE={exports:{}},st={};/** 11 * @license React 12 * react.production.js 13 * 14 * Copyright (c) Meta Platforms, Inc. and affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var A4;function uz(){if(A4)return st;A4=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function g($){return $===null||typeof $!="object"?null:($=m&&$[m]||$["@@iterator"],typeof $=="function"?$:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,v={};function x($,se,ye){this.props=$,this.context=se,this.refs=v,this.updater=ye||w}x.prototype.isReactComponent={},x.prototype.setState=function($,se){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,se,"setState")},x.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function T(){}T.prototype=x.prototype;function O($,se,ye){this.props=$,this.context=se,this.refs=v,this.updater=ye||w}var k=O.prototype=new T;k.constructor=O,A(k,x.prototype),k.isPureReactComponent=!0;var P=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},U=Object.prototype.hasOwnProperty;function I($,se,ye,pe,me,ve){return ye=ve.ref,{$$typeof:t,type:$,key:se,ref:ye!==void 0?ye:null,props:ve}}function R($,se){return I($.type,se,void 0,void 0,void 0,$.props)}function M($){return typeof $=="object"&&$!==null&&$.$$typeof===t}function F($){var se={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(ye){return se[ye]})}var j=/\/+/g;function q($,se){return typeof $=="object"&&$!==null&&$.key!=null?F(""+$.key):se.toString(36)}function L(){}function Se($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(L,L):($.status="pending",$.then(function(se){$.status==="pending"&&($.status="fulfilled",$.value=se)},function(se){$.status==="pending"&&($.status="rejected",$.reason=se)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function X($,se,ye,pe,me){var ve=typeof $;(ve==="undefined"||ve==="boolean")&&($=null);var _e=!1;if($===null)_e=!0;else switch(ve){case"bigint":case"string":case"number":_e=!0;break;case"object":switch($.$$typeof){case t:case e:_e=!0;break;case h:return _e=$._init,X(_e($._payload),se,ye,pe,me)}}if(_e)return me=me($),_e=pe===""?"."+q($,0):pe,P(me)?(ye="",_e!=null&&(ye=_e.replace(j,"$&/")+"/"),X(me,se,ye,"",function(qe){return qe})):me!=null&&(M(me)&&(me=R(me,ye+(me.key==null||$&&$.key===me.key?"":(""+me.key).replace(j,"$&/")+"/")+_e)),se.push(me)),1;_e=0;var Re=pe===""?".":pe+":";if(P($))for(var De=0;De<$.length;De++)pe=$[De],ve=Re+q(pe,De),_e+=X(pe,se,ye,ve,me);else if(De=g($),typeof De=="function")for($=De.call($),De=0;!(pe=$.next()).done;)pe=pe.value,ve=Re+q(pe,De++),_e+=X(pe,se,ye,ve,me);else if(ve==="object"){if(typeof $.then=="function")return X(Se($),se,ye,pe,me);throw se=String($),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return _e}function Q($,se,ye){if($==null)return $;var pe=[],me=0;return X($,pe,"","",function(ve){return se.call(ye,ve,me++)}),pe}function te($){if($._status===-1){var se=$._result;se=se(),se.then(function(ye){($._status===0||$._status===-1)&&($._status=1,$._result=ye)},function(ye){($._status===0||$._status===-1)&&($._status=2,$._result=ye)}),$._status===-1&&($._status=0,$._result=se)}if($._status===1)return $._result.default;throw $._result}var J=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)};function fe(){}
vendor: 8,715 bytes, lines 18-34
18return st.Children={map:Q,forEach:function($,se,ye){Q($,function(){se.apply(this,arguments)},ye)},count:function($){var se=0;return Q($,function(){se++}),se},toArray:function($){return Q($,function(se){return se})||[]},only:function($){if(!M($))throw Error("React.Children.only expected to receive a single React element child.");return $}},st.Component=x,st.Fragment=n,st.Profiler=i,st.PureComponent=O,st.StrictMode=r,st.Suspense=u,st.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,st.__COMPILER_RUNTIME={__proto__:null,c:function($){return B.H.useMemoCache($)}},st.cache=function($){return function(){return $.apply(null,arguments)}},st.cloneElement=function($,se,ye){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var pe=A({},$.props),me=$.key,ve=void 0;if(se!=null)for(_e in se.ref!==void 0&&(ve=void 0),se.key!==void 0&&(me=""+se.key),se)!U.call(se,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&se.ref===void 0||(pe[_e]=se[_e]);var _e=arguments.length-2;if(_e===1)pe.children=ye;else if(1<_e){for(var Re=Array(_e),De=0;De<_e;De++)Re[De]=arguments[De+2];pe.children=Re}return I($.type,me,void 0,void 0,ve,pe)},st.createContext=function($){return $={$$typeof:a,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:s,_context:$},$},st.createElement=function($,se,ye){var pe,me={},ve=null;if(se!=null)for(pe in se.key!==void 0&&(ve=""+se.key),se)U.call(se,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(me[pe]=se[pe]);var _e=arguments.length-2;if(_e===1)me.children=ye;else if(1<_e){for(var Re=Array(_e),De=0;De<_e;De++)Re[De]=arguments[De+2];me.children=Re}if($&&$.defaultProps)for(pe in _e=$.defaultProps,_e)me[pe]===void 0&&(me[pe]=_e[pe]);return I($,ve,void 0,void 0,null,me)},st.createRef=function(){return{current:null}},st.forwardRef=function($){return{$$typeof:l,render:$}},st.isValidElement=M,st.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:te}},st.memo=function($,se){return{$$typeof:d,type:$,compare:se===void 0?null:se}},st.startTransition=function($){var se=B.T,ye={};B.T=ye;try{var pe=$(),me=B.S;me!==null&&me(ye,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(fe,J)}catch(ve){J(ve)}finally{B.T=se}},st.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},st.use=function($){return B.H.use($)},st.useActionState=function($,se,ye){return B.H.useActionState($,se,ye)},st.useCallback=function($,se){return B.H.useCallback($,se)},st.useContext=function($){return B.H.useContext($)},st.useDebugValue=function(){},st.useDeferredValue=function($,se){return B.H.useDeferredValue($,se)},st.useEffect=function($,se,ye){var pe=B.H;if(typeof ye=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return pe.useEffect($,se)},st.useId=function(){return B.H.useId()},st.useImperativeHandle=function($,se,ye){return B.H.useImperativeHandle($,se,ye)},st.useInsertionEffect=function($,se){return B.H.useInsertionEffect($,se)},st.useLayoutEffect=function($,se){return B.H.useLayoutEffect($,se)},st.useMemo=function($,se){return B.H.useMemo($,se)},st.useOptimistic=function($,se){return B.H.useOptimistic($,se)},st.useReducer=function($,se,ye){return B.H.useReducer($,se,ye)},st.useRef=function($){return B.H.useRef($)},st.useState=function($){return B.H.useState($)},st.useSyncExternalStore=function($,se,ye){return B.H.useSyncExternalStore($,se,ye)},st.useTransition=function(){return B.H.useTransition()},st.version="19.1.1",st}var E4;function Sy(){return E4||(E4=1,FE.exports=uz()),FE.exports}var K=Sy();const S=Jk(K);var VE={exports:{}},Om={},zE={exports:{}},HE={};/** 19 * @license React 20 * scheduler.production.js 21 * 22 * Copyright (c) Meta Platforms, Inc. and affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */var x4;function fz(){return x4||(x4=1,(function(t){function e(Q,te){var J=Q.length;Q.push(te);e:for(;0<J;){var fe=J-1>>>1,$=Q[fe];if(0<i($,te))Q[fe]=te,Q[J]=$,J=fe;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var te=Q[0],J=Q.pop();if(J!==te){Q[0]=J;e:for(var fe=0,$=Q.length,se=$>>>1;fe<se;){var ye=2*(fe+1)-1,pe=Q[ye],me=ye+1,ve=Q[me];if(0>i(pe,J))me<$&&0>i(ve,pe)?(Q[fe]=ve,Q[me]=J,fe=me):(Q[fe]=pe,Q[ye]=J,fe=ye);else if(me<$&&0>i(ve,J))Q[fe]=ve,Q[me]=J,fe=me;else break e}}return te}function i(Q,te){var J=Q.sortIndex-te.sortIndex;return J!==0?J:Q.id-te.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var u=[],d=[],h=1,m=null,g=3,w=!1,A=!1,v=!1,x=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function P(Q){for(var te=n(d);te!==null;){if(te.callback===null)r(d);else if(te.startTime<=Q)r(d),te.sortIndex=te.expirationTime,e(u,te);else break;te=n(d)}}function B(Q){if(v=!1,P(Q),!A)if(n(u)!==null)A=!0,U||(U=!0,q());else{var te=n(d);te!==null&&X(B,te.startTime-Q)}}var U=!1,I=-1,R=5,M=-1;function F(){return x?!0:!(t.unstable_now()-M<R)}function j(){if(x=!1,U){var Q=t.unstable_now();M=Q;var te=!0;try{e:{A=!1,v&&(v=!1,O(I),I=-1),w=!0;var J=g;try{t:{for(P(Q),m=n(u);m!==null&&!(m.expirationTime>Q&&F());){var fe=m.callback;if(typeof fe=="function"){m.callback=null,g=m.priorityLevel;var $=fe(m.expirationTime<=Q);if(Q=t.unstable_now(),typeof $=="function"){m.callback=$,P(Q),te=!0;break t}m===n(u)&&r(u),P(Q)}else r(u);m=n(u)}if(m!==null)te=!0;else{var se=n(d);se!==null&&X(B,se.startTime-Q),te=!1}}break e}finally{m=null,g=J,w=!1}te=void 0}}finally{te?q():U=!1}}}var q;if(typeof k=="function")q=function(){k(j)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,Se=L.port2;L.port1.onmessage=j,q=function(){Se.postMessage(null)}}else q=function(){T(j,0)};function X(Q,te){I=T(function(){Q(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(Q){switch(g){case 1:case 2:case 3:var te=3;break;default:te=g}var J=g;g=te;try{return Q()}finally{g=J}},t.unstable_requestPaint=function(){x=!0},t.unstable_runWithPriority=function(Q,te){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var J=g;g=Q;try{return te()}finally{g=J}},t.unstable_scheduleCallback=function(Q,te,J){var fe=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?fe+J:fe):J=fe,Q){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=J+$,Q={id:h++,callback:te,priorityLevel:Q,startTime:J,expirationTime:$,sortIndex:-1},J>fe?(Q.sortIndex=J,e(d,Q),n(u)===null&&Q===n(d)&&(v?(O(I),I=-1):v=!0,X(B,J-fe))):(Q.sortIndex=$,e(u,Q),A||w||(A=!0,U||(U=!0,q()))),Q},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(Q){var te=g;return function(){var J=g;g=te;try{return Q.apply(this,arguments)}finally{g=J}}}})(HE)),HE}var C4;function dz(){return C4||(C4=1,zE.exports=fz()),zE.exports}var qE={exports:{}},wr={};/** 27 * @license React 28 * react-dom.production.js 29 * 30 * Copyright (c) Meta Platforms, Inc. and affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var _4;function hz(){if(_4)return wr;_4=1;var t=Sy();function e(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(u,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:u,containerInfo:d,implementation:h}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,d){if(u==="font")return"";
vendor: 5,548 bytes, lines 34-42
34if(typeof d=="string")return d==="use-credentials"?d:""}return wr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,wr.createPortal=function(u,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return s(u,d,null,h)},wr.flushSync=function(u){var d=a.T,h=r.p;try{if(a.T=null,r.p=2,u)return u()}finally{a.T=d,r.p=h,r.d.f()}},wr.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(u,d))},wr.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},wr.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var h=d.as,m=l(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,w=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:w}):h==="script"&&r.d.X(u,{crossOrigin:m,integrity:g,fetchPriority:w,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},wr.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=l(d.as,d.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(u)},wr.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=l(h,d.crossOrigin);r.d.L(u,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},wr.preloadModule=function(u,d){if(typeof u=="string")if(d){var h=l(d.as,d.crossOrigin);r.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(u)},wr.requestFormReset=function(u){r.d.r(u)},wr.unstable_batchedUpdates=function(u,d){return u(d)},wr.useFormState=function(u,d,h){return a.H.useFormState(u,d,h)},wr.useFormStatus=function(){return a.H.useHostTransitionStatus()},wr.version="19.1.1",wr}var T4;function Xk(){if(T4)return qE.exports;T4=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),qE.exports=hz(),qE.exports}var S4;function pz(){if(S4)return Om;S4=1;/** 35 * @license React 36 * react-dom-client.production.js 37 * 38 * Copyright (c) Meta Platforms, Inc. and affiliates. 39 * 40 * This source code is licensed under the MIT license found in the 41 * LICENSE file in the root directory of this source tree. 42 */var t=dz(),e=Sy(),n=Xk();function r(o){var c="https://react.dev/errors/"+o;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+o+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var c=o,f=o;if(o.alternate)for(;c.return;)c=c.return;else{o=c;do c=o,(c.flags&4098)!==0&&(f=c.return),o=c.return;while(o)}return c.tag===3?f:null}function a(o){if(o.tag===13){var c=o.memoizedState;if(c===null&&(o=o.alternate,o!==null&&(c=o.memoizedState)),c!==null)return c.dehydrated}return null}function l(o){if(s(o)!==o)throw Error(r(188))}function u(o){var c=o.alternate;if(!c){if(c=s(o),c===null)throw Error(r(188));return c!==o?null:o}for(var f=o,p=c;;){var b=f.return;if(b===null)break;var E=b.alternate;if(E===null){if(p=b.return,p!==null){f=p;continue}break}if(b.child===E.child){for(E=b.child;E;){if(E===f)return l(b),o;if(E===p)return l(b),c;E=E.sibling}throw Error(r(188))}if(f.return!==p.return)f=b,p=E;else{for(var D=!1,V=b.child;V;){if(V===f){D=!0,f=b,p=E;break}if(V===p){D=!0,p=b,f=E;break}V=V.sibling}if(!D){for(V=E.child;V;){if(V===f){D=!0,f=E,p=b;break}if(V===p){D=!0,p=E,f=b;break}V=V.sibling}if(!D)throw Error(r(189))}}if(f.alternate!==p)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?o:c}function d(o){var c=o.tag;if(c===5||c===26||c===27||c===6)return o;for(o=o.child;o!==null;){if(c=d(o),c!==null)return c;o=o.sibling}return null}var h=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function q(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var L=Symbol.for("react.client.reference");function Se(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===L?null:o.displayName||o.name||null;
vendor: 15,461 bytes, lines 42-49
42if(typeof o=="string")return o;switch(o){case A:return"Fragment";case x:return"Profiler";case v:return"StrictMode";case B:return"Suspense";case U:return"SuspenseList";case M:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case k:return(o.displayName||"Context")+".Provider";case O:return(o._context.displayName||"Context")+".Consumer";case P:var c=o.render;return o=o.displayName,o||(o=c.displayName||c.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case I:return c=o.displayName||null,c!==null?c:Se(o.type)||"Memo";case R:c=o._payload,o=o._init;try{return Se(o(c))}catch{}}return null}var X=Array.isArray,Q=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},fe=[],$=-1;function se(o){return{current:o}}function ye(o){0>$||(o.current=fe[$],fe[$]=null,$--)}function pe(o,c){$++,fe[$]=o.current,o.current=c}var me=se(null),ve=se(null),_e=se(null),Re=se(null);function De(o,c){switch(pe(_e,c),pe(ve,o),pe(me,null),c.nodeType){case 9:case 11:o=(o=c.documentElement)&&(o=o.namespaceURI)?G8(o):0;break;default:if(o=c.tagName,c=c.namespaceURI)c=G8(c),o=Q8(c,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}ye(me),pe(me,o)}function qe(){ye(me),ye(ve),ye(_e)}function it(o){o.memoizedState!==null&&pe(Re,o);var c=me.current,f=Q8(c,o.type);c!==f&&(pe(ve,o),pe(me,f))}function Vt(o){ve.current===o&&(ye(me),ye(ve)),Re.current===o&&(ye(Re),Tm._currentValue=J)}var Qe=Object.prototype.hasOwnProperty,et=t.unstable_scheduleCallback,Pt=t.unstable_cancelCallback,It=t.unstable_shouldYield,nn=t.unstable_requestPaint,St=t.unstable_now,Ir=t.unstable_getCurrentPriorityLevel,Ui=t.unstable_ImmediatePriority,ys=t.unstable_UserBlockingPriority,Vn=t.unstable_NormalPriority,ud=t.unstable_LowPriority,zn=t.unstable_IdlePriority,Fi=t.log,Wo=t.unstable_setDisableYieldValue,Ve=null,Le=null;function He(o){if(typeof Fi=="function"&&Wo(o),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode(Ve,o)}catch{}}var rt=Math.clz32?Math.clz32:ft,Kr=Math.log,Wr=Math.LN2;function ft(o){return o>>>=0,o===0?32:31-(Kr(o)/Wr|0)|0}var $e=256,Hn=4194304;function Rr(o){var c=o&42;if(c!==0)return c;switch(o&-o){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:return 64;case 128:return 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 o&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Yo(o,c,f){var p=o.pendingLanes;if(p===0)return 0;var b=0,E=o.suspendedLanes,D=o.pingedLanes;o=o.warmLanes;var V=p&134217727;return V!==0?(p=V&~E,p!==0?b=Rr(p):(D&=V,D!==0?b=Rr(D):f||(f=V&~o,f!==0&&(b=Rr(f))))):(V=p&~E,V!==0?b=Rr(V):D!==0?b=Rr(D):f||(f=p&~o,f!==0&&(b=Rr(f)))),b===0?0:c!==0&&c!==b&&(c&E)===0&&(E=b&-b,f=c&-c,E>=f||E===32&&(f&4194048)!==0)?c:b}function tu(o,c){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&c)===0}function T0(o,c){switch(o){case 1:case 2:case 4:case 8:case 64:return c+250;case 16:case 32: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 c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function S0(){var o=$e;return $e<<=1,($e&4194048)===0&&($e=256),o}function I0(){var o=Hn;return Hn<<=1,(Hn&62914560)===0&&(Hn=4194304),o}function Jo(o){for(var c=[],f=0;31>f;f++)c.push(o);return c}function Xo(o,c){o.pendingLanes|=c,c!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function R0(o,c,f,p,b,E){var D=o.pendingLanes;o.pendingLanes=f,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=f,o.entangledLanes&=f,o.errorRecoveryDisabledLanes&=f,o.shellSuspendCounter=0;var V=o.entanglements,Y=o.expirationTimes,ce=o.hiddenUpdates;for(f=D&~f;0<f;){var ge=31-rt(f),we=1<<ge;V[ge]=0,Y[ge]=-1;var le=ce[ge];if(le!==null)for(ce[ge]=null,ge=0;ge<le.length;ge++){var ue=le[ge];ue!==null&&(ue.lane&=-536870913)}f&=~we}p!==0&&Qs(o,p,0),E!==0&&b===0&&o.tag!==0&&(o.suspendedLanes|=E&~(D&~c))}function Qs(o,c,f){o.pendingLanes|=c,o.suspendedLanes&=~c;var p=31-rt(c);o.entangledLanes|=c,o.entanglements[p]=o.entanglements[p]|1073741824|f&4194090}function k0(o,c){var f=o.entangledLanes|=c;for(o=o.entanglements;f;){var p=31-rt(f),b=1<<p;b&c|o[p]&c&&(o[p]|=c),f&=~b}}function yc(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function fd(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function bc(){var o=te.p;return o!==0?o:(o=window.event,o===void 0?32:d4(o.type))}function e1(o,c){var f=te.p;try{return te.p=o,c()}finally{te.p=f}}var Zt=Math.random().toString(36).slice(2),Nn="__reactFiber$"+Zt,wn="__reactProps$"+Zt,Vi="__reactContainer$"+Zt,N0="__reactEvents$"+Zt,V6="__reactListeners$"+Zt,wc="__reactHandles$"+Zt,t1="__reactResources$"+Zt,nu="__reactMarker$"+Zt;function vc(o){delete o[Nn],delete o[wn],delete o[N0],delete o[V6],delete o[wc]}function Zo(o){var c=o[Nn];if(c)return c;for(var f=o.parentNode;f;){if(c=f[Vi]||f[Nn]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(o=J8(o);o!==null;){if(f=o[Nn])return f;o=J8(o)}return c}o=f,f=o.parentNode}return null}function Ks(o){if(o=o[Nn]||o[Vi]){var c=o.tag;if(c===5||c===6||c===13||c===26||c===27||c===3)return o}return null}function Ws(o){var c=o.tag;if(c===5||c===26||c===27||c===6)return o.stateNode;throw Error(r(33))}function kr(o){var c=o[t1];return c||(c=o[t1]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function hn(o){o[nu]=!0}var O0=new Set,dd={};function bs(o,c){ea(o,c),ea(o+"Capture",c)}function ea(o,c){for(dd[o]=c,o=0;o<c.length;o++)O0.add(c[o])}var n1=RegExp("^[: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]*$"),r1={},ru={};function i1(o){return Qe.call(ru,o)?!0:Qe.call(r1,o)?!1:n1.test(o)?ru[o]=!0:(r1[o]=!0,!1)}function Ac(o,c,f){if(i1(c))if(f===null)o.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":o.removeAttribute(c);return;case"boolean":var p=c.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){o.removeAttribute(c);return}}o.setAttribute(c,""+f)}}function Ys(o,c,f){if(f===null)o.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(c);return}o.setAttribute(c,""+f)}}function rr(o,c,f,p){if(p===null)o.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(f);return}o.setAttributeNS(c,f,""+p)}}var iu,s1;function ta(o){if(iu===void 0)try{throw Error()}catch(f){var c=f.stack.trim().match(/\n( *(at )?)/);iu=c&&c[1]||"",s1=-1<f.stack.indexOf(` 43 at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return` 44`+iu+o+s1}var hd=!1;function pd(o,c){if(!o||hd)return"";hd=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(c){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(ue){var le=ue}Reflect.construct(o,[],we)}else{try{we.call()}catch(ue){le=ue}o.call(we.prototype)}}else{try{throw Error()}catch(ue){le=ue}(we=o())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(ue){if(ue&&le&&typeof ue.stack=="string")return[ue.stack,le.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=p.DetermineComponentFrameRoot(),D=E[0],V=E[1];if(D&&V){var Y=D.split(` 45`),ce=V.split(` 46`);for(b=p=0;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;for(;b<ce.length&&!ce[b].includes("DetermineComponentFrameRoot");)b++;if(p===Y.length||b===ce.length)for(p=Y.length-1,b=ce.length-1;1<=p&&0<=b&&Y[p]!==ce[b];)b--;for(;1<=p&&0<=b;p--,b--)if(Y[p]!==ce[b]){if(p!==1||b!==1)do if(p--,b--,0>b||Y[p]!==ce[b]){var ge=` 47`+Y[p].replace(" at new "," at ");return o.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",o.displayName)),ge}while(1<=p&&0<=b);break}}}finally{hd=!1,Error.prepareStackTrace=f}return(f=o?o.displayName||o.name:"")?ta(f):""}function B0(o){switch(o.tag){case 26:case 27:case 5:return ta(o.type);case 16:return ta("Lazy");case 13:return ta("Suspense");case 19:return ta("SuspenseList");case 0:case 15:return pd(o.type,!1);case 11:return pd(o.type.render,!1);case 1:return pd(o.type,!0);case 31:return ta("Activity");default:return""}}function md(o){try{var c="";do c+=B0(o),o=o.return;while(o);return c}catch(f){return` 48Error generating stack: `+f.message+` 49`+f.stack}}function Nr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function P0(o){var c=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function z6(o){var c=P0(o)?"checked":"value",f=Object.getOwnPropertyDescriptor(o.constructor.prototype,c),p=""+o[c];if(!o.hasOwnProperty(c)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var b=f.get,E=f.set;return Object.defineProperty(o,c,{configurable:!0,get:function(){return b.call(this)},set:function(D){p=""+D,E.call(this,D)}}),Object.defineProperty(o,c,{enumerable:f.enumerable}),{getValue:function(){return p},setValue:function(D){p=""+D},stopTracking:function(){o._valueTracker=null,delete o[c]}}}}function gd(o){o._valueTracker||(o._valueTracker=z6(o))}function D0(o){if(!o)return!1;var c=o._valueTracker;if(!c)return!0;var f=c.getValue(),p="";return o&&(p=P0(o)?o.checked?"true":"false":o.value),o=p,o!==f?(c.setValue(o),!0):!1}function su(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var H6=/[\n"\\]/g;function vn(o){return o.replace(H6,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function mi(o,c,f,p,b,E,D,V){o.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?o.type=D:o.removeAttribute("type"),c!=null?D==="number"?(c===0&&o.value===""||o.value!=c)&&(o.value=""+Nr(c)):o.value!==""+Nr(c)&&(o.value=""+Nr(c)):D!=="submit"&&D!=="reset"||o.removeAttribute("value"),c!=null?Ec(o,D,Nr(c)):f!=null?Ec(o,D,Nr(f)):p!=null&&o.removeAttribute("value"),b==null&&E!=null&&(o.defaultChecked=!!E),b!=null&&(o.checked=b&&typeof b!="function"&&typeof b!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?o.name=""+Nr(V):o.removeAttribute("name")}function ou(o,c,f,p,b,E,D,V){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(o.type=E),c!=null||f!=null){if(!(E!=="submit"&&E!=="reset"||c!=null))return;f=f!=null?""+Nr(f):"",c=c!=null?""+Nr(c):f,V||c===o.value||(o.value=c),o.defaultValue=c}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,o.checked=V?o.checked:!!p,o.defaultChecked=!!p,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(o.name=D)}function Ec(o,c,f){c==="number"&&su(o.ownerDocument)===o||o.defaultValue===""+f||(o.defaultValue=""+f)}function na(o,c,f,p){if(o=o.options,c){c={};for(var b=0;b<f.length;b++)c["$"+f[b]]=!0;for(f=0;f<o.length;f++)b=c.hasOwnProperty("$"+o[f].value),o[f].selected!==b&&(o[f].selected=b),b&&p&&(o[f].defaultSelected=!0)}else{for(f=""+Nr(f),c=null,b=0;b<o.length;b++){if(o[b].value===f){o[b].selected=!0,p&&(o[b].defaultSelected=!0);return}c!==null||o[b].disabled||(c=o[b])}c!==null&&(c.selected=!0)}}function zt(o,c,f){if(c!=null&&(c=""+Nr(c),c!==o.value&&(o.value=c),f==null)){o.defaultValue!==c&&(o.defaultValue=c);return}o.defaultValue=f!=null?""+Nr(f):""}function au(o,c,f,p){if(c==null){if(p!=null){if(f!=null)throw Error(r(92));if(X(p)){if(1<p.length)throw Error(r(93));p=p[0]}f=p}f==null&&(f=""),c=f}f=Nr(c),o.defaultValue=f,p=o.textContent,p===f&&p!==""&&p!==null&&(o.value=p)}function zi(o,c){if(c){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=c;return}}o.textContent=c}var cu=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function o1(o,c,f){var p=c.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?o.setProperty(c,""):c==="float"?o.cssFloat="":o[c]="":p?o.setProperty(c,f):typeof f!="number"||f===0||cu.has(c)?c==="float"?o.cssFloat=f:o[c]=(""+f).trim():o[c]=f+"px"}function M0(o,c,f){if(c!=null&&typeof c!="object")throw Error(r(62));if(o=o.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||c!=null&&c.hasOwnProperty(p)||(p.indexOf("--")===0?o.setProperty(p,""):p==="float"?o.cssFloat="":o[p]="");for(var b in c)p=c[b],c.hasOwnProperty(b)&&f[b]!==p&&o1(o,b,p)}else for(var E in c)c.hasOwnProperty(E)&&o1(o,E,c[E])}function j0(o){if(o.indexOf("-")===-1)return!1;switch(o){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 q6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
49dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),$6=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yd(o){return $6.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var ra=null;function Hi(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ia=null,sa=null;function L0(o){var c=Ks(o);if(c&&(o=c.stateNode)){var f=o[wn]||null;e:switch(o=c.stateNode,c.type){case"input":if(mi(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),c=f.name,f.type==="radio"&&c!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+vn(""+c)+'"][type="radio"]'),c=0;c<f.length;c++){var p=f[c];if(p!==o&&p.form===o.form){var b=p[wn]||null;if(!b)throw Error(r(90));mi(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(c=0;c<f.length;c++)p=f[c],p.form===o.form&&D0(p)}break e;case"textarea":zt(o,f.value,f.defaultValue);break e;case"select":c=f.value,c!=null&&na(o,!!f.multiple,c,!1)}}}var Js=!1;function a1(o,c,f){if(Js)return o(c,f);Js=!0;try{var p=o(c);return p}finally{if(Js=!1,(ia!==null||sa!==null)&&(eb(),ia&&(c=ia,o=sa,sa=ia=null,L0(c),o)))for(c=0;c<o.length;c++)L0(o[c])}}function lu(o,c){var f=o.stateNode;if(f===null)return null;var p=f[wn]||null;if(p===null)return null;f=p[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(r(231,c,typeof f));return f}var ws=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qi=!1;if(ws)try{var uu={};Object.defineProperty(uu,"passive",{get:function(){qi=!0}}),window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch{qi=!1}var Xs=null,xc=null,oa=null;function U0(){if(oa)return oa;var o,c=xc,f=c.length,p,b="value"in Xs?Xs.value:Xs.textContent,E=b.length;for(o=0;o<f&&c[o]===b[o];o++);var D=f-o;for(p=1;p<=D&&c[f-p]===b[E-p];p++);return oa=b.slice(o,1<p?1-p:void 0)}function Zs(o){var c=o.keyCode;
vendor: 2,821 bytes, line 49
49return"charCode"in o?(o=o.charCode,o===0&&c===13&&(o=13)):o=c,o===10&&(o=13),32<=o||o===13?o:0}function eo(){return!0}function F0(){return!1}function qn(o){function c(f,p,b,E,D){this._reactName=f,this._targetInst=b,this.type=p,this.nativeEvent=E,this.target=D,this.currentTarget=null;for(var V in o)o.hasOwnProperty(V)&&(f=o[V],this[V]=f?f(E):E[V]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?eo:F0,this.isPropagationStopped=F0,this}return h(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=eo)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=eo)},persist:function(){},isPersistent:eo}),c}var Dt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bd=qn(Dt),fu=h({},Dt,{view:0,detail:0}),c1=qn(fu),wd,vd,to,du=h({},fu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mu,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==to&&(to&&o.type==="mousemove"?(wd=o.screenX-to.screenX,vd=o.screenY-to.screenY):vd=wd=0,to=o),wd)},movementY:function(o){return"movementY"in o?o.movementY:vd}}),$i=qn(du),l1=h({},du,{dataTransfer:0}),G6=qn(l1),hu=h({},fu,{relatedTarget:0}),Ad=qn(hu),V0=h({},Dt,{animationName:0,elapsedTime:0,pseudoElement:0}),Ed=qn(V0),u1=h({},Dt,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),xd=qn(u1),Q6=h({},Dt,{data:0}),z0=qn(Q6),pu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f1={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"},d1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function H0(o){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(o):(o=d1[o])?!!c[o]:!1}function mu(){return H0}var h1=h({},fu,{key:function(o){if(o.key){var c=pu[o.key]||o.key;if(c!=="Unidentified")return c}
vendor: 5,174 bytes, line 49
49return o.type==="keypress"?(o=Zs(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?f1[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mu,charCode:function(o){return o.type==="keypress"?Zs(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Zs(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Cd=qn(h1),p1=h({},du,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),q0=qn(p1),aa=h({},fu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mu}),m1=qn(aa),g1=h({},Dt,{propertyName:0,elapsedTime:0,pseudoElement:0}),y1=qn(g1),b1=h({},du,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),_d=qn(b1),Or=h({},Dt,{newState:0,oldState:0}),w1=qn(Or),v1=[9,13,27,32],no=ws&&"CompositionEvent"in window,y=null;ws&&"documentMode"in document&&(y=document.documentMode);var _=ws&&"TextEvent"in window&&!y,N=ws&&(!no||y&&8<y&&11>=y),H=" ",ie=!1;function de(o,c){switch(o){case"keyup":return v1.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ie(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Et=!1;function On(o,c){switch(o){case"compositionend":return Ie(c);case"keypress":return c.which!==32?null:(ie=!0,H);case"textInput":return o=c.data,o===H&&ie?null:o;default:return null}}function xt(o,c){if(Et)return o==="compositionend"||!no&&de(o,c)?(o=U0(),oa=xc=Xs=null,Et=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return N&&c.locale!=="ko"?null:c.data;default:return null}}var $n={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 Bn(o){var c=o&&o.nodeName&&o.nodeName.toLowerCase();return c==="input"?!!$n[o.type]:c==="textarea"}function ca(o,c,f,p){ia?sa?sa.push(p):sa=[p]:ia=p,c=ob(c,"onChange"),0<c.length&&(f=new bd("onChange","change",null,f,p),o.push({event:f,listeners:c}))}var ir=null,ro=null;function $0(o){V8(o,0)}function A1(o){var c=Ws(o);if(D0(c))return o}function cT(o,c){if(o==="change")return c}var lT=!1;if(ws){var K6;if(ws){var W6="oninput"in document;if(!W6){var uT=document.createElement("div");uT.setAttribute("oninput","return;"),W6=typeof uT.oninput=="function"}K6=W6}else K6=!1;lT=K6&&(!document.documentMode||9<document.documentMode)}function fT(){ir&&(ir.detachEvent("onpropertychange",dT),ro=ir=null)}function dT(o){if(o.propertyName==="value"&&A1(ro)){var c=[];ca(c,ro,o,Hi(o)),a1($0,c)}}function MF(o,c,f){o==="focusin"?(fT(),ir=c,ro=f,ir.attachEvent("onpropertychange",dT)):o==="focusout"&&fT()}function jF(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return A1(ro)}function LF(o,c){if(o==="click")return A1(c)}function UF(o,c){if(o==="input"||o==="change")return A1(c)}function FF(o,c){return o===c&&(o!==0||1/o===1/c)||o!==o&&c!==c}var gi=typeof Object.is=="function"?Object.is:FF;function G0(o,c){if(gi(o,c))return!0;if(typeof o!="object"||o===null||typeof c!="object"||c===null)return!1;var f=Object.keys(o),p=Object.keys(c);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var b=f[p];if(!Qe.call(c,b)||!gi(o[b],c[b]))return!1}return!0}function hT(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function pT(o,c){var f=hT(o);o=0;for(var p;f;){if(f.nodeType===3){if(p=o+f.textContent.length,o<=c&&p>=c)return{node:f,offset:c-o};o=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=hT(f)}}function mT(o,c){return o&&c?o===c?!0:o&&o.nodeType===3?!1:c&&c.nodeType===3?mT(o,c.parentNode):"contains"in o?o.contains(c):o.compareDocumentPosition?!!(o.compareDocumentPosition(c)&16):!1:!1}function gT(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var c=su(o.document);c instanceof o.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)o=c.contentWindow;else break;c=su(o.document)}return c}function Y6(o){var c=o&&o.nodeName&&o.nodeName.toLowerCase();return c&&(c==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||c==="textarea"||o.contentEditable==="true")}var VF=ws&&"documentMode"in document&&11>=document.documentMode,Td=null,J6=null,Q0=null,X6=!1;function yT(o,c,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;X6||Td==null||Td!==su(p)||(p=Td,"selectionStart"in p&&Y6(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focu
vendor: 15,969 bytes, line 49
49sNode:p.focusNode,focusOffset:p.focusOffset}),Q0&&G0(Q0,p)||(Q0=p,p=ob(J6,"onSelect"),0<p.length&&(c=new bd("onSelect","select",null,c,f),o.push({event:c,listeners:p}),c.target=Td)))}function gu(o,c){var f={};return f[o.toLowerCase()]=c.toLowerCase(),f["Webkit"+o]="webkit"+c,f["Moz"+o]="moz"+c,f}var Sd={animationend:gu("Animation","AnimationEnd"),animationiteration:gu("Animation","AnimationIteration"),animationstart:gu("Animation","AnimationStart"),transitionrun:gu("Transition","TransitionRun"),transitionstart:gu("Transition","TransitionStart"),transitioncancel:gu("Transition","TransitionCancel"),transitionend:gu("Transition","TransitionEnd")},Z6={},bT={};ws&&(bT=document.createElement("div").style,"AnimationEvent"in window||(delete Sd.animationend.animation,delete Sd.animationiteration.animation,delete Sd.animationstart.animation),"TransitionEvent"in window||delete Sd.transitionend.transition);function yu(o){if(Z6[o])return Z6[o];if(!Sd[o])return o;var c=Sd[o],f;for(f in c)if(c.hasOwnProperty(f)&&f in bT)return Z6[o]=c[f];return o}var wT=yu("animationend"),vT=yu("animationiteration"),AT=yu("animationstart"),zF=yu("transitionrun"),HF=yu("transitionstart"),qF=yu("transitioncancel"),ET=yu("transitionend"),xT=new Map,eA="abort auxClick beforeToggle 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(" ");eA.push("scrollEnd");function vs(o,c){xT.set(o,c),bs(c,[o])}var CT=new WeakMap;function Gi(o,c){if(typeof o=="object"&&o!==null){var f=CT.get(o);return f!==void 0?f:(c={value:o,source:c,stack:md(c)},CT.set(o,c),c)}return{value:o,source:c,stack:md(c)}}var Qi=[],Id=0,tA=0;function E1(){for(var o=Id,c=tA=Id=0;c<o;){var f=Qi[c];Qi[c++]=null;var p=Qi[c];Qi[c++]=null;var b=Qi[c];Qi[c++]=null;var E=Qi[c];if(Qi[c++]=null,p!==null&&b!==null){var D=p.pending;D===null?b.next=b:(b.next=D.next,D.next=b),p.pending=b}E!==0&&_T(f,b,E)}}function x1(o,c,f,p){Qi[Id++]=o,Qi[Id++]=c,Qi[Id++]=f,Qi[Id++]=p,tA|=p,o.lanes|=p,o=o.alternate,o!==null&&(o.lanes|=p)}function nA(o,c,f,p){return x1(o,c,f,p),C1(o)}function Rd(o,c){return x1(o,null,null,c),C1(o)}function _T(o,c,f){o.lanes|=f;var p=o.alternate;p!==null&&(p.lanes|=f);for(var b=!1,E=o.return;E!==null;)E.childLanes|=f,p=E.alternate,p!==null&&(p.childLanes|=f),E.tag===22&&(o=E.stateNode,o===null||o._visibility&1||(b=!0)),o=E,E=E.return;return o.tag===3?(E=o.stateNode,b&&c!==null&&(b=31-rt(f),o=E.hiddenUpdates,p=o[b],p===null?o[b]=[c]:p.push(c),c.lane=f|536870912),E):null}function C1(o){if(50<bm)throw bm=0,cE=null,Error(r(185));for(var c=o.return;c!==null;)o=c,c=o.return;return o.tag===3?o.stateNode:null}var kd={};function $F(o,c,f,p){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yi(o,c,f,p){return new $F(o,c,f,p)}function rA(o){return o=o.prototype,!(!o||!o.isReactComponent)}function la(o,c){var f=o.alternate;return f===null?(f=yi(o.tag,c,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=c,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&65011712,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,c=o.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f.refCleanup=o.refCleanup,f}function TT(o,c){o.flags&=65011714;var f=o.alternate;return f===null?(o.childLanes=0,o.lanes=c,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=f.childLanes,o.lanes=f.lanes,o.child=f.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=f.memoizedProps,o.memoizedState=f.memoizedState,o.updateQueue=f.updateQueue,o.type=f.type,c=f.dependencies,o.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),o}function _1(o,c,f,p,b,E){var D=0;if(p=o,typeof o=="function")rA(o)&&(D=1);else if(typeof o=="string")D=QV(o,f,me.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case M:return o=yi(31,f,c,b),o.elementType=M,o.lanes=E,o;case A:return bu(f.children,b,E,c);case v:D=8,b|=24;break;case x:return o=yi(12,f,c,b|2),o.elementType=x,o.lanes=E,o;case B:return o=yi(13,f,c,b),o.elementType=B,o.lanes=E,o;case U:return o=yi(19,f,c,b),o.elementType=U,o.lanes=E,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:case k:D=10;break e;case O:D=9;break e;case P:D=11;break e;case I:D=14;break e;case R:D=16,p=null;break e}D=29,f=Error(r(130,o===null?"null":typeof o,"")),p=null}return c=yi(D,f,c,b),c.elementType=o,c.type=p,c.lanes=E,c}function bu(o,c,f,p){return o=yi(7,o,p,c),o.lanes=f,o}function iA(o,c,f){return o=yi(6,o,null,c),o.lanes=f,o}function sA(o,c,f){return c=yi(4,o.children!==null?o.children:[],o.key,c),c.lanes=f,c.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},c}var Nd=[],Od=0,T1=null,S1=0,Ki=[],Wi=0,wu=null,ua=1,fa="";function vu(o,c){Nd[Od++]=S1,Nd[Od++]=T1,T1=o,S1=c}function ST(o,c,f){Ki[Wi++]=ua,Ki[Wi++]=fa,Ki[Wi++]=wu,wu=o;var p=ua;o=fa;var b=32-rt(p)-1;p&=~(1<<b),f+=1;var E=32-rt(c)+b;if(30<E){var D=b-b%5;E=(p&(1<<D)-1).toString(32),p>>=D,b-=D,ua=1<<32-rt(c)+b|f<<b|p,fa=E+o}else ua=1<<E|f<<b|p,fa=o}function oA(o){o.return!==null&&(vu(o,1),ST(o,1,0))}function aA(o){for(;o===T1;)T1=Nd[--Od],Nd[Od]=null,S1=Nd[--Od],Nd[Od]=null;for(;o===wu;)wu=Ki[--Wi],Ki[Wi]=null,fa=Ki[--Wi],Ki[Wi]=null,ua=Ki[--Wi],Ki[Wi]=null}var Br=null,an=null,Ot=!1,Au=null,io=!1,cA=Error(r(519));function Eu(o){var c=Error(r(418,""));throw Y0(Gi(c,o)),cA}function IT(o){var c=o.stateNode,f=o.type,p=o.memoizedProps;switch(c[Nn]=o,c[wn]=p,f){case"dialog":mt("cancel",c),mt("close",c);break;case"iframe":case"object":case"embed":mt("load",c);break;case"video":case"audio":for(f=0;f<vm.length;f++)mt(vm[f],c);break;case"source":mt("error",c);break;case"img":case"image":case"link":mt("error",c),mt("load",c);break;case"details":mt("toggle",c);break;case"input":mt("invalid",c),ou(c,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0),gd(c);break;case"select":mt("invalid",c);break;case"textarea":mt("invalid",c),au(c,p.value,p.defaultValue,p.children),gd(c)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||c.textContent===""+f||p.suppressHydrationWarning===!0||$8(c.textContent,f)?(p.popover!=null&&(mt("beforetoggle",c),mt("toggle",c)),p.onScroll!=null&&mt("scroll",c),p.onScrollEnd!=null&&mt("scrollend",c),p.onClick!=null&&(c.onclick=ab),c=!0):c=!1,c||Eu(o)}function RT(o){for(Br=o.return;Br;)switch(Br.tag){case 5:case 13:io=!1;return;case 27:case 3:io=!0;return;default:Br=Br.return}}function K0(o){if(o!==Br)return!1;if(!Ot)return RT(o),Ot=!0,!1;var c=o.tag,f;if((f=c!==3&&c!==27)&&((f=c===5)&&(f=o.type,f=!(f!=="form"&&f!=="button")||CE(o.type,o.memoizedProps)),f=!f),f&&an&&Eu(o),RT(o),c===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,c=0;o;){if(o.nodeType===8)if(f=o.data,f==="/$"){if(c===0){an=Es(o.nextSibling);break e}c--}else f!=="$"&&f!=="$!"&&f!=="$?"||c++;o=o.nextSibling}an=null}}else c===27?(c=an,Uc(o.type)?(o=IE,IE=null,an=o):an=c):an=Br?Es(o.stateNode.nextSibling):null;return!0}function W0(){an=Br=null,Ot=!1}function kT(){var o=Au;return o!==null&&(Xr===null?Xr=o:Xr.push.apply(Xr,o),Au=null),o}function Y0(o){Au===null?Au=[o]:Au.push(o)}var lA=se(null),xu=null,da=null;function Cc(o,c,f){pe(lA,c._currentValue),c._currentValue=f}function ha(o){o._currentValue=lA.current,ye(lA)}function uA(o,c,f){for(;o!==null;){var p=o.alternate;if((o.childLanes&c)!==c?(o.childLanes|=c,p!==null&&(p.childLanes|=c)):p!==null&&(p.childLanes&c)!==c&&(p.childLanes|=c),o===f)break;o=o.return}}function fA(o,c,f,p){var b=o.child;for(b!==null&&(b.return=o);b!==null;){var E=b.dependencies;if(E!==null){var D=b.child;E=E.firstContext;e:for(;E!==null;){var V=E;E=b;for(var Y=0;Y<c.length;Y++)if(V.context===c[Y]){E.lanes|=f,V=E.alternate,V!==null&&(V.lanes|=f),uA(E.return,f,o),p||(D=null);break e}E=V.next}}else if(b.tag===18){if(D=b.return,D===null)throw Error(r(341));D.lanes|=f,E=D.alternate,E!==null&&(E.lanes|=f),uA(D,f,o),D=null}else D=b.child;if(D!==null)D.return=b;else for(D=b;D!==null;){if(D===o){D=null;break}if(b=D.sibling,b!==null){b.return=D.return,D=b;break}D=D.return}b=D}}function J0(o,c,f,p){o=null;for(var b=c,E=!1;b!==null;){if(!E){if((b.flags&524288)!==0)E=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var D=b.alternate;if(D===null)throw Error(r(387));if(D=D.memoizedProps,D!==null){var V=b.type;gi(b.pendingProps.value,D.value)||(o!==null?o.push(V):o=[V])}}else if(b===Re.current){if(D=b.alternate,D===null)throw Error(r(387));D.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(o!==null?o.push(Tm):o=[Tm])}b=b.return}o!==null&&fA(c,o,f,p),c.flags|=262144}function I1(o){for(o=o.firstContext;o!==null;){if(!gi(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Cu(o){xu=o,da=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function br(o){return NT(xu,o)}function R1(o,c){return xu===null&&Cu(o),NT(o,c)}function NT(o,c){var f=c._currentValue;if(c={context:c,memoizedValue:f,next:null},da===null){if(o===null)throw Error(r(308));da=c,o.dependencies={lanes:0,firstContext:c},o.flags|=524288}else da=da.next=c;return f}var GF=typeof AbortController<"u"?AbortController:function(){var o=[],c=this.signal={aborted:!1,addEventListener:function(f,p){o.push(p)}};this.abort=function(){c.aborted=!0,o.forEach(function(f){return f()})}},QF=t.unstable_scheduleCallback,KF=t.unstable_NormalPriority,Pn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dA(){return{controller:new GF,data:new Map,refCount:0}}function X0(o){o.refCount--,o.refCount===0&&QF(KF,function(){o.controller.abort()})}var Z0=null,hA=0,Bd=0,Pd=null;function WF(o,c){if(Z0===null){var f=Z0=[];hA=0,Bd=mE(),Pd={status:"pending",value:void 0,then:function(p){f.push(p)}}}return hA++,c.then(OT,OT),c}function OT(){if(--hA===0&&Z0!==null){Pd!==null&&(Pd.status="fulfilled");var o=Z0;Z0=null,Bd=0,Pd=null;for(var c=0;c<o.length;c++)(0,o[c])()}}function YF(o,c){var f=[],p={status:"pending",value:null,reason:null,then:function(b){f.push(b)}};return o.then(function(){p.status="fulfilled",p.value=c;for(var b=0;b<f.length;b++)(0,f[b])(c)},function(b){for(p.status="rejected",p.reason=b,b=0;b<f.length;b++)(0,f[b])(void 0)}),p}var BT=Q.S;Q.S=function(o,c){typeof c=="object"&&c!==null&&typeof c.then=="function"&&WF(o,c),BT!==null&&BT(o,c)};var _u=se(null);function pA(){var o=_u.current;return o!==null?o:Wt.pooledCache}function k1(o,c){c===null?pe(_u,_u.current):pe(_u,c.pool)}function PT(){var o=pA();return o===null?null:{parent:Pn._currentValue,pool:o}}var em=Error(r(460)),DT=Error(r(474)),N1=Error(r(542)),mA={then:function(){}};function MT(o){return o=o.status,o==="fulfilled"||o==="rejected"}function O1(){}function jT(o,c,f){switch(f=o[f],f===void 0?o.push(c):f!==c&&(c.then(O1,O1),c=f),c.status){case"fulfilled":return c.value;case"rejected":throw o=c.reason,UT(o),o;default:if(typeof c.status=="string")c.then(O1,O1);else{if(o=Wt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=c,o.status="pending",o.then(function(p){if(c.status==="pending"){var b=c;b.status="fulfilled",b.value=p}},function(p){if(c.status==="pending"){var b=c;b.status="rejected",b.reason=p}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw o=c.reason,UT(o),o}throw tm=c,em}}var tm=null;function LT(){if(tm===null)throw Error(r(459));var o=tm;return tm=null,o}function UT(o){if(o===em||o===N1)throw Error(r(483))}var _c=!1;function gA(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yA(o,c){o=o.updateQueue,c.updateQueue===o&&(c.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Tc(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Sc(o,c,f){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(Ut&2)!==0){var b=p.pending;return b===null?c.next=c:(c.next=b.next,b.next=c),p.pending=c,c=C1(o),_T(o,null,f),c}return x1(o,p,c,f),C1(o)}function nm(o,c,f){if(c=c.updateQueue,c!==null&&(c=c.shared,(f&4194048)!==0)){var p=c.lanes;p&=o.pendingLanes,f|=p,c.lanes=f,k0(o,f)}}function bA(o,c){var f=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var b=null,E=null;if(f=f.firstBaseUpdate,f!==null){do{var D={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};E===null?b=E=D:E=E.next=D,f=f.next}while(f!==null);E===null?b=E=c:E=E.next=c}else b=E=c;f={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:E,shared:p.shared,callbacks:p.callbacks},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=c}var wA=!1;function rm(){if(wA){var o=Pd;if(o!==null)throw o}}function im(o,c,f,p){wA=!1;var b=o.updateQueue;_c=!1;var E=b.firstBaseUpdate,D=b.lastBaseUpdate,V=b.shared.pending;if(V!==null){b.shared.pending=null;var Y=V,ce=Y.next;Y.next=null,D===null?E=ce:D.next=ce,D=Y;var ge=o.alternate;ge!==null&&(ge=ge.updateQueue,V=ge.lastBaseUpdate,V!==D&&(V===null?ge.firstBaseUpdate=ce:V.next=ce,ge.lastBaseUpdate=Y))}if(E!==null){var we=b.baseState;D=0,ge=ce=Y=null,V=E;do{var le=V.lane&-536870913,ue=le!==V.lane;if(ue?(Ct&le)===le:(p&le)===le){le!==0&&le===Bd&&(wA=!0),ge!==null&&(ge=ge.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Ze=o,Ke=V;le=c;var $t=f;switch(Ke.tag){case 1:if(Ze=Ke.payload,typeof Ze=="function"){we=Ze.call($t,we,le);break e}we=Ze;break e;case 3:Ze.flags=Ze.flags&-65537|128;case 0:if(Ze=Ke.payload,le=typeof Ze=="function"?Ze.call($t,we,le):Ze,le==null)break e;we=h({},we,le);break e;case 2:_c=!0}}le=V.callback,le!==null&&(o.flags|=64,ue&&(o.flags|=8192),ue=b.callbacks,ue===null?b.callbacks=[le]:ue.push(le))}else ue={lane:le,tag:V.tag,payload:V.payload,callback:V.callback,next:null},ge===null?(ce=ge=ue,Y=we):ge=ge.next=ue,D|=le;if(V=V.next,V===null){if(V=b.shared.pending,V===null)break;ue=V,V=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);ge===null&&(Y=we),b.baseState=Y,b.firstBaseUpdate=ce,b.lastBaseUpdate=ge,E===null&&(b.shared.lanes=0),Dc|=D,o.lanes=D,o.memoizedState=we}}function FT(o,c){if(typeof o!="function")throw Error(r(191,o));o.call(c)}function VT(o,c){var f=o.callbacks;if(f!==null)for(o.callbacks=null,o=0;o<f.length;o++)FT(f[o],c)}var Dd=se(null),B1=se(0);function zT(o,c){o=va,pe(B1,o),pe(Dd,c),va=o|c.baseLanes}function vA(){pe(B1,va),pe(Dd,Dd.current)}function AA(){va=B1.current,ye(Dd),ye(B1)}var Ic=0,ct=null,Ht=null,An=null,P1=!1,Md=!1,Tu=!1,D1=0,sm=0,jd=null,JF=0;function pn(){throw Error(r(321))}function EA(o,c){if(c===null)return!1;for(var f=0;f<c.length&&f<o.length;f++)if(!gi(o[f],c[f]))return!1;return!0}function xA(o,c,f,p,b,E){return Ic=E,ct=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,Q.H=o===null||o.memoizedState===null?_S:TS,Tu=!1,E=f(p,b),Tu=!1,Md&&(E=qT
vendor: 2,675 bytes, line 49
49(c,f,p,b)),HT(o),E}function HT(o){Q.H=V1;var c=Ht!==null&&Ht.next!==null;if(Ic=0,An=Ht=ct=null,P1=!1,sm=0,jd=null,c)throw Error(r(300));o===null||Gn||(o=o.dependencies,o!==null&&I1(o)&&(Gn=!0))}function qT(o,c,f,p){ct=o;var b=0;do{if(Md&&(jd=null),sm=0,Md=!1,25<=b)throw Error(r(301));if(b+=1,An=Ht=null,o.updateQueue!=null){var E=o.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}Q.H=iV,E=c(f,p)}while(Md);return E}function XF(){var o=Q.H,c=o.useState()[0];return c=typeof c.then=="function"?om(c):c,o=o.useState()[0],(Ht!==null?Ht.memoizedState:null)!==o&&(ct.flags|=1024),c}function CA(){var o=D1!==0;return D1=0,o}function _A(o,c,f){c.updateQueue=o.updateQueue,c.flags&=-2053,o.lanes&=~f}function TA(o){if(P1){for(o=o.memoizedState;o!==null;){var c=o.queue;c!==null&&(c.pending=null),o=o.next}P1=!1}Ic=0,An=Ht=ct=null,Md=!1,sm=D1=0,jd=null}function Yr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return An===null?ct.memoizedState=An=o:An=An.next=o,An}function En(){if(Ht===null){var o=ct.alternate;o=o!==null?o.memoizedState:null}else o=Ht.next;var c=An===null?ct.memoizedState:An.next;if(c!==null)An=c,Ht=o;else{if(o===null)throw ct.alternate===null?Error(r(467)):Error(r(310));Ht=o,o={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},An===null?ct.memoizedState=An=o:An=An.next=o}return An}function SA(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function om(o){var c=sm;return sm+=1,jd===null&&(jd=[]),o=jT(jd,o,c),c=ct,(An===null?c.memoizedState:An.next)===null&&(c=c.alternate,Q.H=c===null||c.memoizedState===null?_S:TS),o}function M1(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return om(o);if(o.$$typeof===k)return br(o)}throw Error(r(438,String(o)))}function IA(o){var c=null,f=ct.updateQueue;if(f!==null&&(c=f.memoCache),c==null){var p=ct.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(c={data:p.data.map(function(b){return b.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),f===null&&(f=SA(),ct.updateQueue=f),f.memoCache=c,f=c.data[c.index],f===void 0)for(f=c.data[c.index]=Array(o),p=0;p<o;p++)f[p]=F;return c.index++,f}function pa(o,c){return typeof c=="function"?c(o):c}function j1(o){var c=En();return RA(c,Ht,o)}function RA(o,c,f){var p=o.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=f;var b=o.baseQueue,E=p.pending;if(E!==null){if(b!==null){var D=b.next;b.next=E.next,E.next=D}c.baseQueue=b=E,p.pending=null}if(E=o.baseState,b===null)o.memoizedState=E;else{c=b.next;var V=D=null,Y=null,ce=c,ge=!1;do{var we=ce.lane&-536870913;
vendor: 79,959 bytes, line 49
49if(we!==ce.lane?(Ct&we)===we:(Ic&we)===we){var le=ce.revertLane;if(le===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),we===Bd&&(ge=!0);else if((Ic&le)===le){ce=ce.next,le===Bd&&(ge=!0);continue}else we={lane:0,revertLane:ce.revertLane,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Y===null?(V=Y=we,D=E):Y=Y.next=we,ct.lanes|=le,Dc|=le;we=ce.action,Tu&&f(E,we),E=ce.hasEagerState?ce.eagerState:f(E,we)}else le={lane:we,revertLane:ce.revertLane,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Y===null?(V=Y=le,D=E):Y=Y.next=le,ct.lanes|=we,Dc|=we;ce=ce.next}while(ce!==null&&ce!==c);if(Y===null?D=E:Y.next=V,!gi(E,o.memoizedState)&&(Gn=!0,ge&&(f=Pd,f!==null)))throw f;o.memoizedState=E,o.baseState=D,o.baseQueue=Y,p.lastRenderedState=E}return b===null&&(p.lanes=0),[o.memoizedState,p.dispatch]}function kA(o){var c=En(),f=c.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=o;var p=f.dispatch,b=f.pending,E=c.memoizedState;if(b!==null){f.pending=null;var D=b=b.next;do E=o(E,D.action),D=D.next;while(D!==b);gi(E,c.memoizedState)||(Gn=!0),c.memoizedState=E,c.baseQueue===null&&(c.baseState=E),f.lastRenderedState=E}return[E,p]}function $T(o,c,f){var p=ct,b=En(),E=Ot;if(E){if(f===void 0)throw Error(r(407));f=f()}else f=c();var D=!gi((Ht||b).memoizedState,f);D&&(b.memoizedState=f,Gn=!0),b=b.queue;var V=KT.bind(null,p,b,o);if(am(2048,8,V,[o]),b.getSnapshot!==c||D||An!==null&&An.memoizedState.tag&1){if(p.flags|=2048,Ld(9,L1(),QT.bind(null,p,b,f,c),null),Wt===null)throw Error(r(349));E||(Ic&124)!==0||GT(p,c,f)}return f}function GT(o,c,f){o.flags|=16384,o={getSnapshot:c,value:f},c=ct.updateQueue,c===null?(c=SA(),ct.updateQueue=c,c.stores=[o]):(f=c.stores,f===null?c.stores=[o]:f.push(o))}function QT(o,c,f,p){c.value=f,c.getSnapshot=p,WT(c)&&YT(o)}function KT(o,c,f){return f(function(){WT(c)&&YT(o)})}function WT(o){var c=o.getSnapshot;o=o.value;try{var f=c();return!gi(o,f)}catch{return!0}}function YT(o){var c=Rd(o,2);c!==null&&Ei(c,o,2)}function NA(o){var c=Yr();if(typeof o=="function"){var f=o;if(o=f(),Tu){He(!0);try{f()}finally{He(!1)}}}return c.memoizedState=c.baseState=o,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:o},c}function JT(o,c,f,p){return o.baseState=f,RA(o,Ht,typeof p=="function"?p:pa)}function ZF(o,c,f,p,b){if(F1(o))throw Error(r(485));if(o=c.action,o!==null){var E={payload:b,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){E.listeners.push(D)}};Q.T!==null?f(!0):E.isTransition=!1,p(E),f=c.pending,f===null?(E.next=c.pending=E,XT(c,E)):(E.next=f.next,c.pending=f.next=E)}}function XT(o,c){var f=c.action,p=c.payload,b=o.state;if(c.isTransition){var E=Q.T,D={};Q.T=D;try{var V=f(b,p),Y=Q.S;Y!==null&&Y(D,V),ZT(o,c,V)}catch(ce){OA(o,c,ce)}finally{Q.T=E}}else try{E=f(b,p),ZT(o,c,E)}catch(ce){OA(o,c,ce)}}function ZT(o,c,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){eS(o,c,p)},function(p){return OA(o,c,p)}):eS(o,c,f)}function eS(o,c,f){c.status="fulfilled",c.value=f,tS(c),o.state=f,c=o.pending,c!==null&&(f=c.next,f===c?o.pending=null:(f=f.next,c.next=f,XT(o,f)))}function OA(o,c,f){var p=o.pending;if(o.pending=null,p!==null){p=p.next;do c.status="rejected",c.reason=f,tS(c),c=c.next;while(c!==p)}o.action=null}function tS(o){o=o.listeners;for(var c=0;c<o.length;c++)(0,o[c])()}function nS(o,c){return c}function rS(o,c){if(Ot){var f=Wt.formState;if(f!==null){e:{var p=ct;if(Ot){if(an){t:{for(var b=an,E=io;b.nodeType!==8;){if(!E){b=null;break t}if(b=Es(b.nextSibling),b===null){b=null;break t}}E=b.data,b=E==="F!"||E==="F"?b:null}if(b){an=Es(b.nextSibling),p=b.data==="F!";break e}}Eu(p)}p=!1}p&&(c=f[0])}}return f=Yr(),f.memoizedState=f.baseState=c,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nS,lastRenderedState:c},f.queue=p,f=ES.bind(null,ct,p),p.dispatch=f,p=NA(!1),E=jA.bind(null,ct,!1,p.queue),p=Yr(),b={state:c,dispatch:null,action:o,pending:null},p.queue=b,f=ZF.bind(null,ct,b,E,f),b.dispatch=f,p.memoizedState=o,[c,f,!1]}function iS(o){var c=En();return sS(c,Ht,o)}function sS(o,c,f){if(c=RA(o,c,nS)[0],o=j1(pa)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var p=om(c)}catch(D){throw D===em?N1:D}else p=c;c=En();var b=c.queue,E=b.dispatch;return f!==c.memoizedState&&(ct.flags|=2048,Ld(9,L1(),eV.bind(null,b,f),null)),[p,E,o]}function eV(o,c){o.action=c}function oS(o){var c=En(),f=Ht;if(f!==null)return sS(c,f,o);En(),c=c.memoizedState,f=En();var p=f.queue.dispatch;return f.memoizedState=o,[c,p,!1]}function Ld(o,c,f,p){return o={tag:o,create:f,deps:p,inst:c,next:null},c=ct.updateQueue,c===null&&(c=SA(),ct.updateQueue=c),f=c.lastEffect,f===null?c.lastEffect=o.next=o:(p=f.next,f.next=o,o.next=p,c.lastEffect=o),o}function L1(){return{destroy:void 0,resource:void 0}}function aS(){return En().memoizedState}function U1(o,c,f,p){var b=Yr();p=p===void 0?null:p,ct.flags|=o,b.memoizedState=Ld(1|c,L1(),f,p)}function am(o,c,f,p){var b=En();p=p===void 0?null:p;var E=b.memoizedState.inst;Ht!==null&&p!==null&&EA(p,Ht.memoizedState.deps)?b.memoizedState=Ld(c,E,f,p):(ct.flags|=o,b.memoizedState=Ld(1|c,E,f,p))}function cS(o,c){U1(8390656,8,o,c)}function lS(o,c){am(2048,8,o,c)}function uS(o,c){return am(4,2,o,c)}function fS(o,c){return am(4,4,o,c)}function dS(o,c){if(typeof c=="function"){o=o();var f=c(o);return function(){typeof f=="function"?f():c(null)}}if(c!=null)return o=o(),c.current=o,function(){c.current=null}}function hS(o,c,f){f=f!=null?f.concat([o]):null,am(4,4,dS.bind(null,c,o),f)}function BA(){}function pS(o,c){var f=En();c=c===void 0?null:c;var p=f.memoizedState;return c!==null&&EA(c,p[1])?p[0]:(f.memoizedState=[o,c],o)}function mS(o,c){var f=En();c=c===void 0?null:c;var p=f.memoizedState;if(c!==null&&EA(c,p[1]))return p[0];if(p=o(),Tu){He(!0);try{o()}finally{He(!1)}}return f.memoizedState=[p,c],p}function PA(o,c,f){return f===void 0||(Ic&1073741824)!==0?o.memoizedState=c:(o.memoizedState=f,o=b8(),ct.lanes|=o,Dc|=o,f)}function gS(o,c,f,p){return gi(f,c)?f:Dd.current!==null?(o=PA(o,f,p),gi(o,c)||(Gn=!0),o):(Ic&42)===0?(Gn=!0,o.memoizedState=f):(o=b8(),ct.lanes|=o,Dc|=o,c)}function yS(o,c,f,p,b){var E=te.p;te.p=E!==0&&8>E?E:8;var D=Q.T,V={};Q.T=V,jA(o,!1,c,f);try{var Y=b(),ce=Q.S;if(ce!==null&&ce(V,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var ge=YF(Y,p);cm(o,c,ge,Ai(o))}else cm(o,c,p,Ai(o))}catch(we){cm(o,c,{then:function(){},status:"rejected",reason:we},Ai())}finally{te.p=E,Q.T=D}}function tV(){}function DA(o,c,f,p){if(o.tag!==5)throw Error(r(476));var b=bS(o).queue;yS(o,b,c,J,f===null?tV:function(){return wS(o),f(p)})}function bS(o){var c=o.memoizedState;if(c!==null)return c;c={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:J},next:null};var f={};return c.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:f},next:null},o.memoizedState=c,o=o.alternate,o!==null&&(o.memoizedState=c),c}function wS(o){var c=bS(o).next.queue;cm(o,c,{},Ai())}function MA(){return br(Tm)}function vS(){return En().memoizedState}function AS(){return En().memoizedState}function nV(o){for(var c=o.return;c!==null;){switch(c.tag){case 24:case 3:var f=Ai();o=Tc(f);var p=Sc(c,o,f);p!==null&&(Ei(p,c,f),nm(p,c,f)),c={cache:dA()},o.payload=c;return}c=c.return}}function rV(o,c,f){var p=Ai();f={lane:p,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},F1(o)?xS(c,f):(f=nA(o,c,f,p),f!==null&&(Ei(f,o,p),CS(f,c,p)))}function ES(o,c,f){var p=Ai();cm(o,c,f,p)}function cm(o,c,f,p){var b={lane:p,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(F1(o))xS(c,b);else{var E=o.alternate;if(o.lanes===0&&(E===null||E.lanes===0)&&(E=c.lastRenderedReducer,E!==null))try{var D=c.lastRenderedState,V=E(D,f);if(b.hasEagerState=!0,b.eagerState=V,gi(V,D))return x1(o,c,b,0),Wt===null&&E1(),!1}catch{}finally{}if(f=nA(o,c,b,p),f!==null)return Ei(f,o,p),CS(f,c,p),!0}return!1}function jA(o,c,f,p){if(p={lane:2,revertLane:mE(),action:p,hasEagerState:!1,eagerState:null,next:null},F1(o)){if(c)throw Error(r(479))}else c=nA(o,f,p,2),c!==null&&Ei(c,o,2)}function F1(o){var c=o.alternate;return o===ct||c!==null&&c===ct}function xS(o,c){Md=P1=!0;var f=o.pending;f===null?c.next=c:(c.next=f.next,f.next=c),o.pending=c}function CS(o,c,f){if((f&4194048)!==0){var p=c.lanes;p&=o.pendingLanes,f|=p,c.lanes=f,k0(o,f)}}var V1={readContext:br,use:M1,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useInsertionEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useSyncExternalStore:pn,useId:pn,useHostTransitionStatus:pn,useFormState:pn,useActionState:pn,useOptimistic:pn,useMemoCache:pn,useCacheRefresh:pn},_S={readContext:br,use:M1,useCallback:function(o,c){return Yr().memoizedState=[o,c===void 0?null:c],o},useContext:br,useEffect:cS,useImperativeHandle:function(o,c,f){f=f!=null?f.concat([o]):null,U1(4194308,4,dS.bind(null,c,o),f)},useLayoutEffect:function(o,c){return U1(4194308,4,o,c)},useInsertionEffect:function(o,c){U1(4,2,o,c)},useMemo:function(o,c){var f=Yr();c=c===void 0?null:c;var p=o();if(Tu){He(!0);try{o()}finally{He(!1)}}return f.memoizedState=[p,c],p},useReducer:function(o,c,f){var p=Yr();if(f!==void 0){var b=f(c);if(Tu){He(!0);try{f(c)}finally{He(!1)}}}else b=c;return p.memoizedState=p.baseState=b,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:b},p.queue=o,o=o.dispatch=rV.bind(null,ct,o),[p.memoizedState,o]},useRef:function(o){var c=Yr();return o={current:o},c.memoizedState=o},useState:function(o){o=NA(o);var c=o.queue,f=ES.bind(null,ct,c);return c.dispatch=f,[o.memoizedState,f]},useDebugValue:BA,useDeferredValue:function(o,c){var f=Yr();return PA(f,o,c)},useTransition:function(){var o=NA(!1);return o=yS.bind(null,ct,o.queue,!0,!1),Yr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,c,f){var p=ct,b=Yr();if(Ot){if(f===void 0)throw Error(r(407));f=f()}else{if(f=c(),Wt===null)throw Error(r(349));(Ct&124)!==0||GT(p,c,f)}b.memoizedState=f;var E={value:f,getSnapshot:c};return b.queue=E,cS(KT.bind(null,p,E,o),[o]),p.flags|=2048,Ld(9,L1(),QT.bind(null,p,E,f,c),null),f},useId:function(){var o=Yr(),c=Wt.identifierPrefix;if(Ot){var f=fa,p=ua;f=(p&~(1<<32-rt(p)-1)).toString(32)+f,c="«"+c+"R"+f,f=D1++,0<f&&(c+="H"+f.toString(32)),c+="»"}else f=JF++,c="«"+c+"r"+f.toString(32)+"»";return o.memoizedState=c},useHostTransitionStatus:MA,useFormState:rS,useActionState:rS,useOptimistic:function(o){var c=Yr();c.memoizedState=c.baseState=o;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=f,c=jA.bind(null,ct,!0,f),f.dispatch=c,[o,c]},useMemoCache:IA,useCacheRefresh:function(){return Yr().memoizedState=nV.bind(null,ct)}},TS={readContext:br,use:M1,useCallback:pS,useContext:br,useEffect:lS,useImperativeHandle:hS,useInsertionEffect:uS,useLayoutEffect:fS,useMemo:mS,useReducer:j1,useRef:aS,useState:function(){return j1(pa)},useDebugValue:BA,useDeferredValue:function(o,c){var f=En();return gS(f,Ht.memoizedState,o,c)},useTransition:function(){var o=j1(pa)[0],c=En().memoizedState;return[typeof o=="boolean"?o:om(o),c]},useSyncExternalStore:$T,useId:vS,useHostTransitionStatus:MA,useFormState:iS,useActionState:iS,useOptimistic:function(o,c){var f=En();return JT(f,Ht,o,c)},useMemoCache:IA,useCacheRefresh:AS},iV={readContext:br,use:M1,useCallback:pS,useContext:br,useEffect:lS,useImperativeHandle:hS,useInsertionEffect:uS,useLayoutEffect:fS,useMemo:mS,useReducer:kA,useRef:aS,useState:function(){return kA(pa)},useDebugValue:BA,useDeferredValue:function(o,c){var f=En();return Ht===null?PA(f,o,c):gS(f,Ht.memoizedState,o,c)},useTransition:function(){var o=kA(pa)[0],c=En().memoizedState;return[typeof o=="boolean"?o:om(o),c]},useSyncExternalStore:$T,useId:vS,useHostTransitionStatus:MA,useFormState:oS,useActionState:oS,useOptimistic:function(o,c){var f=En();return Ht!==null?JT(f,Ht,o,c):(f.baseState=o,[o,f.queue.dispatch])},useMemoCache:IA,useCacheRefresh:AS},Ud=null,lm=0;function z1(o){var c=lm;return lm+=1,Ud===null&&(Ud=[]),jT(Ud,o,c)}function um(o,c){c=c.props.ref,o.ref=c!==void 0?c:null}function H1(o,c){throw c.$$typeof===m?Error(r(525)):(o=Object.prototype.toString.call(c),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":o)))}function SS(o){var c=o._init;return c(o._payload)}function IS(o){function c(re,Z){if(o){var oe=re.deletions;oe===null?(re.deletions=[Z],re.flags|=16):oe.push(Z)}}function f(re,Z){if(!o)return null;for(;Z!==null;)c(re,Z),Z=Z.sibling;return null}function p(re){for(var Z=new Map;re!==null;)re.key!==null?Z.set(re.key,re):Z.set(re.index,re),re=re.sibling;return Z}function b(re,Z){return re=la(re,Z),re.index=0,re.sibling=null,re}function E(re,Z,oe){return re.index=oe,o?(oe=re.alternate,oe!==null?(oe=oe.index,oe<Z?(re.flags|=67108866,Z):oe):(re.flags|=67108866,Z)):(re.flags|=1048576,Z)}function D(re){return o&&re.alternate===null&&(re.flags|=67108866),re}function V(re,Z,oe,be){return Z===null||Z.tag!==6?(Z=iA(oe,re.mode,be),Z.return=re,Z):(Z=b(Z,oe),Z.return=re,Z)}function Y(re,Z,oe,be){var Me=oe.type;return Me===A?ge(re,Z,oe.props.children,be,oe.key):Z!==null&&(Z.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===R&&SS(Me)===Z.type)?(Z=b(Z,oe.props),um(Z,oe),Z.return=re,Z):(Z=_1(oe.type,oe.key,oe.props,null,re.mode,be),um(Z,oe),Z.return=re,Z)}function ce(re,Z,oe,be){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==oe.containerInfo||Z.stateNode.implementation!==oe.implementation?(Z=sA(oe,re.mode,be),Z.return=re,Z):(Z=b(Z,oe.children||[]),Z.return=re,Z)}function ge(re,Z,oe,be,Me){return Z===null||Z.tag!==7?(Z=bu(oe,re.mode,be,Me),Z.return=re,Z):(Z=b(Z,oe),Z.return=re,Z)}function we(re,Z,oe){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=iA(""+Z,re.mode,oe),Z.return=re,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case g:return oe=_1(Z.type,Z.key,Z.props,null,re.mode,oe),um(oe,Z),oe.return=re,oe;case w:return Z=sA(Z,re.mode,oe),Z.return=re,Z;case R:var be=Z._init;return Z=be(Z._payload),we(re,Z,oe)}if(X(Z)||q(Z))return Z=bu(Z,re.mode,oe,null),Z.return=re,Z;if(typeof Z.then=="function")return we(re,z1(Z),oe);if(Z.$$typeof===k)return we(re,R1(re,Z),oe);H1(re,Z)}return null}function le(re,Z,oe,be){var Me=Z!==null?Z.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Me!==null?null:V(re,Z,""+oe,be);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case g:return oe.key===Me?Y(re,Z,oe,be):null;case w:return oe.key===Me?ce(re,Z,oe,be):null;case R:return Me=oe._init,oe=Me(oe._payload),le(re,Z,oe,be)}if(X(oe)||q(oe))return Me!==null?null:ge(re,Z,oe,be,null);if(typeof oe.then=="function")return le(re,Z,z1(oe),be);if(oe.$$typeof===k)return le(re,Z,R1(re,oe),be);H1(re,oe)}return null}function ue(re,Z,oe,be,Me){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return re=re.get(oe)||null,V(Z,re,""+be,Me);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case g:return re=re.get(be.key===null?oe:be.key)||null,Y(Z,re,be,Me);case w:return re=re.get(be.key===null?oe:be.key)||null,ce(Z,re,be,Me);case R:var dt=be._init;return be=dt(be._payload),ue(re,Z,oe,be,Me)}if(X(be)||q(be))return re=re.get(oe)||null,ge(Z,re,be,Me,null);if(typeof be.then=="function")return ue(re,Z,oe,z1(be),Me);if(be.$$typeof===k)return ue(re,Z,oe,R1(Z,be),Me);H1(Z,be)}return null}function Ze(re,Z,oe,be){for(var Me=null,dt=null,ze=Z,Ye=Z=0,Kn=null;ze!==null&&Ye<oe.length;Ye++){ze.index>Ye?(Kn=ze,ze=null):Kn=ze.sibling;var Rt=le(re,ze,oe[Ye],be);if(Rt===null){ze===null&&(ze=Kn);break}o&&ze&&Rt.alternate===null&&c(re,ze),Z=E(Rt,Z,Ye),dt===null?Me=Rt:dt.sibling=Rt,dt=Rt,ze=Kn}if(Ye===oe.length)return f(re,ze),Ot&&vu(re,Ye),Me;if(ze===null){for(;Ye<oe.length;Ye++)ze=we(re,oe[Ye],be),ze!==null&&(Z=E(ze,Z,Ye),dt===null?Me=ze:dt.sibling=ze,dt=ze);return Ot&&vu(re,Ye),Me}for(ze=p(ze);Ye<oe.length;Ye++)Kn=ue(ze,re,Ye,oe[Ye],be),Kn!==null&&(o&&Kn.alternate!==null&&ze.delete(Kn.key===null?Ye:Kn.key),Z=E(Kn,Z,Ye),dt===null?Me=Kn:dt.sibling=Kn,dt=Kn);return o&&ze.forEach(function(qc){return c(re,qc)}),Ot&&vu(re,Ye),Me}function Ke(re,Z,oe,be){if(oe==null)throw Error(r(151));for(var Me=null,dt=null,ze=Z,Ye=Z=0,Kn=null,Rt=oe.next();ze!==null&&!Rt.done;Ye++,Rt=oe.next()){ze.index>Ye?(Kn=ze,ze=null):Kn=ze.sibling;var qc=le(re,ze,Rt.value,be);if(qc===null){ze===null&&(ze=Kn);break}o&&ze&&qc.alternate===null&&c(re,ze),Z=E(qc,Z,Ye),dt===null?Me=qc:dt.sibling=qc,dt=qc,ze=Kn}if(Rt.done)return f(re,ze),Ot&&vu(re,Ye),Me;if(ze===null){for(;!Rt.done;Ye++,Rt=oe.next())Rt=we(re,Rt.value,be),Rt!==null&&(Z=E(Rt,Z,Ye),dt===null?Me=Rt:dt.sibling=Rt,dt=Rt);return Ot&&vu(re,Ye),Me}for(ze=p(ze);!Rt.done;Ye++,Rt=oe.next())Rt=ue(ze,re,Ye,Rt.value,be),Rt!==null&&(o&&Rt.alternate!==null&&ze.delete(Rt.key===null?Ye:Rt.key),Z=E(Rt,Z,Ye),dt===null?Me=Rt:dt.sibling=Rt,dt=Rt);return o&&ze.forEach(function(sz){return c(re,sz)}),Ot&&vu(re,Ye),Me}function $t(re,Z,oe,be){if(typeof oe=="object"&&oe!==null&&oe.type===A&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case g:e:{for(var Me=oe.key;Z!==null;){if(Z.key===Me){if(Me=oe.type,Me===A){if(Z.tag===7){f(re,Z.sibling),be=b(Z,oe.props.children),be.return=re,re=be;break e}}else if(Z.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===R&&SS(Me)===Z.type){f(re,Z.sibling),be=b(Z,oe.props),um(be,oe),be.return=re,re=be;break e}f(re,Z);break}else c(re,Z);Z=Z.sibling}oe.type===A?(be=bu(oe.props.children,re.mode,be,oe.key),be.return=re,re=be):(be=_1(oe.type,oe.key,oe.props,null,re.mode,be),um(be,oe),be.return=re,re=be)}return D(re);case w:e:{for(Me=oe.key;Z!==null;){if(Z.key===Me)if(Z.tag===4&&Z.stateNode.containerInfo===oe.containerInfo&&Z.stateNode.implementation===oe.implementation){f(re,Z.sibling),be=b(Z,oe.children||[]),be.return=re,re=be;break e}else{f(re,Z);break}else c(re,Z);Z=Z.sibling}be=sA(oe,re.mode,be),be.return=re,re=be}return D(re);case R:return Me=oe._init,oe=Me(oe._payload),$t(re,Z,oe,be)}if(X(oe))return Ze(re,Z,oe,be);if(q(oe)){if(Me=q(oe),typeof Me!="function")throw Error(r(150));return oe=Me.call(oe),Ke(re,Z,oe,be)}if(typeof oe.then=="function")return $t(re,Z,z1(oe),be);if(oe.$$typeof===k)return $t(re,Z,R1(re,oe),be);H1(re,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,Z!==null&&Z.tag===6?(f(re,Z.sibling),be=b(Z,oe),be.return=re,re=be):(f(re,Z),be=iA(oe,re.mode,be),be.return=re,re=be),D(re)):f(re,Z)}return function(re,Z,oe,be){try{lm=0;var Me=$t(re,Z,oe,be);return Ud=null,Me}catch(ze){if(ze===em||ze===N1)throw ze;var dt=yi(29,ze,null,re.mode);return dt.lanes=be,dt.return=re,dt}finally{}}}var Fd=IS(!0),RS=IS(!1),Yi=se(null),so=null;function Rc(o){var c=o.alternate;pe(Dn,Dn.current&1),pe(Yi,o),so===null&&(c===null||Dd.current!==null||c.memoizedState!==null)&&(so=o)}function kS(o){if(o.tag===22){if(pe(Dn,Dn.current),pe(Yi,o),so===null){var c=o.alternate;c!==null&&c.memoizedState!==null&&(so=o)}}else kc()}function kc(){pe(Dn,Dn.current),pe(Yi,Yi.current)}function ma(o){ye(Yi),so===o&&(so=null),ye(Dn)}var Dn=se(0);function q1(o){for(var c=o;c!==null;){if(c.tag===13){var f=c.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||SE(f)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}function LA(o,c,f,p){c=o.memoizedState,f=f(p,c),f=f==null?c:h({},c,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var UA={enqueueSetState:function(o,c,f){o=o._reactInternals;var p=Ai(),b=Tc(p);b.payload=c,f!=null&&(b.callback=f),c=Sc(o,b,p),c!==null&&(Ei(c,o,p),nm(c,o,p))},enqueueReplaceState:function(o,c,f){o=o._reactInternals;var p=Ai(),b=Tc(p);b.tag=1,b.payload=c,f!=null&&(b.callback=f),c=Sc(o,b,p),c!==null&&(Ei(c,o,p),nm(c,o,p))},enqueueForceUpdate:function(o,c){o=o._reactInternals;var f=Ai(),p=Tc(f);p.tag=2,c!=null&&(p.callback=c),c=Sc(o,p,f),c!==null&&(Ei(c,o,f),nm(c,o,f))}};function NS(o,c,f,p,b,E,D){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,E,D):c.prototype&&c.prototype.isPureReactComponent?!G0(f,p)||!G0(b,E):!0}function OS(o,c,f,p){o=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(f,p),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(f,p),c.state!==o&&UA.enqueueReplaceState(c,c.state,null)}function Su(o,c){var f=c;if("ref"in c){f={};for(var p in c)p!=="ref"&&(f[p]=c[p])}if(o=o.defaultProps){f===c&&(f=h({},f));for(var b in o)f[b]===void 0&&(f[b]=o[b])}return f}var $1=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function BS(o){$1(o)}function PS(o){console.error(o)}function DS(o){$1(o)}function G1(o,c){try{var f=o.onUncaughtError;f(c.value,{componentStack:c.stack})}catch(p){setTimeout(function(){throw p})}}function MS(o,c,f){try{var p=o.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function FA(o,c,f){return f=Tc(f),f.tag=3,f.payload={element:null},f.callback=function(){G1(o,c)},f}function jS(o){return o=Tc(o),o.tag=3,o}function LS(o,c,f,p){var b=f.type.getDerivedStateFromError;if(typeof b=="function"){var E=p.value;o.payload=function(){return b(E)},o.callback=function(){MS(c,f,p)}}var D=f.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(o.callback=function(){MS(c,f,p),typeof b!="function"&&(Mc===null?Mc=new Set([this]):Mc.add(this));var V=p.stack;this.componentDidCatch(p.value,{componentStack:V!==null?V:""})})}function sV(o,c,f,p,b){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(c=f.alternate,c!==null&&J0(c,f,b,!0),f=Yi.current,f!==null){switch(f.tag){case 13:return so===null?uE():f.alternate===null&&cn===0&&(cn=3),f.flags&=-257,f.flags|=65536,f.lanes=b,p===mA?f.flags|=16384:(c=f.updateQueue,c===null?f.updateQueue=new Set([p]):c.add(p),dE(o,p,b)),!1;case 22:return f.flags|=65536,p===mA?f.flags|=16384:(c=f.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=c):(f=c.retryQueue,f===null?c.retryQueue=new Set([p]):f.add(p)),dE(o,p,b)),!1}throw Error(r(435,f.tag))}return dE(o,p,b),uE(),!1}if(Ot)return c=Yi.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=b,p!==cA&&(o=Error(r(422),{cause:p}),Y0(Gi(o,f)))):(p!==cA&&(c=Error(r(423),{cause:p}),Y0(Gi(c,f))),o=o.current.alternate,o.flags|=65536,b&=-b,o.lanes|=b,p=Gi(p,f),b=FA(o.stateNode,p,b),bA(o,b),cn!==4&&(cn=2)),!1;var E=Error(r(520),{cause:p});if(E=Gi(E,f),ym===null?ym=[E]:ym.push(E),cn!==4&&(cn=2),c===null)return!0;p=Gi(p,f),f=c;do{switch(f.tag){case 3:return f.flags|=65536,o=b&-b,f.lanes|=o,o=FA(f.stateNode,p,o),bA(f,o),!1;case 1:if(c=f.type,E=f.stateNode,(f.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Mc===null||!Mc.has(E))))return f.flags|=65536,b&=-b,f.lanes|=b,b=jS(b),LS(b,o,f,p),bA(f,b),!1}f=f.return}while(f!==null);return!1}var US=Error(r(461)),Gn=!1;function sr(o,c,f,p){c.child=o===null?RS(c,null,f,p):Fd(c,o.child,f,p)}function FS(o,c,f,p,b){f=f.render;var E=c.ref;if("ref"in p){var D={};for(var V in p)V!=="ref"&&(D[V]=p[V])}else D=p;return Cu(c),p=xA(o,c,f,D,E,b),V=CA(),o!==null&&!Gn?(_A(o,c,b),ga(o,c,b)):(Ot&&V&&oA(c),c.flags|=1,sr(o,c,p,b),c.child)}function VS(o,c,f,p,b){if(o===null){var E=f.type;return typeof E=="function"&&!rA(E)&&E.defaultProps===void 0&&f.compare===null?(c.tag=15,c.type=E,zS(o,c,E,p,b)):(o=_1(f.type,null,p,c,c.mode,b),o.ref=c.ref,o.return=c,c.child=o)}if(E=o.child,!KA(o,b)){var D=E.memoizedProps;if(f=f.compare,f=f!==null?f:G0,f(D,p)&&o.ref===c.ref)return ga(o,c,b)}return c.flags|=1,o=la(E,p),o.ref=c.ref,o.return=c,c.child=o}function zS(o,c,f,p,b){if(o!==null){var E=o.memoizedProps;if(G0(E,p)&&o.ref===c.ref)if(Gn=!1,c.pendingProps=p=E,KA(o,b))(o.flags&131072)!==0&&(Gn=!0);else return c.lanes=o.lanes,ga(o,c,b)}return VA(o,c,f,p,b)}function HS(o,c,f){var p=c.pendingProps,b=p.children,E=o!==null?o.memoizedState:null;if(p.mode==="hidden"){if((c.flags&128)!==0){if(p=E!==null?E.baseLanes|f:f,o!==null){for(b=c.child=o.child,E=0;b!==null;)E=E|b.lanes|b.childLanes,b=b.sibling;c.childLanes=E&~p}else c.childLanes=0,c.child=null;return qS(o,c,p,f)}if((f&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},o!==null&&k1(c,E!==null?E.cachePool:null),E!==null?zT(c,E):vA(),kS(c);else return c.lanes=c.childLanes=536870912,qS(o,c,E!==null?E.baseLanes|f:f,f)}else E!==null?(k1(c,E.cachePool),zT(c,E),kc(),c.memoizedState=null):(o!==null&&k1(c,null),vA(),kc());return sr(o,c,b,f),c.child}function qS(o,c,f,p){var b=pA();return b=b===null?null:{parent:Pn._currentValue,pool:b},c.memoizedState={baseLanes:f,cachePool:b},o!==null&&k1(c,null),vA(),kS(c),o!==null&&J0(o,c,p,!0),null}function Q1(o,c){var f=c.ref;if(f===null)o!==null&&o.ref!==null&&(c.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(o===null||o.ref!==f)&&(c.flags|=4194816)}}function VA(o,c,f,p,b){return Cu(c),f=xA(o,c,f,p,void 0,b),p=CA(),o!==null&&!Gn?(_A(o,c,b),ga(o,c,b)):(Ot&&p&&oA(c),c.flags|=1,sr(o,c,f,b),c.child)}function $S(o,c,f,p,b,E){return Cu(c),c.updateQueue=null,f=qT(c,p,f,b),HT(o),p=CA(),o!==null&&!Gn?(_A(o,c,E),ga(o,c,E)):(Ot&&p&&oA(c),c.flags|=1,sr(o,c,f,E),c.child)}function GS(o,c,f,p,b){if(Cu(c),c.stateNode===null){var E=kd,D=f.contextType;typeof D=="object"&&D!==null&&(E=br(D)),E=new f(p,E),c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=UA,c.stateNode=E,E._reactInternals=c,E=c.stateNode,E.props=p,E.state=c.memoizedState,E.refs={},gA(c),D=f.contextType,E.context=typeof D=="object"&&D!==null?br(D):kd,E.state=c.memoizedState,D=f.getDerivedStateFromProps,typeof D=="function"&&(LA(c,f,D,p),E.state=c.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(D=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),D!==E.state&&UA.enqueueReplaceState(E,E.state,null),im(c,p,E,b),rm(),E.state=c.memoizedState),typeof E.componentDidMount=="function"&&(c.flags|=4194308),p=!0}else if(o===null){E=c.stateNode;var V=c.memoizedProps,Y=Su(f,V);E.props=Y;var ce=E.context,ge=f.contextType;D=kd,typeof ge=="object"&&ge!==null&&(D=br(ge));var we=f.getDerivedStateFromProps;ge=typeof we=="function"||typeof E.getSnapshotBeforeUpdate=="function",V=c.pendingProps!==V,ge||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(V||ce!==D)&&OS(c,E,p,D),_c=!1;var le=c.memoizedState;E.state=le,im(c,p,E,b),rm(),ce=c.memoizedState,V||le!==ce||_c?(typeof we=="function"&&(LA(c,f,we,p),ce=c.memoizedState),(Y=_c||NS(c,f,Y,p,le,ce,D))?(ge||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(c.flags|=4194308)):(typeof E.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=p,c.memoizedState=ce),E.props=p,E.state=ce,E.context=D,p=Y):(typeof E.componentDidMount=="function"&&(c.flags|=4194308),p=!1)}else{E=c.stateNode,yA(o,c),D=c.memoizedProps,ge=Su(f,D),E.props=ge,we=c.pendingProps,le=E.context,ce=f.contextType,Y=kd,typeof ce=="object"&&ce!==null&&(Y=br(ce)),V=f.getDerivedStateFromProps,(ce=typeof V=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==we||le!==Y)&&OS(c,E,p,Y),_c=!1,le=c.memoizedState,E.state=le,im(c,p,E,b),rm();var ue=c.memoizedState;D!==we||le!==ue||_c||o!==null&&o.dependencies!==null&&I1(o.dependencies)?(typeof V=="function"&&(LA(c,f,V,p),ue=c.memoizedState),(ge=_c||NS(c,f,ge,p,le,ue,Y)||o!==null&&o.dependencies!==null&&I1(o.dependencies))?(ce||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(p,ue,Y),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(p,ue,Y)),typeof E.componentDidUpdate=="function"&&(c.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof E.componentDidUpdate!="function"||D===o.memoizedProps&&le===o.memoizedState||(c.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===o.memoizedProps&&le===o.memoizedState||(c.flags|=1024),c.memoizedProps=p,c.memoizedState=ue),E.props=p,E.state=ue,E.context=Y,p=ge):(typeof E.componentDidUpdate!="function"||D===o.memoizedProps&&le===o.memoizedState||(c.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===o.memoizedProps&&le===o.memoizedState||(c.flags|=1024),p=!1)}return E=p,Q1(o,c),p=(c.flags&128)!==0,E||p?(E=c.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:E.render(),c.flags|=1,o!==null&&p?(c.child=Fd(c,o.child,null,b),c.child=Fd(c,null,f,b)):sr(o,c,f,b),c.memoizedState=E.state,o=c.child):o=ga(o,c,b),o}function QS(o,c,f,p){return W0(),c.flags|=256,sr(o,c,f,p),c.child}var zA={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function HA(o){return{baseLanes:o,cachePool:PT()}}function qA(o,c,f){return o=o!==null?o.childLanes&~f:0,c&&(o|=Ji),o}function KS(o,c,f){var p=c.pendingProps,b=!1,E=(c.flags&128)!==0,D;if((D=E)||(D=o!==null&&o.memoizedState===null?!1:(Dn.current&2)!==0),D&&(b=!0,c.flags&=-129),D=(c.flags&32)!==0,c.flags&=-33,o===null){if(Ot){if(b?Rc(c):kc(),Ot){var V=an,Y;if(Y=V){e:{for(Y=V,V=io;Y.nodeType!==8;){if(!V){V=null;break e}if(Y=Es(Y.nextSibling),Y===null){V=null;break e}}V=Y}V!==null?(c.memoizedState={dehydrated:V,treeContext:wu!==null?{id:ua,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},Y=yi(18,null,null,0),Y.stateNode=V,Y.return=c,c.child=Y,Br=c,an=null,Y=!0):Y=!1}Y||Eu(c)}if(V=c.memoizedState,V!==null&&(V=V.dehydrated,V!==null))return SE(V)?c.lanes=32:c.lanes=536870912,null;ma(c)}return V=p.children,p=p.fallback,b?(kc(),b=c.mode,V=K1({mode:"hidden",children:V},b),p=bu(p,b,f,null),V.return=c,p.return=c,V.sibling=p,c.child=V,b=c.child,b.memoizedState=HA(f),b.childLanes=qA(o,D,f),c.memoizedState=zA,p):(Rc(c),$A(c,V))}if(Y=o.memoizedState,Y!==null&&(V=Y.dehydrated,V!==null)){if(E)c.flags&256?(Rc(c),c.flags&=-257,c=GA(o,c,f)):c.memoizedState!==null?(kc(),c.child=o.child,c.flags|=128,c=null):(kc(),b=p.fallback,V=c.mode,p=K1({mode:"visible",children:p.children},V),b=bu(b,V,f,null),b.flags|=2,p.return=c,b.return=c,p.sibling=b,c.child=p,Fd(c,o.child,null,f),p=c.child,p.memoizedState=HA(f),p.childLanes=qA(o,D,f),c.memoizedState=zA,c=b);else if(Rc(c),SE(V)){if(D=V.nextSibling&&V.nextSibling.dataset,D)var ce=D.dgst;D=ce,p=Error(r(419)),p.stack="",p.digest=D,Y0({value:p,source:null,stack:null}),c=GA(o,c,f)}else if(Gn||J0(o,c,f,!1),D=(f&o.childLanes)!==0,Gn||D){if(D=Wt,D!==null&&(p=f&-f,p=(p&42)!==0?1:yc(p),p=(p&(D.suspendedLanes|f))!==0?0:p,p!==0&&p!==Y.retryLane))throw Y.retryLane=p,Rd(o,p),Ei(D,o,p),US;V.data==="$?"||uE(),c=GA(o,c,f)}else V.data==="$?"?(c.flags|=192,c.child=o.child,c=null):(o=Y.treeContext,an=Es(V.nextSibling),Br=c,Ot=!0,Au=null,io=!1,o!==null&&(Ki[Wi++]=ua,Ki[Wi++]=fa,Ki[Wi++]=wu,ua=o.id,fa=o.overflow,wu=c),c=$A(c,p.children),c.flags|=4096);return c}return b?(kc(),b=p.fallback,V=c.mode,Y=o.child,ce=Y.sibling,p=la(Y,{mode:"hidden",children:p.children}),p.subtreeFlags=Y.subtreeFlags&65011712,ce!==null?b=la(ce,b):(b=bu(b,V,f,null),b.flags|=2),b.return=c,p.return=c,p.sibling=b,c.child=p,p=b,b=c.child,V=o.child.memoizedState,V===null?V=HA(f):(Y=V.cachePool,Y!==null?(ce=Pn._currentValue,Y=Y.parent!==ce?{parent:ce,pool:ce}:Y):Y=PT(),V={baseLanes:V.baseLanes|f,cachePool:Y}),b.memoizedState=V,b.childLanes=qA(o,D,f),c.memoizedState=zA,p):(Rc(c),f=o.child,o=f.sibling,f=la(f,{mode:"visible",children:p.children}),f.return=c,f.sibling=null,o!==null&&(D=c.deletions,D===null?(c.deletions=[o],c.flags|=16):D.push(o)),c.child=f,c.memoizedState=null,f)}function $A(o,c){return c=K1({mode:"visible",children:c},o.mode),c.return=o,o.child=c}function K1(o,c){return o=yi(22,o,null,c),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function GA(o,c,f){return Fd(c,o.child,null,f),o=$A(c,c.pendingProps.children),o.flags|=2,c.memoizedState=null,o}function WS(o,c,f){o.lanes|=c;var p=o.alternate;p!==null&&(p.lanes|=c),uA(o.return,c,f)}function QA(o,c,f,p,b){var E=o.memoizedState;E===null?o.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:b}:(E.isBackwards=c,E.rendering=null,E.renderingStartTime=0,E.last=p,E.tail=f,E.tailMode=b)}function YS(o,c,f){var p=c.pendingProps,b=p.revealOrder,E=p.tail;if(sr(o,c,p.children,f),p=Dn.current,(p&2)!==0)p=p&1|2,c.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=c.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&WS(o,f,c);else if(o.tag===19)WS(o,f,c);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===c)break e;for(;o.sibling===null;){if(o.return===null||o.return===c)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}p&=1}switch(pe(Dn,p),b){case"forwards":for(f=c.child,b=null;f!==null;)o=f.alternate,o!==null&&q1(o)===null&&(b=f),f=f.sibling;f=b,f===null?(b=c.child,c.child=null):(b=f.sibling,f.sibling=null),QA(c,!1,b,f,E);break;case"backwards":for(f=null,b=c.child,c.child=null;b!==null;){if(o=b.alternate,o!==null&&q1(o)===null){c.child=b;break}o=b.sibling,b.sibling=f,f=b,b=o}QA(c,!0,f,null,E);break;case"together":QA(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function ga(o,c,f){if(o!==null&&(c.dependencies=o.dependencies),Dc|=c.lanes,(f&c.childLanes)===0)if(o!==null){if(J0(o,c,f,!1),(f&c.childLanes)===0)return null}else return null;if(o!==null&&c.child!==o.child)throw Error(r(153));if(c.child!==null){for(o=c.child,f=la(o,o.pendingProps),c.child=f,f.return=c;o.sibling!==null;)o=o.sibling,f=f.sibling=la(o,o.pendingProps),f.return=c;f.sibling=null}return c.child}function KA(o,c){return(o.lanes&c)!==0?!0:(o=o.dependencies,!!(o!==null&&I1(o)))}function oV(o,c,f){switch(c.tag){case 3:De(c,c.stateNode.containerInfo),Cc(c,Pn,o.memoizedState.cache),W0();break;case 27:case 5:it(c);break;case 4:De(c,c.stateNode.containerInfo);break;case 10:Cc(c,c.type,c.memoizedProps.value);break;case 13:var p=c.memoizedState;if(p!==null)return p.dehydrated!==null?(Rc(c),c.flags|=128,null):(f&c.child.childLanes)!==0?KS(o,c,f):(Rc(c),o=ga(o,c,f),o!==null?o.sibling:null);Rc(c);break;case 19:var b=(o.flags&128)!==0;if(p=(f&c.childLanes)!==0,p||(J0(o,c,f,!1),p=(f&c.childLanes)!==0),b){if(p)return YS(o,c,f);c.flags|=128}if(b=c.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),pe(Dn,Dn.current),p)break;return null;case 22:case 23:return c.lanes=0,HS(o,c,f);case 24:Cc(c,Pn,o.memoizedState.cache)}return ga(o,c,f)}function JS(o,c,f){if(o!==null)if(o.memoizedProps!==c.pendingProps)Gn=!0;else{if(!KA(o,f)&&(c.flags&128)===0)return Gn=!1,oV(o,c,f);Gn=(o.flags&131072)!==0}else Gn=!1,Ot&&(c.flags&1048576)!==0&&ST(c,S1,c.index);switch(c.lanes=0,c.tag){case 16:e:{o=c.pendingProps;var p=c.elementType,b=p._init;if(p=b(p._payload),c.type=p,typeof p=="function")rA(p)?(o=Su(p,o),c.tag=1,c=GS(null,c,p,o,f)):(c.tag=0,c=VA(null,c,p,o,f));else{if(p!=null){if(b=p.$$typeof,b===P){c.tag=11,c=FS(null,c,p,o,f);break e}else if(b===I){c.tag=14,c=VS(null,c,p,o,f);break e}}throw c=Se(p)||p,Error(r(306,c,""))}}return c;case 0:return VA(o,c,c.type,c.pendingProps,f);case 1:return p=c.type,b=Su(p,c.pendingProps),GS(o,c,p,b,f);case 3:e:{if(De(c,c.stateNode.containerInfo),o===null)throw Error(r(387));p=c.pendingProps;var E=c.memoizedState;b=E.element,yA(o,c),im(c,p,null,f);var D=c.memoizedState;if(p=D.cache,Cc(c,Pn,p),p!==E.cache&&fA(c,[Pn],f,!0),rm(),p=D.element,E.isDehydrated)if(E={element:p,isDehydrated:!1,cache:D.cache},c.updateQueue.baseState=E,c.memoizedState=E,c.flags&256){c=QS(o,c,p,f);break e}else if(p!==b){b=Gi(Error(r(424)),c),Y0(b),c=QS(o,c,p,f);break e}else{switch(o=c.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(an=Es(o.firstChild),Br=c,Ot=!0,Au=null,io=!0,f=RS(c,null,p,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(W0(),p===b){c=ga(o,c,f);break e}sr(o,c,p,f)}c=c.child}return c;case 26:return Q1(o,c),o===null?(f=t4(c.type,null,c.pendingProps,null))?c.memoizedState=f:Ot||(f=c.type,o=c.pendingProps,p=cb(_e.current).createElement(f),p[Nn]=c,p[wn]=o,ar(p,f,o),hn(p),c.stateNode=p):c.memoizedState=t4(c.type,o.memoizedProps,c.pendingProps,o.memoizedState),null;case 27:return it(c),o===null&&Ot&&(p=c.stateNode=X8(c.type,c.pendingProps,_e.current),Br=c,io=!0,b=an,Uc(c.type)?(IE=b,an=Es(p.firstChild)):an=b),sr(o,c,c.pendingProps.children,f),Q1(o,c),o===null&&(c.flags|=4194304),c.child;case 5:return o===null&&Ot&&((b=p=an)&&(p=PV(p,c.type,c.pendingProps,io),p!==null?(c.stateNode=p,Br=c,an=Es(p.firstChild),io=!1,b=!0):b=!1),b||Eu(c)),it(c),b=c.type,E=c.pendingProps,D=o!==null?o.memoizedProps:null,p=E.children,CE(b,E)?p=null:D!==null&&CE(b,D)&&(c.flags|=32),c.memoizedState!==null&&(b=xA(o,c,XF,null,null,f),Tm._currentValue=b),Q1(o,c),sr(o,c,p,f),c.child;case 6:return o===null&&Ot&&((o=f=an)&&(f=DV(f,c.pendingProps,io),f!==null?(c.stateNode=f,Br=c,an=null,o=!0):o=!1),o||Eu(c)),null;case 13:return KS(o,c,f);case 4:return De(c,c.stateNode.containerInfo),p=c.pendingProps,o===null?c.child=Fd(c,null,p,f):sr(o,c,p,f),c.child;case 11:return FS(o,c,c.type,c.pendingProps,f);case 7:return sr(o,c,c.pendingProps,f),c.child;case 8:return sr(o,c,c.pendingProps.children,f),c.child;case 12:return sr(o,c,c.pendingProps.children,f),c.child;case 10:return p=c.pendingProps,Cc(c,c.type,p.value),sr(o,c,p.children,f),c.child;case 9:return b=c.type._context,p=c.pendingProps.children,Cu(c),b=br(b),p=p(b),c.flags|=1,sr(o,c,p,f),c.child;case 14:return VS(o,c,c.type,c.pendingProps,f);case 15:return zS(o,c,c.type,c.pendingProps,f);case 19:return YS(o,c,f);case 31:return p=c.pendingProps,f=c.mode,p={mode:p.mode,children:p.children},o===null?(f=K1(p,f),f.ref=c.ref,c.child=f,f.return=c,c=f):(f=la(o.child,p),f.ref=c.ref,c.child=f,f.return=c,c=f),c;case 22:return HS(o,c,f);case 24:return Cu(c),p=br(Pn),o===null?(b=pA(),b===null&&(b=Wt,E=dA(),b.pooledCache=E,E.refCount++,E!==null&&(b.pooledCacheLanes|=f),b=E),c.memoizedState={parent:p,cache:b},gA(c),Cc(c,Pn,b)):((o.lanes&f)!==0&&(yA(o,c),im(c,null,null,f),rm()),b=o.memoizedState,E=c.memoizedState,b.parent!==p?(b={parent:p,cache:p},c.memoizedState=b,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=b),Cc(c,Pn,p)):(p=E.cache,Cc(c,Pn,p),p!==b.cache&&fA(c,[Pn],f,!0))),sr(o,c,c.pendingProps.children,f),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function ya(o){o.flags|=4}function XS(o,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!o4(c)){if(c=Yi.current,c!==null&&((Ct&4194048)===Ct?so!==null:(Ct&62914560)!==Ct&&(Ct&536870912)===0||c!==so))throw tm=mA,DT;o.flags|=8192}}function W1(o,c){c!==null&&(o.flags|=4),o.flags&16384&&(c=o.tag!==22?I0():536870912,o.lanes|=c,qd|=c)}function fm(o,c){if(!Ot)switch(o.tailMode){case"hidden":c=o.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?o.tail=null:f.sibling=null;break;case"collapsed":f=o.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?c||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function rn(o){var c=o.alternate!==null&&o.alternate.child===o.child,f=0,p=0;if(c)for(var b=o.child;b!==null;)f|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=o,b=b.sibling;else for(b=o.child;b!==null;)f|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=o,b=b.sibling;return o.subtreeFlags|=p,o.childLanes=f,c}function aV(o,c,f){var p=c.pendingProps;switch(aA(c),c.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rn(c),null;case 1:return rn(c),null;case 3:return f=c.stateNode,p=null,o!==null&&(p=o.memoizedState.cache),c.memoizedState.cache!==p&&(c.flags|=2048),ha(Pn),qe(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(o===null||o.child===null)&&(K0(c)?ya(c):o===null||o.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,kT())),rn(c),null;case 26:return f=c.memoizedState,o===null?(ya(c),f!==null?(rn(c),XS(c,f)):(rn(c),c.flags&=-16777217)):f?f!==o.memoizedState?(ya(c),rn(c),XS(c,f)):(rn(c),c.flags&=-16777217):(o.memoizedProps!==p&&ya(c),rn(c),c.flags&=-16777217),null;case 27:Vt(c),f=_e.current;var b=c.type;if(o!==null&&c.stateNode!=null)o.memoizedProps!==p&&ya(c);else{if(!p){if(c.stateNode===null)throw Error(r(166));return rn(c),null}o=me.current,K0(c)?IT(c):(o=X8(b,p,f),c.stateNode=o,ya(c))}return rn(c),null;case 5:if(Vt(c),f=c.type,o!==null&&c.stateNode!=null)o.memoizedProps!==p&&ya(c);else{if(!p){if(c.stateNode===null)throw Error(r(166));return rn(c),null}if(o=me.current,K0(c))IT(c);else{switch(b=cb(_e.current),o){case 1:o=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:o=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":o=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":o=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":o=b.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof p.is=="string"?b.createElement("select",{is:p.is}):b.createElement("select"),p.multiple?o.multiple=!0:p.size&&(o.size=p.size);break;default:o=typeof p.is=="string"?b.createElement(f,{is:p.is}):b.createElement(f)}}o[Nn]=c,o[wn]=p;e:for(b=c.child;b!==null;){if(b.tag===5||b.tag===6)o.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===c)break e;for(;b.sibling===null;){if(b.return===null||b.return===c)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}c.stateNode=o;e:switch(ar(o,f,p),f){case"button":case"input":case"select":case"textarea":o=!!p.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ya(c)}}return rn(c),c.flags&=-16777217,null;case 6:if(o&&c.stateNode!=null)o.memoizedProps!==p&&ya(c);else{if(typeof p!="string"&&c.stateNode===null)throw Error(r(166));if(o=_e.current,K0(c)){if(o=c.stateNode,f=c.memoizedProps,p=null,b=Br,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}o[Nn]=c,o=!!(o.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||$8(o.nodeValue,f)),o||Eu(c)}else o=cb(o).createTextNode(p),o[Nn]=c,c.stateNode=o}return rn(c),null;case 13:if(p=c.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(b=K0(c),p!==null&&p.dehydrated!==null){if(o===null){if(!b)throw Error(r(318));if(b=c.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[Nn]=c}else W0(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;rn(c),b=!1}else b=kT(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=b),b=!0;if(!b)return c.flags&256?(ma(c),c):(ma(c),null)}if(ma(c),(c.flags&128)!==0)return c.lanes=f,c;if(f=p!==null,o=o!==null&&o.memoizedState!==null,f){p=c.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool);var E=null;p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(E=p.memoizedState.cachePool.pool),E!==b&&(p.flags|=2048)}return f!==o&&f&&(c.child.flags|=8192),W1(c,c.updateQueue),rn(c),null;case 4:return qe(),o===null&&wE(c.stateNode.containerInfo),rn(c),null;case 10:return ha(c.type),rn(c),null;case 19:if(ye(Dn),b=c.memoizedState,b===null)return rn(c),null;if(p=(c.flags&128)!==0,E=b.rendering,E===null)if(p)fm(b,!1);else{if(cn!==0||o!==null&&(o.flags&128)!==0)for(o=c.child;o!==null;){if(E=q1(o),E!==null){for(c.flags|=128,fm(b,!1),o=E.updateQueue,c.updateQueue=o,W1(c,o),c.subtreeFlags=0,o=f,f=c.child;f!==null;)TT(f,o),f=f.sibling;return pe(Dn,Dn.current&1|2),c.child}o=o.sibling}b.tail!==null&&St()>X1&&(c.flags|=128,p=!0,fm(b,!1),c.lanes=4194304)}else{if(!p)if(o=q1(E),o!==null){if(c.flags|=128,p=!0,o=o.updateQueue,c.updateQueue=o,W1(c,o),fm(b,!0),b.tail===null&&b.tailMode==="hidden"&&!E.alternate&&!Ot)return rn(c),null}else 2*St()-b.renderingStartTime>X1&&f!==536870912&&(c.flags|=128,p=!0,fm(b,!1),c.lanes=4194304);b.isBackwards?(E.sibling=c.child,c.child=E):(o=b.last,o!==null?o.sibling=E:c.child=E,b.last=E)}return b.tail!==null?(c=b.tail,b.rendering=c,b.tail=c.sibling,b.renderingStartTime=St(),c.sibling=null,o=Dn.current,pe(Dn,p?o&1|2:o&1),c):(rn(c),null);case 22:case 23:return ma(c),AA(),p=c.memoizedState!==null,o!==null?o.memoizedState!==null!==p&&(c.flags|=8192):p&&(c.flags|=8192),p?(f&536870912)!==0&&(c.flags&128)===0&&(rn(c),c.subtreeFlags&6&&(c.flags|=8192)):rn(c),f=c.updateQueue,f!==null&&W1(c,f.retryQueue),f=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==f&&(c.flags|=2048),o!==null&&ye(_u),null;case 24:return f=null,o!==null&&(f=o.memoizedState.cache),c.memoizedState.cache!==f&&(c.flags|=2048),ha(Pn),rn(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function cV(o,c){switch(aA(c),c.tag){case 1:return o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 3:return ha(Pn),qe(),o=c.flags,(o&65536)!==0&&(o&128)===0?(c.flags=o&-65537|128,c):null;case 26:case 27:case 5:return Vt(c),null;case 13:if(ma(c),o=c.memoizedState,o!==null&&o.dehydrated!==null){if(c.alternate===null)throw Error(r(340));W0()}return o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 19:return ye(Dn),null;case 4:return qe(),null;case 10:return ha(c.type),null;case 22:case 23:return ma(c),AA(),o!==null&&ye(_u),o=c.flags,o&65536?(c.flags=o&-65537|128,c):null;case 24:return ha(Pn),null;case 25:return null;default:return null}}function ZS(o,c){switch(aA(c),c.tag){case 3:ha(Pn),qe();break;case 26:case 27:case 5:Vt(c);break;case 4:qe();break;case 13:ma(c);break;case 19:ye(Dn);break;case 10:ha(c.type);break;case 22:case 23:ma(c),AA(),o!==null&&ye(_u);break;case 24:ha(Pn)}}function dm(o,c){try{var f=c.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var b=p.next;f=b;do{if((f.tag&o)===o){p=void 0;var E=f.create,D=f.inst;p=E(),D.destroy=p}f=f.next}while(f!==b)}}catch(V){Kt(c,c.return,V)}}function Nc(o,c,f){try{var p=c.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var E=b.next;p=E;do{if((p.tag&o)===o){var D=p.inst,V=D.destroy;if(V!==void 0){D.destroy=void 0,b=c;var Y=f,ce=V;try{ce()}catch(ge){Kt(b,Y,ge)}}}p=p.next}while(p!==E)}}catch(ge){Kt(c,c.return,ge)}}function e8(o){var c=o.updateQueue;if(c!==null){var f=o.stateNode;try{VT(c,f)}catch(p){Kt(o,o.return,p)}}}function t8(o,c,f){f.props=Su(o.type,o.memoizedProps),f.state=o.memoizedState;try{f.componentWillUnmount()}catch(p){Kt(o,c,p)}}function hm(o,c){try{var f=o.ref;if(f!==null){switch(o.tag){case 26:case 27:case 5:var p=o.stateNode;break;case 30:p=o.stateNode;break;default:p=o.stateNode}typeof f=="function"?o.refCleanup=f(p):f.current=p}}catch(b){Kt(o,c,b)}}function oo(o,c){var f=o.ref,p=o.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(b){Kt(o,c,b)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(b){Kt(o,c,b)}else f.current=null}function n8(o){var c=o.type,f=o.memoizedProps,p=o.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(b){Kt(o,o.return,b)}}function WA(o,c,f){try{var p=o.stateNode;RV(p,o.type,f,c),p[wn]=c}catch(b){Kt(o,o.return,b)}}function r8(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Uc(o.type)||o.tag===4}function YA(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||r8(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Uc(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function JA(o,c,f){var p=o.tag;if(p===5||p===6)o=o.stateNode,c?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(o,c):(c=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,c.appendChild(o),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=ab));else if(p!==4&&(p===27&&Uc(o.type)&&(f=o.stateNode,c=null),o=o.child,o!==null))for(JA(o,c,f),o=o.sibling;o!==null;)JA(o,c,f),o=o.sibling}function Y1(o,c,f){var p=o.tag;if(p===5||p===6)o=o.stateNode,c?f.insertBefore(o,c):f.appendChild(o);else if(p!==4&&(p===27&&Uc(o.type)&&(f=o.stateNode),o=o.child,o!==null))for(Y1(o,c,f),o=o.sibling;o!==null;)Y1(o,c,f),o=o.sibling}function i8(o){var c=o.stateNode,f=o.memoizedProps;try{for(var p=o.type,b=c.attributes;b.length;)c.removeAttributeNode(b[0]);ar(c,p,f),c[Nn]=o,c[wn]=f}catch(E){Kt(o,o.return,E)}}var ba=!1,mn=!1,XA=!1,s8=typeof WeakSet=="function"?WeakSet:Set,Qn=null;function lV(o,c){if(o=o.containerInfo,EE=pb,o=gT(o),Y6(o)){if("selectionStart"in o)var f={start:o.selectionStart,end:o.selectionEnd};else e:{f=(f=o.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var b=p.anchorOffset,E=p.focusNode;p=p.focusOffset;try{f.nodeType,E.nodeType}catch{f=null;break e}var D=0,V=-1,Y=-1,ce=0,ge=0,we=o,le=null;t:for(;;){for(var ue;we!==f||b!==0&&we.nodeType!==3||(V=D+b),we!==E||p!==0&&we.nodeType!==3||(Y=D+p),we.nodeType===3&&(D+=we.nodeValue.length),(ue=we.firstChild)!==null;)le=we,we=ue;for(;;){if(we===o)break t;if(le===f&&++ce===b&&(V=D),le===E&&++ge===p&&(Y=D),(ue=we.nextSibling)!==null)break;we=le,le=we.parentNode}we=ue}f=V===-1||Y===-1?null:{start:V,end:Y}}else f=null}f=f||{start:0,end:0}}else f=null;for(xE={focusedElem:o,selectionRange:f},pb=!1,Qn=c;Qn!==null;)if(c=Qn,o=c.child,(c.subtreeFlags&1024)!==0&&o!==null)o.return=c,Qn=o;else for(;Qn!==null;){switch(c=Qn,E=c.alternate,o=c.flags,c.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&E!==null){o=void 0,f=c,b=E.memoizedProps,E=E.memoizedState,p=f.stateNode;try{var Ze=Su(f.type,b,f.elementType===f.type);o=p.getSnapshotBeforeUpdate(Ze,E),p.__reactInternalSnapshotBeforeUpdate=o}catch(Ke){Kt(f,f.return,Ke)}}break;case 3:if((o&1024)!==0){if(o=c.stateNode.containerInfo,f=o.nodeType,f===9)TE(o);else if(f===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":TE(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=c.sibling,o!==null){o.return=c.return,Qn=o;break}Qn=c.return}}function o8(o,c,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:Oc(o,f),p&4&&dm(5,f);break;case 1:if(Oc(o,f),p&4)if(o=f.stateNode,c===null)try{o.componentDidMount()}catch(D){Kt(f,f.return,D)}else{var b=Su(f.type,c.memoizedProps);c=c.memoizedState;try{o.componentDidUpdate(b,c,o.__reactInternalSnapshotBeforeUpdate)}catch(D){Kt(f,f.return,D)}}p&64&&e8(f),p&512&&hm(f,f.return);break;case 3:if(Oc(o,f),p&64&&(o=f.updateQueue,o!==null)){if(c=null,f.child!==null)switch(f.child.tag){case 27:case 5:c=f.child.stateNode;break;case 1:c=f.child.stateNode}try{VT(o,c)}catch(D){Kt(f,f.return,D)}}break;case 27:c===null&&p&4&&i8(f);case 26:case 5:Oc(o,f),c===null&&p&4&&n8(f),p&512&&hm(f,f.return);break;case 12:Oc(o,f);break;case 13:Oc(o,f),p&4&&l8(o,f),p&64&&(o=f.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(f=bV.bind(null,f),MV(o,f))));break;case 22:if(p=f.memoizedState!==null||ba,!p){c=c!==null&&c.memoizedState!==null||mn,b=ba;var E=mn;ba=p,(mn=c)&&!E?Bc(o,f,(f.subtreeFlags&8772)!==0):Oc(o,f),ba=b,mn=E}break;case 30:break;default:Oc(o,f)}}function a8(o){var c=o.alternate;c!==null&&(o.alternate=null,a8(c)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(c=o.stateNode,c!==null&&vc(c)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var en=null,Jr=!1;function wa(o,c,f){for(f=f.child;f!==null;)c8(o,c,f),f=f.sibling}function c8(o,c,f){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount(Ve,f)}catch{}switch(f.tag){case 26:mn||oo(f,c),wa(o,c,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:mn||oo(f,c);var p=en,b=Jr;Uc(f.type)&&(en=f.stateNode,Jr=!1),wa(o,c,f),Em(f.stateNode),en=p,Jr=b;break;case 5:mn||oo(f,c);case 6:if(p=en,b=Jr,en=null,wa(o,c,f),en=p,Jr=b,en!==null)if(Jr)try{(en.nodeType===9?en.body:en.nodeName==="HTML"?en.ownerDocument.body:en).removeChild(f.stateNode)}catch(E){Kt(f,c,E)}else try{en.removeChild(f.stateNode)}catch(E){Kt(f,c,E)}break;case 18:en!==null&&(Jr?(o=en,Y8(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,f.stateNode),km(o)):Y8(en,f.stateNode));break;case 4:p=en,b=Jr,en=f.stateNode.containerInfo,Jr=!0,wa(o,c,f),en=p,Jr=b;break;case 0:case 11:case 14:case 15:mn||Nc(2,f,c),mn||Nc(4,f,c),wa(o,c,f);break;case 1:mn||(oo(f,c),p=f.stateNode,typeof p.componentWillUnmount=="function"&&t8(f,c,p)),wa(o,c,f);break;case 21:wa(o,c,f);break;case 22:mn=(p=mn)||f.memoizedState!==null,wa(o,c,f),mn=p;break;default:wa(o,c,f)}}function l8(o,c){if(c.memoizedState===null&&(o=c.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{km(o)}catch(f){Kt(c,c.return,f)}}function uV(o){switch(o.tag){case 13:case 19:var c=o.stateNode;return c===null&&(c=o.stateNode=new s8),c;case 22:return o=o.stateNode,c=o._retryCache,c===null&&(c=o._retryCache=new s8),c;default:throw Error(r(435,o.tag))}}function ZA(o,c){var f=uV(o);c.forEach(function(p){var b=wV.bind(null,o,p);f.has(p)||(f.add(p),p.then(b,b))})}function bi(o,c){var f=c.deletions;if(f!==null)for(var p=0;p<f.length;p++){var b=f[p],E=o,D=c,V=D;e:for(;V!==null;){switch(V.tag){case 27:if(Uc(V.type)){en=V.stateNode,Jr=!1;break e}break;case 5:en=V.stateNode,Jr=!1;break e;case 3:case 4:en=V.stateNode.containerInfo,Jr=!0;break e}V=V.return}if(en===null)throw Error(r(160));c8(E,D,b),en=null,Jr=!1,E=b.alternate,E!==null&&(E.return=null),b.return=null}if(c.subtreeFlags&13878)for(c=c.child;c!==null;)u8(c,o),c=c.sibling}var As=null;function u8(o,c){var f=o.alternate,p=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:bi(c,o),wi(o),p&4&&(Nc(3,o,o.return),dm(3,o),Nc(5,o,o.return));break;case 1:bi(c,o),wi(o),p&512&&(mn||f===null||oo(f,f.return)),p&64&&ba&&(o=o.updateQueue,o!==null&&(p=o.callbacks,p!==null&&(f=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=f===null?p:f.concat(p))));break;case 26:var b=As;if(bi(c,o),wi(o),p&512&&(mn||f===null||oo(f,f.return)),p&4){var E=f!==null?f.memoizedState:null;if(p=o.memoizedState,f===null)if(p===null)if(o.stateNode===null){e:{p=o.type,f=o.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":E=b.getElementsByTagName("title")[0],(!E||E[nu]||E[Nn]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=b.createElement(p),b.head.insertBefore(E,b.querySelector("head > title"))),ar(E,p,f),E[Nn]=o,hn(E),p=E;break e;case"link":var D=i4("link","href",b).get(p+(f.href||""));if(D){for(var V=0;V<D.length;V++)if(E=D[V],E.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&E.getAttribute("rel")===(f.rel==null?null:f.rel)&&E.getAttribute("title")===(f.title==null?null:f.title)&&E.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){D.splice(V,1);break t}}E=b.createElement(p),ar(E,p,f),b.head.appendChild(E);break;case"meta":if(D=i4("meta","content",b).get(p+(f.content||""))){for(V=0;V<D.length;V++)if(E=D[V],E.getAttribute("content")===(f.content==null?null:""+f.content)&&E.getAttribute("name")===(f.name==null?null:f.name)&&E.getAttribute("property")===(f.property==null?null:f.property)&&E.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&E.getAttribute("charset")===(f.charSet==null?null:f.charSet)){D.splice(V,1);break t}}E=b.createElement(p),ar(E,p,f),b.head.appendChild(E);break;default:throw Error(r(468,p))}E[Nn]=o,hn(E),p=E}o.stateNode=p}else s4(b,o.type,o.stateNode);else o.stateNode=r4(b,p,o.memoizedProps);else E!==p?(E===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):E.count--,p===null?s4(b,o.type,o.stateNode):r4(b,p,o.memoizedProps)):p===null&&o.stateNode!==null&&WA(o,o.memoizedProps,f.memoizedProps)}break;case 27:bi(c,o),wi(o),p&512&&(mn||f===null||oo(f,f.return)),f!==null&&p&4&&WA(o,o.memoizedProps,f.memoizedProps);break;case 5:if(bi(c,o),wi(o),p&512&&(mn||f===null||oo(f,f.return)),o.flags&32){b=o.stateNode;try{zi(b,"")}catch(ue){Kt(o,o.return,ue)}}p&4&&o.stateNode!=null&&(b=o.memoizedProps,WA(o,b,f!==null?f.memoizedProps:b)),p&1024&&(XA=!0);break;case 6:if(bi(c,o),wi(o),p&4){if(o.stateNode===null)throw Error(r(162));p=o.memoizedProps,f=o.stateNode;try{f.nodeValue=p}catch(ue){Kt(o,o.return,ue)}}break;case 3:if(fb=null,b=As,As=lb(c.containerInfo),bi(c,o),As=b,wi(o),p&4&&f!==null&&f.memoizedState.isDehydrated)try{km(c.containerInfo)}catch(ue){Kt(o,o.return,ue)}XA&&(XA=!1,f8(o));break;case 4:p=As,As=lb(o.stateNode.containerInfo),bi(c,o),wi(o),As=p;break;case 12:bi(c,o),wi(o);break;case 13:bi(c,o),wi(o),o.child.flags&8192&&o.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(sE=St()),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,ZA(o,p)));break;case 22:b=o.memoizedState!==null;var Y=f!==null&&f.memoizedState!==null,ce=ba,ge=mn;if(ba=ce||b,mn=ge||Y,bi(c,o),mn=ge,ba=ce,wi(o),p&8192)e:for(c=o.stateNode,c._visibility=b?c._visibility&-2:c._visibility|1,b&&(f===null||Y||ba||mn||Iu(o)),f=null,c=o;;){if(c.tag===5||c.tag===26){if(f===null){Y=f=c;try{if(E=Y.stateNode,b)D=E.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{V=Y.stateNode;var we=Y.memoizedProps.style,le=we!=null&&we.hasOwnProperty("display")?we.display:null;V.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(ue){Kt(Y,Y.return,ue)}}}else if(c.tag===6){if(f===null){Y=c;try{Y.stateNode.nodeValue=b?"":Y.memoizedProps}catch(ue){Kt(Y,Y.return,ue)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===o)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break e;for(;c.sibling===null;){if(c.return===null||c.return===o)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}p&4&&(p=o.updateQueue,p!==null&&(f=p.retryQueue,f!==null&&(p.retryQueue=null,ZA(o,f))));break;case 19:bi(c,o),wi(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,ZA(o,p)));break;case 30:break;case 21:break;default:bi(c,o),wi(o)}}function wi(o){var c=o.flags;if(c&2){try{for(var f,p=o.return;p!==null;){if(r8(p)){f=p;break}p=p.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var b=f.stateNode,E=YA(o);Y1(o,E,b);break;case 5:var D=f.stateNode;f.flags&32&&(zi(D,""),f.flags&=-33);var V=YA(o);Y1(o,V,D);break;case 3:case 4:var Y=f.stateNode.containerInfo,ce=YA(o);JA(o,ce,Y);break;default:throw Error(r(161))}}catch(ge){Kt(o,o.return,ge)}o.flags&=-3}c&4096&&(o.flags&=-4097)}function f8(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var c=o;f8(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),o=o.sibling}}function Oc(o,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)o8(o,c.alternate,c),c=c.sibling}function Iu(o){for(o=o.child;o!==null;){var c=o;switch(c.tag){case 0:case 11:case 14:case 15:Nc(4,c,c.return),Iu(c);break;case 1:oo(c,c.return);var f=c.stateNode;typeof f.componentWillUnmount=="function"&&t8(c,c.return,f),Iu(c);break;case 27:Em(c.stateNode);case 26:case 5:oo(c,c.return),Iu(c);break;case 22:c.memoizedState===null&&Iu(c);break;case 30:Iu(c);break;default:Iu(c)}o=o.sibling}}function Bc(o,c,f){for(f=f&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var p=c.alternate,b=o,E=c,D=E.flags;switch(E.tag){case 0:case 11:case 15:Bc(b,E,f),dm(4,E);break;case 1:if(Bc(b,E,f),p=E,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(ce){Kt(p,p.return,ce)}if(p=E,b=p.updateQueue,b!==null){var V=p.stateNode;try{var Y=b.shared.hiddenCallbacks;if(Y!==null)for(b.shared.hiddenCallbacks=null,b=0;b<Y.length;b++)FT(Y[b],V)}catch(ce){Kt(p,p.return,ce)}}f&&D&64&&e8(E),hm(E,E.return);break;case 27:i8(E);case 26:case 5:Bc(b,E,f),f&&p===null&&D&4&&n8(E),hm(E,E.return);break;case 12:Bc(b,E,f);break;case 13:Bc(b,E,f),f&&D&4&&l8(b,E);break;case 22:E.memoizedState===null&&Bc(b,E,f),hm(E,E.return);break;case 30:break;default:Bc(b,E,f)}c=c.sibling}}function eE(o,c){var f=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),o=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(o=c.memoizedState.cachePool.pool),o!==f&&(o!=null&&o.refCount++,f!=null&&X0(f))}function tE(o,c){o=null,c.alternate!==null&&(o=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==o&&(c.refCount++,o!=null&&X0(o))}function ao(o,c,f,p){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)d8(o,c,f,p),c=c.sibling}function d8(o,c,f,p){var b=c.flags;switch(c.tag){case 0:case 11:case 15:ao(o,c,f,p),b&2048&&dm(9,c);break;case 1:ao(o,c,f,p);break;case 3:ao(o,c,f,p),b&2048&&(o=null,c.alternate!==null&&(o=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==o&&(c.refCount++,o!=null&&X0(o)));break;case 12:if(b&2048){ao(o,c,f,p),o=c.stateNode;try{var E=c.memoizedProps,D=E.id,V=E.onPostCommit;typeof V=="function"&&V(D,c.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Y){Kt(c,c.return,Y)}}else ao(o,c,f,p);break;case 13:ao(o,c,f,p);break;case 23:break;case 22:E=c.stateNode,D=c.alternate,c.memoizedState!==null?E._visibility&2?ao(o,c,f,p):pm(o,c):E._visibility&2?ao(o,c,f,p):(E._visibility|=2,Vd(o,c,f,p,(c.subtreeFlags&10256)!==0)),b&2048&&eE(D,c);break;case 24:ao(o,c,f,p),b&2048&&tE(c.alternate,c);break;default:ao(o,c,f,p)}}function Vd(o,c,f,p,b){for(b=b&&(c.subtreeFlags&10256)!==0,c=c.child;c!==null;){var E=o,D=c,V=f,Y=p,ce=D.flags;switch(D.tag){case 0:case 11:case 15:Vd(E,D,V,Y,b),dm(8,D);break;case 23:break;case 22:var ge=D.stateNode;D.memoizedState!==null?ge._visibility&2?Vd(E,D,V,Y,b):pm(E,D):(ge._visibility|=2,Vd(E,D,V,Y,b)),b&&ce&2048&&eE(D.alternate,D);break;case 24:Vd(E,D,V,Y,b),b&&ce&2048&&tE(D.alternate,D);break;default:Vd(E,D,V,Y,b)}c=c.sibling}}function pm(o,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var f=o,p=c,b=p.flags;switch(p.tag){case 22:pm(f,p),b&2048&&eE(p.alternate,p);break;case 24:pm(f,p),b&2048&&tE(p.alternate,p);break;default:pm(f,p)}c=c.sibling}}var mm=8192;function zd(o){if(o.subtreeFlags&mm)for(o=o.child;o!==null;)h8(o),o=o.sibling}function h8(o){switch(o.tag){case 26:zd(o),o.flags&mm&&o.memoizedState!==null&&WV(As,o.memoizedState,o.memoizedProps);break;case 5:zd(o);break;case 3:case 4:var c=As;As=lb(o.stateNode.containerInfo),zd(o),As=c;break;case 22:o.memoizedState===null&&(c=o.alternate,c!==null&&c.memoizedState!==null?(c=mm,mm=16777216,zd(o),mm=c):zd(o));break;default:zd(o)}}function p8(o){var c=o.alternate;if(c!==null&&(o=c.child,o!==null)){c.child=null;do c=o.sibling,o.sibling=null,o=c;while(o!==null)}}function gm(o){var c=o.deletions;if((o.flags&16)!==0){if(c!==null)for(var f=0;f<c.length;f++){var p=c[f];Qn=p,g8(p,o)}p8(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)m8(o),o=o.sibling}function m8(o){switch(o.tag){case 0:case 11:case 15:gm(o),o.flags&2048&&Nc(9,o,o.return);break;case 3:gm(o);break;case 12:gm(o);break;case 22:var c=o.stateNode;o.memoizedState!==null&&c._visibility&2&&(o.return===null||o.return.tag!==13)?(c._visibility&=-3,J1(o)):gm(o);break;default:gm(o)}}function J1(o){var c=o.deletions;if((o.flags&16)!==0){if(c!==null)for(var f=0;f<c.length;f++){var p=c[f];Qn=p,g8(p,o)}p8(o)}for(o=o.child;o!==null;){switch(c=o,c.tag){case 0:case 11:case 15:Nc(8,c,c.return),J1(c);break;case 22:f=c.stateNode,f._visibility&2&&(f._visibility&=-3,J1(c));break;default:J1(c)}o=o.sibling}}function g8(o,c){for(;Qn!==null;){var f=Qn;switch(f.tag){case 0:case 11:case 15:Nc(8,f,c);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:X0(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,Qn=p;else e:for(f=o;Qn!==null;){p=Qn;var b=p.sibling,E=p.return;if(a8(p),p===f){Qn=null;break e}if(b!==null){b.return=E,Qn=b;break e}Qn=E}}}var fV={getCacheForType:function(o){var c=br(Pn),f=c.data.get(o);return f===void 0&&(f=o(),c.data.set(o,f)),f}},dV=typeof WeakMap=="function"?WeakMap:Map,Ut=0,Wt=null,pt=null,Ct=0,Ft=0,vi=null,Pc=!1,Hd=!1,nE=!1,va=0,cn=0,Dc=0,Ru=0,rE=0,Ji=0,qd=0,ym=null,Xr=null,iE=!1,sE=0,X1=1/0,Z1=null,Mc=null,or=0,jc=null,$d=null,Gd=0,oE=0,aE=null,y8=null,bm=0,cE=null;function Ai(){if((Ut&2)!==0&&Ct!==0)return Ct&-Ct;if(Q.T!==null){var o=Bd;return o!==0?o:mE()}return bc()}function b8(){Ji===0&&(Ji=(Ct&536870912)===0||Ot?S0():536870912);var o=Yi.current;return o!==null&&(o.flags|=32),Ji}function Ei(o,c,f){(o===Wt&&(Ft===2||Ft===9)||o.cancelPendingCommit!==null)&&(Qd(o,0),Lc(o,Ct,Ji,!1)),Xo(o,f),((Ut&2)===0||o!==Wt)&&(o===Wt&&((Ut&2)===0&&(Ru|=f),cn===4&&Lc(o,Ct,Ji,!1)),co(o))}function w8(o,c,f){if((Ut&6)!==0)throw Error(r(327));var p=!f&&(c&124)===0&&(c&o.expiredLanes)===0||tu(o,c),b=p?mV(o,c):fE(o,c,!0),E=p;do{if(b===0){Hd&&!p&&Lc(o,c,0,!1);break}else{if(f=o.current.alternate,E&&!hV(f)){b=fE(o,c,!1),E=!1;continue}if(b===2){if(E=c,o.errorRecoveryDisabledLanes&E)var D=0;else D=o.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){c=D;e:{var V=o;b=ym;var Y=V.current.memoizedState.isDehydrated;if(Y&&(Qd(V,D).flags|=256),D=fE(V,D,!1),D!==2){if(nE&&!Y){V.errorRecoveryDisabledLanes|=E,Ru|=E,b=4;break e}E=Xr,Xr=b,E!==null&&(Xr===null?Xr=E:Xr.push.apply(Xr,E))}b=D}if(E=!1,b!==2)continue}}if(b===1){Qd(o,0),Lc(o,c,0,!0);break}e:{switch(p=o,E=b,E){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:Lc(p,c,Ji,!Pc);break e;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(b=sE+300-St(),10<b)){if(Lc(p,c,Ji,!Pc),Yo(p,0,!0)!==0)break e;p.timeoutHandle=K8(v8.bind(null,p,f,Xr,Z1,iE,c,Ji,Ru,qd,Pc,E,2,-0,0),b);break e}v8(p,f,Xr,Z1,iE,c,Ji,Ru,qd,Pc,E,0,-0,0)}}break}while(!0);co(o)}function v8(o,c,f,p,b,E,D,V,Y,ce,ge,we,le,ue){if(o.timeoutHandle=-1,we=c.subtreeFlags,(we&8192||(we&16785408)===16785408)&&(_m={stylesheets:null,count:0,unsuspend:KV},h8(c),we=YV(),we!==null)){o.cancelPendingCommit=we(S8.bind(null,o,c,E,f,p,b,D,V,Y,ge,1,le,ue)),Lc(o,E,D,!ce);return}S8(o,c,E,f,p,b,D,V,Y)}function hV(o){for(var c=o;;){var f=c.tag;if((f===0||f===11||f===15)&&c.flags&16384&&(f=c.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var b=f[p],E=b.getSnapshot;b=b.value;try{if(!gi(E(),b))return!1}catch{return!1}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Lc(o,c,f,p){c&=~rE,c&=~Ru,o.suspendedLanes|=c,o.pingedLanes&=~c,p&&(o.warmLanes|=c),p=o.expirationTimes;for(var b=c;0<b;){var E=31-rt(b),D=1<<E;p[E]=-1,b&=~D}f!==0&&Qs(o,f,c)}function eb(){return(Ut&6)===0?(wm(0),!1):!0}function lE(){if(pt!==null){if(Ft===0)var o=pt.return;else o=pt,da=xu=null,TA(o),Ud=null,lm=0,o=pt;for(;o!==null;)ZS(o.alternate,o),o=o.return;pt=null}}function Qd(o,c){var f=o.timeoutHandle;f!==-1&&(o.timeoutHandle=-1,NV(f)),f=o.cancelPendingCommit,f!==null&&(o.cancelPendingCommit=null,f()),lE(),Wt=o,pt=f=la(o.current,null),Ct=c,Ft=0,vi=null,Pc=!1,Hd=tu(o,c),nE=!1,qd=Ji=rE=Ru=Dc=cn=0,Xr=ym=null,iE=!1,(c&8)!==0&&(c|=c&32);var p=o.entangledLanes;if(p!==0)for(o=o.entanglements,p&=c;0<p;){var b=31-rt(p),E=1<<b;c|=o[b],p&=~E}return va=c,E1(),f}function A8(o,c){ct=null,Q.H=V1,c===em||c===N1?(c=LT(),Ft=3):c===DT?(c=LT(),Ft=4):Ft=c===US?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,vi=c,pt===null&&(cn=1,G1(o,Gi(c,o.current)))}function E8(){var o=Q.H;return Q.H=V1,o===null?V1:o}function x8(){var o=Q.A;return Q.A=fV,o}function uE(){cn=4,Pc||(Ct&4194048)!==Ct&&Yi.current!==null||(Hd=!0),(Dc&134217727)===0&&(Ru&134217727)===0||Wt===null||Lc(Wt,Ct,Ji,!1)}function fE(o,c,f){var p=Ut;Ut|=2;var b=E8(),E=x8();(Wt!==o||Ct!==c)&&(Z1=null,Qd(o,c)),c=!1;var D=cn;e:do try{if(Ft!==0&&pt!==null){var V=pt,Y=vi;switch(Ft){case 8:lE(),D=6;break e;case 3:case 2:case 9:case 6:Yi.current===null&&(c=!0);var ce=Ft;if(Ft=0,vi=null,Kd(o,V,Y,ce),f&&Hd){D=0;break e}break;default:ce=Ft,Ft=0,vi=null,Kd(o,V,Y,ce)}}pV(),D=cn;break}catch(ge){A8(o,ge)}while(!0);return c&&o.shellSuspendCounter++,da=xu=null,Ut=p,Q.H=b,Q.A=E,pt===null&&(Wt=null,Ct=0,E1()),D}function pV(){for(;pt!==null;)C8(pt)}function mV(o,c){var f=Ut;Ut|=2;var p=E8(),b=x8();Wt!==o||Ct!==c?(Z1=null,X1=St()+500,Qd(o,c)):Hd=tu(o,c);e:do try{if(Ft!==0&&pt!==null){c=pt;var E=vi;t:switch(Ft){case 1:Ft=0,vi=null,Kd(o,c,E,1);break;case 2:case 9:if(MT(E)){Ft=0,vi=null,_8(c);break}c=function(){Ft!==2&&Ft!==9||Wt!==o||(Ft=7),co(o)},E.then(c,c);break e;case 3:Ft=7;break e;case 4:Ft=5;break e;case 7:MT(E)?(Ft=0,vi=null,_8(c)):(Ft=0,vi=null,Kd(o,c,E,7));break;case 5:var D=null;switch(pt.tag){case 26:D=pt.memoizedState;case 5:case 27:var V=pt;if(!D||o4(D)){Ft=0,vi=null;var Y=V.sibling;if(Y!==null)pt=Y;else{var ce=V.return;ce!==null?(pt=ce,tb(ce)):pt=null}break t}}Ft=0,vi=null,Kd(o,c,E,5);break;case 6:Ft=0,vi=null,Kd(o,c,E,6);break;case 8:lE(),cn=6;break e;default:throw Error(r(462))}}gV();break}catch(ge){A8(o,ge)}while(!0);return da=xu=null,Q.H=p,Q.A=b,Ut=f,pt!==null?0:(Wt=null,Ct=0,E1(),cn)}function gV(){for(;pt!==null&&!It();)C8(pt)}function C8(o){var c=JS(o.alternate,o,va);o.memoizedProps=o.pendingProps,c===null?tb(o):pt=c}function _8(o){var c=o,f=c.alternate;switch(c.tag){case 15:case 0:c=$S(f,c,c.pendingProps,c.type,void 0,Ct);break;case 11:c=$S(f,c,c.pendingProps,c.type.render,c.ref,Ct);break;case 5:TA(c);default:ZS(f,c),c=pt=TT(c,va),c=JS(f,c,va)}o.memoizedProps=o.pendingProps,c===null?tb(o):pt=c}function Kd(o,c,f,p){da=xu=null,TA(c),Ud=null,lm=0;var b=c.return;try{if(sV(o,b,c,f,Ct)){cn=1,G1(o,Gi(f,o.current)),pt=null;return}}catch(E){if(b!==null)throw pt=b,E;cn=1,G1(o,Gi(f,o.current)),pt=null;return}c.flags&32768?(Ot||p===1?o=!0:Hd||(Ct&536870912)!==0?o=!1:(Pc=o=!0,(p===2||p===9||p===3||p===6)&&(p=Yi.current,p!==null&&p.tag===13&&(p.flags|=16384))),T8(c,o)):tb(c)}function tb(o){var c=o;do{if((c.flags&32768)!==0){T8(c,Pc);return}o=c.return;var f=aV(c.alternate,c,va);if(f!==null){pt=f;return}if(c=c.sibling,c!==null){pt=c;return}pt=c=o}while(c!==null);cn===0&&(cn=5)}function T8(o,c){do{var f=cV(o.alternate,o);if(f!==null){f.flags&=32767,pt=f;return}if(f=o.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!c&&(o=o.sibling,o!==null)){pt=o;return}pt=o=f}while(o!==null);cn=6,pt=null}function S8(o,c,f,p,b,E,D,V,Y){o.cancelPendingCommit=null;do nb();while(or!==0);if((Ut&6)!==0)throw Error(r(327));if(c!==null){if(c===o.current)throw Error(r(177));if(E=c.lanes|c.childLanes,E|=tA,R0(o,f,E,D,V,Y),o===Wt&&(pt=Wt=null,Ct=0),$d=c,jc=o,Gd=f,oE=E,aE=b,y8=p,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,vV(Vn,function(){return O8(),null})):(o.callbackNode=null,o.callbackPriority=0),p=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||p){p=Q.T,Q.T=null,b=te.p,te.p=2,D=Ut,Ut|=4;try{lV(o,c,f)}finally{Ut=D,te.p=b,Q.T=p}}or=1,I8(),R8(),k8()}}function I8(){if(or===1){or=0;var o=jc,c=$d,f=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||f){f=Q.T,Q.T=null;var p=te.p;te.p=2;var b=Ut;Ut|=4;try{u8(c,o);var E=xE,D=gT(o.containerInfo),V=E.focusedElem,Y=E.selectionRange;if(D!==V&&V&&V.ownerDocument&&mT(V.ownerDocument.documentElement,V)){if(Y!==null&&Y6(V)){var ce=Y.start,ge=Y.end;if(ge===void 0&&(ge=ce),"selectionStart"in V)V.selectionStart=ce,V.selectionEnd=Math.min(ge,V.value.length);else{var we=V.ownerDocument||document,le=we&&we.defaultView||window;if(le.getSelection){var ue=le.getSelection(),Ze=V.textContent.length,Ke=Math.min(Y.start,Ze),$t=Y.end===void 0?Ke:Math.min(Y.end,Ze);!ue.extend&&Ke>$t&&(D=$t,$t=Ke,Ke=D);var re=pT(V,Ke),Z=pT(V,$t);if(re&&Z&&(ue.rangeCount!==1||ue.anchorNode!==re.node||ue.anchorOffset!==re.offset||ue.focusNode!==Z.node||ue.focusOffset!==Z.offset)){var oe=we.createRange();oe.setStart(re.node,re.offset),ue.removeAllRanges(),Ke>$t?(ue.addRange(oe),ue.extend(Z.node,Z.offset)):(oe.setEnd(Z.node,Z.offset),ue.addRange(oe))}}}}for(we=[],ue=V;ue=ue.parentNode;)ue.nodeType===1&&we.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<we.length;V++){var be=we[V];be.element.scrollLeft=be.left,be.element.scrollTop=be.top}}pb=!!EE,xE=EE=null}finally{Ut=b,te.p=p,Q.T=f}}o.current=c,or=2}}function R8(){if(or===2){or=0;var o=jc,c=$d,f=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||f){f=Q.T,Q.T=null;var p=te.p;te.p=2;var b=Ut;Ut|=4;try{o8(o,c.alternate,c)}finally{Ut=b,te.p=p,Q.T=f}}or=3}}function k8(){if(or===4||or===3){or=0,nn();var o=jc,c=$d,f=Gd,p=y8;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?or=5:(or=0,$d=jc=null,N8(o,o.pendingLanes));var b=o.pendingLanes;if(b===0&&(Mc=null),fd(f),c=c.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot(Ve,c,void 0,(c.current.flags&128)===128)}catch{}if(p!==null){c=Q.T,b=te.p,te.p=2,Q.T=null;try{for(var E=o.onRecoverableError,D=0;D<p.length;D++){var V=p[D];E(V.value,{componentStack:V.stack})}}finally{Q.T=c,te.p=b}}(Gd&3)!==0&&nb(),co(o),b=o.pendingLanes,(f&4194090)!==0&&(b&42)!==0?o===cE?bm++:(bm=0,cE=o):bm=0,wm(0)}}function N8(o,c){(o.pooledCacheLanes&=c)===0&&(c=o.pooledCache,c!=null&&(o.pooledCache=null,X0(c)))}function nb(o){return I8(),R8(),k8(),O8()}function O8(){if(or!==5)return!1;var o=jc,c=oE;oE=0;var f=fd(Gd),p=Q.T,b=te.p;try{te.p=32>f?32:f,Q.T=null,f=aE,aE=null;var E=jc,D=Gd;if(or=0,$d=jc=null,Gd=0,(Ut&6)!==0)throw Error(r(331));var V=Ut;if(Ut|=4,m8(E.current),d8(E,E.current,D,f),Ut=V,wm(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot(Ve,E)}catch{}return!0}finally{te.p=b,Q.T=p,N8(o,c)}}function B8(o,c,f){c=Gi(f,c),c=FA(o.stateNode,c,2),o=Sc(o,c,2),o!==null&&(Xo(o,2),co(o))}function Kt(o,c,f){if(o.tag===3)B8(o,o,f);else for(;c!==null;){if(c.tag===3){B8(c,o,f);break}else if(c.tag===1){var p=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Mc===null||!Mc.has(p))){o=Gi(f,o),f=jS(2),p=Sc(c,f,2),p!==null&&(LS(f,p,c,o),Xo(p,2),co(p));break}}c=c.return}}function dE(o,c,f){var p=o.pingCache;if(p===null){p=o.pingCache=new dV;var b=new Set;p.set(c,b)}else b=p.get(c),b===void 0&&(b=new Set,p.set(c,b));b.has(f)||(nE=!0,b.add(f),o=yV.bind(null,o,c,f),c.then(o,o))}function yV(o,c,f){var p=o.pingCache;p!==null&&p.delete(c),o.pingedLanes|=o.suspendedLanes&f,o.warmLanes&=~f,Wt===o&&(Ct&f)===f&&(cn===4||cn===3&&(Ct&62914560)===Ct&&300>St()-sE?(Ut&2)===0&&Qd(o,0):rE|=f,qd===Ct&&(qd=0)),co(o)}function P8(o,c){c===0&&(c=I0()),o=Rd(o,c),o!==null&&(Xo(o,c),co(o))}function bV(o){var c=o.memoizedState,f=0;c!==null&&(f=c.retryLane),P8(o,f)}function wV(o,c){var f=0;switch(o.tag){case 13:var p=o.stateNode,b=o.memoizedState;b!==null&&(f=b.retryLane);break;case 19:p=o.stateNode;break;case 22:p=o.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(c),P8(o,f)}function vV(o,c){return et(o,c)}var rb=null,Wd=null,hE=!1,ib=!1,pE=!1,ku=0;function co(o){o!==Wd&&o.next===null&&(Wd===null?rb=Wd=o:Wd=Wd.next=o),ib=!0,hE||(hE=!0,EV())}function wm(o,c){if(!pE&&ib){pE=!0;do for(var f=!1,p=rb;p!==null;){if(o!==0){var b=p.pendingLanes;if(b===0)var E=0;else{var D=p.suspendedLanes,V=p.pingedLanes;E=(1<<31-rt(42|o)+1)-1,E&=b&~(D&~V),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(f=!0,L8(p,E))}else E=Ct,E=Yo(p,p===Wt?E:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(E&3)===0||tu(p,E)||(f=!0,L8(p,E));p=p.next}while(f);pE=!1}}function AV(){D8()}function D8(){ib=hE=!1;var o=0;ku!==0&&(kV()&&(o=ku),ku=0);for(var c=St(),f=null,p=rb;p!==null;){var b=p.next,E=M8(p,c);E===0?(p.next=null,f===null?rb=b:f.next=b,b===null&&(Wd=f)):(f=p,(o!==0||(E&3)!==0)&&(ib=!0)),p=b}wm(o)}function M8(o,c){for(var f=o.suspendedLanes,p=o.pingedLanes,b=o.expirationTimes,E=o.pendingLanes&-62914561;0<E;){var D=31-rt(E),V=1<<D,Y=b[D];Y===-1?((V&f)===0||(V&p)!==0)&&(b[D]=T0(V,c)):Y<=c&&(o.expiredLanes|=V),E&=~V}if(c=Wt,f=Ct,f=Yo(o,o===c?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p=o.callbackNode,f===0||o===c&&(Ft===2||Ft===9)||o.cancelPendingCommit!==null)return p!==null&&p!==null&&Pt(p),o.callbackNode=null,o.callbackPriority=0;if((f&3)===0||tu(o,f)){if(c=f&-f,c===o.callbackPriority)return c;switch(p!==null&&Pt(p),fd(f)){case 2:case 8:f=ys;break;case 32:f=Vn;break;case 268435456:f=zn;break;default:f=Vn}return p=j8.bind(null,o),f=et(f,p),o.callbackPriority=c,o.callbackNode=f,c}return p!==null&&p!==null&&Pt(p),o.callbackPriority=2,o.callbackNode=null,2}function j8(o,c){if(or!==0&&or!==5)return o.callbackNode=null,o.callbackPriority=0,null;var f=o.callbackNode;if(nb()&&o.callbackNode!==f)return null;var p=Ct;return p=Yo(o,o===Wt?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p===0?null:(w8(o,p,c),M8(o,St()),o.callbackNode!=null&&o.callbackNode===f?j8.bind(null,o):null)}function L8(o,c){if(nb())return null;w8(o,c,!0)}function EV(){OV(function(){(Ut&6)!==0?et(Ui,AV):D8()})}function mE(){return ku===0&&(ku=S0()),ku}function U8(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:yd(""+o)}function F8(o,c){var f=c.ownerDocument.createElement("input");return f.name=c.name,f.value=c.value,o.id&&f.setAttribute("form",o.id),c.parentNode.insertBefore(f,c),o=new FormData(o),f.parentNode.removeChild(f),o}function xV(o,c,f,p,b){if(c==="submit"&&f&&f.stateNode===b){var E=U8((b[wn]||null).action),D=p.submitter;D&&(c=(c=D[wn]||null)?U8(c.formAction):D.getAttribute("formAction"),c!==null&&(E=c,D=null));var V=new bd("action","action",null,p,b);o.push({event:V,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ku!==0){var Y=D?F8(b,D):new FormData(b);DA(f,{pending:!0,data:Y,method:b.method,action:E},null,Y)}}else typeof E=="function"&&(V.preventDefault(),Y=D?F8(b,D):new FormData(b),DA(f,{pending:!0,data:Y,method:b.method,action:E},E,Y))},currentTarget:b}]})}}for(var gE=0;gE<eA.length;gE++){var yE=eA[gE],CV=yE.toLowerCase(),_V=yE[0].toUpperCase()+yE.slice(1);vs(CV,"on"+_V)}vs(wT,"onAnimationEnd"),vs(vT,"onAnimationIteration"),vs(AT,"onAnimationStart"),vs("dblclick","onDoubleClick"),vs("focusin","onFocus"),vs("focusout","onBlur"),vs(zF,"onTransitionRun"),vs(HF,"onTransitionStart"),vs(qF,"onTransitionCancel"),vs(ET,"onTransitionEnd"),ea("onMouseEnter",["mouseout","mouseover"]),ea("onMouseLeave",["mouseout","mouseover"]),ea("onPointerEnter",["pointerout","pointerover"]),ea("onPointerLeave",["pointerout","pointerover"]),bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bs("onSelect","focusout contextmenu dragend focu
49sin keydown keyup mousedown mouseup selectionchange".split(" ")),bs("onBeforeInput",["compositionend","keypress","textInput","paste"]),bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vm="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(" "),TV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vm));function V8(o,c){c=(c&4)!==0;for(var f=0;f<o.length;f++){var p=o[f],b=p.event;p=p.listeners;e:{var E=void 0;if(c)for(var D=p.length-1;0<=D;D--){var V=p[D],Y=V.instance,ce=V.currentTarget;if(V=V.listener,Y!==E&&b.isPropagationStopped())break e;E=V,b.currentTarget=ce;try{E(b)}catch(ge){$1(ge)}b.currentTarget=null,E=Y}else for(D=0;D<p.length;D++){if(V=p[D],Y=V.instance,ce=V.currentTarget,V=V.listener,Y!==E&&b.isPropagationStopped())break e;E=V,b.currentTarget=ce;try{E(b)}catch(ge){$1(ge)}b.currentTarget=null,E=Y}}}}function mt(o,c){var f=c[N0];f===void 0&&(f=c[N0]=new Set);var p=o+"__bubble";f.has(p)||(z8(c,o,2,!1),f.add(p))}function bE(o,c,f){var p=0;c&&(p|=4),z8(f,o,p,c)}var sb="_reactListening"+Math.random().toString(36).slice(2);function wE(o){if(!o[sb]){o[sb]=!0,O0.forEach(function(f){f!=="selectionchange"&&(TV.has(f)||bE(f,!1,o),bE(f,!0,o))});var c=o.nodeType===9?o:o.ownerDocument;c===null||c[sb]||(c[sb]=!0,bE("selectionchange",!1,c))}}function z8(o,c,f,p){switch(d4(c)){case 2:var b=ZV;break;case 8:b=ez;break;default:b=BE}f=b.bind(null,c,f,o),b=void 0,!qi||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(b=!0),p?b!==void 0?o.addEventListener(c,f,{capture:!0,passive:b}):o.addEventListener(c,f,!0):b!==void 0?o.addEventListener(c,f,{passive:b}):o.addEventListener(c,f,!1)}function vE(o,c,f,p,b){var E=p;if((c&1)===0&&(c&2)===0&&p!==null)e:for(;;){if(p===null)return;var D=p.tag;if(D===3||D===4){var V=p.stateNode.containerInfo;if(V===b)break;if(D===4)for(D=p.return;D!==null;){var Y=D.tag;if((Y===3||Y===4)&&D.stateNode.containerInfo===b)return;D=D.return}for(;V!==null;){if(D=Zo(V),D===null)return;if(Y=D.tag,Y===5||Y===6||Y===26||Y===27){p=E=D;continue e}V=V.parentNode}}p=p.return}a1(function(){var ce=E,ge=Hi(f),we=[];e:{var le=xT.get(o);if(le!==void 0){var ue=bd,Ze=o;switch(o){case"keypress":if(Zs(f)===0)break e;case"keydown":case"keyup":ue=Cd;break;case"focusin":Ze="focus",ue=Ad;break;case"focusout":Ze="blur",ue=Ad;break;case"beforeblur":case"afterblur":ue=Ad;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=$i;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=G6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=m1;break;case wT:case vT:case AT:ue=Ed;break;case ET:ue=y1;break;case"scroll":case"scrollend":ue=c1;break;case"wheel":ue=_d;break;case"copy":case"cut":case"paste":ue=xd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=q0;break;case"toggle":case"beforetoggle":ue=w1}var Ke=(c&4)!==0,$t=!Ke&&(o==="scroll"||o==="scrollend"),re=Ke?le!==null?le+"Capture":null:le;Ke=[];for(var Z=ce,oe;Z!==null;){var be=Z;if(oe=be.stateNode,be=be.tag,be!==5&&be!==26&&be!==27||oe===null||re===null||(be=lu(Z,re),be!=null&&Ke.push(Am(Z,be,oe))),$t)break;Z=Z.return}0<Ke.length&&(le=new ue(le,Ze,null,f,ge),we.push({event:le,listeners:Ke}))}}if((c&7)===0){e:{if(le=o==="mouseover"||o==="pointerover",ue=o==="mouseout"||o==="pointerout",le&&f!==ra&&(Ze=f.relatedTarget||f.fromElement)&&(Zo(Ze)||Ze[Vi]))break e;if((ue||le)&&(le=ge.window===ge?ge:(le=ge.ownerDocument)?le.defaultView||le.parentWindow:window,ue?(Ze=f.relatedTarget||f.toElement,ue=ce,Ze=Ze?Zo(Ze):null,Ze!==null&&($t=s(Ze),Ke=Ze.tag,Ze!==$t||Ke!==5&&Ke!==27&&Ke!==6)&&(Ze=null)):(ue=null,Ze=ce),ue!==Ze)){if(Ke=$i,be="onMouseLeave",re="onMouseEnter",Z="mouse",(o==="pointerout"||o==="pointerover")&&(Ke=q0,be="onPointerLeave",re="onPointerEnter",Z="pointer"),$t=ue==null?le:Ws(ue),oe=Ze==null?le:Ws(Ze),le=new Ke(be,Z+"leave",ue,f,ge),le.target=$t,le.relatedTarget=
vendor: 5,674 bytes, lines 49-50
49oe,be=null,Zo(ge)===ce&&(Ke=new Ke(re,Z+"enter",Ze,f,ge),Ke.target=oe,Ke.relatedTarget=$t,be=Ke),$t=be,ue&&Ze)t:{for(Ke=ue,re=Ze,Z=0,oe=Ke;oe;oe=Yd(oe))Z++;for(oe=0,be=re;be;be=Yd(be))oe++;for(;0<Z-oe;)Ke=Yd(Ke),Z--;for(;0<oe-Z;)re=Yd(re),oe--;for(;Z--;){if(Ke===re||re!==null&&Ke===re.alternate)break t;Ke=Yd(Ke),re=Yd(re)}Ke=null}else Ke=null;ue!==null&&H8(we,le,ue,Ke,!1),Ze!==null&&$t!==null&&H8(we,$t,Ze,Ke,!0)}}e:{if(le=ce?Ws(ce):window,ue=le.nodeName&&le.nodeName.toLowerCase(),ue==="select"||ue==="input"&&le.type==="file")var Me=cT;else if(Bn(le))if(lT)Me=UF;else{Me=jF;var dt=MF}else ue=le.nodeName,!ue||ue.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ce&&j0(ce.elementType)&&(Me=cT):Me=LF;if(Me&&(Me=Me(o,ce))){ca(we,Me,f,ge);break e}dt&&dt(o,le,ce),o==="focusout"&&ce&&le.type==="number"&&ce.memoizedProps.value!=null&&Ec(le,"number",le.value)}switch(dt=ce?Ws(ce):window,o){case"focusin":(Bn(dt)||dt.contentEditable==="true")&&(Td=dt,J6=ce,Q0=null);break;case"focusout":Q0=J6=Td=null;break;case"mousedown":X6=!0;break;case"contextmenu":case"mouseup":case"dragend":X6=!1,yT(we,f,ge);break;case"selectionchange":if(VF)break;case"keydown":case"keyup":yT(we,f,ge)}var ze;if(no)e:{switch(o){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Et?de(o,f)&&(Ye="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(Ye="onCompositionStart");Ye&&(N&&f.locale!=="ko"&&(Et||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Et&&(ze=U0()):(Xs=ge,xc="value"in Xs?Xs.value:Xs.textContent,Et=!0)),dt=ob(ce,Ye),0<dt.length&&(Ye=new z0(Ye,o,null,f,ge),we.push({event:Ye,listeners:dt}),ze?Ye.data=ze:(ze=Ie(f),ze!==null&&(Ye.data=ze)))),(ze=_?On(o,f):xt(o,f))&&(Ye=ob(ce,"onBeforeInput"),0<Ye.length&&(dt=new z0("onBeforeInput","beforeinput",null,f,ge),we.push({event:dt,listeners:Ye}),dt.data=ze)),xV(we,o,ce,f,ge)}V8(we,c)})}function Am(o,c,f){return{instance:o,listener:c,currentTarget:f}}function ob(o,c){for(var f=c+"Capture",p=[];o!==null;){var b=o,E=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||E===null||(b=lu(o,f),b!=null&&p.unshift(Am(o,b,E)),b=lu(o,c),b!=null&&p.push(Am(o,b,E))),o.tag===3)return p;o=o.return}return[]}function Yd(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function H8(o,c,f,p,b){for(var E=c._reactName,D=[];f!==null&&f!==p;){var V=f,Y=V.alternate,ce=V.stateNode;if(V=V.tag,Y!==null&&Y===p)break;V!==5&&V!==26&&V!==27||ce===null||(Y=ce,b?(ce=lu(f,E),ce!=null&&D.unshift(Am(f,ce,Y))):b||(ce=lu(f,E),ce!=null&&D.push(Am(f,ce,Y)))),f=f.return}D.length!==0&&o.push({event:c,listeners:D})}var SV=/\r\n?/g,IV=/\u0000|\uFFFD/g;function q8(o){return(typeof o=="string"?o:""+o).replace(SV,` 50`).replace(IV,"")}function $8(o,c){return c=q8(c),q8(o)===c}function ab(){}function qt(o,c,f,p,b,E){switch(f){case"children":typeof p=="string"?c==="body"||c==="textarea"&&p===""||zi(o,p):(typeof p=="number"||typeof p=="bigint")&&c!=="body"&&zi(o,""+p);break;case"className":Ys(o,"class",p);break;case"tabIndex":Ys(o,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ys(o,f,p);break;case"style":M0(o,p,E);break;case"data":if(c!=="object"){Ys(o,"data",p);break}case"src":case"href":if(p===""&&(c!=="a"||f!=="href")){o.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(f);break}p=yd(""+p),o.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){o.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof E=="function"&&(f==="formAction"?(c!=="input"&&qt(o,c,"name",b.name,b,null),qt(o,c,"formEncType",b.formEncType,b,null),qt(o,c,"formMethod",b.formMethod,b,null),qt(o,c,"formTarget",b.formTarget,b,null)):(qt(o,c,"encType",b.encType,b,null),qt(o,c,"method",b.method,b,null),qt(o,c,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(f);break}p=yd(""+p),o.setAttribute(f,p);break;case"onClick":p!=null&&(o.onclick=ab);break;case"onScroll":p!=null&&mt("scroll",o);break;case"onScrollEnd":p!=null&&mt("scrollend",o);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(b.children!=null)throw Error(r(60));o.innerHTML=f}}break;case"multiple":o.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":o.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){o.removeAttribute("xlink:href");break}f=yd(""+p),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(f,""+p):o.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
50ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(f,""):o.removeAttribute(f);break;case"capture":case"download":p===!0?o.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(f,p):o.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?o.setAttribute(f,p):o.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?o.removeAttribute(f):o.setAttribute(f,p);break;case"popover":mt("beforetoggle",o),mt("toggle",o),Ac(o,"popover",p);break;case"xlinkActuate":rr(o,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":rr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":rr(o,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":rr(o,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":rr(o,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":rr(o,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":rr(o,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":rr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":rr(o,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Ac(o,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=q6.get(f)||f,Ac(o,f,p))}}function AE(o,c,f,p,b,E){switch(f){case"style":M0(o,p,E);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(b.children!=null)throw Error(r(60));o.innerHTML=f}}break;case"children":typeof p=="string"?zi(o,p):(typeof p=="number"||typeof p=="bigint")&&zi(o,""+p);break;case"onScroll":p!=null&&mt("scroll",o);break;case"onScrollEnd":p!=null&&mt("scrollend",o);break;case"onClick":p!=null&&(o.onclick=ab);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dd.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(b=f.endsWith("Capture"),c=f.slice(2,b?f.length-7:void 0),E=o[wn]||null,E=E!=null?E[f]:null,typeof E=="function"&&o.removeEventListener(c,E,b),typeof p=="function")){typeof E!="function"&&E!==null&&(f in o?o[f]=null:o.hasAttribute(f)&&o.removeAttribute(f)),o.addEventListener(c,p,b);break e}f in o?o[f]=p:p===!0?o.setAttribute(f,""):Ac(o,f,p)}}}function ar(o,c,f){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",o),mt("load",o);var p=!1,b=!1,E;for(E in f)if(f.hasOwnProperty(E)){var D=f[E];if(D!=null)switch(E){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:qt(o,c,E,D,f,null)}}b&&qt(o,c,"srcSet",f.srcSet,f,null),p&&qt(o,c,"src",f.src,f,null);return;case"input":mt("invalid",o);var V=E=D=b=null,Y=null,ce=null;for(p in f)if(f.hasOwnProperty(p)){var ge=f[p];if(ge!=null)switch(p){case"name":b=ge;break;case"type":D=ge;break;case"checked":Y=ge;break;case"defaultChecked":ce=ge;break;case"value":E=ge;break;case"defaultValue":V=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,c));break;default:qt(o,c,p,ge,f,null)}}ou(o,E,V,Y,ce,D,b,!1),gd(o);return;case"select":mt("invalid",o),p=D=E=null;for(b in f)if(f.hasOwnProperty(b)&&(V=f[b],V!=null))switch(b){case"value":E=V;break;case"defaultValue":D=V;break;case"multiple":p=V;default:qt(o,c,b,V,f,null)}c=E,f=D,o.multiple=!!p,c!=null?na(o,!!p,c,!1):f!=null&&na(o,!!p,f,!0);return;case"textarea":mt("invalid",o),E=b=p=null;for(D in f)if(f.hasOwnProperty(D)&&(V=f[D],V!=null))switch(D){case"value":p=V;break;case"defaultValue":b=V;break;case"children":E=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:qt(o,c,D,V,f,null)}au(o,p,b,E),gd(o);return;case"option":for(Y in f)if(f.hasOwnProperty(Y)&&(p=f[Y],p!=null))switch(Y){case"selected":o.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:qt(o,c,Y,p,f,null)}return;case"dialog":mt("beforetoggle",o),mt("toggle",o),mt("cancel",o),mt("close",o);break;case"iframe":case"object":mt("load",o);break;case"video":case"audio":for(p=0;p<vm.length;p++)mt(vm[p],o);break;case"image":mt("error",o),mt("load",o);break;case"details":mt("toggle",o);break;case"embed":case"source":case"link":mt("error",o),mt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in f)if(f.hasOwnProperty(ce)&&(p=f[ce],p!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:qt(o,c,ce,p,f,null)}return;default:if(j0(c)){for(ge in f)f.hasOwnProperty(ge)&&(p=f[ge],p!==void 0&&AE(o,c,ge,p,f,void 0));return}}for(V in f)f.hasOwnProperty(V)&&(p=f[V],p!=null&&qt(o,c,V,p,f,null))}function RV(o,c,f,p){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,E=null,D=null,V=null,Y=null,ce=null,ge=null;for(ue in f){var we=f[ue];if(f.hasOwnProperty(ue)&&we!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":Y=we;default:p.hasOwnProperty(ue)||qt(o,c,ue,null,p,we)}}for(var le in p){var ue=p[le];if(we=f[le],p.hasOwnProperty(le)&&(ue!=null||we!=null))switch(le){case"type":E=ue;break;case"name":b=ue;break;case"checked":ce=ue;break;case"defaultChecked":ge=ue;break;case"value":D=ue;break;case"defaultValue":V=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,c));break;default:ue!==we&&qt(o,c,le,ue,p,we)}}mi(o,D,V,Y,ce,ge,E,b);return;case"select":ue=D=V=le=null;for(E in f)if(Y=f[E],f.hasOwnProperty(E)&&Y!=null)switch(E){case"value":break;case"multiple":ue=Y;default:p.hasOwnProperty(E)||qt(o,c,E,null,p,Y)}for(b in p)if(E=p[b],Y=f[b],p.hasOwnProperty(b)&&(E!=null||Y!=null))switch(b){case"value":le=E;break;case"defaultValue":V=E;break;case"multiple":D=E;default:E!==Y&&qt(o,c,b,E,p,Y)}c=V,f=D,p=ue,le!=null?na(o,!!f,le,!1):!!p!=!!f&&(c!=null?na(o,!!f,c,!0):na(o,!!f,f?[]:"",!1));return;case"textarea":ue=le=null;for(V in f)if(b=f[V],f.hasOwnProperty(V)&&b!=null&&!p.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:qt(o,c,V,null,p,b)}for(D in p)if(b=p[D],E=f[D],p.hasOwnProperty(D)&&(b!=null||E!=null))switch(D){case"value":le=b;break;case"defaultValue":ue=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==E&&qt(o,c,D,b,p,E)}zt(o,le,ue);return;case"option":for(var Ze in f)if(le=f[Ze],f.hasOwnProperty(Ze)&&le!=null&&!p.hasOwnProperty(Ze))switch(Ze){case"selected":o.selected=!1;break;default:qt(o,c,Ze,null,p,le)}for(Y in p)if(le=p[Y],ue=f[Y],p.hasOwnProperty(Y)&&le!==ue&&(le!=null||ue!=null))switch(Y){case"selected":o.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:qt(o,c,Y,le,p,ue)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ke in f)le=f[Ke],f.hasOwnProperty(Ke)&&le!=null&&!p.hasOwnProperty(Ke)&&qt(o,c,Ke,null,p,le);for(ce in p)if(le=p[ce],ue=f[ce],p.hasOwnProperty(ce)&&le!==ue&&(le!=null||ue!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,c));break;default:qt(o,c,ce,le,p,ue)}return;default:if(j0(c)){for(var $t in f)le=f[$t],f.hasOwnProperty($t)&&le!==void 0&&!p.hasOwnProperty($t)&&AE(o,c,$t,void 0,p,le);for(ge in p)le=p[ge],ue=f[ge],!p.hasOwnProperty(ge)||le===ue||le===void 0&&ue===void 0||AE(o,c,ge,le,p,ue);return}}for(var re in f)le=f[re],f.hasOwnProperty(re)&&le!=null&&!p.hasOwnProperty(re)&&qt(o,c,re,null,p,le);for(we in p)le=p[we],ue=f[we],!p.hasOwnProperty(we)||le===ue||le==null&&ue==null||qt(o,c,we,le,p,ue)}var EE=null,xE=null;function cb(o){return o.nodeType===9?o:o.ownerDocument}function G8(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Q8(o,c){if(o===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&c==="foreignObject"?0:o}function CE(o,c){return o==="textarea"||o==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var _E=null;function kV(){var o=window.event;return o&&o.type==="popstate"?o===_E?!1:(_E=o,!0):(_E=null,!1)}var K8=typeof setTimeout=="function"?setTimeout:void 0,NV=typeof clearTimeout=="function"?clearTimeout:void 0,W8=typeof Promise=="function"?Promise:void 0,OV=typeof queueMicrotask=="function"?queueMicrotask:typeof W8<"u"?function(o){return W8.resolve(null).then(o).catch(BV)}:K8;function BV(o){setTimeout(function(){throw o})}function Uc(o){return o==="head"}function Y8(o,c){var f=c,p=0,b=0;do{var E=f.nextSibling;if(o.removeChild(f),E&&E.nodeType===8)if(f=E.data,f==="/$"){if(0<p&&8>p){f=p;var D=o.ownerDocument;if(f&1&&Em(D.documentElement),f&2&&Em(D.body),f&4)for(f=D.head,Em(f),D=f.firstChild;D;){var V=D.nextSibling,Y=D.nodeName;D[nu]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&D.rel.toLowerCase()==="stylesheet"||f.removeChild(D),D=V}}if(b===0){o.removeChild(E),km(c);return}b--}else f==="$"||f==="$?"||f==="$!"?b++:p=f.charCodeAt(0)-48;else p=0;f=E}while(f);km(c)}function TE(o){var c=o.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var f=c;switch(c=c.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":TE(f),vc(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}o.removeChild(f)}}function PV(o,c,f,p){for(;o.nodeType===1;){var b=f;if(o.nodeName.toLowerCase()!==c.toLowerCase()){if(!p&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(p){if(!o[nu])switch(c){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(E=o.getAttribute("rel"),E==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(E!==b.rel||o.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||o.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||o.getAttribute("title")!==(b.title==null?null:b.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(E=o.getAttribute("src"),(E!==(b.src==null?null:b.src)||o.getAttribute("type")!==(b.type==null?null:b.type)||o.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&E&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(c==="input"&&o.type==="hidden"){var E=b.name==null?null:""+b.name;if(b.type==="hidden"&&o.getAttribute("name")===E)return o}else return o;if(o=Es(o.nextSibling),o===null)break}return null}function DV(o,c,f){if(c==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!f||(o=Es(o.nextSibling),o===null))return null;return o}function SE(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function MV(o,c){var f=o.ownerDocument;if(o.data!=="$?"||f.readyState==="complete")c();else{var p=function(){c(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),o._reactRetry=p}}function Es(o){for(;o!=null;o=o.nextSibling){var c=o.nodeType;if(c===1||c===3)break;if(c===8){if(c=o.data,c==="$"||c==="$!"||c==="$?"||c==="F!"||c==="F")break;
vendor: 23,356 bytes, lines 50-90
50if(c==="/$")return null}}return o}var IE=null;function J8(o){o=o.previousSibling;for(var c=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"){if(c===0)return o;c--}else f==="/$"&&c++}o=o.previousSibling}return null}function X8(o,c,f){switch(c=cb(f),o){case"html":if(o=c.documentElement,!o)throw Error(r(452));return o;case"head":if(o=c.head,!o)throw Error(r(453));return o;case"body":if(o=c.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Em(o){for(var c=o.attributes;c.length;)o.removeAttributeNode(c[0]);vc(o)}var Xi=new Map,Z8=new Set;function lb(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Aa=te.d;te.d={f:jV,r:LV,D:UV,C:FV,L:VV,m:zV,X:qV,S:HV,M:$V};function jV(){var o=Aa.f(),c=eb();return o||c}function LV(o){var c=Ks(o);c!==null&&c.tag===5&&c.type==="form"?wS(c):Aa.r(o)}var Jd=typeof document>"u"?null:document;function e4(o,c,f){var p=Jd;if(p&&typeof c=="string"&&c){var b=vn(c);b='link[rel="'+o+'"][href="'+b+'"]',typeof f=="string"&&(b+='[crossorigin="'+f+'"]'),Z8.has(b)||(Z8.add(b),o={rel:o,crossOrigin:f,href:c},p.querySelector(b)===null&&(c=p.createElement("link"),ar(c,"link",o),hn(c),p.head.appendChild(c)))}}function UV(o){Aa.D(o),e4("dns-prefetch",o,null)}function FV(o,c){Aa.C(o,c),e4("preconnect",o,c)}function VV(o,c,f){Aa.L(o,c,f);var p=Jd;if(p&&o&&c){var b='link[rel="preload"][as="'+vn(c)+'"]';c==="image"&&f&&f.imageSrcSet?(b+='[imagesrcset="'+vn(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(b+='[imagesizes="'+vn(f.imageSizes)+'"]')):b+='[href="'+vn(o)+'"]';var E=b;switch(c){case"style":E=Xd(o);break;case"script":E=Zd(o)}Xi.has(E)||(o=h({rel:"preload",href:c==="image"&&f&&f.imageSrcSet?void 0:o,as:c},f),Xi.set(E,o),p.querySelector(b)!==null||c==="style"&&p.querySelector(xm(E))||c==="script"&&p.querySelector(Cm(E))||(c=p.createElement("link"),ar(c,"link",o),hn(c),p.head.appendChild(c)))}}function zV(o,c){Aa.m(o,c);var f=Jd;if(f&&o){var p=c&&typeof c.as=="string"?c.as:"script",b='link[rel="modulepreload"][as="'+vn(p)+'"][href="'+vn(o)+'"]',E=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Zd(o)}if(!Xi.has(E)&&(o=h({rel:"modulepreload",href:o},c),Xi.set(E,o),f.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Cm(E)))return}p=f.createElement("link"),ar(p,"link",o),hn(p),f.head.appendChild(p)}}}function HV(o,c,f){Aa.S(o,c,f);var p=Jd;if(p&&o){var b=kr(p).hoistableStyles,E=Xd(o);c=c||"default";var D=b.get(E);if(!D){var V={loading:0,preload:null};if(D=p.querySelector(xm(E)))V.loading=5;else{o=h({rel:"stylesheet",href:o,"data-precedence":c},f),(f=Xi.get(E))&&RE(o,f);var Y=D=p.createElement("link");hn(Y),ar(Y,"link",o),Y._p=new Promise(function(ce,ge){Y.onload=ce,Y.onerror=ge}),Y.addEventListener("load",function(){V.loading|=1}),Y.addEventListener("error",function(){V.loading|=2}),V.loading|=4,ub(D,c,p)}D={type:"stylesheet",instance:D,count:1,state:V},b.set(E,D)}}}function qV(o,c){Aa.X(o,c);var f=Jd;if(f&&o){var p=kr(f).hoistableScripts,b=Zd(o),E=p.get(b);E||(E=f.querySelector(Cm(b)),E||(o=h({src:o,async:!0},c),(c=Xi.get(b))&&kE(o,c),E=f.createElement("script"),hn(E),ar(E,"link",o),f.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},p.set(b,E))}}function $V(o,c){Aa.M(o,c);var f=Jd;if(f&&o){var p=kr(f).hoistableScripts,b=Zd(o),E=p.get(b);E||(E=f.querySelector(Cm(b)),E||(o=h({src:o,async:!0,type:"module"},c),(c=Xi.get(b))&&kE(o,c),E=f.createElement("script"),hn(E),ar(E,"link",o),f.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},p.set(b,E))}}function t4(o,c,f,p){var b=(b=_e.current)?lb(b):null;if(!b)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(c=Xd(f.href),f=kr(b).hoistableStyles,p=f.get(c),p||(p={type:"style",instance:null,count:0,state:null},f.set(c,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){o=Xd(f.href);var E=kr(b).hoistableStyles,D=E.get(o);if(D||(b=b.ownerDocument||b,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(o,D),(E=b.querySelector(xm(o)))&&!E._p&&(D.instance=E,D.state.loading=5),Xi.has(o)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Xi.set(o,f),E||GV(b,o,f,D.state))),c&&p===null)throw Error(r(528,""));return D}if(c&&p!==null)throw Error(r(529,""));return null;case"script":return c=f.async,f=f.src,typeof f=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=Zd(f),f=kr(b).hoistableScripts,p=f.get(c),p||(p={type:"script",instance:null,count:0,state:null},f.set(c,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Xd(o){return'href="'+vn(o)+'"'}function xm(o){return'link[rel="stylesheet"]['+o+"]"}function n4(o){return h({},o,{"data-precedence":o.precedence,precedence:null})}function GV(o,c,f,p){o.querySelector('link[rel="preload"][as="style"]['+c+"]")?p.loading=1:(c=o.createElement("link"),p.preload=c,c.addEventListener("load",function(){return p.loading|=1}),c.addEventListener("error",function(){return p.loading|=2}),ar(c,"link",f),hn(c),o.head.appendChild(c))}function Zd(o){return'[src="'+vn(o)+'"]'}function Cm(o){return"script[async]"+o}function r4(o,c,f){if(c.count++,c.instance===null)switch(c.type){case"style":var p=o.querySelector('style[data-href~="'+vn(f.href)+'"]');if(p)return c.instance=p,hn(p),p;var b=h({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(o.ownerDocument||o).createElement("style"),hn(p),ar(p,"style",b),ub(p,f.precedence,o),c.instance=p;case"stylesheet":b=Xd(f.href);var E=o.querySelector(xm(b));if(E)return c.state.loading|=4,c.instance=E,hn(E),E;p=n4(f),(b=Xi.get(b))&&RE(p,b),E=(o.ownerDocument||o).createElement("link"),hn(E);var D=E;return D._p=new Promise(function(V,Y){D.onload=V,D.onerror=Y}),ar(E,"link",p),c.state.loading|=4,ub(E,f.precedence,o),c.instance=E;case"script":return E=Zd(f.src),(b=o.querySelector(Cm(E)))?(c.instance=b,hn(b),b):(p=f,(b=Xi.get(E))&&(p=h({},f),kE(p,b)),o=o.ownerDocument||o,b=o.createElement("script"),hn(b),ar(b,"link",p),o.head.appendChild(b),c.instance=b);case"void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(p=c.instance,c.state.loading|=4,ub(p,f.precedence,o));return c.instance}function ub(o,c,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,E=b,D=0;D<p.length;D++){var V=p[D];if(V.dataset.precedence===c)E=V;else if(E!==b)break}E?E.parentNode.insertBefore(o,E.nextSibling):(c=f.nodeType===9?f.head:f,c.insertBefore(o,c.firstChild))}function RE(o,c){o.crossOrigin==null&&(o.crossOrigin=c.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=c.referrerPolicy),o.title==null&&(o.title=c.title)}function kE(o,c){o.crossOrigin==null&&(o.crossOrigin=c.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=c.referrerPolicy),o.integrity==null&&(o.integrity=c.integrity)}var fb=null;function i4(o,c,f){if(fb===null){var p=new Map,b=fb=new Map;b.set(f,p)}else b=fb,p=b.get(f),p||(p=new Map,b.set(f,p));if(p.has(o))return p;for(p.set(o,null),f=f.getElementsByTagName(o),b=0;b<f.length;b++){var E=f[b];if(!(E[nu]||E[Nn]||o==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var D=E.getAttribute(c)||"";D=o+D;var V=p.get(D);V?V.push(E):p.set(D,[E])}}return p}function s4(o,c,f){o=o.ownerDocument||o,o.head.insertBefore(f,c==="title"?o.querySelector("head > title"):null)}function QV(o,c,f){if(f===1||c.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return o=c.disabled,typeof c.precedence=="string"&&o==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function o4(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var _m=null;function KV(){}function WV(o,c,f){if(_m===null)throw Error(r(475));var p=_m;if(c.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var b=Xd(f.href),E=o.querySelector(xm(b));if(E){o=E._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(p.count++,p=db.bind(p),o.then(p,p)),c.state.loading|=4,c.instance=E,hn(E);return}E=o.ownerDocument||o,f=n4(f),(b=Xi.get(b))&&RE(f,b),E=E.createElement("link"),hn(E);var D=E;D._p=new Promise(function(V,Y){D.onload=V,D.onerror=Y}),ar(E,"link",f),c.instance=E}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(c,o),(o=c.state.preload)&&(c.state.loading&3)===0&&(p.count++,c=db.bind(p),o.addEventListener("load",c),o.addEventListener("error",c))}}function YV(){if(_m===null)throw Error(r(475));var o=_m;return o.stylesheets&&o.count===0&&NE(o,o.stylesheets),0<o.count?function(c){var f=setTimeout(function(){if(o.stylesheets&&NE(o,o.stylesheets),o.unsuspend){var p=o.unsuspend;o.unsuspend=null,p()}},6e4);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(f)}}:null}function db(){if(this.count--,this.count===0){if(this.stylesheets)NE(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var hb=null;function NE(o,c){o.stylesheets=null,o.unsuspend!==null&&(o.count++,hb=new Map,c.forEach(JV,o),hb=null,db.call(o))}function JV(o,c){if(!(c.state.loading&4)){var f=hb.get(o);if(f)var p=f.get(null);else{f=new Map,hb.set(o,f);for(var b=o.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<b.length;E++){var D=b[E];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(f.set(D.dataset.precedence,D),p=D)}p&&f.set(null,p)}b=c.instance,D=b.getAttribute("data-precedence"),E=f.get(D)||p,E===p&&f.set(null,b),f.set(D,b),this.count++,p=db.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),E?E.parentNode.insertBefore(b,E.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(b,o.firstChild)),c.state.loading|=4}}var Tm={$$typeof:k,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function XV(o,c,f,p,b,E,D,V){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Jo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jo(0),this.hiddenUpdates=Jo(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=E,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function a4(o,c,f,p,b,E,D,V,Y,ce,ge,we){return o=new XV(o,c,f,D,V,Y,ce,we),c=1,E===!0&&(c|=24),E=yi(3,null,null,c),o.current=E,E.stateNode=o,c=dA(),c.refCount++,o.pooledCache=c,c.refCount++,E.memoizedState={element:p,isDehydrated:f,cache:c},gA(E),o}function c4(o){return o?(o=kd,o):kd}function l4(o,c,f,p,b,E){b=c4(b),p.context===null?p.context=b:p.pendingContext=b,p=Tc(c),p.payload={element:f},E=E===void 0?null:E,E!==null&&(p.callback=E),f=Sc(o,p,c),f!==null&&(Ei(f,o,c),nm(f,o,c))}function u4(o,c){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<c?f:c}}function OE(o,c){u4(o,c),(o=o.alternate)&&u4(o,c)}function f4(o){if(o.tag===13){var c=Rd(o,67108864);c!==null&&Ei(c,o,67108864),OE(o,67108864)}}var pb=!0;function ZV(o,c,f,p){var b=Q.T;Q.T=null;var E=te.p;try{te.p=2,BE(o,c,f,p)}finally{te.p=E,Q.T=b}}function ez(o,c,f,p){var b=Q.T;Q.T=null;var E=te.p;try{te.p=8,BE(o,c,f,p)}finally{te.p=E,Q.T=b}}function BE(o,c,f,p){if(pb){var b=PE(p);if(b===null)vE(o,c,p,mb,f),h4(o,p);else if(nz(b,o,c,f,p))p.stopPropagation();else if(h4(o,p),c&4&&-1<tz.indexOf(o)){for(;b!==null;){var E=Ks(b);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var D=Rr(E.pendingLanes);if(D!==0){var V=E;for(V.pendingLanes|=2,V.entangledLanes|=2;D;){var Y=1<<31-rt(D);V.entanglements[1]|=Y,D&=~Y}co(E),(Ut&6)===0&&(X1=St()+500,wm(0))}}break;case 13:V=Rd(E,2),V!==null&&Ei(V,E,2),eb(),OE(E,2)}if(E=PE(p),E===null&&vE(o,c,p,mb,f),E===b)break;b=E}b!==null&&p.stopPropagation()}else vE(o,c,p,null,f)}}function PE(o){return o=Hi(o),DE(o)}var mb=null;function DE(o){if(mb=null,o=Zo(o),o!==null){var c=s(o);if(c===null)o=null;else{var f=c.tag;if(f===13){if(o=a(c),o!==null)return o;o=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;o=null}else c!==o&&(o=null)}}return mb=o,null}function d4(o){switch(o){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ir()){case Ui:return 2;case ys:return 8;case Vn:case ud:return 32;case zn:return 268435456;default:return 32}default:return 32}}var ME=!1,Fc=null,Vc=null,zc=null,Sm=new Map,Im=new Map,Hc=[],tz="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".split(" ");function h4(o,c){switch(o){case"focusin":case"focusout":Fc=null;break;case"dragenter":case"dragleave":Vc=null;break;case"mouseover":case"mouseout":zc=null;break;case"pointerover":case"pointerout":Sm.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Im.delete(c.pointerId)}}function Rm(o,c,f,p,b,E){return o===null||o.nativeEvent!==E?(o={blockedOn:c,domEventName:f,eventSystemFlags:p,nativeEvent:E,targetContainers:[b]},c!==null&&(c=Ks(c),c!==null&&f4(c)),o):(o.eventSystemFlags|=p,c=o.targetContainers,b!==null&&c.indexOf(b)===-1&&c.push(b),o)}function nz(o,c,f,p,b){switch(c){case"focusin":return Fc=Rm(Fc,o,c,f,p,b),!0;case"dragenter":return Vc=Rm(Vc,o,c,f,p,b),!0;case"mouseover":return zc=Rm(zc,o,c,f,p,b),!0;case"pointerover":var E=b.pointerId;return Sm.set(E,Rm(Sm.get(E)||null,o,c,f,p,b)),!0;case"gotpointercapture":return E=b.pointerId,Im.set(E,Rm(Im.get(E)||null,o,c,f,p,b)),!0}return!1}function p4(o){var c=Zo(o.target);if(c!==null){var f=s(c);if(f!==null){if(c=f.tag,c===13){if(c=a(f),c!==null){o.blockedOn=c,e1(o.priority,function(){if(f.tag===13){var p=Ai();p=yc(p);var b=Rd(f,p);b!==null&&Ei(b,f,p),OE(f,p)}});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function gb(o){if(o.blockedOn!==null)return!1;for(var c=o.targetContainers;0<c.length;){var f=PE(o.nativeEvent);if(f===null){f=o.nativeEvent;var p=new f.constructor(f.type,f);ra=p,f.target.dispatchEvent(p),ra=null}else return c=Ks(f),c!==null&&f4(c),o.blockedOn=f,!1;c.shift()}return!0}function m4(o,c,f){gb(o)&&f.delete(c)}function rz(){ME=!1,Fc!==null&&gb(Fc)&&(Fc=null),Vc!==null&&gb(Vc)&&(Vc=null),zc!==null&&gb(zc)&&(zc=null),Sm.forEach(m4),Im.forEach(m4)}function yb(o,c){o.blockedOn===c&&(o.blockedOn=null,ME||(ME=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,rz)))}var bb=null;function g4(o){bb!==o&&(bb=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){bb===o&&(bb=null);for(var c=0;c<o.length;c+=3){var f=o[c],p=o[c+1],b=o[c+2];if(typeof p!="function"){if(DE(p||f)===null)continue;break}var E=Ks(f);E!==null&&(o.splice(c,3),c-=3,DA(E,{pending:!0,data:b,method:f.method,action:p},p,b))}}))}function km(o){function c(Y){return yb(Y,o)}Fc!==null&&yb(Fc,o),Vc!==null&&yb(Vc,o),zc!==null&&yb(zc,o),Sm.forEach(c),Im.forEach(c);for(var f=0;f<Hc.length;f++){var p=Hc[f];p.blockedOn===o&&(p.blockedOn=null)}for(;0<Hc.length&&(f=Hc[0],f.blockedOn===null);)p4(f),f.blockedOn===null&&Hc.shift();if(f=(o.ownerDocument||o).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var b=f[p],E=f[p+1],D=b[wn]||null;if(typeof E=="function")D||g4(f);else if(D){var V=null;if(E&&E.hasAttribute("formAction")){if(b=E,D=E[wn]||null)V=D.formAction;else if(DE(b)!==null)continue}else V=D.action;typeof V=="function"?f[p+1]=V:(f.splice(p,3),p-=3),g4(f)}}}function jE(o){this._internalRoot=o}wb.prototype.render=jE.prototype.render=function(o){var c=this._internalRoot;if(c===null)throw Error(r(409));var f=c.current,p=Ai();l4(f,p,o,c,null,null)},wb.prototype.unmount=jE.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var c=o.containerInfo;l4(o.current,2,null,o,null,null),eb(),c[Vi]=null}};function wb(o){this._internalRoot=o}wb.prototype.unstable_scheduleHydration=function(o){if(o){var c=bc();o={blockedOn:null,target:o,priority:c};for(var f=0;f<Hc.length&&c!==0&&c<Hc[f].priority;f++);Hc.splice(f,0,o),f===0&&p4(o)}};var y4=e.version;if(y4!=="19.1.1")throw Error(r(527,y4,"19.1.1"));te.findDOMNode=function(o){var c=o._reactInternals;if(c===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=u(c),o=o!==null?d(o):null,o=o===null?null:o.stateNode,o};var iz={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:Q,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vb.isDisabled&&vb.supportsFiber)try{Ve=vb.inject(iz),Le=vb}catch{}}return Om.createRoot=function(o,c){if(!i(o))throw Error(r(299));var f=!1,p="",b=BS,E=PS,D=DS,V=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(b=c.onUncaughtError),c.onCaughtError!==void 0&&(E=c.onCaughtError),c.onRecoverableError!==void 0&&(D=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(V=c.unstable_transitionCallbacks)),c=a4(o,1,!1,null,null,f,p,b,E,D,V,null),o[Vi]=c.current,wE(o),new jE(c)},Om.hydrateRoot=function(o,c,f){if(!i(o))throw Error(r(299));var p=!1,b="",E=BS,D=PS,V=DS,Y=null,ce=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(b=f.identifierPrefix),f.onUncaughtError!==void 0&&(E=f.onUncaughtError),f.onCaughtError!==void 0&&(D=f.onCaughtError),f.onRecoverableError!==void 0&&(V=f.onRecoverableError),f.unstable_transitionCallbacks!==void 0&&(Y=f.unstable_transitionCallbacks),f.formState!==void 0&&(ce=f.formState)),c=a4(o,1,!0,c,f??null,p,b,E,D,V,Y,ce),c.context=c4(null),f=c.current,p=Ai(),p=yc(p),b=Tc(p),b.callback=null,Sc(f,b,p),f=p,c.current.lanes=f,Xo(c,f),co(c),o[Vi]=c.current,wE(o),new wb(c)},Om.version="19.1.1",Om}var I4;function mz(){if(I4)return VE.exports;I4=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),VE.exports=pz(),VE.exports}var gz=mz();/** 51 * @license lucide-react v0.544.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const yz=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bz=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),R4=t=>{const e=bz(t);return e.charAt(0).toUpperCase()+e.slice(1)},Zk=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),wz=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/** 56 * @license lucide-react v0.544.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */var vz={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 61 * @license lucide-react v0.544.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Az=K.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...l},u)=>K.createElement("svg",{ref:u,...vz,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Zk("lucide",i),...!s&&!wz(l)&&{"aria-hidden":"true"},...l},[...a.map(([d,h])=>K.createElement(d,h)),...Array.isArray(s)?s:[s]]));/** 66 * @license lucide-react v0.544.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const di=(t,e)=>{const n=K.forwardRef(({className:r,...i},s)=>K.createElement(Az,{ref:s,iconNode:e,className:Zk(`lucide-${yz(R4(t))}`,`lucide-${t}`,r),...i}));return n.displayName=R4(t),n};/** 71 * @license lucide-react v0.544.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const Ez=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xz=di("arrow-right",Ez);/** 76 * @license lucide-react v0.544.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Cz=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_z=di("chevron-down",Cz);/** 81 * @license lucide-react v0.544.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const Tz=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Sz=di("circle-check-big",Tz);/** 86 * @license lucide-react v0.544.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Iz=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ww=di("lock",Iz);
90/** 91 * @license lucide-react v0.544.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Rz=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],kz=di("log-out",Rz);/** 96 * @license lucide-react v0.544.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const Nz=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Oz=di("message-circle",Nz);/** 101 * @license lucide-react v0.544.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const Bz=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],eN=di("plus",Bz);/** 106 * @license lucide-react v0.544.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Pz=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dz=di("search",Pz);/** 111 * @license lucide-react v0.544.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const Mz=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],jz=di("send",Mz);/** 116 * @license lucide-react v0.544.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Lz=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],jp=di("shield",Lz);/** 121 * @license lucide-react v0.544.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Uz=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
125],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Fz=di("sparkles",Uz);/** 126 * @license lucide-react v0.544.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const Vz=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],m5=di("star",Vz);/** 131 * @license lucide-react v0.544.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const zz=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Hz=di("users",zz);/** 136 * @license lucide-react v0.544.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const qz=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Iy=di("x",qz),$z="modulepreload",Gz=function(t){return"/"+t},k4={},Te=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(d){return Promise.all(d.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=a(n.map(d=>{if(d=Gz(d),d in k4)return;k4[d]=!0;const h=d.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":$z,h||(g.as="script"),g.crossOrigin="",g.href=d,u&&g.setAttribute("nonce",u),document.head.appendChild(g),h)return new Promise((w,A)=>{g.addEventListener("load",w),g.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return i.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};var N4='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',Qz={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${N4}`,system:N4},Bm={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},Kz={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},Wz=({borderRadius:t="large",fontStack:e="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:Kz[n].modalOverlay},fonts:{body:Qz[e]},radii:{actionButton:Bm[t].actionButton,connectButton:Bm[t].connectButton,menuButton:Bm[t].connectButton,modal:Bm[t].modal,modalMobile:Bm[t].modalMobile}}),tN={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},O4=tN.blue,nN=({accentColor:t=O4.accentColor,accentColorForeground:e=O4.accentColorForeground,...n}={})=>({...Wz(n),colors:{accentColor:t,accentColorForeground:e,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackgroun
140d:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});nN.accentColors=tN;var g5=`{ 141 "connect_wallet": { 142 "label": "Connect Wallet", 143 "wrong_network": { 144 "label": "Wrong network" 145 } 146 }, 147 148 "intro": { 149 "title": "What is a Wallet?", 150 "description": "A wallet is used to send, receive, store, and display digital assets. It's also a new way to log in, without needing to create new accounts and passwords on every website.", 151 "digital_asset": { 152 "title": "A Home for your Digital Assets", 153 "description": "Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs." 154 }, 155 "login": { 156 "title": "A New Way to Log In", 157 "description": "Instead of creating new accounts and passwords on every website, just connect your wallet." 158 }, 159 "get": { 160 "label": "Get a Wallet" 161 }, 162 "learn_more": { 163 "label": "Learn More" 164 } 165 }, 166 167 "sign_in": { 168 "label": "Verify your account", 169 "description": "To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account.", 170 "message": { 171 "send": "Sign message", 172 "preparing": "Preparing message...", 173 "cancel": "Cancel", 174 "preparing_error": "Error preparing message, please retry!" 175 }, 176 "signature": { 177 "waiting": "Waiting for signature...", 178 "verifying": "Verifying signature...", 179 "signing_error": "Error signing message, please retry!", 180 "verifying_error": "Error verifying signature, please retry!", 181 "oops_error": "Oops, something went wrong!" 182 } 183 }, 184 185 "connect": { 186 "label": "Connect", 187 "title": "Connect a Wallet", 188 "new_to_ethereum": { 189 "description": "New to Ethereum wallets?", 190 "learn_more": { 191 "label": "Learn More" 192 } 193 }, 194 "learn_more": { 195 "label": "Learn more" 196 }, 197 "recent": "Recent", 198 "status": { 199 "opening": "Opening %{wallet}...", 200 "connecting": "Connecting", 201 "connect_mobile": "Continue in %{wallet}", 202 "not_installed": "%{wallet} is not installed", 203 "not_available": "%{wallet} is not available", 204 "confirm": "Confirm connection in the extension", 205 "confirm_mobile": "Accept connection request in the wallet" 206 }, 207 "secondary_action": { 208 "get": { 209 "description": "Don't have %{wallet}?", 210 "label": "GET" 211 }, 212 "install": { 213 "label": "INSTALL" 214 }, 215 "retry": { 216 "label": "RETRY" 217 } 218 }, 219 "walletconnect": { 220 "description": { 221 "full": "Need the official WalletConnect modal?", 222 "compact": "Need the WalletConnect modal?" 223 }, 224 "open": { 225 "label": "OPEN" 226 } 227 } 228 }, 229 230 "connect_scan": { 231 "title": "Scan with %{wallet}", 232 "fallback_title": "Scan with your phone" 233 }, 234 235 "connector_group": { 236 "installed": "Installed", 237 "recommended": "Recommended", 238 "other": "Other", 239 "popular": "Popular", 240 "more": "More", 241 "others": "Others" 242 }, 243 244 "get": { 245 "title": "Get a Wallet", 246 "action": { 247 "label": "GET" 248 }, 249 "mobile": { 250 "description": "Mobile Wallet" 251 }, 252 "extension": { 253 "description": "Browser Extension" 254 }, 255 "mobile_and_extension": { 256 "description": "Mobile Wallet and Extension" 257 }, 258 "mobile_and_desktop": { 259 "description": "Mobile and Desktop Wallet" 260 }, 261 "looking_for": { 262 "title": "Not what you're looking for?", 263 "mobile": { 264 "description": "Select a wallet on the main screen to get started with a different wallet provider." 265 }, 266 "desktop": { 267 "compact_description": "Select a wallet on the main screen to get started with a different wallet provider.", 268 "wide_description": "Select a wallet on the left to get started with a different wallet provider." 269 } 270 } 271 }, 272 273 "get_options": { 274 "title": "Get started with %{wallet}", 275 "short_title": "Get %{wallet}", 276 "mobile": { 277 "title": "%{wallet} for Mobile", 278 "description": "Use the mobile wallet to explore the world of Ethereum.", 279 "download": { 280 "label": "Get the app" 281 } 282 }, 283 "extension": { 284 "title": "%{wallet} for %{browser}", 285 "description": "Access your wallet right from your favorite web browser.", 286 "download": { 287 "label": "Add to %{browser}" 288 } 289 }, 290 "desktop": { 291 "title": "%{wallet} for %{platform}", 292 "description": "Access your wallet natively from your powerful desktop.", 293 "download": { 294 "label": "Add to %{platform}" 295 } 296 } 297 }, 298 299 "get_mobile": { 300 "title": "Install %{wallet}", 301 "description": "Scan with your phone to download on iOS or Android", 302 "continue": { 303 "label": "Continue" 304 } 305 }, 306 307 "get_instructions": { 308 "mobile": { 309 "connect": { 310 "label": "Connect" 311 }, 312 "learn_more": { 313 "label": "Learn More" 314 } 315 }, 316 "extension": { 317 "refresh": { 318 "label": "Refresh" 319 }, 320 "learn_more": { 321 "label": "Learn More" 322 } 323 }, 324 "desktop": { 325 "connect": { 326 "label": "Connect" 327 }, 328 "learn_more": { 329 "label": "Learn More" 330 } 331 } 332 }, 333 334 "chains": { 335 "title": "Switch Networks", 336 "wrong_network": "Wrong network detected, switch or disconnect to continue.", 337 "confirm": "Confirm in Wallet", 338 "switching_not_supported": "Your wallet does not support switching networks from %{appName}. Try switching networks from within your wallet instead.", 339 "switching_not_supported_fallback": "Your wallet does not support switching networks from this app. Try switching networks from within your wallet instead.", 340 "disconnect": "Disconnect", 341 "connected": "Connected" 342 }, 343 344 "profile": { 345 "disconnect": { 346 "label": "Disconnect" 347 }, 348 "copy_address": { 349 "label": "Copy Address", 350 "copied": "Copied!" 351 }, 352 "explorer": { 353 "label": "View more on explorer" 354 }, 355 "transactions": { 356 "description": "%{appName} transactions will appear here...", 357 "description_fallback": "Your transactions will appear here...", 358 "recent": { 359 "title": "Recent Transactions" 360 }, 361 "clear": { 362 "label": "Clear All" 363 } 364 } 365 }, 366 367 "wallet_connectors": { 368 "argent": { 369 "qr_code": { 370 "step1": { 371 "description": "Put Argent on your home screen for faster access to your wallet.", 372 "title": "Open the Argent app" 373 }, 374 "step2": { 375 "description": "Create a wallet and username, or import an existing wallet.", 376 "title": "Create or Import a Wallet" 377 }, 378 "step3": { 379 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 380 "title": "Tap the Scan QR button" 381 } 382 } 383 }, 384 385 "berasig": { 386 "extension": { 387 "step1": { 388 "title": "Install the BeraSig extension", 389 "description": "We recommend pinning BeraSig to your taskbar for easier access to your wallet." 390 }, 391 "step2": { 392 "title": "Create a Wallet", 393 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 394 }, 395 "step3": { 396 "title": "Refresh your browser", 397 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 398 } 399 } 400 }, 401 402 "best": { 403 "qr_code": { 404 "step1": { 405 "title": "Open the Best Wallet app", 406 "description": "Add Best Wallet to your home screen for faster access to your wallet." 407 }, 408 "step2": { 409 "title": "Create or Import a Wallet", 410 "description": "Create a new wallet or import an existing one." 411 }, 412 "step3": { 413 "title": "Tap the QR icon and scan", 414 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 415 } 416 } 417 }, 418 419 "bifrost": { 420 "qr_code": { 421 "step1": { 422 "description": "We recommend putting Bifrost Wallet on your home screen for quicker access.", 423 "title": "Open the Bifrost Wallet app"
424 }, 425 "step2": { 426 "description": "Create or import a wallet using your recovery phrase.", 427 "title": "Create or Import a Wallet" 428 }, 429 "step3": { 430 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 431 "title": "Tap the scan button" 432 } 433 } 434 }, 435 436 "bitget": { 437 "qr_code": { 438 "step1": { 439 "description": "We recommend putting Bitget Wallet on your home screen for quicker access.", 440 "title": "Open the Bitget Wallet app" 441 }, 442 "step2": { 443 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 444 "title": "Create or Import a Wallet" 445 }, 446 "step3": { 447 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 448 "title": "Tap the scan button" 449 } 450 }, 451 452 "extension": { 453 "step1": { 454 "description": "We recommend pinning Bitget Wallet to your taskbar for quicker access to your wallet.", 455 "title": "Install the Bitget Wallet extension" 456 }, 457 "step2": { 458 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 459 "title": "Create or Import a Wallet" 460 }, 461 "step3": { 462 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 463 "title": "Refresh your browser" 464 } 465 } 466 }, 467 468 "bitski": { 469 "extension": { 470 "step1": { 471 "description": "We recommend pinning Bitski to your taskbar for quicker access to your wallet.", 472 "title": "Install the Bitski extension" 473 }, 474 "step2": { 475 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 476 "title": "Create or Import a Wallet" 477 }, 478 "step3": { 479 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 480 "title": "Refresh your browser" 481 } 482 } 483 }, 484 485 "bitverse": { 486 "qr_code": { 487 "step1": { 488 "title": "Open the Bitverse Wallet app", 489 "description": "Add Bitverse Wallet to your home screen for faster access to your wallet." 490 }, 491 "step2": { 492 "title": "Create or Import a Wallet", 493 "description": "Create a new wallet or import an existing one." 494 }, 495 "step3": { 496 "title": "Tap the QR icon and scan", 497 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 498 } 499 } 500 }, 501 502 "bloom": { 503 "desktop": { 504 "step1": { 505 "title": "Open the Bloom Wallet app", 506 "description": "We recommend putting Bloom Wallet on your home screen for quicker access." 507 }, 508 "step2": { 509 "description": "Create or import a wallet using your recovery phrase.", 510 "title": "Create or Import a Wallet" 511 }, 512 "step3": { 513 "description": "After you have a wallet, click on Connect to connect via Bloom. A connection prompt in the app will appear for you to confirm the connection.", 514 "title": "Click on Connect" 515 } 516 } 517 }, 518 519 "bybit": { 520 "qr_code": { 521 "step1": { 522 "description": "We recommend putting Bybit on your home screen for faster access to your wallet.", 523 "title": "Open the Bybit app" 524 }, 525 "step2": { 526 "description": "You can easily backup your wallet using our backup feature on your phone.", 527 "title": "Create or Import a Wallet" 528 }, 529 "step3": { 530 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 531 "title": "Tap the scan button" 532 } 533 }, 534 535 "extension": { 536 "step1": { 537 "description": "Click at the top right of your browser and pin Bybit Wallet for easy access.", 538 "title": "Install the Bybit Wallet extension" 539 }, 540 "step2": { 541 "description": "Create a new wallet or import an existing one.", 542 "title": "Create or Import a wallet" 543 }, 544 "step3": { 545 "description": "Once you set up Bybit Wallet, click below to refresh the browser and load up the extension.", 546 "title": "Refresh your browser" 547 } 548 } 549 }, 550 551 "binance": { 552 "qr_code": { 553 "step1": { 554 "description": "We recommend putting Binance on your home screen for faster access to your wallet.", 555 "title": "Open the Binance app" 556 }, 557 "step2": { 558 "description": "You can easily backup your wallet using our backup feature on your phone.", 559 "title": "Create or Import a Wallet" 560 }, 561 "step3": { 562 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 563 "title": "Tap the WalletConnect button" 564 } 565 } 566 }, 567 568 "coin98": { 569 "qr_code": { 570 "step1": { 571 "description": "We recommend putting Coin98 Wallet on your home screen for faster access to your wallet.",
572 "title": "Open the Coin98 Wallet app" 573 }, 574 "step2": { 575 "description": "You can easily backup your wallet using our backup feature on your phone.", 576 "title": "Create or Import a Wallet" 577 }, 578 "step3": { 579 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 580 "title": "Tap the WalletConnect button" 581 } 582 }, 583 584 "extension": { 585 "step1": { 586 "description": "Click at the top right of your browser and pin Coin98 Wallet for easy access.", 587 "title": "Install the Coin98 Wallet extension" 588 }, 589 "step2": { 590 "description": "Create a new wallet or import an existing one.", 591 "title": "Create or Import a wallet" 592 }, 593 "step3": { 594 "description": "Once you set up Coin98 Wallet, click below to refresh the browser and load up the extension.", 595 "title": "Refresh your browser" 596 } 597 } 598 }, 599 600 "coinbase": { 601 "qr_code": { 602 "step1": { 603 "description": "We recommend putting Coinbase Wallet on your home screen for quicker access.", 604 "title": "Open the Coinbase Wallet app" 605 }, 606 "step2": { 607 "description": "You can easily backup your wallet using the cloud backup feature.", 608 "title": "Create or Import a Wallet" 609 }, 610 "step3": { 611 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 612 "title": "Tap the scan button" 613 } 614 }, 615 616 "extension": { 617 "step1": { 618 "description": "We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.", 619 "title": "Install the Coinbase Wallet extension" 620 }, 621 "step2": { 622 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 623 "title": "Create or Import a Wallet" 624 }, 625 "step3": { 626 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 627 "title": "Refresh your browser" 628 } 629 } 630 }, 631 632 "compass": { 633 "extension": { 634 "step1": { 635 "description": "We recommend pinning Compass Wallet to your taskbar for quicker access to your wallet.", 636 "title": "Install the Compass Wallet extension" 637 }, 638 "step2": { 639 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 640 "title": "Create or Import a Wallet" 641 }, 642 "step3": { 643 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 644 "title": "Refresh your browser" 645 } 646 } 647 }, 648 649 "core": { 650 "qr_code": { 651 "step1": { 652 "description": "We recommend putting Core on your home screen for faster access to your wallet.", 653 "title": "Open the Core app" 654 }, 655 "step2": { 656 "description": "You can easily backup your wallet using our backup feature on your phone.", 657 "title": "Create or Import a Wallet" 658 }, 659 "step3": { 660 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 661 "title": "Tap the WalletConnect button" 662 } 663 }, 664 665 "extension": { 666 "step1": { 667 "description": "We recommend pinning Core to your taskbar for quicker access to your wallet.", 668 "title": "Install the Core extension" 669 }, 670 "step2": { 671 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 672 "title": "Create or Import a Wallet" 673 }, 674 "step3": { 675 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 676 "title": "Refresh your browser" 677 } 678 } 679 }, 680 681 "fox": { 682 "qr_code": { 683 "step1": { 684 "description": "We recommend putting FoxWallet on your home screen for quicker access.", 685 "title": "Open the FoxWallet app"
686 }, 687 "step2": { 688 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 689 "title": "Create or Import a Wallet" 690 }, 691 "step3": { 692 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 693 "title": "Tap the scan button" 694 } 695 } 696 }, 697 698 "frontier": { 699 "qr_code": { 700 "step1": { 701 "description": "We recommend putting Frontier Wallet on your home screen for quicker access.", 702 "title": "Open the Frontier Wallet app" 703 }, 704 "step2": { 705 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 706 "title": "Create or Import a Wallet" 707 }, 708 "step3": { 709 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 710 "title": "Tap the scan button" 711 } 712 }, 713 714 "extension": { 715 "step1": { 716 "description": "We recommend pinning Frontier Wallet to your taskbar for quicker access to your wallet.", 717 "title": "Install the Frontier Wallet extension" 718 }, 719 "step2": { 720 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 721 "title": "Create or Import a Wallet" 722 }, 723 "step3": { 724 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 725 "title": "Refresh your browser" 726 } 727 } 728 }, 729 730 "im_token": { 731 "qr_code": { 732 "step1": { 733 "title": "Open the imToken app", 734 "description": "Put imToken app on your home screen for faster access to your wallet." 735 }, 736 "step2": { 737 "title": "Create or Import a Wallet", 738 "description": "Create a new wallet or import an existing one." 739 }, 740 "step3": { 741 "title": "Tap Scanner Icon in top right corner", 742 "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect." 743 } 744 } 745 }, 746 747 "iopay": { 748 "qr_code": { 749 "step1": { 750 "description": "We recommend putting ioPay on your home screen for faster access to your wallet.", 751 "title": "Open the ioPay app" 752 }, 753 "step2": { 754 "description": "You can easily backup your wallet using our backup feature on your phone.", 755 "title": "Create or Import a Wallet" 756 }, 757 "step3": { 758 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 759 "title": "Tap the WalletConnect button" 760 } 761 } 762 }, 763 764 "kaikas": { 765 "extension": { 766 "step1": { 767 "description": "We recommend pinning Kaikas to your taskbar for quicker access to your wallet.", 768 "title": "Install the Kaikas extension" 769 }, 770 "step2": { 771 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 772 "title": "Create or Import a Wallet" 773 }, 774 "step3": { 775 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 776 "title": "Refresh your browser" 777 } 778 }, 779 "qr_code": { 780 "step1": { 781 "title": "Open the Kaikas app", 782 "description": "Put Kaikas app on your home screen for faster access to your wallet." 783 }, 784 "step2": { 785 "title": "Create or Import a Wallet", 786 "description": "Create a new wallet or import an existing one." 787 }, 788 "step3": { 789 "title": "Tap Scanner Icon in top right corner", 790 "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect." 791 } 792 } 793 }, 794 795 "kaia": { 796 "extension": { 797 "step1": { 798 "description": "We recommend pinning Kaia to your taskbar for quicker access to your wallet.", 799 "title": "Install the Kaia extension" 800 }, 801 "step2": { 802 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 803 "title": "Create or Import a Wallet" 804 }, 805 "step3": { 806 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 807 "title": "Refresh your browser" 808 } 809 }, 810 "qr_code": { 811 "step1": { 812 "title": "Open the Kaia app", 813 "description": "Put Kaia app on your home screen for faster access to your wallet." 814 }, 815 "step2": { 816 "title": "Create or Import a Wallet", 817 "description": "Create a new wallet or import an existing one." 818 }, 819 "step3": { 820 "title": "Tap Scanner Icon in top right corner", 821 "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect." 822 } 823 } 824 }, 825 826 "kraken": { 827 "qr_code": { 828 "step1": { 829 "title": "Open the Kraken Wallet app", 830 "description": "Add Kraken Wallet to your home screen for faster access to your wallet." 831 }, 832 "step2": { 833 "title": "Create or Import a Wallet", 834 "description": "Create a new wallet or import an existing one." 835 }, 836 "step3": { 837 "title": "Tap the QR icon and scan", 838 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 839 } 840 } 841 }, 842 843 "kresus": { 844 "qr_code": { 845 "step1": { 846 "title": "Open the Kresus Wallet app", 847 "description": "Add Kresus Wallet to your home screen for faster access to your wallet." 848 }, 849 "step2": { 850 "title": "Create or Import a Wallet", 851 "description": "Create a new wallet or import an existing one." 852 }, 853 "step3": { 854 "title": "Tap the QR icon and scan", 855 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 856 } 857 } 858 }, 859 860 "magicEden": { 861 "extension": { 862 "step1": { 863 "title": "Install the Magic Eden extension", 864 "description": "We recommend pinning Magic Eden to your taskbar for easier access to your wallet." 865 }, 866 "step2": { 867 "title": "Create or Import a Wallet", 868 "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone." 869 }, 870 "step3": { 871 "title": "Refresh your browser", 872 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 873 } 874 } 875 }, 876 877 "metamask": { 878 "qr_code": { 879 "step1": { 880 "title": "Open the MetaMask app", 881 "description": "We recommend putting MetaMask on your home screen for quicker access." 882 }, 883 "step2": { 884 "title": "Create or Import a Wallet", 885 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 886 }, 887 "step3": { 888 "title": "Tap the scan button", 889 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 890 } 891 }, 892 893 "extension": { 894 "step1": { 895 "title": "Install the MetaMask extension", 896 "description": "We recommend pinning MetaMask to your taskbar for quicker access to your wallet." 897 }, 898 "step2": { 899 "title": "Create or Import a Wallet", 900 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 901 }, 902 "step3": { 903 "title": "Refresh your browser", 904 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 905 } 906 } 907 }, 908 909 "nestwallet": { 910 "extension": { 911 "step1": { 912 "title": "Install the NestWallet extension", 913 "description": "We recommend pinning NestWallet to your taskbar for quicker access to your wallet." 914 }, 915 "step2": { 916 "title": "Create or Import a Wallet", 917 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 918 }, 919 "step3": { 920 "title": "Refresh your browser", 921 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 922 } 923 } 924 }, 925 926 "okx": { 927 "qr_code": { 928 "step1": { 929 "title": "Open the OKX Wallet app", 930 "description": "We recommend putting OKX Wallet on your home screen for quicker access." 931 }, 932 "step2": { 933 "title": "Create or Import a Wallet", 934 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 935 }, 936 "step3": { 937 "title": "Tap the scan button", 938 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 939 } 940 }, 941 942 "extension": { 943 "step1": { 944 "title": "Install the OKX Wallet extension", 945 "description": "We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet." 946 }, 947 "step2": { 948 "title": "Create or Import a Wallet", 949 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 950 }, 951 "step3": { 952 "title": "Refresh your browser", 953 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 954 } 955 } 956 }, 957 958 "omni": { 959 "qr_code": { 960 "step1": { 961 "title": "Open the Omni app", 962 "description": "Add Omni to your home screen for faster access to your wallet." 963 }, 964 "step2": { 965 "title": "Create or Import a Wallet", 966 "description": "Create a new wallet or import an existing one." 967 }, 968 "step3": { 969 "title": "Tap the QR icon and scan", 970 "description": "Tap the QR icon on your home screen, scan the code and confirm the prompt to connect." 971 } 972 } 973 }, 974 975 "1inch": { 976 "qr_code": { 977 "step1": { 978 "description": "Put 1inch Wallet on your home screen for faster access to your wallet.", 979 "title": "Open the 1inch Wallet app"
980 }, 981 "step2": { 982 "description": "Create a wallet and username, or import an existing wallet.", 983 "title": "Create or Import a Wallet" 984 }, 985 "step3": { 986 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 987 "title": "Tap the Scan QR button" 988 } 989 } 990 }, 991 992 "token_pocket": { 993 "qr_code": { 994 "step1": { 995 "title": "Open the TokenPocket app", 996 "description": "We recommend putting TokenPocket on your home screen for quicker access." 997 }, 998 "step2": { 999 "title": "Create or Import a Wallet", 1000 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1001 }, 1002 "step3": { 1003 "title": "Tap the scan button", 1004 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1005 } 1006 }, 1007 1008 "extension": { 1009 "step1": { 1010 "title": "Install the TokenPocket extension", 1011 "description": "We recommend pinning TokenPocket to your taskbar for quicker access to your wallet." 1012 }, 1013 "step2": { 1014 "title": "Create or Import a Wallet", 1015 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1016 }, 1017 "step3": { 1018 "title": "Refresh your browser", 1019 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1020 } 1021 } 1022 }, 1023 1024 "trust": { 1025 "qr_code": { 1026 "step1": { 1027 "title": "Open the Trust Wallet app", 1028 "description": "Put Trust Wallet on your home screen for faster access to your wallet." 1029 }, 1030 "step2": { 1031 "title": "Create or Import a Wallet", 1032 "description": "Create a new wallet or import an existing one." 1033 }, 1034 "step3": { 1035 "title": "Tap WalletConnect in Settings", 1036 "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect." 1037 } 1038 }, 1039 1040 "extension": { 1041 "step1": { 1042 "title": "Install the Trust Wallet extension", 1043 "description": "Click at the top right of your browser and pin Trust Wallet for easy access." 1044 }, 1045 "step2": { 1046 "title": "Create or Import a wallet", 1047 "description": "Create a new wallet or import an existing one." 1048 }, 1049 "step3": { 1050 "title": "Refresh your browser", 1051 "description": "Once you set up Trust Wallet, click below to refresh the browser and load up the extension." 1052 } 1053 } 1054 }, 1055 1056 "uniswap": { 1057 "qr_code": { 1058 "step1": { 1059 "title": "Open the Uniswap app", 1060 "description": "Add Uniswap Wallet to your home screen for faster access to your wallet." 1061 }, 1062 "step2": { 1063 "title": "Create or Import a Wallet", 1064 "description": "Create a new wallet or import an existing one." 1065 }, 1066 "step3": { 1067 "title": "Tap the QR icon and scan", 1068 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 1069 } 1070 } 1071 }, 1072 1073 "zerion": { 1074 "qr_code": { 1075 "step1": { 1076 "title": "Open the Zerion app", 1077 "description": "We recommend putting Zerion on your home screen for quicker access." 1078 }, 1079 "step2": { 1080 "title": "Create or Import a Wallet", 1081 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1082 }, 1083 "step3": { 1084 "title": "Tap the scan button", 1085 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1086 } 1087 }, 1088 1089 "extension": { 1090 "step1": { 1091 "title": "Install the Zerion extension", 1092 "description": "We recommend pinning Zerion to your taskbar for quicker access to your wallet." 1093 }, 1094 "step2": { 1095 "title": "Create or Import a Wallet", 1096 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1097 }, 1098 "step3": { 1099 "title": "Refresh your browser", 1100 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1101 } 1102 } 1103 }, 1104 1105 "rainbow": { 1106 "qr_code": { 1107 "step1": { 1108 "title": "Open the Rainbow app", 1109 "description": "We recommend putting Rainbow on your home screen for faster access to your wallet." 1110 }, 1111 "step2": { 1112 "title": "Create or Import a Wallet", 1113 "description": "You can easily backup your wallet using our backup feature on your phone." 1114 }, 1115 "step3": { 1116 "title": "Tap the scan button", 1117 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1118 } 1119 } 1120 }, 1121 1122 "enkrypt": { 1123 "extension": { 1124 "step1": { 1125 "description": "We recommend pinning Enkrypt Wallet to your taskbar for quicker access to your wallet.", 1126 "title": "Install the Enkrypt Wallet extension" 1127 }, 1128 "step2": { 1129 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 1130 "title": "Create or Import a Wallet" 1131 }, 1132 "step3": { 1133 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 1134 "title": "Refresh your browser" 1135 } 1136 } 1137 }, 1138 1139 "frame": { 1140 "extension": { 1141 "step1": { 1142 "description": "We recommend pinning Frame to your taskbar for quicker access to your wallet.", 1143 "title": "Install Frame & the companion extension" 1144 }, 1145 "step2": { 1146 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 1147 "title": "Create or Import a Wallet" 1148 }, 1149 "step3": { 1150 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 1151 "title": "Refresh your browser" 1152 } 1153 } 1154 }, 1155 1156 "one_key": { 1157 "extension": { 1158 "step1": { 1159 "title": "Install the OneKey Wallet extension", 1160 "description": "We recommend pinning OneKey Wallet to your taskbar for quicker access to your wallet." 1161 }, 1162 "step2": { 1163 "title": "Create or Import a Wallet", 1164 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1165 }, 1166 "step3": { 1167 "title": "Refresh your browser", 1168 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1169 } 1170 } 1171 }, 1172 1173 "paraswap": { 1174 "qr_code": { 1175 "step1": { 1176 "title": "Open the ParaSwap app", 1177 "description": "Add ParaSwap Wallet to your home screen for faster access to your wallet." 1178 }, 1179 "step2": { 1180 "title": "Create or Import a Wallet", 1181 "description": "Create a new wallet or import an existing one." 1182 }, 1183 "step3": { 1184 "title": "Tap the QR icon and scan", 1185 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 1186 } 1187 } 1188 }, 1189 1190 "phantom": { 1191 "extension": { 1192 "step1": { 1193 "title": "Install the Phantom extension", 1194 "description": "We recommend pinning Phantom to your taskbar for easier access to your wallet." 1195 }, 1196 "step2": { 1197 "title": "Create or Import a Wallet", 1198 "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone." 1199 }, 1200 "step3": { 1201 "title": "Refresh your browser", 1202 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1203 } 1204 } 1205 }, 1206 1207 "rabby": { 1208 "extension": { 1209 "step1": { 1210 "title": "Install the Rabby extension", 1211 "description": "We recommend pinning Rabby to your taskbar for quicker access to your wallet." 1212 }, 1213 "step2": { 1214 "title": "Create or Import a Wallet", 1215 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1216 }, 1217 "step3": { 1218 "title": "Refresh your browser", 1219 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1220 } 1221 } 1222 }, 1223 1224 "ronin": { 1225 "qr_code": { 1226 "step1": { 1227 "description": "We recommend putting Ronin Wallet on your home screen for quicker access.", 1228 "title": "Open the Ronin Wallet app"
1229 }, 1230 "step2": { 1231 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 1232 "title": "Create or Import a Wallet" 1233 }, 1234 "step3": { 1235 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 1236 "title": "Tap the scan button" 1237 } 1238 }, 1239 1240 "extension": { 1241 "step1": { 1242 "description": "We recommend pinning Ronin Wallet to your taskbar for quicker access to your wallet.", 1243 "title": "Install the Ronin Wallet extension" 1244 }, 1245 "step2": { 1246 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.", 1247 "title": "Create or Import a Wallet" 1248 }, 1249 "step3": { 1250 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.", 1251 "title": "Refresh your browser" 1252 } 1253 } 1254 }, 1255 1256 "ramper": { 1257 "extension": { 1258 "step1": { 1259 "title": "Install the Ramper extension", 1260 "description": "We recommend pinning Ramper to your taskbar for easier access to your wallet." 1261 }, 1262 "step2": { 1263 "title": "Create a Wallet", 1264 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1265 }, 1266 "step3": { 1267 "title": "Refresh your browser", 1268 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1269 } 1270 } 1271 }, 1272 1273 "safeheron": { 1274 "extension": { 1275 "step1": { 1276 "title": "Install the Core extension", 1277 "description": "We recommend pinning Safeheron to your taskbar for quicker access to your wallet." 1278 }, 1279 "step2": { 1280 "title": "Create or Import a Wallet", 1281 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1282 }, 1283 "step3": { 1284 "title": "Refresh your browser", 1285 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1286 } 1287 } 1288 }, 1289 1290 "taho": { 1291 "extension": { 1292 "step1": { 1293 "title": "Install the Taho extension", 1294 "description": "We recommend pinning Taho to your taskbar for quicker access to your wallet." 1295 }, 1296 "step2": { 1297 "title": "Create or Import a Wallet", 1298 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1299 }, 1300 "step3": { 1301 "title": "Refresh your browser", 1302 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1303 } 1304 } 1305 }, 1306 1307 "wigwam": { 1308 "extension": { 1309 "step1": { 1310 "title": "Install the Wigwam extension", 1311 "description": "We recommend pinning Wigwam to your taskbar for quicker access to your wallet." 1312 }, 1313 "step2": { 1314 "title": "Create or Import a Wallet", 1315 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1316 }, 1317 "step3": { 1318 "title": "Refresh your browser", 1319 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1320 } 1321 } 1322 }, 1323 1324 "talisman": { 1325 "extension": { 1326 "step1": { 1327 "title": "Install the Talisman extension", 1328 "description": "We recommend pinning Talisman to your taskbar for quicker access to your wallet." 1329 }, 1330 "step2": { 1331 "title": "Create or Import an Ethereum Wallet", 1332 "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone." 1333 }, 1334 "step3": { 1335 "title": "Refresh your browser", 1336 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1337 } 1338 } 1339 }, 1340 1341 "xdefi": { 1342 "extension": { 1343 "step1": { 1344 "title": "Install the XDEFI Wallet extension", 1345 "description": "We recommend pinning XDEFI Wallet to your taskbar for quicker access to your wallet." 1346 }, 1347 "step2": { 1348 "title": "Create or Import a Wallet", 1349 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1350 }, 1351 "step3": { 1352 "title": "Refresh your browser", 1353 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1354 } 1355 } 1356 }, 1357 1358 "zeal": { 1359 "qr_code": { 1360 "step1": { 1361 "title": "Open the Zeal app", 1362 "description": "Add Zeal Wallet to your home screen for faster access to your wallet." 1363 }, 1364 "step2": { 1365 "title": "Create or Import a Wallet", 1366 "description": "Create a new wallet or import an existing one." 1367 }, 1368 "step3": { 1369 "title": "Tap the QR icon and scan", 1370 "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect." 1371 } 1372 }, 1373 "extension": { 1374 "step1": { 1375 "title": "Install the Zeal extension", 1376 "description": "We recommend pinning Zeal to your taskbar for quicker access to your wallet." 1377 }, 1378 "step2": { 1379 "title": "Create or Import a Wallet", 1380 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1381 }, 1382 "step3": { 1383 "title": "Refresh your browser", 1384 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1385 } 1386 } 1387 }, 1388 1389 "safepal": { 1390 "extension": { 1391 "step1": { 1392 "title": "Install the SafePal Wallet extension", 1393 "description": "Click at the top right of your browser and pin SafePal Wallet for easy access." 1394 }, 1395 "step2": { 1396 "title": "Create or Import a wallet", 1397 "description": "Create a new wallet or import an existing one." 1398 }, 1399 "step3": { 1400 "title": "Refresh your browser", 1401 "description": "Once you set up SafePal Wallet, click below to refresh the browser and load up the extension." 1402 } 1403 }, 1404 "qr_code": { 1405 "step1": { 1406 "title": "Open the SafePal Wallet app", 1407 "description": "Put SafePal Wallet on your home screen for faster access to your wallet." 1408 }, 1409 "step2": { 1410 "title": "Create or Import a Wallet", 1411 "description": "Create a new wallet or import an existing one." 1412 }, 1413 "step3": { 1414 "title": "Tap WalletConnect in Settings", 1415 "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect." 1416 } 1417 } 1418 }, 1419 1420 "desig": { 1421 "extension": { 1422 "step1": { 1423 "title": "Install the Desig extension", 1424 "description": "We recommend pinning Desig to your taskbar for easier access to your wallet." 1425 }, 1426 "step2": { 1427 "title": "Create a Wallet", 1428 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1429 }, 1430 "step3": { 1431 "title": "Refresh your browser", 1432 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1433 } 1434 } 1435 }, 1436 1437 "subwallet": { 1438 "extension": { 1439 "step1": { 1440 "title": "Install the SubWallet extension", 1441 "description": "We recommend pinning SubWallet to your taskbar for quicker access to your wallet." 1442 }, 1443 "step2": { 1444 "title": "Create or Import a Wallet", 1445 "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone." 1446 }, 1447 "step3": { 1448 "title": "Refresh your browser", 1449 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1450 } 1451 }, 1452 "qr_code": { 1453 "step1": { 1454 "title": "Open the SubWallet app", 1455 "description": "We recommend putting SubWallet on your home screen for quicker access." 1456 }, 1457 "step2": { 1458 "title": "Create or Import a Wallet", 1459 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1460 }, 1461 "step3": { 1462 "title": "Tap the scan button", 1463 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1464 } 1465 } 1466 }, 1467 1468 "clv": { 1469 "extension": { 1470 "step1": { 1471 "title": "Install the CLV Wallet extension", 1472 "description": "We recommend pinning CLV Wallet to your taskbar for quicker access to your wallet." 1473 }, 1474 "step2": { 1475 "title": "Create or Import a Wallet", 1476 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1477 }, 1478 "step3": { 1479 "title": "Refresh your browser", 1480 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1481 } 1482 }, 1483 "qr_code": { 1484 "step1": { 1485 "title": "Open the CLV Wallet app", 1486 "description": "We recommend putting CLV Wallet on your home screen for quicker access." 1487 }, 1488 "step2": { 1489 "title": "Create or Import a Wallet", 1490 "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." 1491 }, 1492 "step3": { 1493 "title": "Tap the scan button", 1494 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1495 } 1496 } 1497 }, 1498 1499 "okto": { 1500 "qr_code": { 1501 "step1": {
1502 "title": "Open the Okto app", 1503 "description": "Add Okto to your home screen for quick access" 1504 }, 1505 "step2": { 1506 "title": "Create an MPC Wallet", 1507 "description": "Create an account and generate a wallet" 1508 }, 1509 "step3": { 1510 "title": "Tap WalletConnect in Settings", 1511 "description": "Tap the Scan QR icon at the top right and confirm the prompt to connect." 1512 } 1513 } 1514 }, 1515 1516 "ledger": { 1517 "desktop": { 1518 "step1": { 1519 "title": "Open the Ledger Live app", 1520 "description": "We recommend putting Ledger Live on your home screen for quicker access." 1521 }, 1522 "step2": { 1523 "title": "Set up your Ledger", 1524 "description": "Set up a new Ledger or connect to an existing one." 1525 }, 1526 "step3": { 1527 "title": "Connect", 1528 "description": "A connection prompt will appear for you to connect your wallet." 1529 } 1530 }, 1531 "qr_code": { 1532 "step1": { 1533 "title": "Open the Ledger Live app", 1534 "description": "We recommend putting Ledger Live on your home screen for quicker access." 1535 }, 1536 "step2": { 1537 "title": "Set up your Ledger", 1538 "description": "You can either sync with the desktop app or connect your Ledger." 1539 }, 1540 "step3": { 1541 "title": "Scan the code", 1542 "description": "Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet." 1543 } 1544 } 1545 }, 1546 1547 "valora": { 1548 "qr_code": { 1549 "step1": { 1550 "title": "Open the Valora app", 1551 "description": "We recommend putting Valora on your home screen for quicker access." 1552 }, 1553 "step2": { 1554 "title": "Create or import a wallet", 1555 "description": "Create a new wallet or import an existing one." 1556 }, 1557 "step3": { 1558 "title": "Tap the scan button", 1559 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1560 } 1561 } 1562 }, 1563 1564 "gate": { 1565 "qr_code": { 1566 "step1": { 1567 "title": "Open the Gate app", 1568 "description": "We recommend putting Gate on your home screen for quicker access." 1569 }, 1570 "step2": { 1571 "title": "Create or Import a Wallet", 1572 "description": "Create a new wallet or import an existing one." 1573 }, 1574 "step3": { 1575 "title": "Tap the scan button", 1576 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1577 } 1578 }, 1579 "extension": { 1580 "step1": { 1581 "title": "Install the Gate extension", 1582 "description": "We recommend pinning Gate to your taskbar for easier access to your wallet." 1583 }, 1584 "step2": { 1585 "title": "Create or Import a Wallet", 1586 "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone." 1587 }, 1588 "step3": { 1589 "title": "Refresh your browser", 1590 "description": "Once you set up your wallet, click below to refresh the browser and load up the extension." 1591 } 1592 } 1593 }, 1594 1595 "xportal": { 1596 "qr_code": { 1597 "step1": { 1598 "description": "Put xPortal on your home screen for faster access to your wallet.", 1599 "title": "Open the xPortal app" 1600 }, 1601 "step2": { 1602 "description": "Create a wallet or import an existing one.", 1603 "title": "Create or Import a Wallet" 1604 }, 1605 "step3": { 1606 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 1607 "title": "Tap the Scan QR button" 1608 } 1609 } 1610 }, 1611 1612 "mew": { 1613 "qr_code": { 1614 "step1": { 1615 "description": "We recommend putting MEW Wallet on your home screen for quicker access.", 1616 "title": "Open the MEW Wallet app" 1617 }, 1618 "step2": { 1619 "description": "You can easily backup your wallet using the cloud backup feature.", 1620 "title": "Create or Import a Wallet" 1621 }, 1622 "step3": { 1623 "description": "After you scan, a connection prompt will appear for you to connect your wallet.", 1624 "title": "Tap the scan button" 1625 } 1626 } 1627 } 1628 }, 1629 1630 "zilpay": { 1631 "qr_code": { 1632 "step1": { 1633 "title": "Open the ZilPay app", 1634 "description": "Add ZilPay to your home screen for faster access to your wallet." 1635 }, 1636 "step2": { 1637 "title": "Create or Import a Wallet", 1638 "description": "Create a new wallet or import an existing one." 1639 }, 1640 "step3": { 1641 "title": "Tap the scan button", 1642 "description": "After you scan, a connection prompt will appear for you to connect your wallet." 1643 } 1644 } 1645 } 1646} 1647`;function Yz(t,e){return Object.defineProperty(t,"__recipe__",{value:e,writable:!1}),t}var rN=Yz;function iN(t){var{conditions:e}=t;if(!e)throw new Error("Styles have no conditions");function n(r){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!e.defaultCondition)throw new Error("No default condition");return{[e.defaultCondition]:r}}if(Array.isArray(r)){if(!("responsiveArray"in e))throw new Error("Responsive arrays are not supported");var i={};for(var s in e.responsiveArray)r[s]!=null&&(i[e.responsiveArray[s]]=r[s]);return i}return r}return rN(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:t.conditions}]})}function Jz(t){var{conditions:e}=t;if(!e)throw new Error("Styles have no conditions");var n=iN(t);
1647function r(i,s){if(typeof i=="string"||typeof i=="number"||typeof i=="boolean"){if(!e.defaultCondition)throw new Error("No default condition");return s(i,e.defaultCondition)}var a=Array.isArray(i)?n(i):i,l={};for(var u in a)a[u]!=null&&(l[u]=s(a[u],u));return l}return rN(r,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:t.conditions}]})}function Xz(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zz(t){var e=Xz(t,"string");return typeof e=="symbol"?e:String(e)}function eH(t,e,n){return e=Zz(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $E(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?B4(Object(n),!0).forEach(function(r){eH(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var tH=t=>function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Object.assign({},...n.map(u=>u.styles)),s=Object.keys(i),a=s.filter(u=>"mappings"in i[u]),l=u=>{var d=[],h={},m=$E({},u),g=!1;for(var w of a){var A=u[w];if(A!=null){var v=i[w];g=!0;for(var x of v.mappings)h[x]=A,m[x]==null&&delete m[x]}}var T=g?$E($E({},h),m):u,O=function(){var B=T[k],U=i[k];try{if(U.mappings)return 1;if(typeof B=="string"||typeof B=="number")d.push(U.values[B].defaultClass);else if(Array.isArray(B))for(var I=0;I<B.length;I++){var R=B[I];if(R!=null){var M=U.responsiveArray[I];d.push(U.values[R].conditions[M])}}else for(var F in B){var j=B[F];j!=null&&d.push(U.values[j].conditions[F])}}catch(q){throw q}};for(var k in T)O();return t(d.join(" "))};return Object.assign(l,{properties:new Set(s)})},nH=t=>t,rH=function(){return tH(nH)(...arguments)};const vw=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],y5=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],sN=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],oN=[...sN,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],iH=[...sN,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],P4=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],D4=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],aN=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],M4=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function Fs(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new yH(t.type);return`${t.name}(${Av(t.inputs,{includeName:e})})`}function Av(t,{includeName:e=!1}={}){return t?t.map(n=>sH(n,{includeName:e})).join(e?", ":","):""}function sH(t,{includeName:e}){return t.type.startsWith("tuple")?`(${Av(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}
1647function Fo(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function fn(t){return Fo(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const cN="2.37.9";let Pm={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:n})=>e?`${t??"https://viem.sh"}${e}${n?`#${n}`:""}`:void 0,version:`viem@${cN}`},Ce=class b5 extends Error{constructor(e,n={}){var l;const r=(()=>{var u;return n.cause instanceof b5?n.cause.details:(u=n.cause)!=null&&u.message?n.cause.message:n.details})(),i=n.cause instanceof b5&&n.cause.docsPath||n.docsPath,s=(l=Pm.getDocsUrl)==null?void 0:l.call(Pm,{...n,docsPath:i}),a=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...Pm.version?[`Version: ${Pm.version}`]:[]].join(` 1648`);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=e,this.version=cN}walk(e){return lN(this,e)}};function lN(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?lN(t.cause,e):e?null:t}class oH extends Ce{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` 1649`),{docsPath:e,name:"AbiConstructorNotFoundError"})}}class j4 extends Ce{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` 1650`),{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class uN extends Ce{constructor({data:e,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(` 1651`),{metaMessages:[`Params: (${Av(n,{includeName:!0})})`,`Data: ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=n,this.size=r}}class Ry extends Ce{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class aH extends Ce{constructor({expectedLength:e,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${n}`].join(` 1652`),{name:"AbiEncodingArrayLengthMismatchError"})}}class cH extends Ce{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${fn(n)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class lH extends Ce{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${n}`].join(` 1653`),{name:"AbiEncodingLengthMismatchError"})}}class uH extends Ce{constructor(e,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` 1654`),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class L4 extends Ce{constructor(e,{docsPath:n}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` 1655`),{docsPath:n,name:"AbiErrorNotFoundError"})}}class fN extends Ce{constructor(e,{docsPath:n}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` 1656`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class fH extends Ce{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class dN extends Ce{constructor(e,{docsPath:n}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` 1657`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class U4 extends Ce{constructor(e,{docsPath:n}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` 1658`),{docsPath:n,name:"AbiEventNotFoundError"})}}class Lp extends Ce{constructor(e,{docsPath:n}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` 1659`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class hN extends Ce{constructor(e,{docsPath:n}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` 1660`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class dH extends Ce{constructor(e,{docsPath:n}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` 1661`),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class hH extends Ce{constructor(e,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${Fs(e.abiItem)}\`, and`,`\`${n.type}\` in \`${Fs(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let pH=class extends Ce{constructor({expectedSize:e,givenSize:n}){super(`Expected bytes${e}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class hg extends Ce{constructor({abiItem:e,data:n,params:r,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(` 1662`),{metaMessages:[`Params: (${Av(r,{includeName:!0})})`,`Data: ${n} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=n,this.params=r,this.size=i}}class Ev extends Ce{constructor({abiItem:e,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${Fs(e,{includeName:!0})}".`].join(` 1663`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class mH extends Ce{constructor(e,{docsPath:n}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` 1664`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class gH extends Ce{constructor(e,{docsPath:n}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` 1665`),{docsPath:n,name:"InvalidAbiDecodingType"})}}let pN=class extends Ce{constructor(e){super([`Value "${e}" is not a valid array.`].join(` 1666`),{name:"InvalidArrayError"})}};class yH extends Ce{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` 1667`),{name:"InvalidDefinitionTypeError"})}}let Ml=class extends Ce{constructor({address:e}){super(`Address "${e}
1667" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},mN=class extends Ce{constructor({offset:e,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},gN=class extends Ce{constructor({size:e,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class F4 extends Ce{constructor({size:e,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}function l0(t,{dir:e,size:n=32}={}){return typeof t=="string"?Rl(t,{dir:e,size:n}):bH(t,{dir:e,size:n})}function Rl(t,{dir:e,size:n=32}={}){if(n===null)return t;const r=t.replace("0x","");if(r.length>n*2)throw new gN({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[e==="right"?"padEnd":"padStart"](n*2,"0")}`}function bH(t,{dir:e,size:n=32}={}){if(n===null)return t;if(t.length>n)throw new gN({size:t.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;i<n;i++){const s=e==="right";r[s?i:n-i-1]=t[s?i:t.length-i-1]}return r}let yN=class extends Ce{constructor({max:e,min:n,signed:r,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${n} to ${e})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},wH=class extends Ce{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class vH extends Ce{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let AH=class extends Ce{constructor({givenSize:e,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}};function Wa(t,{dir:e="left"}={}){let n=typeof t=="string"?t.replace("0x",""):t,r=0;for(let i=0;i<n.length-1&&n[e==="left"?i:n.length-i-1].toString()==="0";i++)r++;return n=e==="left"?n.slice(r):n.slice(0,n.length-r),typeof t=="string"?(n.length===1&&e==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function ms(t,{size:e}){if(fn(t)>e)throw new AH({givenSize:fn(t),maxSize:e})}function Vo(t,e={}){const{signed:n}=e;e.size&&ms(t,{size:e.size});const r=BigInt(t);if(!n)return r;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function EH(t,e={}){let n=t;if(e.size&&(ms(n,{size:e.size}),n=Wa(n)),Wa(n)==="0x00")return!1;if(Wa(n)==="0x01")return!0;throw new vH(n)}function zo(t,e={}){return Number(Vo(t,e))}function xH(t,e={}){let n=Vs(t);return e.size&&(ms(n,{size:e.size}),n=Wa(n,{dir:"right"})),new TextDecoder().decode(n)}const CH=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function rc(t,e={}){return typeof t=="number"||typeof t=="bigint"?Ue(t,e):typeof t=="string"?Up(t,e):typeof t=="boolean"?bN(t,e):Fn(t,e)}function bN(t,e={}){const n=`0x${Number(t)}`;return typeof e.size=="number"?(ms(n,{size:e.size}),l0(n,{size:e.size})):n}function Fn(t,e={}){let n="";for(let i=0;i<t.length;i++)n+=CH[t[i]];const r=`0x${n}`;return typeof e.size=="number"?(ms(r,{size:e.size}),l0(r,{dir:"right",size:e.size})):r}function Ue(t,e={}){const{signed:n,size:r}=e,i=BigInt(t);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof s=="bigint"&&n?-s-1n:0;if(s&&i>s||i<a){const u=typeof t=="bigint"?"n":"";throw new yN({max:s?`${s}${u}`:void 0,min:`${a}${u}`,signed:n,size:r,value:`${t}${u}`})}const l=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?l0(l,{size:r}):l}const _H=new TextEncoder;function Up(t,e={}){const n=_H.encode(t);return Fn(n,e)}const TH=new TextEncoder;function u0(t,e={}){return typeof t=="number"||typeof t=="bigint"?IH(t,e):typeof t=="boolean"?SH(t,e):Fo(t)?Vs(t,e):Of(t,e)}function SH(t,e={}){const n=new Uint8Array(1);return n[0]=Number(t),typeof e.size=="number"?(ms(n,{size:e.size}),l0(n,{size:e.size})):n}const Ea={zero:48,nine:57,A:65,F:70,a:97,f:102};function V4(t){if(t>=Ea.zero&&t<=Ea.nine)return t-Ea.zero;if(t>=Ea.A&&t<=Ea.F)return t-(Ea.A-10);if(t>=Ea.a&&t<=Ea.f)return t-(Ea.a-10)}function Vs(t,e={}){let n=t;e.size&&(ms(n,{size:e.size}),n=l0(n,{dir:"right",size:e.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,s=new Uint8Array(i);for(let a=0,l=0;a<i;a++){const u=V4(r.charCodeAt(l++)),d=V4(r.charCodeAt(l++));if(u===void 0||d===void 0)throw new Ce(`Invalid byte sequence ("${r[l-2]}${r[l-1]}" in "${r}").`);s[a]=u*16+d}return s}function IH(t,e){const n=Ue(t,e);return Vs(n)}function Of(t,e={}){const n=TH.encode(t);return typeof e.size=="number"?(ms(n,{size:e.size}),l0(n,{dir:"right",size:e.size})):n}const Ab=BigInt(2**32-1),z4=BigInt(32);function RH(t,e=!1){return e?{h:Number(t&Ab),l:Number(t>>z4&Ab)}:{h:Number(t>>z4&Ab)|0,l:Number(t&Ab)|0}}function kH(t,e=!1){const n=t.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){const{h:a,l}=RH(t[s],e);[r[s],i[s]]=[a,l]}return[r,i]}const NH=(t,e,n)=>t<<n|e>>>32-n,OH=(t,e,n)=>e<<n|t>>>32-n,BH=(t,e,n)=>e<<n-32|t>>>64-n,PH=(t,e,n)=>t<<n-32|e>>>64-n,eh=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function DH(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function pg(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function jf(t,...e){if(!DH(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function MH(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");pg(t.outputLen),pg(t.blockLen)}function Fp(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function wN(t,e){jf(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function jH(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Vp(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function GE(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function lo(t,e){return t<<32-e|t>>>e}const LH=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function UH(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function FH(t){for(let e=0;e<t.length;e++)t[e]=UH(t[e]);return t}const H4=LH?t=>t:FH;function VH(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function xv(t){return typeof t=="string"&&(t=VH(t)),jf(t),t}function zH(...t){let e=0;for(let r=0;r<t.length;r++){const i=t[r];
vendor: 4,273 bytes, line 1667
1667jf(i),e+=i.length}const n=new Uint8Array(e);for(let r=0,i=0;r<t.length;r++){const s=t[r];n.set(s,i),i+=s.length}return n}let MC=class{};function vN(t){const e=r=>t().update(xv(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function HH(t=32){if(eh&&typeof eh.getRandomValues=="function")return eh.getRandomValues(new Uint8Array(t));if(eh&&typeof eh.randomBytes=="function")return Uint8Array.from(eh.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const qH=BigInt(0),Dm=BigInt(1),$H=BigInt(2),GH=BigInt(7),QH=BigInt(256),KH=BigInt(113),AN=[],EN=[],xN=[];for(let t=0,e=Dm,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],AN.push(2*(5*r+n)),EN.push((t+1)*(t+2)/2%64);let i=qH;for(let s=0;s<7;s++)e=(e<<Dm^(e>>GH)*KH)%QH,e&$H&&(i^=Dm<<(Dm<<BigInt(s))-Dm);xN.push(i)}const CN=kH(xN,!0),WH=CN[0],YH=CN[1],q4=(t,e,n)=>n>32?BH(t,e,n):NH(t,e,n),$4=(t,e,n)=>n>32?PH(t,e,n):OH(t,e,n);function JH(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let a=0;a<10;a++)n[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const l=(a+8)%10,u=(a+2)%10,d=n[u],h=n[u+1],m=q4(d,h,1)^n[l],g=$4(d,h,1)^n[l+1];for(let w=0;w<50;w+=10)t[a+w]^=m,t[a+w+1]^=g}let i=t[2],s=t[3];for(let a=0;a<24;a++){const l=EN[a],u=q4(i,s,l),d=$4(i,s,l),h=AN[a];i=t[h],s=t[h+1],t[h]=u,t[h+1]=d}for(let a=0;a<50;a+=10){for(let l=0;l<10;l++)n[l]=t[a+l];for(let l=0;l<10;l++)t[a+l]^=~n[(l+2)%10]&n[(l+4)%10]}t[0]^=WH[r],t[1]^=YH[r]}Vp(n)}let XH=class _N extends MC{constructor(e,n,r,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=s,pg(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=jH(this.state)}clone(){return this._cloneInto()}keccak(){H4(this.state32),JH(this.state32,this.rounds),H4(this.state32),this.posOut=0,this.pos=0}update(e){Fp(this),e=xv(e),jf(e);const{blockLen:n,state:r}=this,i=e.length;for(let s=0;s<i;){const a=Math.min(n-this.pos,i-s);for(let l=0;l<a;l++)r[this.pos++]^=e[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:i}=this;e[r]^=n,(n&128)!==0&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Fp(this,!1),jf(e),this.finish();const n=this.state,{blockLen:r}=this;for(let i=0,s=e.length;i<s;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,s-i);e.set(n.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return pg(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(wN(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Vp(this.state)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:i,rounds:s,enableXOF:a}=this;return e||(e=new _N(n,r,i,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const ZH=(t,e,n)=>vN(()=>new XH(e,t,n)),eq=ZH(1,136,256/8);function hr(t,e){const n=e||"hex",r=eq(Fo(t,{strict:!1})?u0(t):t);return n==="bytes"?r:rc(r)}let jC=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}};const tq=/^0x[a-fA-F0-9]{40}$/,QE=new jC(8192);function Di(t,e){const{strict:n=!0}=e??{},r=`${t}.${n}`;if(QE.has(r))return QE.get(r);const i=tq.test(t)?t.toLowerCase()===t?!0:n?Cv(t)===t:!0:!1;return QE.set(r,i),i}const KE=new jC(8192);function Cv(t,e){if(KE.has(`${t}.${e}`))return KE.get(`${t}.${e}`);const n=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),r=hr(Of(n),"bytes"),i=(e?n.substring(`${e}0x`.length):n).split("");for(let a=0;a<40;a+=2)r[a>>
vendor: 5,138 bytes, line 1667
16671]>>4>=8&&i[a]&&(i[a]=i[a].toUpperCase()),(r[a>>1]&15)>=8&&i[a+1]&&(i[a+1]=i[a+1].toUpperCase());const s=`0x${i.join("")}`;return KE.set(`${t}.${e}`,s),s}function _n(t,e){if(!Di(t,{strict:!1}))throw new Ml({address:t});return Cv(t,e)}let G4=class extends Ce{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}},TN=class extends Ce{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}},nq=class extends Ce{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}};const rq={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new nq({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new TN({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new G4({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new G4({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function LC(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(rq);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}function zp(t,e,n,{strict:r}={}){return Fo(t,{strict:!1})?iq(t,e,n,{strict:r}):RN(t,e,n,{strict:r})}function SN(t,e){if(typeof e=="number"&&e>0&&e>fn(t)-1)throw new mN({offset:e,position:"start",size:fn(t)})}function IN(t,e,n){if(typeof e=="number"&&typeof n=="number"&&fn(t)!==n-e)throw new mN({offset:n,position:"end",size:fn(t)})}function RN(t,e,n,{strict:r}={}){SN(t,e);const i=t.slice(e,n);return r&&IN(i,e,n),i}function iq(t,e,n,{strict:r}={}){SN(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(n??t.length)*2)}`;return r&&IN(i,e,n),i}function sq(t,e={}){typeof e.size<"u"&&ms(t,{size:e.size});const n=Fn(t,e);return Vo(n,e)}function oq(t,e={}){let n=t;if(typeof e.size<"u"&&(ms(n,{size:e.size}),n=Wa(n)),n.length>1||n[0]>1)throw new wH(n);return!!n[0]}function Ya(t,e={}){typeof e.size<"u"&&ms(t,{size:e.size});const n=Fn(t,e);return zo(n,e)}function aq(t,e={}){let n=t;return typeof e.size<"u"&&(ms(n,{size:e.size}),n=Wa(n,{dir:"right"})),new TextDecoder().decode(n)}function Ho(t){return typeof t[0]=="string"?f0(t):cq(t)}function cq(t){let e=0;for(const i of t)e+=i.length;const n=new Uint8Array(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function f0(t){return`0x${t.reduce((e,n)=>e+n.replace("0x",""),"")}`}
1667const lq=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,kN=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function nd(t,e){if(t.length!==e.length)throw new lH({expectedLength:t.length,givenLength:e.length});const n=uq({params:t,values:e}),r=FC(n);return r.length===0?"0x":r}function uq({params:t,values:e}){const n=[];for(let r=0;r<t.length;r++)n.push(UC({param:t[r],value:e[r]}));return n}function UC({param:t,value:e}){const n=VC(t.type);if(n){const[r,i]=n;return dq(e,{length:r,param:{...t,type:i}})}if(t.type==="tuple")return yq(e,{param:t});if(t.type==="address")return fq(e);if(t.type==="bool")return pq(e);if(t.type.startsWith("uint")||t.type.startsWith("int")){const r=t.type.startsWith("int"),[,,i="256"]=kN.exec(t.type)??[];return mq(e,{signed:r,size:Number(i)})}if(t.type.startsWith("bytes"))return hq(e,{param:t});if(t.type==="string")return gq(e);throw new mH(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function FC(t){let e=0;for(let s=0;s<t.length;s++){const{dynamic:a,encoded:l}=t[s];a?e+=32:e+=fn(l)}const n=[],r=[];let i=0;for(let s=0;s<t.length;s++){const{dynamic:a,encoded:l}=t[s];a?(n.push(Ue(e+i,{size:32})),r.push(l),i+=fn(l)):n.push(l)}return Ho([...n,...r])}function fq(t){if(!Di(t))throw new Ml({address:t});return{dynamic:!1,encoded:Rl(t.toLowerCase())}}function dq(t,{length:e,param:n}){const r=e===null;if(!Array.isArray(t))throw new pN(t);if(!r&&t.length!==e)throw new aH({expectedLength:e,givenLength:t.length,type:`${n.type}[${e}]`});let i=!1;const s=[];for(let a=0;a<t.length;a++){const l=UC({param:n,value:t[a]});l.dynamic&&(i=!0),s.push(l)}if(r||i){const a=FC(s);if(r){const l=Ue(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?Ho([l,a]):l}}if(i)return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:Ho(s.map(({encoded:a})=>a))}}function hq(t,{param:e}){const[,n]=e.type.split("bytes"),r=fn(t);if(!n){let i=t;return r%32!==0&&(i=Rl(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Ho([Rl(Ue(r,{size:32})),i])}}if(r!==Number.parseInt(n,10))throw new cH({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:Rl(t,{dir:"right"})}}function pq(t){if(typeof t!="boolean")throw new Ce(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Rl(bN(t))}}function mq(t,{signed:e,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,i=e?-r-1n:0n;if(t>r||t<i)throw new yN({max:r.toString(),min:i.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:Ue(t,{size:32,signed:e})}}function gq(t){const e=Up(t),n=Math.ceil(fn(e)/32),r=[];for(let i=0;i<n;i++)r.push(Rl(zp(e,i*32,(i+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Ho([Rl(Ue(fn(e),{size:32})),...r])}}function yq(t,{param:e}){let n=!1;const r=[];for(let i=0;i<e.components.length;i++){const s=e.components[i],a=Array.isArray(t)?i:s.name,l=UC({param:s,value:t[a]});r.push(l),l.dynamic&&(n=!0)}return{dynamic:n,encoded:n?FC(r):Ho(r.map(({encoded:i})=>i))}}function VC(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function ky(t,e){const n=typeof e=="string"?Vs(e):e,r=LC(n);if(fn(n)===0&&t.length>0)throw new Ry;if(fn(e)&&fn(e)<32)throw new uN({data:typeof e=="string"?e:Fn(e),params:t,size:fn(e)});let i=0;const s=[];for(let a=0;a<t.length;++a){const l=t[a];r.setPosition(i);const[u,d]=Sh(r,l,{staticPosition:0});i+=d,s.push(u)}return s}function Sh(t,e,{staticPosition:n}){const r=VC(e.type);if(r){const[i,s]=r;return wq(t,{...e,type:s},{length:i,staticPosition:n})}if(e.type==="tuple")return xq(t,e,{staticPosition:n});if(e.type==="address")return bq(t);if(e.type==="bool")return vq(t);if(e.type.startsWith("bytes"))return Aq(t,e,{staticPosition:n});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Eq(t,e);if(e.type==="string")return Cq(t,{staticPosition:n});throw new gH(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Q4=32,w5=32;function bq(t){const e=t.readBytes(32);return[Cv(Fn(RN(e,-20))),32]}function wq(t,e,{length:n,staticPosition:r}){if(!n){const a=Ya(t.readBytes(w5)),l=r+a,u=l+Q4;t.setPosition(l);const d=Ya(t.readBytes(Q4)),h=mg(e);let m=0;const g=[];for(let w=0;w<d;++w){t.setPosition(u+(h?w*32:m));const[A,v]=Sh(t,e,{staticPosition:u});m+=v,g.push(A)}return t.setPosition(r+32),[g,32]}if(mg(e)){const a=Ya(t.readBytes(w5)),l=r+a,u=[];for(let d=0;d<n;++d){t.setPosition(l+d*32);const[h]=Sh(t,e,{staticPosition:l});u.push(h)}return t.setPosition(r+32),[u,32]}let i=0;const s=[];for(let a=0;a<n;++a){const[l,u]=Sh(t,e,{staticPosition:r+i});i+=u,s.push(l)}return[s,i]}function vq(t){return[oq(t.readBytes(32),{size:32}),32]}function Aq(t,e,{staticPosition:n}){const[r,i]=e.type.split("bytes");if(!i){const a=Ya(t.readBytes(32));t.setPosition(n+a);const l=Ya(t.readBytes(32));if(l===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(l);return t.setPosition(n+32),[Fn(u),32]}return[Fn(t.readBytes(Number.parseInt(i,10),32)),32]}function Eq(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),i=t.readBytes(32);return[r>48?sq(i,{signed:n}):Ya(i,{signed:n}),32]}function xq(t,e,{staticPosition:n}){const r=e.components.length===0||e.components.some(({name:a})=>!a),i=r?[]:{};let s=0;if(mg(e)){const a=Ya(t.readBytes(w5)),l=n+a;for(let u=0;u<e.components.length;++u){const d=e.components[u];t.setPosition(l+s);const[h,m]=Sh(t,d,{staticPosition:l});s+=m,i[r?u:d==null?void 0:d.name]=h}return t.setPosition(n+32),[i,32]}for(let a=0;a<e.components.length;++a){const l=e.components[a],[u,d]=Sh(t,l,{staticPosition:n});i[r?a:l==null?void 0:l.name]=u,s+=d}return[i,s]}function Cq(t,{staticPosition:e}){const n=Ya(t.readBytes(32)),r=e+n;t.setPosition(r);const i=Ya(t.readBytes(32));if(i===0)return t.setPosition(e+32),["",32];const s=t.readBytes(i,32),a=aq(Wa(s));return t.setPosition(e+32),[a,32]}function mg(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;
1667if(e==="tuple")return(r=t.components)==null?void 0:r.some(mg);const n=VC(t.type);return!!(n&&mg({...t,type:n[1]}))}const _q=t=>hr(u0(t));function Tq(t){return _q(t)}const Sq="1.1.0";let gs=class v5 extends Error{constructor(e,n={}){var a;const r=n.cause instanceof v5?n.cause.details:(a=n.cause)!=null&&a.message?n.cause.message:n.details,i=n.cause instanceof v5&&n.cause.docsPath||n.docsPath,s=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${Sq}`].join(` 1668`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}};function hc(t,e){const n=t.exec(e);return n==null?void 0:n.groups}const NN=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ON=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,BN=/^\(.+?\).*?$/,K4=/^tuple(?<array>(\[(\d*)\])*)$/;function A5(t){let e=t.type;if(K4.test(t.type)&&"components"in t){e="(";const n=t.components.length;for(let i=0;i<n;i++){const s=t.components[i];e+=A5(s),i<n-1&&(e+=", ")}const r=hc(K4,t.type);return e+=`)${(r==null?void 0:r.array)??""}`,A5({...t,type:e})}return"indexed"in t&&t.indexed&&(e=`${e}
1668 indexed`),t.name?`${e} ${t.name}`:e}function Mm(t){let e="";const n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=A5(i),r!==n-1&&(e+=", ")}return e}function Iq(t){var e;return t.type==="function"?`function ${t.name}(${Mm(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${(e=t.outputs)!=null&&e.length?` returns (${Mm(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${Mm(t.inputs)})`:t.type==="error"?`error ${t.name}(${Mm(t.inputs)})`:t.type==="constructor"?`constructor(${Mm(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?`fallback() external${t.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const PN=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Rq(t){return PN.test(t)}function kq(t){return hc(PN,t)}const DN=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Nq(t){return DN.test(t)}function Oq(t){return hc(DN,t)}const MN=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function Bq(t){return MN.test(t)}function Pq(t){return hc(MN,t)}const jN=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function LN(t){return jN.test(t)}function Dq(t){return hc(jN,t)}const UN=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function Mq(t){return UN.test(t)}function jq(t){return hc(UN,t)}const FN=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function Lq(t){return FN.test(t)}function Uq(t){return hc(FN,t)}const Fq=/^receive\(\) external payable$/;function Vq(t){return Fq.test(t)}const zq=new Set(["indexed"]),E5=new Set(["calldata","memory","storage"]);let Hq=class extends gs{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},qq=class extends gs{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}},$q=class extends gs{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},Gq=class extends gs{constructor({param:e,name:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Qq=class extends gs{constructor({param:e,type:n,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Kq=class extends gs{constructor({param:e,type:n,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Wq=class extends gs{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}},d0=class extends gs{constructor({signature:e,type:n}){super(`Invalid ${n} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Yq=class extends gs{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Jq=class extends gs{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}},Xq=class extends gs{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}},Zq=class extends gs{constructor({current:e,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}};function e$(t,e,n){let r="";if(n)for(const i of Object.entries(n)){if(!i)continue;let s="";for(const a of i[1])s+=`[${a.type}${a.name?`:${a.name}`:""}]`;r+=`(${i[0]}{${s}})`}return e?`${e}:${t}${r}`:t}const WE=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function t$(t,e={}){if(Bq(t))return n$(t,e);if(Nq(t))return r$(t,e);if(Rq(t))return i$(t,e);if(Mq(t))return s$(t,e);if(Lq(t))return o$(t);if(Vq(t))return{type:"receive",stateMutability:"payable"};throw new Yq({signature:t})}function n$(t,e={}){const n=Pq(t);if(!n)throw new d0({signature:t,type:"function"});const r=Ds(n.parameters),i=[],s=r.length;for(let l=0;l<s;l++)i.push(Lf(r[l],{modifiers:E5,structs:e,type:"function"}));const a=[];if(n.returns){const l=Ds(n.returns),u=l.length;for(let d=0;d<u;d++)a.push(Lf(l[d],{modifiers:E5,structs:e,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:i,outputs:a}}function r$(t,e={}){const n=Oq(t);if(!n)throw new d0({signature:t,type:"event"});const r=Ds(n.parameters),i=[],s=r.length;for(let a=0;a<s;
1668a++)i.push(Lf(r[a],{modifiers:zq,structs:e,type:"event"}));return{name:n.name,type:"event",inputs:i}}function i$(t,e={}){const n=kq(t);if(!n)throw new d0({signature:t,type:"error"});const r=Ds(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(Lf(r[a],{structs:e,type:"error"}));return{name:n.name,type:"error",inputs:i}}function s$(t,e={}){const n=jq(t);if(!n)throw new d0({signature:t,type:"constructor"});const r=Ds(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(Lf(r[a],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:i}}function o$(t){const e=Uq(t);if(!e)throw new d0({signature:t,type:"fallback"});return{type:"fallback",stateMutability:e.stateMutability??"nonpayable"}}const a$=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,c$=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,l$=/^u?int$/;function Lf(t,e){var m,g;const n=e$(t,e==null?void 0:e.type,e==null?void 0:e.structs);if(WE.has(n))return WE.get(n);const r=BN.test(t),i=hc(r?c$:a$,t);if(!i)throw new $q({param:t});if(i.name&&f$(i.name))throw new Gq({param:t,name:i.name});const s=i.name?{name:i.name}:{},a=i.modifier==="indexed"?{indexed:!0}:{},l=(e==null?void 0:e.structs)??{};let u,d={};if(r){u="tuple";const w=Ds(i.type),A=[],v=w.length;for(let x=0;x<v;x++)A.push(Lf(w[x],{structs:l}));d={components:A}}else if(i.type in l)u="tuple",d={components:l[i.type]};else if(l$.test(i.type))u=`${i.type}256`;else if(i.type==="address payable")u="address";else if(u=i.type,(e==null?void 0:e.type)!=="struct"&&!VN(u))throw new qq({type:u});if(i.modifier){if(!((g=(m=e==null?void 0:e.modifiers)==null?void 0:m.has)!=null&&g.call(m,i.modifier)))throw new Qq({param:t,type:e==null?void 0:e.type,modifier:i.modifier});if(E5.has(i.modifier)&&!d$(u,!!i.array))throw new Kq({param:t,type:e==null?void 0:e.type,modifier:i.modifier})}const h={type:`${u}${i.array??""}`,...s,...a,...d};return WE.set(n,h),h}function Ds(t,e=[],n="",r=0){const i=t.trim().length;for(let s=0;s<i;s++){const a=t[s],l=t.slice(s+1);switch(a){case",":return r===0?Ds(l,[...e,n.trim()]):Ds(l,e,`${n}${a}`,r);case"(":return Ds(l,e,`${n}${a}`,r+1);case")":return Ds(l,e,`${n}${a}`,r-1);default:return Ds(l,e,`${n}${a}`,r)}}if(n==="")return e;if(r!==0)throw new Zq({current:n,depth:r});return e.push(n.trim()),e}function VN(t){return t==="address"||t==="bool"||t==="function"||t==="string"||NN.test(t)||ON.test(t)}const u$=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function f$(t){return t==="address"||t==="bool"||t==="function"||t==="string"||t==="tuple"||NN.test(t)||ON.test(t)||u$.test(t)}function d$(t,e){return e||t==="bytes"||t==="string"||t==="tuple"}function h$(t){const e={},n=t.length;for(let a=0;a<n;a++){const l=t[a];if(!LN(l))continue;const u=Dq(l);if(!u)throw new d0({signature:l,type:"struct"});const d=u.properties.split(";"),h=[],m=d.length;for(let g=0;g<m;g++){const A=d[g].trim();if(!A)continue;const v=Lf(A,{type:"struct"});h.push(v)}if(!h.length)throw new Jq({signature:l});e[u.name]=h}const r={},i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,u]=i[a];r[l]=zN(u,e)}return r}const p$=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function zN(t,e,n=new Set){const r=[],i=t.length;for(let s=0;s<i;s++){const a=t[s];if(BN.test(a.type))r.push(a);else{const u=hc(p$,a.type);if(!(u!=null&&u.type))throw new Wq({abiParameter:a});const{array:d,type:h}=u;if(h in e){if(n.has(h))throw new Xq({type:h});r.push({...a,type:`tuple${d??""}`,components:zN(e[h]??[],e,new Set([...n,h]))})}else if(VN(h))r.push(a);else throw new Hq({type:h})}}return r}function HN(t){const e=h$(t),n=[],r=t.length;for(let i=0;i<r;i++){const s=t[i];LN(s)||n.push(t$(s,e))}return n}function m$(t){let e=!0,n="",r=0,i="",s=!1;for(let a=0;a<t.length;a++){const l=t[a];if(["(",")",","].includes(l)&&(e=!0),l==="("&&r++,l===")"&&r--,!!e){if(r===0){if(l===" "&&["event","function",""].includes(i))i="";else if(i+=l,l===")"){s=!0;break}continue}if(l===" "){t[a-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}i+=l,n+=l}}if(!s)throw new Ce("Unable to normalize signature.");return i}const g$=t=>{const e=typeof t=="string"?t:Iq(t);return m$(e)};function qN(t){return Tq(g$(t))}const _v=qN,Ny=t=>zp(qN(t),0,4);function rd(t){const{abi:e,args:n=[],name:r}=t,i=Fo(r,{strict:!1}),s=e.filter(l=>i?l.type==="function"?Ny(l)===r:l.type==="event"?_v(l)===r:!1:"name"in l&&l.name===r);if(s.length===0)return;if(s.length===1)return s[0];let a;for(const l of s){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return l;continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,h)=>
1668{const m="inputs"in l&&l.inputs[h];return m?x5(d,m):!1})){if(a&&"inputs"in a&&a.inputs){const d=$N(l.inputs,a.inputs,n);if(d)throw new hH({abiItem:l,type:d[0]},{abiItem:a,type:d[1]})}a=l}}return a||s[0]}function x5(t,e){const n=typeof t,r=e.type;switch(r){case"address":return Di(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>x5(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(t)&&t.every(i=>x5(i,{...e,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function $N(t,e,n){for(const r in t){const i=t[r],s=e[r];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return $N(i.components,s.components,n[r]);const a=[i.type,s.type];if(a.includes("address")&&a.includes("bytes20")?!0:a.includes("address")&&a.includes("string")?Di(n[r],{strict:!1}):a.includes("address")&&a.includes("bytes")?Di(n[r],{strict:!1}):!1)return a}}const YE="/docs/contract/decodeFunctionResult";function id(t){const{abi:e,args:n,functionName:r,data:i}=t;let s=e[0];if(r){const l=rd({abi:e,args:n,name:r});if(!l)throw new Lp(r,{docsPath:YE});s=l}if(s.type!=="function")throw new Lp(void 0,{docsPath:YE});if(!s.outputs)throw new hN(s.name,{docsPath:YE});const a=ky(s.outputs,i);if(a&&a.length>1)return a;if(a&&a.length===1)return a[0]}const W4="/docs/contract/encodeFunctionData";function y$(t){const{abi:e,args:n,functionName:r}=t;let i=e[0];if(r){const s=rd({abi:e,args:n,name:r});if(!s)throw new Lp(r,{docsPath:W4});i=s}if(i.type!=="function")throw new Lp(void 0,{docsPath:W4});return{abi:[i],functionName:Ny(Fs(i))}}function $s(t){const{args:e}=t,{abi:n,functionName:r}=(()=>{var l;return t.abi.length===1&&((l=t.functionName)!=null&&l.startsWith("0x"))?t:y$(t)})(),i=n[0],s=r,a="inputs"in i&&i.inputs?nd(i.inputs,e??[]):void 0;return f0([s,a??"0x"])}class C5 extends Ce{constructor({blockNumber:e,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class GN extends Ce{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}function h0({blockNumber:t,chain:e,contract:n}){var i;const r=(i=e==null?void 0:e.contracts)==null?void 0:i[n];if(!r)throw new C5({chain:e,contract:{name:n}});if(t&&r.blockCreated&&r.blockCreated>t)throw new C5({blockNumber:t,chain:e,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function ji(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}const b$={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},QN={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},w$={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function v$(t){const{abi:e,data:n}=t,r=zp(n,0,4);if(r==="0x")throw new Ry;const s=[...e||[],QN,w$].find(a=>a.type==="error"&&r===Ny(Fs(a)));if(!s)throw new fN(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?ky(s.inputs,zp(n,4)):void 0,errorName:s.name}}const pr=(t,e,n)=>JSON.stringify(t,(r,i)=>typeof i=="bigint"?i.toString():i,n);function KN({abiItem:t,args:e,includeFunctionName:n=!0,includeName:r=!1}
1668){if("name"in t&&"inputs"in t&&t.inputs)return`${n?t.name:""}(${t.inputs.map((i,s)=>`${r&&i.name?`${i.name}: `:""}${typeof e[s]=="object"?pr(e[s]):e[s]}`).join(", ")})`}const A$={gwei:9,wei:18},E$={ether:-9,wei:9},x$={ether:-18,gwei:-9};function Tv(t,e){let n=t.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(e,"0");let[i,s]=[n.slice(0,n.length-e),n.slice(n.length-e)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${s?`.${s}`:""}`}function WN(t,e="wei"){return Tv(t,A$[e])}function Ls(t,e="wei"){return Tv(t,E$[e])}class C$ extends Ce{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class _$ extends Ce{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Y4(t){return t.reduce((e,{slot:n,value:r})=>`${e} ${n}: ${r} 1669`,"")}function T$(t){return t.reduce((e,{address:n,...r})=>{let i=`${e} ${n}: 1670`;return r.nonce&&(i+=` nonce: ${r.nonce} 1671`),r.balance&&(i+=` balance: ${r.balance} 1672`),r.code&&(i+=` code: ${r.code} 1673`),r.state&&(i+=` state: 1674`,i+=Y4(r.state)),r.stateDiff&&(i+=` stateDiff: 1675`,i+=Y4(r.stateDiff)),i},` State Override: 1676`).slice(0,-1)}function Sv(t){const e=Object.entries(t).map(([r,i])=>i===void 0||i===!1?null:[r,i]).filter(Boolean),n=e.reduce((r,[i])=>Math.max(r,i.length),0);return e.map(([r,i])=>` ${`${r}:`.padEnd(n+1)} ${i}`).join(` 1677`)}class S$ extends Ce{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` 1678`),{name:"FeeConflictError"})}}class I$ extends Ce{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Sv(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class YN extends Ce{constructor({blockHash:e,blockNumber:n,blockTag:r,hash:i,index:s}){let a="Transaction";r&&s!==void 0&&(a=`Transaction at block time "${r}" at index "${s}"`),e&&s!==void 0&&(a=`Transaction at block hash "${e}" at index "${s}"`),n&&s!==void 0&&(a=`Transaction at block number "${n}" at index "${s}"`),i&&(a=`Transaction with hash "${i}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}class JN extends Ce{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class R$ extends Ce{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const k$=t=>t,zC=t=>t;class XN extends Ce{constructor(e,{account:n,docsPath:r,chain:i,data:s,gas:a,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:m,value:g,stateOverride:w}){var x;const A=n?ji(n):void 0;let v=Sv({from:A==null?void 0:A.address,to:m,value:typeof g<"u"&&`${WN(g)} ${((x=i==null?void 0:i.nativeCurrency)==null?void 0:x.symbol)||"ETH"}`,data:s,gas:a,gasPrice:typeof l<"u"&&`${Ls(l)} gwei`,maxFeePerGas:typeof u<"u"&&`${Ls(u)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${Ls(d)} gwei`,nonce:h});w&&(v+=` 1679${T$(w)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(
1679Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class HC extends Ce{constructor(e,{abi:n,args:r,contractAddress:i,docsPath:s,functionName:a,sender:l}){const u=rd({abi:n,args:r,name:a}),d=u?KN({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,h=u?Fs(u,{includeName:!0}):void 0,m=Sv({address:i&&k$(i),function:h,args:d&&d!=="()"&&`${[...Array((a==null?void 0:a.length)??0).keys()].map(()=>" ").join("")}${d}`,sender:l});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],m&&"Contract Call:",m].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=e,this.contractAddress=i,this.functionName=a,this.sender=l}}class _5 extends Ce{constructor({abi:e,data:n,functionName:r,message:i}){let s,a,l,u;if(n&&n!=="0x")try{a=v$({abi:e,data:n});const{abiItem:h,errorName:m,args:g}=a;if(m==="Error")u=g[0];else if(m==="Panic"){const[w]=g;u=b$[w]}else{const w=h?Fs(h,{includeName:!0}):void 0,A=h&&g?KN({abiItem:h,args:g,includeFunctionName:!1,includeName:!1}):void 0;l=[w?`Error: ${w}`:"",A&&A!=="()"?` ${[...Array((m==null?void 0:m.length)??0).keys()].map(()=>" ").join("")}${A}`:""]}}catch(h){s=h}else i&&(u=i);let d;s instanceof fN&&(d=s.signature,l=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(u&&u!=="execution reverted"||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,u||d].join(` 1680`):`The contract function "${r}" reverted.`,{cause:s,metaMessages:l,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a,this.raw=n,this.reason=u,this.signature=d}}class N$ extends Ce{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class O$ extends Ce{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class Iv extends Ce{constructor({data:e,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}function qC(t){var n,r,i,s,a,l;if(!(t instanceof Ce))return!1;const e=t.walk(u=>u instanceof _5);return e instanceof _5?((n=e.data)==null?void 0:n.errorName)==="HttpError"||((r=e.data)==null?void 0:r.errorName)==="ResolverError"||((i=e.data)==null?void 0:i.errorName)==="ResolverNotContract"||((s=e.data)==null?void 0:s.errorName)==="ResolverNotFound"||((a=e.data)==null?void 0:a.errorName)==="ReverseAddressMismatch"||((l=e.data)==null?void 0:l.errorName)==="UnsupportedResolverProfile":!1}function B$(t){const{abi:e,data:n}=t,r=zp(n,0,4),i=e.find(s=>
vendor: 10,486 bytes, lines 1680-1682
1680s.type==="function"&&r===Ny(Fs(s)));if(!i)throw new dH(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:i.name,args:"inputs"in i&&i.inputs&&i.inputs.length>0?ky(i.inputs,zp(n,4)):void 0}}const JE="/docs/contract/encodeErrorResult";function J4(t){const{abi:e,errorName:n,args:r}=t;let i=e[0];if(n){const u=rd({abi:e,args:r,name:n});if(!u)throw new L4(n,{docsPath:JE});i=u}if(i.type!=="error")throw new L4(void 0,{docsPath:JE});const s=Fs(i),a=Ny(s);let l="0x";if(r&&r.length>0){if(!i.inputs)throw new uH(i.name,{docsPath:JE});l=nd(i.inputs,r)}return f0([a,l])}const XE="/docs/contract/encodeFunctionResult";function P$(t){const{abi:e,functionName:n,result:r}=t;let i=e[0];if(n){const a=rd({abi:e,name:n});if(!a)throw new Lp(n,{docsPath:XE});i=a}if(i.type!=="function")throw new Lp(void 0,{docsPath:XE});if(!i.outputs)throw new hN(i.name,{docsPath:XE});const s=(()=>{if(i.outputs.length===0)return[];if(i.outputs.length===1)return[r];if(Array.isArray(r))return r;throw new pN(r)})();return nd(i.outputs,s)}const Rv="x-batch-gateway:true";async function D$(t){const{data:e,ccipRequest:n}=t,{args:[r]}=B$({abi:y5,data:e}),i=[],s=[];return await Promise.all(r.map(async(a,l)=>{try{s[l]=a.urls.includes(Rv)?await D$({data:a.data,ccipRequest:n}):await n(a),i[l]=!1}catch(u){i[l]=!0,s[l]=M$(u)}})),P$({abi:y5,functionName:"query",result:[i,s]})}function M$(t){return t.name==="HttpRequestError"&&t.status?J4({abi:y5,errorName:"HttpError",args:[t.status,t.shortMessage]}):J4({abi:[QN],errorName:"Error",args:["shortMessage"in t?t.shortMessage:t.message]})}function ZN(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Fo(e)?e:null}function T5(t){let e=new Uint8Array(32).fill(0);if(!t)return Fn(e);const n=t.split(".");for(let r=n.length-1;r>=0;r-=1){const i=ZN(n[r]),s=i?u0(i):hr(Of(n[r]),"bytes");e=hr(Ho([e,s]),"bytes")}return Fn(e)}function j$(t){return`[${t.slice(2)}]`}function L$(t){const e=new Uint8Array(32).fill(0);return t?ZN(t)||hr(Of(t)):Fn(e)}function $C(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const n=new Uint8Array(Of(e).byteLength+2);let r=0;const i=e.split(".");for(let s=0;s<i.length;s++){let a=Of(i[s]);a.byteLength>255&&(a=Of(j$(L$(i[s])))),n[r]=a.length,n.set(a,r+1),r+=a.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}function Je(t,e,n){const r=t[e.name];if(typeof r=="function")return r;const i=t[n];return typeof i=="function"?i:s=>e(t,s)}class rg extends Ce{constructor({body:e,cause:n,details:r,headers:i,status:s,url:a}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${zC(a)}`,e&&`Request body: ${pr(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=a}}class GC extends Ce{constructor({body:e,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${zC(r)}`,`Request body: ${pr(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data}}class X4 extends Ce{constructor({body:e,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${zC(n)}`,`Request body: ${pr(e)}`],name:"TimeoutError"})}}const U$=-1;class hi extends Ce{constructor(e,{code:n,docsPath:r,metaMessages:i,name:s,shortMessage:a}){super(a,{cause:e,docsPath:r,metaMessages:i||(e==null?void 0:e.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof GC?e.code:n??U$}}class Li extends hi{constructor(e,n){super(e,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class gg extends hi{constructor(e){super(e,{code:gg.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(gg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class yg extends hi{constructor(e){super(e,{code:yg.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(yg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class bg extends hi{constructor(e,{method:n}={}){super(e,{code:bg.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(bg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class wg extends hi{constructor(e){super(e,{code:wg.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` 1681`)})}}Object.defineProperty(wg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Uf extends hi{constructor(e){super(e,{code:Uf.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Uf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Ff extends hi{constructor(e){super(e,{code:Ff.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` 1682`)})}}Object.defineProperty(Ff,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class vg extends hi{constructor(e){super(e,{code:vg.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(vg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Oo extends hi{constructor(e){super(e,{code:Oo.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Oo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ag extends hi{constructor(e){super(e,{code:Ag.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ag,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Gu extends hi{constructor(e,{method:n}={}){super(e,{code:Gu.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Gu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Hp extends hi{constructor(e){super(e,{code:Hp.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Hp,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Eg extends hi{constructor(e){super(e,{code:Eg.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Eg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Nt extends Li{constructor(e){super(e,{code:Nt.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Nt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class xg extends Li{constructor(e){super(e,{code:xg.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(xg,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Cg extends Li{constructor(e,{method:n}={}){super(e,{code:Cg.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(Cg,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class _g extends Li{constructor(e){super(e,{code:_g.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(_g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Tg extends Li{constructor(e){super(e,{code:Tg.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Tg,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class $r extends Li{constructor(e){super(e,{code:$r.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty($r,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Sg extends Li{constructor(e){super(e,{code:Sg.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Sg,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Ig extends Li{constructor(e){super(e,{code:Ig.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Ig,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class Rg extends Li{constructor(e){super(e,{code:Rg.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(Rg,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class kg extends Li{constructor(e){super(e,{code:kg.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(kg,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Ng extends Li{constructor(e){super(e,{code:Ng.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Ng,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Og extends Li{constructor(e){super(e,{code:Og.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Og,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
1682);class Bg extends Li{constructor(e){super(e,{code:Bg.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Bg,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class F$ extends hi{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const V$=3;function qp(t,{abi:e,address:n,args:r,docsPath:i,functionName:s,sender:a}){const l=t instanceof Iv?t:t instanceof Ce?t.walk(A=>"data"in A)||t.walk():{},{code:u,data:d,details:h,message:m,shortMessage:g}=l,w=t instanceof Ry?new N$({functionName:s}):[V$,Uf.code].includes(u)&&(d||h||m||g)?new _5({abi:e,data:typeof d=="object"?d.data:d,functionName:s,message:l instanceof GC?h:g??m}):t;return new HC(w,{abi:e,args:r,contractAddress:n,docsPath:i,functionName:s,sender:a})}const z$="0.1.1";function H$(){return z$}let At=class S5 extends Error{constructor(e,n={}){const r=(()=>{var u;if(n.cause instanceof S5){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(u=n.cause)!=null&&u.message?n.cause.message:n.details})(),i=n.cause instanceof S5&&n.cause.docsPath||n.docsPath,a=`https://oxlib.sh${i??""}`,l=[e||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${a}`:void 0]:[]].filter(u=>typeof u=="string").join(` 1683`);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${H$()}`}),this.cause=n.cause,this.details=r,this.docs=a,this.docsPath=i,this.shortMessage=e}walk(e){return eO(this,e)}};function eO(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?eO(t.cause,e):e?null:t}function Oy(t,e){if(bh(t)>e)throw new oG({givenSize:bh(t),maxSize:e})}const xa={zero:48,nine:57,A:65,F:70,a:97,f:102};function Z4(t){if(t>=xa.zero&&t<=xa.nine)return t-xa.zero;if(t>=xa.A&&t<=xa.F)return t-(xa.A-10);if(t>=xa.a&&t<=xa.f)return t-(xa.a-10)}function q$(t,e={}){const{dir:n,size:r=32}=e;if(r===0)return t;if(t.length>r)throw new aG({size:t.length,targetSize:r,type:"Bytes"});const i=new Uint8Array(r);for(let s=0;s<r;s++){const a=n==="right";i[a?s:r-s-1]=t[a?s:t.length-s-1]}return i}function tO(t,e={}){const{dir:n="left"}=e;let r=t,i=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)i++;return r=n==="left"?r.slice(i):r.slice(0,r.length-i),r}function kv(t,e){if(Mi(t)>e)throw new hG({givenSize:Mi(t),maxSize:e})}function $$(t,e){if(typeof e=="number"&&e>0&&e>Mi(t)-1)throw new uO({offset:e,position:"start",size:Mi(t)})}function G$(t,e,n){if(typeof e=="number"&&typeof n=="number"&&Mi(t)!==n-e)throw new uO({offset:n,position:"end",size:Mi(t)})}function nO(t,e={}){const{dir:n,size:r=32}=e;if(r===0)return t;const i=t.replace("0x","");if(i.length>r*2)throw new pG({size:Math.ceil(i.length/2),targetSize:r,type:"Hex"});return`0x${i[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const Q$="#__bigint";function rO(t,e,n){return JSON.stringify(t,(r,i)=>typeof i=="bigint"?i.toString()+Q$:i,n)}const K$=new TextDecoder,W$=new TextEncoder;function Y$(t){return t instanceof Uint8Array?t:typeof t=="string"?iO(t):J$(t)}function J$(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function iO(t,e={}){const{size:n}=e;let r=t;n&&(kv(t,n),r=zf(t,n));let i=r.slice(2);i.length%2&&(i=`0${i}`);const s=i.length/2,a=new Uint8Array(s);for(let l=0,u=0;l<s;l++){const d=Z4(i.charCodeAt(u++)),h=Z4(i.charCodeAt(u++));if(d===void 0||h===void 0)throw new At(`Invalid byte sequence ("${i[u-2]}${i[u-1]}" in "${i}").`);a[l]=d*16+h}return a}
1683function X$(t,e={}){const{size:n}=e,r=W$.encode(t);return typeof n=="number"?(Oy(r,n),Z$(r,n)):r}function Z$(t,e){return q$(t,{dir:"right",size:e})}function bh(t){return t.length}function eG(t,e,n,r={}){const{strict:i}=r;return t.slice(e,n)}function tG(t,e={}){const{size:n}=e;typeof n<"u"&&Oy(t,n);const r=Hs(t,e);return aO(r,e)}function nG(t,e={}){const{size:n}=e;let r=t;if(typeof n<"u"&&(Oy(r,n),r=sO(r)),r.length>1||r[0]>1)throw new sG(r);return!!r[0]}function Ja(t,e={}){const{size:n}=e;typeof n<"u"&&Oy(t,n);const r=Hs(t,e);return cO(r,e)}function rG(t,e={}){const{size:n}=e;let r=t;return typeof n<"u"&&(Oy(r,n),r=iG(r)),K$.decode(r)}function sO(t){return tO(t,{dir:"left"})}function iG(t){return tO(t,{dir:"right"})}class sG extends At{constructor(e){super(`Bytes value \`${e}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let oG=class extends At{constructor({givenSize:e,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},aG=class extends At{constructor({size:e,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const cG=new TextEncoder,lG=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function uG(t,e={}){const{strict:n=!1}=e;if(!t)throw new eI(t);if(typeof t!="string")throw new eI(t);if(n&&!/^0x[0-9a-fA-F]*$/.test(t))throw new tI(t);if(!t.startsWith("0x"))throw new tI(t)}function zs(...t){return`0x${t.reduce((e,n)=>e+n.replace("0x",""),"")}`}function fG(t){return t instanceof Uint8Array?Hs(t):Array.isArray(t)?Hs(new Uint8Array(t)):t}function oO(t,e={}){const n=`0x${Number(t)}`;return typeof e.size=="number"?(kv(n,e.size),Vf(n,e.size)):n}function Hs(t,e={}){let n="";for(let i=0;i<t.length;i++)n+=lG[t[i]];const r=`0x${n}`;return typeof e.size=="number"?(kv(r,e.size),zf(r,e.size)):r}function Fr(t,e={}){const{signed:n,size:r}=e,i=BigInt(t);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof s=="bigint"&&n?-s-1n:0;if(s&&i>s||i<a){const d=typeof t=="bigint"?"n":"";throw new lO({max:s?`${s}${d}`:void 0,min:`${a}${d}`,signed:n,size:r,value:`${t}${d}`})}const u=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?Vf(u,r):u}function QC(t,e={}){return Hs(cG.encode(t),e)}function Vf(t,e){return nO(t,{dir:"left",size:e})}function zf(t,e){return nO(t,{dir:"right",size:e})}function Bo(t,e,n,r={}){const{strict:i}=r;$$(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(n??t.length)*2)}`;return i&&G$(s,e,n),s}function Mi(t){return Math.ceil((t.length-2)/2)}function aO(t,e={}){const{signed:n}=e;e.size&&kv(t,e.size);const r=BigInt(t);if(!n)return r;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n)-1n,a=s>>1n;return r<=a?r:r-s-1n}function cO(t,e={}){const{signed:n,size:r}=e;return Number(!n&&!r?t:aO(t,e))}function dG(t,e={}){const{strict:n=!1}=e;try{return uG(t,{strict:n}),!0}catch{return!1}}class lO extends At{constructor({max:e,min:n,signed:r,size:i,value:s}){super(`Number \`${s}\` is not in safe${i?` ${i*8}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${n}\` to \`${e}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class eI extends At{constructor(e){super(`Value \`${typeof e=="object"?rO(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class tI extends At{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class hG extends At{constructor({givenSize:e,maxSize:n}
1683){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class uO extends At{constructor({offset:e,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class pG extends At{constructor({size:e,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function mG(t){return{address:t.address,amount:Fr(t.amount),index:Fr(t.index),validatorIndex:Fr(t.validatorIndex)}}function fO(t){return{...typeof t.baseFeePerGas=="bigint"&&{baseFeePerGas:Fr(t.baseFeePerGas)},...typeof t.blobBaseFee=="bigint"&&{blobBaseFee:Fr(t.blobBaseFee)},...typeof t.feeRecipient=="string"&&{feeRecipient:t.feeRecipient},...typeof t.gasLimit=="bigint"&&{gasLimit:Fr(t.gasLimit)},...typeof t.number=="bigint"&&{number:Fr(t.number)},...typeof t.prevRandao=="bigint"&&{prevRandao:Fr(t.prevRandao)},...typeof t.time=="bigint"&&{time:Fr(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(mG)}}}const gG="0x82ad56cb",dO="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",yG="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",bG
vendor: 3,374 bytes, line 1683
1683="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",
1683KC="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
1683150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ZE="/docs/contract/encodeDeployData";function WC(t){const{abi:e,args:n,bytecode:r}=t;if(!n||n.length===0)return r;const i=e.find(a=>"type"in a&&a.type==="constructor");if(!i)throw new oH({docsPath:ZE});if(!("inputs"in i))throw new j4({docsPath:ZE});if(!i.inputs||i.inputs.length===0)throw new j4({docsPath:ZE});const s=nd(i.inputs,n);return f0([r,s])}class wh extends Ce{constructor({cause:e,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(wh,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(wh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Aw extends Ce{constructor({cause:e,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ls(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Aw,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class I5 extends Ce{constructor({cause:e,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ls(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(I5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class R5 extends Ce{constructor({cause:e,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(R5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class k5 extends Ce{constructor({cause:e,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` 1684`),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(k5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class N5 extends Ce{constructor({cause:e,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(N5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class O5 extends Ce{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` 1685`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(O5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class B5 extends Ce{constructor({cause:e,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(B5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class P5 extends Ce{constructor({cause:e,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(P5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class D5 extends Ce{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(D5,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ew extends Ce{constructor({cause:e,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Ls(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Ls(r)} gwei`:""}).`].join(` 1686`),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ew,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Nv extends Ce{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function YC(t,e){const n=(t.details||"").toLowerCase(),r=t instanceof Ce?t.walk(i=>(i==null?void 0:i.code)===wh.code):t;return r instanceof Ce?new wh({cause:t,message:r.details}):wh.nodeMessage.test(n)?new wh({cause:t,message:t.details}):Aw.nodeMessage.test(n)?new Aw({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):I5.nodeMessage.test(n)?new I5({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):R5.nodeMessage.test(n)?new R5({cause:t,nonce:e==null?void 0:e.nonce}):k5.nodeMessage.test(n)?new k5({cause:t,nonce:e==null?void 0:e.nonce}):N5.nodeMessage.test(n)?new N5({cause:t,nonce:e==null?void 0:e.nonce}):O5.nodeMessage.test(n)?new O5({cause:t}):B5.nodeMessage.test(n)?new B5({cause:t,gas:e==null?void 0:e.gas}):P5.nodeMessage.test(n)?new P5({cause:t,gas:e==null?void 0:e.gas}):D5.nodeMessage.test(n)?new D5({cause:t}):Ew.nodeMessage.test(n)?new Ew({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new Nv({cause:t})}function hO(t,{docsPath:e,...n}){const r=(()=>
1686{const i=YC(t,n);return i instanceof Nv?t:i})();return new XN(r,{docsPath:e,...n})}function JC(t,{format:e}){if(!e)return{};const n={};function r(s){const a=Object.keys(s);for(const l of a)l in t&&(n[l]=t[l]),s[l]&&typeof s[l]=="object"&&!Array.isArray(s[l])&&r(s[l])}const i=e(t||{});return r(i),n}const wG={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Ov(t){const e={};return typeof t.authorizationList<"u"&&(e.authorizationList=vG(t.authorizationList)),typeof t.accessList<"u"&&(e.accessList=t.accessList),typeof t.blobVersionedHashes<"u"&&(e.blobVersionedHashes=t.blobVersionedHashes),typeof t.blobs<"u"&&(typeof t.blobs[0]!="string"?e.blobs=t.blobs.map(n=>Fn(n)):e.blobs=t.blobs),typeof t.data<"u"&&(e.data=t.data),typeof t.from<"u"&&(e.from=t.from),typeof t.gas<"u"&&(e.gas=Ue(t.gas)),typeof t.gasPrice<"u"&&(e.gasPrice=Ue(t.gasPrice)),typeof t.maxFeePerBlobGas<"u"&&(e.maxFeePerBlobGas=Ue(t.maxFeePerBlobGas)),typeof t.maxFeePerGas<"u"&&(e.maxFeePerGas=Ue(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<"u"&&(e.maxPriorityFeePerGas=Ue(t.maxPriorityFeePerGas)),typeof t.nonce<"u"&&(e.nonce=Ue(t.nonce)),typeof t.to<"u"&&(e.to=t.to),typeof t.type<"u"&&(e.type=wG[t.type]),typeof t.value<"u"&&(e.value=Ue(t.value)),e}function vG(t){return t.map(e=>({address:e.address,r:e.r?Ue(BigInt(e.r)):e.r,s:e.s?Ue(BigInt(e.s)):e.s,chainId:Ue(e.chainId),nonce:Ue(e.nonce),...typeof e.yParity<"u"?{yParity:Ue(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:Ue(e.v)}:{}}))}function pO(){let t=()=>{},e=()=>{};return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}const e3=new Map;function mO({fn:t,id:e,shouldSplitBatch:n,wait:r=0,sort:i}){const s=async()=>{const h=u();a();const m=h.map(({args:g})=>g);m.length!==0&&t(m).then(g=>{i&&Array.isArray(g)&&g.sort(i);for(let w=0;w<h.length;w++){const{resolve:A}=h[w];A==null||A([g[w],g])}}).catch(g=>{for(let w=0;w<h.length;w++){const{reject:A}=h[w];A==null||A(g)}})},a=()=>e3.delete(e),l=()=>u().map(({args:h})=>h),u=()=>e3.get(e)||[],d=h=>e3.set(e,[...u(),h]);return{flush:a,async schedule(h){const{promise:m,resolve:g,reject:w}=pO();return(n==null?void 0:n([...l(),h]))&&s(),u().length>0?(d({args:h,resolve:g,reject:w}),m):(d({args:h,resolve:g,reject:w}),setTimeout(s,r),m)}}}function nI(t){if(!(!t||t.length===0))return t.reduce((e,{slot:n,value:r})=>{if(n.length!==66)throw new F4({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new F4({size:r.length,targetSize:66,type:"hex"});return e[n]=r,e},{})}function AG(t){const{balance:e,nonce:n,state:r,stateDiff:i,code:s}=t,a={};if(s!==void 0&&(a.code=s),e!==void 0&&(a.balance=Ue(e)),n!==void 0&&(a.nonce=Ue(n)),r!==void 0&&(a.state=nI(r)),i!==void 0){if(a.state)throw new _$;a.stateDiff=nI(i)}return a}function XC(t){if(!t)return;const e={};for(const{address:n,...r}of t){if(!Di(n,{strict:!1}))throw new Ml({address:n});if(e[n])throw new C$({address:n});e[n]=AG(r)}return e}const EG=2n**256n-1n;function By(t){const{account:e,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:s}=t,a=e?ji(e):void 0;if(a&&!Di(a.address))throw new Ml({address:a.address});if(s&&!Di(s))throw new Ml({address:s});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new S$;if(r&&r>EG)throw new Aw({maxFeePerGas:r});if(i&&r&&i>r)throw new Ew({maxFeePerGas:r,maxPriorityFeePerGas:i})}async function Bv(t,e){var L,Se,X,Q;const{account:n=t.account,authorizationList:r,batch:i=!!((L=t.batch)!=null&&L.multicall),blockNumber:s,blockTag:a=t.experimental_blockTag??"latest",accessList:l,blobs:u,blockOverrides:d,code:h,data:m,factory:g,factoryData:w,gas:A,gasPrice:v,maxFeePerBlobGas:x,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:k,to:P,value:B,stateOverride:U,...I}=e,R=n?ji(n):void 0;if(h&&(g||w))throw new Ce("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(h&&P)throw new Ce("Cannot provide both `code` & `to` as parameters.");const M=h&&m,F=g&&w&&P&&m,j=M||F,q=M?gO({code:h,data:m}):F?_G({data:m,factory:g,factoryData:w,to:P}):m;try{By(e);const J=(typeof s=="bigint"?Ue(s):void 0)||a,fe=d?fO(d):void 0,$=XC(U),se=(Q=(X=(Se=t.chain)==null?void 0:Se.formatters)==null?void 0:X.transactionRequest)==null?void 0:Q.format,pe=(se||Ov)({...JC(I,{format:se}),from:R==null?void 0:R.address,accessList:l,authorizationList:r,blobs:u,data:q,gas:A,gasPrice:v,maxFeePerBlobGas:x,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:k,to:j?void 0:P,value:
1686B});if(i&&xG({request:pe})&&!$&&!fe)try{return await CG(t,{...pe,blockNumber:s,blockTag:a})}catch(_e){if(!(_e instanceof GN)&&!(_e instanceof C5))throw _e}const me=(()=>{const _e=[pe,J];return $&&fe?[..._e,$,fe]:$?[..._e,$]:fe?[..._e,{},fe]:_e})(),ve=await t.request({method:"eth_call",params:me});return ve==="0x"?{data:void 0}:{data:ve}}catch(te){const J=TG(te),{offchainLookup:fe,offchainLookupSignature:$}=await Te(async()=>{const{offchainLookup:se,offchainLookupSignature:ye}=await import("./ccip-BSwjMMRQ.js");return{offchainLookup:se,offchainLookupSignature:ye}},[]);if(t.ccipRead!==!1&&(J==null?void 0:J.slice(0,10))===$&&P)return{data:await fe(t,{data:J,to:P})};throw j&&(J==null?void 0:J.slice(0,10))==="0x101bb98d"?new O$({factory:g}):hO(te,{...e,account:R,chain:t.chain})}}function xG({request:t}){const{data:e,to:n,...r}=t;return!(!e||e.startsWith(gG)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function CG(t,e){var v;const{batchSize:n=1024,deployless:r=!1,wait:i=0}=typeof((v=t.batch)==null?void 0:v.multicall)=="object"?t.batch.multicall:{},{blockNumber:s,blockTag:a=t.experimental_blockTag??"latest",data:l,to:u}=e,d=(()=>{if(r)return null;if(e.multicallAddress)return e.multicallAddress;if(t.chain)return h0({blockNumber:s,chain:t.chain,contract:"multicall3"});throw new GN})(),m=(typeof s=="bigint"?Ue(s):void 0)||a,{schedule:g}=mO({id:`${t.uid}.${m}`,wait:i,shouldSplitBatch(x){return x.reduce((O,{data:k})=>O+(k.length-2),0)>n*2},fn:async x=>{const T=x.map(P=>({allowFailure:!0,callData:P.data,target:P.to})),O=$s({abi:vw,args:[T],functionName:"aggregate3"}),k=await t.request({method:"eth_call",params:[{...d===null?{data:gO({code:KC,data:O})}:{to:d,data:O}},m]});return id({abi:vw,args:[T],functionName:"aggregate3",data:k||"0x"})}}),[{returnData:w,success:A}]=await g({data:l,to:u});if(!A)throw new Iv({data:w});return w==="0x"?{data:void 0}:{data:w}}function gO(t){const{code:e,data:n}=t;return WC({abi:HN(["constructor(bytes, bytes)"]),bytecode:dO,args:[e,n]})}function _G(t){const{data:e,factory:n,factoryData:r,to:i}=t;return WC({abi:HN(["constructor(address, bytes, address, bytes)"]),bytecode:yG,args:[i,e,n,r]})}function TG(t){var n;if(!(t instanceof Ce))return;const e=t.walk();return typeof(e==null?void 0:e.data)=="object"?(n=e.data)==null?void 0:n.data:e.data}async function ps(t,e){const{abi:n,address:r,args:i,functionName:s,...a}=e,l=$s({abi:n,args:i,functionName:s});try{const{data:u}=await Je(t,Bv,"call")({...a,data:l,to:r});return id({abi:n,args:i,functionName:s,data:u||"0x"})}catch(u){throw qp(u,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:s})}}async function SG(t,e){const{blockNumber:n,blockTag:r,coinType:i,name:s,gatewayUrls:a,strict:l}=e,{chain:u}=t,d=(()=>
1686{if(e.universalResolverAddress)return e.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return h0({blockNumber:n,chain:u,contract:"ensUniversalResolver"})})(),h=u==null?void 0:u.ensTlds;if(h&&!h.some(g=>s.endsWith(g)))return null;const m=i!=null?[T5(s),BigInt(i)]:[T5(s)];try{const g=$s({abi:D4,functionName:"addr",args:m}),w={address:d,abi:oN,functionName:"resolveWithGateways",args:[rc($C(s)),g,a??[Rv]],blockNumber:n,blockTag:r},v=await Je(t,ps,"readContract")(w);if(v[0]==="0x")return null;const x=id({abi:D4,args:m,functionName:"addr",data:v[0]});return x==="0x"||Wa(x)==="0x00"?null:x}catch(g){if(l)throw g;if(qC(g))return null;throw g}}class IG extends Ce{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class jm extends Ce{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class ZC extends Ce{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class RG extends Ce{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const kG=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,NG=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,OG=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,BG=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function PG(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const n=e.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=t})}}function rI(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function yO({uri:t,gatewayUrls:e}){const n=OG.test(t);if(n)return{uri:t,isOnChain:!0,isEncoded:n};const r=rI(e==null?void 0:e.ipfs,"https://ipfs.io"),i=rI(e==null?void 0:e.arweave,"https://arweave.net"),s=t.match(kG),{protocol:a,subpath:l,target:u,subtarget:d=""}=(s==null?void 0:s.groups)||{},h=a==="ipns:/"||l==="ipns/",m=a==="ipfs:/"||l==="ipfs/"||NG.test(t);if(t.startsWith("http")&&!h&&!m){let w=t;return e!=null&&e.arweave&&(w=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:w,isOnChain:!1,isEncoded:!1}}if((h||m)&&u)return{uri:`${r}/${h?"ipns":"ipfs"}/${u}${d}`,isOnChain:!1,isEncoded:!1};if(a==="ar:/"&&u)return{uri:`${i}/${u}${d||""}`,isOnChain:!1,isEncoded:!1};let g=t.replace(BG,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return{uri:g,isOnChain:!0,isEncoded:!1};throw new ZC({uri:t})}function bO(t){if(typeof t!="object"||!("image"in t)&&!("image_url"in t)&&!("image_data"in t))throw new IG({data:t});return t.image||t.image_url||t.image_data}async function DG({gatewayUrls:t,uri:e}){try{const n=await fetch(e).then(i=>i.json());return await e2({gatewayUrls:t,uri:bO(n)})}catch{throw new ZC({uri:e})}}async function e2({gatewayUrls:t,uri:e}){const{uri:n,isOnChain:r}=yO({uri:e,gatewayUrls:t});if(r||await PG(n))return n;throw new ZC({uri:e})}function MG(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=e.split("/"),[s,a]=n.split(":"),[l,u]=r.split(":");if(!s||s.toLowerCase()!=="eip155")throw new jm({reason:"Only EIP-155 supported"});if(!a)throw new jm({reason:"Chain ID not found"});if(!u)throw new jm({reason:"Contract address not found"});if(!i)throw new jm({reason:"Token ID not found"});if(!l)throw new jm({reason:"ERC namespace not found"});return{chainID:Number.parseInt(a,10),namespace:l.toLowerCase(),contractAddress:u,tokenID:i}}async function jG(t,{nft:e}){if(e.namespace==="erc721")return ps(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}
1686],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return ps(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new RG({namespace:e.namespace})}async function LG(t,{gatewayUrls:e,record:n}){return/eip155:/i.test(n)?UG(t,{gatewayUrls:e,record:n}):e2({uri:n,gatewayUrls:e})}async function UG(t,{gatewayUrls:e,record:n}){const r=MG(n),i=await jG(t,{nft:r}),{uri:s,isOnChain:a,isEncoded:l}=yO({uri:i,gatewayUrls:e});if(a&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const d=l?atob(s.replace("data:application/json;base64,","")):s,h=JSON.parse(d);return e2({uri:bO(h),gatewayUrls:e})}let u=r.tokenID;return r.namespace==="erc1155"&&(u=u.replace("0x","").padStart(64,"0")),DG({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,u)})}async function wO(t,e){const{blockNumber:n,blockTag:r,key:i,name:s,gatewayUrls:a,strict:l}=e,{chain:u}=t,d=(()=>
1686{if(e.universalResolverAddress)return e.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return h0({blockNumber:n,chain:u,contract:"ensUniversalResolver"})})(),h=u==null?void 0:u.ensTlds;if(h&&!h.some(m=>s.endsWith(m)))return null;try{const m={address:d,abi:oN,args:[rc($C(s)),$s({abi:P4,functionName:"text",args:[T5(s),i]}),a??[Rv]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},w=await Je(t,ps,"readContract")(m);if(w[0]==="0x")return null;const A=id({abi:P4,functionName:"text",data:w[0]});return A===""?null:A}catch(m){if(l)throw m;if(qC(m))return null;throw m}}async function vO(t,{blockNumber:e,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:s,strict:a,universalResolverAddress:l}){const u=await Je(t,wO,"getEnsText")({blockNumber:e,blockTag:n,key:"avatar",name:i,universalResolverAddress:l,gatewayUrls:s,strict:a});if(!u)return null;try{return await LG(t,{record:u,gatewayUrls:r})}catch{return null}}async function AO(t,e){const{address:n,blockNumber:r,blockTag:i,coinType:s=60n,gatewayUrls:a,strict:l}=e,{chain:u}=t,d=(()=>
1686{if(e.universalResolverAddress)return e.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return h0({blockNumber:r,chain:u,contract:"ensUniversalResolver"})})();try{const h={address:d,abi:iH,args:[n,s,a??[Rv]],functionName:"reverseWithGateways",blockNumber:r,blockTag:i},m=Je(t,ps,"readContract"),[g]=await m(h);return g||null}catch(h){if(l)throw h;if(qC(h))return null;throw h}}async function FG(t,e){const{blockNumber:n,blockTag:r,name:i}=e,{chain:s}=t,a=(()=>{if(e.universalResolverAddress)return e.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return h0({blockNumber:n,chain:s,contract:"ensUniversalResolver"})})(),l=s==null?void 0:s.ensTlds;if(l&&!l.some(d=>i.endsWith(d)))throw new Error(`${i} is not a valid ENS TLD (${l==null?void 0:l.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);const[u]=await Je(t,ps,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[rc($C(i))],blockNumber:n,blockTag:r});return u}async function EO(t,e){var x,T,O;const{account:n=t.account,blockNumber:r,blockTag:i="latest",blobs:s,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:m,to:g,value:w,...A}=e,v=n?ji(n):void 0;try{By(e);const P=(typeof r=="bigint"?Ue(r):void 0)||i,B=(O=(T=(x=t.chain)==null?void 0:x.formatters)==null?void 0:T.transactionRequest)==null?void 0:O.format,I=(B||Ov)({...JC(A,{format:B}),from:v==null?void 0:v.address,blobs:s,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:m,to:g,value:w}),R=await t.request({method:"eth_createAccessList",params:[I,P]});return{accessList:R.accessList,gasUsed:BigInt(R.gasUsed)}}catch(k){throw hO(k,{...e,account:v,chain:t.chain})}}function Pv(t,{method:e}){var r,i;const n={};return t.transport.type==="fallback"&&((i=(r=t.transport).onResponse)==null||i.call(r,({method:s,response:a,status:l,transport:u})=>{l==="success"&&e===s&&(n[a]=u.request)})),(s=>n[s]||t.request)}async function VG(t){const e=Pv(t,{method:"eth_newBlockFilter"}),n=await t.request({method:"eth_newBlockFilter"});return{id:n,request:e(n),type:"block"}}class zG extends Ce{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const iI="/docs/contract/encodeEventTopics";function Py(t){var u;const{abi:e,eventName:n,args:r}=t;let i=e[0];if(n){const d=rd({abi:e,name:n});if(!d)throw new U4(n,{docsPath:iI});i=d}if(i.type!=="event")throw new U4(void 0,{docsPath:iI});const s=Fs(i),a=_v(s);let l=[];if(r&&"inputs"in i){const d=(u=i.inputs)==null?void 0:u.filter(m=>"indexed"in m&&m.indexed),h=Array.isArray(r)?r:Object.values(r).length>0?(d==null?void 0:d.map(m=>r[m.name]))??[]:[];h.length>0&&(l=(d==null?void 0:d.map((m,g)=>Array.isArray(h[g])?h[g].map((w,A)=>sI({param:m,value:h[g][A]})):typeof h[g]<"u"&&h[g]!==null?sI({param:m,value:h[g]}):null))??[])}return[a,...l]}function sI({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return hr(u0(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new zG(t.type);return nd([t],[e])}async function xO(t,e){const{address:n,abi:r,args:i,eventName:s,fromBlock:a,strict:l,toBlock:u}=e,d=Pv(t,{method:"eth_newFilter"}),h=s?Py({abi:r,args:i,eventName:s}):void 0,m=await t.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof a=="bigint"?Ue(a):a,toBlock:typeof u=="bigint"?Ue(u):u,topics:h}]});return{abi:r,args:i,eventName:s,id:m,request:d(m),strict:!!l,type:"event"}}async function CO(t,{address:e,args:n,event:r,events:i,fromBlock:s,strict:a,toBlock:l}={}){const u=i??(r?[r]:void 0),d=Pv(t,{method:"eth_newFilter"});let h=[];u&&(h=[u.flatMap(w=>Py({abi:[w],eventName:w.name,args:n}))],r&&(h=h[0]));const m=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?Ue(s):s,toBlock:typeof l=="bigint"?Ue(l):l,...h.length?{topics:h}:{}}]});return{abi:u,args:n,eventName:r?r.name:void 0,fromBlock:s,id:m,request:d(m),strict:!!a,toBlock:l,type:"event"}}async function _O(t){const e=Pv(t,{method:"eth_newPendingTransactionFilter"}),n=await t.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:e(n),type:"transaction"}}function HG(t){const e=hr(`0x${t.substring(4)}`).substring(26);return Cv(`0x${e}`)}async function qG({hash:t,signature:e}){const n=Fo(t)?t:rc(t),{secp256k1:r}=await Te(async()=>{const{secp256k1:a}=await Promise.resolve().then(()=>ZY);return{secp256k1:a}},void 0);return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){const{r:d,s:h,v:m,yParity:g}=e,w=Number(g??m),A=oI(w);return new r.Signature(Vo(d),Vo(h)).addRecoveryBit(A)}const a=Fo(e)?e:rc(e);if(fn(a)!==65)throw new Error("invalid signature length");const l=zo(`0x${a.slice(130)}`),u=oI(l);return r.Signature.fromCompact(a.substring(2,130)).addRecoveryBit(u)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function oI(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}async function TO({hash:t,signature:e}){return HG(await qG({hash:t,signature:e}))}
1686function $G(t,e="hex"){const n=SO(t),r=LC(new Uint8Array(n.length));return n.encode(r),e==="hex"?Fn(r.bytes):r.bytes}function SO(t){return Array.isArray(t)?GG(t.map(e=>SO(e))):QG(t)}function GG(t){const e=t.reduce((i,s)=>i+s.length,0),n=IO(e);return{length:e<=55?1+e:1+n+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+n),n===1?i.pushUint8(e):n===2?i.pushUint16(e):n===3?i.pushUint24(e):i.pushUint32(e));for(const{encode:s}of t)s(i)}}}function QG(t){const e=typeof t=="string"?Vs(t):t,n=IO(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+n+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+n),n===1?i.pushUint8(e.length):n===2?i.pushUint16(e.length):n===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function IO(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new Ce("Length is too large.")}function KG(t){const{chainId:e,nonce:n,to:r}=t,i=t.contractAddress??t.address,s=hr(f0(["0x05",$G([e?Ue(e):"0x",i,n?Ue(n):"0x"])]));return r==="bytes"?Vs(s):s}async function RO(t){const{authorization:e,signature:n}=t;return TO({hash:KG(e),signature:n??e})}class WG extends Ce{constructor(e,{account:n,docsPath:r,chain:i,data:s,gas:a,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:m,value:g}){var A;const w=Sv({from:n==null?void 0:n.address,to:m,value:typeof g<"u"&&`${WN(g)} ${((A=i==null?void 0:i.nativeCurrency)==null?void 0:A.symbol)||"ETH"}`,data:s,gas:a,gasPrice:typeof l<"u"&&`${Ls(l)} gwei`,maxFeePerGas:typeof u<"u"&&`${Ls(u)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${Ls(d)} gwei`,nonce:h});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",w].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function YG(t,{docsPath:e,...n}){const r=(()=>{const i=YC(t,n);return i instanceof Nv?t:i})();return new WG(r,{docsPath:e,...n})}class JG extends Ce{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class t2 extends Ce{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class XG extends Ce{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Ls(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class kO extends Ce{constructor({blockHash:e,blockNumber:n}){let r="Block";e&&(r=`Block at hash "${e}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const NO={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function OO(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?zo(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?zo(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?NO[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return t.authorizationList&&(e.authorizationList=ZG(t.authorizationList)),e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}function ZG(t){return t.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}function BO(t){const e=(t.transactions??[]).map(n=>typeof n=="string"?n:OO(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}async function Ro(t,{blockHash:e,blockNumber:n,blockTag:r=t.experimental_blockTag??"latest",includeTransactions:i}={}){var d,h,m;const s=i??!1,a=n!==void 0?Ue(n):void 0;let l=null;if(e?l=await t.request({method:"eth_getBlockByHash",params:[e,s]},{dedupe:!0}):l=await t.request({method:"eth_getBlockByNumber",params:[a||r,s]},{dedupe:!!a}),!l)throw new kO({blockHash:e,blockNumber:n});return(((m=(h=(d=t.chain)==null?void 0:d.formatters)==null?void 0:h.block)==null?void 0:m.format)||BO)(l)}async function n2(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function eQ(t,e){return PO(t,e)}async function PO(t,e){var s,a;const{block:n,chain:r=t.chain,request:i}=e||{};try{const l=((s=r==null?void 0:r.fees)==null?void 0:s.maxPriorityFeePerGas)??((a=r==null?void 0:r.fees)==null?void 0:a.defaultPriorityFee);if(typeof l=="function"){const d=n||await Je(t,Ro,"getBlock")({}),h=await l({block:d,client:t,request:i});if(h===null)throw new Error;return h}if(typeof l<"u")return l;const u=await t.request({method:"eth_maxPriorityFeePerGas"});return Vo(u)}catch{const[l,u]=await Promise.all([n?Promise.resolve(n):Je(t,Ro,"getBlock")({}),Je(t,n2,"getGasPrice")({})]);if(typeof l.baseFeePerGas!="bigint")throw new t2;const d=u-l.baseFeePerGas;return d<0n?0n:d}}async function tQ(t,e){return M5(t,e)}async function M5(t,e){var g,w;const{block:n,chain:r=t.chain,request:i,type:s="eip1559"}=e||{},a=await(async()=>{var A,v;return typeof((A=r==null?void 0:r.fees)==null?void 0:A.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:t,request:i}):((v=r==null?void 0:r.fees)==null?void 0:v.baseFeeMultiplier)??1.2})();if(a<1)throw new JG;const u=10**(((g=a.toString().split(".")[1])==null?void 0:g.length)??0),d=A=>A*BigInt(Math.ceil(a*u))/BigInt(u),h=n||await Je(t,Ro,"getBlock")({});if(typeof((w=r==null?void 0:r.fees)==null?void 0:w.estimateFeesPerGas)=="function"){const A=await r.fees.estimateFeesPerGas({block:n,client:t,multiply:d,request:i,type:s});if(A!==null)return A}if(s==="eip1559"){if(typeof h.baseFeePerGas!="bigint")throw new t2;const A=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await PO(t,{block:h,chain:r,request:i}),v=d(h.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??v+A,maxPriorityFeePerGas:A}}return{gasPrice:(i==null?void 0:i.gasPrice)??d(await Je(t,n2,"getGasPrice")({}))}}async function DO(t,{address:e,blockTag:n="latest",blockNumber:r}){const i=await t.request({method:"eth_getTransactionCount",params:[e,typeof r=="bigint"?Ue(r):n]},{dedupe:!!r});return zo(i)}function MO(t){const{kzg:e}=t,n=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),r=typeof t.blobs[0]=="string"?t.blobs.map(s=>Vs(s)):t.blobs,i=[];for(const s of r)i.push(Uint8Array.from(e.blobToKzgCommitment(s)));return n==="bytes"?i:i.map(s=>Fn(s))}function jO(t){const{kzg:e}=t,n=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),r=typeof t.blobs[0]=="string"?t.blobs.map(a=>Vs(a)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(a=>Vs(a)):t.commitments,s=[];for(let a=0;a<r.length;a++){const l=r[a],u=i[a];s.push(Uint8Array.from(e.computeBlobKzgProof(l,u)))}return n==="bytes"?s:s.map(a=>Fn(a))}function nQ(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const i=BigInt(32),s=BigInt(4294967295),a=Number(n>>i&s),l=Number(n&s),u=r?4:0,d=r?0:4;t.setUint32(e+u,a,r),t.setUint32(e+d,l,r)}function rQ(t,e,n){return t&e^~t&n}function iQ(t,e,n){return t&e^t&n^e&n}class sQ extends MC{constructor(e,n,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=GE(this.buffer)}update(e){Fp(this),e=xv(e),jf(e);const{view:n,buffer:r,blockLen:i}=this,s=e.length;for(let a=0;a<s;){const l=Math.min(i-this.pos,s-a);if(l===i){const u=GE(e);for(;i<=s-a;a+=i)this.process(u,a);continue}r.set(e.subarray(a,a+l),this.pos),this.pos+=l,a+=l,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Fp(this),wN(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:a}=this;n[a++]=128,Vp(this.buffer.subarray(a)),this.padOffset>i-a&&(this.process(r,0),a=0);for(let m=a;m<i;m++)n[m]=0;nQ(r,i-8,BigInt(this.length*8),s),this.process(r,0);const l=GE(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=u/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<d;m++)l.setUint32(4*m,h[m],s)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:s,destroyed:a,pos:l}=this;return e.destroyed=a,e.finished=s,e.length=i,e.pos=l,i%n&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Gc=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),oQ=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
1686734187,3204031479,3329325298]),Qc=new Uint32Array(64);let aQ=class extends sQ{constructor(e=32){super(64,e,8,!1),this.A=Gc[0]|0,this.B=Gc[1]|0,this.C=Gc[2]|0,this.D=Gc[3]|0,this.E=Gc[4]|0,this.F=Gc[5]|0,this.G=Gc[6]|0,this.H=Gc[7]|0}get(){const{A:e,B:n,C:r,D:i,E:s,F:a,G:l,H:u}=this;return[e,n,r,i,s,a,l,u]}set(e,n,r,i,s,a,l,u){this.A=e|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=a|0,this.G=l|0,this.H=u|0}process(e,n){for(let m=0;m<16;m++,n+=4)Qc[m]=e.getUint32(n,!1);for(let m=16;m<64;m++){const g=Qc[m-15],w=Qc[m-2],A=lo(g,7)^lo(g,18)^g>>>3,v=lo(w,17)^lo(w,19)^w>>>10;Qc[m]=v+Qc[m-7]+A+Qc[m-16]|0}let{A:r,B:i,C:s,D:a,E:l,F:u,G:d,H:h}=this;for(let m=0;m<64;m++){const g=lo(l,6)^lo(l,11)^lo(l,25),w=h+g+rQ(l,u,d)+oQ[m]+Qc[m]|0,v=(lo(r,2)^lo(r,13)^lo(r,22))+iQ(r,i,s)|0;h=d,d=u,u=l,l=a+w|0,a=s,s=i,i=r,r=w+v|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,a=a+this.D|0,l=l+this.E|0,u=u+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,i,s,a,l,u,d,h)}roundClean(){Vp(Qc)}destroy(){this.set(0,0,0,0,0,0,0,0),Vp(this.buffer)}};const LO=vN(()=>new aQ),cQ=LO;function lQ(t,e){return cQ(Fo(t,{strict:!1})?u0(t):t)}function uQ(t){const{commitment:e,version:n=1}=t,r=t.to??(typeof e=="string"?"hex":"bytes"),i=lQ(e);return i.set([n],0),r==="bytes"?i:Fn(i)}function fQ(t){const{commitments:e,version:n}=t,r=t.to,i=[];for(const s of e)i.push(uQ({commitment:s,to:r,version:n}));return i}const aI=6,UO=32,r2=4096,FO=UO*r2,cI=FO*aI-1-1*r2*aI;class dQ extends Ce{constructor({maxSize:e,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class hQ extends Ce{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function pQ(t){const e=typeof t.data=="string"?Vs(t.data):t.data,n=fn(e);if(!n)throw new hQ;if(n>cI)throw new dQ({maxSize:cI,size:n});const r=[];let i=!0,s=0;for(;i;){const a=LC(new Uint8Array(FO));let l=0;for(;l<r2;){const u=e.slice(s,s+(UO-1));if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=!1;break}l++,s+=31}r.push(a)}return r.map(a=>Fn(a.bytes))}function mQ(t){const{data:e,kzg:n,to:r}=t,i=t.blobs??pQ({data:e}),s=t.commitments??MO({blobs:i,kzg:n,to:r}),a=t.proofs??jO({blobs:i,commitments:s,kzg:n,to:r}),l=[];for(let u=0;u<i.length;u++)l.push({blob:i[u],commitment:s[u],proof:a[u]});return l}function gQ(t){if(t.type)return t.type;if(typeof t.authorizationList<"u")return"eip7702";if(typeof t.blobs<"u"||typeof t.blobVersionedHashes<"u"||typeof t.maxFeePerBlobGas<"u"||typeof t.sidecars<"u")return"eip4844";if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new I$({transaction:t})}async function VO(t){const e=await t.request({method:"eth_chainId"},{dedupe:!0});return zo(e)}const yQ=["blobVersionedHashes","chainId","fees","gas","nonce","type"],lI=new Map;async function zO(t,e){const{account:n=t.account,blobs:r,chain:i,gas:s,kzg:a,nonce:l,nonceManager:u,parameters:d=yQ,type:h}=e,m=n&&ji(n),g={...e,...m?{from:m==null?void 0:m.address}:{}};let w;async function A(){return w||(w=await Je(t,Ro,"getBlock")({blockTag:"latest"}),w)}let v;async function x(){return v||(i?i.id:typeof e.chainId<"u"?e.chainId:(v=await Je(t,VO,"getChainId")({}),v))}if(d.includes("nonce")&&typeof l>"u"&&m)if(u){const T=await x();g.nonce=await u.consume({address:m.address,chainId:T,client:t})}else g.nonce=await Je(t,DO,"getTransactionCount")({address:m.address,blockTag:"pending"});if((d.includes("blobVersionedHashes")||d.includes("sidecars"))&&r&&a){const T=MO({blobs:r,kzg:a});if(d.includes("blobVersionedHashes")){const O=fQ({commitments:T,to:"hex"});g.blobVersionedHashes=O}if(d.includes("sidecars")){const O=jO({blobs:r,commitments:T,kzg:a}),k=mQ({blobs:r,commitments:T,proofs:O,to:"hex"});g.sidecars=k}}if(d.includes("chainId")&&(g.chainId=await x()),(d.includes("fees")||d.includes("type"))&&typeof h>"u")try{g.type=gQ(g)}catch{let T=lI.get(t.uid);if(typeof T>"u"){const O=await A();T=typeof(O==null?void 0:O.baseFeePerGas)=="bigint",lI.set(t.uid,T)}g.type=T?"eip1559":"legacy"}if(d.includes("fees"))if(g.type!=="legacy"&&g.type!=="eip2930"){if(typeof g.maxFeePerGas>"u"||typeof g.maxPriorityFeePerGas>"u"){const T=await A(),{maxFeePerGas:O,maxPriorityFeePerGas:k}=await M5(t,{block:T,chain:i,request:g});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas<k)throw new XG({maxPriorityFeePerGas:k});g.maxPriorityFeePerGas=k,g.maxFeePerGas=O}}else{if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")throw new t2;if(typeof e.gasPrice>"u"){const T=await A(),{gasPrice:O}=await M5(t,{block:T,chain:i,request:g,type:"legacy"});g.gasPrice=O}}return d.includes("gas")&&typeof s>"u"&&(g.gas=await Je(t,i2,"estimateGas")({...g,account:m&&{address:m.address,type:"json-rpc"}})),By(g),delete g.parameters,g}async function i2(t,e){var i,s,a;const{account:n=t.account}=e,r=n?ji(n):void 0;try{const{accessList:l,authorizationList:u,blobs:d,blobVersionedHashes:h,blockNumber:m,blockTag:g,data:w,gas:A,gasPrice:v,maxFeePerBlobGas:x,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:k,value:P,stateOverride:B,...U}=await zO(t,{...e,parameters:(r==null?void 0:r.type)==="local"?void 0:["blobVersionedHashes"]}),R=(typeof m=="bigint"?Ue(m):void 0)||g,M=XC(B),F=await(async()=>
1686{if(U.to)return U.to;if(u&&u.length>0)return await RO({authorization:u[0]}).catch(()=>{throw new Ce("`to` is required. Could not infer from `authorizationList`")})})();By(e);const j=(a=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:a.format,L=(j||Ov)({...JC(U,{format:j}),from:r==null?void 0:r.address,accessList:l,authorizationList:u,blobs:d,blobVersionedHashes:h,data:w,gas:A,gasPrice:v,maxFeePerBlobGas:x,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:k,to:F,value:P});return BigInt(await t.request({method:"eth_estimateGas",params:M?[L,R??t.experimental_blockTag??"latest",M]:R?[L,R]:[L]}))}catch(l){throw YG(l,{...e,account:r,chain:t.chain})}}async function bQ(t,e){const{abi:n,address:r,args:i,functionName:s,dataSuffix:a,...l}=e,u=$s({abi:n,args:i,functionName:s});try{return await Je(t,i2,"estimateGas")({data:`${u}${a?a.replace("0x",""):""}`,to:r,...l})}catch(d){const h=l.account?ji(l.account):void 0;throw qp(d,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:h==null?void 0:h.address})}}async function HO(t,{address:e,blockNumber:n,blockTag:r=t.experimental_blockTag??"latest"}){const i=typeof n=="bigint"?Ue(n):void 0,s=await t.request({method:"eth_getBalance",params:[e,i||r]});return BigInt(s)}async function wQ(t){const e=await t.request({method:"eth_blobBaseFee"});return BigInt(e)}const vQ=new Map,AQ=new Map;function EQ(t){const e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:a=>s.set(i,a)}),n=e(t,vQ),r=e(t,AQ);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function xQ(t,{cacheKey:e,cacheTime:n=Number.POSITIVE_INFINITY}){const r=EQ(e),i=r.response.get();if(i&&n>0&&Date.now()-i.created.getTime()<n)return i.data;let s=r.promise.get();s||(s=t(),r.promise.set(s));try{const a=await s;return r.response.set({created:new Date,data:a}),a}finally{r.promise.clear()}}const CQ=t=>`blockNumber.${t}`;async function Dy(t,{cacheTime:e=t.cacheTime}={}){const n=await xQ(()=>t.request({method:"eth_blockNumber"}),{cacheKey:CQ(t.uid),cacheTime:e});return BigInt(n)}async function _Q(t,{blockHash:e,blockNumber:n,blockTag:r="latest"}={}){const i=n!==void 0?Ue(n):void 0;let s;return e?s=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]},{dedupe:!0}):s=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||r]},{dedupe:!!i}),zo(s)}async function j5(t,{address:e,blockNumber:n,blockTag:r="latest"}){const i=n!==void 0?Ue(n):void 0,s=await t.request({method:"eth_getCode",params:[e,i||r]},{dedupe:!!i});if(s!=="0x")return s}function Dv(t,e){if(!Di(t,{strict:!1}))throw new Ml({address:t});if(!Di(e,{strict:!1}))throw new Ml({address:e});return t.toLowerCase()===e.toLowerCase()}const uI="/docs/contract/decodeEventLog";function s2(t){const{abi:e,data:n,strict:r,topics:i}=t,s=r??!0,[a,...l]=i;if(!a)throw new fH({docsPath:uI});const u=e.find(v=>v.type==="event"&&a===_v(Fs(v)));if(!(u&&"name"in u)||u.type!=="event")throw new dN(a,{docsPath:uI});const{name:d,inputs:h}=u,m=h==null?void 0:h.some(v=>!("name"in v&&v.name)),g=m?[]:{},w=h.map((v,x)=>[v,x]).filter(([v])=>"indexed"in v&&v.indexed);for(let v=0;v<w.length;v++){const[x,T]=w[v],O=l[v];if(!O)throw new Ev({abiItem:u,param:x});g[m?T:x.name||T]=TQ({param:x,value:O})}const A=h.filter(v=>!("indexed"in v&&v.indexed));if(A.length>0){if(n&&n!=="0x")try{const v=ky(A,n);if(v)if(m)for(let x=0;x<h.length;x++)g[x]=g[x]??v.shift();else for(let x=0;x<A.length;x++)g[A[x].name]=v[x]}catch(v){if(s)throw v instanceof uN||v instanceof TN?new hg({abiItem:u,data:n,params:A,size:fn(n)}):v}else if(s)throw new hg({abiItem:u,data:"0x",params:A,size:0})}return{eventName:d,args:Object.values(g).length>0?g:void 0}}function TQ({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(ky([t],e)||[])[0]}function o2(t){const{abi:e,args:n,logs:r,strict:i=!0}=t,s=(()=>{if(t.eventName)return Array.isArray(t.eventName)?t.eventName:[t.eventName]})();return r.map(a=>{var l;try{const u=e.find(h=>h.type==="event"&&a.topics[0]===_v(h));if(!u)return null;const d=s2({...a,abi:[u],strict:i});return s&&!s.includes(d.eventName)||!SQ({args:d.args,inputs:u.inputs,matchArgs:n})?null:{...d,...a}}catch(u){let d,h;
1686if(u instanceof dN)return null;if(u instanceof hg||u instanceof Ev){if(i)return null;d=u.abiItem.name,h=(l=u.abiItem.inputs)==null?void 0:l.some(m=>!("name"in m&&m.name))}return{...a,args:h?[]:{},eventName:d}}}).filter(Boolean)}function SQ(t){const{args:e,inputs:n,matchArgs:r}=t;if(!r)return!0;if(!e)return!1;function i(s,a,l){try{return s.type==="address"?Dv(a,l):s.type==="string"||s.type==="bytes"?hr(u0(a))===l:a===l}catch{return!1}}return Array.isArray(e)&&Array.isArray(r)?r.every((s,a)=>{if(s==null)return!0;const l=n[a];return l?(Array.isArray(s)?s:[s]).some(d=>i(l,d,e[a])):!1}):typeof e=="object"&&!Array.isArray(e)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,a])=>{if(a==null)return!0;const l=n.find(d=>d.name===s);return l?(Array.isArray(a)?a:[a]).some(d=>i(l,d,e[s])):!1}):!1}function ic(t,{args:e,eventName:n}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...n?{args:e,eventName:n}:{}}}async function a2(t,{address:e,blockHash:n,fromBlock:r,toBlock:i,event:s,events:a,args:l,strict:u}={}){const d=u??!1,h=a??(s?[s]:void 0);let m=[];h&&(m=[h.flatMap(v=>Py({abi:[v],eventName:v.name,args:a?void 0:l}))],s&&(m=m[0]));let g;n?g=await t.request({method:"eth_getLogs",params:[{address:e,topics:m,blockHash:n}]}):g=await t.request({method:"eth_getLogs",params:[{address:e,topics:m,fromBlock:typeof r=="bigint"?Ue(r):r,toBlock:typeof i=="bigint"?Ue(i):i}]});const w=g.map(A=>ic(A));return h?o2({abi:h,args:l,logs:w,strict:d}):w}async function qO(t,e){const{abi:n,address:r,args:i,blockHash:s,eventName:a,fromBlock:l,toBlock:u,strict:d}=e,h=a?rd({abi:n,name:a}):void 0,m=h?void 0:n.filter(g=>g.type==="event");return Je(t,a2,"getLogs")({address:r,args:i,blockHash:s,event:h,events:m,fromBlock:l,toBlock:u,strict:d})}class IQ extends Ce{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function RQ(t,e){const{address:n,factory:r,factoryData:i}=e;try{const[s,a,l,u,d,h,m]=await Je(t,ps,"readContract")({abi:kQ,address:n,functionName:"eip712Domain",factory:r,factoryData:i});return{domain:{name:a,version:l,chainId:Number(u),verifyingContract:d,salt:h},extensions:m,fields:s}}catch(s){const a=s;throw a.name==="ContractFunctionExecutionError"&&a.cause.name==="ContractFunctionZeroDataError"?new IQ({address:n}):a}}const kQ=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function NQ(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(n=>n.map(r=>BigInt(r)))}}async function OQ(t,{blockCount:e,blockNumber:n,blockTag:r="latest",rewardPercentiles:i}){const s=typeof n=="bigint"?Ue(n):void 0,a=await t.request({method:"eth_feeHistory",params:[Ue(e),s||r,i]},{dedupe:!!s});return NQ(a)}async function Mv(t,{filter:e}){const n="strict"in e&&e.strict,r=await e.request({method:"eth_getFilterChanges",params:[e.id]});if(typeof r[0]=="string")return r;const i=r.map(s=>ic(s));return!("abi"in e)||!e.abi?i:o2({abi:e.abi,logs:i,strict:n})}async function BQ(t,{filter:e}){const n=e.strict??!1,i=(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>ic(s));return e.abi?o2({abi:e.abi,logs:i,strict:n}):i}async function PQ({address:t,authorization:e,signature:n}){return Dv(_n(t),await RO({authorization:e,signature:n}))}const Eb=new jC(8192);function DQ(t,{enabled:e=!0,id:n}){if(!e||!n)return t();if(Eb.get(n))return Eb.get(n);const r=t().finally(()=>Eb.delete(n));return Eb.set(n,r),r}async function L5(t){return new Promise(e=>setTimeout(e,t))}function $p(t,{delay:e=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,s)=>{const a=async({count:l=0}={})=>{const u=async({error:d})=>{const h=typeof e=="function"?e({count:l,error:d}):e;h&&await L5(h),a({count:l+1})};try{const d=await t();i(d)}catch(d){if(l<n&&await r({count:l,error:d}))return u({error:d});s(d)}};a()})}function MQ(t,e={}){return async(n,r={})=>{var m;const{dedupe:i=!1,methods:s,retryDelay:a=150,retryCount:l=3,uid:u}={...e,...r},{method:d}=n;if((m=s==null?void 0:s.exclude)!=null&&m.includes(d))throw new Gu(new Error("method not supported"),{method:d});if(s!=null&&s.include&&!s.include.includes(d))throw new Gu(new Error("method not supported"),{method:d});const h=i?Up(`${u}.${pr(n)}`):void 0;return DQ(()=>$p(async()=>{try{return await t(n)}catch(g){const w=g;switch(w.code){case gg.code:throw new gg(w);case yg.code:throw new yg(w);case bg.code:throw new bg(w,{method:n.method});case wg.code:throw new wg(w);case Uf.code:throw new Uf(w);case Ff.code:throw new Ff(w);case vg.code:throw new vg(w);case Oo.code:throw new Oo(w);case Ag.code:throw new Ag(w);case Gu.code:throw new Gu(w,{method:n.method});case Hp.code:throw new Hp(w);case Eg.code:throw new Eg(w);case Nt.code:throw new Nt(w);case xg.code:throw new xg(w);case Cg.code:throw new Cg(w);case _g.code:throw new _g(w);case Tg.code:throw new Tg(w);case $r.code:throw new $r(w);case Sg.code:throw new Sg(w);case Ig.code:throw new Ig(w);case Rg.code:throw new Rg(w);case kg.code:throw new kg(w);case Ng.code:throw new Ng(w);case Og.code:throw new Og(w);case Bg.code:throw new Bg(w);case 5e3:throw new Nt(w);default:throw g instanceof Ce?g:new F$(w)}}},{delay:({count:g,error:w})=>{var A;if(w&&w instanceof rg){const v=(A=w==null?void 0:w.headers)==null?void 0:A.get("Retry-After");if(v!=null&&v.match(/\d/))return Number.parseInt(v,10)*1e3}return~~(1<<g)*a},retryCount:l,shouldRetry:({error:g})=>jQ(g)}),{enabled:i,id:h})}}function jQ(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===Hp.code||t.code===Uf.code:t instanceof rg&&t.status?t.status===403||t.status===408||t.status===4
168613||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}function $O(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}const LQ={"0x0":"reverted","0x1":"success"};function UQ(t){const e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(n=>ic(n)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?zo(t.transactionIndex):null,status:t.status?LQ[t.status]:null,type:t.type?NO[t.type]||t.type:null};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),e}function jv(t,{errorInstance:e=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,s)=>{(async()=>{let a;try{const l=new AbortController;n>0&&(a=setTimeout(()=>{r?l.abort():s(e)},n)),i(await t({signal:(l==null?void 0:l.signal)||null}))}catch(l){(l==null?void 0:l.name)==="AbortError"&&s(e),s(l)}finally{clearTimeout(a)}})()})}function FQ(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const fI=FQ();function VQ(t,e={}){return{async request(n){var g;const{body:r,fetchFn:i=e.fetchFn??fetch,onRequest:s=e.onRequest,onResponse:a=e.onResponse,timeout:l=e.timeout??1e4}=n,u={...e.fetchOptions??{},...n.fetchOptions??{}},{headers:d,method:h,signal:m}=u;try{const w=await jv(async({signal:v})=>{const x={...u,body:Array.isArray(r)?pr(r.map(P=>({jsonrpc:"2.0",id:P.id??fI.take(),...P}))):pr({jsonrpc:"2.0",id:r.id??fI.take(),...r}),headers:{"Content-Type":"application/json",...d},method:h||"POST",signal:m||(l>0?v:null)},T=new Request(t,x),O=await(s==null?void 0:s(T,x))??{...x,url:t};return await i(O.url??t,O)},{errorInstance:new X4({body:r,url:t}),timeout:l,signal:!0});a&&await a(w);let A;if((g=w.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))A=await w.json();else{A=await w.text();try{A=JSON.parse(A||"{}")}catch(v){if(w.ok)throw v;A={error:A}}}if(!w.ok)throw new rg({body:r,details:pr(A.error)||w.statusText,headers:w.headers,status:w.status,url:t});return A}catch(w){throw w instanceof rg||w instanceof X4?w:new rg({body:r,cause:w,url:t})}}}}const zQ=`�Ethereum Signed Message: 1687`;function HQ(t){const e=typeof t=="string"?Up(t):typeof t.raw=="string"?t.raw:Fn(t.raw),n=Up(`${zQ}${fn(e)}`);return Ho([n,e])}function GO(t,e){return hr(HQ(t),e)}class qQ extends Ce{constructor({domain:e}){super(`Invalid domain "${pr(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class $Q extends Ce{constructor({primaryType:e,types:n}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class GQ extends Ce{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function QQ(t){const{domain:e,message:n,primaryType:r,types:i}=t,s=(a,l)=>{for(const u of a){const{name:d,type:h}=u,m=l[d],g=h.match(kN);if(g&&(typeof m=="number"||typeof m=="bigint")){const[v,x,T]=g;Ue(m,{signed:x==="int",size:Number.parseInt(T,10)/8})}if(h==="address"&&typeof m=="string"&&!Di(m))throw new Ml({address:m});const w=h.match(lq);if(w){const[v,x]=w;if(x&&fn(m)!==Number.parseInt(x,10))throw new pH({expectedSize:Number.parseInt(x,10),givenSize:fn(m)})}const A=i[h];A&&(WQ(h),s(A,m))}};if(i.EIP712Domain&&e){if(typeof e!="object")throw new qQ({domain:e});s(i.EIP712Domain,e)}if(r!=="EIP712Domain")if(i[r])s(i[r],n);else throw new $Q({primaryType:r,types:i})}function KQ({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},(typeof(t==null?void 0:t.chainId)=="number"||typeof(t==null?void 0:t.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}
1687].filter(Boolean)}function WQ(t){if(t==="address"||t==="bool"||t==="string"||t.startsWith("bytes")||t.startsWith("uint")||t.startsWith("int"))throw new GQ({type:t})}function YQ(t){const{domain:e={},message:n,primaryType:r}=t,i={EIP712Domain:KQ({domain:e}),...t.types};QQ({domain:e,message:n,primaryType:r,types:i});const s=["0x1901"];return e&&s.push(JQ({domain:e,types:i})),r!=="EIP712Domain"&&s.push(QO({data:n,primaryType:r,types:i})),hr(Ho(s))}function JQ({domain:t,types:e}){return QO({data:t,primaryType:"EIP712Domain",types:e})}function QO({data:t,primaryType:e,types:n}){const r=KO({data:t,primaryType:e,types:n});return hr(r)}function KO({data:t,primaryType:e,types:n}){const r=[{type:"bytes32"}],i=[XQ({primaryType:e,types:n})];for(const s of n[e]){const[a,l]=YO({types:n,name:s.name,type:s.type,value:t[s.name]});r.push(a),i.push(l)}return nd(r,i)}function XQ({primaryType:t,types:e}){const n=rc(ZQ({primaryType:t,types:e}));return hr(n)}function ZQ({primaryType:t,types:e}){let n="";const r=WO({primaryType:t,types:e});r.delete(t);const i=[t,...Array.from(r).sort()];for(const s of i)n+=`${s}(${e[s].map(({name:a,type:l})=>`${l} ${a}`).join(",")})`;return n}function WO({primaryType:t,types:e},n=new Set){const r=t.match(/^\w*/u),i=r==null?void 0:r[0];if(n.has(i)||e[i]===void 0)return n;n.add(i);for(const s of e[i])WO({primaryType:s.type,types:e},n);return n}function YO({types:t,name:e,type:n,value:r}){if(t[n]!==void 0)return[{type:"bytes32"},hr(KO({data:r,primaryType:n,types:t}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},hr(r)];if(n==="string")return[{type:"bytes32"},hr(rc(r))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),s=r.map(a=>YO({name:e,type:i,types:t,value:a}));return[{type:"bytes32"},hr(nd(s.map(([a])=>a),s.map(([,a])=>a)))]}return[{type:n},r]}const eK="1.1.1";let pi=class U5 extends Error{constructor(e,n={}){var a;const r=n.cause instanceof U5?n.cause.details:(a=n.cause)!=null&&a.message?n.cause.message:n.details,i=n.cause instanceof U5&&n.cause.docsPath||n.docsPath,s=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${eK}`].join(` 1688`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}};function pc(t,e){const n=t.exec(e);return n==null?void 0:n.groups}const JO=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,XO=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,ZO=/^\(.+?\).*?$/,dI=/^tuple(?<array>(\[(\d*)\])*)$/;function F5(t){let e=t.type;if(dI.test(t.type)&&"components"in t){e="(";const n=t.components.length;for(let i=0;i<n;i++){const s=t.components[i];e+=F5(s),i<n-1&&(e+=", ")}const r=pc(dI,t.type);return e+=`)${(r==null?void 0:r.array)??""}`,F5({...t,type:e})}return"indexed"in t&&t.indexed&&(e=`${e}
1688 indexed`),t.name?`${e} ${t.name}`:e}function ch(t){let e="";const n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=F5(i),r!==n-1&&(e+=", ")}return e}function V5(t){var e;return t.type==="function"?`function ${t.name}(${ch(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${(e=t.outputs)!=null&&e.length?` returns (${ch(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${ch(t.inputs)})`:t.type==="error"?`error ${t.name}(${ch(t.inputs)})`:t.type==="constructor"?`constructor(${ch(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?`fallback() external${t.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const eB=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function tK(t){return eB.test(t)}function nK(t){return pc(eB,t)}const tB=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function rK(t){return tB.test(t)}function iK(t){return pc(tB,t)}const nB=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function sK(t){return nB.test(t)}function oK(t){return pc(nB,t)}const rB=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function c2(t){return rB.test(t)}function aK(t){return pc(rB,t)}const iB=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function cK(t){return iB.test(t)}function lK(t){return pc(iB,t)}const sB=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function uK(t){return sB.test(t)}function fK(t){return pc(sB,t)}const dK=/^receive\(\) external payable$/;function hK(t){return dK.test(t)}const hI=new Set(["memory","indexed","storage","calldata"]),pK=new Set(["indexed"]),z5=new Set(["calldata","memory","storage"]);class mK extends pi{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class gK extends pi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class yK extends pi{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class bK extends pi{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class wK extends pi{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class vK extends pi{constructor({param:e,name:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class AK extends pi{constructor({param:e,type:n,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class EK extends pi{constructor({param:e,type:n,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class xK extends pi{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
1688d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class p0 extends pi{constructor({signature:e,type:n}){super(`Invalid ${n} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class CK extends pi{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class _K extends pi{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class TK extends pi{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class SK extends pi{constructor({current:e,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function IK(t,e,n){let r="";if(n)for(const i of Object.entries(n)){if(!i)continue;let s="";for(const a of i[1])s+=`[${a.type}${a.name?`:${a.name}`:""}]`;r+=`(${i[0]}{${s}})`}return e?`${e}:${t}${r}`:t}const t3=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function pI(t,e={}){if(sK(t))return RK(t,e);if(rK(t))return kK(t,e);if(tK(t))return NK(t,e);if(cK(t))return OK(t,e);if(uK(t))return BK(t);if(hK(t))return{type:"receive",stateMutability:"payable"};throw new CK({signature:t})}function RK(t,e={}){const n=oK(t);if(!n)throw new p0({signature:t,type:"function"});const r=Oi(n.parameters),i=[],s=r.length;for(let l=0;l<s;l++)i.push(sc(r[l],{modifiers:z5,structs:e,type:"function"}));const a=[];if(n.returns){const l=Oi(n.returns),u=l.length;for(let d=0;d<u;d++)a.push(sc(l[d],{modifiers:z5,structs:e,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:i,outputs:a}}function kK(t,e={}){const n=iK(t);if(!n)throw new p0({signature:t,type:"event"});const r=Oi(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(sc(r[a],{modifiers:pK,structs:e,type:"event"}));return{name:n.name,type:"event",inputs:i}}function NK(t,e={}){const n=nK(t);if(!n)throw new p0({signature:t,type:"error"});const r=Oi(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(sc(r[a],{structs:e,type:"error"}));return{name:n.name,type:"error",inputs:i}}function OK(t,e={}){const n=lK(t);if(!n)throw new p0({signature:t,type:"constructor"});const r=Oi(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push(sc(r[a],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:i}}function BK(t){const e=fK(t);if(!e)throw new p0({signature:t,type:"fallback"});return{type:"fallback",stateMutability:e.stateMutability??"nonpayable"}}const PK=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,DK=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,MK=/^u?int$/;function sc(t,e){var m,g;const n=IK(t,e==null?void 0:e.type,e==null?void 0:e.structs);if(t3.has(n))return t3.get(n);const r=ZO.test(t),i=pc(r?DK:PK,t);
1688if(!i)throw new wK({param:t});if(i.name&&LK(i.name))throw new vK({param:t,name:i.name});const s=i.name?{name:i.name}:{},a=i.modifier==="indexed"?{indexed:!0}:{},l=(e==null?void 0:e.structs)??{};let u,d={};if(r){u="tuple";const w=Oi(i.type),A=[],v=w.length;for(let x=0;x<v;x++)A.push(sc(w[x],{structs:l}));d={components:A}}else if(i.type in l)u="tuple",d={components:l[i.type]};else if(MK.test(i.type))u=`${i.type}256`;else if(i.type==="address payable")u="address";else if(u=i.type,(e==null?void 0:e.type)!=="struct"&&!oB(u))throw new yK({type:u});if(i.modifier){if(!((g=(m=e==null?void 0:e.modifiers)==null?void 0:m.has)!=null&&g.call(m,i.modifier)))throw new AK({param:t,type:e==null?void 0:e.type,modifier:i.modifier});if(z5.has(i.modifier)&&!UK(u,!!i.array))throw new EK({param:t,type:e==null?void 0:e.type,modifier:i.modifier})}const h={type:`${u}${i.array??""}`,...s,...a,...d};return t3.set(n,h),h}function Oi(t,e=[],n="",r=0){const i=t.trim().length;for(let s=0;s<i;s++){const a=t[s],l=t.slice(s+1);switch(a){case",":return r===0?Oi(l,[...e,n.trim()]):Oi(l,e,`${n}${a}`,r);case"(":return Oi(l,e,`${n}${a}`,r+1);case")":return Oi(l,e,`${n}${a}`,r-1);default:return Oi(l,e,`${n}${a}`,r)}}if(n==="")return e;if(r!==0)throw new SK({current:n,depth:r});return e.push(n.trim()),e}function oB(t){return t==="address"||t==="bool"||t==="function"||t==="string"||JO.test(t)||XO.test(t)}const jK=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function LK(t){return t==="address"||t==="bool"||t==="function"||t==="string"||t==="tuple"||JO.test(t)||XO.test(t)||jK.test(t)}function UK(t,e){return e||t==="bytes"||t==="string"||t==="tuple"}function aB(t){const e={},n=t.length;for(let a=0;a<n;a++){const l=t[a];if(!c2(l))continue;const u=aK(l);if(!u)throw new p0({signature:l,type:"struct"});const d=u.properties.split(";"),h=[],m=d.length;for(let g=0;g<m;g++){const A=d[g].trim();if(!A)continue;const v=sc(A,{type:"struct"});h.push(v)}if(!h.length)throw new _K({signature:l});e[u.name]=h}const r={},i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,u]=i[a];r[l]=cB(u,e)}return r}const FK=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function cB(t,e,n=new Set){const r=[],i=t.length;for(let s=0;s<i;s++){const a=t[s];if(ZO.test(a.type))r.push(a);else{const u=pc(FK,a.type);if(!(u!=null&&u.type))throw new xK({abiParameter:a});const{array:d,type:h}=u;if(h in e){if(n.has(h))throw new TK({type:h});r.push({...a,type:`tuple${d??""}`,components:cB(e[h]??[],e,new Set([...n,h]))})}else if(oB(h))r.push(a);else throw new gK({type:h})}}return r}function mI(t){let e;if(typeof t=="string")e=pI(t);else{const n=aB(t),r=t.length;for(let i=0;i<r;i++){const s=t[i];if(!c2(s)){e=pI(s,n);break}}}if(!e)throw new mK({signature:t});return e}function gI(t){const e=[];if(typeof t=="string"){const n=Oi(t),r=n.length;for(let i=0;i<r;i++)e.push(sc(n[i],{modifiers:hI}))}else{const n=aB(t),r=t.length;for(let i=0;i<r;i++){const s=t[i];if(c2(s))continue;const a=Oi(s),l=a.length;for(let u=0;u<l;u++)e.push(sc(a[u],{modifiers:hI,structs:n}
vendor: 5,965 bytes, line 1688
1688))}}if(e.length===0)throw new bK({params:t});return e}class VK extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const zK={checksum:new VK(8192)},n3=zK.checksum;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function HK(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function yI(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function xw(t,...e){if(!HK(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function bI(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function qK(t,e){xw(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function $K(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function lB(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}const GK=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function QK(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function KK(t){for(let e=0;e<t.length;e++)t[e]=QK(t[e]);return t}const wI=GK?t=>t:KK;function WK(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function uB(t){return typeof t=="string"&&(t=WK(t)),xw(t),t}let YK=class{};function JK(t){const e=r=>t().update(uB(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}const xb=BigInt(2**32-1),vI=BigInt(32);function XK(t,e=!1){return e?{h:Number(t&xb),l:Number(t>>vI&xb)}:{h:Number(t>>vI&xb)|0,l:Number(t&xb)|0}}function ZK(t,e=!1){const n=t.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){const{h:a,l}=XK(t[s],e);[r[s],i[s]]=[a,l]}return[r,i]}const eW=(t,e,n)=>t<<n|e>>>32-n,tW=(t,e,n)=>e<<n|t>>>32-n,nW=(t,e,n)=>e<<n-32|t>>>64-n,rW=(t,e,n)=>t<<n-32|e>>>64-n,iW=BigInt(0),Lm=BigInt(1),sW=BigInt(2),oW=BigInt(7),aW=BigInt(256),cW=BigInt(113),fB=[],dB=[],hB=[];for(let t=0,e=Lm,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],fB.push(2*(5*r+n)),dB.push((t+1)*(t+2)/2%64);let i=iW;for(let s=0;s<7;s++)e=(e<<Lm^(e>>oW)*cW)%aW,e&sW&&(i^=Lm<<(Lm<<BigInt(s))-Lm);hB.push(i)}const pB=ZK(hB,!0),lW=pB[0],uW=pB[1],AI=(t,e,n)=>n>32?nW(t,e,n):eW(t,e,n),EI=(t,e,n)=>n>32?rW(t,e,n):tW(t,e,n);function fW(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let a=0;a<10;a++)n[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const l=(a+8)%10,u=(a+2)%10,d=n[u],h=n[u+1],m=AI(d,h,1)^n[l],g=EI(d,h,1)^n[l+1];for(let w=0;w<50;w+=10)t[a+w]^=m,t[a+w+1]^=g}let i=t[2],s=t[3];for(let a=0;a<24;a++){const l=dB[a],u=AI(i,s,l),d=EI(i,s,l),h=fB[a];i=t[h],s=t[h+1],t[h]=u,t[h+1]=d}for(let a=0;a<50;a+=10){for(let l=0;l<10;l++)n[l]=t[a+l];for(let l=0;l<10;l++)t[a+l]^=~n[(l+2)%10]&n[(l+4)%10]}t[0]^=lW[r],t[1]^=uW[r]}lB(n)}let dW=class mB extends YK{constructor(e,n,r,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=s,yI(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=$K(this.state)}clone(){return this._cloneInto()}keccak(){wI(this.state32),fW(this.state32,this.rounds),wI(this.state32),this.posOut=0,this.pos=0}update(e){bI(this),e=uB(e),xw(e);const{blockLen:n,state:r}=this,i=e.length;for(let s=0;s<i;){const a=Math.min(n-this.pos,i-s);for(let l=0;l<a;l++)r[this.pos++]^=e[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:i}=this;e[r]^=n,(n&128)!==0&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){bI(this,!1),xw(e),this.finish();const n=this.state,{blockLen:r}=this;for(let i=0,s=e.length;i<s;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,s-i);e.set(n.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return yI(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(qK(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,lB(this.state)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:i,rounds:s,enableXOF:a}=this;return e||(e=new mB(n,r,i,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const hW=(t,e,n)=>JK(()=>new dW(e,t,n)),pW=hW(1,136,256/8);function gB(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=pW(Y$(t));return n==="Bytes"?r:Hs(r)}const mW=/^0x[a-fA-F0-9]{40}$/;function Lv(t,e={}){const{strict:n=!0}=e;if(!mW.test(t))throw new xI({address:t,cause:new gW});if(n){if(t.toLowerCase()===t)return;if(yB(t)!==t)throw new xI({address:t,cause:new yW})}}function yB(t){if(n3.has(t))return n3.get(t);Lv(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=gB(X$(e),{as:"Bytes"}),r=e.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const i=`0x${r.join("")}`;return n3.set(t,i),i}function H5(t,e={}){const{strict:n=!0}=e??{};try{return Lv(t,{strict:n}),!0}catch{return!1}}class xI extends At{constructor({address:e,cause:n}){super(`Address "${e}
1688" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class gW extends At{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class yW extends At{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const bW=/^(.*)\[([0-9]*)\]$/,wW=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,bB=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,CI=2n**256n-1n;function Ih(t,e,n){const{checksumAddress:r,staticPosition:i}=n,s=f2(e.type);if(s){const[a,l]=s;return AW(t,{...e,type:l},{checksumAddress:r,length:a,staticPosition:i})}if(e.type==="tuple")return _W(t,e,{checksumAddress:r,staticPosition:i});if(e.type==="address")return vW(t,{checksum:r});if(e.type==="bool")return EW(t);if(e.type.startsWith("bytes"))return xW(t,e,{staticPosition:i});if(e.type.startsWith("uint")||e.type.startsWith("int"))return CW(t,e);if(e.type==="string")return TW(t,{staticPosition:i});throw new h2(e.type)}const _I=32,q5=32;function vW(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(s=>n?yB(s):s)(Hs(eG(r,-20))),32]}function AW(t,e,n){const{checksumAddress:r,length:i,staticPosition:s}=n;if(!i){const u=Ja(t.readBytes(q5)),d=s+u,h=d+_I;t.setPosition(d);const m=Ja(t.readBytes(_I)),g=Pg(e);let w=0;const A=[];for(let v=0;v<m;++v){t.setPosition(h+(g?v*32:w));const[x,T]=Ih(t,e,{checksumAddress:r,staticPosition:h});w+=T,A.push(x)}return t.setPosition(s+32),[A,32]}if(Pg(e)){const u=Ja(t.readBytes(q5)),d=s+u,h=[];for(let m=0;m<i;++m){t.setPosition(d+m*32);const[g]=Ih(t,e,{checksumAddress:r,staticPosition:d});h.push(g)}return t.setPosition(s+32),[h,32]}let a=0;const l=[];for(let u=0;u<i;++u){const[d,h]=Ih(t,e,{checksumAddress:r,staticPosition:s+a});a+=h,l.push(d)}return[l,a]}function EW(t){return[nG(t.readBytes(32),{size:32}),32]}function xW(t,e,{staticPosition:n}){const[r,i]=e.type.split("bytes");if(!i){const a=Ja(t.readBytes(32));t.setPosition(n+a);const l=Ja(t.readBytes(32));if(l===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(l);return t.setPosition(n+32),[Hs(u),32]}return[Hs(t.readBytes(Number.parseInt(i,10),32)),32]}function CW(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),i=t.readBytes(32);return[r>48?tG(i,{signed:n}):Ja(i,{signed:n}),32]}function _W(t,e,n){const{checksumAddress:r,staticPosition:i}=n,s=e.components.length===0||e.components.some(({name:u})=>!u),a=s?[]:{};let l=0;if(Pg(e)){const u=Ja(t.readBytes(q5)),d=i+u;for(let h=0;h<e.components.length;++h){const m=e.components[h];t.setPosition(d+l);const[g,w]=Ih(t,m,{checksumAddress:r,staticPosition:d});l+=w,a[s?h:m==null?void 0:m.name]=g}return t.setPosition(i+32),[a,32]}for(let u=0;u<e.components.length;++u){const d=e.components[u],[h,m]=Ih(t,d,{checksumAddress:r,staticPosition:i});a[s?u:d==null?void 0:d.name]=h,l+=m}return[a,l]}function TW(t,{staticPosition:e}){const n=Ja(t.readBytes(32)),r=e+n;t.setPosition(r);const i=Ja(t.readBytes(32));if(i===0)return t.setPosition(e+32),["",32];const s=t.readBytes(i,32),a=rG(sO(s));return t.setPosition(e+32),[a,32]}function SW({checksumAddress:t,parameters:e,values:n}){const r=[];for(let i=0;i<e.length;i++)r.push(l2({checksumAddress:t,parameter:e[i],value:n[i]}));return r}function l2({checksumAddress:t=!1,parameter:e,value:n}){const r=e,i=f2(r.type);if(i){const[s,a]=i;return RW(n,{checksumAddress:t,length:s,parameter:{...r,type:a}})}if(r.type==="tuple")return PW(n,{checksumAddress:t,parameter:r});if(r.type==="address")return IW(n,{checksum:t});if(r.type==="bool")return NW(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const s=r.type.startsWith("int"),[,,a="256"]=bB.exec(r.type)??[];return OW(n,{signed:s,size:Number(a)})}if(r.type.startsWith("bytes"))return kW(n,{type:r.type});if(r.type==="string")return BW(n);throw new h2(r.type)}function u2(t){let e=0;for(let s=0;s<t.length;s++){const{dynamic:a,encoded:l}=t[s];a?e+=32:e+=Mi(l)}const n=[],r=[];let i=0;for(let s=0;s<t.length;s++){const{dynamic:a,encoded:l}=t[s];a?(n.push(Fr(e+i,{size:32})),r.push(l),i+=Mi(l)):n.push(l)}return zs(...n,...r)}function IW(t,e){const{checksum:n=!1}=e;return Lv(t,{strict:n}),{dynamic:!1,encoded:Vf(t.toLowerCase())}}function RW(t,e){const{checksumAddress:n,length:r,parameter:i}=e,s=r===null;if(!Array.isArray(t))throw new HW(t);if(!s&&t.length!==r)throw new zW({expectedLength:r,givenLength:t.length,type:`${i.type}[${r}]`});let a=!1;const l=[];for(let u=0;u<t.length;u++){const d=l2({checksumAddress:n,parameter:i,value:t[u]});d.dynamic&&(a=!0),l.push(d)}if(s||a){const u=u2(l);if(s){const d=Fr(l.length,{size:32});return{dynamic:!0,encoded:l.length>0?zs(d,u):d}}if(a)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:zs(...l.map(({encoded:u})=>u))}}function kW(t,{type:e}){const[,n]=e.split("bytes"),r=Mi(t);if(!n){let i=t;return r%32!==0&&(i=zf(i,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:zs(Vf(Fr(r,{size:32})),i)}}if(r!==Number.parseInt(n,10))throw new vB({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:zf(t)}}function NW(t){if(typeof t!="boolean")throw new At(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Vf(oO(t))}}function OW(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,i=e?-r-1n:0n;if(t>r||t<i)throw new lO({max:r.toString(),min:i.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:Fr(t,{size:32,signed:e})}}function BW(t){const e=QC(t),n=Math.ceil(Mi(e)/32),r=[];for(let i=0;i<n;
vendor: 4,408 bytes, line 1688
1688i++)r.push(zf(Bo(e,i*32,(i+1)*32)));return{dynamic:!0,encoded:zs(zf(Fr(Mi(e),{size:32})),...r)}}function PW(t,e){const{checksumAddress:n,parameter:r}=e;let i=!1;const s=[];for(let a=0;a<r.components.length;a++){const l=r.components[a],u=Array.isArray(t)?a:l.name,d=l2({checksumAddress:n,parameter:l,value:t[u]});s.push(d),d.dynamic&&(i=!0)}return{dynamic:i,encoded:i?u2(s):zs(...s.map(({encoded:a})=>a))}}function f2(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function Pg(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(Pg);const n=f2(t.type);return!!(n&&Pg({...t,type:n[1]}))}const DW={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new LW({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new jW({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new TI({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new TI({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function MW(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(DW);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class TI extends At{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class jW extends At{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class LW extends At{constructor({count:e,limit:n}
1688){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function UW(t,e,n={}){const{as:r="Array",checksumAddress:i=!1}=n,s=typeof e=="string"?iO(e):e,a=MW(s);if(bh(s)===0&&t.length>0)throw new VW;if(bh(s)&&bh(s)<32)throw new FW({data:typeof e=="string"?e:Hs(e),parameters:t,size:bh(s)});let l=0;const u=r==="Array"?[]:{};for(let d=0;d<t.length;++d){const h=t[d];a.setPosition(l);const[m,g]=Ih(a,h,{checksumAddress:i,staticPosition:0});l+=g,r==="Array"?u.push(m):u[h.name??d]=m}return u}function d2(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new AB({expectedLength:t.length,givenLength:e.length});const i=SW({checksumAddress:r,parameters:t,values:e}),s=u2(i);return s.length===0?"0x":s}function $5(t,e){if(t.length!==e.length)throw new AB({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const i=t[r],s=e[r];n.push($5.encode(i,s))}return zs(...n)}(function(t){function e(n,r,i=!1){if(n==="address"){const u=r;return Lv(u),Vf(u.toLowerCase(),i?32:0)}if(n==="string")return QC(r);if(n==="bytes")return r;if(n==="bool")return Vf(oO(r),i?32:1);const s=n.match(bB);if(s){const[u,d,h="256"]=s,m=Number.parseInt(h,10)/8;return Fr(r,{size:i?32:m,signed:d==="int"})}const a=n.match(wW);if(a){const[u,d]=a;if(Number.parseInt(d,10)!==(r.length-2)/2)throw new vB({expectedSize:Number.parseInt(d,10),value:r});return zf(r,i?32:0)}const l=n.match(bW);if(l&&Array.isArray(r)){const[u,d]=l,h=[];for(let m=0;m<r.length;m++)h.push(e(d,r[m],!0));return h.length===0?"0x":zs(...h)}throw new h2(n)}t.encode=e})($5||($5={}));function wB(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?gI(t):t}class FW extends At{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ch(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class VW extends At{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class zW extends At{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class vB extends At{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${Mi(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class AB extends At{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(` 1689`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class HW extends At{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class h2 extends At{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function EB(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new r3({signature:t});if(typeof t.s>"u")throw new r3({signature:t});if(n&&typeof t.yParity>"u")throw new r3({signature:t});if(t.r<0n||t.r>CI)throw new YW({value:t.r});if(t.s<0n||t.s>CI)throw new JW({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new m2({value:t.yParity})}function qW(t){return xB(Hs(t))}function xB(t){if(t.length!==130&&t.length!==132)throw new WW({signature:t});const e=BigInt(Bo(t,0,32)),n=BigInt(Bo(t,32,64)),r=(()=>{const i=+`0x${t.slice(130)}`;if(!Number.isNaN(i))try{return p2(i)}catch{throw new m2({value:i})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function $W(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return GW(t)}function GW(t){const e=typeof t=="string"?xB(t):t instanceof Uint8Array?qW(t):typeof t.r=="string"?KW(t):t.v?QW(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return EB(e),e}function QW(t){return{r:t.r,s:t.s,yParity:p2(t.v)}}function KW(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=p2(n)),typeof r!="number")throw new m2({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function p2(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new XW({value:t})}class WW extends At{constructor({signature:e}){super(`Value \`${e}
1689\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Mi(fG(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class r3 extends At{constructor({signature:e}){super(`Signature \`${rO(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class YW extends At{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class JW extends At{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class m2 extends At{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class XW extends At{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function ZW(t,e={}){return typeof t.chainId=="string"?eY(t):{...t,...e.signature}}function eY(t){const{address:e,chainId:n,nonce:r}=t,i=$W(t);return{address:e,chainId:Number(n),nonce:BigInt(r),...i}}const tY="0x8010801080108010801080108010801080108010801080108010801080108010",nY=wB("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function CB(t){if(typeof t=="string"){if(Bo(t,-32)!==tY)throw new sY(t)}else EB(t.authorization)}function rY(t){CB(t);const e=cO(Bo(t,-64,-32)),n=Bo(t,-e-64,-64),r=Bo(t,0,-e-64),[i,s,a]=UW(nY,n);return{authorization:ZW({address:i.delegation,chainId:Number(i.chainId),nonce:i.nonce,yParity:i.yParity,r:i.r,s:i.s}),signature:r,...a&&a!=="0x"?{data:a,to:s}:{}}}function iY(t){try{return CB(t),!0}catch{return!1}}let sY=class extends At{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function oY(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function aY(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?zo(t.nonce):void 0,storageProof:t.storageProof?oY(t.storageProof):void 0}}async function cY(t,{address:e,blockNumber:n,blockTag:r,storageKeys:i}){const s=r??"latest",a=n!==void 0?Ue(n):void 0,l=await t.request({method:"eth_getProof",params:[e,i,a||s]});return aY(l)}async function lY(t,{address:e,blockNumber:n,blockTag:r="latest",slot:i}){const s=n!==void 0?Ue(n):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,s||r]})}async function g2(t,{blockHash:e,blockNumber:n,blockTag:r,hash:i,index:s}){var h,m,g;const a=r||"latest",l=n!==void 0?Ue(n):void 0;let u=null;if(i?u=await t.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):e?u=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,Ue(s)]},{dedupe:!0}):u=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||a,Ue(s)]},{dedupe:!!l}),!u)throw new YN({blockHash:e,blockNumber:n,blockTag:a,hash:i,index:s});return(((g=(m=(h=t.chain)==null?void 0:h.formatters)==null?void 0:m.transaction)==null?void 0:g.format)||OO)(u)}async function uY(t,{hash:e,transactionReceipt:n}){const[r,i]=await Promise.all([Je(t,Dy,"getBlockNumber")({}),e?Je(t,g2,"getTransaction")({hash:e}):void 0]),s=(n==null?void 0:n.blockNumber)||(i==null?void 0:i.blockNumber);return s?r-s+1n:0n}async function Wb(t,{hash:e}){var i,s,a;const n=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!n)throw new JN({hash:e});return(((a=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionReceipt)==null?void 0:a.format)||UQ)(n)}async function _B(t,e){var O;const{account:n,authorizationList:r,allowFailure:i=!0,blockNumber:s,blockOverrides:a,blockTag:l,stateOverride:u}=e,d=e.contracts,{batchSize:h=e.batchSize??1024,deployless:m=e.deployless??!1}=typeof((O=t.batch)==null?void 0:O.multicall)=="object"?t.batch.multicall:{},g=(()=>
1689{if(e.multicallAddress)return e.multicallAddress;if(m)return null;if(t.chain)return h0({blockNumber:s,chain:t.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),w=[[]];let A=0,v=0;for(let k=0;k<d.length;k++){const{abi:P,address:B,args:U,functionName:I}=d[k];try{const R=$s({abi:P,args:U,functionName:I});v+=(R.length-2)/2,h>0&&v>h&&w[A].length>0&&(A++,v=(R.length-2)/2,w[A]=[]),w[A]=[...w[A],{allowFailure:!0,callData:R,target:B}]}catch(R){const M=qp(R,{abi:P,address:B,args:U,docsPath:"/docs/contract/multicall",functionName:I,sender:n});if(!i)throw M;w[A]=[...w[A],{allowFailure:!0,callData:"0x",target:B}]}}const x=await Promise.allSettled(w.map(k=>Je(t,ps,"readContract")({...g===null?{code:KC}:{address:g},abi:vw,account:n,args:[k],authorizationList:r,blockNumber:s,blockOverrides:a,blockTag:l,functionName:"aggregate3",stateOverride:u}))),T=[];for(let k=0;k<x.length;k++){const P=x[k];if(P.status==="rejected"){if(!i)throw P.reason;for(let U=0;U<w[k].length;U++)T.push({status:"failure",error:P.reason,result:void 0});continue}const B=P.value;for(let U=0;U<B.length;U++){const{returnData:I,success:R}=B[U],{callData:M}=w[k][U],{abi:F,address:j,functionName:q,args:L}=d[T.length];try{if(M==="0x")throw new Ry;if(!R)throw new Iv({data:I});const Se=id({abi:F,args:L,data:I,functionName:q});T.push(i?{result:Se,status:"success"}:Se)}catch(Se){const X=qp(Se,{abi:F,address:j,args:L,docsPath:"/docs/contract/multicall",functionName:q});if(!i)throw X;T.push({error:X,result:void 0,status:"failure"})}}}if(T.length!==d.length)throw new Ce("multicall results mismatch");return T}async function G5(t,e){const{blockNumber:n,blockTag:r=t.experimental_blockTag??"latest",blocks:i,returnFullTransactions:s,traceTransfers:a,validation:l}=e;try{const u=[];for(const g of i){const w=g.blockOverrides?fO(g.blockOverrides):void 0,A=g.calls.map(x=>{const T=x,O=T.account?ji(T.account):void 0,k=T.abi?$s(T):T.data,P={...T,data:T.dataSuffix?Ho([k||"0x",T.dataSuffix]):k,from:T.from??(O==null?void 0:O.address)};return By(P),Ov(P)}),v=g.stateOverrides?XC(g.stateOverrides):void 0;u.push({blockOverrides:w,calls:A,stateOverrides:v})}const h=(typeof n=="bigint"?Ue(n):void 0)||r;return(await t.request({method:"eth_simulateV1",params:[{blockStateCalls:u,returnFullTransactions:s,traceTransfers:a,validation:l},h]})).map((g,w)=>({...BO(g),calls:g.calls.map((A,v)=>{var F,j;const{abi:x,args:T,functionName:O,to:k}=i[w].calls[v],P=((F=A.error)==null?void 0:F.data)??A.returnData,B=BigInt(A.gasUsed),U=(j=A.logs)==null?void 0:j.map(q=>ic(q)),I=A.status==="0x1"?"success":"failure",R=x&&I==="success"&&P!=="0x"?id({abi:x,data:P,functionName:O}):null,M=(()=>{var L;if(I==="success")return;let q;if(((L=A.error)==null?void 0:L.data)==="0x"?q=new Ry:A.error&&(q=new Iv(A.error)),!!q)return qp(q,{abi:x??[],address:k??"0x",args:T,functionName:O??"<unknown>"})})();return{data:P,gasUsed:B,logs:U,status:I,...I==="success"?{result:R}:{error:M}}})}))}catch(u){const d=u,h=YC(d,{});throw h instanceof Nv?d:h}}function Q5(t){let e=!0,n="",r=0,i="",s=!1;for(let a=0;a<t.length;a++){const l=t[a];if(["(",")",","].includes(l)&&(e=!0),l==="("&&r++,l===")"&&r--,!!e){if(r===0){if(l===" "&&["event","function","error",""].includes(i))i="";else if(i+=l,l===")"){s=!0;break}continue}if(l===" "){t[a-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}i+=l,n+=l}}if(!s)throw new At("Unable to normalize signature.");return i}function K5(t,e){const n=typeof t,r=e.type;switch(r){case"address":return H5(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>K5(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(t)&&t.every(i=>K5(i,{...e,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function TB(t,e,n){for(const r in t){const i=t[r],s=e[r];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return TB(i.components,s.components,n[r]);const a=[i.type,s.type];if(a.includes("address")&&a.includes("bytes20")?!0:a.includes("address")&&a.includes("string")?H5(n[r],{strict:!1}):a.includes("address")&&a.includes("bytes")?H5(n[r],{strict:!1}):!1)return a}}function SB(t,e={}){const{prepare:n=!0}=e,r=Array.isArray(t)||typeof t=="string"?mI(t):t;return{...r,...n?{hash:vh(r)}:{}}}function Uv(t,e,n){const{args:r=[],prepare:i=!0}=n??{},s=dG(e,{strict:!1}),a=t.filter(d=>s?d.type==="function"||d.type==="error"?IB(d)===Bo(e,0,4):d.type==="event"?vh(d)===e:!1:"name"in d&&d.name===e);if(a.length===0)throw new Cw({name:e});if(a.length===1)return{...a[0],...i?{hash:vh(a[0])}:{}};let l;for(const d of a){if(!("inputs"in d))continue;if(!r||r.length===0){if(!d.inputs||d.inputs.length===0)return{...d,...i?{hash:vh(d)}:{}};continue}if(!d.inputs||d.inputs.length===0||d.inputs.length!==r.length)continue;if(r.every((m,g)=>{const w="inputs"in d&&d.inputs[g];
1689return w?K5(m,w):!1})){if(l&&"inputs"in l&&l.inputs){const m=TB(d.inputs,l.inputs,r);if(m)throw new dY({abiItem:d,type:m[0]},{abiItem:l,type:m[1]})}l=d}}const u=(()=>{if(l)return l;const[d,...h]=a;return{...d,overloads:h}})();if(!u)throw new Cw({name:e});return{...u,...i?{hash:vh(u)}:{}}}function IB(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return Uv(n,r)}return t[0]})();return Bo(vh(e),0,4)}function fY(...t){const e=(()=>{if(Array.isArray(t[0])){const[r,i]=t;return Uv(r,i)}return t[0]})(),n=typeof e=="string"?e:V5(e);return Q5(n)}function vh(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return Uv(n,r)}return t[0]})();return typeof e!="string"&&"hash"in e&&e.hash?e.hash:gB(QC(fY(e)))}class dY extends At{constructor(e,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${Q5(V5(e.abiItem))}\`, and`,`\`${n.type}\` in \`${Q5(V5(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class Cw extends At{constructor({name:e,data:n,type:r="item"}){const i=e?` with name "${e}"`:n?` with data "${n}"`:"";super(`ABI ${r}${i} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function hY(...t){var s;const[e,n]=(()=>{if(Array.isArray(t[0])){const[a,l]=t;return[mY(a),l]}return t})(),{bytecode:r,args:i}=n;return zs(r,(s=e.inputs)!=null&&s.length&&(i!=null&&i.length)?d2(e.inputs,i):"0x")}function pY(t){return SB(t)}function mY(t){const e=t.find(n=>n.type==="constructor");if(!e)throw new Cw({name:"constructor"});return e}function gY(...t){const[e,n=[]]=(()=>{if(Array.isArray(t[0])){const[d,h,m]=t;return[SI(d,h,{args:m}),m]}const[l,u]=t;return[l,u]})(),{overloads:r}=e,i=r?SI([e,...r],e.name,{args:n}):e,s=yY(i),a=n.length>0?d2(i.inputs,n):void 0;return a?zs(s,a):s}function th(t,e={}){return SB(t,e)}function SI(t,e,n){const r=Uv(t,e,n);if(r.type!=="function")throw new Cw({name:e,type:"function"});return r}function yY(t){return IB(t)}const bY="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",uo="0x0000000000000000000000000000000000000000",wY="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function vY(t,e){const{blockNumber:n,blockTag:r,calls:i,stateOverrides:s,traceAssetChanges:a,traceTransfers:l,validation:u}=e,d=e.account?ji(e.account):void 0;if(a&&!d)throw new Ce("`account` is required when `traceAssetChanges` is true");const h=d?hY(pY("constructor(bytes, bytes)"),{bytecode:dO,args:[wY,gY(th("function getBalance(address)"),[d.address])]}):void 0,m=a?await Promise.all(e.calls.map(async J=>{if(!J.data&&!J.abi)return;const{accessList:fe}=await EO(t,{account:d.address,...J,data:J.abi?$s(J):J.data});return fe.map(({address:$,storageKeys:se})=>se.length>0?$:null)})).then(J=>J.flat().filter(Boolean)):[],g=await G5(t,{blockNumber:n,blockTag:r,blocks:[...a?[{calls:[{data:h}],stateOverrides:s},{calls:m.map((J,fe)=>({abi:[th("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[d.address],to:J,from:uo,nonce:fe})),stateOverrides:[{address:uo,nonce:0}]}]:[],{calls:[...i,{}].map(J=>({...J,from:d==null?void 0:d.address})),stateOverrides:s},...a?[{calls:[{data:h}]},{calls:m.map((J,fe)=>({abi:[th("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[d.address],to:J,from:uo,nonce:fe})),stateOverrides:[{address:uo,nonce:0}]},{calls:m.map((J,fe)=>({to:J,abi:[th("function decimals() returns (uint256)")],functionName:"decimals",from:uo,nonce:fe})),stateOverrides:[{address:uo,nonce:0}]},{calls:m.map((J,fe)=>({to:J,abi:[th("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:uo,nonce:fe})),stateOverrides:[{address:uo,nonce:0}]},{calls:m.map((J,fe)=>({to:J,abi:[th("function symbol() returns (string)")],functionName:"symbol",from:uo,nonce:fe})),stateOverrides:[{address:uo,nonce:0}]}]:[]],traceTransfers:l,validation:u}),w=a?g[2]:g[0],[A,v,,x,T,O,k,P]=a?g:[],{calls:B,...U}=w,I=B.slice(0,-1)??[],R=(A==null?void 0:A.calls)??[],M=(v==null?void 0:v.calls)??[],F=[...R,...M].map(J=>J.status==="success"?Vo(J.data):null),j=(x==null?void 0:x.calls)??[],q=(T==null?void 0:T.calls)??[],L=[...j,...q].map(J=>J.status==="success"?Vo(J.data):null),Se=((O==null?void 0:O.calls)??[]).map(J=>J.status==="success"?J.result:null),X=((P==null?void 0:P.calls)??[]).map(J=>J.status==="success"?J.result:null),Q=((k==null?void 0:k.calls)??[]).map(J=>J.status==="success"?J.result:null),te=[];for(const[J,fe]of L.entries()){const $=F[J];if(typeof fe!="bigint"||typeof $!="bigint")continue;const se=Se[J-1],ye=X[J-1],pe=Q[J-1],me=J===0?{address:bY,decimals:18,symbol
vendor: 27,225 bytes, line 1689
1689:"ETH"}:{address:m[J-1],decimals:pe||se?Number(se??1):void 0,symbol:ye??void 0};te.some(ve=>ve.token.address===me.address)||te.push({token:me,value:{pre:$,post:fe,diff:fe-$}})}return{assetChanges:te,block:U,results:I}}async function AY(t,e){const{abi:n,address:r,args:i,dataSuffix:s,functionName:a,...l}=e,u=l.account?ji(l.account):t.account,d=$s({abi:n,args:i,functionName:a});try{const{data:h}=await Je(t,Bv,"call")({batch:!1,data:`${d}${s?s.replace("0x",""):""}`,to:r,...l,account:u}),m=id({abi:n,args:i,functionName:a,data:h||"0x"}),g=n.filter(w=>"name"in w&&w.name===e.functionName);return{result:m,request:{abi:g,address:r,args:i,dataSuffix:s,functionName:a,...l,account:u}}}catch(h){throw qp(h,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:a,sender:u==null?void 0:u.address})}}async function Fv(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}const RB="0x6492649264926492649264926492649264926492649264926492649264926492";function EY(t){if(Bo(t,-32)!==RB)throw new _Y(t)}function xY(t){const{data:e,signature:n,to:r}=t;return zs(d2(wB("address, bytes, bytes"),[r,e,n]),RB)}function CY(t){try{return EY(t),!0}catch{return!1}}class _Y extends At{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}let kB=class extends MC{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,MH(e);const r=xv(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(let a=0;a<s.length;a++)s[a]^=54;this.iHash.update(s),this.oHash=e.create();for(let a=0;a<s.length;a++)s[a]^=106;this.oHash.update(s),Vp(s)}update(e){return Fp(this),this.iHash.update(e),this}digestInto(e){Fp(this),jf(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:i,destroyed:s,blockLen:a,outputLen:l}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=a,e.outputLen=l,e.oHash=n._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const NB=(t,e,n)=>new kB(t,e).update(n).digest();NB.create=(t,e)=>new kB(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const y2=BigInt(0),W5=BigInt(1);function My(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function b2(t){if(!My(t))throw new Error("Uint8Array expected")}function Dg(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Cb(t){const e=t.toString(16);return e.length&1?"0"+e:e}function OB(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?y2:BigInt("0x"+t)}const BB=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",TY=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Mg(t){if(b2(t),BB)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=TY[t[n]];return e}const Ca={_0:48,_9:57,A:65,F:70,a:97,f:102};function II(t){if(t>=Ca._0&&t<=Ca._9)return t-Ca._0;if(t>=Ca.A&&t<=Ca.F)return t-(Ca.A-10);if(t>=Ca.a&&t<=Ca.f)return t-(Ca.a-10)}function _w(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(BB)return Uint8Array.fromHex(t);const e=t.length,n=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const a=II(t.charCodeAt(s)),l=II(t.charCodeAt(s+1));if(a===void 0||l===void 0){const u=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+s)}r[i]=a*16+l}return r}function Bf(t){return OB(Mg(t))}function PB(t){return b2(t),OB(Mg(Uint8Array.from(t).reverse()))}function jy(t,e){return _w(t.toString(16).padStart(e*2,"0"))}function DB(t,e){return jy(t,e).reverse()}function rs(t,e,n){let r;if(typeof e=="string")try{r=_w(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(My(e))r=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(t+" of length "+n+" expected, got "+i);return r}function Tw(...t){let e=0;for(let r=0;r<t.length;r++){const i=t[r];b2(i),e+=i.length}const n=new Uint8Array(e);for(let r=0,i=0;r<t.length;r++){const s=t[r];n.set(s,i),i+=s.length}return n}const i3=t=>typeof t=="bigint"&&y2<=t;function w2(t,e,n){return i3(t)&&i3(e)&&i3(n)&&e<=t&&t<n}function Rh(t,e,n,r){if(!w2(e,n,r))throw new Error("expected valid "+t+": "+n+" <= n < "+r+", got "+e)}function SY(t){let e;for(e=0;t>y2;t>>=W5,e+=1);return e}const Vv=t=>(W5<<BigInt(t))-W5,s3=t=>new Uint8Array(t),RI=t=>Uint8Array.from(t);function IY(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=s3(t),i=s3(t),s=0;const a=()=>{r.fill(1),i.fill(0),s=0},l=(...m)=>n(i,r,...m),u=(m=s3(0))=>{i=l(RI([0]),m),r=l(),m.length!==0&&(i=l(RI([1]),m),r=l())},d=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let m=0;const g=[];for(;m<e;){r=l();const w=r.slice();g.push(w),m+=r.length}return Tw(...g)};return(m,g)=>{a(),u(m);let w;for(;!(w=g(d()));)u();return a(),w}}const RY={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||My(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function zv(t,e,n={}){const r=(i,s,a)=>{const l=RY[s];if(typeof l!="function")throw new Error("invalid validator function");const u=t[i];if(!(a&&u===void 0)&&!l(u,t))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+u)};for(const[i,s]of Object.entries(e))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return t}function kI(t){const e=new WeakMap;return(n,...r)=>{const i=e.get(n);if(i!==void 0)return i;const s=t(n,...r);return e.set(n,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ci=BigInt(0),Gr=BigInt(1),Qu=BigInt(2),kY=BigInt(3),MB=BigInt(4),jB=BigInt(5),LB=BigInt(8);function ii(t,e){const n=t%e;return n>=ci?n:e+n}function Zi(t,e,n){let r=t;for(;e-- >ci;)r*=r,r%=n;return r}function Y5(t,e){if(t===ci)throw new Error("invert: expected non-zero number");if(e<=ci)throw new Error("invert: expected positive modulus, got "+e);let n=ii(t,e),r=e,i=ci,s=Gr;for(;n!==ci;){const l=r/n,u=r%n,d=i-s*l;r=n,n=u,i=s,s=d}if(r!==Gr)throw new Error("invert: does not exist");return ii(i,e)}function UB(t,e){const n=(t.ORDER+Gr)/MB,r=t.pow(e,n);if(!t.eql(t.sqr(r),e))throw new Error("Cannot find square root");return r}function NY(t,e){const n=(t.ORDER-jB)/LB,r=t.mul(e,Qu),i=t.pow(r,n),s=t.mul(e,i),a=t.mul(t.mul(s,Qu),i),l=t.mul(s,t.sub(a,t.ONE));if(!t.eql(t.sqr(l),e))throw new Error("Cannot find square root");return l}function OY(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-Gr,n=0;for(;e%Qu===ci;)e/=Qu,n++;let r=Qu;const i=v2(t);for(;NI(i,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return UB;let s=i.pow(r,e);const a=(e+Gr)/Qu;return function(u,d){if(u.is0(d))return d;if(NI(u,d)!==1)throw new Error("Cannot find square root");let h=n,m=u.mul(u.ONE,s),g=u.pow(d,e),w=u.pow(d,a);for(;!u.eql(g,u.ONE);){if(u.is0(g))return u.ZERO;let A=1,v=u.sqr(g);for(;!u.eql(v,u.ONE);)if(A++,v=u.sqr(v),A===h)throw new Error("Cannot find square root");const x=Gr<<BigInt(h-A-1),T=u.pow(m,x);h=A,m=u.sqr(T),g=u.mul(g,m),w=u.mul(w,T)}return w}}function BY(t){return t%MB===kY?UB:t%LB===jB?NY:OY(t)}const PY=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function DY(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=PY.reduce((r,i)=>(r[i]="function",r),e);return zv(t,n)}function MY(t,e,n){if(n<ci)throw new Error("invalid exponent, negatives unsupported");if(n===ci)return t.ONE;if(n===Gr)return e;let r=t.ONE,i=e;for(;n>ci;)n&Gr&&(r=t.mul(r,i)),i=t.sqr(i),n>>=Gr;return r}function FB(t,e,n=!1){const r=new Array(e.length).fill(n?t.ZERO:void 0),i=e.reduce((a,l,u)=>t.is0(l)?a:(r[u]=a,t.mul(a,l)),t.ONE),s=t.inv(i);return e.reduceRight((a,l,u)=>t.is0(l)?a:(r[u]=t.mul(a,r[u]),t.mul(a,l)),s),r}function NI(t,e){const n=(t.ORDER-Gr)/Qu,r=t.pow(e,n),i=t.eql(r,t.ONE),s=t.eql(r,t.ZERO),a=t.eql(r,t.neg(t.ONE));if(!i&&!s&&!a)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function VB(t,e){e!==void 0&&pg(e);const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function v2(t,e,n=!1,r={}){if(t<=ci)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:s}=VB(t,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const l=Object.freeze({ORDER:t,isLE:n,BITS:i,BYTES:s,MASK:Vv(i),ZERO:ci,ONE:Gr,create:u=>ii(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return ci<=u&&u<t},is0:u=>u===ci,isOdd:u=>(u&Gr)===Gr,neg:u=>ii(-u,t),eql:(u,d)=>u===d,sqr:u=>ii(u*u,t),add:(u,d)=>ii(u+d,t),sub:(u,d)=>ii(u-d,t),mul:(u,d)=>ii(u*d,t),pow:(u,d)=>MY(l,u,d),div:(u,d)=>ii(u*Y5(d,t),t),sqrN:u=>u*u,addN:(u,d)=>u+d,subN:(u,d)=>u-d,mulN:(u,d)=>u*d,inv:u=>Y5(u,t),sqrt:r.sqrt||(u=>(a||(a=BY(t)),a(l,u))),toBytes:u=>n?DB(u,s):jy(u,s),fromBytes:u=>{if(u.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+u.length);return n?PB(u):Bf(u)},invertBatch:u=>FB(l,u),cmov:(u,d,h)=>h?d:u});return Object.freeze(l)}function zB(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function HB(t){const e=zB(t);return e+Math.ceil(e/2)}function jY(t,e,n=!1){const r=t.length,i=zB(e),s=HB(e);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const a=n?PB(t):Bf(t),l=ii(a,e-Gr)+Gr;return n?DB(l,i):jy(l,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const OI=BigInt(0),J5=BigInt(1);function o3(t,e){const n=e.negate();return t?n:e}function qB(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function a3(t,e){qB(t,e);const n=Math.ceil(e/t)+1,r=2**(t-1),i=2**t,s=Vv(t),a=BigInt(t);return{windows:n,windowSize:r,mask:s,maxNumber:i,shiftBy:a}}function BI(t,e,n){const{windowSize:r,mask:i,maxNumber:s,shiftBy:a}=n;let l=Number(t&i),u=t>>a;l>r&&(l-=s,u+=J5);const d=e*r,h=d+Math.abs(l)-1,m=l===0,g=l<0,w=e%2!==0;return{nextN:u,offset:h,isZero:m,isNeg:g,isNegF:w,offsetF:d}}function LY(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((n,r)=>{if(!(n instanceof e))throw new Error("invalid point at index "+r)})}function UY(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((n,r)=>{if(!e.isValid(n))throw new Error("invalid scalar at index "+r)})}const c3=new WeakMap,$B=new WeakMap;function l3(t){return $B.get(t)||1}function FY(t,e){return{constTimeNegate:o3,hasPrecomputes(n){return l3(n)!==1},unsafeLadder(n,r,i=t.ZERO){let s=n;for(;r>OI;)r&J5&&(i=i.add(s)),s=s.double(),r>>=J5;return i},precomputeWindow(n,r){const{windows:i,windowSize:s}=a3(r,e),a=[];let l=n,u=l;for(let d=0;d<i;d++){u=l,a.push(u);for(let h=1;h<s;h++)u=u.add(l),a.push(u);l=u.double()}return a},wNAF(n,r,i){let s=t.ZERO,a=t.BASE;const l=a3(n,e);for(let u=0;u<l.windows;u++){const{nextN:d,offset:h,isZero:m,isNeg:g,isNegF:w,offsetF:A}=BI(i,u,l);i=d,m?a=a.add(o3(w,r[A])):s=s.add(o3(g,r[h]))}return{p:s,f:a}},wNAFUnsafe(n,r,i,s=t.ZERO){const a=a3(n,e);for(let l=0;l<a.windows&&i!==OI;l++){const{nextN:u,offset:d,isZero:h,isNeg:m}=BI(i,l,a);if(i=u,!h){const g=r[d];s=s.add(m?g.negate():g)}}return s},getPrecomputes(n,r,i){let s=c3.get(r);return s||(s=this.precomputeWindow(r,n),n!==1&&c3.set(r,i(s))),s},wNAFCached(n,r,i){const s=l3(n);return this.wNAF(s,this.getPrecomputes(s,n,i),r)},wNAFCachedUnsafe(n,r,i,s){const a=l3(n);return a===1?this.unsafeLadder(n,r,s):this.wNAFUnsafe(a,this.getPrecomputes(a,n,i),r,s)},setWindowSize(n,r){qB(r,e),$B.set(n,r),c3.delete(n)}}}function VY(t,e,n,r){LY(n,t),UY(r,e);const i=n.length,s=r.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const a=t.ZERO,l=SY(BigInt(i));let u=1;l>12?u=l-3:l>4?u=l-2:l>0&&(u=2);const d=Vv(u),h=new Array(Number(d)+1).fill(a),m=Math.floor((e.BITS-1)/u)*u;let g=a;for(let w=m;w>=0;w-=u){h.fill(a);for(let v=0;v<s;v++){const x=r[v],T=Number(x>>BigInt(w)&d);h[T]=h[T].add(n[v])}let A=a;for(let v=h.length-1,x=a;v>0;v--)x=x.add(h[v]),A=A.add(x);if(g=g.add(A),w!==0)for(let v=0;v<u;v++)g=g.double()}return g}function GB(t){return DY(t.Fp),zv(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...VB(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function PI(t){t.lowS!==void 0&&Dg("lowS",t.lowS),t.prehash!==void 0&&Dg("prehash",t.prehash)}function zY(t){const e=GB(t);zv(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:i}=e;if(n){if(!r.eql(i,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}class HY extends Error{constructor(e=""){super(e)}}const Ra={Err:HY,_tlv:{encode:(t,e)=>{const{Err:n}=Ra;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length&1)throw new n("tlv.encode: unpadded data");const r=e.length/2,i=Cb(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?Cb(i.length/2|128):"";return Cb(t)+s+i+e},decode(t,e){const{Err:n}=Ra;let r=0;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length<2||e[r++]!==t)throw new n("tlv.decode: wrong tlv");const i=e[r++],s=!!(i&128);let a=0;if(!s)a=i;else{const u=i&127;if(!u)throw new n("tlv.decode(long): indefinite length not supported");if(u>4)throw new n("tlv.decode(long): byte length is too big");const d=e.subarray(r,r+u);if(d.length!==u)throw new n("tlv.decode: length bytes not complete");if(d[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const h of d)a=a<<8|h;if(r+=u,a<128)throw new n("tlv.decode(long): not minimal encoding")}const l=e.subarray(r,r+a);if(l.length!==a)throw new n("tlv.decode: wrong value length");return{v:l,l:e.subarray(r+a)}}},_int:{encode(t){const{Err:e}=Ra;if(t<Ga)throw new e("integer: negative integers are not allowed");let n=Cb(t);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return n},decode(t){const{Err:e}=Ra;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return Bf(t)}},toSig(t){const{Err:e,_int:n,_tlv:r}=Ra,i=rs("signature",t),{v:s,l:a}=r.decode(48,i);if(a.length)throw new e("invalid signature: left bytes after parsing");const{v:l,l:u}=r.decode(2,s),{v:d,l:h}=r.decode(2,u);if(h.length)throw new e("invalid signature: left bytes after parsing");return{r:n.decode(l),s:n.decode(d)}},hexFromSig(t){const{_tlv:e,_int:n}=Ra,r=e.encode(2,n.encode(t.r)),i=e.encode(2,n.encode(t.s)),s=r+i;return e.encode(48,s)}};function u3(t,e){return Mg(jy(t,e))}const Ga=BigInt(0),Jn=BigInt(1);BigInt(2);const f3=BigInt(3),qY=BigInt(4);function $Y(t){const e=zY(t),{Fp:n}=e,r=v2(e.n,e.nBitLength),i=e.toBytes||((k,P,B)=>{const U=P.toAffine();return Tw(Uint8Array.from([4]),n.toBytes(U.x),n.toBytes(U.y))}),s=e.fromBytes||(k=>{const P=k.subarray(1),B=n.fromBytes(P.subarray(0,n.BYTES)),U=n.fromBytes(P.subarray(n.BYTES,2*n.BYTES));return{x:B,y:U}});function a(k){const{a:P,b:B}=e,U=n.sqr(k),I=n.mul(U,k);return n.add(n.add(I,n.mul(k,P)),B)}function l(k,P){const B=n.sqr(P),U=a(k);return n.eql(B,U)}if(!l(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const u=n.mul(n.pow(e.a,f3),qY),d=n.mul(n.sqr(e.b),BigInt(27));if(n.is0(n.add(u,d)))throw new Error("bad curve params: a or b");function h(k){return w2(k,Jn,e.n)}function m(k){const{allowedPrivateKeyLengths:P,nByteLength:B,wrapPrivateKey:U,n:I}=e;if(P&&typeof k!="bigint"){if(My(k)&&(k=Mg(k)),typeof k!="string"||!P.includes(k.length))throw new Error("invalid private key");k=k.padStart(B*2,"0")}let R;try{R=typeof k=="bigint"?k:Bf(rs("private key",k,B))}catch{throw new Error("invalid private key, expected hex or "+B+" bytes, got "+typeof k)}return U&&(R=ii(R,I)),Rh("private key",R,Jn,I),R}function g(k){if(!(k instanceof v))throw new Error("ProjectivePoint expected")}const w=kI((k,P)=>{const{px:B,py:U,pz:I}=k;if(n.eql(I,n.ONE))return{x:B,y:U};const R=k.is0();P==null&&(P=R?n.ONE:n.inv(I));const M=n.mul(B,P),F=n.mul(U,P),j=n.mul(I,P);if(R)return{x:n.ZERO,y:n.ZERO};if(!n.eql(j,n.ONE))throw new Error("invZ was invalid");return{x:M,y:F}}),A=kI(k=>{if(k.is0()){if(e.allowInfinityPoint&&!n.is0(k.py))return;throw new Error("bad point: ZERO")}const{x:P,y:B}=k.toAffine();if(!n.isValid(P)||!n.isValid(B))throw new Error("bad point: x or y not FE");if(!l(P,B))throw new Error("bad point: equation left != right");if(!k.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class v{constructor(P,B,U){if(P==null||!n.isValid(P))throw new Error("x required");if(B==null||!n.isValid(B)||n.is0(B))throw new Error("y required");if(U==null||!n.isValid(U))throw new Error("z required");this.px=P,this.py=B,this.pz=U,Object.freeze(this)}static fromAffine(P){const{x:B,y:U}=P||{};if(!P||!n.isValid(B)||!n.isValid(U))throw new Error("invalid affine point");if(P instanceof v)throw new Error("projective point not allowed");const I=R=>n.eql(R,n.ZERO);return I(B)&&I(U)?v.ZERO:new v(B,U,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(P){const B=FB(n,P.map(U=>U.pz));return P.map((U,I)=>U.toAffine(B[I])).map(v.fromAffine)}static fromHex(P){const B=v.fromAffine(s(rs("pointHex",P)));return B.assertValidity(),B}static fromPrivateKey(P){return v.BASE.multiply(m(P))}static msm(P,B){return VY(v,r,P,B)}_setWindowSize(P){O.setWindowSize(this,P)}assertValidity(){A(this)}hasEvenY(){const{y:P}=this.toAffine();if(n.isOdd)return!n.isOdd(P);throw new Error("Field doesn't support isOdd")}equals(P){g(P);const{px:B,py:U,pz:I}=this,{px:R,py:M,pz:F}=P,j=n.eql(n.mul(B,F),n.mul(R,I)),q=n.eql(n.mul(U,F),n.mul(M,I));return j&&q}negate(){return new v(this.px,n.neg(this.py),this.pz)}double(){const{a:P,b:B}=e,U=n.mul(B,f3),{px:I,py:R,pz:M}=this;let F=n.ZERO,j=n.ZERO,q=n.ZERO,L=n.mul(I,I),Se=n.mul(R,R),X=n.mul(M,M),Q=n.mul(I,R);return Q=n.add(Q,Q),q=n.mul(I,M),q=n.add(q,q),F=n.mul(P,q),j=n.mul(U,X),j=n.add(F,j),F=n.sub(Se,j),j=n.add(Se,j),j=n.mul(F,j),F=n.mul(Q,F),q=n.mul(U,q),X=n.mul(P,X),Q=n.sub(L,X),Q=n.mul(P,Q),Q=n.add(Q,q),q=n.add(L,L),L=n.add(q,L),L=n.add(L,X),L=n.mul(L,Q),j=n.add(j,L),X=n.mul(R,M),X=n.add(X,X),L=n.mul(X,Q),F=n.sub(F,L),q=n.mul(X,Se),q=n.add(q,q),q=n.add(q,q),new v(F,j,q)}add(P){g(P);const{px:B,py:U,pz:I}=this,{px:R,py:M,pz:F}=P;let j=n.ZERO,q=n.ZERO,L=n.ZERO;const Se=e.a,X=n.mul(e.b,f3);let Q=n.mul(B,R),te=n.mul(U,M),J=n.mul(I,F),fe=n.add(B,U),$=n.add(R,M);fe=n.mul(fe,$),$=n.add(Q,te),fe=n.sub(fe,$),$=n.add(B,I);let se=n.add(R,F);return $=n.mul($,se),se=n.add(Q,J),$=n.sub($,se),se=n.add(U,I),j=n.add(M,F),se=n.mul(se,j),j=n.add(te,J),se=n.sub(se,j),L=n.mul(Se,$),j=n.mul(X,J),L=n.add(j,L),j=n.sub(te,L),L=n.add(te,L),q=n.mul(j,L),te=n.add(Q,Q),te=n.add(te,Q),J=n.mul(Se,J),$=n.mul(X,$),te=n.add(te,J),J=n.sub(Q,J),J=n.mul(Se,J),$=n.add($,J),Q=n.mul(te,$),q=n.add(q,Q),Q=n.mul(se,$),j=n.mul(fe,j),j=n.sub(j,Q),Q=n.mul(fe,te),L=n.mul(se,L),L=n.add(L,Q),new v(j,q,L)}subtract(P){return this.add(P.negate())}is0(){return this.equals(v.ZERO)}wNAF(P){return O.wNAFCached(this,P,v.normalizeZ)}multiplyUnsafe(P){const{endo:B,n:U}=e;Rh("scalar",P,Ga,U);const I=v.ZERO;if(P===Ga)return I;if(this.is0()||P===Jn)return this;if(!B||O.hasPrecomputes(this))return O.wNAFCachedUnsafe(this,P,v.normalizeZ);let{k1neg:R,k1:M,k2neg:F,k2:j}=B.splitScalar(P),q=I,L=I,Se=this;for(;M>Ga||j>Ga;)M&Jn&&(q=q.add(Se)),j&Jn&&(L=L.add(Se)),Se=Se.double(),M>>=Jn,j>>=Jn;return R&&(q=q.negate()),F&&(L=L.negate()),L=new v(n.mul(L.px,B.beta),L.py,L.pz),q.add(L)}multiply(P){const{endo:B,n:U}=e;Rh("scalar",P,Jn,U);let I,R;if(B){const{k1neg:M,k1:F,k2neg:j,k2:q}=B.splitScalar(P);let{p:L,f:Se}=this.wNAF(F),{p:X,f:Q}=this.wNAF(q);L=O.constTimeNegate(M,L),X=O.constTimeNegate(j,X),X=new v(n.mul(X.px,B.beta),X.py,X.pz),I=L.add(X),R=Se.add(Q)}else{const{p:M,f:F}=this.wNAF(P);I=M,R=F}return v.normalizeZ([I,R])[0]}multiplyAndAddUnsafe(P,B,U){const I=v.BASE,R=(F,j)=>j===Ga||j===Jn||!F.equals(I)?F.multiplyUnsafe(j):F.multiply(j),M=R(this,B).add(R(P,U));return M.is0()?void 0:M}toAffine(P){return w(this,P)}isTorsionFree(){const{h:P,isTorsionFree:B}=e;if(P===Jn)return!0;if(B)return B(v,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:P,clearCofactor:B}=e;return P===Jn?this:B?B(v,this):this.multiplyUnsafe(e.h)}toRawBytes(P=!0){return Dg("isCompressed",P),this.assertValidity(),i(v,this,P)}toHex(P=!0){return Dg("isCompressed",P),Mg(this.toRawBytes(P))}}v.BASE=new v(e.Gx,e.Gy,n.ONE),v.ZERO=new v(n.ZERO,n.ONE,n.ZERO);const{endo:x,nBitLength:T}=e,O=FY(v,x?Math.ceil(T/2):T);return{CURVE:e,ProjectivePoint:v,normPrivateKeyToScalar:m,weierstrassEquation:a,isWithinCurveOrder:h}}function GY(t){const e=GB(t);return zv(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function QY(t){const e=GY(t),{Fp:n,n:r,nByteLength:i,nBitLength:s}=e,a=n.BYTES+1,l=2*n.BYTES+1;function u(X){return ii(X,r)}function d(X){return Y5(X,r)}const{ProjectivePoint:h,normPrivateKeyToScalar:m,weierstrassEquation:g,isWithinCurveOrder:w}=$Y({...e,toBytes(X,Q,te){const J=Q.toAffine(),fe=n.toBytes(J.x),$=Tw;return Dg("isCompressed",te),te?$(Uint8Array.from([Q.hasEvenY()?2:3]),fe):$(Uint8Array.from([4]),fe,n.toBytes(J.y))},fromBytes(X){const Q=X.length,te=X[0],J=X.subarray(1);if(Q===a&&(te===2||te===3)){const fe=Bf(J);if(!w2(fe,Jn,n.ORDER))throw new Error("Point is not on curve");const $=g(fe);let se;try{se=n.sqrt($)}catch(me){const ve=me instanceof Error?": "+me.message:"";throw new Error("Point is not on curve"+ve)}const ye=(se&Jn)===Jn;return(te&1)===1!==ye&&(se=n.neg(se)),{x:fe,y:se}}else if(Q===l&&te===4){const fe=n.fromBytes(J.subarray(0,n.BYTES)),$=n.fromBytes(J.subarray(n.BYTES,2*n.BYTES));return{x:fe,y:$}}else{const fe=a,$=l;throw new Error("invalid Point, expected length of "+fe+", or uncompressed "+$+", got "+Q)}}});function A(X){const Q=r>>Jn;return X>Q}function v(X){return A(X)?u(-X):X}const x=(X,Q,te)=>Bf(X.slice(Q,te));class T{constructor(Q,te,J){Rh("r",Q,Jn,r),Rh("s",te,Jn,r),this.r=Q,this.s=te,J!=null&&(this.recovery=J),Object.freeze(this)}static fromCompact(Q){const te=i;return Q=rs("compactSignature",Q,te*2),new T(x(Q,0,te),x(Q,te,2*te))}static fromDER(Q){const{r:te,s:J}=Ra.toSig(rs("DER",Q));return new T(te,J)}assertValidity(){}addRecoveryBit(Q){return new T(this.r,this.s,Q)}recoverPublicKey(Q){const{r:te,s:J,recovery:fe}=this,$=I(rs("msgHash",Q));if(fe==null||![0,1,2,3].includes(fe))throw new Error("recovery id invalid");const se=fe===2||fe===3?te+e.n:te;if(se>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ye=(fe&1)===0?"02":"03",pe=h.fromHex(ye+u3(se,n.BYTES)),me=d(se),ve=u(-$*me),_e=u(J*me),Re=h.BASE.multiplyAndAddUnsafe(pe,ve,_e);if(!Re)throw new Error("point at infinify");return Re.assertValidity(),Re}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return _w(this.toDERHex())}toDERHex(){return Ra.hexFromSig(this)}toCompactRawBytes(){return _w(this.toCompactHex())}toCompactHex(){const Q=i;return u3(this.r,Q)+u3(this.s,Q)}}const O={isValidPrivateKey(X){try{return m(X),!0}catch{return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const X=HB(e.n);return jY(e.randomBytes(X),e.n)},precompute(X=8,Q=h.BASE){return Q._setWindowSize(X),Q.multiply(BigInt(3)),Q}};function k(X,Q=!0){return h.fromPrivateKey(X).toRawBytes(Q)}function P(X){if(typeof X=="bigint")return!1;if(X instanceof h)return!0;const te=rs("key",X).length,J=n.BYTES,fe=J+1,$=2*J+1;if(!(e.allowedPrivateKeyLengths||i===fe))return te===fe||te===$}function B(X,Q,te=!0){if(P(X)===!0)throw new Error("first arg must be private key");if(P(Q)===!1)throw new Error("second arg must be public key");return h.fromHex(Q).multiply(m(X)).toRawBytes(te)}const U=e.bits2int||function(X){if(X.length>8192)throw new Error("input is too large");const Q=Bf(X),te=X.length*8-s;return te>0?Q>>BigInt(te):Q},I=e.bits2int_modN||function(X){return u(U(X))},R=Vv(s);function M(X){return Rh("num < 2^"+s,X,Ga,R),jy(X,i)}function F(X,Q,te=j){if(["recovered","canonical"].some(qe=>qe in te))throw new Error("sign() legacy options not supported");const{hash:J,randomBytes:fe}=e;let{lowS:$,prehash:se,extraEntropy:ye}=te;$==null&&($=!0),X=rs("msgHash",X),PI(te),se&&(X=rs("prehashed msgHash",J(X)));const pe=I(X),me=m(Q),ve=[M(me),M(pe)];if(ye!=null&&ye!==!1){const qe=ye===!0?fe(n.BYTES):ye;ve.push(rs("extraEntropy",qe))}const _e=Tw(...ve),Re=pe;function De(qe){const it=U(qe);if(!w(it))return;const Vt=d(it),Qe=h.BASE.multiply(it).toAffine(),et=u(Qe.x);if(et===Ga)return;const Pt=u(Vt*u(Re+et*me));if(Pt===Ga)return;let It=(Qe.x===et?0:2)|Number(Qe.y&Jn),nn=Pt;return $&&A(Pt)&&(nn=v(Pt),It^=1),new T(et,nn,It)}return{seed:_e,k2sig:De}}const j={lowS:e.lowS,prehash:!1},q={lowS:e.lowS,prehash:!1};function L(X,Q,te=j){const{seed:J,k2sig:fe}=F(X,Q,te),$=e;return IY($.hash.outputLen,$.nByteLength,$.hmac)(J,fe)}h.BASE._setWindowSize(8);function Se(X,Q,te,J=q){var It;const fe=X;Q=rs("msgHash",Q),te=rs("publicKey",te);const{lowS:$,prehash:se,format:ye}=J;if(PI(J),"strict"in J)throw new Error("options.strict was renamed to lowS");if(ye!==void 0&&ye!=="compact"&&ye!=="der")throw new Error("format must be compact or der");const pe=typeof fe=="string"||My(fe),me=!pe&&!ye&&typeof fe=="object"&&fe!==null&&typeof fe.r=="bigint"&&typeof fe.s=="bigint";if(!pe&&!me)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ve,_e;
1689try{if(me&&(ve=new T(fe.r,fe.s)),pe){try{ye!=="compact"&&(ve=T.fromDER(fe))}catch(nn){if(!(nn instanceof Ra.Err))throw nn}!ve&&ye!=="der"&&(ve=T.fromCompact(fe))}_e=h.fromHex(te)}catch{return!1}if(!ve||$&&ve.hasHighS())return!1;se&&(Q=e.hash(Q));const{r:Re,s:De}=ve,qe=I(Q),it=d(De),Vt=u(qe*it),Qe=u(Re*it),et=(It=h.BASE.multiplyAndAddUnsafe(_e,Vt,Qe))==null?void 0:It.toAffine();return et?u(et.x)===Re:!1}return{CURVE:e,getPublicKey:k,getSharedSecret:B,sign:L,verify:Se,ProjectivePoint:h,Signature:T,utils:O}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function KY(t){return{hash:t,hmac:(e,...n)=>NB(t,e,zH(...n)),randomBytes:HH}}function WY(t,e){const n=r=>QY({...t,...KY(r)});return{...n(e),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const QB=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),DI=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),YY=BigInt(0),JY=BigInt(1),X5=BigInt(2),MI=(t,e)=>(t+e/X5)/e;function XY(t){const e=QB,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),l=BigInt(44),u=BigInt(88),d=t*t*t%e,h=d*d*t%e,m=Zi(h,n,e)*h%e,g=Zi(m,n,e)*h%e,w=Zi(g,X5,e)*d%e,A=Zi(w,i,e)*w%e,v=Zi(A,s,e)*A%e,x=Zi(v,l,e)*v%e,T=Zi(x,u,e)*x%e,O=Zi(T,l,e)*v%e,k=Zi(O,n,e)*h%e,P=Zi(k,a,e)*A%e,B=Zi(P,r,e)*d%e,U=Zi(B,X5,e);if(!Z5.eql(Z5.sqr(U),t))throw new Error("Cannot find square root");return U}const Z5=v2(QB,void 0,void 0,{sqrt:XY}),KB=WY({a:YY,b:BigInt(7),Fp:Z5,n:DI,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=DI,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-JY*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,a=BigInt("0x100000000000000000000000000000000"),l=MI(s*t,e),u=MI(-r*t,e);let d=ii(t-l*n-u*i,e),h=ii(-l*r-u*s,e);const m=d>a,g=h>a;if(m&&(d=e-d),g&&(h=e-h),d>a||h>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:m,k1:d,k2neg:g,k2:h}}}},LO),ZY=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:KB},Symbol.toStringTag,{value:"Module"}));function eJ({r:t,s:e,to:n="hex",v:r,yParity:i}){const s=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),a=`0x${new KB.Signature(Vo(t),Vo(e)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?a:Vs(a)}async function Hv(t,e){var l,u,d,h,m,g;const{address:n,hash:r,erc6492VerifierAddress:i=e.universalSignatureVerifierAddress??((d=(u=(l=t.chain)==null?void 0:l.contracts)==null?void 0:u.erc6492Verifier)==null?void 0:d.address),multicallAddress:s=e.multicallAddress??((g=(m=(h=t.chain)==null?void 0:h.contracts)==null?void 0:m.multicall3)==null?void 0:g.address)}=e,a=(()=>{const w=e.signature;return Fo(w)?w:typeof w=="object"&&"r"in w&&"s"in w?eJ(w):Fn(w)})();try{return iY(a)?await tJ(t,{...e,multicallAddress:s,signature:a}):await nJ(t,{...e,verifierAddress:i,signature:a})}catch(w){try{if(Dv(_n(n),await TO({hash:r,signature:a})))return!0}catch{}if(w instanceof Hf)return!1;throw w}}async function tJ(t,e){var x;const{address:n,blockNumber:r,blockTag:i,hash:s,multicallAddress:a}=e,{authorization:l,data:u,signature:d,to:h}=rY(e.signature);if(await j5(t,{address:n,blockNumber:r,blockTag:i})===f0(["0xef0100",l.address]))return await rJ(t,{address:n,blockNumber:r,blockTag:i,hash:s,signature:d});const g={address:l.address,chainId:Number(l.chainId),nonce:Number(l.nonce),r:Ue(l.r,{size:32}),s:Ue(l.s,{size:32}),yParity:l.yParity};if(!await PQ({address:n,authorization:g}))throw new Hf;const A=await Je(t,ps,"readContract")({...a?{address:a}:{code:KC},authorizationList:[g],abi:vw,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...u?[{allowFailure:!0,target:h??n,callData:u}]:[],{allowFailure:!0,target:n,callData:$s({abi:aN,functionName:"isValidSignature",args:[s,d]})}]]}),v=(x=A[A.length-1])==null?void 0:x.returnData;if(v!=null&&v.startsWith("0x1626ba7e"))return!0;throw new Hf}async function nJ(t,e){const{address:n,factory:r,factoryData:i,hash:s,signature:a,verifierAddress:l,...u}=e,d=await(async()=>!r&&!i||CY(a)?a:xY({data:i,signature:a,to:r}))(),h=l?{to:l,data:$s({abi:M4,functionName:"isValidSig",args:[n,s,d]}),...u}:{data:WC({abi:M4,args:[n,s,d],bytecode:bG}),...u},{data:m}=await Je(t,Bv,"call")(h).catch(g=>{throw g instanceof XN?new Hf:g});if(EH(m??"0x0"))return!0;throw new Hf}async function rJ(t,e){const{address:n,blockNumber:r,blockTag:i,hash:s,signature:a}=e;if((await Je(t,ps,"readContract")({address:n,abi:aN,args:[s,a],blockNumber:r,blockTag:i,functionName:"isValidSignature"}).catch(u=>{throw u instanceof HC?new Hf:u})).startsWith("0x1626ba7e"))return!0;throw new Hf}
1689class Hf extends Error{}async function iJ(t,{address:e,message:n,factory:r,factoryData:i,signature:s,...a}){const l=GO(n);return Hv(t,{address:e,factory:r,factoryData:i,hash:l,signature:s,...a})}async function sJ(t,e){const{address:n,factory:r,factoryData:i,signature:s,message:a,primaryType:l,types:u,domain:d,...h}=e,m=YQ({message:a,primaryType:l,types:u,domain:d});return Hv(t,{address:n,factory:r,factoryData:i,hash:m,signature:s,...h})}const d3=new Map,jI=new Map;let oJ=0;function jl(t,e,n){const r=++oJ,i=()=>d3.get(t)||[],s=()=>{const h=i();d3.set(t,h.filter(m=>m.id!==r))},a=()=>{const h=i();if(!h.some(g=>g.id===r))return;const m=jI.get(t);if(h.length===1&&m){const g=m();g instanceof Promise&&g.catch(()=>{})}s()},l=i();if(d3.set(t,[...l,{id:r,fns:e}]),l&&l.length>0)return a;const u={};for(const h in e)u[h]=((...m)=>{var w,A;const g=i();if(g.length!==0)for(const v of g)(A=(w=v.fns)[h])==null||A.call(w,...m)});const d=n(u);return typeof d=="function"&&jI.set(t,d),a}function Ly(t,{emitOnBegin:e,initialWaitTime:n,interval:r}){let i=!0;const s=()=>i=!1;return(async()=>{let l;e&&(l=await t({unpoll:s}));const u=await(n==null?void 0:n(l))??r;await L5(u);const d=async()=>{i&&(await t({unpoll:s}),await L5(r),d())};d()})(),s}function WB(t,{emitOnBegin:e=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:s,pollingInterval:a=t.pollingInterval}){const l=typeof s<"u"?s:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
1689onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc"));let u;return l?(()=>{const m=pr(["watchBlockNumber",t.uid,e,n,a]);return jl(m,{onBlockNumber:r,onError:i},g=>Ly(async()=>{var w;try{const A=await Je(t,Dy,"getBlockNumber")({cacheTime:0});if(u!==void 0){if(A===u)return;if(A-u>1&&n)for(let v=u+1n;v<A;v++)g.onBlockNumber(v,u),u=v}(u===void 0||A>u)&&(g.onBlockNumber(A,u),u=A)}catch(A){(w=g.onError)==null||w.call(g,A)}},{emitOnBegin:e,interval:a}))})():(()=>{const m=pr(["watchBlockNumber",t.uid,e,n]);return jl(m,{onBlockNumber:r,onError:i},g=>{let w=!0,A=()=>w=!1;return(async()=>{try{const v=(()=>{if(t.transport.type==="fallback"){const T=t.transport.transports.find(O=>O.config.type==="webSocket"||O.config.type==="ipc");return T?T.value:t.transport}return t.transport})(),{unsubscribe:x}=await v.subscribe({params:["newHeads"],onData(T){var k;if(!w)return;const O=Vo((k=T.result)==null?void 0:k.number);g.onBlockNumber(O,u),u=O},onError(T){var O;(O=g.onError)==null||O.call(g,T)}});A=x,w||A()}catch(v){i==null||i(v)}})(),()=>A()})})()}async function aJ(t,e){const{checkReplacement:n=!0,confirmations:r=1,hash:i,onReplaced:s,retryCount:a=6,retryDelay:l=({count:B})=>~~(1<<B)*200,timeout:u=18e4}=e,d=pr(["waitForTransactionReceipt",t.uid,i]),h=(()=>{var B;return e.pollingInterval?e.pollingInterval:(B=t.chain)!=null&&B.experimental_preconfirmationTime?t.chain.experimental_preconfirmationTime:t.pollingInterval})();let m,g,w,A=!1,v,x;const{promise:T,resolve:O,reject:k}=pO(),P=u?setTimeout(()=>{x==null||x(),v==null||v(),k(new R$({hash:i}))},u):void 0;return v=jl(d,{onReplaced:s,resolve:O,reject:k},async B=>{if(w=await Je(t,Wb,"getTransactionReceipt")({hash:i}).catch(()=>{}),w&&r<=1){clearTimeout(P),B.resolve(w),v==null||v();return}x=Je(t,WB,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:h,async onBlockNumber(U){const I=M=>{clearTimeout(P),x==null||x(),M(),v==null||v()};let R=U;if(!A)try{if(w){if(r>1&&(!w.blockNumber||R-w.blockNumber+1n<r))return;I(()=>B.resolve(w));return}if(n&&!m&&(A=!0,await $p(async()=>{m=await Je(t,g2,"getTransaction")({hash:i}),m.blockNumber&&(R=m.blockNumber)},{delay:l,retryCount:a}),A=!1),w=await Je(t,Wb,"getTransactionReceipt")({hash:i}),r>1&&(!w.blockNumber||R-w.blockNumber+1n<r))return;I(()=>B.resolve(w))}
1689catch(M){if(M instanceof YN||M instanceof JN){if(!m){A=!1;return}try{g=m,A=!0;const F=await $p(()=>Je(t,Ro,"getBlock")({blockNumber:R,includeTransactions:!0}),{delay:l,retryCount:a,shouldRetry:({error:L})=>L instanceof kO});A=!1;const j=F.transactions.find(({from:L,nonce:Se})=>L===g.from&&Se===g.nonce);if(!j||(w=await Je(t,Wb,"getTransactionReceipt")({hash:j.hash}),r>1&&(!w.blockNumber||R-w.blockNumber+1n<r)))return;let q="replaced";j.to===g.to&&j.value===g.value&&j.input===g.input?q="repriced":j.from===j.to&&j.value===0n&&(q="cancelled"),I(()=>{var L;(L=B.onReplaced)==null||L.call(B,{reason:q,replacedTransaction:g,transaction:j,transactionReceipt:w}),B.resolve(w)})}catch(F){I(()=>B.reject(F))}}else I(()=>B.reject(M))}}})}),T}function cJ(t,{blockTag:e=t.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:s,includeTransactions:a,poll:l,pollingInterval:u=t.pollingInterval}){const d=typeof l<"u"?l:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
1689onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc")),h=a??!1;let m;return d?(()=>{const A=pr(["watchBlocks",t.uid,e,n,r,h,u]);return jl(A,{onBlock:i,onError:s},v=>Ly(async()=>{var x;try{const T=await Je(t,Ro,"getBlock")({blockTag:e,includeTransactions:h});if(T.number!==null&&(m==null?void 0:m.number)!=null){if(T.number===m.number)return;if(T.number-m.number>1&&n)for(let O=(m==null?void 0:m.number)+1n;O<T.number;O++){const k=await Je(t,Ro,"getBlock")({blockNumber:O,includeTransactions:h});v.onBlock(k,m),m=k}}((m==null?void 0:m.number)==null||e==="pending"&&(T==null?void 0:T.number)==null||T.number!==null&&T.number>m.number)&&(v.onBlock(T,m),m=T)}catch(T){(x=v.onError)==null||x.call(v,T)}},{emitOnBegin:r,interval:u}))})():(()=>{let A=!0,v=!0,x=()=>A=!1;return(async()=>{try{r&&Je(t,Ro,"getBlock")({blockTag:e,includeTransactions:h}).then(k=>{A&&v&&(i(k,void 0),v=!1)}).catch(s);const T=(()=>{if(t.transport.type==="fallback"){const k=t.transport.transports.find(P=>P.config.type==="webSocket"||P.config.type==="ipc");return k?k.value:t.transport}return t.transport})(),{unsubscribe:O}=await T.subscribe({params:["newHeads"],async onData(k){var B;if(!A)return;const P=await Je(t,Ro,"getBlock")({blockNumber:(B=k.result)==null?void 0:B.number,includeTransactions:h}).catch(()=>{});A&&(i(P,m),v=!1,m=P)},onError(k){s==null||s(k)}});x=O,A||x()}catch(T){s==null||s(T)}})(),()=>x()})()}function lJ(t,e){const{abi:n,address:r,args:i,batch:s=!0,eventName:a,fromBlock:l,onError:u,onLogs:d,poll:h,pollingInterval:m=t.pollingInterval,strict:g}=e;return(typeof h<"u"?h:typeof l=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
1689onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc")))?(()=>{const x=g??!1,T=pr(["watchContractEvent",r,i,s,t.uid,a,m,x,l]);return jl(T,{onLogs:d,onError:u},O=>{let k;l!==void 0&&(k=l-1n);let P,B=!1;const U=Ly(async()=>{var I;if(!B){try{P=await Je(t,xO,"createContractEventFilter")({abi:n,address:r,args:i,eventName:a,strict:x,fromBlock:l})}catch{}B=!0;return}try{let R;if(P)R=await Je(t,Mv,"getFilterChanges")({filter:P});else{const M=await Je(t,Dy,"getBlockNumber")({});k&&k<M?R=await Je(t,qO,"getContractEvents")({abi:n,address:r,args:i,eventName:a,fromBlock:k+1n,toBlock:M,strict:x}):R=[],k=M}if(R.length===0)return;if(s)O.onLogs(R);else for(const M of R)O.onLogs([M])}catch(R){P&&R instanceof Ff&&(B=!1),(I=O.onError)==null||I.call(O,R)}},{emitOnBegin:!0,interval:m});return async()=>{P&&await Je(t,Fv,"uninstallFilter")({filter:P}),U()}})})():(()=>{const x=g??!1,T=pr(["watchContractEvent",r,i,s,t.uid,a,m,x]);let O=!0,k=()=>O=!1;return jl(T,{onLogs:d,onError:u},P=>((async()=>{try{const B=(()=>{if(t.transport.type==="fallback"){const R=t.transport.transports.find(M=>M.config.type==="webSocket"||M.config.type==="ipc");return R?R.value:t.transport}return t.transport})(),U=a?Py({abi:n,eventName:a,args:i}):[],{unsubscribe:I}=await B.subscribe({params:["logs",{address:r,topics:U}],onData(R){var F;if(!O)return;const M=R.result;try{const{eventName:j,args:q}=s2({abi:n,data:M.data,topics:M.topics,strict:g}),L=ic(M,{args:q,eventName:j});P.onLogs([L])}catch(j){let q,L;if(j instanceof hg||j instanceof Ev){if(g)return;q=j.abiItem.name,L=(F=j.abiItem.inputs)==null?void 0:F.some(X=>!("name"in X&&X.name))}const Se=ic(M,{args:L?[]:{},eventName:q});P.onLogs([Se])}},onError(R){var M;(M=P.onError)==null||M.call(P,R)}});k=I,O||k()}catch(B){u==null||u(B)}})(),()=>k()))})()}function uJ(t,{address:e,args:n,batch:r=!0,event:i,events:s,fromBlock:a,onError:l,onLogs:u,poll:d,pollingInterval:h=t.pollingInterval,strict:m}){const g=typeof d<"u"?d:typeof a=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].c
1689onfig.type==="webSocket"||t.transport.transports[0].config.type==="ipc")),w=m??!1;return g?(()=>{const x=pr(["watchEvent",e,n,r,t.uid,i,h,a]);return jl(x,{onLogs:u,onError:l},T=>{let O;a!==void 0&&(O=a-1n);let k,P=!1;const B=Ly(async()=>{var U;if(!P){try{k=await Je(t,CO,"createEventFilter")({address:e,args:n,event:i,events:s,strict:w,fromBlock:a})}catch{}P=!0;return}try{let I;if(k)I=await Je(t,Mv,"getFilterChanges")({filter:k});else{const R=await Je(t,Dy,"getBlockNumber")({});O&&O!==R?I=await Je(t,a2,"getLogs")({address:e,args:n,event:i,events:s,fromBlock:O+1n,toBlock:R}):I=[],O=R}if(I.length===0)return;if(r)T.onLogs(I);else for(const R of I)T.onLogs([R])}catch(I){k&&I instanceof Ff&&(P=!1),(U=T.onError)==null||U.call(T,I)}},{emitOnBegin:!0,interval:h});return async()=>{k&&await Je(t,Fv,"uninstallFilter")({filter:k}),B()}})})():(()=>{let x=!0,T=()=>x=!1;return(async()=>{try{const O=(()=>{if(t.transport.type==="fallback"){const U=t.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return U?U.value:t.transport}return t.transport})(),k=s??(i?[i]:void 0);let P=[];k&&(P=[k.flatMap(I=>Py({abi:[I],eventName:I.name,args:n}))],i&&(P=P[0]));const{unsubscribe:B}=await O.subscribe({params:["logs",{address:e,topics:P}],onData(U){var R;if(!x)return;const I=U.result;try{const{eventName:M,args:F}=s2({abi:k??[],data:I.data,topics:I.topics,strict:w}),j=ic(I,{args:F,eventName:M});u([j])}catch(M){let F,j;if(M instanceof hg||M instanceof Ev){if(m)return;F=M.abiItem.name,j=(R=M.abiItem.inputs)==null?void 0:R.some(L=>!("name"in L&&L.name))}const q=ic(I,{args:j?[]:{},eventName:F});u([q])}},onError(U){l==null||l(U)}});T=B,x||T()}catch(O){l==null||l(O)}})(),()=>T()})()}function fJ(t,{batch:e=!0,onError:n,onTransactions:r,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket"&&t.transport.type!=="ipc")?(()=>{const d=pr(["watchPendingTransactions",t.uid,e,s]);return jl(d,{onTransactions:r,onError:n},h=>{let m;const g=Ly(async()=>{var w;try{if(!m)try{m=await Je(t,_O,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}const A=await Je(t,Mv,"getFilterChanges")({filter:m});if(A.length===0)return;if(e)h.onTransactions(A);else for(const v of A)h.onTransactions([v])}catch(A){(w=h.onError)==null||w.call(h,A)}},{emitOnBegin:!0,interval:s});return async()=>{m&&await Je(t,Fv,"uninstallFilter")({filter:m}),g()}})})():(()=>{let d=!0,h=()=>d=!1;return(async()=>{try{const{unsubscribe:m}=await t.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!d)return;const w=g.result;r([w])},onError(g){n==null||n(g)}});h=m,d||h()}catch(m){n==null||n(m)}})(),()=>h()})()}class dJ extends Ce{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` 1690`),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}async function hJ(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}async function pJ(t,{account:e=t.account,message:n}){if(!e)throw new dJ({docsPath:"/docs/actions/wallet/signMessage"});const r=ji(e);if(r.signMessage)return r.signMessage({message:n});const i=typeof n=="string"?Up(n):n.raw instanceof Uint8Array?rc(n.raw):n.raw;return t.request({method:"personal_sign",params:[i,r.address]},{retryCount:0})}function m0(t,e,n){const r=t[e.name];if(typeof r=="function")return r;const i=t[n];return typeof i=="function"?i:s=>e(t,s)}const Yb="2.17.3",mJ=()=>`@wagmi/core@${Yb}`;var YB=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Sw,JB;let mc=class ex extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return mJ()}constructor(e,n={}){var s;super(),Sw.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof ex?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,i=n.cause instanceof ex&&n.cause.docsPath||n.docsPath;this.message=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` 1691`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}walk(e){return YB(this,Sw,"m",JB).call(this,this,e)}};Sw=new WeakSet,JB=function t(e,n){return n!=null&&n(e)?e:e.cause?YB(this,Sw,"m",t).call(this,e.cause,n):e};
1691class Ll extends mc{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class gJ extends mc{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class yJ extends mc{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class bJ extends mc{constructor({address:e,connector:n}){super(`Account "${e}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class wJ extends mc{constructor({connectionChainId:e,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class vJ extends mc{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function AJ(t,e){var r;let n;if(typeof e.connector=="function"?n=t._internal.connectors.setup(e.connector):n=e.connector,n.uid===t.state.current)throw new gJ;try{t.setState(u=>({...u,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:i,...s}=e,a=await n.connect(s),l=a.accounts;return n.emitter.off("connect",t._internal.events.connect),n.emitter.on("change",t._internal.events.change),n.emitter.on("disconnect",t._internal.events.disconnect),await((r=t.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),t.setState(u=>({...u,connections:new Map(u.connections).set(n.uid,{accounts:l,chainId:a.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:l,chainId:a.chainId}}catch(i){throw t.setState(s=>({...s,status:s.current?"connected":"disconnected"})),i}}const tx=256;let _b=tx,Tb;function XB(t=11){if(!Tb||_b+t>tx*2){Tb="",_b=0;for(let e=0;e<tx;e++)Tb+=(256+Math.random()*256|0).toString(16).substring(1)}return Tb.substring(_b,_b+++t)}function ZB(t){const{batch:e,chain:n,ccipRead:r,key:i="base",name:s="Base Client",type:a="base"}=t,l=t.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),u=(n==null?void 0:n.blockTime)??12e3,d=Math.min(Math.max(Math.floor(u/2),500),4e3),h=t.pollingInterval??d,m=t.cacheTime??h,g=t.account?ji(t.account):void 0,{config:w,request:A,value:v}=t.transport({chain:n,pollingInterval:h}),x={...w,...v},T={account:g,batch:e,cacheTime:m,ccipRead:r,chain:n,key:i,name:s,pollingInterval:h,request:A,transport:x,type:a,uid:XB(),...l?{experimental_blockTag:l}:{}};function O(k){return P=>{const B=P(k);for(const I in T)delete B[I];const U={...k,...B};return Object.assign(U,{extend:O(U)})}}return Object.assign(T,{extend:O(T)})}function EJ(t){var m,g,w;const{scheme:e,statement:n,...r}=((m=t.match(xJ))==null?void 0:m.groups)??{},{chainId:i,expirationTime:s,issuedAt:a,notBefore:l,requestId:u,...d}=((g=t.match(CJ))==null?void 0:g.groups)??{},h=(w=t.split("Resources:")[1])==null?void 0:w.split(` 1692- `).slice(1);return{...r,...d,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...a?{issuedAt:new Date(a)}:{},...l?{notBefore:new Date(l)}:{},...u?{requestId:u}:{},...h?{resources:h}:{},...e?{scheme:e}:{},...n?{statement:n}:{}}}const xJ=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,CJ=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function _J(t){const{address:e,domain:n,message:r,nonce:i,scheme:s,time:a=new Date}=t;
1692if(n&&r.domain!==n||i&&r.nonce!==i||s&&r.scheme!==s||r.expirationTime&&a>=r.expirationTime||r.notBefore&&a<r.notBefore)return!1;try{if(!r.address||!Di(r.address,{strict:!1})||e&&!Dv(r.address,e))return!1}catch{return!1}return!0}async function TJ(t,e){const{address:n,domain:r,message:i,nonce:s,scheme:a,signature:l,time:u=new Date,...d}=e,h=EJ(i);if(!h.address||!_J({address:n,domain:r,message:h,nonce:s,scheme:a,time:u}))return!1;const g=GO(i);return Hv(t,{address:h.address,hash:g,signature:l,...d})}function SJ(t){return{call:e=>Bv(t,e),createAccessList:e=>EO(t,e),createBlockFilter:()=>VG(t),createContractEventFilter:e=>xO(t,e),createEventFilter:e=>CO(t,e),createPendingTransactionFilter:()=>_O(t),estimateContractGas:e=>bQ(t,e),estimateGas:e=>i2(t,e),getBalance:e=>HO(t,e),getBlobBaseFee:()=>wQ(t),getBlock:e=>Ro(t,e),getBlockNumber:e=>Dy(t,e),getBlockTransactionCount:e=>_Q(t,e),getBytecode:e=>j5(t,e),getChainId:()=>VO(t),getCode:e=>j5(t,e),getContractEvents:e=>qO(t,e),getEip712Domain:e=>RQ(t,e),getEnsAddress:e=>SG(t,e),getEnsAvatar:e=>vO(t,e),getEnsName:e=>AO(t,e),getEnsResolver:e=>FG(t,e),getEnsText:e=>wO(t,e),getFeeHistory:e=>OQ(t,e),estimateFeesPerGas:e=>tQ(t,e),getFilterChanges:e=>Mv(t,e),getFilterLogs:e=>BQ(t,e),getGasPrice:()=>n2(t),getLogs:e=>a2(t,e),getProof:e=>cY(t,e),estimateMaxPriorityFeePerGas:e=>eQ(t,e),getStorageAt:e=>lY(t,e),getTransaction:e=>g2(t,e),getTransactionConfirmations:e=>uY(t,e),getTransactionCount:e=>DO(t,e),getTransactionReceipt:e=>Wb(t,e),multicall:e=>_B(t,e),prepareTransactionRequest:e=>zO(t,e),readContract:e=>ps(t,e),sendRawTransaction:e=>hJ(t,e),simulate:e=>G5(t,e),simulateBlocks:e=>G5(t,e),simulateCalls:e=>vY(t,e),simulateContract:e=>AY(t,e),verifyHash:e=>Hv(t,e),verifyMessage:e=>iJ(t,e),verifySiweMessage:e=>TJ(t,e),verifyTypedData:e=>sJ(t,e),uninstallFilter:e=>Fv(t,e),waitForTransactionReceipt:e=>aJ(t,e),watchBlocks:e=>cJ(t,e),watchBlockNumber:e=>WB(t,e),watchContractEvent:e=>lJ(t,e),watchEvent:e=>uJ(t,e),watchPendingTransactions:e=>fJ(t,e)}}function eP({key:t,methods:e,name:n,request:r,retryCount:i=3,retryDelay:s=150,timeout:a,type:l},u){const d=XB();return{config:{key:t,methods:e,name:n,request:r,retryCount:i,retryDelay:s,timeout:a,type:l},request:MQ(r,{methods:e,retryCount:i,retryDelay:s,uid:d}),value:u}}function IJ(t,e={}){const{key:n="custom",methods:r,name:i="Custom Provider",retryDelay:s}=e;return({retryCount:a})=>eP({key:n,methods:r,name:i,request:t.request.bind(t),retryCount:e.retryCount??a,retryDelay:s,type:"custom"})}class RJ extends Ce{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function kJ(t,e={}){const{batch:n,fetchFn:r,fetchOptions:i,key:s="http",methods:a,name:l="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:d,retryDelay:h,raw:m}=e;return({chain:g,retryCount:w,timeout:A})=>{const{batchSize:v=1e3,wait:x=0}=typeof n=="object"?n:{},T=e.retryCount??w,O=A??e.timeout??1e4,k=t||(g==null?void 0:g.rpcUrls.default.http[0]);if(!k)throw new RJ;const P=VQ(k,{fetchFn:r,fetchOptions:i,onRequest:u,onResponse:d,timeout:O});return eP({key:s,methods:a,name:l,async request({method:B,params:U}){const I={method:B,params:U},{schedule:R}=mO({id:k,wait:x,shouldSplitBatch(q){return q.length>v},fn:q=>P.request({body:q}),sort:(q,L)=>q.id-L.id}),M=async q=>n?R(q):[await P.request({body:q})],[{error:F,result:j}]=await M(I);if(m)return{error:F,result:j};if(F)throw new GC({body:I,error:F,url:k});return j},retryCount:T,retryDelay:h,timeout:O,type:"http"},{fetchOptions:i,url:k})}}async function NJ(t,e={}){let n;if(e.connector){const{connector:d}=e;if(t.state.status==="reconnecting"&&!d.getAccounts&&!d.getChainId)throw new vJ({connector:d});const[h,m]=await Promise.all([d.getAccounts().catch(g=>{if(e.account===null)return[];throw g}),d.getChainId()]);n={accounts:h,chainId:m,connector:d}}else n=t.state.connections.get(t.state.current);if(!n)throw new yJ;const r=e.chainId??n.chainId,i=await n.connector.getChainId();if(i!==n.chainId)throw new wJ({connectionChainId:n.chainId,connectorChainId:i});const s=n.connector;if(s.getClient)return s.getClient({chainId:r});const a=ji(e.account??n.accounts[0]);if(a&&(a.address=_n(a.address)),e.account&&!n.accounts.some(d=>d.toLowerCase()===a.address.toLowerCase()))throw new bJ({address:a.address,connector:s});const l=t.chains.find(d=>d.id===r),u=await n.connector.getProvider({chainId:r});
1692return ZB({account:a,chain:l,name:"Connector Client",transport:d=>IJ(u)({...d,retryCount:0})})}async function OJ(t,e={}){var i,s;let n;if(e.connector)n=e.connector;else{const{connections:a,current:l}=t.state,u=a.get(l);n=u==null?void 0:u.connector}const r=t.state.connections;n&&(await n.disconnect(),n.emitter.off("change",t._internal.events.change),n.emitter.off("disconnect",t._internal.events.disconnect),n.emitter.on("connect",t._internal.events.connect),r.delete(n.uid)),t.setState(a=>{if(r.size===0)return{...a,connections:new Map,current:null,status:"disconnected"};const l=r.values().next().value;return{...a,connections:new Map(r),current:l.connector.uid}});{const a=t.state.current;if(!a)return;const l=(i=t.state.connections.get(a))==null?void 0:i.connector;if(!l)return;await((s=t.storage)==null?void 0:s.setItem("recentConnectorId",l.id))}}function tP(t){return typeof t=="number"?t:t==="wei"?0:Math.abs(x$[t])}function nP(t){const e=t.state.current,n=t.state.connections.get(e),r=n==null?void 0:n.accounts,i=r==null?void 0:r[0],s=t.chains.find(l=>l.id===(n==null?void 0:n.chainId)),a=t.state.status;switch(a){case"connected":return{address:i,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:a};case"reconnecting":return{address:i,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:a};case"connecting":return{address:i,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:a};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:a}}}async function BJ(t,e){const{allowFailure:n=!0,chainId:r,contracts:i,...s}=e,a=t.getClient({chainId:r});return m0(a,_B,"multicall")({allowFailure:n,contracts:i,...s})}function PJ(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return m0(i,ps,"readContract")(r)}async function DJ(t,e){var l;const{allowFailure:n=!0,blockNumber:r,blockTag:i,...s}=e,a=e.contracts;try{const u={};for(const[g,w]of a.entries()){const A=w.chainId??t.state.chainId;u[A]||(u[A]=[]),(l=u[A])==null||l.push({contract:w,index:g})}const d=()=>Object.entries(u).map(([g,w])=>BJ(t,{...s,allowFailure:n,blockNumber:r,blockTag:i,chainId:Number.parseInt(g),contracts:w.map(({contract:A})=>A)})),h=(await Promise.all(d())).flat(),m=Object.values(u).flatMap(g=>g.map(({index:w})=>w));return h.reduce((g,w,A)=>(g&&(g[m[A]]=w),g),[])}catch(u){if(u instanceof HC)throw u;const d=()=>a.map(h=>PJ(t,{...h,blockNumber:r,blockTag:i}));return n?(await Promise.allSettled(d())).map(h=>h.status==="fulfilled"?{result:h.value,status:"success"}:{error:h.reason,result:void 0,status:"failure"}):await Promise.all(d())}}async function MJ(t,e){const{address:n,blockNumber:r,blockTag:i,chainId:s,token:a,unit:l="ether"}=e;if(a)try{return await LI(t,{balanceAddress:n,chainId:s,symbolType:"string",tokenAddress:a})}catch(g){if(g.name==="ContractFunctionExecutionError"){const w=await LI(t,{balanceAddress:n,chainId:s,symbolType:"bytes32",tokenAddress:a}),A=xH(Wa(w.symbol,{dir:"right"}));return{...w,symbol:A}}throw g}const u=t.getClient({chainId:s}),h=await m0(u,HO,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:i}),m=t.chains.find(g=>g.id===s)??u.chain;return{decimals:m.nativeCurrency.decimals,formatted:Tv(h,tP(l)),symbol:m.nativeCurrency.symbol,value:h}}async function LI(t,e){const{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:s,unit:a}=e,l={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:s},[u,d,h]=await DJ(t,{allowFailure:!1,contracts:[{...l,functionName:"balanceOf",args:[n],chainId:r},{...l,functionName:"decimals",chainId:r},{...l,functionName:"symbol",chainId:r}]}),m=Tv(u??"0",tP(a??d));
1692return{decimals:d,formatted:m,symbol:h,value:u}}function UI(t){return t.state.chainId}function Ul(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let n,r;if(Array.isArray(t)&&Array.isArray(e)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ul(t[r],e[r]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const i=Object.keys(t);if(n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(s&&!Ul(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}let h3=[];function FI(t){const e=t.chains;return Ul(h3,e)?h3:(h3=e,e)}function jJ(t,e={}){let n;try{n=t.getClient(e)}catch{}return n}let Sb=[];function nx(t){const e=[...t.state.connections.values()];return t.state.status==="reconnecting"||Ul(Sb,e)?Sb:(Sb=e,e)}let p3=[];function VI(t){const e=t.connectors;return Ul(p3,e)?p3:(p3=e,e)}function LJ(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return m0(i,vO,"getEnsAvatar")(r)}function UJ(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return m0(i,AO,"getEnsName")(r)}function rx(t,e={}){const n=jJ(t,e);return n==null?void 0:n.extend(SJ)}let m3=!1;async function FJ(t,e={}){var d,h;if(m3)return[];m3=!0,t.setState(m=>({...m,status:m.current?"reconnecting":"connecting"}));const n=[];if((d=e.connectors)!=null&&d.length)for(const m of e.connectors){let g;typeof m=="function"?g=t._internal.connectors.setup(m):g=m,n.push(g)}else n.push(...t.connectors);let r;try{r=await((h=t.storage)==null?void 0:h.getItem("recentConnectorId"))}catch{}const i={};for(const[,m]of t.state.connections)i[m.connector.id]=1;r&&(i[r]=0);const s=Object.keys(i).length>0?[...n].sort((m,g)=>(i[m.id]??10)-(i[g.id]??10)):n;let a=!1;const l=[],u=[];for(const m of s){const g=await m.getProvider().catch(()=>{});if(!g||u.some(v=>v===g)||!await m.isAuthorized())continue;const A=await m.connect({isReconnecting:!0}).catch(()=>null);A&&(m.emitter.off("connect",t._internal.events.connect),m.emitter.on("change",t._internal.events.change),m.emitter.on("disconnect",t._internal.events.disconnect),t.setState(v=>{const x=new Map(a?v.connections:new Map).set(m.uid,{accounts:A.accounts,chainId:A.chainId,connector:m});return{...v,current:a?v.current:m.uid,connections:x}}),l.push({accounts:A.accounts,chainId:A.chainId,connector:m}),u.push(g),a=!0)}return(t.state.status==="reconnecting"||t.state.status==="connecting")&&(a?t.setState(m=>({...m,status:"connected"})):t.setState(m=>({...m,connections:new Map,current:null,status:"disconnected"}))),m3=!1,l}async function VJ(t,e){const{account:n,connector:r,...i}=e;let s;return typeof n=="object"&&n.type==="local"?s=t.getClient():s=await NJ(t,{account:n,connector:r}),m0(s,pJ,"signMessage")({...i,...n?{account:n}:{}})}class Ni extends mc{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class zJ extends mc{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function HJ(t,e){var a;const{addEthereumChainParameter:n,chainId:r}=e,i=t.state.connections.get(((a=e.connector)==null?void 0:a.uid)??t.state.current);if(i){const l=i.connector;if(!l.switchChain)throw new zJ({connector:l});return await l.switchChain({addEthereumChainParameter:n,chainId:r})}const s=t.chains.find(l=>l.id===r);if(!s)throw new Ll;return t.setState(l=>({...l,chainId:r})),s}function rP(t,e){const{onChange:n}=e;return t.subscribe(()=>nP(t),n,{equalityFn(r,i){const{connector:s,...a}=r,{connector:l,...u}=i;return Ul(a,u)&&(s==null?void 0:s.id)===(l==null?void 0:l.id)&&(s==null?void 0:s.uid)===(l==null?void 0:l.uid)}})}function qJ(t,e){const{onChange:n}=e;return t.subscribe(r=>r.chainId,n)}function $J(t,e){const{onChange:n}=e;return t.subscribe(()=>nx(t),n,{equalityFn:Ul})}function GJ(t,e){const{onChange:n}=e;return t._internal.connectors.subscribe((r,i)=>{n(Object.values(r),i)})}function QJ(t,e){const{onChange:n}=e;return t.subscribe(()=>rx(t),n,{equalityFn(r,i){return(r==null?void 0:r.uid)===(i==null?void 0:i.uid)}})}qv.type="injected";function qv(t={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:n}=t;function r(){const u=t.target;if(typeof u=="function"){const d=u();if(d)return d}return typeof u=="object"?u:typeof u=="string"?{...KJ[u]??{id:u,name:`${u[0].toUpperCase()}${u.slice(1)}`,provider:`is${u[0].toUpperCase()}${u.slice(1)}`}}:{id:"injected",name:"Injected",provider(d){return d==null?void 0:d.ethereum}}}let i,s,a,l;return u=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:qv.type,async setup(){const d=await this.getProvider();d!=null&&d.on&&t.target&&(a||(a=this.onConnect.bind(this),d.on("connect",a)),i||(i=this.onAccountsChanged.bind(this),d.on("accountsChanged",i)))},async connect({chainId:d,isReconnecting:h}={}){var w,A,v,x,T,O;const m=await this.getProvider();if(!m)throw new Ni;let g=[];if(h)g=await this.getAccounts().catch(()=>[]);else if(e)try{g=(x=(v=(A=(w=(await m.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:w.caveats)==null?void 0:A[0])==null?void 0:v.value)==null?void 0:x.map(P=>_n(P)),g.length>0&&(g=await this.getAccounts())}catch(k){const P=k;
1692if(P.code===Nt.code)throw new Nt(P);if(P.code===Oo.code)throw P}try{!(g!=null&&g.length)&&!h&&(g=(await m.request({method:"eth_requestAccounts"})).map(B=>_n(B))),a&&(m.removeListener("connect",a),a=void 0),i||(i=this.onAccountsChanged.bind(this),m.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),m.on("chainChanged",s)),l||(l=this.onDisconnect.bind(this),m.on("disconnect",l));let k=await this.getChainId();if(d&&k!==d){const P=await this.switchChain({chainId:d}).catch(B=>{if(B.code===Nt.code)throw B;return{id:k}});k=(P==null?void 0:P.id)??k}return e&&await((T=u.storage)==null?void 0:T.removeItem(`${this.id}.disconnected`)),t.target||await((O=u.storage)==null?void 0:O.setItem("injected.connected",!0)),{accounts:g,chainId:k}}catch(k){const P=k;throw P.code===Nt.code?new Nt(P):P.code===Oo.code?new Oo(P):P}},async disconnect(){var h,m;const d=await this.getProvider();if(!d)throw new Ni;s&&(d.removeListener("chainChanged",s),s=void 0),l&&(d.removeListener("disconnect",l),l=void 0),a||(a=this.onConnect.bind(this),d.on("connect",a));try{await jv(()=>d.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await((h=u.storage)==null?void 0:h.setItem(`${this.id}.disconnected`,!0)),t.target||await((m=u.storage)==null?void 0:m.removeItem("injected.connected"))},async getAccounts(){const d=await this.getProvider();if(!d)throw new Ni;return(await d.request({method:"eth_accounts"})).map(m=>_n(m))},async getChainId(){const d=await this.getProvider();if(!d)throw new Ni;const h=await d.request({method:"eth_chainId"});return Number(h)}
1692,async getProvider(){if(typeof window>"u")return;let d;const h=r();return typeof h.provider=="function"?d=h.provider(window):typeof h.provider=="string"?d=Jb(window,h.provider):d=h.provider,d&&!d.removeListener&&("off"in d&&typeof d.off=="function"?d.removeListener=d.off:d.removeListener=()=>{}),d},async isAuthorized(){var d,h;try{if(e&&await((d=u.storage)==null?void 0:d.getItem(`${this.id}.disconnected`))||!t.target&&!await((h=u.storage)==null?void 0:h.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const A=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",A),!!await this.getProvider()),v=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(T=>window.addEventListener("ethereum#initialized",()=>T(A()),{once:!0}))]:[],new Promise(T=>setTimeout(()=>T(A()),v))]))return!0}throw new Ni}return!!(await $p(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:d,chainId:h}){var A,v,x,T;const m=await this.getProvider();if(!m)throw new Ni;const g=u.chains.find(O=>O.id===h);if(!g)throw new $r(new Ll);const w=new Promise(O=>{const k=(P=>{"chainId"in P&&P.chainId===h&&(u.emitter.off("change",k),O())});u.emitter.on("change",k)});try{return await Promise.all([m.request({method:"wallet_switchEthereumChain",params:[{chainId:Ue(h)}]}).then(async()=>{await this.getChainId()===h&&u.emitter.emit("change",{chainId:h})}),w]),g}catch(O){const k=O;if(k.code===4902||((v=(A=k==null?void 0:k.data)==null?void 0:A.originalError)==null?void 0:v.code)===4902)try{const{default:P,...B}=g.blockExplorers??{};let U;d!=null&&d.blockExplorerUrls?U=d.blockExplorerUrls:P&&(U=[P.url,...Object.values(B).map(M=>M.url)]);let I;(x=d==null?void 0:d.rpcUrls)!=null&&x.length?I=d.rpcUrls:I=[((T=g.rpcUrls.default)==null?void 0:T.http[0])??""];const R={blockExplorerUrls:U,chainId:Ue(h),chainName:(d==null?void 0:d.chainName)??g.name,iconUrls:d==null?void 0:d.iconUrls,nativeCurrency:(d==null?void 0:d.nativeCurrency)??g.nativeCurrency,rpcUrls:I};return await Promise.all([m.request({method:"wallet_addEthereumChain",params:[R]}).then(async()=>{if(await this.getChainId()===h)u.emitter.emit("change",{chainId:h});else throw new Nt(new Error("User rejected switch after adding network."))}),w]),g}catch(P){throw new Nt(P)}throw k.code===Nt.code?new Nt(k):new $r(k)}},async onAccountsChanged(d){var h;if(d.length===0)this.onDisconnect();else if(u.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m}),e&&await((h=u.storage)==null?void 0:h.removeItem(`${this.id}.disconnected`))}else u.emitter.emit("change",{accounts:d.map(m=>_n(m))})},onChainChanged(d){const h=Number(d);u.emitter.emit("change",{chainId:h})},async onConnect(d){const h=await this.getAccounts();if(h.length===0)return;const m=Number(d.chainId);u.emitter.emit("connect",{accounts:h,chainId:m});const g=await this.getProvider();g&&(a&&(g.removeListener("connect",a),a=void 0),i||(i=this.onAccountsChanged.bind(this),g.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),l||(l=this.onDisconnect.bind(this),g.on("disconnect",l)))},async onDisconnect(d){const h=await this.getProvider();d&&d.code===1013&&h&&(await this.getAccounts()).length||(u.emitter.emit("disconnect"),h&&(s&&(h.removeListener("chainChanged",s),s=void 0),l&&(h.removeListener("disconnect",l),l=void 0),a||(a=this.onConnect.bind(this),h.on("connect",a))))}})}const KJ={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(t){return t!=null&&t.coinbaseWalletExtension?t.coinbaseWalletExtension:Jb(t,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(t){return Jb(t,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(e[r])return!1;return!0})}}
1692,phantom:{id:"phantom",name:"Phantom",provider(t){var e,n;return(e=t==null?void 0:t.phantom)!=null&&e.ethereum?(n=t.phantom)==null?void 0:n.ethereum:Jb(t,"isPhantom")}}};function Jb(t,e){function n(i){return typeof e=="function"?e(i):typeof e=="string"?i[e]:!0}const r=t.ethereum;if(r!=null&&r.providers)return r.providers.find(i=>n(i));if(r&&n(r))return r}function WJ(t){if(typeof window>"u")return;const e=n=>t(n.detail);return window.addEventListener("eip6963:announceProvider",e),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",e)}function YJ(){const t=new Set;let e=[];const n=()=>WJ(i=>{e.some(({info:s})=>s.uuid===i.info.uuid)||(e=[...e,i],t.forEach(s=>s(e,{added:[i]})))});let r=n();return{_listeners(){return t},clear(){t.forEach(i=>i([],{removed:[...e]})),e=[]},destroy(){this.clear(),t.clear(),r==null||r()},findProvider({rdns:i}){return e.find(s=>s.info.rdns===i)},getProviders(){return e},reset(){this.clear(),r==null||r(),r=n()},subscribe(i,{emitImmediately:s}={}){return t.add(i),s&&i(e,{added:e}),()=>t.delete(i)}}}const JJ=t=>(e,n,r)=>{const i=r.subscribe;return r.subscribe=(a,l,u)=>{let d=a;if(l){const h=(u==null?void 0:u.equalityFn)||Object.is;let m=a(r.getState());d=g=>{const w=a(g);if(!h(m,w)){const A=m;l(m=w,A)}},u!=null&&u.fireImmediately&&l(m,m)}return i(d)},t(e,n,r)},XJ=JJ;function ZJ(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var s;const a=u=>u===null?null:JSON.parse(u,void 0),l=(s=n.getItem(i))!=null?s:null;return l instanceof Promise?l.then(a):a(l)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const ix=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return ix(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return ix(r)(n)}}}},eX=(t,e)=>(n,r,i)=>{let s={storage:ZJ(()=>localStorage),partialize:v=>v,version:0,merge:(v,x)=>({...x,...v}),...e},a=!1;const l=new Set,u=new Set;let d=s.storage;if(!d)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...v)},r,i);const h=()=>{const v=s.partialize({...r()});return d.setItem(s.name,{state:v,version:s.version})},m=i.setState;i.setState=(v,x)=>{m(v,x),h()};const g=t((...v)=>{n(...v),h()},r,i);i.getInitialState=()=>g;let w;const A=()=>{var v,x;if(!d)return;a=!1,l.forEach(O=>{var k;return O((k=r())!=null?k:g)});const T=((x=s.onRehydrateStorage)==null?void 0:x.call(s,(v=r())!=null?v:g))||void 0;return ix(d.getItem.bind(d))(s.name).then(O=>{if(O)if(typeof O.version=="number"&&O.version!==s.version){if(s.migrate)return[!0,s.migrate(O.state,O.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,O.state];return[!1,void 0]}).then(O=>{var k;const[P,B]=O;if(w=s.merge(B,(k=r())!=null?k:g),n(w,!0),P)return h()}).then(()=>{T==null||T(w,void 0),w=r(),a=!0,u.forEach(O=>O(w))}).catch(O=>{T==null||T(void 0,O)})};return i.persist={setOptions:v=>{s={...s,...v},v.storage&&(d=v.storage)},clearStorage:()=>{d==null||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>A(),hasHydrated:()=>a,onHydrate:v=>(l.add(v),()=>{l.delete(v)}),onFinishHydration:v=>(u.add(v),()=>{u.delete(v)})},s.skipHydration||A(),w||g},tX=eX,zI=t=>{let e;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(e):d;if(!Object.is(m,e)){const g=e;e=h??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(w=>w(e,g))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=e=t(r,i,l);return l},g3=t=>t?zI(t):zI;var y3={exports:{}},HI;function nX(){return HI||(HI=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,d,h){this.fn=u,this.context=d,this.once=h||!1}function s(u,d,h,m,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var w=new i(h,m||u,g),A=n?n+d:d;return u._events[A]?u._events[A].fn?u._events[A]=[u._events[A],w]:u._events[A].push(w):(u._events[A]=w,u._eventsCount++),u}function a(u,d){--u._eventsCount===0?u._events=new r:delete u._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],h,m;if(this._eventsCount===0)return d;for(m in h=this._events)e.call(h,m)&&d.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},l.prototype.listeners=function(d){var h=n?n+d:d,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,w=m.length,A=new Array(w);g<w;g++)A[g]=m[g].fn;return A},l.prototype.listenerCount=function(d){var h=n?n+d:d,m=this._events[h];return m?m.fn?1:m.length:0},l.prototype.emit=function(d,h,m,g,w,A){var v=n?n+d:d;if(!this._events[v])return!1;var x=this._events[v],T=arguments.length,O,k;if(x.fn){switch(x.once&&this.removeListener(d,x.fn,void 0,!0),T){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,h),!0;case 3:return x.fn.call(x.context,h,m),!0;case 4:return x.fn.call(x.context,h,m,g),!0;case 5:return x.fn.call(x.context,h,m,g,w),!0;case 6:return x.fn.call(x.context,h,m,g,w,A),!0}for(k=1,O=new Array(T-1);k<T;k++)O[k-1]=arguments[k];x.fn.apply(x.context,O)}else{var P=x.length,B;for(k=0;k<P;k++)switch(x[k].once&&this.removeListener(d,x[k].fn,void 0,!0),T){case 1:x[k].fn.call(x[k].context);break;case 2:x[k].fn.call(x[k].context,h);break;case 3:x[k].fn.call(x[k].context,h,m);break;case 4:x[k].fn.call(x[k].context,h,m,g);break;default:if(!O)for(B=1,O=new Array(T-1);B<T;B++)O[B-1]=arguments[B];x[k].fn.apply(x[k].context,O)}}return!0},l.prototype.on=function(d,h,m){return s(this,d,h,m,!1)},l.prototype.once=function(d,h,m){return s(this,d,h,m,!0)},l.prototype.removeListener=function(d,h,m,g){var w=n?n+d:d;if(!this._events[w])return this;if(!h)return a(this,w),this;var A=this._events[w];if(A.fn)A.fn===h&&(!g||A.once)&&(!m||A.context===m)&&a(this,w);else{for(var v=0,x=[],T=A.length;v<T;v++)(A[v].fn!==h||g&&!A[v].once||m&&A[v].context!==m)&&x.push(A[v]);x.length?this._events[w]=x.length===1?x[0]:x:a(this,w)}return this},l.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&a(this,h)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,t.exports=l})(y3)),y3.exports}var rX=nX();const iX=Jk(rX);class sX{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new iX})}on(e,n){this._emitter.on(e,n)}once(e,n){this._emitter.once(e,n)}off(e,n){this._emitter.off(e,n)}emit(e,...n){const r=n[0];this._emitter.emit(e,{uid:this.uid,...r})}listenerCount(e){return this._emitter.listenerCount(e)}}function oX(t){return new sX(t)}function aX(t,e){return JSON.parse(t,(n,r)=>{let i=r;return(i==null?void 0:i.__type)==="bigint"&&(i=BigInt(i.value)),(i==null?void 0:i.__type)==="Map"&&(i=new Map(i.value)),(e==null?void 0:e(n,i))??i})}function qI(t,e){return t.slice(0,e).join(".")||"."}function $I(t,e){const{length:n}=t;
1692for(let r=0;r<n;++r)if(t[r]===e)return r+1;return 0}function cX(t,e){const n=typeof t=="function",r=typeof e=="function",i=[],s=[];return function(l,u){if(typeof u=="object")if(i.length){const d=$I(i,this);d===0?i[i.length]=this:(i.splice(d),s.splice(d)),s[s.length]=l;const h=$I(i,u);if(h!==0)return r?e.call(this,l,u,qI(s,h)):`[ref=${qI(s,h)}]`}else i[0]=u,s[0]=l;return n?t.call(this,l,u):u}}function lX(t,e,n,r){return JSON.stringify(t,cX((i,s)=>{let a=s;return typeof a=="bigint"&&(a={__type:"bigint",value:s.toString()}),a instanceof Map&&(a={__type:"Map",value:Array.from(s.entries())}),(e==null?void 0:e(i,a))??a},r),n??void 0)}function uX(t){const{deserialize:e=aX,key:n="wagmi",serialize:r=lX,storage:i=iP}=t;function s(a){return a instanceof Promise?a.then(l=>l).catch(()=>null):a}return{...i,key:n,async getItem(a,l){const u=i.getItem(`${n}.${a}`),d=await s(u);return d?e(d)??null:l??null},async setItem(a,l){const u=`${n}.${a}`;l===null?await s(i.removeItem(u)):await s(i.setItem(u,r(l)))},async removeItem(a){await s(i.removeItem(`${n}.${a}`))}}}const iP={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function fX(){const t=typeof window<"u"&&window.localStorage?window.localStorage:iP;return{getItem(e){return t.getItem(e)},removeItem(e){t.removeItem(e)},setItem(e,n){try{t.setItem(e,n)}catch{}}}}const sx=256;let Ib=sx,Rb;function dX(t=11){if(!Rb||Ib+t>sx*2){Rb="",Ib=0;for(let e=0;e<sx;e++)Rb+=(256+Math.random()*256|0).toString(16).substring(1)}return Rb.substring(Ib,Ib+++t)}function hX(t){const{multiInjectedProviderDiscovery:e=!0,storage:n=uX({storage:fX()}),syncConnectedChain:r=!0,ssr:i=!1,...s}=t,a=typeof window<"u"&&e?YJ():void 0,l=g3(()=>s.chains),u=g3(()=>{const B=[],U=new Set;for(const I of s.connectors??[]){const R=d(I);if(B.push(R),!i&&R.rdns){const M=typeof R.rdns=="string"?[R.rdns]:R.rdns;for(const F of M)U.add(F)}}if(!i&&a){const I=a.getProviders();for(const R of I)U.has(R.info.rdns)||B.push(d(h(R)))}return B});function d(B){var R;const U=oX(dX()),I={...B({emitter:U,chains:l.getState(),storage:n,transports:s.transports}),emitter:U,uid:U.uid};return U.on("connect",k),(R=I.setup)==null||R.call(I),I}function h(B){const{info:U}=B,I=B.provider;return qv({target:{...U,id:U.rdns,provider:I}})}const m=new Map;function g(B={}){const U=B.chainId??x.getState().chainId,I=l.getState().find(M=>M.id===U);if(B.chainId&&!I)throw new Ll;{const M=m.get(x.getState().chainId);if(M&&!I)return M;if(!I)throw new Ll}{const M=m.get(U);if(M)return M}let R;if(s.client)R=s.client({chain:I});else{const M=I.id,F=l.getState().map(L=>L.id),j={},q=Object.entries(s);for(const[L,Se]of q)if(!(L==="chains"||L==="client"||L==="connectors"||L==="transports"))if(typeof Se=="object")if(M in Se)j[L]=Se[M];else{if(F.some(Q=>Q in Se))continue;j[L]=Se}else j[L]=Se;R=ZB({...j,chain:I,batch:j.batch??{multicall:!0},transport:L=>s.transports[M]({...L,connectors:u})})}return m.set(U,R),R}function w(){return{chainId:l.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let A;const v="0.0.0-canary-";Yb.startsWith(v)?A=Number.parseInt(Yb.replace(v,"")):A=Number.parseInt(Yb.split(".")[0]??"0");const x=g3(XJ(n?tX(w,{migrate(B,U){if(U===A)return B;const I=w(),R=T(B,I.chainId);return{...I,chainId:R}},name:"store",partialize(B){return{connections:{__type:"Map",value:Array.from(B.connections.entries()).map(([U,I])=>{const{id:R,name:M,type:F,uid:j}=I.connector;return[U,{...I,connector:{id:R,name:M,type:F,uid:j}}]})},chainId:B.chainId,current:B.current}},merge(B,U){typeof B=="object"&&B&&"status"in B&&delete B.status;const I=T(B,U.chainId);return{...U,...B,chainId:I}},skipHydration:i,storage:n,version:A}):w));x.setState(w());function T(B,U){return B&&typeof B=="object"&&"chainId"in B&&typeof B.chainId=="number"&&l.getState().some(I=>I.id===B.chainId)?B.chainId:U}r&&x.subscribe(({connections:B,current:U})=>{var I;return U?(I=B.get(U))==null?void 0:I.chainId:void 0},B=>{if(l.getState().some(I=>I.id===B))return x.setState(I=>({...I,chainId:B??I.chainId}))}),a==null||a.subscribe(B=>{const U=new Set,I=new Set;for(const M of u.getState())if(U.add(M.id),M.rdns){const F=typeof M.rdns=="string"?[M.rdns]:M.rdns;for(const j of F)I.add(j)}const R=[];for(const M of B){if(I.has(M.info.rdns))continue;const F=d(h(M));
1692U.has(F.id)||R.push(F)}n&&!x.persist.hasHydrated()||u.setState(M=>[...M,...R],!0)});function O(B){x.setState(U=>{const I=U.connections.get(B.uid);return I?{...U,connections:new Map(U.connections).set(B.uid,{accounts:B.accounts??I.accounts,chainId:B.chainId??I.chainId,connector:I.connector})}:U})}function k(B){x.getState().status==="connecting"||x.getState().status==="reconnecting"||x.setState(U=>{const I=u.getState().find(R=>R.uid===B.uid);return I?(I.emitter.listenerCount("connect")&&I.emitter.off("connect",O),I.emitter.listenerCount("change")||I.emitter.on("change",O),I.emitter.listenerCount("disconnect")||I.emitter.on("disconnect",P),{...U,connections:new Map(U.connections).set(B.uid,{accounts:B.accounts,chainId:B.chainId,connector:I}),current:B.uid,status:"connected"}):U})}function P(B){x.setState(U=>{const I=U.connections.get(B.uid);if(I){const M=I.connector;M.emitter.listenerCount("change")&&I.connector.emitter.off("change",O),M.emitter.listenerCount("disconnect")&&I.connector.emitter.off("disconnect",P),M.emitter.listenerCount("connect")||I.connector.emitter.on("connect",k)}if(U.connections.delete(B.uid),U.connections.size===0)return{...U,connections:new Map,current:null,status:"disconnected"};const R=U.connections.values().next().value;return{...U,connections:new Map(U.connections),current:R.connector.uid}})}return{get chains(){return l.getState()},get connectors(){return u.getState()},storage:n,getClient:g,get state(){return x.getState()},setState(B){let U;typeof B=="function"?U=B(x.getState()):U=B;const I=w();typeof U!="object"&&(U=I),Object.keys(I).some(M=>!(M in U))&&(U=I),x.setState(U,!0)},subscribe(B,U,I){return x.subscribe(B,U,I?{...I,fireImmediately:I.emitImmediately}:void 0)},_internal:{mipd:a,store:x,ssr:!!i,syncConnectedChain:r,transports:s.transports,chains:{setState(B){const U=typeof B=="function"?B(l.getState()):B;if(U.length!==0)return l.setState(U,!0)},subscribe(B){return l.subscribe(B)}},connectors:{providerDetailToConnector:h,setup:d,setState(B){return u.setState(typeof B=="function"?B(u.getState()):B,!0)},subscribe(B){return u.subscribe(B)}},events:{change:O,connect:k,disconnect:P}}}}function pX(t,e){const{initialState:n,reconnectOnMount:r}=e;return n&&!t._internal.store.persist.hasHydrated()&&t.setState({...n,chainId:t.chains.some(i=>i.id===n.chainId)?n.chainId:t.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){t._internal.ssr&&(await t._internal.store.persist.rehydrate(),t._internal.mipd&&t._internal.connectors.setState(i=>{var u;const s=new Set;for(const d of i??[])if(d.rdns){const h=Array.isArray(d.rdns)?d.rdns:[d.rdns];for(const m of h)s.add(m)}const a=[],l=((u=t._internal.mipd)==null?void 0:u.getProviders())??[];for(const d of l){if(s.has(d.info.rdns))continue;const h=t._internal.connectors.providerDetailToConnector(d),m=t._internal.connectors.setup(h);a.push(m)}return[...i,...a]})),r?FJ(t):t.storage&&t.setState(i=>({...i,connections:new Map}))}}}function sP(t){var s,a,l;const{chain:e}=t,n=e.rpcUrls.default.http[0];if(!t.transports)return[n];const r=(a=(s=t.transports)==null?void 0:s[e.id])==null?void 0:a.call(s,{chain:e});return(((l=r==null?void 0:r.value)==null?void 0:l.transports)||[r]).map(({value:u})=>(u==null?void 0:u.url)||n)}function mX(t){const{children:e,config:n,initialState:r,reconnectOnMount:i=!0}=t,{onMount:s}=pX(n,{initialState:r,reconnectOnMount:i});n._internal.ssr||s();const a=K.useRef(!0);return K.useEffect(()=>{if(a.current&&n._internal.ssr)return s(),()=>{a.current=!1}},[]),e}const oP=K.createContext(void 0);function gX(t){const{children:e,config:n}=t,r={value:n};return K.createElement(mX,t,K.createElement(oP.Provider,r,e))}const yX="2.15.6",bX=()=>`wagmi@${yX}`;class wX extends mc{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return bX()}}class vX extends wX{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProvi
1692derNotFoundError"})}}function nr(t={}){const e=t.config??K.useContext(oP);if(!e)throw new vX;return e}function AX(t,e){const{onChange:n}=e;return t._internal.chains.subscribe((r,i)=>{n(r,i)})}var b3={exports:{}},w3={},v3={exports:{}},A3={};/** 1693 * @license React 1694 * use-sync-external-store-shim.production.js 1695 * 1696 * Copyright (c) Meta Platforms, Inc. and affiliates. 1697 * 1698 * This source code is licensed under the MIT license found in the 1699 * LICENSE file in the root directory of this source tree. 1700 */var GI;function EX(){if(GI)return A3;GI=1;var t=Sy();function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function l(m,g){var w=g(),A=r({inst:{value:w,getSnapshot:g}}),v=A[0].inst,x=A[1];return s(function(){v.value=w,v.getSnapshot=g,u(v)&&x({inst:v})},[m,w,g]),i(function(){return u(v)&&x({inst:v}),m(function(){u(v)&&x({inst:v})})},[m]),a(w),w}function u(m){var g=m.getSnapshot;m=m.value;try{var w=g();return!n(m,w)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return A3.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,A3}var QI;function xX(){return QI||(QI=1,v3.exports=EX()),v3.exports}/** 1701 * @license React 1702 * use-sync-external-store-shim/with-selector.production.js 1703 * 1704 * Copyright (c) Meta Platforms, Inc. and affiliates. 1705 * 1706 * This source code is licensed under the MIT license found in the 1707 * LICENSE file in the root directory of this source tree. 1708 */var KI;function CX(){if(KI)return w3;KI=1;var t=Sy(),e=xX();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,l=t.useMemo,u=t.useDebugValue;return w3.useSyncExternalStoreWithSelector=function(d,h,m,g,w){var A=s(null);if(A.current===null){var v={hasValue:!1,value:null};A.current=v}else v=A.current;A=l(function(){function T(U){if(!O){if(O=!0,k=U,U=g(U),w!==void 0&&v.hasValue){var I=v.value;if(w(I,U))return P=I}return P=U}if(I=P,r(k,U))return I;var R=g(U);return w!==void 0&&w(I,R)?(k=U,I):(k=U,P=R)}var O=!1,k,P,B=m===void 0?null:m;return[function(){return T(h())},B===null?void 0:function(){return T(B())}]},[h,m,g,w]);var x=i(d,A[0],A[1]);return a(function(){v.hasValue=!0,v.value=x},[x]),u(x),x},w3}var WI;function _X(){return WI||(WI=1,b3.exports=CX()),b3.exports}var aP=_X();const E3=t=>typeof t=="object"&&!Array.isArray(t);function TX(t,e,n=e,r=Ul){const i=K.useRef([]),s=aP.useSyncExternalStoreWithSelector(t,e,n,a=>a,(a,l)=>{if(E3(a)&&E3(l)&&i.current.length){for(const u of i.current)if(!r(a[u],l[u]))return!1;return!0}return r(a,l)});return K.useMemo(()=>{if(E3(s)){const a={...s};let l={};for(const[u,d]of Object.entries(a))l={...l,[u]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(u)||i.current.push(u),d)}};return Object.defineProperties(a,l),a}return s},[s])}function gr(t={}){const e=nr(t);return TX(n=>rP(e,{onChange:n}),()=>nP(e))}function cP(t={}){const{onConnect:e,onDisconnect:n}=t,r=nr(t);K.useEffect(()=>rP(r,{onChange(i,s){if((s.status==="reconnecting"||s.status==="connecting"&&s.address===void 0)&&i.status==="connected"){const{address:a,addresses:l,chain:u,chainId:d,connector:h}=i,m=s.status==="reconnecting"||s.status===void 0;e==null||e({address:a,addresses:l,chain:u,chainId:d,connector:h,isReconnected:m})}else s.status==="connected"&&i.status==="disconnected"&&(n==null||n())}}),[r,e,n])}var g0=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},SX={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},nl,DC,Uk,IX=(Uk=class{constructor(){ee(this,nl,SX);ee(this,DC,!1)}setTimeoutProvider(t){z(this,nl,t)}setTimeout(t,e){return C(this,nl).setTimeout(t,e)}
1708clearTimeout(t){C(this,nl).clearTimeout(t)}setInterval(t,e){return C(this,nl).setInterval(t,e)}clearInterval(t){C(this,nl).clearInterval(t)}},nl=new WeakMap,DC=new WeakMap,Uk),Ku=new IX;function RX(t){setTimeout(t,0)}var qf=typeof window>"u"||"Deno"in globalThis;function Ur(){}function kX(t,e){return typeof t=="function"?t(e):t}function ox(t){return typeof t=="number"&&t>=0&&t!==1/0}function lP(t,e){return Math.max(t+(e||0)-Date.now(),0)}function kl(t,e){return typeof t=="function"?t(e):t}function us(t,e){return typeof t=="function"?t(e):t}function YI(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:l}=t;if(a){if(r){if(e.queryHash!==A2(a,e.options))return!1}else if(!jg(e.queryKey,a))return!1}if(n!=="all"){const u=e.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function JI(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if($f(e.options.mutationKey)!==$f(s))return!1}else if(!jg(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function A2(t,e){return((e==null?void 0:e.queryKeyHashFn)||$f)(t)}function $f(t){return JSON.stringify(t,(e,n)=>ax(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function jg(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>jg(t[n],e[n])):!1}var NX=Object.prototype.hasOwnProperty;function uP(t,e){if(t===e)return t;const n=XI(t)&&XI(e);if(!n&&!(ax(t)&&ax(e)))return e;const i=(n?t:Object.keys(t)).length,s=n?e:Object.keys(e),a=s.length,l=n?new Array(a):{};let u=0;for(let d=0;d<a;d++){const h=n?d:s[d],m=t[h],g=e[h];if(m===g){l[h]=m,(n?d<i:NX.call(t,h))&&u++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){l[h]=g;continue}const w=uP(m,g);l[h]=w,w===m&&u++}return i===a&&u===i?t:l}function Iw(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function XI(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ax(t){if(!ZI(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!ZI(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function ZI(t){return Object.prototype.toString.call(t)==="[object Object]"}function OX(t){return new Promise(e=>{Ku.setTimeout(e,t)})}function cx(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?uP(t,e):e}function BX(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function PX(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var E2=Symbol();function fP(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===E2?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function dP(t,e){return typeof t=="function"?t(...e):!!t}var nf,rl,Lh,Fk,DX=(Fk=class extends g0{constructor(){super();ee(this,nf);ee(this,rl);ee(this,Lh);z(this,Lh,e=>{if(!qf&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,rl)||this.setEventListener(C(this,Lh))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,rl))==null||e.call(this),z(this,rl,void 0))}setEventListener(e){var n;z(this,Lh,e),(n=C(this,rl))==null||n.call(this),z(this,rl,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){C(this,nf)!==e&&(z(this,nf,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof C(this,nf)=="boolean"?C(this,nf):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},nf=new WeakMap,rl=new WeakMap,Lh=new WeakMap,Fk),x2=new DX;function lx(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var MX=RX;function jX(){let t=[],e=0,n=l=>{l()},r=l=>{l()},i=MX;const s=l=>{e?t.push(l):i(()=>{n(l)})},a=()=>{const l=t;t=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{n(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||a()}return u},batchCalls:l=>(...u)=>{s(()=>{l(...u)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Mn=jX(),Uh,il,Fh,Vk,LX=(Vk=class extends g0{constructor(){super();ee(this,Uh,!0);ee(this,il);ee(this,Fh);z(this,Fh,e=>{if(!qf&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,il)||this.setEventListener(C(this,Fh))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,il))==null||e.call(this),z(this,il,void 0))}setEventListener(e){var n;z(this,Fh,e),(n=C(this,il))==null||n.call(this),z(this,il,e(this.setOnline.bind(this)))}setOnline(e){C(this,Uh)!==e&&(z(this,Uh,e),this.listeners.forEac
1708h(r=>{r(e)}))}isOnline(){return C(this,Uh)}},Uh=new WeakMap,il=new WeakMap,Fh=new WeakMap,Vk),Rw=new LX;function UX(t){return Math.min(1e3*2**t,3e4)}function hP(t){return(t??"online")==="online"?Rw.isOnline():!0}var ux=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function pP(t){let e=!1,n=0,r;const i=lx(),s=()=>i.status!=="pending",a=v=>{var x;if(!s()){const T=new ux(v);g(T),(x=t.onCancel)==null||x.call(t,T)}},l=()=>{e=!0},u=()=>{e=!1},d=()=>x2.isFocused()&&(t.networkMode==="always"||Rw.isOnline())&&t.canRun(),h=()=>hP(t.networkMode)&&t.canRun(),m=v=>{s()||(r==null||r(),i.resolve(v))},g=v=>{s()||(r==null||r(),i.reject(v))},w=()=>new Promise(v=>{var x;r=T=>{(s()||d())&&v(T)},(x=t.onPause)==null||x.call(t)}).then(()=>{var v;r=void 0,s()||(v=t.onContinue)==null||v.call(t)}),A=()=>{if(s())return;let v;const x=n===0?t.initialPromise:void 0;try{v=x??t.fn()}catch(T){v=Promise.reject(T)}Promise.resolve(v).then(m).catch(T=>{var U;if(s())return;const O=t.retry??(qf?0:3),k=t.retryDelay??UX,P=typeof k=="function"?k(n,T):k,B=O===!0||typeof O=="number"&&n<O||typeof O=="function"&&O(n,T);if(e||!B){g(T);return}n++,(U=t.onFail)==null||U.call(t,n,T),OX(P).then(()=>d()?void 0:w()).then(()=>{e?g(T):A()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?A():w().then(A),i)}}var rf,zk,mP=(zk=class{constructor(){ee(this,rf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ox(this.gcTime)&&z(this,rf,Ku.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(qf?1/0:300*1e3))}clearGcTimeout(){C(this,rf)&&(Ku.clearTimeout(C(this,rf)),z(this,rf,void 0))}},rf=new WeakMap,zk),sf,Vh,is,of,Wn,uy,af,Ts,_a,Hk,FX=(Hk=class extends mP{constructor(n){super();ee(this,Ts);ee(this,sf);ee(this,Vh);ee(this,is);ee(this,of);ee(this,Wn);ee(this,uy);ee(this,af);z(this,af,!1),z(this,uy,n.defaultOptions),this.setOptions(n.options),this.observers=[],z(this,of,n.client),z(this,is,C(this,of).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,z(this,sf,eR(this.options)),this.state=n.state??C(this,sf),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=C(this,Wn))==null?void 0:n.promise}setOptions(n){if(this.options={...C(this,uy),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=eR(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),z(this,sf,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,is).remove(this)}setData(n,r){const i=cx(this.state.data,n,this.options);return he(this,Ts,_a).call(this,{data:i,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),i}setState(n,r){he(this,Ts,_a).call(this,{type:"setState",state:n,setStateOptions:r})}cancel(n){var i,s;const r=(i=C(this,Wn))==null?void 0:i.promise;return(s=C(this,Wn))==null||s.cancel(n),r?r.then(Ur).catch(Ur):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,sf))}isActive(){return this.observers.some(n=>us(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===E2||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>kl(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!lP(this.state.dataUpdatedAt,n)}onFocus(){var r;const n=this.observers.find(i=>i.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(r=C(this,Wn))==null||r.continue()}onOnline(){var r;const n=this.observers.find(i=>i.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(r=C(this,Wn))==null||r.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),C(this,is).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(C(this,Wn)&&(C(this,af)?C(this,Wn).cancel({revert:!0}):C(this,Wn).cancelRetry()),this.scheduleGc()),C(this,is).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Ts,_a).call(this,{type:"invalidate"})}async fetch(n,r){var d,h,m,g,w,A,v,x,T,O,k,P;if(this.state.fetchStatus!=="idle"&&((d=C(this,Wn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,Wn))return C(this,Wn).continueRetry(),C(this,Wn).promise}if(n&&this.setOptions(n),!this.options.queryFn){const B=this.observers.find(U=>U.options.queryFn);B&&this.setOptions(B.options)}const i=new AbortController,s=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(z(this,af,!0),i.signal)}
1708)},a=()=>{const B=fP(this.options,r),I=(()=>{const R={client:C(this,of),queryKey:this.queryKey,meta:this.meta};return s(R),R})();return z(this,af,!1),this.options.persister?this.options.persister(B,I,this):B(I)},u=(()=>{const B={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,of),state:this.state,fetchFn:a};return s(B),B})();(h=this.options.behavior)==null||h.onFetch(u,this),z(this,Vh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&he(this,Ts,_a).call(this,{type:"fetch",meta:(g=u.fetchOptions)==null?void 0:g.meta}),z(this,Wn,pP({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:B=>{B instanceof ux&&B.revert&&this.setState({...C(this,Vh),fetchStatus:"idle"}),i.abort()},onFail:(B,U)=>{he(this,Ts,_a).call(this,{type:"failed",failureCount:B,error:U})},onPause:()=>{he(this,Ts,_a).call(this,{type:"pause"})},onContinue:()=>{he(this,Ts,_a).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const B=await C(this,Wn).start();if(B===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(B),(A=(w=C(this,is).config).onSuccess)==null||A.call(w,B,this),(x=(v=C(this,is).config).onSettled)==null||x.call(v,B,this.state.error,this),B}catch(B){if(B instanceof ux){if(B.silent)return C(this,Wn).promise;if(B.revert){if(this.state.data===void 0)throw B;return this.state.data}}throw he(this,Ts,_a).call(this,{type:"error",error:B}),(O=(T=C(this,is).config).onError)==null||O.call(T,B,this),(P=(k=C(this,is).config).onSettled)==null||P.call(k,this.state.data,B,this),B}finally{this.scheduleGc()}}},sf=new WeakMap,Vh=new WeakMap,is=new WeakMap,of=new WeakMap,Wn=new WeakMap,uy=new WeakMap,af=new WeakMap,Ts=new WeakSet,_a=function(n){const r=i=>{switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...gP(i.data,this.options),fetchMeta:n.meta??null};case"success":const s={...i,data:n.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return z(this,Vh,n.manual?s:void 0),s;case"error":const a=n.error;return{...i,error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=r(this.state),Mn.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),C(this,is).notify({query:this,type:"updated",action:n})})},Hk);function gP(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hP(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function eR(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Zr,bt,fy,Pr,cf,zh,Na,sl,dy,Hh,qh,lf,uf,ol,$h,jt,Hm,fx,dx,hx,px,mx,gx,yx,yP,qk,VX=(qk=class extends g0{constructor(e,n){super();ee(this,jt);ee(this,Zr);ee(this,bt);ee(this,fy);ee(this,Pr);ee(this,cf);ee(this,zh);ee(this,Na);ee(this,sl);ee(this,dy);ee(this,Hh);ee(this,qh);ee(this,lf);ee(this,uf);ee(this,ol);ee(this,$h,new Set);this.options=n,z(this,Zr,e),z(this,sl,null),z(this,Na,lx()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,bt).addObserver(this),tR(C(this,bt),this.options)?he(this,jt,Hm).call(this):this.updateResult(),he(this,jt,px).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bx(C(this,bt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bx(C(this,bt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,jt,mx).call(this),he(this,jt,gx).call(this),C(this,bt).removeObserver(this)}setOptions(e){const n=this.options,r=C(this,bt);if(this.options=C(this,Zr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof us(this.options.enabled,C(this,bt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,jt,yx).call(this),C(this,bt).setOptions(this.options),n._defaulted&&!Iw(this.options,n)&&C(this,Zr).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,bt),observer:this});const i=this.hasListeners();i&&nR(C(this,bt),r,this.options,n)&&he(this,jt,Hm).call(this),this.updateResult(),i&&(C(this,bt)!==r||us(this.options.enabled,C(this,bt))!==us(n.enabled,C(this,bt))||kl(this.options.staleTime,C(this,bt))!==kl(n.staleTime,C(this,bt)))&&he(this,jt,fx).call(this);const s=he(this,jt,dx).call(this);i&&(C(this,bt)!==r||us(this.options.enabled,C(this,bt))!==us(n.enabled,C(this,bt))||s!==C(this,ol))&&he(this,jt,hx).call(this,s)}getOptimisticResult(e){const n=C(this,Zr).getQueryCache().build(C(this,Zr),e),r=this.createResult(n,e);return HX(this,r)&&(z(this,Pr,r),z(this,zh,this.options),z(this,cf,C(this,bt).state)),r}getCurrentResult(){return C(this,Pr)}trackResult(e,n){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&C(this,Na).status==="pending"&&C(this,Na).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(e){C(this,$h).add(e)}getCurrentQuery(){return C(this,bt)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=C(this,Zr).defaultQueryOptions(e),r=C(this,Zr).getQueryCache().build(C(this,Zr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return he(this,jt,Hm).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Pr)))}createResult(e,n){var M;const r=C(this,bt),i=this.options,s=C(this,Pr),a=C(this,cf),l=C(this,zh),d=e!==r?e.state:C(this,fy),{state:h}=e;let m={...h},g=!1,w;if(n._optimisticResults){const F=this.hasListeners(),j=!F&&tR(e,n),q=F&&nR(e,r,n,i);(j||q)&&(m={...m,...gP(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:A,errorUpdatedAt:v,status:x}=m;w=m.data;let T=!1;if(n.placeholderData!==void 0&&w===void 0&&x==="pending"){let F;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(F=s.data,T=!0):F=typeof n.placeholderData=="function"?n.placeholderData((M=C(this,qh))==null?void 0:M.state.data,C(this,qh)):n.placeholderData,F!==void 0&&(x="success",w=cx(s==null?void 0:s.data,F,n),g=!0)}if(n.select&&w!==void 0&&!T)if(s&&w===(a==null?void 0:a.data)&&n.select===C(this,dy))w=C(this,Hh);else try{z(this,dy,n.select),w=n.select(w),w=cx(s==null?void 0:s.data,w,n),z(this,Hh,w),z(this,sl,null)}catch(F){z(this,sl,F)}C(this,sl)&&(A=C(this,sl),w=C(this,Hh),v=Date.now(),x="error");const O=m.fetchStatus==="fetching",k=x==="pending",P=x==="error",B=k&&O,U=w!==void 0,R={status:x,fetchStatus:m.fetchStatus,isPending:k,isSuccess:x==="success",isError:P,isInitialLoading:B,isLoading:B,data:w,dataUpdatedAt:m.dataUpdatedAt,error:A,errorUpdatedAt:v,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdate
vendor: 8,412 bytes, line 1708
1708Count:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:O,isRefetching:O&&!k,isLoadingError:P&&!U,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:P&&U,isStale:C2(e,n),refetch:this.refetch,promise:C(this,Na),isEnabled:us(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const F=L=>{R.status==="error"?L.reject(R.error):R.data!==void 0&&L.resolve(R.data)},j=()=>{const L=z(this,Na,R.promise=lx());F(L)},q=C(this,Na);switch(q.status){case"pending":e.queryHash===r.queryHash&&F(q);break;case"fulfilled":(R.status==="error"||R.data!==q.value)&&j();break;case"rejected":(R.status!=="error"||R.error!==q.reason)&&j();break}}return R}updateResult(){const e=C(this,Pr),n=this.createResult(C(this,bt),this.options);if(z(this,cf,C(this,bt).state),z(this,zh,this.options),C(this,cf).data!==void 0&&z(this,qh,C(this,bt)),Iw(n,e))return;z(this,Pr,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!C(this,$h).size)return!0;const a=new Set(s??C(this,$h));return this.options.throwOnError&&a.add("error"),Object.keys(C(this,Pr)).some(l=>{const u=l;return C(this,Pr)[u]!==e[u]&&a.has(u)})};he(this,jt,yP).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,jt,px).call(this)}},Zr=new WeakMap,bt=new WeakMap,fy=new WeakMap,Pr=new WeakMap,cf=new WeakMap,zh=new WeakMap,Na=new WeakMap,sl=new WeakMap,dy=new WeakMap,Hh=new WeakMap,qh=new WeakMap,lf=new WeakMap,uf=new WeakMap,ol=new WeakMap,$h=new WeakMap,jt=new WeakSet,Hm=function(e){he(this,jt,yx).call(this);let n=C(this,bt).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ur)),n},fx=function(){he(this,jt,mx).call(this);const e=kl(this.options.staleTime,C(this,bt));if(qf||C(this,Pr).isStale||!ox(e))return;const r=lP(C(this,Pr).dataUpdatedAt,e)+1;z(this,lf,Ku.setTimeout(()=>{C(this,Pr).isStale||this.updateResult()},r))},dx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,bt)):this.options.refetchInterval)??!1},hx=function(e){he(this,jt,gx).call(this),z(this,ol,e),!(qf||us(this.options.enabled,C(this,bt))===!1||!ox(C(this,ol))||C(this,ol)===0)&&z(this,uf,Ku.setInterval(()=>{(this.options.refetchIntervalInBackground||x2.isFocused())&&he(this,jt,Hm).call(this)},C(this,ol)))},px=function(){he(this,jt,fx).call(this),he(this,jt,hx).call(this,he(this,jt,dx).call(this))},mx=function(){C(this,lf)&&(Ku.clearTimeout(C(this,lf)),z(this,lf,void 0))},gx=function(){C(this,uf)&&(Ku.clearInterval(C(this,uf)),z(this,uf,void 0))},yx=function(){const e=C(this,Zr).getQueryCache().build(C(this,Zr),this.options);if(e===C(this,bt))return;const n=C(this,bt);z(this,bt,e),z(this,fy,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},yP=function(e){Mn.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(C(this,Pr))}),C(this,Zr).getQueryCache().notify({query:C(this,bt),type:"observerResultsUpdated"})})},qk);function zX(t,e){return us(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function tR(t,e){return zX(t,e)||t.state.data!==void 0&&bx(t,e,e.refetchOnMount)}function bx(t,e,n){if(us(e.enabled,t)!==!1&&kl(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&C2(t,e)}return!1}function nR(t,e,n,r){return(t!==e||us(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&C2(t,n)}function C2(t,e){return us(e.enabled,t)!==!1&&t.isStaleByTime(kl(e.staleTime,t))}function HX(t,e){return!Iw(t.getCurrentResult(),e)}function rR(t){return{onFetch:(e,n)=>{var h,m,g,w,A;const r=e.options,i=(g=(m=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,s=((w=e.state.data)==null?void 0:w.pages)||[],a=((A=e.state.data)==null?void 0:A.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const d=async()=>{let v=!1;const x=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},T=fP(e.options,e.fetchOptions),O=async(k,P,B)=>{if(v)return Promise.reject();if(P==null&&k.pages.length)return Promise.resolve(k);const I=(()=>{const j={client:e.client,queryKey:e.queryKey,pageParam:P,direction:B?"backward":"forward",meta:e.options.meta};return x(j),j})(),R=await T(I),{maxPages:M}=e.options,F=B?PX:BX;return{pages:F(k.pages,R,M),pageParams:F(k.pageParams,P,M)}};if(i&&s.length){const k=i==="backward",P=k?qX:iR,B={pages:s,pageParams:a},U=P(r,B);l=await O(B,U,k)}else{const k=t??s.length;do{const P=u===0?a[0]??r.initialPageParam:iR(r,l);if(u>0&&P==null)break;l=await O(l,P),u++}while(u<k)}return l};e.options.persister?e.fetchFn=()=>{var v,x;return(x=(v=e.options).persister)==null?void 0:x.call(v,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=d}}}function iR(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function qX(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var hy,mo,Dr,ff,go,Zc,$k,$X=($k=class extends mP{constructor(n){super();ee(this,go);ee(this,hy);ee(this,mo);ee(this,Dr);ee(this,ff);z(this,hy,n.client),this.mutationId=n.mutationId,z(this,Dr,n.mutationCache),z(this,mo,[]),this.state=n.state||bP(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){C(this,mo).includes(n)||(C(this,mo).push(n),this.clearGcTimeout(),C(this,Dr).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){z(this,mo,C(this,mo).filter(r=>r!==n)),this.scheduleGc(),C(this,Dr).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){C(this,mo).length||(this.state.status==="pending"?this.scheduleGc():C(this,Dr).remove(this))}continue(){var n;return((n=C(this,ff))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var l,u,d,h,m,g,w,A,v,x,T,O,k,P,B,U,I,R,M,F;const r=()=>{he(this,go,Zc).call(this,{type:"continue"})},i={client:C(this,hy),meta:this.options.meta,mutationKey:this.options.mutationKey};z(this,ff,pP({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:(j,q)=>{he(this,go,Zc).call(this,{type:"failed",failureCount:j,error:q})},onPause:()=>{he(this,go,Zc).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Dr).canRun(this)}));const s=this.state.status==="pending",a=!C(this,ff).canStart();try{if(s)r();else{he(this,go,Zc).call(this,{type:"pending",variables:n,isPaused:a}),await((u=(l=C(this,Dr).config).onMutate)==null?void 0:u.call(l,n,this,i));const q=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,n,i));q!==this.state.context&&he(this,go,Zc).call(this,{type:"pending",context:q,variables:n,isPaused:a})}const j=await C(this,ff).start();return await((g=(m=C(this,Dr).config).onSuccess)==null?void 0:g.call(m,j,n,this.state.context,this,i)),await((A=(w=this.options).onSuccess)==null?void 0:A.call(w,j,n,this.state.context,i)),await((x=(v=C(this,Dr).config).onSettled)==null?void 0:x.call(v,j,null,this.state.variables,this.state.context,this,i)),await((O=(T=this.options).onSettled)==null?void 0:O.call(T,j,null,n,this.state.context,i)),he(this,go,Zc).call(this,{type:"success",data:j}),j}catch(j){try{throw await((P=(k=C(this,Dr).config).onError)==null?void 0:P.call(k,j,n,this.state.context,this,i)),await((U=(B=this.options).onError)==null?void 0:U.call(B,j,n,this.state.context,i)),await((R=(I=C(this,Dr).config).onSettled)==null?void 0:R.call(I,void 0,j,this.state.variables,this.state.context,this,i)),await((F=(M=this.options).onSettled)==null?void 0:F.call(M,void 0,j,n,this.state.context,i)),j}finally{he(this,go,Zc).call(this,{type:"error",error:j})}}finally{C(this,Dr).runNext(this)}}},hy=new WeakMap,mo=new WeakMap,Dr=new WeakMap,ff=new WeakMap,go=new WeakSet,Zc=function(n){const r=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};
1708case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Mn.batch(()=>{C(this,mo).forEach(i=>{i.onMutationUpdate(n)}),C(this,Dr).notify({mutation:this,type:"updated",action:n})})},$k);function bP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Oa,Ss,py,Gk,GX=(Gk=class extends g0{constructor(e={}){super();ee(this,Oa);ee(this,Ss);ee(this,py);this.config=e,z(this,Oa,new Set),z(this,Ss,new Map),z(this,py,0)}build(e,n,r){const i=new $X({client:e,mutationCache:this,mutationId:++$c(this,py)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){C(this,Oa).add(e);const n=kb(e);if(typeof n=="string"){const r=C(this,Ss).get(n);r?r.push(e):C(this,Ss).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(C(this,Oa).delete(e)){const n=kb(e);if(typeof n=="string"){const r=C(this,Ss).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&C(this,Ss).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=kb(e);if(typeof n=="string"){const r=C(this,Ss).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=kb(e);if(typeof n=="string"){const i=(r=C(this,Ss).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Mn.batch(()=>{C(this,Oa).forEach(e=>{this.notify({type:"removed",mutation:e})}),C(this,Oa).clear(),C(this,Ss).clear()})}getAll(){return Array.from(C(this,Oa))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>JI(n,r))}findAll(e={}){return this.getAll().filter(n=>JI(e,n))}notify(e){Mn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Mn.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ur))))}},Oa=new WeakMap,Ss=new WeakMap,py=new WeakMap,Gk);function kb(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Ba,al,ei,Pa,nc,Xb,wx,Qk,QX=(Qk=class extends g0{constructor(n,r){super();ee(this,nc);ee(this,Ba);ee(this,al);ee(this,ei);ee(this,Pa);z(this,Ba,n),this.setOptions(r),this.bindMethods(),he(this,nc,Xb).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=C(this,Ba).defaultMutationOptions(n),Iw(this.options,r)||C(this,Ba).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,ei),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$f(r.mutationKey)!==$f(this.options.mutationKey)?this.reset():((i=C(this,ei))==null?void 0:i.state.status)==="pending"&&C(this,ei).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,ei))==null||n.removeObserver(this)}onMutationUpdate(n){he(this,nc,Xb).call(this),he(this,nc,wx).call(this,n)}getCurrentResult(){return C(this,al)}reset(){var n;(n=C(this,ei))==null||n.removeObserver(this),z(this,ei,void 0),he(this,nc,Xb).call(this),he(this,nc,wx).call(this)}mutate(n,r){var i;return z(this,Pa,r),(i=C(this,ei))==null||i.removeObserver(this),z(this,ei,C(this,Ba).getMutationCache().build(C(this,Ba),this.options)),C(this,ei).addObserver(this),C(this,ei).execute(n)}},Ba=new WeakMap,al=new WeakMap,ei=new WeakMap,Pa=new WeakMap,nc=new WeakSet,Xb=function(){var r;const n=((r=C(this,ei))==null?void 0:r.state)??bP();z(this,al,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wx=function(n){Mn.batch(()=>{var r,i,s,a,l,u,d,h;if(C(this,Pa)&&this.hasListeners()){const m=C(this,al).variables,g=C(this,al).context,w={client:C(this,Ba),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((i=(r=C(this,Pa)).onSuccess)==null||i.call(r,n.data,m,g,w),(a=(s=C(this,Pa)).onSettled)==null||a.call(s,n.data,null,m,g,w)):(n==null?void 0:n.type)==="error"&&((u=(l=C(this,Pa)).onError)==null||u.call(l,n.error,m,g,w),(h=(d=C(this,Pa)).onSettled)==null||h.call(d,void 0,n.error,m,g,w))}
vendor: 5,600 bytes, line 1708
1708this.listeners.forEach(m=>{m(C(this,al))})})},Qk),yo,Kk,KX=(Kk=class extends g0{constructor(e={}){super();ee(this,yo);this.config=e,z(this,yo,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??A2(i,n);let a=this.get(s);return a||(a=new FX({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){C(this,yo).has(e.queryHash)||(C(this,yo).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=C(this,yo).get(e.queryHash);n&&(e.destroy(),n===e&&C(this,yo).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Mn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return C(this,yo).get(e)}getAll(){return[...C(this,yo).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>YI(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>YI(e,r)):n}notify(e){Mn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Mn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Mn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},yo=new WeakMap,Kk),ln,cl,ll,Gh,Qh,ul,Kh,Wh,Wk,WX=(Wk=class{constructor(t={}){ee(this,ln);ee(this,cl);ee(this,ll);ee(this,Gh);ee(this,Qh);ee(this,ul);ee(this,Kh);ee(this,Wh);z(this,ln,t.queryCache||new KX),z(this,cl,t.mutationCache||new GX),z(this,ll,t.defaultOptions||{}),z(this,Gh,new Map),z(this,Qh,new Map),z(this,ul,0)}mount(){$c(this,ul)._++,C(this,ul)===1&&(z(this,Kh,x2.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,ln).onFocus())})),z(this,Wh,Rw.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,ln).onOnline())})))}unmount(){var t,e;$c(this,ul)._--,C(this,ul)===0&&((t=C(this,Kh))==null||t.call(this),z(this,Kh,void 0),(e=C(this,Wh))==null||e.call(this),z(this,Wh,void 0))}isFetching(t){return C(this,ln).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return C(this,cl).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=C(this,ln).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=C(this,ln).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(kl(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return C(this,ln).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=C(this,ln).get(r.queryHash),s=i==null?void 0:i.state.data,a=kX(e,s);if(a!==void 0)return C(this,ln).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Mn.batch(()=>C(this,ln).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=C(this,ln).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=C(this,ln);Mn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=C(this,ln);return Mn.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Mn.batch(()=>C(this,ln).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ur).catch(Ur)}invalidateQueries(t,e={}){return Mn.batch(()=>(C(this,ln).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Mn.batch(()=>C(this,ln).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ur)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ur)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=C(this,ln).build(this,e);return n.isStaleByTime(kl(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ur).catch(Ur)}fetchInfiniteQuery(t){return t.behavior=rR(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ur).catch(Ur)}ensureInfiniteQueryData(t){return t.behavior=rR(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Rw.isOnline()?C(this,cl).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,ln)}getMutationCache(){return C(this,cl)}getDefaultOptions(){return C(this,ll)}setDefaultOptions(t){z(this,ll,t)}setQueryDefaults(t,e){C(this,Gh).set($f(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...C(this,Gh).values()],n={};return e.forEach(r=>{jg(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){C(this,Qh).set($f(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...C(this,Qh).values()],n={};return e.forEach(r=>{jg(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...C(this,ll).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=A2(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===E2&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...C(this,ll).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}
1708clear(){C(this,ln).clear(),C(this,cl).clear()}},ln=new WeakMap,cl=new WeakMap,ll=new WeakMap,Gh=new WeakMap,Qh=new WeakMap,ul=new WeakMap,Kh=new WeakMap,Wh=new WeakMap,Wk);function YX(t){return JSON.stringify(t,(e,n)=>JX(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):typeof n=="bigint"?n.toString():n)}function JX(t){if(!sR(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!sR(n)||!n.hasOwnProperty("isPrototypeOf"))}function sR(t){return Object.prototype.toString.call(t)==="[object Object]"}function _2(t){const{_defaulted:e,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:s,maxPages:a,meta:l,networkMode:u,queryFn:d,queryHash:h,queryKey:m,queryKeyHashFn:g,retry:w,retryDelay:A,structuralSharing:v,getPreviousPageParam:x,getNextPageParam:T,initialPageParam:O,_optimisticResults:k,enabled:P,notifyOnChangeProps:B,placeholderData:U,refetchInterval:I,refetchIntervalInBackground:R,refetchOnMount:M,refetchOnReconnect:F,refetchOnWindowFocus:j,retryOnMount:q,select:L,staleTime:Se,suspense:X,throwOnError:Q,config:te,connector:J,query:fe,...$}=t;return $}function XX(t){return{mutationFn(e){return AJ(t,e)},mutationKey:["connect"]}}function ZX(t){return{mutationFn(e){return OJ(t,e)},mutationKey:["disconnect"]}}function eZ(t,e={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...s}=n[1];if(!r)throw new Error("address is required");return await MJ(t,{...s,address:r})??null},queryKey:tZ(e)}}function tZ(t={}){return["balance",_2(t)]}function nZ(t,e={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:i,...s}=n[1];if(!r)throw new Error("name is required");return LJ(t,{...s,name:r})},queryKey:rZ(e)}}function rZ(t={}){return["ensAvatar",_2(t)]}function iZ(t,e={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...s}=n[1];if(!r)throw new Error("address is required");return UJ(t,{...s,address:r})},queryKey:sZ(e)}}function sZ(t={}){return["ensName",_2(t)]}function oZ(t){return{mutationFn(e){return VJ(t,e)},mutationKey:["signMessage"]}}function aZ(t){return{mutationFn(e){return HJ(t,e)},mutationKey:["switchChain"]}}var wP=K.createContext(void 0),vP=t=>{const e=K.useContext(wP);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},cZ=({client:t,children:e})=>(K.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),G.jsx(wP.Provider,{value:t,children:e})),AP=K.createContext(!1),lZ=()=>K.useContext(AP);AP.Provider;function uZ(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var fZ=K.createContext(uZ()),dZ=()=>K.useContext(fZ),hZ=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},pZ=t=>{K.useEffect(()=>{t.clearReset()},[t])},mZ=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||dP(n,[t.error,r])),gZ=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},yZ=(t,e)=>t.isLoading&&t.isFetching&&!e,bZ=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,oR=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function wZ(t,e,n){var m,g,w,A,v;const r=lZ(),i=dZ(),s=vP(),a=s.defaultQueryOptions(t);(g=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||g.call(m,a),a._optimisticResults=r?"isRestoring":"optimistic",gZ(a),hZ(a,i),pZ(i);const l=!s.getQueryCache().get(a.queryHash),[u]=K.useState(()=>new e(s,a)),d=u.getOptimisticResult(a),h=!r&&t.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(x=>{const T=h?u.subscribe(Mn.batchCalls(x)):Ur;return u.updateResult(),T},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),K.useEffect(()=>{u.setOptions(a)},[a,u]),bZ(a,d))throw oR(a,u,i);if(mZ({result:d,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((A=(w=s.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||A.call(w,a,d),a.experimental_prefetchInRender&&!qf&&yZ(d,r)){const x=l?oR(a,u,i):(v=s.getQueryCache().get(a.queryHash))==null?void 0:v.promise;x==null||x.catch(Ur).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?d:u.trackResult(d)}function EP(t,e){return wZ(t,VX)}function $v(t,e){const n=vP(),[r]=K.useState(()=>new QX(n,t));K.useEffect(()=>{r.setOptions(t)},[r,t]);const i=K.useSyncExternalStore(K.useCallback(a=>r.subscribe(Mn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=K.useCallback((a,l)=>{r.mutate(a,l).catch(Ur)},[r]);if(i.error&&dP(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function T2(t){const e=EP({...t,queryKeyHashFn:YX});return e.queryKey=t.queryKey,e}function S2(t={}){const e=nr(t);return K.useSyncExternalStore(n=>qJ(e,{onChange:n}),()=>UI(e),()=>UI(e))}function xP(t={}){const{address:e,query:n={}}=t,r=nr(t),i=S2({config:r}),s=eZ(r,{...t,chainId:t.chainId??i}),a=!!(e&&(n.enabled??!0));return T2({...n,...s,enabled:a})}function vZ(t={}){const e=nr(t);return K.useSyncExternalStore(n=>AX(e,{onChange:n}),()=>FI(e),()=>FI(e))}function AZ(t={}){const e=nr(t);return K.useSyncExternalStore(n=>GJ(e,{onChange:n}),()=>VI(e),()=>VI(e))}function CP(t={}){const{mutation:e}
1708=t,n=nr(t),r=XX(n),{mutate:i,mutateAsync:s,...a}=$v({...e,...r});return K.useEffect(()=>n.subscribe(({status:l})=>l,(l,u)=>{u==="connected"&&l==="disconnected"&&a.reset()}),[n,a.reset]),{...a,connect:i,connectAsync:s,connectors:AZ({config:n})}}function EZ(t={}){const e=nr(t);return K.useSyncExternalStore(n=>$J(e,{onChange:n}),()=>nx(e),()=>nx(e))}function Gv(t={}){const{mutation:e}=t,n=nr(t),r=ZX(n),{mutate:i,mutateAsync:s,...a}=$v({...e,...r});return{...a,connectors:EZ({config:n}).map(l=>l.connector),disconnect:i,disconnectAsync:s}}function xZ(t={}){const{name:e,query:n={}}=t,r=nr(t),i=S2({config:r}),s=nZ(r,{...t,chainId:t.chainId??i}),a=!!(e&&(n.enabled??!0));return T2({...n,...s,enabled:a})}function CZ(t={}){const{address:e,query:n={}}=t,r=nr(t),i=S2({config:r}),s=iZ(r,{...t,chainId:t.chainId??i}),a=!!(e&&(n.enabled??!0));return T2({...n,...s,enabled:a})}function _Z(t={}){const e=nr(t);return aP.useSyncExternalStoreWithSelector(n=>QJ(e,{onChange:n}),()=>rx(e,t),()=>rx(e,t),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function TZ(t={}){const{mutation:e}
1708=t,n=nr(t),r=oZ(n),{mutate:i,mutateAsync:s,...a}=$v({...e,...r});return{...a,signMessage:i,signMessageAsync:s}}function SZ(t={}){const{mutation:e}=t,n=nr(t),r=aZ(n),{mutate:i,mutateAsync:s,...a}=$v({...e,...r});return{...a,chains:vZ({config:n}),switchChain:i,switchChainAsync:s}}function _P(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=_P(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function TP(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=_P(t))&&(r&&(r+=" "),r+=e);return r}var IZ="
vendor: 20,100 bytes, line 1708
1708AEkVMQnvDV0B0wKWAQYBQgDpATQAoQDcAIUApwBsAOMAcACTAEUAigBRAHkAPgA/ACwANwAoAGIAHgAvACsAJQAXAC8AHAAhACIALwAVACsAEQAiAAsAGwARABgAFwA7ACoAKwAsADQAFgAtABIAHAAhAA4AHQAdABUAFgAZAA0ADgAXABAAGQAUABIEtAYQASIUOjfDBdMAsQCuPwFnAKUBA10jAK5/Ly8vLwE/pwUJ6/0HPwbkMQVXBVgAPSs5APa2EQbIwQuUCkEDyJ4zAsUKLwKOoQKG2D+Ob4kCxcsCg/IBH98JAPKtAUECLY0KP48A4wDiChUAF9S5yAwLPZ0EG3cA/QI5GL0P6wkGKekFBIFnDRsHLQCrAGmR76WcfwBbBpMjBukAGwA7DJMAWxVbqft7uycM2yDPCLspA7EUOwD3LWujAKF9GAAXBCXXFgEdALkZzQT6CSBMNwmXCYgeG1ZZTOODQgATAAwAFQAOa1QAIQAOAEfuFdg98zlYypXmLgoQHV9NWD3sABMADAAVAA5rIFxAlwDD6wAbADkMxQAbFVup+3EB224cHQVbBeIC0J8CxLAKTBykZRRzGm1M9QC7DWcC4QALLTSJF8mRAoF7ARMbAL0NZwLhAAstAUhQJZFMCgMt+wUyCddpF60B10MASSsSdwIxFiEC6ye5N2sAOeEB9SUAxw7LtQEbY4EAsQUABQCK00kFG8MfBxcAqCfRAaErLQObAGcBChk+7Td0BBgXAKoBxwIhANMrEnM681CwBZA6dyc1SAX6JwVZBVivuAVpO11CEjpYQZd7k2ZfofgLEwPFByXxdyMEo0sCU1MCdRurJwGPo6U1WwNFFwSDYQkA0QarPy8jBykCOV0AawFhH3EAgx0ZAJUBSbcAJ2kXAa/FAzctIUNTAW9ZBmUCZQDxSRcDKQEFAElBAKsAXQBzACu1Bgfz7xmNfwAJIQApALMbRwHRAdsHCzGXeIHoAAoAEQA0AD0AODN3edPAEF8QXAFNCUxsOhULAqwPpgvlERUM0SrL09gANKkH6wNTB+sDUwNTB+sH6wNTB+sDUwNTA1MDUxwK8BrTwBBfD0gEbQWOBYsE1giDJkkRgQcoCNJUDXQeHEcDRQD8IyVJHDuTMwslQkwMTQMH/DZCbKd9OANHMatU9ZCiA8syTzlsAR5xEqAAKg9zHDW1Tn56R3GgCktPrrV/SWJOZwK+Oqg/+AohCZNvu3dOBj0QFyehEPMMLwGxATcN6UvUBO0GNwTFH3kZFQ/JlZgIoS3ZDOkm3y6dgFYj8Sp/BelL8DzZC0lRZA9VC2EJ3zpfgUoDHQEJIocK2Q01CGkQ7wrFZw3hEUEHNQPRSZYAoQb9Cw0dMRWxJgxiqAsFOXMG9xryC4smqxMlevgFzxodBkkBJRr7AMsu44WsWi1cGE9bBf8LISPDFKRQHA0hQLN4RBoXBxElpQKNQ2xKg1EyHo8h8jw5DWIuD1F4B/E8ARlLC308mkanRQoRzj6JPUQiRUwoBDF7LCsnhwnLD4EMtXxuAVUJHQmtDG0TLRETN8EINQcVKZcgJxEIHUaRYJYE85sD7xPNAwcFOwk9Bw8DsRwpEyoVJQUJgSDTAu820S6vAotWfAETBccPIR/bEExH3A7lCJcCYQN/JecAKRUdABMilwg/XwBbj9RTAS7HCMNqaCNwA2MU410RbweNDlMHoxwvFbsc3XDEXgeGBCifqwlXAXEJlQFbBN8IBTVXjJwgPWdPi1QYlyBdQTtd+AItDGEVm0S5h3QChw9nEhcBMQFvBzUM/QJzEekRZxCRCOeGADWxM/Q6IQRLIX8gDQojA0tsygsjJvUM9GUBnxJeAwg0OXfqZ6dgsiAX+QcVMsFBXCHtC45PyQyYGr0YPlQqGeAHuwPvGu8n5kFTBfsDnw86STPqBLkLZQiHCTsARQ6fEwfTGGYKbYzMAS2HAbOVA1ONfwJriwYzBwcAYweDBXXhABkCowifAAEAywNTADUCqQeZABUAgT0BOQMjKwEd4QKLA48ILccBkSsB7yUEF78MEQDzM25GAsOtAoBmZp4F2VQCigJFMQFJIQQBSkNNA6tt3QDXAEcGD9tDARGnRscW3z8B22snAMMA9wABMQcBPQHJAe9pALMBWwstCZ6vsQFJ5SUAfwARZwHTAoUA2QAxAHvtAU8ASQVV9QXPAktFAQ0tFCdTXQG3AxsBLwEJAHUGx4mhxQMbBGkHzwIQFxXdAu8qB7EDItsTyULBAr3aUQAyEgo0CrUKtB9f81wvAi1uPUwACh+kPsM/SgVNO087VDtPO1Q7TztUO087VDtPO1QDk7veu94KaF9BYecMog3QRMQ6RRPXYE1gLhPELbMUvRXKJVIZORq4JwEl4FUFDwAtz2YsCCg0cRe4ADspZIM9Y4IeLApHHONTjVT0LRcArUueM6sNqBsRRDwFQ3XpYiYWCgoeAmR9AmI+V0mrVzccAqHzAmiUAmYFAp+AOBcHAmY3AmYiBGoEewN/DwN+jjkCOXMTOX46Hx8CbBkCMjI4BgJtwwJtquuGL2NBJwFjANoA3QBGAQeUDIkA+ge+AAmxAncrAnaeOwJ5Rz8CeLYZWNdFqkbTAnw7AnrEAn0FAnzsBVUFHEf8SHlfIAAnEUlUSlcRE0rIAtD9AtDISyMDiEsDh+JEwZEuAvKdXP8DA6pLykwpIctNSE2rAos7AorUvRcDGT9jAbMCjjMCjlg8k30CjtUCjlh0UbBTMQZS0FSBApP3ApMIAOUAGFUaVatVzAIsFymRgjLdeGJFNzUCl5sC765YHaQAVSEClosClniYAKVZqFoFfUkANwKWsQKWSlxAXM0CmccCmWBcxl0DFQKclzm+OpkCnBICn5cCnrSGABkLLSYLAp3tAp6OALE5YTBh6wKezwKgagGlAp6bGwKeSqFjxGQjIScCJ6sCJnoCoPcCoEgCotkCocACpisCpcoCp/sAeQKn7mh4aK3/RWoYas0CrN8CrKoCrWMCrP4CVxkCVdgCsd3TAx9KbJMCsrkJArLkE2zcbV9tRFsDJckCtlg3O26MAylBArhaArlDEQK5JnNwMnDdAr0VArvWcJIDMg0CvoRx/gMzbQK+FnMec0sCw8cCwwBzfnRHMUF03AM8owM8lgM9uwLFeALGQwLGDIUCyGVNAshAAslLAskqAmSZAt3OeHVdeKp5IUvMAxifZv4CYfAZ75Ugewdejl63DQLPZwLPaCtHT87vD5sAwqkCz28BJeYDTg5+RwEC3CMC24YC0ksDUlgDU1sA/QNViICFO8cS6VxBghiCz4LKg4kC2sMC2dqEDIRFpzgDhqEAKwNkCoZtVfUAUQLfYQLetG9zAuIr7RAB8ywjAfSXAfLOgwLr7wLpbHUC6vUC6uAA9UMBtQLuhQLrmJamlv8C7jsDhdyYdXDccZ0C8v8AZQOOEpmPAvcPA5FqA5KDAveUAvnVAvhimhiap7czmxoDnX8C/vYBFwA1nxifrwMFiQOmZgOm1QDNwQMGZqGEogEFAwxFAQsBGwdpBl21YwEAtwRnuw2HHq8JABNxNQAfAy8SSQOFewFfIx0AjOsAHQDmnwObjQizBhufwQCnBRG76R09PhZ4BWg3PkArQiFCtF9xEV+8AJbFBTIAkEwZm7k7JmAyEbrPDi8YxhiJyfYFVwVYBVcFWAVjBVgFVwVYBVcFWAVXBVgFVwVYRhUI14VnAgICCmRe6SsEyQOxBi+7uwC7BKe7AOdAKRayBUY+aT5wQj9Ctl91N1/oAFgRM6sAjP7Ma8v8pudGej0mIwQrFic2NX5t32rB8RnCLGkBa9duMBcFXwVqycHJuAjPSVsAAAAKfF59i74AMz+BAAMW0QblrSMFAIzDCwMBDQDlZR09JB9KQrFCvEE4I18nYDYnOCMJwT0KRD9DPng+gT5wPnECiUK8SUI7X8tOT2pNCixrVC9qC24fX+AzOhsJZ5sKYiMrPB0mQqtCvCvMAcv8X8kOHy4JCAkifp3fajotShfJq8msCWXBy8wKYEFfD+UQoxEAk40dRUIlG6ltOc44CjM/Qz5wQj8cBwodTEdsWywtWuG8Egp97R0rQj8cXQhKCQ4zVENCNwQ7Q5wsCoEbLUI/G/UIUyIjGDAxAAWPYfBeCnFkyWALYC0jbkNgGTkCGx5gswYCaxBlTmBNEQFk52AVYJVgfWCzYEtgkWgWFwa1DtxVqbxaC0MWqwG7K83BAh8VABwDHgF5AmwvMJVSgAGKCrhHGgDkI3SOCsoNpk3qAZsCh5xPBUBfAPf3BwA0FlcMC6UMJB+6r0eAgQw0ABUTnyuCCHoC0gtLZREbANhOBnUECh5aADEAtritAJQnCxZvqyQ4nxkBWwGGCfwD2e0PBqoGSga5AB3LValaCbthE4kLLT8OuwG7ASICR1ooKCggHh8hLBImBiEMjQBUAm5XkEmVAW4fD3FHAdN1D85RIBmpsE3qBxEFTF8A9/cHAHoGJGwKKwulODAtx69WDQsAX7wLAGNAlQh6AOpN7yIbvwAxALa4rQCUJy07Ds4CkBh7ULtYyHRyjsOlmw/ZFUkb7AEpEFwSBh/lAccJOhCTBQ8rDDYLABEAs+AiAQIApADhAJiCCrJrOS8AFABbG8YubHYqDcEQAjskHNPhHB4LG30CewTBCqrxbAAnLQ6mLs6hHAe7CQAQOg+7GkcczaF3HgE9Kl8cLs4RGQB9q9ocAuugCAHCAULz5B9lAb4Jtwz6CDwKPgAFwAs9AksNuwi8DTwKvAk8DrsFmAEbawouzqEqD4sa4QHDAREWOwCgCzsLuxC7BBiqe9wAO2sMPAACpgm8BRvQ9QUBvgH6bsoGewG7D00RErwBAQDqAQAAdBVbBhbLFPxvF7sYOxjbL7ZtvgNIqLsAB7sALrsC6w5WAAq7BAAeuwJVICp/FTwVuwG+J+QAsloBvSjgo7vIAAFbAAG7AAJbAALjAAg7AA67AgAbu6VbDr/EAPQAaPuoOwMBu5UnSwDn3Rm7CBp7CKEFCv9wAN+7p7sau6OLeXIG+6mbgwASuwYbCwG8AACGAG27BgALu6c7ARo7ugihnMoBuwvtB8CpOwDhewG/AADlABW7AAb7AAm7AGmLABq7GLuOaRX7AA5rAC5LHgAGuwAXuwghAA1KAcIAt68mAcAAALQADpsAHBsBv/7hCqEABcYLFRXbAAebAEK7AQIAabsAC3sAHbsACLsJoQAFygBunxnVAJEIIQAFygABOwAH2wAdmwghAAaaAAl7ABsrAG0bAOa7gAAIWwAUuwkhAAbKAOOLAAk7C6EOxPtfAAc7AG6cQEgARwADOwAJrQM3AAcbABl7Abv/Aab7AAobAAo7AAn7p+sGuwAJGwADCwAQOwAIPAAUOwARawAPiwAN6wANuwAZCwYWGwAVOwBumxm7ALobLgATOwMAaSsKAOFLAAI7AARSABd7BRsABtAAGLsAC/sAX7sAa/sA5IsBuwAXdgG8AAFyC6EABUoAbXYAB/sA5XsAHGseAXsoUgA5RQD+Bw0McgAoKnABpAUIXgG8XiMMCQdvS2xfKokfPBRiLTYDoQq0AdgAFgLRA24BdnJHUhQhA08CFT4BLAYDc0a8e1J6QAApADEB+wBTCtsAe5AsASsAduUNETJGAUoAVwUAAVABB4rMAHg7BCClAFoA1hUAlWg3H4sAzWuxAM/UFgjCdXMbGFYdCdEBiJCrIlNTTUgSPMKJ+QB/HDdAKSvgEZdPAHIBKSwwKUIZDwMwVQT3xe4AS2XcAGoCcQI/EXo6x3guNdUGBQAQGx0KCAwqBB8dKU5TTgi5ugAKEs0AJgABGgCGAIkAjjUA7gC0AOAAnTwAuwCrAKYAoQDyAJ8A0wCcAOsBDAEHAMAAeQBaAMsAzQEHANcA6wCIAKIBNQDjANgA1QMBByoz1NTU1LbA3M3QzkMyFwFNAVcvRwFVAWQBYwFWAUdLQ0VoDQFOFQcIAzI2DAcAIg0kJiksODo6PT09Pj8OQB5RUVFRU1NSUylUVVdWVhxdYWFgYmEjZmhwb3JycnJycnR0dHR0dHR0dHR0dnZ3dnVbAEDsAEUAlgB0AC4AYvIAigBTAFMAMwJz6QCH//LyAGAAj+wAmwBLAF4AYPn5qgCBAIEAZQBSAK0AHgCyAH8CPAI/APgA4wD6APoA5AD7AOUA5QDkAOIAKQJ3AU0BPAE6AVABOgE6AToBNQE0ATQBNAEYAVQPACsIAABNFwoWAxUWDgCKAJIAogBLAGQYAi0AcABpAJEDEgMkKgMeQT5HKQCLAksAwwJTAqAAugKSApICkgKSApICkgKHApICkgKSApICkgKSApECkQKUApwCkwKSApICkAKQApACkAKOApECcQHQApMCmwKSApICkRZ5CwD6BQOnAl0CNhcBUBA1At4RCisTAUo3E02RAXekPAFlWQD/Az1HAQAAkykeGI9qAClgAGkALgCJA5TMi/CuhFoFuisOwhEBndV0KgsEIzFsATNabAGyAN5+gH9+gH6BgoJ+g4aEfoWIhoCHgoiCiX6Kfot+jIqNfo5+j4KQfpF+kn6TfpSDlYiWgpd+2gLabOEC2GwAgmwkbKAAg2xsBEkERgRIBEsESQRPBEwERwRNBE8ETgRKBEwETwCWZmwAowOIbAC0ZgEFbADJUWxsAM9sAgxsAPZabAD2ARkA9gD0APQA9QD0A31ebNSEI2XAAPYA9AD0APUA9BxsbACJWmwA9gCJARkA9gCJAL4A6AAIAPYAiQN9XmzUhCNlwBxsAPdabAEZAPYA9gD0APQA9QD0APcA9AD0APUA9AN9XmzUhCNlwBxsbACJWmwBGQD2AIkA9gCJAu0A9gCJAL4CNwD3AIkDfV5s1IQjZcAcbAJDATZsAkoBOWwCS8FsbAJXbGwDnwLtA58DnwOgA6ADoAOg1IQjZcAGA31ebBxsbACJWmwBGQOfAIkDnwCJAu0DnwCJAL4CNwOfAInUhCNlwAYDfV5sHGwEPmwAiQQ/AIkGjTFtIDFs1m4DKGwDrAJsbABVWv4VMgJsbACJAmwAVAEAul5sAmxebGwAiV5sAmxebD3YAEls1gJsbEbCxxP/x5BApA0KYFA89AsjTx97EHmJQPyocItC2JnNFRCEnFU6SFTDoI0PxeRNRoNRWkpzVnWW8pTagkNmgf+jGupqZ3eu50LAFnc+OzfJwdub1AdpOy76VnijWNR/CMEevikQkFyQuLuPajxWi9chqOoMJ7qpCN4sx3LJG4Myu8kD68wC6+iAwt+pU1JEeY13rpCVkXSZfinVKn4xZpxsI3Lp8bJLrJ9ujkrIalMRBAcv/GSKEtowzcEn5XmJw2BagB8V2UWJoJHZ14SXhM7p0XeGFOuw6mlvyq99WYp5XxrO6ru9nn4RHcOkJ7hx5UqWtman7yVMLzYXQefQRUdIY70RYQE8+aAzCNSGQkXiHfnHYRMi+xczKDdZLk3AV1gzxkkSHLjBwuq8shIJ+/RAbqjqQbugFhe0rqklu432EERkM5k9y1DXzds46oLqKAx6OhPT2WiqEfhaITn7OF9Y694AmKmUvbpWp0xJqDaf3jeNJXnK6NpnGcFOmbclbARC+5+5U52ufw5b0Hh+2LrrNimvZe4eYmApRsZnJE310SqB+1xB6rSJfnV1f2D0awB18Oc0sXAFqIlgHgWiaZGdvP5CJUSsCTCQUC335+iSkwPlLJJ5lwjTSn9Lw22NbK1Tu8w+bUpHtDRDPho7Gun8aw2Jzu9i+N0Ot/kPMbLAb/rUQ82kfpk85qLDkfxLl39QPDngo72GYh/Xigbpcm1pA23D2ywt3D8GgMOao040wDqkHxOEx0OhC+ZmHiIdjK7yRbfJD2ouZbAedhD3p7s8WDmCJfNforgDYPGAXSI08fTjPZ5B37lc5VXGzc1vJmibDwBNVzXuaUzg7N5H4BxqjhJ+kz9HLUJys7bpBDYAPvbut13AwJCWd059tS8YTYgC8HwrkewBfa1LSSpmMr9uR2EekTiAMH+Mx4AGzgbquccwBDlLmRhgXL/YiLPCEb6d2k5qJ6o800qddABkpqt7NG+sc2uvHZwZs57W1AHTFM1KkMShasADAh2FvzbzJOzVDMS3ZlT2BSFKdnkZFB6JyqJbhm6XANis9TrtzJdlPVp+rl8v3nIke6Jou7m2TKu53Vounupgkz2LzrQPhhatLIG7rfF/gUKWp15X3LKt+ZvuCDSqPUigF9yJntimC1HJR7Yj/dUrLAXWrT+1tnwPJJLGKAlQ5VeNDWRKCTt2vz3rJuo4+gIt75/Mkfl/gSZblZ9r/SEeeosZXneli/xNh1WVCvkRt2RnyyjtMkMqhzXh1PVOCbILqv0r7rGYm0CHIyKdhHL90cl9E1I6eEtQTCt6RXj8M0HHrHCHLVRpNM6WIbT5BCMGVnL0o5895qSRbCJz+5I8PGMhAN/Xrj4BgIdlKqlHtBHqTJwmK169toZ2IWxNzrAbIG7zh85Q/LG2A4yBcaBel52zdunokB0lv3A7kXnTI7M6ZnfZ7nwuj5lkGhqSpW+w5CI/FmRlplBEbnZy1ZxS3DL8rf1YWhO5XivWZBSRh1gFsjjyj3qRG1cm/6ors7WsEif6WRxns1MKDZa6KrbfMQ/swIb+2nb0tqxHeii6FcgVeAjE/Xwac1owx04dJKG8R5YQgHNnEfHf0qb8WOnU0eQSjazq+IK7cSuCqYzPEUB/x+QgGZqM3dBoYvNvZVOHDkbgdilWdagqO5bkybXfLpyMPuGq8mvAAEZGbR6RwXGlW9ErOWTfnjfx6dXFJqBj0OBSGFz4lWQasNOmVJeN4SFWSLfOGB/7ehV5YuoNNROHZEG9ElVuMnqbDMMuDleOt/cN/gsWxGw128mwU8/HxkOKqdTZnI7dHka67WCTf/FmBrxpNCaKJ1GxBTCSS7MNfhNj8S4Gtotg6Z3AM9cAeVROnppUMaiV5jjudLnNqoVrKO1/FijLlAc74kxydxKX1RQuMqHR63eecYr5o6MJ+B78VsLlCrpelWh6GOrCOBIoQmIcdpJL1pwE2zzZqBkecGTdK8KMOB6r1eNRURyrz6M899TZaoS/vNOxHf+5gORU+OyYIcIW6diP25GHF6u8TNjuL/GJzCnLLXd01KrsjRa51v4+O/VIAWXESJxfxWjv628J+cWUQpoD+Yytzs3jSMRJ23/XT+vUdtUMLDQq1vnIoeg/GjWh88MT6k9dRqDaQ+vodilFgvjuNw5pJpId9mfwyYeLCGb3BmHXdfQfhfPRQaupe/f8TG4Bk3eDKlYBaEK3kZYNN2Sdxz47m/vYBxvIOKtnqplB1pebzuXmAr/MuzQCknKe653dzaWQQ7MUhWYWvzIZwLe1v0rXxImLaz+AkAu+sYikhouNF3EW6w4crZ6MuUiDbIAx8XhAfegcvW6x9BPb3/sCxGWu9YyatqExB+TSm69qIkI9IwhjrcnzME+jWBx4mNQm5WwLzUjSyY4FZ0aMF5YFlXUD4hL4XfOeYv5rDe2s2D/Cn+28fZ9UCnOQvXFMnQqfc0G+ZqOWWD9l/liqUPaNQzZjxCHpUAD8Rcc90MniQ02ugHWsUupFUvhC9usY7zNPt5F2jO7qgzhafsQSd50jgLrC6Qx6bpHbXR3WNAu1BzGmwbz+ebGmwTjdy006Y6zipP7n/OJlvSmbq+SY+nefAVKK6EBMPbce5n3IdRI8+vbxCpN53rw3TvgNds1SuMiuLGxt89L71mxPDeanGhyHvOjmO56tnVpoHalQnL6TqNuqKsHjHCIKB4pCgj4WyYPvRvYvqi5EMr7lN3MotPR/KH7JUD1lZbU0QzfbrEBJnuQiVAyAC9vwXWp2TRU1/0aapyAH2cbglEHVAdl+1rb1u147uV0td1eNoQZsqHrIMIYVPXtLk2TIU3cJE08PjoYNDpfF/IcJnYQHl6nsplczX3Rgah4NbJJHl//5scUufqsSd//kbIS406ZWoMP//+jhGUswX/5nVNz/jAj9KmXPtAmMiK+khhbn1w/mELzZMT/WxcW//y/jsHaOM/61oAW/CjYhJtY622/TtMYuP7bilBvbiT3vB9n8IcFPnwM78H0KfhYDRdY5PhWJ4jWRQzB+HT5NVZV56LG82hcQms+jOTT/c9Y9sx5rPi1/wB7f/+c5UfUCKk3iwwCuywUc2MGnAwsXf1E5hoI55x1Q/Qby+sWH8NRjavZ8VaDsdi1NUVhH86BJHX1yaFt1w1OYeL5LVmdN+5Q+KuTvXEPDzUCg6xp0HhsUhTWSe7MZMM/6rsTUb0/nbUE3YQlGGt48kT1/6cnf6yHnvHtQx9EosOXN077yyEq/jE3YTiG/5SEJmXFeocJJ1EAd6vKeK6VEdJLOZ1km/EwOnZWCQpzCLKPHxrfh4yJhGq//2dos2E/3+MOcdW5EsgIdmTQUQetzRy5fQHhDBl37XbWzsqO/cASEDjyst1/8NEROqVAxWnddQV+umJ8IrKVgKvGaTc0GsQ4s8h0Osql5QKwlddPDjJhKInyWqYUKmmlIts+FIcXZ6yM6cljbsjUG2ksSOkuIw4sYHffRNgBOLApvD6XrR6Rt0rV2Uf8IpnIUVnb9Twt91QjAaD/dStSWDxg7aYY+VXIgnuowYdOkjywa2hlgrnI6PjaU3e3UjQ5Yk5mdIJGyHnv3/P+1EkMav1yFyF+FeJE/RXnWBw+Nh0aOo6TGlKX7d+dkP9+brvr79SdtXJtcD/aXBGiMNfG6/NQniQHYQlK78FEHDqOh+bDI0o+2Ub0h53EL/vlzjrBczVEZz2bOtvIL+DIzDkk9nCWt7tlqsq3l9JMtJk3r5HG2iJ9b/X11TG6wwMAjHLQ2oasaMEsydh88QPvI+hmqIHhvalpKoKOueJR0eZ9J8G2alNOIOy98jwvbc87Ewk9d+5G/tUijTmlbjFlDKXV05HalKxaRTrucc73On7yzAPS6f2v4ogiaWyWeV73dv/MsQT5HjRrsYV9dLAcI3T+zC2qEVINyNpEhoKV+xVSuWtT4AhBfpnZ7unIM+HX3msI0HiI+P+z2PFgkjGi5PqEbG/wNIWeRUjPtDEgbbubN+I4JaDLrW9borRBDob7ZFx+JdKeFVUKVeWqb/c88Ol7DhM0suLtuEd8tkDSMTD3DFx8UphPINHMHi51hAPttXL4Ektt/lKEUG/R4qZKohHjVpAcPIMiHyWr6xR8/EWnNJvBFET76yCdk5er7ADB/1bgoImhpSiZ/omZjPKPCEeZsOwvPmXL+1vlJNeGO3TzySmGA1X6e58gLrazDM71jywM1XL8zKHN6G3kB31Y8vLtP982N975SZXk2JwDvmv7AY/aDsFFk1v+nE7/hbvuOWhBH4kuemeYozPk2K22Vx/YGiDTLU7YilpOt29u3RZMBh4UJjlTP5ItxTzWv6ebL9b+GSU1Vsm2S8LMfVfJczaBSqE8J1A4YUjpsALL7++bwCPXFhaufdpDFtBlHb9makeYbqdg9ltvK/HwF/rNE6KrtWUkEcxmTB7Iyu5TiVaIgW/YxzQhpArliIMkOoK5L7ShVtF+DYqV01mk7fwop04hQRwg4KFmr5z9nYf05VVqkSe7gfnx5bxxlQ0qEV0jiwzf064qG11iEqjHcUgDWWsDs/LEGlzX31T5KVL+7D4EoKim7HBagiqRo5JI3WfDBgpKIruWz9j/J6Hp5Q/EJbMWB8NeSMuFarNw3AEYPBJtYQO/4oD/ZgPTSQ06di0EeumX5EbrdThO+fvYEVSxLtZ3AJkee0Xn0sDwNtiiZhJjJRDuG1YRKB1vOulfd9JjHeyu+UHTmrtra/pm+8Rixh4WKiLaLOCxIbZNoWRZSyyUGLPjAaAo+SQBpfO2uruWrzFxLlpvrXJNMCWtlJDKGAnlWK5xpU2tcxXbeD+sbdfwYXt/qTwDk6UqXR/aUt099DhSNl4Nk8mXwpw+b0nvjKOG6Mg1PRXjrMUMANvNgEArv8nMJs3vj1aHi8MHz/UfJWWzkcrSpZTNBhduXlGR7i+ip/THDp5R9KRNcDKECgtwgXg4EFN5HHfikP/XvsoCkHTg+NbsD8Gl6eknk4Arwn/BWGJ0hgW0/gUKrzuGZhub7igRP3abetpIm+24xEOlWl3YKpm2qTBFvX8ddDRvm1LcwnCJuEfZx12qPY9TrntMIQsv316zvpyWnyStX8VU4j6tQk+CWlLBUCJR6MdH9Cp7g2qdn2WM9qFbREmejH09dlWEPm8hPF0L7RxwRRdiCs0DP8ewk6ApoELkKU9hckSdbnXm8UHJmaNXjxv/q0fTTpu8rnl9lN0vQCpDRbCtcz12rGRFEA7Cfg7FhZn5QFkNmv1ZURKEsiZce1nS9K7HrwpC7yJV4Xt3eAVbLJfoXHrtwG60Z8gwaSnmxoL3s2ZlRqggZN/MHo1oUS4L+GwObFI596Ld4Mvi8l+cQmF1gJpkpnDio7TuO35npaMHiWzFqPSX3qNgkIPGuX0qGYnPIVsM901Yu8oZnOZOY1TbtIdFUNKNq2dP8SJ4F/VCEzIjF0/Rh+7UrZj80tC6rognVH3mqa8eCs/lcQU1Pjj98kBmAKDbZUTwosv02UunRR3n0X6c+f73mtwB7/WbQ16gO431EtwZbNG1SM4TZPBnsQSESlsfG2JLQXx5xWf4bmQ/xcVCPISAX5897JxHKLD/Xkgu57+ABR2+MMtEbX64+MNlBHpKC7sjlWVEShf5qA+dGc59LFVlZrX/Enq9z/v+wnZ1HErmxmjJjxOA+hAjVUWgtq6ygAi/8ewJDjUMFw3zhQFtbyTLDPFd21Ji5S5QPZo9nMSxdg1+DGFSN0wlWt7XeYPbHqLfliV0J1kOhQNp0VbUPy0MS2Ms66OxtSWvaULaWHnfAA+sieVVgtjDwN3nKonWapkSKRN8BKKJQpCfqo8RQI5udhfu5s5+7vwsppmAJDgz2GNA7d43VdbV2l/SrvEu4RYslmNJmfSOVbssxAhSYy6WxpIQdDB0FVBpZ6IM8yr81QN+XLZ3n/wed/R+s6LslkxKbzzst/GkRbe6rFmtvJCwr1T44ETM+IMgOnjUO0eG6a1n2w7lwM1oFBvzMUWRkNFOvKcx3oSb5XdenZ5dXsute6nkRypBiSdAtA2fxAd8UdLOZW/MB7fZoEuFheQXijdaF8kuaRZoSeWdKOkKsGYEGaXfaDKTu0WMTcLniQs7KRCz9iK3SP+Y2xIjkfVGqFLSQ6vh+A1u6FdfwXsv1VPMfi2cxmdM+/xTgMXEyo2ZGcQ2YmPsghnYdv2+z48JpGZA4tUK1p1q2VdVxyfypXEXcrxKKtmt8UdW7sHWmKMqDuBBM3J/JUQx8eUYN4pJ5oRqvdiPHU1o/WPjiKvnlCqOdyxlxF54L9PrtLD1NejZ9aZDivVr6ZfMFK1/psVygoPIAnphcJWWb9+5IKMKmgRQULsTPZi6Bw4wP32zVEoKcHpP73CkFAqS98nSaGoWDjDJiaACJn4p5o1jq9R4Q4VcibhXF//LHP0bdf63kRVZdRbbhGe7sDQcyWS5tpkfeYHnff25WK+4FpzLlAcbaKmHdIBqOw3fImx1uqQIADH0TyHzFlqTG6nMoY81svP0T6BIyELMS8tMe+E1p6TFP6sVpZa6VNaTumufD5aj9goRa9SAmdJT4HhI2r0egj8UrgFb8L59wGLnYlzkLAiUd3m/WWIIEU61kPoEjd3gIVy/fiBcgqQqHnoXpL0SqLGdGGgn7DQeVMSYWHfjno1FngIKP9cjYaTlcRP6bZunjHP13/lbVm4awti894pTf/ZNNqr4OR+tDVie/m+rC8QpVnRbsCMPukOH87B2jM4AG6pHuXl1x9SiKdhYJVOhfo/+SCaGjUW2CoogL1FFhFGN9o+acoVLl0SXs/3vrSccmZeAF3NewFuOg/P12QYKQF+SH+KYcNnsAhIAELPBUgre/KRUJEA+KPD0MHRjv+3J/j2Z23MuJmkfy7leWcMsti8wXLSHgXFJTaksx1Woi6oljwxFVIJG12SBSZLNJDbXMYPekmiXT4FclKI35BFgqnYpKfcsr+f8HUXQoHJ9UYZ4J5YMiHHyAxg6eidhodgqJ2Htf/xYEx+G0zXchuzlt8hcAl+AT8NCQ4orFc4DerabF1enA7NTLnvtZh3FUwqIOvY7Q4DYmoDHwXTSw5UNNh6r7j0B/ezMYJMDcw4+6gCTZX4YQ+7Xs8de72vsR3cmfpxIX64/6KR1p3VX4F6vfHEzxzarh8aDH4G1DFoBBM6npXFpK+Rh+WrcFclAeAxi0PoaR9CpOxxGLSdvxKVSw8oOOanG/soKImRopN38AdcUhhM2GT/PgQeSQrG12njuJJD5Z7vWfAZmFybYLdSA91kB4aoBhoj1Z//KNIVVujqaLLRwCkbyn4vh0739C9V9iSjybeOIeSOvNs7LW1a7EUtNoKAnOGML4U8KBXpfrw73WjAszJG4Qscq+Xr3kZWR4Omm0xT6qE9y6FNSpstV4onMZSqCEJ+3VX9qjvdx5QVrM0WXxmPZxejdfnihcFAjzv5PjlTl6ickDbHe6+Lch52pjOPqk+m3RZ+bh2JSMGtFBuODbMchrpRVlt16NTQ05Ps0IDtWlUmWfP2vX8M4YDynIuOZ4Ck91+591B98Gw9fw+yQogTR8CSg0zaJu+rlBo/mr3A+1NziF+kdubz+whc857AZt6DwIBIF5+5yiaaf3ByQp1Fm3sOkZDAzwsYSQTM/Kv6idkugF63FDobDdUY3huruU+sCaBuRR+HmOowvmZoBjZHNh77SXFtmY/oOUE7ifN7nBHAo83S/xvcS6H4Ci2u/9Id62Wv6Ui+zMNLAzhfkTkVcW2BwrnYvpur0ZDlzs+ZLsmGTWvd1892t78gx1YjEJusGcxphjLkV0UfAKlekfSBVWHE2ahk4AbbRmHyL7GYdtKfdlINwrcdJuf3Cee1nfUojDQn/YmItESOFhtLzrkEv4k2XpMU9oaJQ3VUC+1INh6BE68pkHameGJm4Gvdb24Q0fXWxd9Tp3A9mzFSe4qXDGGDIV4AAGV1jIDfveknH1TwWpUT6HiQxKP3AAHJNkJeRlj/mXBmS4S1j8FK6YmpK7jyyAiRbsMCCLoJcx01fvgpMvKQRxu9IOwymconQjD56g7ksOrcOeoTbius4JnGesAS1DtgdaophYsw1wGIsMS3P7K6doE3K5czznqPQLSRRF/Ylzb5NtSKsL33SgskFNCF4khn5LWaDxI23ZRi2hzqN8uW8UzZEBYy68+VtGLSymQrXGUlr2nO2BbBIT5Vh1RmGAyDXaW0FPrpx3wv2UYdFk9tSl+906bMxCuXQaKDQP/U19UEcVGK4gmksL8lAorxQSAOwpeYX9xrZsh6yoGaL/X5O3tgQC8OM+/GvxnW9XvAtu/JxAigydfSmZfqZfg1XOcHNOpLlN8j64OZ36l5qawDBJ62YaTvxeNmm5gowCdBosgcpHOgNgwA+sknN8XmsR2IYChcafl9bGNMZ/nB5guWuvEziv6QI2bP2DtyKWG/qUjZMaxy+wASkkVGtuwGtywkTYG6MYrZBo18vYcww48G/+f+eITA/qMwbLlJC0S3+/ai2pPvkOhRRVmGTuSupaxhIk0xoXLtixCxSAn4Z3OnUS3wBqVscLI4P3GP7i/6gxYsswsVmkvDXFLhO/OKcur8flegCSKiqmVpIRvCzgbjEA0mXPn+RExXY/2OE1f/BYuWpRQY8gCDpMOYBx9Gn4tL3hihSIR1ixh2PIIT7cr2gUJbfs76EKYG52Jk0UZF/PQkBxGuFCEWXnG6ue/hTIqjTRq1sotVrKrwIGHDrITyuanUzbIYdgdEeV88K1VD82TYB2B61Ft+tB1KqHPmT9+hWoaV+iF3SuvtJqvnoLaA8wxrD56AUMULEgzO9SvBcBAfqz/dzMYzwMt/YLszDbmGe1bcHHfFMcvGql9bf/tp+Hrj4q18aNnftGjmXTfws39emn7/5IBxog9MrmftAA5Oq4awenm8HimWO72dwVlHcHmutVMdrMHw+p2vzpzT+B0iIZ+IEpplwWhClcXlxhxAsF3CHRnnaUEqq3ByQ+cqhe5SvR4SFxh/LZoQwtj8QZQGT1BzY2EMpYnUcZWQEPlwFZw+7UryK9qV8KgruYsvyMoK16KI2sN4SOblrVwhyiL8+IBZ8cpUhsJQSU7TFHAi+L2F0sn0y+FtDODlnuif2Mba8QddPZYYxjTsIgkMe3M6+7kXxUfZvbCUlyq71J1eNczGk6Vqw6rSx2K3vM+DjLxDRGzWepTO2qTT/W8S7u0QXcyFUahcB4vq8xCYTpy8iswtnyz7Kx6lgTEQJ9RqkgEIN6DOUqB0uRdeYuDa7AP7Zy9z+ZlTsmVR5vtV71m3dmdtNeWghbr5PnPJtjXAzcvZjxyV96VEx/B1TA0IEQSI50ywGuIbmAYdQg/l/rxhQLX+6uOLyFsaUt6mtjpAJkLfehnB6MlOHnNOrWLvCBqVBS07jcM+4RzLEed3f3/0Xwp92U+nataNHyEgnnuYR6PXEjRLETz0xrt3UglfK7Bn4aNlXG7cZco4lMziLv5+Mh2JCww3mz69Z9ZMRR/xv5EKJ38IFxKd9dw5CgPIXja/gzAshMbF14/qBIgNkdUQeP8YE7SrICGtiTnAKTyA9cXa3OauDHxZOdTP7yuYBzD1UcHstIO16FxF1bRUAlSkszI83YufTchU8OPnnozDl9bS0y6CnnjGwgj9M61cXcZsljjhLeT/Vq+30ScN2PcT/dOoxUDqDS38+OpCCzLDdnwHQc3ECQVIkaxmdPaZTSdfp2jjGzSdNLM5yPQsgJDl+ZnhclDQi8ltUnkqWJ323IvTZPN8rn0+EshL1cx9PiaLTzUsryn9Zp2Nt/detUAh4N/2I3dlMQqjHFxSihv0uykzflq5clMy2ZBaxoEb0/QMp03IQQus3vnZd/NOmSsmgqXqKFP3ozyDgY7RQS+npabe/hNG+5sa5FtvL8v0uYuag2NewYkcol3TOTadpuncCnDgOGpmLnTQ1PEPUN2cNsrW8LYfIv+hzfb7vod+ipXHzmbgj5Fzc6RcT/5PD7VQ8nTJBNj1urkVUx9uJvTWmqY08OC80rGDLaWXv243VB16gjt4Xtwp5H2UDR0LiKW24Ed/sOO8jl1yEU/XAb3h7ScKnCFy/V3sICrkY1D0K9fSokHIL0s5/7DLShLAPXRbV7fbv4qj6OwHC9d5PlEOX3LRpQ3P7hcSAKlIKPDM83ypz56U5+rJeo0cyUtC7wltL8wqEiNSgZsDWzACc7RFoZqhlD0+sihIBQlkQTXmvUyIOZhkQX2zqME5VRC7ms1sa3CY+odMn3mMBiTvCMKnnCxg5ZPLq4GUDB4jF8Br2K4x4sxfWjGXQatJ25I1JyrIv2Z4bP1jKw5C+B2/s0v4dGUOsaS6IPIQV3ETQ+F2fSl2BPBXHzyYN8VmwWIrKeMX9pyGWuAOVXwkxJsRBaBVzLhZDP8ONGncknL5DpTxHN32GgFWMwsc0GmL0oRDmRT8u2lvjAKUIi0MmXhIHSlFeh3Qh5pP6ap4YUd6b569ZIaHgya2AyD12cPxY0In/PBjzDctTaKJCU+xc6m9RkNLDEE8guvxtJP8sl8N9bLqw0F/qejaBlcHYqw31zYpsutQp07hsP1vhGdl4hJ1wA7OCsAHnKj9879uSHILEmuZ6vI1lT4tvnWCVKZhhYrWHW9oPKPKpbOC6FTjf/OtUvwmiXr2ykvyLzHGQeyS7BenZpL3N/CaF5T7Gkml7JXN5cj0PKaDpZVImD61FuMgFHPqSHvt4Ej4KBdAfdcoO3AjQPLwwtKsgGM+ty4lNZMBEItJSRLunG5ckrM/BeoXWoPZVvEoIzLgFQYPupMwZCXis4W2SCJ2zsefZqCj+aTfSq1FYdUj2UeJALvVTf7vuuikOE1Hit3UIAGUi/sqgMum9vw218y1FlY/9XnOji9nqhGAcMYICc7BiqLZj5N+cKEuSAuiyWbMg81ZD1lHovy/we2eaCcCv4MzEW3O0mVA/t2xdA0cxTVbXmFhn+tARDpvDz5ftLr15OAAmvo2QiAky+feVO4bGibv2nlBmBzqx0lEDfEm4UnEs11pbnwZlJ/0Y73/wBPYfTNZiJKR73TzdCW1BffiJq9bLjQmaKnU0+gN8sfe25IKSUCooQwxePDrFn3a/zUgWxvPoTYVXfobY/GV2qqTkeVDV9D8657fhY0/wiaJ5NfLxhXbE/naxs34N0hd6vxNfdm1TCnozm/NKSCThchoYgMF7Z2tzXFovRfsNVkf86JjrM60r7UIuV3bsmfrMOqzjXjN6HPBG25zCJ3QLueySbj9oFvX/HxWBqh31PBPxduCVAxMqC9HK+YL3oBZqBruoh6LKvdMqoz0PYXUBrwbiioyE8Tj5ImjJmiOOWLbAZvIZ/l9rIPljx3T5glJ2ewlfuIT5GlodQsAf/IEtmYkML5SRQGxxwW+rlZkD8belJNu09Itwx9xDULTnemVDeojdbgcd2gKGM9aO00Jivtbs7ZyOSE8IPh98GfvatD8Ud5uHcZfAfMiPSlIxd4UqeSDzuNfbKDuFepkyC/s3j9fawmhY1b9NqDi0ZS5eP35l7rL2eK5QlWLlyCmxx8AFaFiTuD2pMUxZV5mBSJuJduOaq2ZrWpu28DE8jl/hisBz7bGWH6qLF0ayWNq1Sejtcs8KQrQqJk5P9QHDYHOIolgNsMDmEaWcTelghbfFCDqWrq6YLwDWy+m68ec5nShgq2fduUBpQUuKKKgnttaUX9PRfMmxqJyU7e0RLr1bev+ge1KK0bZyhHKKDE8gQX9Vf7rNHWOxBtZcxwwGusyMpH77qWZxXsQmbgIGhtiO+gSSRCyu/ek+OFsz1HMiQH0IHV7PjJi3dszYfFp8ue9h4+AfKte4MTiehPvxNcm/T1t9vsFZx8rHN5ie77r2jzZOq/Em4Q+H9sNcZakf9HnzCc1fJixppxP8FQABmVnqa6GbJhwaka7WH7Wdoz1WxOjSNV8N9sgW5S3Ppgkut+TTCkjA+AodUOk1KIR+8G8S3WrSZG4nyqfJ6FEjXl6a/LEoRMHZUqfPRWvwqrtXYy9IUsmUGzkqi76ib4NANCe5DnyOxnFRZ9d8FdBVBjra3iNuZhJuWW5Omi/hBigqDsg0mu2AhfJDXdwyMIJ33HHHPfS2JtjegRejX11m41TbNL+Qp7mR0g9CPKTj9PIjuSycGN/YPozXI4zarXuAeLv5CHKtKcJKRbd6R2oLNiEt0T8+QIVJH7zt9ncKMgd49vV2P1AyScZ9Qzbu3m3LBnuu6dw7aE0b6r4kzVkI/GUS88mA53L/rLtntkFlZXGtIoqNP2mD3eVv08AVVPT3wJn81zpbJV9SuqZ6Pd1ge0Zz2RFHeCdV5CLPftH9V5o9+VzFu4R0QeumqDwUhXn3IyYotdJnxr1l3BqWnQVAeDBEOtPyJQx1q5+mODiClXtYeBLTWtsJ42AMBcf/IFIhpfhYO08hsg0Ik+DpQFNOKReK3o3cudkxWX0soPtI5eSFOA6yNylS+IQjrQtYQ/5s4UcixJfokumBUjpH9ofSjUTwPCapGFndfqqG5IHeMMvfg+88SXm7bNyjk6pGKzL+WxDAdqKtQ72WWVbOk3I+ueGuammmB2pvFZvqIcU/lvW3n9+r2lycnQLE4OX9R1jIgW4cDjJ3v8dAa66mVcfC7ptCr5io6mCaA9qI9T9FFWqo1ZAaMxgxAu8aXqmaOYryMND2sTUfoHvxcYK7hEiJhCLYFDx3PBhE97c2a0ub1/ePJcyJOqr7UaTAPTJ+xvZtjb/40sloY1ltRnTkWILmIP2b7S3AdXCR+YiArMUHwdncpjpyDGfzqGOUoAuaamWzAMacQtb34/M32FEgR5lUEf8fRzFrZUhzQj0fR7/6gdzdnVVvcSneLmtqJ930VCCDORY8CVdQWdo/S3PNkX3pQsPVKWIYGAMrFZoq8bQ/OJBDSXP7KSBdL3QN0Zqd393p6VFc7DnlnFiN00SY5Nux7yadeIM0Upl2rVsu8/VAI
1708";const aR=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),cR=4;function RZ(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,s=[0,1];for(let B=1;B<r;B++)s.push(i+=n());let a=n(),l=e;e+=a;let u=0,d=0;function h(){return u==0&&(d=d<<8|t[e++],u=8),d>>--u&1}const m=31,g=2**m,w=g>>>1,A=w>>1,v=g-1;let x=0;for(let B=0;B<m;B++)x=x<<1|h();let T=[],O=0,k=g;for(;;){let B=Math.floor(((x-O+1)*i-1)/k),U=0,I=r;for(;I-U>1;){let F=U+I>>>1;B<s[F]?I=F:U=F}if(U==0)break;T.push(U);let R=O+Math.floor(k*s[U]/i),M=O+Math.floor(k*s[U+1]/i)-1;for(;((R^M)&w)==0;)x=x<<1&v|h(),R=R<<1&v,M=M<<1&v|1;for(;R&~M&A;)x=x&w|x<<1&v>>>1|h(),R=R<<1^w,M=(M^w)<<1|w|1;O=R,k=1+M-R}let P=r-4;return T.map(B=>{switch(B-P){case 3:return P+65792+(t[l++]<<16|t[l++]<<8|t[l++]);case 2:return P+256+(t[l++]<<8|t[l++]);case 1:return P+t[l++];default:return B-1}})}function kZ(t){let e=0;return()=>t[e++]}function SP(t){return kZ(RZ(NZ(t)))}function NZ(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>
1708e[i.charCodeAt(0)]=s);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,s=0,a=0,l=0;i<n;i++)l=l<<6|e[t.charCodeAt(i)],a+=6,a>=8&&(r[s++]=l>>(a-=8));return r}function OZ(t){return t&1?~t>>1:t>>1}function BZ(t,e){let n=Array(t);for(let r=0,i=0;r<t;r++)n[r]=i+=OZ(e());return n}function Lg(t,e=0){let n=[];for(;;){let r=t(),i=t();if(!i)break;e+=r;for(let s=0;s<i;s++)n.push(e+s);e+=i+1}return n}function IP(t){return Ug(()=>{let e=Lg(t);if(e.length)return e})}function RP(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(PZ(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(DZ(n,t))}return e.flat()}function Ug(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function kP(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)BZ(t,n).forEach((s,a)=>r[a].push(s));return r}function PZ(t,e){let n=1+e(),r=e(),i=Ug(e);return kP(i.length,1+t,e).flatMap((a,l)=>{let[u,...d]=a;return Array(i[l]).fill().map((h,m)=>{let g=m*r;return[u+m*n,d.map(w=>w+g)]})})}function DZ(t,e){let n=1+e();return kP(n,1+t,e).map(i=>[i[0],i.slice(1)])}function MZ(t){let e=[],n=Lg(t);return i(r([]),[]),e;function r(s){let a=t(),l=Ug(()=>{let u=Lg(t).map(d=>n[d]);if(u.length)return r(u)});return{S:a,B:l,Q:s}}function i({S:s,B:a},l,u){if(!(s&4&&u===l[l.length-1])){s&2&&(u=l[l.length-1]),s&1&&e.push(l);for(let d of a)for(let h of d.Q)i(d,[...l,h],u)}}}function jZ(t){return t.toString(16).toUpperCase().padStart(2,"0")}function NP(t){return`{${jZ(t)}}`}function LZ(t){let e=[];for(let n=0,r=t.length;n<r;){let i=t.codePointAt(n);n+=i<65536?1:2,e.push(i)}return e}function Gp(t){let n=t.length;if(n<4096)return String.fromCodePoint(...t);let r=[];for(let i=0;i<n;)r.push(String.fromCodePoint(...t.slice(i,i+=4096)));return r.join("")}function UZ(t,e){let n=t.length,r=n-e.length;for(let i=0;r==0&&i<n;i++)r=t[i]-e[i];return r}var FZ="AEUDWAHSCGYATwDVADIAdgAiADQAFAAtABQAIQAPACcADQASAAsAGQAJABIACQARAAUACwAFAAwABQAQAAMABwAEAAoABQAJAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACwANAA0AAwAKAAkABAAdAAYAZwDTAecDNACxCmIB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgPi89uj00MsvBXxEPAGPCDwBnQKoEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJEMAJpIBpob5AERSMAKNoAXqaQLRBMCzEiC+AZ4EWRJJFbEu7QDQLARtEbgECxDwAb/RyAk1AV4nD2cEQQKTAzsAGpobPgAahAGPCrysdy0OAKwAfFIcBAQFUmoA/PtZADkBIadVj2UMUgx5Il4ANQC9vLIBDAHUGVsQ8wCzfQIbGVcCHBZHAZ8CBAgXOhG7AqMZ4M7+1M0UAPDNAWsC+mcJDe8AAQA99zkEXLICyQozAo6lAobcP5JvjQLFzwKD9gU/OD8FEQCtEQL6bW+nAKUEvzjDHsuRyUvOFHcacUz5AqIFRSE2kzsBEQCuaQL5DQTlcgO6twSpTiUgCwIFCAUXBHQEqQV6swAVxUlmTmsCwjqsP/wKJQmXb793UgZBEBsnpRD3DDMBtQE7De1L2ATxBjsEyR99GRkPzZWcCKUt3QztJuMuoYBaI/UqgwXtS/Q83QtNUWgPWQtlCeM6Y4FOAyEBDSKLCt0NOQhtEPMKyWsN5RFFBzkD1UmaAKUHAQsRHTUVtSYQYqwLCTl3Bvsa9guPJq8TKXr8BdMaIQZNASka/wDPLueFsFoxXBxPXwYDCyUjxxSoUCANJUC3eEgaGwcVJakCkUNwSodRNh6TIfY8PQ1mLhNRfAf1PAUZTwuBPJ5Gq0UOEdI+jT1IIklMLAQ1fywvJ4sJzw+FDLl8cgFZCSEJsQxxEzERFzfFCDkHGS2XJCcVCCFGlWCaBPefA/MT0QMLBT8JQQcTA7UcLRMuFSkFDYEk1wLzNtUuswKPVoABFwXLDyUf3xBQR+AO6QibAmUDgyXrAC0VIQAXIpsIQ2MAX4/YUwUuywjHamwjdANnFOdhEXMHkQ5XB6ccMxW/HOFwyF4Lhggoo68JWwF1CZkBXwTjCAk1W4ygIEFnU4tYGJsgYUE/XfwCMQxlFZ9EvYd4AosPaxIbATUBcwc5DQECdxHtEWsQlQjrhgQ1tTP4OiUETyGDIBEKJwNPbM4LJyb5DPhpAaMSYgMMND137merYLYkF/0HGTLFQWAh8QuST80MnBrBGEJULhnkB78D8xrzJ+pBVwX/A6MDEzpNM+4EvQtpCIsJPwBJDqMXB9cYagpxjNABMYsBt5kDV5GDAm+PBjcHCwBnC4cFeeUAHQKnCKMABQDPA1cAOQKtB50AGQCFQQE9AycvASHlAo8DkwgxywGVLwHzKQQbwwwVAPc3bkoCw7ECgGpmogXdWAKOAkk1AU0lBAVOR1EDr3HhANsASwYT30cBFatKyxrjQwHfbysAxwD7AAU1BwVBAc0B820AtwFfCzEJorO1AU3pKQCDABVrAdcCiQDdADUAf/EBUwBNBVn5BdMCT0kBETEYK1dhAbsDHwEzAQ0AeQbLjaXJBx8EbQfTAhAbFeEC7y4HtQEDIt8TzULFAr3eVaFgAmSBAmJCW02vWzcgAqH3AmiYAmYJAp+EOBsLAmY7AmYmBG4EfwN/EwN+kjkGOXcXOYI6IyMCbB0CMjY4CgJtxwJtru+KM2dFKwFnAN4A4QBKBQeYDI0A/gvCAA21AncvAnaiPwJ5S0MCeLodXNtFrkbXAnw/AnrIAn0JAnzwBVkFIEgASH1jJAKBbQKAAAKABQJ/rklYSlsVF0rMAtEBAtDMSycDiE8Dh+ZExZEyAvKhXQMDA65LzkwtJQPPTUxNrwKLPwKK2MEbBx1DZwW3Ao43Ao5cQJeBAo7ZAo5ceFG0UzUKUtRUhQKT+wKTDADpABxVHlWvVdAGLBsplYYy4XhmRTs5ApefAu+yWCGoAFklApaPApZ8nACpWaxaCYFNADsClrUClk5cRFzRApnLAplkXMpdBxkCnJs5wjqdApwWAp+bAp64igAdDzEqDwKd8QKekgC1PWE0Ye8CntMCoG4BqQKenx8Cnk6lY8hkJyUrAievAiZ+AqD7AqBMAqLdAqHEAqYvAqXOAqf/AH0Cp/JofGixAANJahxq0QKs4wKsrgKtZwKtAgJXHQJV3AKx4dcDH05slwKyvQ0CsugXbOBtY21IXwMlzQK2XDs/bpADKUUCuF4CuUcVArkqd3A2cOECvRkCu9pwlgMyEQK+iHICAzNxAr4acyJzTwLDywLDBHOCdEs1RXTgAzynAzyaAz2/AsV8AsZHAsYQiQLIaVECyEQCyU8CyS4CZJ0C3dJ4eWF4rnklS9ADGKNnAgJh9BnzlSR7C16SXrsRAs9rAs9sL0tT0vMTnwDGrQLPcwEp6gNOEn5LBQLcJwLbigLSTwNSXANTXwEBA1WMgIk/AMsW7WBFghyC04LOg40C2scC2d6EEIRJpzwDhqUALwNkDoZxWfkAVQLfZQLeuHN3AuIv7RQB8zAnAfSbAfLShwLr8wLpcHkC6vkC6uQA+UcBuQLu
1708iQLrnJaqlwMC7j8DheCYeXDgcaEC8wMAaQOOFpmTAvcTA5FuA5KHAveYAvnZAvhmmhyaq7s3mx4DnYMC/voBGwA5nxyfswMFjQOmagOm2QDRxQMGaqGIogUJAwxJAtQAPwMA4UEXUwER8wNrB5dnBQCTLSu3r73bAYmZFH8RBDkB+ykFIQ6dCZ8Akv0TtRQrxQL3LScApQC3BbmOkRc/xqdtQS4UJo0uAUMBgPwBtSYAdQMOBG0ALAIWDKEAAAoCPQJqA90DfgSRASBFBSF8CgAFAEQAEwA2EgJ3AQAF1QNr7wrFAgD3Cp8nv7G35QGRIUFCAekUfxE0wIkABAAbAFoCRQKEiwAGOlM6lI1tALg6jzrQAI04wTrcAKUA6ADLATqBOjs5/Dn5O3aJOls7nok6bzkYAVYBMwFsBS81XTWeNa01ZjV1NbY1xTWCNZE10jXhNZ41rTXuNf01sjXBNgI2ETXGNdU2FjYnNd417TYuNj02LjUtITY6Nj02PDbJNwgEkDxXNjg23TcgNw82yiA3iTcwCgSwPGc2JDcZN2w6jTchQtRDB0LgQwscDw8JmyhtKFFVBgDpfwDpsAD+mxQ91wLpNSMArQC9BbeOkRdLxptzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgELgEaJZkC7aMAoQCjBcGOmxdNxrsBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUHqSvAj5Gqwr7YrMUACT9AN3rpF27H7fsd/twPt4l+UW1yQYKBt2Cgy7qJpGiLcdE2P1cQSImUbqJ6ICH27H4knQMIRMrFkHu3sx6tC35Y+eLIh4e4CMKJ4DfyV+8mfta499RCAJ0xfeZR8PsoYOApva9pjGn4PhvyZS7/h5JLuhaucfjuU+Z584wwqNO4hWYmaBCcjgQPale1bjoHzMUbut/zTgxHxBnAyrdKpF4IRMASLBtD/jviyLeCgj8twWjAd3HchN/uqaeRYeHJgl7JEY9/cTrvtfybx/r3Y/NtxJ9dp+MTVmiS9bwBH73s8Di56/Ma+mTPMHq4T1yEG1fWcqr0u+hrGnJEvU1JJAm/maQSrKrazIyvSkDFkj8UUlfBq8baniTGPng6YZRL661rDNw4w/1g2figG0IhXnL7wosd/sVNo5dYSmMBTP5c7rYLjRdCwg8quwljOMPf63D8ICAL0r71XRiyFHdgwHbwfgnPOf4Lzjf2v+j+IiDHG2isp5yUnzSDyDRb4i/Vs0qHSHq8PiEQ/JnBP7PxnjN0j6gT4AVAeRx/1o9VnEUlUwvFrzJqHk9jxAw4sYxCnrxaeBdCFFKbnE7z+x54F5W7ZZsU6kx8Qocul6FoAHHy01FGL/nne61mn4+uYXfQ1Uccn+HMLKE+cZzT8BB1E3FRskOgJrRsq25rauLm8+uamXpkS/bTy6y1wDbCrW4eD532kTWrtNUmVVZOIn/C+/JR9KVR5iG9TY8iaT67ubm/whL1xbKZoqtY+a6fNxMJrg211bGYJDUkYMNWA0BMB++9zOm6Eik4roqs9CCEFW0lyAK0PbvlzvoxrZuY/OEhNW/l/63U15Od/RSvmDvXpGLiVmeGi5PDSH2bYz5o2g6wFDQ2FbZgYgTF8rPlvA1ifjZD3NLtFdXdpSIJvgKR7GpjJWG7GZGawPomIH8B5tUmtHH9LpM+/KQKunEPa1GiQkCXv4Cnm9DLORo2joicHdPDZ64obQrPZ5bgqckkj0G6/NEiPYBY4bCkL7W8G5YzsUb6GakFjykSPkT7JGeLeB6uJOGMm+x7N381BCDfbJFx0dtLgV9Q477BfL1fvitX5anV/oYfxeYl+eF5x5bB8+Ep/L2nsmd56aKF4aAD4GbJWsdKyBW22xEmAD3XdbtsMyAFoR5mOla0gEd9U/YVB7zvHGpHbQonay9Sv0bQ8iZ8piaXVrKc5AG1AmqqgaEvzHSP2Wux7aZTWh6quVDVU01JtMIVRdCFwlSbbqqhoFlyzsotQzRexFvZ/MqUSFu3OhRIuNBbufvBpdVgb8XdGJ48/lJPCZ7dsOujTTbKPSEvGXkOnG2Xdi8/nM3EMRqITd5QeU7iOjKqC7URJY6TnLsHij22xAHKnVRD5MDtBYnoGFqZGMDmXCW6Oj+BAWw14hESY/xLF6bLku06AHkiXTHPCFZ0f9YSqqo27eAhhS67OrA2Het4M9JM3jm/yRX6bYxnfmzYl5qQdHxN08FsNuWDrWd4vMUY2QD3hr8vS73SCTkFoXZR3xNzOQt8d/6HfjBmXqvrE6EGkLzK6YK2U2/ksU/iUH+LvVIsJI+ri2AL/klo+ShdDyfs5A83i2prkMs51IKR7ZcqjZJi5X3+bd8GlyWvtddxKEoEqSgEO7A8jIgf2nH0h8FjM7oB6yte3X5mpL0i/E4Rx0CotKnILJj/vJqo4VkPQ93jRtRVfaitQPqldl5xRYPq8387Z0DcnZvOeION0Ht1+P27kFLGQIcLBX4FG3sffccNHh5cPfzp9INoRtqVtdViJfg8RjnXiIz/MNqEN6zvzX3hMzyWC7oSoXIT14ubc0abPX8Rp9GVa5NI/8iv+6ela1oTncbdimRKnrbRffDR/X4nH+bgqAuHWl7hOaeXPWVzIeRl7ga+JzD4Sx3mlj/q6Ra/E2HhDf21eEzTLNGfCZsY+/yxZzQzIAuijG65ii4O/waAJCrEJaWd/DRAKMQ5678Dw5AT7RCKzdadIwd8LsD+DgPBASmWsUlf8R0k1w/2k4lO2Wpb4zMI6EJVJs0xk/wn8/fRUPqrDKhbjHR41SqgFMx5RGMPuduFwlu5lK89tW11sTqiX/5EfGs5nO+y9FKvgXKPOEmgE05EKNL6Sjb3xS40H3BVPhm0ESOZgAjZoymc8be0inDVo4JdJVf+NKd3tN/CaB7GShhH27qf95NoFZVX/6ZkR2lX+CgWrQ2INgkh+bbMz68+uJ3Clsh8HSMPEQtAt+BBE6fXDab7KIlsKxU1lIXW/KWVstpdPanJ0pdXpQinDyUQjtY7ZVcfiecRxRDMAUhHFU2cEaciQ+htiPMPx1kdvtWG9T44w3r037ljHBFJdYR0r55qvMRixtAEFJAqA4T1ES87FAx7UozXasytg8MftZYt0rjYgLe6EJ5aWvy2qscBSBQ7yehoJIA3wIIZ9ukfkyBb6qnue5ko8W50rpV4kXqWjI5nbGRXrNW0tBZHXlY48nSgcUXBHWT4GcgLZJoLlKJnV96kCYpq9eWHh7xJzkCAyrQuQ5AJ0qq/uZ3toJglNterev+Qm0KXxPg/+YbFRJdfhbp1wOnVOEYdVHTya6CtO0afhEaBhx3oHwCb5Kq6RwHDzFMl2vfjL8GwzcCoTj7wZe+UFnYDV2yKpPU9dba29gYBdNqJg/KXozO+CJTlKmlKhnqTf5doeS35DZFV+cYJQVjd+oVY/Gtc/6XPzUxb1gMqf6cEjNNoRC8AObrp+fx0cVtGu4ffC2TgXRC8zPl8moUHCB5HZ25d87mlsiiK0aNwBtcEQjRNBT/QrXbw/8aVXdKMHn9EqYEKEyxSGTpYQOaes1G1Qq8pDgqkZtlO2HRyCXpmeM7TSrRPkAh004BfisVpF6zP44n2Jvxz/gOVocNCyy9V6lkod28QM4pbaMvVJigD/w3BrsjSJrXlqc4ulBYOCceiBN4b/gHajYyupbhEt63a619Ay4wsL6a6w6B+A7TnoyE7BliWHJfzVxxIKM/W3M/J8Bx99Op863Q8eNuIMGRx++VbYfjm+VGYBA3Ap/KEu/wxBNBpJJncwHPG45V8Gh98ZIrGCc20MwijGowZbcS7d1nEgcOW5cddZpHL2XPAIRbColiheZzXTvBxZOY3iMSDSKDrICyJ/iQs1vdplVdH/JrLJsQ2jtTnfCrITIghq3KFX3qAgLWAIp8IffNSdTYptnbGfc8s+qcr3zyzyHp1aJg+jxTF4kD1ry5Wauv5V3xnOGwTFecNzXSLHBW20/pCQjk4uorD0plIhMSTc79+/r4RKPClRYTBYex1Ob5crtfvRQBBv6re/6FhtCqtduag67glqRA77/3ulblh9YRtMdDxkCyJDeNnAuCLPQFmdRRWJtH20Z8DstfJf+5oj5SSB64d0iF5/Ya4KfTWxfivj9Ap2/zbYaTo/1gO3tM6RYsCZharMBFr7Fm61mLSrQnEI4OF1gbVS4k/JE9UotOrnLJZuswoWodCSV8zbybkJSVIP7n8UaE9xCR39rJZmf27HOAPVOGc9pdkQUcRrI0qyVF9Z3j1RHDbxIfwbWzmPVjwIdPJvtmBYwEQIUsIW1S939hcVikK00ozPRI02cqhzVUNzpOxVdrwRPvlh1aIOf0xFEqD3YkGnCnFah/cFN3J2gB7N+bZSGawwkKFu1tpQMrp1W+27YNkyT0TpcFpTqgOqqLabrgcCUPxh97mREOGy4xItzQ9xSl6rq+8BZsHcrQFReS+QeMxJ3P6CnL9EP/eOLDjumLhvrcQrpPiknsofbzBv9gTP0lU+TIVwE6E7CcKfT36q+ZiEOHJ9ayf0dyUJLezAb2M8aNHwd0+OJmsVgTzRWA";const Fg=44032,kw=4352,Nw=4449,Ow=4519,OP=19,BP=21,Qp=28,Bw=BP*Qp,VZ=OP*Bw,zZ=Fg+VZ,HZ=kw+OP,qZ=Nw+BP,$Z=Ow+Qp;function qm(t){return t>>24&255}function PP(t){return t&16777215}let vx,lR,Ax,Zb;function GZ(){let t=SP(FZ);
1708vx=new Map(IP(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),lR=new Set(Lg(t)),Ax=new Map,Zb=new Map;for(let[e,n]of RP(t)){if(!lR.has(e)&&n.length==2){let[r,i]=n,s=Zb.get(r);s||(s=new Map,Zb.set(r,s)),s.set(i,e)}Ax.set(e,n.reverse())}}function DP(t){return t>=Fg&&t<zZ}function QZ(t,e){if(t>=kw&&t<HZ&&e>=Nw&&e<qZ)return Fg+(t-kw)*Bw+(e-Nw)*Qp;if(DP(t)&&e>Ow&&e<$Z&&(t-Fg)%Qp==0)return t+(e-Ow);{let n=Zb.get(t);return n&&(n=n.get(e),n)?n:-1}}function MP(t){vx||GZ();let e=[],n=[],r=!1;function i(s){let a=vx.get(s);a&&(r=!0,s|=a),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if(DP(s)){let a=s-Fg,l=a/Bw|0,u=a%Bw/Qp|0,d=a%Qp;i(kw+l),i(Nw+u),d>0&&i(Ow+d)}else{let a=Ax.get(s);a?n.push(...a):i(s)}if(!n.length)break;s=n.pop()}if(r&&e.length>1){let s=qm(e[0]);for(let a=1;a<e.length;a++){let l=qm(e[a]);if(l==0||s<=l){s=l;continue}let u=a-1;for(;;){let d=e[u+1];if(e[u+1]=e[u],e[u]=d,!u||(s=qm(e[--u]),s<=l))break}s=qm(e[a])}}return e}function KZ(t){let e=[],n=[],r=-1,i=0;for(let s of t){let a=qm(s),l=PP(s);if(r==-1)a==0?r=l:e.push(l);else if(i>0&&i>=a)a==0?(e.push(r,...n),n.length=0,r=l):n.push(l),i=a;else{let u=QZ(r,l);u>=0?r=u:i==0&&a==0?(e.push(r),r=l):(n.push(l),i=a)}}return r>=0&&e.push(r,...n),e}function jP(t){return MP(t).map(PP)}function WZ(t){return KZ(MP(t))}const uR=45,LP=".",UP=65039,FP=1,Pw=t=>Array.from(t);function Vg(t,e){return t.P.has(e)||t.Q.has(e)}let YZ=class extends Array{get is_emoji(){return!0}},Ex,VP,Wu,xx,zP,kh,x3,lh,Du,fR,Cx;function I2(){if(Ex)return;let t=SP(IZ);const e=()=>Lg(t),n=()=>new Set(e()),r=(h,m)=>m.forEach(g=>h.add(g));Ex=new Map(RP(t)),VP=n(),Wu=e(),xx=new Set(e().map(h=>Wu[h])),Wu=new Set(Wu),zP=n(),n();let i=IP(t),s=t();const a=()=>{let h=new Set;return e().forEach(m=>r(h,i[m])),r(h,e()),h};kh=Ug(h=>{let m=Ug(t).map(g=>g+96);if(m.length){let g=h>=s;m[0]-=32,m=Gp(m),g&&(m=`Restricted[${m}]`);let w=a(),A=a(),v=!t();return{N:m,P:w,Q:A,M:v,R:g}}}),x3=n(),lh=new Map;let l=e().concat(Pw(x3)).sort((h,m)=>h-m);l.forEach((h,m)=>{let g=t(),w=l[m]=g?l[m-g]:{V:[],M:new Map};w.V.push(h),x3.has(h)||lh.set(h,w)});for(let{V:h,M:m}of new Set(lh.values())){let g=[];for(let A of h){let v=kh.filter(T=>Vg(T,A)),x=g.find(({G:T})=>v.some(O=>T.has(O)));x||(x={G:new Set,V:[]},g.push(x)),x.V.push(A),r(x.G,v)}let w=g.flatMap(A=>Pw(A.G));for(let{G:A,V:v}of g){let x=new Set(w.filter(T=>!A.has(T)));for(let T of v)m.set(T,x)}}Du=new Set;let u=new Set;const d=h=>Du.has(h)?u.add(h):Du.add(h);for(let h of kh){for(let m of h.P)d(m);for(let m of h.Q)d(m)}for(let h of Du)!lh.has(h)&&!u.has(h)&&lh.set(h,FP);r(Du,jP(Du)),fR=MZ(t).map(h=>YZ.from(h)).sort(UZ),Cx=new Map;for(let h of fR){let m=[Cx];for(let g of h){let w=m.map(A=>{let v=A.get(g);return v||(v=new Map,A.set(g,v)),v});g===UP?m.push(...w):m=w}for(let g of m)g.V=h}}function R2(t){return(HP(t)?"":`${k2(Qv([t]))} `)+NP(t)}function k2(t){return`"${t}"â`}function JZ(t){if(t.length>=4&&t[2]==uR&&t[3]==uR)throw new Error(`invalid label extension: "${Gp(t.slice(0,4))}"`)}function XZ(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function ZZ(t){let e=t[0],n=aR.get(e);if(n)throw ig(`leading ${n}`);let r=t.length,i=-1;for(let s=1;s<r;s++){e=t[s];let a=aR.get(e);if(a){if(i==s)throw ig(`${n} + ${a}`);i=s+1,n=a}}if(i==r)throw ig(`trailing ${n}`)}function Qv(t,e=1/0,n=NP){let r=[];eee(t[0])&&r.push("â"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,s=t.length;for(let a=0;a<s;a++){let l=t[a];HP(l)&&(r.push(Gp(t.slice(i,a))),r.push(n(l)),i=a+1)}return r.push(Gp(t.slice(i,s))),r.join("")}function eee(t,e){return I2(),Wu.has(t)}function HP(t){return I2(),zP.has(t)}function tee(t){return see(nee(t,WZ,cee))}function nee(t,e,n){if(!t)return[];I2();let r=0;return t.split(LP).map(i=>{let s=LZ(i),a={input:s,offset:r};r+=s.length+1;try{let l=a.tokens=aee(s,e,n),u=l.length,d;if(!u)throw new Error("empty label");let h=a.output=l.flat();if(XZ(h),!(a.emoji=u>1||l[0].is_emoji)&&h.every(g=>g<128))JZ(h),d="ASCII";else{let g=l.flatMap(w=>w.is_emoji?[]:w);if(!g.length)d="Emoji";else{if(Wu.has(h[0]))throw ig("leading combining mark");for(let v=1;v<u;v++){let x=l[v];
1708if(!x.is_emoji&&Wu.has(x[0]))throw ig(`emoji + combining mark: "${Gp(l[v-1])} + ${Qv([x[0]])}"`)}ZZ(h);let w=Pw(new Set(g)),[A]=iee(w);oee(A,g),ree(A,w),d=A.N}}a.type=d}catch(l){a.error=l}return a})}function ree(t,e){let n,r=[];for(let i of e){let s=lh.get(i);if(s===FP)return;if(s){let a=s.M.get(i);if(n=n?n.filter(l=>a.has(l)):Pw(a),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(s=>Vg(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function iee(t){let e=kh;for(let n of t){let r=e.filter(i=>Vg(i,n));if(!r.length)throw kh.some(i=>Vg(i,n))?$P(e[0],n):qP(n);if(e=r,r.length==1)break}return e}function see(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${k2(Qv(e,63))}: ${i}`)}return Gp(r)}).join(LP)}function qP(t){return new Error(`disallowed character: ${R2(t)}`)}function $P(t,e){let n=R2(e),r=kh.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function ig(t){return new Error(`illegal placement: ${t}`)}function oee(t,e){for(let n of e)if(!Vg(t,n))throw $P(t,n);if(t.M){let n=jP(e);for(let r=1,i=n.length;r<i;r++)if(xx.has(n[r])){let s=r+1;for(let a;s<i&&xx.has(a=n[s]);s++)for(let l=r;l<s;l++)if(n[l]==a)throw new Error(`duplicate non-spacing marks: ${R2(a)}`);if(s-r>cR)throw new Error(`excessive non-spacing marks: ${k2(Qv(n.slice(r-1,s)))} (${s-r}/${cR})`);r=s}}}function aee(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let s=lee(t);if(s)i.length&&(r.push(e(i)),i=[]),r.push(n(s));else{let a=t.pop();if(Du.has(a))i.push(a);else{let l=Ex.get(a);if(l)i.push(...l);else if(!VP.has(a))throw qP(a)}}}return i.length&&r.push(e(i)),r}function cee(t){return t.filter(e=>e!=UP)}function lee(t,e){let n=Cx,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:s}=n;s&&(r=s,t.length=i)}return r}function uee(t){return tee(t)}function fee(t){return uee(t)}const N2=$O({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),dee=$O({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0});var hee=Xk(),_x=function(t,e){return _x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},_x(t,e)};function GP(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_x(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var fs=function(){return fs=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},fs.apply(this,arguments)};function Kv(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function QP(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(s=(i<3?a(s):i>3?a(e,n,s):a(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function KP(t,e){return function(n,r){e(n,r,t)}}function pee(t,e,n,r,i,s){function a(T){if(T!==void 0&&typeof T!="function")throw new TypeError("Function expected");return T}for(var l=r.kind,u=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,h=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}
vendor: 7,199 bytes, line 1708
1708),m,g=!1,w=n.length-1;w>=0;w--){var A={};for(var v in r)A[v]=v==="access"?{}:r[v];for(var v in r.access)A.access[v]=r.access[v];A.addInitializer=function(T){if(g)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(T||null))};var x=(0,n[w])(l==="accessor"?{get:h.get,set:h.set}:h[u],A);if(l==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(m=a(x.get))&&(h.get=m),(m=a(x.set))&&(h.set=m),(m=a(x.init))&&i.unshift(m)}else(m=a(x))&&(l==="field"?i.unshift(m):h[u]=m)}d&&Object.defineProperty(d,r.name,h),g=!0}function mee(t,e,n){for(var r=arguments.length>2,i=0;i<e.length;i++)n=r?e[i].call(t,n):e[i].call(t);return r?n:void 0}function gee(t){return typeof t=="symbol"?t:"".concat(t)}function yee(t,e,n){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function WP(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function YP(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(h){try{d(r.next(h))}catch(m){a(m)}}function u(h){try{d(r.throw(h))}catch(m){a(m)}}function d(h){h.done?s(h.value):i(h.value).then(l,u)}d((r=r.apply(t,e||[])).next())})}function JP(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(d){return function(h){return u([d,h])}}function u(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(s=d[0]&2?i.return:d[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,d[1])).done)return s;switch(i=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(h){d=[6,h],i=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}var Wv=Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]});function XP(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Wv(e,t,n)}function Dw(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function O2(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){a={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function ZP(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(O2(arguments[e]));return t}function eD(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var s=arguments[e],a=0,l=s.length;a<l;a++,i++)r[i]=s[a];return r}function B2(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}function Kp(t){return this instanceof Kp?(this.v=t,this):new Kp(t)}function tD(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(w){return function(A){return Promise.resolve(A).then(w,m)}}function l(w,A){r[w]&&(i[w]=function(v){return new Promise(function(x,T){s.push([w,v,x,T])>1||u(w,v)})},A&&(i[w]=A(i[w])))}function u(w,A){try{d(r[w](A))}catch(v){g(s[0][3],v)}}function d(w){w.value instanceof Kp?Promise.resolve(w.value.v).then(h,m):g(s[0][2],w)}function h(w){u("next",w)}function m(w){u("throw",w)}function g(w,A){w(A),s.shift(),s.length&&u(s[0][0],s[0][1])}}function nD(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,s){e[i]=t[i]?function(a){return(n=!n)?{value:Kp(t[i](a)),done:!1}:s?s(a):a}:s}}function rD(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Dw=="function"?Dw(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=t[s]&&function(a){return new Promise(function(l,u){a=t[s](a),i(l,u,a.done,a.value)})}}function i(s,a,l,u){Promise.resolve(u).then(function(d){s({value:d,done:l})},a)}}function iD(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var bee=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e};function sD(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Wv(e,t,n);return bee(e,t),e}function oD(t){return t&&t.__esModule?t:{default:t}}function aD(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function cD(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n}function lD(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function uD(t,e,n){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");
1708i&&(r=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}var wee=typeof SuppressedError=="function"?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function fD(t){function e(s){t.error=t.hasError?new wee(s,t.error,"An error was suppressed during disposal."):s,t.hasError=!0}var n,r=0;function i(){for(;n=t.stack.pop();)try{if(!n.async&&r===1)return r=0,t.stack.push(n),Promise.resolve().then(i);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(s).then(i,function(a){return e(a),i()})}else r|=1}catch(a){e(a)}if(r===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return i()}const vee={__extends:GP,__assign:fs,__rest:Kv,__decorate:QP,__param:KP,__metadata:WP,__awaiter:YP,__generator:JP,__createBinding:Wv,__exportStar:XP,__values:Dw,__read:O2,__spread:ZP,__spreadArrays:eD,__spreadArray:B2,__await:Kp,__asyncGenerator:tD,__asyncDelegator:nD,__asyncValues:rD,__makeTemplateOb
vendor: 5,669 bytes, lines 1708-1723
1708ject:iD,__importStar:sD,__importDefault:oD,__classPrivateFieldGet:aD,__classPrivateFieldSet:cD,__classPrivateFieldIn:lD,__addDisposableResource:uD,__disposeResources:fD},ege=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:uD,get __assign(){return fs},__asyncDelegator:nD,__asyncGenerator:tD,__asyncValues:rD,__await:Kp,__awaiter:YP,__classPrivateFieldGet:aD,__classPrivateFieldIn:lD,__classPrivateFieldSet:cD,__createBinding:Wv,__decorate:QP,__disposeResources:fD,__esDecorate:pee,__exportStar:XP,__extends:GP,__generator:JP,__importDefault:oD,__importStar:sD,__makeTemplateObject:iD,__metadata:WP,__param:KP,__propKey:gee,__read:O2,__rest:Kv,__runInitializers:mee,__setFunctionName:yee,__spread:ZP,__spreadArray:B2,__spreadArrays:eD,__values:Dw,default:vee},Symbol.toStringTag,{value:"Module"}));var ew="right-scroll-bar-position",tw="width-before-scroll-bar",Aee="with-scroll-bars-hidden",Eee="--removed-body-scroll-bar-size";function C3(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function xee(t,e){var n=K.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Cee=typeof window<"u"?K.useLayoutEffect:K.useEffect,dR=new WeakMap;function _ee(t,e){var n=xee(null,function(r){return t.forEach(function(i){return C3(i,r)})});return Cee(function(){var r=dR.get(n);if(r){var i=new Set(r),s=new Set(t),a=n.current;i.forEach(function(l){s.has(l)||C3(l,null)}),s.forEach(function(l){i.has(l)||C3(l,a)})}dR.set(n,t)},[t]),n}function Tee(t){return t}function See(t,e){e===void 0&&(e=Tee);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var a=e(s,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(s),a=n}var u=function(){var h=a;a=[],h.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){a.push(h),d()},filter:function(h){return a=a.filter(h),n}}}};return i}function Iee(t){t===void 0&&(t={});var e=See(null);return e.options=fs({async:!0,ssr:!1},t),e}var dD=function(t){var e=t.sideCar,n=Kv(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return K.createElement(r,fs({},n))};dD.isSideCarExport=!0;function Ree(t,e){return t.useMedium(e),dD}var hD=Iee(),_3=function(){},Yv=K.forwardRef(function(t,e){var n=K.useRef(null),r=K.useState({onScrollCapture:_3,onWheelCapture:_3,onTouchMoveCapture:_3}),i=r[0],s=r[1],a=t.forwardProps,l=t.children,u=t.className,d=t.removeScrollBar,h=t.enabled,m=t.shards,g=t.sideCar,w=t.noIsolation,A=t.inert,v=t.allowPinchZoom,x=t.as,T=x===void 0?"div":x,O=t.gapMode,k=Kv(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,B=_ee([n,e]),U=fs(fs({},k),i);return K.createElement(K.Fragment,null,h&&K.createElement(P,{sideCar:hD,removeScrollBar:d,shards:m,noIsolation:w,inert:A,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:O}),a?K.cloneElement(K.Children.only(l),fs(fs({},U),{ref:B})):K.createElement(T,fs({},U,{className:u,ref:B}),l))});Yv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yv.classNames={fullWidth:tw,zeroRight:ew};var kee=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nee(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=kee();return e&&t.setAttribute("nonce",e),t}function Oee(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Bee(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Pee=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Nee())&&(Oee(e,n),Bee(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Dee=function(){var t=Pee();return function(e,n){K.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},pD=function(){var t=Dee(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Mee={left:0,top:0,right:0,gap:0},T3=function(t){return parseInt(t||"",10)||0},jee=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[T3(n),T3(r),T3(i)]},Lee=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Mee;var e=jee(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Uee=pD(),Nh="data-scroll-locked",Fee=function(t,e,n,r){var i=t.left,s=t.top,a=t.right,l=t.gap;return n===void 0&&(n="margin"),` 1709 .`.concat(Aee,` { 1710 overflow: hidden `).concat(r,`; 1711 padding-right: `).concat(l,"px ").concat(r,`; 1712 } 1713 body[`).concat(Nh,`] { 1714 overflow: hidden `).concat(r,`; 1715 overscroll-behavior: contain; 1716 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 1717 padding-left: `.concat(i,`px; 1718 padding-top: `).concat(s,`px; 1719 padding-right: `).concat(a,`px; 1720 margin-left:0; 1721 margin-top:0; 1722 margin-right: `).concat(l,"px ").concat(r,`; 1723 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
1723")].filter(Boolean).join(""),` 1724 } 1725 1726 .`).concat(ew,` { 1727 right: `).concat(l,"px ").concat(r,`; 1728 } 1729 1730 .`).concat(tw,` { 1731 margin-right: `).concat(l,"px ").concat(r,`; 1732 } 1733 1734 .`).concat(ew," .").concat(ew,` { 1735 right: 0 `).concat(r,`; 1736 } 1737 1738 .`).concat(tw," .").concat(tw,` { 1739 margin-right: 0 `).concat(r,`; 1740 } 1741 1742 body[`).concat(Nh,`] { 1743 `).concat(Eee,": ").concat(l,`px; 1744 } 1745`)},hR=function(){var t=parseInt(document.body.getAttribute(Nh)||"0",10);return isFinite(t)?t:0},Vee=function(){K.useEffect(function(){return document.body.setAttribute(Nh,(hR()+1).toString()),function(){var t=hR()-1;t<=0?document.body.removeAttribute(Nh):document.body.setAttribute(Nh,t.toString())}},[])},zee=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;Vee();var s=K.useMemo(function(){return Lee(i)},[i]);return K.createElement(Uee,{styles:Fee(s,!e,i,n?"":"!important")})},Tx=!1;if(typeof window<"u")try{var Nb=Object.defineProperty({},"passive",{get:function(){return Tx=!0,!0}});window.addEventListener("test",Nb,Nb),window.removeEventListener("test",Nb,Nb)}catch{Tx=!1}var nh=Tx?{passive:!1}:!1,Hee=function(t){return t.tagName==="TEXTAREA"},mD=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hee(t)&&n[e]==="visible")},qee=function(t){return mD(t,"overflowY")},$ee=function(t){return mD(t,"overflowX")},pR=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=gD(t,r);if(i){var s=yD(t,r),a=s[1],l=s[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gee=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Qee=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},gD=function(t,e){return t==="v"?qee(e):$ee(e)},yD=function(t,e){return t==="v"?Gee(e):Qee(e)},Kee=function(t,e){return t==="h"&&e==="rtl"?-1:1},Wee=function(t,e,n,r,i){var s=Kee(t,window.getComputedStyle(e).direction),a=s*r,l=n.target,u=e.contains(l),d=!1,h=a>0,m=0,g=0;do{var w=yD(t,l),A=w[0],v=w[1],x=w[2],T=v-x-s*A;(A||T)&&gD(t,l)&&(m+=T,g+=A),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(e.contains(l)||e===l));return(h&&Math.abs(m)<1||!h&&Math.abs(g)<1)&&(d=!0),d},Ob=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},mR=function(t){return[t.deltaX,t.deltaY]},gR=function(t){return t&&"current"in t?t.current:t},Yee=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Jee=function(t){return` 1746 .block-interactivity-`.concat(t,` {pointer-events: none;} 1747 .allow-interactivity-`).concat(t,` {pointer-events: all;} 1748`)},Xee=0,rh=[];function Zee(t){var e=K.useRef([]),n=K.useRef([0,0]),r=K.useRef(),i=K.useState(Xee++)[0],s=K.useState(pD)[0],a=K.useRef(t);K.useEffect(function(){a.current=t},[t]),K.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=B2([t.lockRef.current],(t.shards||[]).map(gR),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=K.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var T=Ob(v),O=n.current,k="deltaX"in v?v.deltaX:O[0]-T[0],P="deltaY"in v?v.deltaY:O[1]-T[1],B,U=v.target,I=Math.abs(k)>Math.abs(P)?"h":"v";if("touches"in v&&I==="h"&&U.type==="range")return!1;var R=pR(I,U);if(!R)return!0;if(R?B=I:(B=I==="v"?"h":"v",R=pR(I,U)),!R)return!1;if(!r.current&&"changedTouches"in v&&(k||P)&&(r.current=B),!B)return!0;var M=r.current||B;return Wee(M,x,v,M==="h"?k:P)},[]),u=K.useCallback(function(v){var x=v;if(!(!rh.length||rh[rh.length-1]!==s)){var T="deltaY"in x?mR(x):Ob(x),O=e.current.filter(function(B){return B.name===x.type&&(B.target===x.target||x.target===B.shadowParent)&&Yee(B.delta,T)})[0];if(O&&O.should){x.cancelable&&x.preventDefault();return}
1748if(!O){var k=(a.current.shards||[]).map(gR).filter(Boolean).filter(function(B){return B.contains(x.target)}),P=k.length>0?l(x,k[0]):!a.current.noIsolation;P&&x.cancelable&&x.preventDefault()}}},[]),d=K.useCallback(function(v,x,T,O){var k={name:v,delta:x,target:T,should:O,shadowParent:ete(T)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(P){return P!==k})},1)},[]),h=K.useCallback(function(v){n.current=Ob(v),r.current=void 0},[]),m=K.useCallback(function(v){d(v.type,mR(v),v.target,l(v,t.lockRef.current))},[]),g=K.useCallback(function(v){d(v.type,Ob(v),v.target,l(v,t.lockRef.current))},[]);K.useEffect(function(){return rh.push(s),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",u,nh),document.addEventListener("touchmove",u,nh),document.addEventListener("touchstart",h,nh),function(){rh=rh.filter(function(v){return v!==s}),document.removeEventListener("wheel",u,nh),document.removeEventListener("touchmove",u,nh),document.removeEventListener("touchstart",h,nh)}},[]);var w=t.removeScrollBar,A=t.inert;return K.createElement(K.Fragment,null,A?K.createElement(s,{styles:Jee(i)}):null,w?K.createElement(zee,{gapMode:t.gapMode}):null)}function ete(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const tte=Ree(hD,Zee);var bD=K.forwardRef(function(t,e){return K.createElement(Yv,fs({},t,{ref:e,sideCar:tte}))});bD.classNames=Yv.classNames;function yR(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function nte(t,e){var n=t;for(var r of e){if(!(r in n))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));n=n[r]}return n}function wD(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r={};for(var i in t){var s=t[i],a=[...n,i];typeof s=="string"||typeof s=="number"||s==null?r[i]=e(s,a):typeof s=="object"&&!Array.isArray(s)?r[i]=wD(s,e,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return r}function bR(t,e){var n={};if(typeof e=="object"){var r=t;wD(e,(l,u)=>{if(l!=null){var d=nte(r,u);n[yR(d)]=String(l)}})}else{var i=t;for(var s in i){var a=i[s];a!=null&&(n[yR(s)]=a)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(u=>"".concat(u,":").concat(this[u])).join(";")},writable:!1}),n}var $m={exports:{}},rte=$m.exports,wR;function ite(){return wR||(wR=1,(function(t,e){(function(n,r){var i="1.0.40",s="",a="?",l="function",u="undefined",d="object",h="string",m="major",g="model",w="name",A="type",v="vendor",x="version",T="architecture",O="console",k="mobile",P="tablet",B="smarttv",U="wearable",I="embedded",R=500,M="Amazon",F="Apple",j="ASUS",q="BlackBerry",L="Browser",Se="Chrome",X="Edge",Q="Firefox",te="Google",J="Huawei",fe="LG",$="Microsoft",se="Motorola",ye="Opera",pe="Samsung",me="Sharp",ve="Sony",_e="Xiaomi",Re="Zebra",De="Facebook",qe="Chromium OS",it="Mac OS",Vt=" Browser",Qe=function(Ve,Le){var He={};for(var rt in Ve)Le[rt]&&Le[rt].length%2===0?He[rt]=Le[rt].concat(Ve[rt]):He[rt]=Ve[rt];return He},et=function(Ve){for(var Le={},He=0;He<Ve.length;He++)Le[Ve[He].toUpperCase()]=Ve[He];return Le},Pt=function(Ve,Le){return typeof Ve===h?It(Le).indexOf(It(Ve))!==-1:!1},It=function(Ve){return Ve.toLowerCase()},nn=function(Ve){return typeof Ve===h?Ve.replace(/[^\d\.]/g,s).split(".")[0]:r},St=function(Ve,Le){if(typeof Ve===h)return Ve=Ve.replace(/^\s\s*/,s),typeof Le===u?Ve:Ve.substring(0,R)},Ir=function(Ve,Le){for(var He=0,rt,Kr,Wr,ft,$e,Hn;He<Le.length&&!$e;){var Rr=Le[He],Yo=Le[He+1];for(rt=Kr=0;rt<Rr.length&&!$e&&Rr[rt];)if($e=Rr[rt++].exec(Ve),$e)for(Wr=0;Wr<Yo.length;Wr++)Hn=$e[++Kr],ft=Yo[Wr],typeof ft===d&&ft.length>0?ft.length===2?typeof ft[1]==l?this[ft[0]]=ft[1].call(this,Hn):this[ft[0]]=ft[1]:ft.length===3?typeof ft[1]===l&&!(ft[1].exec&&ft[1].test)?this[ft[0]]=Hn?ft[1].call(this,Hn,ft[2]):r:this[ft[0]]=Hn?Hn.replace(ft[1],ft[2]):r:ft.length===4&&(this[ft[0]]=Hn?ft[3].call(this,Hn.replace(ft[1],ft[2])):r):this[ft]=Hn||r;He+=2}},Ui=function(Ve,Le){for(var He in Le)if(typeof Le[He]===d&&Le[He].length>0){for(var rt=0;rt<Le[He].length;rt++)if(Pt(Le[He][rt],Ve))return He===a?r:He}else if(Pt(Le[He],Ve))return He===a?r:He;return Le.hasOwnProperty("*")?Le["*"]:Ve},ys={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Vn={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ud={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[w,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,x],[/opios[\/ ]+([\w\.]+)/i],[x,[w,ye+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[x,[w,ye+" GX"]],[/\bopr\/([\w\.]+)/i],[x,[w,ye]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[x,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[x,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[w,x],[/quark(?:pc)?\/([-\w\.]+)/i],[x,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[x,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[w,"UC"+L]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[x,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[x,[w,"Smart Lenovo "+L]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure "+L],x],[/\bfocus\/([\w\.]+)/i],[x,[w,Q+" Focus"]],[/\bopt\/([\w\.]+)/i],[x,[w,ye+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[w,ye+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[w,"MIUI"+Vt]],[/fxios\/([\w\.-]+)/i],[x,[w,Q]],[/\bqihoobrowser\/?([\w\.]*)/i],[x,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+Vt],x],[/samsungbrowser\/([\w\.]+)/i],[x,[w,pe+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[x,[w,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,"Sogou Mobile"],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,x],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[x,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,De],x],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,x],[/\bgsa\/([\w\.]+) .*safari\//i],[x,[w,"GSA"]],[/musical_ly(?:.
vendor: 5,897 bytes, line 1748
1748+app_?version\/|_)([\w\.]+)/i],[x,[w,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[x,[w,Se+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,Se+" WebView"],x],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[x,[w,"Android "+L]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,x],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[x,[w,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[x,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[x,Ui,ys]],[/(webkit|khtml)\/([\w\.]+)/i],[w,x],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],x],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,x],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[x,[w,Q+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[w,[x,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[x,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[T,"amd64"]],[/(ia32(?=;))/i],[[T,It]],[/((?:i[346]|x)86)[;\)]/i],[[T,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[T,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[T,"armhf"]],[/windows (ce|mobile); ppc;/i],[[T,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[T,/ower/,s,It]],[/(sun4\w)[;\)]/i],[[T,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[T,It]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[v,pe],[A,P]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[v,pe],[A,k]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[v,F],[A,k]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[v,F],[A,P]],[/(macintosh);/i],[g,[v,F]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[v,me],[A,k]],[/(?:honor)([-\w ]+)[;\)]/i],[g,[v,"Honor"],[A,k]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[v,J],[A,P]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[v,J],[A,k]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[g,/_/g," "],[v,_e],[A,k]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[v,_e],[A,P]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[v,"OPPO"],[A,k]],[/\b(opd2\d{3}a?) bui/i],[g,[v,"OPPO"],[A,P]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[v,"Vivo"],[A,k]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[v,"Realme"],[A,k]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[v,se],[A,k]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[v,se],[A,P]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[v,fe],[A,P]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[v,fe],[A,k]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[g,[v,"Lenovo"],[A,P]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[v,"Nokia"],[A,k]],[/(pixel c)\b/i],[g,[v,te],[A,P]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[v,te],[A,k]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[v,ve],[A,k]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[v,ve],[A,P]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[v,"OnePlus"],[A,k]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[v,M],[A,P]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[v,M],[A,k]],[/(playbook);[-\w\),; ]+(rim)/i],[g,v,[A,P]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[v,q],[A,k]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[v,j],[A,P]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[v,j],[A,k]],[/(nexus 9)/i],[g,[v,"HTC"],[A,P]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[g,/_/g," "],[A,k]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[g,[v,"TCL"],[A,P]],[/(itel) ((\w+))/i],[[v,It],g,[A,Ui,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[v,"Acer"],[A,P]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[v,"Meizu"],[A,k]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[v,"Ulefone"],[A,k]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[v,"Energizer"],[A,k]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[v,"Cat"],[A,k]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[v,"Smartfren"],[A,k]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[v,"Nothing"],[A,k]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/;
vendor: 8,330 bytes, lines 1748-1758
1748 (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,g,[A,k]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,g,[A,P]],[/(surface duo)/i],[g,[v,$],[A,P]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[v,"Fairphone"],[A,k]],[/(u304aa)/i],[g,[v,"AT&T"],[A,k]],[/\bsie-(\w*)/i],[g,[v,"Siemens"],[A,k]],[/\b(rct\w+) b/i],[g,[v,"RCA"],[A,P]],[/\b(venue[\d ]{2,7}) b/i],[g,[v,"Dell"],[A,P]],[/\b(q(?:mv|ta)\w+) b/i],[g,[v,"Verizon"],[A,P]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[v,"Barnes & Noble"],[A,P]],[/\b(tm\d{3}\w+) b/i],[g,[v,"NuVision"],[A,P]],[/\b(k88) b/i],[g,[v,"ZTE"],[A,P]],[/\b(nx\d{3}j) b/i],[g,[v,"ZTE"],[A,k]],[/\b(gen\d{3}) b.+49h/i],[g,[v,"Swiss"],[A,k]],[/\b(zur\d{3}) b/i],[g,[v,"Swiss"],[A,P]],[/\b((zeki)?tb.*\b) b/i],[g,[v,"Zeki"],[A,P]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],g,[A,P]],[/\b(ns-?\w{0,9}) b/i],[g,[v,"Insignia"],[A,P]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[v,"NextBook"],[A,P]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],g,[A,k]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],g,[A,k]],[/\b(ph-1) /i],[g,[v,"Essential"],[A,k]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[v,"Envizen"],[A,P]],[/\b(trio[-\w\. ]+) b/i],[g,[v,"MachSpeed"],[A,P]],[/\btu_(1491) b/i],[g,[v,"Rotor"],[A,P]],[/(shield[\w ]+) b/i],[g,[v,"Nvidia"],[A,P]],[/(sprint) (\w+)/i],[v,g,[A,k]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[v,$],[A,k]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[v,Re],[A,P]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[v,Re],[A,k]],[/smart-tv.+(samsung)/i],[v,[A,B]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[v,pe],[A,B]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,fe],[A,B]],[/(apple) ?tv/i],[v,[g,F+" TV"],[A,B]],[/crkey/i],[[g,Se+"cast"],[v,te],[A,B]],[/droid.+aft(\w+)( bui|\))/i],[g,[v,M],[A,B]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[v,me],[A,B]],[/(bravia[\w ]+)( bui|\))/i],[g,[v,ve],[A,B]],[/(mitv-\w{5}) bui/i],[g,[v,_e],[A,B]],[/Hbbtv.*(technisat) (.*);/i],[v,g,[A,B]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,St],[g,St],[A,B]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[A,B]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,g,[A,O]],[/droid.+; (shield) bui/i],[g,[v,"Nvidia"],[A,O]],[/(playstation [345portablevi]+)/i],[g,[v,ve],[A,O]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[v,$],[A,O]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[g,[v,pe],[A,U]],[/((pebble))app/i],[v,g,[A,U]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[v,F],[A,U]],[/droid.+; (glass) \d/i],[g,[v,te],[A,U]],[/droid.+; (wt63?0{2,3})\)/i],[g,[v,Re],[A,U]],[/droid.+; (glass) \d/i],[g,[v,te],[A,U]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,g,[A,U]],[/; (quest( \d| pro)?)/i],[g,[v,De],[A,U]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[A,I]],[/(aeobc)\b/i],[g,[v,M],[A,I]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[A,k]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[A,P]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[A,P]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[A,k]],[/(android[-\w\. ]{0,9});.+buil/i],[g,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[x,[w,X+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,x],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[x,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,x],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[x,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,x],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[w,[x,Ui,Vn]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[x,Ui,Vn],[w,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[x,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,it],[x,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[x,w],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[w,x],[/\(bb(10);/i],[x,[w,q]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[x,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[x,[w,Q+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[x,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[x,[w,"watchOS"]],[/crkey\/([\d\.]+)/i],[x,[w,Se+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,qe],x],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,x],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],x],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,x]]},zn=function(Ve,Le){if(typeof Ve===d&&(Le=Ve,Ve=r),!(this instanceof zn))return new zn(Ve,Le).getResult();var He=typeof n!==u&&n.navigator?n.navigator:r,rt=Ve||(He&&He.userAgent?He.userAgent:s),Kr=He&&He.userAgentData?He.userAgentData:r,Wr=Le?Qe(ud,Le):ud,ft=He&&He.userAgent==rt;return this.getBrowser=function(){var $e={};return $e[w]=r,$e[x]=r,Ir.call($e,rt,Wr.browser),$e[m]=nn($e[x]),ft&&He&&He.brave&&typeof He.brave.isBrave==l&&($e[w]="Brave"),$e},this.getCPU=function(){var $e={};return $e[T]=r,Ir.call($e,rt,Wr.cpu),$e},this.getDevice=function(){var $e={};return $e[v]=r,$e[g]=r,$e[A]=r,Ir.call($e,rt,Wr.device),ft&&!$e[A]&&Kr&&Kr.mobile&&($e[A]=k),ft&&$e[g]=="Macintosh"&&He&&typeof He.standalone!==u&&He.maxTouchPoints&&He.maxTouchPoints>2&&($e[g]="iPad",$e[A]=P),$e},this.getEngine=function(){var $e={};return $e[w]=r,$e[x]=r,Ir.call($e,rt,Wr.engine),$e},this.getOS=function(){var $e={};return $e[w]=r,$e[x]=r,Ir.call($e,rt,Wr.os),ft&&!$e[w]&&Kr&&Kr.platform&&Kr.platform!="Unknown"&&($e[w]=Kr.platform.replace(/chrome os/i,qe).replace(/macos/i,it)),$e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return rt},this.setUA=function($e){return rt=typeof $e===h&&$e.length>R?St($e,R):$e,this},this.setUA(rt),this};zn.VERSION=i,zn.BROWSER=et([w,x,m]),zn.CPU=et([T]),zn.DEVICE=et([g,v,A,O,k,B,P,U,I]),zn.ENGINE=zn.OS=et([w,x]),t.exports&&(e=t.exports=zn),e.UAParser=zn;var Fi=typeof n!==u&&(n.jQuery||n.Zepto);if(Fi&&!Fi.ua){var Wo=new zn;Fi.ua=Wo.getResult(),Fi.ua.get=function(){return Wo.getUA()},Fi.ua.set=function(Ve){Wo.setUA(Ve);var Le=Wo.getResult();for(var He in Le)Fi.ua[He]=Le[He]}}})(typeof window=="object"?window:rte)})($m,$m.exports)),$m.exports}var ste=ite();/*! 1749Copyright (c) 2023 Paul Miller (paulmillr.com) 1750The library paulmillr-qr is dual-licensed under the Apache 2.0 OR MIT license. 1751You can select a license of your choice. 1752Licensed under the Apache License, Version 2.0 (the "License"); 1753you may not use this file except in compliance with the License. 1754You may obtain a copy of the License at 1755 1756 http://www.apache.org/licenses/LICENSE-2.0 1757 1758Unless required by applicable law or agreed to in writing, softw
1758are 1759distributed under the License is distributed on an "AS IS" BASIS, 1760WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1761See the License for the specific language governing permissions and 1762limitations under the License. 1763*/const Um={newline:10,reset:27};function ote(t){if(!Number.isSafeInteger(t))throw new Error(`integer expected: ${t}`)}function ate(t){if(!Number.isSafeInteger(t)||t<1||t>40)throw new Error(`Invalid version=${t}. Expected number [1..40]`)}function Nu(t,e){return t.toString(2).padStart(e,"0")}function vR(t,e){const n=t%e;return n>=0?n:e+n}function ki(t,e){return new Array(t).fill(e)}function AR(...t){let e=0;for(const r of t)e=Math.max(e,r.length);const n=[];for(let r=0;r<e;r++)for(const i of t)r>=i.length||n.push(i[r]);return new Uint8Array(n)}function ER(t,e,n){if(n<0||n+e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[n+r])return!1;return!0}function cte(){let t,e=1/0;return{add(n,r){n>=e||(t=r,e=n)},get:()=>t,score:()=>e}}function xR(t){return{has:e=>t.includes(e),decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=t.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${t}`);return r})},encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(n=>{if(ote(n),n<0||n>=t.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${t.length})`);return t[n]})}}}class Ri{constructor(e,n){ae(this,"data");ae(this,"height");ae(this,"width");const{height:r,width:i}=Ri.size(e);this.data=n||Array.from({length:r},()=>ki(i,void 0)),this.height=r,this.width=i}static size(e,n){if(typeof e=="number"&&(e={height:e,width:e}),!Number.isSafeInteger(e.height)&&e.height!==1/0)throw new Error(`Bitmap: invalid height=${e.height} (${typeof e.height})`);if(!Number.isSafeInteger(e.width)&&e.width!==1/0)throw new Error(`Bitmap: invalid width=${e.width} (${typeof e.width})`);return n!==void 0&&(e={width:Math.min(e.width,n.width),height:Math.min(e.height,n.height)}),e}static fromString(e){e=e.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=e.split(String.fromCharCode(Um.newline)),r=n.length,i=new Array(r);let s;for(const a of n){const l=a.split("").map(u=>{if(u==="X")return!0;if(u===" ")return!1;if(u!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${u}`)});if(s&&l.length!==s)throw new Error(`Bitmap.fromString different row sizes: width=${s} cur=${l.length}`);s=l.length,i.push(l)}return s||(s=0),new Ri({height:r,width:s},i)}point(e){return this.data[e.y][e.x]}isInside(e){return 0<=e.x&&e.x<this.width&&0<=e.y&&e.y<this.height}size(e){if(!e)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(e);return{height:this.height-r,width:this.width-n}}xy(e){if(typeof e=="number"&&(e={x:e,y:e}),!Number.isSafeInteger(e.x))throw new Error(`Bitmap: invalid x=${e.x}`);if(!Number.isSafeInteger(e.y))throw new Error(`Bitmap: invalid y=${e.y}`);return e.x=vR(e.x,this.width),e.y=vR(e.y,this.height),e}rect(e,n,r){const{x:i,y:s}=this.xy(e),{height:a,width:l}=Ri.size(n,this.size({x:i,y:s}));for(let u=0;u<a;u++)for(let d=0;d<l;d++)this.data[s+u][i+d]=typeof r=="function"?r({x:d,y:u},this.data[s+u][i+d]):r;return this}rectRead(e,n,r){return this.rect(e,n,(i,s)=>(r(i,s),s))}hLine(e,n,r){return this.rect(e,{width:n,height:1},r)}vLine(e,n,r){return this.rect(e,{width:1,height:n},r)}border(e=2,n){const r=this.height+2*e,i=this.width+2*e,s=ki(e,n),a=Array.from({length:e},()=>ki(i,n));return new Ri({height:r,width:i},[...a,...this.data.map(l=>[...s,...l,...s]),...a])}embed(e,n){return this.rect(e,n.size(),({x:r,y:i})=>n.data[i][r])}rectSlice(e,n=this.size()){const r=new Ri(Ri.size(n,this.size(this.xy(e))));return this.rect(e,n,({x:i,y:s},a)=>r.data[s][i]=a),r}inverse(){const{height:e,width:n}=this;return new Ri({height:n,width:e}).rect({x:0,y:0},1/0,({x:i,y:s})=>this.data[i][s])}scale(e){if(!Number.isSafeInteger(e)||e>1024)throw new Error(`invalid scale factor: ${e}`);const{height:n,width:r}=this;return new Ri({height:e*n,width:e*r}).rect({x:0,y:0},1/0,({x:s,y:a})=>this.data[Math.floor(a/e)][Math.floor(s/e)])}clone(){return new Ri(this.size()).rect({x:0,y:0},this.size(),({x:n,y:r})=>this.data[r][n])}
1763assertDrawn(){this.rectRead(0,1/0,(e,n)=>{if(typeof n!="boolean")throw new Error(`Invalid color type=${typeof n}`)})}toString(){return this.data.map(e=>e.map(n=>n===void 0?"?":n?"X":" ").join("")).join(String.fromCharCode(Um.newline))}toASCII(){const{height:e,width:n,data:r}=this;let i="";for(let s=0;s<e;s+=2){for(let a=0;a<n;a++){const l=r[s][a],u=s+1>=e?!0:r[s+1][a];!l&&!u?i+="â":!l&&u?i+="â":l&&!u?i+="â":l&&u&&(i+=" ")}i+=String.fromCharCode(Um.newline)}return i}toTerm(){const e=String.fromCharCode(Um.reset),n=e+"[0m",r=e+"[1;47m "+n,i=e+"[40m "+n;return this.data.map(s=>s.map(a=>a?i:r).join("")).join(String.fromCharCode(Um.newline))}toSVG(e=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",i;return this.rectRead(0,1/0,(s,a)=>{if(!a)return;const{x:l,y:u}=s;if(!e){n+=`<rect x="${l}" y="${u}" width="1" height="1" />`;return}let d=`M${l} ${u}`;if(i){const m=`m${l-i.x} ${u-i.y}`;m.length<=d.length&&(d=m)}const h=l<10?`H${l}`:"h-1";r+=`${d}h1v1${h}Z`,i=s}),e&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const e=l=>[l&255,l>>>8&255],n=[...e(this.width),...e(this.height)],r=[];this.rectRead(0,1/0,(l,u)=>r.push(+(u===!0)));const i=126,s=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...ki(381,0),44,0,0,0,0,...n,0,7],a=Math.floor(r.length/i);for(let l=0;l<a;l++)s.push(i+1,128,...r.slice(i*l,i*(l+1)).map(u=>+u));return s.push(r.length%i+1,128,...r.slice(a*i).map(l=>+l)),s.push(1,129,0,59),new Uint8Array(s)}toImage(e=!1){const{height:n,width:r}=this.size(),i=new Uint8Array(n*r*(e?3:4));let s=0;for(let a=0;a<n;a++)for(let l=0;l<r;l++){const u=this.data[a][l]?0:255;i[s++]=u,i[s++]=u,i[s++]=u,e||(i[s++]=255)}return{height:n,width:r,data:i}}}const CR=["low","medium","quartile","high"],_R=["numeric","alphanumeric","byte","kanji","eci"],lte=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],ute={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},fte={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},Tr={size:{encode:t=>21+4*(t-1),decode:t=>(t-17)/4},sizeType:t=>Math.floor((t+7)/17),alignmentPatterns(t){if(t===1)return[];const e=6,n=Tr.size.encode(t)-e-1,r=n-e,i=Math.ceil(r/28);let s=Math.floor(r/i);s%2?s+=1:r%i*2>=i&&(s+=2);const a=[e];for(let l=1;l<i;l++)a.push(n-(i-l)*s);return a.push(n),a},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(t,e){const n=Tr.ECCode[t]<<3|e;let r=n;for(let i=0;i<10;i++)r=r<<1^(r>>9)*1335;return(n<<10|r)^Tr.formatMask},versionBits(t){let e=t;for(let n=0;n<12;n++)e=e<<1^(e>>11)*7973;return t<<12|e},alphabet:{numeric:xR("0123456789"),alphanumerc:xR("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(t,e){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[e][Tr.sizeType(t)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(t,e){const n=lte[t-1],r=ute[e][t-1],i=fte[e][t-1],s=Math.floor(n/i)-r,a=i-n%i;return{words:r,numBlocks:i,shortBlocks:a,blockLen:s,capacity:(n-r*i)*8,total:(r+s)*i+i-a}}},P2=[(t,e)=>(t+e)%2==0,(t,e)=>e%2==0,(t,e)=>t%3==0,(t,e)=>(t+e)%3==0,(t,e)=>(Math.floor(e/2)+Math.floor(t/3))%2==0,(t,e)=>t*e%2+t*e%3==0,(t,e)=>(t*e%2+t*e%3)%2==0,(t,e)=>((t+e)%2+t*e%3)%2==0],Oe={tables:(t=>{const e=ki(256,0),n=ki(256,0);for(let r=0,i=1;r<256;r++)e[r]=i,n[i]=r,i<<=1,i&256&&(i^=t);return{exp:e,log:n}})(285),exp:t=>Oe.tables.exp[t],log(t){if(t===0)throw new Error(`GF.log: invalid arg=${t}`);return Oe.tables.log[t]%255},mul(t,e){return t===0||e===0?0:Oe.tables.exp[(Oe.tables.log[t]+Oe.tables.log[e])%255]},add:(t,e)=>t^e,pow:(t,e)=>Oe.tables.exp[Oe.tables.log[t]*e%255],inv(t){if(t===0)throw new Error(`GF.inverse: invalid arg=${t}`);return Oe.tables.exp[255-Oe.tables.log[t]]},polynomial(t){if(t.length==0)throw new Error("GF.polymomial: invalid length");if(t[0]!==0)return t;let e=0;for(;e<t.length-1&&t[e]==0;e++);return t.slice(e)},monomial(t,e){if(t<0)throw new Error(`GF.monomial: invalid degree=${t}`);if(e==0)return[0];let n=ki(t+1,0);return n[0]=e,Oe.polynomial(n)},degree:t=>t.length-1,coefficient:(t,e)=>t[Oe.degree(t)-e],mulPoly(t,e){if(t[0]===0||e[0]===0)return[0];const n=ki(t.length+e.length-1,0);for(let r=0;r<t.length;r++)for(let i=0;i<e.length;i++)n[r+i]=Oe.add(n[r+i],Oe.mul(t[r],e[i]));return Oe.polynomial(n)},mulPolyScalar(t,e){if(e==0)return[0];if(e==1)return t;const n=ki(t.length,0);for(let r=0;r<t.length;r++)n[r]=Oe.mul(t[r],e);return Oe.polynomial(n)},mulPolyMonomial(t,e,n){if(e<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=ki(t.length+e,0);for(let i=0;i<t.length;i++)r[i]=Oe.mul(t[i],n);return Oe.polynomial(r)},addPoly(t,e){if(t[0]===0)return e;if(e[0]===0)return t;let n=t,r=e;n.length>r.length&&([n,r]=[r,n]);let i=ki(r.length,0),s=r.length-n.length,a=r.slice(0,s);for(let l=0;l<a.length;l++)i[l]=a[l];for(let l=s;l<r.length;l++)i[l]=Oe.add(n[l-s],r[l]);return Oe.polynomial(i)},remainderPoly(t,e){const n=Array.from(t);for(let r=0;r<t.length-e.length+1;r++){const i=n[r];if(i!==0)for(let s=1;s<e.length;s++)e[s]!==0&&(n[r+s]=Oe.add(n[r+s],Oe.mul(e[s],i)))}return n.slice(t.length-e.length+1,n.length)},divisorPoly(t){let e=[1];for(let n=0;n<t;n++)e=Oe.mulPoly(e,[1,Oe.pow(2,n)]);return e},evalPoly(t,e){if(e==0)return Oe.coefficient(t,0);let n=t[0];for(let r=1;r<t.length;r++)n=Oe.add(Oe.mul(e,n),t[r]);return n},euclidian(t,e,n){Oe.degree(t)<Oe.degree(e)&&([t,e]=[e,t]);let r=t,i=e,s=[0],a=[1];for(;2*Oe.degree(i)>=n;){let d=r,h=s;if(r=i,s=a,r[0]===0)throw new Error("rLast[0] === 0");i=d;let m=[0];const g=Oe.inv(r[0]);for(;Oe.degree(i)>=Oe.degree(r)&&i[0]!==0;){const w=Oe.degree(i)-Oe.degree(r),A=Oe.mul(i[0],g);m=Oe.addPoly(m,Oe.monomial(w,A)),i=Oe.addPoly(i,Oe.mulPolyMonomial(r,w,A))}if(m=Oe.mulPoly(m,s),a=Oe.addPoly(m,h),Oe.degree(i)>=Oe.degree(r))throw new Error(`Division failed r: ${i}, rLast: ${r}`)}const l=Oe.coefficient(a,0);if(l==0)throw new Error("sigmaTilde(0) was zero");const u=Oe.inv(l);return[Oe.mulPolyScalar(a,u),Oe.mulPolyScalar(i,u)]}};function dte(t){return{encode(e){const n=Oe.divisorPoly(t),r=Array.from(e);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(Oe.remainderPoly(r,n))},decode(e){const n=e.slice(),r=Oe.polynomial(Array.from(e));let i=ki(t,0),s=!1;for(let m=0;m<t;m++){const g=Oe.evalPoly(r,Oe.exp(m));i[i.length-1-m]=g,g!==0&&(s=!0)}if(!s)return n;i=Oe.polynomial(i);const a=Oe.monomial(t,1),[l,u]=Oe.euclidian(a,i,t),d=ki(Oe.degree(l),0);let h=0;for(let m=1;m<256&&h<d.length;
1763m++)Oe.evalPoly(l,m)===0&&(d[h++]=Oe.inv(m));if(h!==d.length)throw new Error("RS.decode: invalid errors number");for(let m=0;m<d.length;m++){const g=n.length-1-Oe.log(d[m]);if(g<0)throw new Error("RS.decode: invalid error location");const w=Oe.inv(d[m]);let A=1;for(let v=0;v<d.length;v++)m!==v&&(A=Oe.mul(A,Oe.add(1,Oe.mul(d[v],w))));n[g]=Oe.add(n[g],Oe.mul(Oe.evalPoly(u,w),Oe.inv(A)))}return n}}}function hte(t,e){const{words:n,shortBlocks:r,numBlocks:i,blockLen:s,total:a}=Tr.capacity(t,e),l=dte(n);return{encode(u){const d=[],h=[];for(let A=0;A<i;A++){const v=A<r,x=s+(v?0:1);d.push(u.subarray(0,x)),h.push(l.encode(u.subarray(0,x))),u=u.subarray(x)}const m=AR(...d),g=AR(...h),w=new Uint8Array(m.length+g.length);return w.set(m),w.set(g,m.length),w},decode(u){if(u.length!==a)throw new Error(`interleave.decode: len(data)=${u.length}, total=${a}`);const d=[];for(let g=0;g<i;g++){const w=g<r;d.push(new Uint8Array(n+s+(w?0:1)))}let h=0;for(let g=0;g<s;g++)for(let w=0;w<i;w++)d[w][g]=u[h++];for(let g=r;g<i;g++)d[g][s]=u[h++];for(let g=s;g<s+n;g++)for(let w=0;w<i;w++){const A=w<r;d[w][g+(A?0:1)]=u[h++]}const m=[];for(const g of d)m.push(...Array.from(l.decode(g)).slice(0,-n));return Uint8Array.from(m)}}}function pte(t,e,n,r=!1){const i=Tr.size.encode(t);let s=new Ri(i+2);const a=new Ri(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);s=s.embed(0,a).embed({x:-a.width,y:0},a).embed({x:0,y:-a.height},a),s=s.rectSlice(1,i);const l=new Ri(1).rect(0,1,!0).border(1,!1).border(1,!0),u=Tr.alignmentPatterns(t);for(const d of u)for(const h of u)s.data[d][h]===void 0&&s.embed({x:h-2,y:d-2},l);s=s.hLine({x:0,y:6},1/0,({x:d},h)=>h===void 0?d%2==0:h).vLine({x:6,y:0},1/0,({y:d},h)=>h===void 0?d%2==0:h);{const d=Tr.formatBits(e,n),h=m=>!r&&(d>>m&1)==1;for(let m=0;m<6;m++)s.data[m][8]=h(m);for(let m=6;m<8;m++)s.data[m+1][8]=h(m);for(let m=8;m<15;m++)s.data[i-15+m][8]=h(m);for(let m=0;m<8;m++)s.data[8][i-m-1]=h(m);for(let m=8;m<9;m++)s.data[8][15-m-1+1]=h(m);for(let m=9;m<15;m++)s.data[8][15-m-1]=h(m);s.data[i-8][8]=!r}if(t>=7){const d=Tr.versionBits(t);for(let h=0;h<18;h+=1){const m=!r&&(d>>h&1)==1,g=Math.floor(h/3),w=h%3+i-8-3;s.data[g][w]=m,s.data[w][g]=m}}return s}function mte(t,e,n){const r=t.height,i=P2[e];let s=-1,a=r-1;for(let l=r-1;l>0;l-=2){for(l==6&&(l=5);;a+=s){for(let u=0;u<2;u+=1){const d=l-u;t.data[a][d]===void 0&&n(d,a,i(d,a))}if(a+s<0||a+s>=r)break}s=-s}}function gte(t){let e="numeric";for(let n of t)if(!Tr.alphabet.numeric.has(n)&&(e="alphanumeric",!Tr.alphabet.alphanumerc.has(n)))return"byte";return e}function yte(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function TR(t,e,n,r){let i="",s=n.length;if(r==="numeric"){const m=Tr.alphabet.numeric.decode(n.split("")),g=m.length;for(let w=0;w<g-2;w+=3)i+=Nu(m[w]*100+m[w+1]*10+m[w+2],10);g%3===1?i+=Nu(m[g-1],4):g%3===2&&(i+=Nu(m[g-2]*10+m[g-1],7))}else if(r==="alphanumeric"){const m=Tr.alphabet.alphanumerc.decode(n.split("")),g=m.length;for(let w=0;w<g-1;w+=2)i+=Nu(m[w]*45+m[w+1],11);g%2==1&&(i+=Nu(m[g-1],6))}else if(r==="byte"){const m=yte(n);s=m.length,i=Array.from(m).map(g=>Nu(g,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:a}=Tr.capacity(t,e),l=Nu(s,Tr.lengthBits(t,r));let u=Tr.modeBits[r]+l+i;if(u.length>a)throw new Error("Capacity overflow");u+="0".repeat(Math.min(4,Math.max(0,a-u.length))),u.length%8&&(u+="0".repeat(8-u.length%8));const d="1110110000010001";for(let m=0;u.length!==a;m++)u+=d[m%d.length];const h=Uint8Array.from(u.match(/(.{8})/g).map(m=>+`0b${m}`));return hte(t,e).encode(h)}function SR(t,e,n,r,i=!1){const s=pte(t,e,r,i);let a=0;const l=8*n.length;if(mte(s,r,(u,d,h)=>{let m=!1;a<l&&(m=(n[a>>>3]>>(7-a&7)&1)!==0,a++),s.data[d][u]=m!==h}),a!==l)throw new Error("QR: bytes left after draw");return s}function bte(t){const e=t.inverse(),n=w=>{let A=0;for(let v=0,x=1,T=void 0;v<w.length;v++)T===w[v]&&(x++,v!==w.length-1)||(x>=5&&(A+=3+(x-5)),T=w[v],x=1);return A};let r=0;t.data.forEach(w=>r+=n(w)),e.data.forEach(w=>r+=n(w));let i=0,s=t.data;const a=t.width-1,l=t.height-1;for(let w=0;w<a;w++)for(let A=0;A<l;A++){const v=w+1,x=A+1;s[w][A]===s[v][A]&&s[v][A]===s[w][x]&&s[v][A]===s[v][x]&&(i+=3)}const u=w=>
1763{const A=[!0,!1,!0,!0,!0,!1,!0],v=[!1,!1,!1,!1],x=[...A,...v],T=[...v,...A];let O=0;for(let k=0;k<w.length;k++)ER(w,x,k)&&(O+=40),ER(w,T,k)&&(O+=40);return O};let d=0;for(const w of t.data)d+=u(w);for(const w of e.data)d+=u(w);let h=0;t.rectRead(0,1/0,(w,A)=>h+=A?1:0);const m=h/(t.height*t.width)*100,g=10*Math.floor(Math.abs(m-50)/5);return r+i+d+g}function wte(t,e,n,r){if(r===void 0){const i=cte();for(let s=0;s<P2.length;s++)i.add(bte(SR(t,e,n,s,!0)),s);r=i.get()}if(r===void 0)throw new Error("Cannot find mask");return SR(t,e,n,r)}function vte(t){if(!CR.includes(t))throw new Error(`Invalid error correction mode=${t}. Expected: ${CR}`)}function Ate(t){if(!_R.includes(t))throw new Error(`Encoding: invalid mode=${t}. Expected: ${_R}`);if(t==="kanji"||t==="eci")throw new Error(`Encoding: ${t} is not supported (yet?).`)}function Ete(t){if(![0,1,2,3,4,5,6,7].includes(t)||!P2[t])throw new Error(`Invalid mask=${t}. Expected number [0..7]`)}function xte(t,e="raw",n={}){const r=n.ecc!==void 0?n.ecc:"medium";vte(r);const i=n.encoding!==void 0?n.encoding:gte(t);Ate(i),n.mask!==void 0&&Ete(n.mask);let s=n.version,a,l=new Error("Unknown error");if(s!==void 0)ate(s),a=TR(s,r,t,i);else for(let h=1;h<=40;h++)try{a=TR(h,r,t,i),s=h;break}catch(m){l=m}if(!s||!a)throw l;let u=wte(s,r,a,n.mask);u.assertDrawn();const d=n.border===void 0?2:n.border;if(!Number.isSafeInteger(d))throw new Error(`invalid border type=${typeof d}`);if(u=u.border(d,!1),n.scale!==void 0&&(u=u.scale(n.scale)),e==="raw")return u.data;if(e==="ascii")return u.toASCII();if(e==="svg")return u.toSVG(n.optimize);if(e==="gif")return u.toGIF();if(e==="term")return u.toTerm();throw new Error(`Unknown output: ${e}`)}function Cte(t,e={}){const{errorCorrection:n,version:r}=e,i=xte(t,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:i.length,finderLength:7,grid:i,value:t}}function ko(t){const{arena:e,...n}=t;return G.jsxs(ko.Root,{...n,children:[G.jsx(ko.Finder,{}),G.jsx(ko.Cells,{}),e&&G.jsx(ko.Arena,{children:typeof e=="string"?G.jsx("img",{alt:"Arena",src:e,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):e})]})}(function(t){t.Context=K.createContext(null);function e(s){const{children:a,size:l="100%",value:u,version:d,...h}=s,m=K.useMemo(()=>(K.Children.map(a,O=>!K.isValidElement(O)||typeof O.type=="string"?null:"displayName"in O.type&&O.type.displayName==="Arena"?!0:null)??[]).some(Boolean),[a]),g=K.useMemo(()=>{let O=s.errorCorrection;return m&&O==="low"&&(O="medium"),Cte(u,{errorCorrection:O,version:d})},[u,m,s.errorCorrection,d]),w=1,A=g.edgeLength*w,v=g.finderLength*w/2,x=m?Math.floor(A/4):0,T=K.useMemo(()=>({arenaSize:x,cellSize:w,edgeSize:A,qrcode:g,finderSize:v}),[x,A,g,v]);return G.jsx(t.Context.Provider,{value:T,children:G.jsxs("svg",{...h,width:l,height:l,viewBox:`0 0 ${A} ${A}`,xmlns:"http://www.w3.org/2000/svg",children:[G.jsx("title",{children:"QR Code"}),a]})})}t.Root=e,(function(s){s.displayName="Root"})(e=t.Root||(t.Root={}));function n(s){const{className:a,fill:l,innerClassName:u,radius:d=.25}=s,{cellSize:h,edgeSize:m,finderSize:g}=K.useContext(t.Context);function w({position:A}){let v=g-(g-h)-h/2;A==="top-right"&&(v=m-g-(g-h)-h/2);let x=g-(g-h)-h/2;A==="bottom-left"&&(x=m-g-(g-h)-h/2);let T=g-h*1.5;A==="top-right"&&(T=m-g-h*1.5);let O=g-h*1.5;return A==="bottom-left"&&(O=m-g-h*1.5),G.jsxs(G.Fragment,{children:[G.jsx("rect",{className:a,stroke:l??"currentColor",fill:"transparent",x:v,y:x,width:h+(g-h)*2,height:h+(g-h)*2,rx:2*d*(g-h),ry:2*d*(g-h),strokeWidth:h}),G.jsx("rect",{className:u,fill:l??"currentColor",x:T,y:O,width:h*3,height:h*3,rx:2*d*h,ry:2*d*h})]})}return G.jsxs(G.Fragment,{children:[G.jsx(w,{position:"top-left"}),G.jsx(w,{position:"top-right"}),G.jsx(w,{position:"bottom-left"})]})}t.Finder=n,(function(s){s.displayName="Finder"})(n=t.Finder||(t.Finder={}));function r(s){const{className:a,fill:l="currentColor",inset:u=!0,radius:d=1}=s,{arenaSize:h,cellSize:m,qrcode:g}=K.useContext(t.Context),{edgeLength:w,finderLength:A}=g,v=K.useMemo(()=>{let x="";for(let T=0;T<g.grid.length;T++){const O=g.grid[T];if(O)for(let k=0;k<O.length;k++){if(!O[k])continue;const B=w/2-h/2,U=B+h;if(T>=B&&T<=U&&k>=B&&k<=U)continue;const I=T<A&&k<A,R=T<A&&k>=w-A,M=T>=w-A&&k<A;if(I||R||M)continue;const F=u?m*.1:0,j=(m-F*2)/2,q=k*m+m/2,L=T*m+m/2,Se=q-j,X=q+j,Q=L-j,te=L+j,J=d*j;x+=[`M ${Se+J},${Q}`,`L ${X-J},${Q}`,`A ${J},${J} 0 0,1 ${X},${Q+J}`,`L ${X},${te-J}`,`A ${J},${J} 0 0,1 ${X-J},${te}`,`L ${Se+J},${te}`,`A ${J},${J} 0 0,1 ${Se},${te-J}`,`L ${Se},${Q+J}`,`A ${J},${J} 0 0,1 ${Se+J},${Q}`,"z"].join(" ")}}return x},[h,m,w,A,g.grid,u,d]);return G.jsx("path",{className:a,d:v,fill:l})}t.Cells=r,(function(s){s.displayName="Cells"})(r=t.Cells||(t.Cells={}));function i(s){const{children:a}=s,{arenaSize:l,cellSize:u,edgeSize:d}=K.useContext(t.Context),h=Math.ceil(d/2-l/2),m=l+l%2,g=u/2;return G.jsx("foreignObject",{x:h,y:h,width:m,height:m,children:G.jsx("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",
1763width:"100%",padding:g,boxSizing:"border-box"},children:a})})}t.Arena=i,(function(s){s.displayName="Arena"})(i=t.Arena||(t.Arena={}))})(ko||(ko={}));Jv.type="coinbaseWallet";function Jv(t={}){return t.version==="3"||t.headlessMode?Tte(t):_te(t)}function _te(t){let e,n,r,i;return s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:Jv.type,async connect({chainId:a,...l}={}){try{const u=await this.getProvider(),d=(await u.request({method:"eth_requestAccounts",params:"instantOnboarding"in l&&l.instantOnboarding?[{onboarding:"instant"}]:[]})).map(m=>_n(m));n||(n=this.onAccountsChanged.bind(this),u.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),u.on("chainChanged",r)),i||(i=this.onDisconnect.bind(this),u.on("disconnect",i));let h=await this.getChainId();if(a&&h!==a){const m=await this.switchChain({chainId:a}).catch(g=>{if(g.code===Nt.code)throw g;return{id:h}});h=(m==null?void 0:m.id)??h}return{accounts:d,chainId:h}}catch(u){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(u.message)?new Nt(u):u}},async disconnect(){var l;const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),r&&(a.removeListener("chainChanged",r),r=void 0),i&&(a.removeListener("disconnect",i),i=void 0),a.disconnect(),(l=a.close)==null||l.call(a)},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(l=>_n(l))},async getChainId(){const l=await(await this.getProvider()).request({method:"eth_chainId"});return Number(l)}
1763,async getProvider(){if(!e){const a=(()=>{var d;return typeof t.preference=="string"?{options:t.preference}:{...t.preference,options:((d=t.preference)==null?void 0:d.options)??"all"}})(),{createCoinbaseWalletSDK:l}=await Te(async()=>{const{createCoinbaseWalletSDK:d}=await import("./index-CrV_gTjm.js");return{createCoinbaseWalletSDK:d}},__vite__mapDeps([0,1]));e=l({...t,appChainIds:s.chains.map(d=>d.id),preference:a}).getProvider()}return e},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:l}){var h,m,g,w;const u=s.chains.find(A=>A.id===l);if(!u)throw new $r(new Ll);const d=await this.getProvider();try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:Ue(u.id)}]}),u}catch(A){if(A.code===4902)try{let v;a!=null&&a.blockExplorerUrls?v=a.blockExplorerUrls:v=(h=u.blockExplorers)!=null&&h.default.url?[(m=u.blockExplorers)==null?void 0:m.default.url]:[];let x;(g=a==null?void 0:a.rpcUrls)!=null&&g.length?x=a.rpcUrls:x=[((w=u.rpcUrls.default)==null?void 0:w.http[0])??""];const T={blockExplorerUrls:v,chainId:Ue(l),chainName:(a==null?void 0:a.chainName)??u.name,iconUrls:a==null?void 0:a.iconUrls,nativeCurrency:(a==null?void 0:a.nativeCurrency)??u.nativeCurrency,rpcUrls:x};return await d.request({method:"wallet_addEthereumChain",params:[T]}),u}catch(v){throw new Nt(v)}throw new $r(A)}},onAccountsChanged(a){a.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:a.map(l=>_n(l))})},onChainChanged(a){const l=Number(a);s.emitter.emit("change",{chainId:l})},async onDisconnect(a){s.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),r&&(l.removeListener("chainChanged",r),r=void 0),i&&(l.removeListener("disconnect",i),i=void 0)}})}function Tte(t){let n,r,i,s,a;return l=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:Jv.type,async connect({chainId:u}={}){try{const d=await this.getProvider(),h=(await d.request({method:"eth_requestAccounts"})).map(g=>_n(g));i||(i=this.onAccountsChanged.bind(this),d.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a));let m=await this.getChainId();if(u&&m!==u){const g=await this.switchChain({chainId:u}).catch(w=>{if(w.code===Nt.code)throw w;return{id:m}});m=(g==null?void 0:g.id)??m}return{accounts:h,chainId:m}}catch(d){throw/(user closed modal|accounts received is empty|user denied account)/i.test(d.message)?new Nt(d):d}},async disconnect(){const u=await this.getProvider();i&&(u.removeListener("accountsChanged",i),i=void 0),s&&(u.removeListener("chainChanged",s),s=void 0),a&&(u.removeListener("disconnect",a),a=void 0),u.disconnect(),u.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(d=>_n(d))},async getChainId(){const d=await(await this.getProvider()).request({method:"eth_chainId"});return Number(d)},async getProvider(){var u;if(!r){const d=await(async()=>{const{default:A}=await Te(async()=>{const{default:v}=await import("./index-DM7BmEUP.js").then(x=>x.i);return{default:v}},__vite__mapDeps([2,1,3,4]));return typeof A!="function"&&typeof A.default=="function"?A.default:A})();n=new d({...t,reloadOnDisconnect:!1});const h=(u=n.walletExtension)==null?void 0:u.getChainId(),m=l.chains.find(A=>t.chainId?A.id===t.chainId:A.id===h)||l.chains[0],g=t.chainId||(m==null?void 0:m.id),w=t.jsonRpcUrl||(m==null?void 0:m.rpcUrls.default.http[0]);r=n.makeWeb3Provider(w,g)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:d}){var g,w,A,v;const h=l.chains.find(x=>x.id===d);if(!h)throw new $r(new Ll);const m=await this.getProvider();try{return await m.request({method:"wallet_switchEthereumChain",params:[{chainId:Ue(h.id)}]}),h}catch(x){if(x.code===4902)try{let T;u!=null&&u.blockExplorerUrls?T=u.blockExplorerUrls:T=(g=h.blockExplorers)!=null&&g.default.url?[(w=h.blockExplorers)==null?void 0:w.default.url]:[];let O;(A=u==null?void 0:u.rpcUrls)!=null&&A.length?O=u.rpcUrls:O=[((v=h.rpcUrls.default)==null?void 0:v.http[0])??""];const k={blockExplorerUrls:T,chainId:Ue(d),chainName:(u==null?void 0:u.chainName)??h.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??h.nativeCurrency,rpcUrls:O};return await m.request({method:"wallet_addEthereumChain",params:[k]}),h}catch(T){throw new Nt(T)}throw new $r(x)}},onAccountsChanged(u){u.length===0?this.onDisconnect():l.emitter.emit("change",{accounts:u.map(d=>_n(d))})},onChainChanged(u){const d=Number(u);l.emitter.emit("change",{chainId:d})},async onDisconnect(u){l.emitter.emit("disconnect");const d=await this.getProvider();i&&(d.removeListener("accountsChanged",i),i=void 0),s&&(d.removeListener("chainChanged",s),s=void 0),a&&(d.removeListener("disconnect",a),a=void 0)}})}D2.type="metaMask";function D2(t={}){let e,n,r,i,s,a,l,u;return d=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:D2.type,async setup(){const h=await this.getProvider();h!=null&&h.on&&(a||(a=this.onConnect.bind(this),h.on("connect",a)),i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)))},async connect({chainId:h,isReconnecting:m}={}){const g=await this.getProvider();l||(l=this.onDisplayUri,g.on("display_uri",l));let w=[];m&&(w=await this.getAccounts().catch(()=>[]));try{let A,v;w!=null&&w.length||(t.connectAndSign||t.connectWith?(t.connectAndSign?A=await e.connectAndSign({msg:t.connectAndSign}):t.connectWith&&(v=await e.connectWith({method:t.connectWith.method,params:t.connectWith.params})),w=await this.getAccounts()):w=(await e.connect()).map(O=>_n(O)));let x=await this.getChainId();if(h&&x!==h){const T=await this.switchChain({chainId:h}).catch(O=>{if(O.code===Nt.code)throw O;return{id:x}});x=(T==null?void 0:T.id)??x}return l&&(g.removeListener("display_uri",l),l=void 0),A?g.emit("connectAndSign",{accounts:w,chainId:x,signResponse:A}):v&&g.emit("connectWith",{accounts:w,chainId:x,connectWithResponse:v}),a&&(g.removeListener("connect",a),a=void 0),i||(i=this.onAccountsChanged.bind(this),g.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),u||(u=this.onDisconnect.bind(this),g.on("disconnect",u)),{accounts:w,chainId:x}}catch(A){const v=A;throw v.code===Nt.code?new Nt(v):v.code===Oo.code?new Oo(v):v}},async disconnect(){const h=await this.getProvider();s&&(h.removeListener("chainChanged",s),s=void 0),u&&(h.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),h.on("connect",a)),await e.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(g=>_n(g))},async getChainId(){const h=await this.getProvider(),m=h.getChainId()||await(h==null?void 0:h.request({method:"eth_chainId"}));return Number(m)},async getProvider(){async function h(){var v,x,T,O,k;const m=await(async()=>{const{default:P}=await Te(async()=>{const{default:B}=await import("./metamask-sdk-L1y2F8t1.js");return{default:B}},__vite__mapDeps([5,4]));return typeof P!="function"&&typeof P.default=="function"?P.default:P})(),g={};for(const P of d.chains)g[Ue(P.id)]=(v=sP({chain:P,transports:d.transports}))==null?void 0:v[0];e=new m({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...t,readonlyRPCMap:g,dappMetadata:{...t.dappMetadata,name:(x=t.dappMetadata)!=null&&x.name?(T=t.dappMetadata)==null?void 0:T.name:"wagmi",url:(O=t.dappMetadata)!=null&&O.url?(k=t.dappMetadata)==null?void 0:k.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:t.useDeeplink??!0});
1763const w=await e.init(),A=w!=null&&w.activeProvider?w.activeProvider:e.getProvider();if(!A)throw new Ni;return A}return n||(r||(r=h()),n=await r),n},async isAuthorized(){try{return!!(await $p(()=>jv(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:h,chainId:m}){var x,T;const g=await this.getProvider(),w=d.chains.find(O=>O.id===m);if(!w)throw new $r(new Ll);try{return await g.request({method:"wallet_switchEthereumChain",params:[{chainId:Ue(m)}]}),await A(),await v(m),w}catch(O){const k=O;if(k.code===Nt.code)throw new Nt(k);if(k.code===4902||((T=(x=k==null?void 0:k.data)==null?void 0:x.originalError)==null?void 0:T.code)===4902)try{return await g.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:P,...B}=w.blockExplorers??{};if(h!=null&&h.blockExplorerUrls)return h.blockExplorerUrls;if(P)return[P.url,...Object.values(B).map(U=>U.url)]})(),chainId:Ue(m),chainName:(h==null?void 0:h.chainName)??w.name,iconUrls:h==null?void 0:h.iconUrls,nativeCurrency:(h==null?void 0:h.nativeCurrency)??w.nativeCurrency,rpcUrls:(()=>{var P,B;return(P=h==null?void 0:h.rpcUrls)!=null&&P.length?h.rpcUrls:[((B=w.rpcUrls.default)==null?void 0:B.http[0])??""]})()}]}),await A(),await v(m),w}catch(P){const B=P;throw B.code===Nt.code?new Nt(B):new $r(B)}throw new $r(k)}async function A(){await $p(async()=>{const O=zo(await g.request({method:"eth_chainId"}));if(O!==m)throw new Error("User rejected switch after adding network.");return O},{delay:50,retryCount:20})}async function v(O){await new Promise(k=>{const P=(B=>{"chainId"in B&&B.chainId===O&&(d.emitter.off("change",P),k())});d.emitter.on("change",P),d.emitter.emit("change",{chainId:O})})}},async onAccountsChanged(h){if(h.length===0)if(e.isExtensionActive())this.onDisconnect();else return;else if(d.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m})}else d.emitter.emit("change",{accounts:h.map(m=>_n(m))})},onChainChanged(h){const m=Number(h);d.emitter.emit("change",{chainId:m})},async onConnect(h){const m=await this.getAccounts();if(m.length===0)return;const g=Number(h.chainId);d.emitter.emit("connect",{accounts:m,chainId:g});const w=await this.getProvider();a&&(w.removeListener("connect",a),a=void 0),i||(i=this.onAccountsChanged.bind(this),w.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),w.on("chainChanged",s)),u||(u=this.onDisconnect.bind(this),w.on("disconnect",u))},async onDisconnect(h){const m=await this.getProvider();h&&h.code===1013&&m&&(await this.getAccounts()).length||(d.emitter.emit("disconnect"),s&&(m.removeListener("chainChanged",s),s=void 0),u&&(m.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),m.on("connect",a)))},onDisplayUri(h){d.emitter.emit("message",{type:"display_uri",data:h})}})}M2.type="safe";function M2(t={}){const{shimDisconnect:e=!1}=t;let n,r;return i=>({id:"safe",name:"Safe",type:M2.type,async connect(){var u;const s=await this.getProvider();if(!s)throw new Ni;const a=await this.getAccounts(),l=await this.getChainId();return r||(r=this.onDisconnect.bind(this),s.on("disconnect",r)),e&&await((u=i.storage)==null?void 0:u.removeItem("safe.disconnected")),{accounts:a,chainId:l}},async disconnect(){var a;const s=await this.getProvider();if(!s)throw new Ni;r&&(s.removeListener("disconnect",r),r=void 0),e&&await((a=i.storage)==null?void 0:a.setItem("safe.disconnected",!0))},async getAccounts(){const s=await this.getProvider();if(!s)throw new Ni;return(await s.request({method:"eth_accounts"})).map(_n)}
1763,async getProvider(){if(typeof window<"u"&&(window==null?void 0:window.parent)!==window){if(!n){const{default:a}=await Te(async()=>{const{default:h}=await import("./index-DaLGzWHy.js");return{default:h}},__vite__mapDeps([6,7])),l=new a(t),u=await jv(()=>l.safe.getInfo(),{timeout:t.unstable_getInfoTimeout??10});if(!u)throw new Error("Could not load Safe information");const d=await(async()=>{const h=await Te(()=>import("./index-BcMcxWVe.js").then(m=>m.i),__vite__mapDeps([8,7,3]));return typeof h.SafeAppProvider!="function"&&typeof h.default.SafeAppProvider=="function"?h.default.SafeAppProvider:h.SafeAppProvider})();n=new d(u,l)}return n}},async getChainId(){const s=await this.getProvider();if(!s)throw new Ni;return Number(s.chainId)},async isAuthorized(){var s;try{return e&&await((s=i.storage)==null?void 0:s.getItem("safe.disconnected"))?!1:!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){i.emitter.emit("disconnect")}})}j2.type="walletConnect";function j2(t){const e=t.isNewChainsStale??!0;let n,r;const i="eip155";let s,a,l,u,d,h;return m=>({id:"walletConnect",name:"WalletConnect",type:j2.type,async setup(){const g=await this.getProvider().catch(()=>null);g&&(l||(l=this.onConnect.bind(this),g.on("connect",l)),d||(d=this.onSessionDelete.bind(this),g.on("session_delete",d)))},async connect({chainId:g,...w}={}){var A,v;try{const x=await this.getProvider();if(!x)throw new Ni;u||(u=this.onDisplayUri,x.on("display_uri",u));let T=g;if(!T){const B=await((A=m.storage)==null?void 0:A.getItem("state"))??{};m.chains.some(I=>I.id===B.chainId)?T=B.chainId:T=(v=m.chains[0])==null?void 0:v.id}if(!T)throw new Error("No chains found on connector.");const O=await this.isChainsStale();if(x.session&&O&&await x.disconnect(),!x.session||O){const B=m.chains.filter(U=>U.id!==T).map(U=>U.id);await x.connect({optionalChains:[T,...B],..."pairingTopic"in w?{pairingTopic:w.pairingTopic}:{}}),this.setRequestedChainsIds(m.chains.map(U=>U.id))}const k=(await x.enable()).map(B=>_n(B)),P=await this.getChainId();return u&&(x.removeListener("display_uri",u),u=void 0),l&&(x.removeListener("connect",l),l=void 0),s||(s=this.onAccountsChanged.bind(this),x.on("accountsChanged",s)),a||(a=this.onChainChanged.bind(this),x.on("chainChanged",a)),h||(h=this.onDisconnect.bind(this),x.on("disconnect",h)),d||(d=this.onSessionDelete.bind(this),x.on("session_delete",d)),{accounts:k,chainId:P}}catch(x){throw/(user rejected|connection request reset)/i.test(x==null?void 0:x.message)?new Nt(x):x}},async disconnect(){const g=await this.getProvider();try{await(g==null?void 0:g.disconnect())}catch(w){if(!/No matching key/i.test(w.message))throw w}finally{a&&(g==null||g.removeListener("chainChanged",a),a=void 0),h&&(g==null||g.removeListener("disconnect",h),h=void 0),l||(l=this.onConnect.bind(this),g==null||g.on("connect",l)),s&&(g==null||g.removeListener("accountsChanged",s),s=void 0),d&&(g==null||g.removeListener("session_delete",d),d=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(w=>_n(w))},async getProvider({chainId:g}={}){var A;async function w(){const v=m.chains.map(T=>T.id);if(!v.length)return;const{EthereumProvider:x}=await Te(async()=>{const{EthereumProvider:T}=await import("./index.es-hYxG9yXT.js").then(O=>O.a1);return{EthereumProvider:T}},__vite__mapDeps([9,3]));return await x.init({...t,disableProviderPing:!0,optionalChains:v,projectId:t.projectId,rpcMap:Object.fromEntries(m.chains.map(T=>{const[O]=sP({chain:T,transports:m.transports});return[T.id,O]})),showQrModal:t.showQrModal??!0})}return n||(r||(r=w()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),g&&await((A=this.switchChain)==null?void 0:A.call(this,{chainId:g})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[g,w]=await Promise.all([this.getAccounts(),this.getProvider()]);return g.length?await this.isChainsStale()&&w.session?(await w.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:g,chainId:w}){var x,T,O;const A=await this.getProvider();if(!A)throw new Ni;const v=m.chains.find(k=>k.id===w);if(!v)throw new $r(new Ll);try{await Promise.all([new Promise(P=>{const B=({chainId:U})=>{U===w&&(m.emitter.off("change",B),P())};m.emitter.on("change",B)}),A.request({method:"wallet_switchEthereumChain",params:[{chainId:Ue(w)}]})]);const k=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...k,w]),v}catch(k){const P=k;
1763if(/(user rejected)/i.test(P.message))throw new Nt(P);try{let B;g!=null&&g.blockExplorerUrls?B=g.blockExplorerUrls:B=(x=v.blockExplorers)!=null&&x.default.url?[(T=v.blockExplorers)==null?void 0:T.default.url]:[];let U;(O=g==null?void 0:g.rpcUrls)!=null&&O.length?U=g.rpcUrls:U=[...v.rpcUrls.default.http];const I={blockExplorerUrls:B,chainId:Ue(w),chainName:(g==null?void 0:g.chainName)??v.name,iconUrls:g==null?void 0:g.iconUrls,nativeCurrency:(g==null?void 0:g.nativeCurrency)??v.nativeCurrency,rpcUrls:U};await A.request({method:"wallet_addEthereumChain",params:[I]});const R=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...R,w]),v}catch(B){throw new Nt(B)}}},onAccountsChanged(g){g.length===0?this.onDisconnect():m.emitter.emit("change",{accounts:g.map(w=>_n(w))})},onChainChanged(g){const w=Number(g);m.emitter.emit("change",{chainId:w})},async onConnect(g){const w=Number(g.chainId),A=await this.getAccounts();m.emitter.emit("connect",{accounts:A,chainId:w})},async onDisconnect(g){this.setRequestedChainsIds([]),m.emitter.emit("disconnect");const w=await this.getProvider();s&&(w.removeListener("accountsChanged",s),s=void 0),a&&(w.removeListener("chainChanged",a),a=void 0),h&&(w.removeListener("disconnect",h),h=void 0),d&&(w.removeListener("session_delete",d),d=void 0),l||(l=this.onConnect.bind(this),w.on("connect",l))},onDisplayUri(g){m.emitter.emit("message",{type:"display_uri",data:g})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var w,A,v;return n?((v=(A=(w=n.session)==null?void 0:w.namespaces[i])==null?void 0:A.accounts)==null?void 0:v.map(x=>Number.parseInt(x.split(":")[1]||"")))??[]:[]},async getRequestedChainsIds(){var g;return await((g=m.storage)==null?void 0:g.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!e)return!1;const g=m.chains.map(v=>v.id),w=this.getNamespaceChainsIds();if(w.length&&!w.some(v=>g.includes(v)))return!1;const A=await this.getRequestedChainsIds();return!g.every(v=>A.includes(v))},async setRequestedChainsIds(g){var w;await((w=m.storage)==null?void 0:w.setItem(this.requestedChainsStorageKey,g))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}var Mw={},Ste=768,ih=Jz({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),vD=iN({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Sx=rH({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"}
1763,downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"}
1763,menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"}
1763,menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}
1763},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),IR={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackgroun
1763d:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},Ite={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},Rte="_12cbo8i3 ju367v8r",kte={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function In({active:t,hover:e}){return[Rte,e&&kte[e],Ite[t]]}var AD=K.createContext(null);function Nte(){const{adapter:t}=K.useContext(AD)??{};if(!t)throw new Error("No authentication adapter found");return t}function Xv(){const t=K.useContext(AD);return(t==null?void 0:t.status)??null}function L2(){const t=Xv(),{isConnected:e}=gr();return e?t&&(t==="loading"||t==="unauthenticated")?t:"connected":"disconnected"}function ED(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function Ote(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function Bte(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function y0(){return Ote()||Bte()}function Rn(){return ED()||y0()}var Pte="iekbcc0",Dte={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},Mte=({reset:t,...e})=>{if(!t)return Sx(e);const n=Dte[t],r=Sx(e);return TP(Pte,n,r)},W=S.forwardRef(({as:t="div",className:e,testId:n,...r},i)=>{const s={},a={};for(const u in r)Sx.properties.has(u)?s[u]=r[u]:a[u]=r[u];const l=Mte({reset:typeof t=="string"?t:"div",...s});return S.createElement(t,{className:TP(l,e),...a,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:i})});W.displayName="Box";var xD=new Map,S3=new Map;async function CD(t){const e=S3.get(t);if(e)return e;const n=async()=>t().then(async i=>(xD.set(t,i),i)),r=n().catch(i=>n().catch(s=>{S3.delete(t)}));return S3.set(t,r),r}async function qo(...t){return await Promise.all(t.map(e=>typeof e=="function"?CD(e):e))}function jte(){const[,t]=K.useReducer(e=>e+1,0);return t}function Zv(t){const e=typeof t=="function"?xD.get(t):void 0,n=jte();return K.useEffect(()=>{typeof t=="function"&&!e&&CD(t).then(n)},[t,e,n]),typeof t=="function"?e:t}function tr({alt:t,background:e,borderColor:n,borderRadius:r,useAsImage:i,boxShadow:s,height:a,src:l,width:u,testId:d}){const h=y0(),m=Zv(l),g=m&&/^http/.test(m),[w,A]=K.useReducer(()=>!0,!1);return S.createElement(W,{"aria-label":t,borderRadius:r,boxShadow:s,height:typeof a=="str
1763ing"?a:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:e,height:typeof a=="number"?a:void 0,width:typeof u=="number"?u:void 0},width:typeof u=="string"?u:void 0,testId:d},S.createElement(W,{...g?{"aria-hidden":!0,as:"img",onLoad:A,src:m}:{"aria-hidden":!0,as:"img",src:m},height:"full",position:"absolute",...h?{WebkitUserSelect:"none"}:{},style:{WebkitTouchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...!i&&g?{opacity:w?1:0}:{}},width:"full"}),n?S.createElement(W,{...typeof n=="object"&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var Lte="_1luule42",Ute="_1luule43",Fte=t=>K.useMemo(()=>`${t}_${Math.round(Math.random()*1e9)}`,[t]),zg=({height:t=21,width:e=21})=>{const n=Fte("spinner");return S.createElement("svg",{className:Lte,fill:"none",height:t,viewBox:"0 0 21 21",width:e,xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Loading"),S.createElement("clipPath",{id:n},S.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),S.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},S.createElement("div",{className:Ute})))},yt=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],RR=[{color:yt[0],emoji:"ð¶"},{color:yt[1],emoji:"ð¤"},{color:yt[2],emoji:"ð"},{color:yt[3],emoji:"ð«"},{color:yt[4],emoji:"ð³"},{color:yt[0],emoji:"ð¤¶"},{color:yt[5],emoji:"ð²"},{color:yt[6],emoji:"ð"},{color:yt[7],emoji:"ð"},{color:yt[8],emoji:"ðµ"},{color:yt[9],emoji:"ð¦"},{color:yt[10],emoji:"ð¼"},{color:yt[11],emoji:"ð¦"},{color:yt[12],emoji:"ð·"},{color:yt[13],emoji:"ð§"},{color:yt[8],emoji:"ð¦©"},{color:yt[14],emoji:"ð½"},{color:yt[0],emoji:"ð"},{color:yt[8],emoji:"ð"},{color:yt[1],emoji:"ð"},{color:yt[15],emoji:"ð²"},{color:yt[16],emoji:"ð"},{color:yt[17],emoji:"ð"},{color:yt[18],emoji:"ð"},{color:yt[19],emoji:"ð£"},{color:yt[1],emoji:"ð¥"},{color:yt[20],emoji:"ð¾"},{color:yt[15],emoji:"ð¥¦"},{color:yt[0],emoji:"ð¹"},{color:yt[17],emoji:"ð"},{color:yt[4],emoji:"â±"},{color:yt[21],emoji:"âµï¸"},{color:yt[17],emoji:"ð¥³"},{color:yt[8],emoji:"ð¤¯"},{color:yt[22],emoji:"ð¤ "}];function Vte(t){let e=0;if(t.length===0)return e;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e|=0}return e}function zte(t){const n=Math.abs(Vte((typeof t=="string"?t:"").toLowerCase())%RR.length);return RR[n??0]}var Hte=({address:t,ensImage:e,size:n})=>{const[r,i]=K.useState(!1);K.useEffect(()=>{if(e){const l=new Image;l.src=e,l.onload=()=>i(!0)}},[e]);const{color:s,emoji:a}=K.useMemo(()=>zte(t),[t]);return e?r?S.createElement(W,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${e})`,backgroundPosition:"center",height:n,width:n}}):S.createElement(W,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},S.createElement(zg,null)):S.createElement(W,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!e&&{backgroundColor:s},height:n,width:n}},a)},_D=Hte,TD=K.createContext(_D);function SD({address:t,imageUrl:e,loading:n,size:r}){const i=K.useContext(TD);return S.createElement(W,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},S.createElement(W,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(r*.55)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},S.createElement(i,{address:t,ensImage:e,size:r})),n&&S.createElement(W,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},S.createElement(zg,{height:"100%",width:"100%"})))}var kR=()=>S.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Dropdown"),S.createElement("path",{d:"M12.75 1.54
1763001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),NR={defaultLocale:"en",locale:"en"},qte=class{constructor(t){this.listeners=new Set,this.defaultLocale=NR.defaultLocale,this.enableFallback=!1,this.locale=NR.locale,this.cachedLocales=[],this.translations={};for(const[e,n]of Object.entries(t))this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(n,e)}}missingMessage(t){return`[missing: "${this.locale}.${t}" translation]`}flattenTranslation(t,e){const n={},r=(i,s)=>{for(const a of Object.keys(i)){const l=`${s}.${a}`,u=i[a];typeof u=="object"&&u!==null?r(u,l):n[l]=u}};return r(t,e),n}translateWithReplacements(t,e={}){let n=t;for(const r in e){const i=e[r];n=n.replace(`%{${r}}`,i)}return n}t(t,e,n){const r=`${this.locale}.${t}`,i=this.translations[r];if(!i){if(this.enableFallback){const s=`${this.defaultLocale}.${t}`,a=this.translations[s];if(a)return this.translateWithReplacements(a,e)}return n!=null&&n.rawKeyIfTranslationMissing?t:this.missingMessage(t)}return this.translateWithReplacements(i,e)}isLocaleCached(t){return this.cachedLocales.includes(t)}updateLocale(t){this.locale=t,this.notifyListeners()}setTranslations(t,e){this.isLocaleCached(t)||(this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(e,t)}),this.locale=t,this.notifyListeners()}notifyListeners(){for(const t of this.listeners)t()}onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}},ds=new qte({en:JSON.parse(g5),"en-US":JSON.parse(g5)});ds.defaultLocale="en-US";ds.locale="en-US";ds.enableFallback=!0;var $te=async t=>{switch(t){case"ar":case"ar-AR":return(await Te(async()=>{const{default:e}=await import("./ar_AR-CTNWGWSS-DlAFo0vZ.js");return{default:e}},[])).default;case"de":case"de-DE":return(await Te(async()=>{const{default:e}=await import("./de_DE-P43L3PR7-pJRS3eyz.js");return{default:e}},[])).default;case"en":case"en-US":return(await Te(async()=>{const{default:e}=await Promise.resolve().then(()=>Lk);return{default:e}},void 0)).default;case"es":case"es-419":return(await Te(async()=>{const{default:e}=await import("./es_419-JBX5FS3Q-Bk-MlIq_.js");return{default:e}},[])).default;case"fr":case"fr-FR":return(await Te(async()=>{const{default:e}=await import("./fr_FR-CM2EDAQC-DvlCXiU9.js");return{default:e}},[])).default;case"hi":case"hi-IN":return(await Te(async()=>{const{default:e}=await import("./hi_IN-GYVCUYRD-CQnOa8U_.js");return{default:e}},[])).default;case"id":case"id-ID":return(await Te(async()=>{const{default:e}=await import("./id_ID-7ZWSMOOE-ZzIoBaiI.js");return{default:e}},[])).default;case"ja":case"ja-JP":return(await Te(async()=>{const{default:e}=await import("./ja_JP-CGMP6VLZ-BBxPp4Hq.js");return{default:e}},[])).default;case"ko":case"ko-KR":return(await Te(async()=>{const{default:e}=await import("./ko_KR-YCZDTF7X-4W342j3x.js");return{default:e}},[])).default;case"ms":case"ms-MY":return(await Te(async()=>{const{default:e}=await import("./ms_MY-5LHAYMS7-BUU8UB2I.js");return{default:e}},[])).default;case"pt":case"pt-BR":return(await Te(async()=>{const{default:e}=await import("./pt_BR-3JTS4PSK-Cou37HE0.js");return{default:e}},[])).default;case"ru":case"ru-RU":return(await Te(async()=>{const{default:e}=await import("./ru_RU-6J6XERHI-BEDPqa1p.js");return{default:e}},[])).default;case"th":case"th-TH":return(await Te(async()=>{const{default:e}=await import("./th_TH-STXOD4CR-DmwaGyKS.js");return{default:e}},[])).default;case"tr":case"tr-TR":return(await Te(async()=>{const{default:e}=await import("./tr_TR-P7QAUUZU-DHzPxq5a.js");return{default:e}},[])).default;case"ua":case"uk-UA":return(await Te(async()=>{const{default:e}=await import("./uk_UA-JTTBGJGQ-bEPIKyyu.js");return{default:e}},[])).default;case"vi":case"vi-VN":return(await Te(async()=>{const{default:e}=await import("./vi_VN-5XUUAVWW-DvcbUvCZ.js");return{default:e}},[])).default;case"zh":case"zh-CN":case"zh-Hans":return(await Te(async()=>{const{default:e}=await import("./zh_CN-RGMLPFEP-CPkk4IYh.js");return{default:e}},[])).default;case"zh-HK":return(await Te(async()=>{const{default:e}=await import("./zh_HK-YM3T6EI5-BYHcXtXC.js");return{default:e}},[])).default;case"zh-Hant":case"zh-TW":return(await Te(async()=>{const{default:e}=await import("./zh_TW-HAEH6VE5-r-nym7hs.js");return{default:e}},[])).default;default:return(await Te(async()=>{const{default:e}=await Promise.resolve().then(()=>Lk);return{default:e}},void 0)).default}};async function OR(t){if(ds.isLocaleCached(t)){ds.updateLocale(t);return}const n=await $te(t);ds.setTranslations(t,JSON.parse(n))}var Gte=()=>{var t;if(typeof window<"u"&&typeof navigator<"u"){if((t=navigator.languages)!=null&&t.length)return navigator.languages[0];if(navigator.language)return navigator.language}},kn=K.createContext({i18n:ds}),Qte=({children:t,locale:e})=>{const[n,r]=K.useState(0),i=K.useMemo(()=>Gte(),[]);K.useEffect(()=>ds.onChange(()=>{r(l=>l+1)}),[]),K.useEffect(()=>{e&&e!==ds.locale?OR(e):!e&&i&&i!==ds.locale&&OR(i)},[e,i]);const s=K.useMemo(()=>({t:(l,u)=>ds.t(l,u),i18n:ds}),[n]);return S.createElement(kn.Provider,{value:s},t)};function ID(t){return t!=null}
1763var BR={iconBackground:"#7290CC",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./apechain-SX5YFU6N-q5qBv-mp.js");return{default:t}},[])).default},I3={iconBackground:"#96bedc",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./arbitrum-WURIBY6W-CqVkHBr5.js");return{default:t}},[])).default},PR={iconBackground:"#e84141",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./avalanche-KOMJD3XY-Dsn_JPR4.js");return{default:t}},[])).default},R3={iconBackground:"#0052ff",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./base-OAXLRA4F-CoYTVIiL.js");return{default:t}},[])).default},k3={iconBackground:"#814625",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./berachain-NJECWIVC-DumxnFvf.js");return{default:t}},[])).default},DR={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./blast-V555OVXZ-BbhJh1tj.js");return{default:t}},[])).default},MR={iconBackground:"#ebac0e",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./bsc-N647EYR2-B2nLKXWV.js");return{default:t}},[])).default},jR={iconBackground:"#FCFF52",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./celo-GEP4TUHG-CenIBYLU.js");return{default:t}},[])).default},LR={iconBackground:"#002D74",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./cronos-HJPAQTAE-BEOvlOC4.js");return{default:t}},[])).default},Kte={iconBackground:"#A36EFD",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./degen-FQQ4XGHB-CeHTs88l.js");return{default:t}},[])).default},Kc={iconBackground:"#484c50",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./ethereum-RGGVA4PY-SWGOlkuk.js");return{default:t}},[])).default},UR={iconBackground:"transparent",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./flow-5FQJFCTK-CUie2reO.js");return{default:t}},[])).default},Wte={iconBackground:"#04795c",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./gnosis-37ZC4RBL-B137OtHZ.js");return{default:t}},[])).default},FR={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./gravity-J5YQHTYH-Bj6B0uod.js");return{default:t}},[])).default},Yte={iconBackground:"#f9f7ec",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./hardhat-TX56IT5N-CV1FY-wE.js");return{default:t}},[])).default},Jte={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./hyperevm-VKPAA4SA-CHwraEsx.js");return{default:t}},[])).default},VR={iconBackground:"#7132F5",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./ink-FZMYZWHG-62p-5IK5.js");return{default:t}},[])).default},zR={iconBackground:"transparent",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./kaia-65D2U3PU-JmuLQ4gC.js");return{default:t}},[])).default},N3={iconBackground:"#ffffff",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./linea-QRMVQ5DY-DuI3vv0d.js");return{default:t}},[])).default},O3={iconBackground:"#ffffff",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./manta-SI27YFEJ-CpVOKa06.js");return{default:t}},[])).default},HR={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./mantle-CKIUT334-DR2WgqzU.js");return{default:t}},[])).default},Bb={iconBackground:"#ff5a57",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./optimism-HAF2GUT7-ec6Nqxs9.js");return{default:t}},[])).default},B3={iconBackground:"#9f71ec",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./polygon-WW6ZI7PM-DXlmm4L1.js");return{default:t}},[])).default},Xte={iconBackground:"#1273EA",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./ronin-EMCPYXZT-N-QBHZdV.js");return{default:t}},[])).default},Zte={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./sanko-RHQYXGM5-OX010CbN.js");return{default:t}},[])).default},ene={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./superposition-HG6MMR2Y-bRkgatRO.js");return{default:t}},[])).default}
1763,qR={iconBackground:"#FFEEDA",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./scroll-5OBGQVOV-DJFECiai.js");return{default:t}},[])).default},$R={iconBackground:"#F50DB4",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./unichain-C5BWO2ZY-BfguYsnu.js");return{default:t}},[])).default},GR={iconBackground:"#f9f7ec",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./xdc-KJ3TDBYO-DNV6zchh.js");return{default:t}},[])).default},QR={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./zetachain-TLDS5IPW-Udhyw16T.js");return{default:t}},[])).default},KR={iconBackground:"#f9f7ec",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./zksync-DH7HK5U4-Dt4usFw6.js");return{default:t}},[])).default},P3={iconBackground:"#000000",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./zora-FYL5H3IO-iB4wygST.js");return{default:t}},[])).default},tne={apechain:{chainId:33139,name:"ApeChain",...BR},apechainCurtis:{chainId:33111,name:"ApeChain Curtis",...BR},arbitrum:{chainId:42161,name:"Arbitrum",...I3},arbitrumGoerli:{chainId:421613,...I3},arbitrumSepolia:{chainId:421614,...I3},avalanche:{chainId:43114,...PR},avalancheFuji:{chainId:43113,...PR},base:{chainId:8453,name:"Base",...R3},baseGoerli:{chainId:84531,...R3},baseSepolia:{chainId:84532,...R3},berachain:{chainId:80094,name:"Berachain",...k3},berachainArtio:{chainId:80085,name:"Berachain Artio",...k3},berachainBArtio:{chainId:80084,name:"Berachain bArtio",...k3},blast:{chainId:81457,name:"Blast",...DR},blastSepolia:{chainId:168587773,...DR},bsc:{chainId:56,name:"BSC",...MR},bscTestnet:{chainId:97,...MR},celo:{chainId:42220,name:"Celo",...jR},celoAlfajores:{chainId:44787,name:"Celo Alfajores",...jR},cronos:{chainId:25,...LR},cronosTestnet:{chainId:338,...LR},degen:{chainId:666666666,name:"Degen",...Kte},flow:{chainId:747,...UR},flowTestnet:{chainId:545,...UR},gnosis:{chainId:100,name:"Gnosis",...Wte},goerli:{chainId:5,...Kc},gravity:{chainId:1625,name:"Gravity",...FR},gravitySepolia:{chainId:13505,name:"Gravity Sepolia",...FR},hardhat:{chainId:31337,...Yte},holesky:{chainId:17e3,...Kc},hyperevm:{chainId:999,...Jte},ink:{chainId:57073,...VR},inkSepolia:{chainId:763373,...VR},kaia:{chainId:8217,name:"Kaia",...zR},kairos:{chainId:1001,name:"Kairos",...zR},kovan:{chainId:42,...Kc},linea:{chainId:59144,name:"Linea",...N3},lineaGoerli:{chainId:59140,name:"Linea Goerli",...N3},lineaSepolia:{chainId:59141,name:"Linea Sepolia",...N3},localhost:{chainId:1337,...Kc},mainnet:{chainId:1,name:"Ethereum",...Kc},manta:{chainId:169,name:"Manta",...O3},mantaSepolia:{chainId:3441006,...O3},mantaTestnet:{chainId:3441005,...O3},mantle:{chainId:5e3,...HR},mantleTestnet:{chainId:5001,...HR},optimism:{chainId:10,name:"Optimism",...Bb},optimismGoerli:{chainId:420,...Bb},optimismKovan:{chainId:69,...Bb},optimismSepolia:{chainId:11155420,...Bb},polygon:{chainId:137,name:"Polygon",...B3},polygonAmoy:{chainId:80002,...B3},polygonMumbai:{chainId:80001,...B3},rinkeby:{chainId:4,...Kc},ronin:{chainId:2020,...Xte},ropsten:{chainId:3,...Kc},sanko:{chainId:1996,name:"Sanko",...Zte},scroll:{chainId:534352,...qR},scrollSepolia:{chainId:534351,...qR},sepolia:{chainId:11155111,...Kc},superposition:{chainId:55244,name:"Superposition",...ene},unichain:{chainId:130,...$R},unichainSepolia:{chainId:1301,...$R},xdc:{chainId:50,name:"XDC",...GR},xdcTestnet:{chainId:51,...GR},zetachain:{chainId:7e3,name:"ZetaChain",...QR},zetachainAthensTestnet:{chainId:7001,name:"Zeta Athens",...QR},zkSync:{chainId:324,name:"zkSync",...KR},zkSyncTestnet:{chainId:280,...KR},zora:{chainId:7777777,name:"Zora",...P3},zoraSepolia:{chainId:999999999,...P3},zoraTestnet:{chainId:999,...P3}},nne=Object.fromEntries(Object.values(tne).filter(ID).map(({chainId:t,...e})=>[t,e])),rne=t=>t.map(e=>{const n=nne[e.id]??{};return{...e,name:n.name??e.name,iconUrl:e.iconUrl??n.iconUrl,iconBackground:e.iconBackground??n.iconBackground}}),U2=K.createContext({chains:[]});function ine({children:t,initialChain:e}){const{chains:n}=nr();return S.createElement(U2.Provider,{value:K.useMemo(()=>({chains:rne(n),initialChainId:typeof e=="number"?e:e==null?void 0:e.id}),[n,e])},t)}var sd=()=>K.useContext(U2).chains,sne=()=>K.useContext(U2).initialChainId,one=()=>{const t=sd();return K.useMemo(()=>{const e={};for(const n of t)e[n.id]=n;return e},[t])},RD=K.createContext({showBalance:void 0,setShowBalance:()=>{}});function ane({children:t}){const[e,n]=K.useState();return S.createElement(RD.Provider,{value:{showBalance:e,setShowBalance:n}},t)}var kD=()=>K.useContext(RD);function cne(){const[t,e]=K.useState(!1);return K.useEffect(()=>(e(!0),()=>{e(!1)}),[]),K.useCallback(()=>t,[t])}function ND(){const t=sd(),e=N2.id;return t.some(r=>r.id===e)}function lne(t){const e=ND(),n=i=>{try{return fee(i)}catch{}},{data:r}=xZ({chainId:N2.id,name:t?n(t):void 0,query:{enabled:e}});return r}async function Ou(t,e){if(e={headers:{},method:"get",...e,timeout:e.timeout??1e4},!t)throw new Error("rainbowFetch: Missing url argument");const n=new AbortController,r=setTimeout(()=>n.abort(),e.timeout),{body:i,params:s,headers:a,...l}=e,u=i&&typeof i=="object"?JSON.stringify(e.body):e.body,d=await fetch(`${t}${fne(s)}`,{...l,body:u,headers:{Accept:"application/json","Content-Type":"application/json",...a},signal:n.signal});clearTimeout(r);const h=await une(d);if(d.ok){const{headers:w,status:A}=d;return{data:h,headers:w,status:A}}throw dne({requestBody:i,response:d,responseBody:typeof h=="string"?{error:h}:h})}function une(t){const e=t.headers.get("Content-Type");return e!=null&&e.startsWith("application/json")?t.json():t.text()}function fne(t){return t&&Object.keys(t).length?`?${new URLSearchParams(t)}`:""}function dne({requestBody:t,response:e,responseBody:n}){const r=(n==null?void 0:n.error)||(e==null?void 0:e.statusText)||"There was an error with the request.",i=new Error(r);return i.response=e,i.responseBody=n,i.requestBody=t,i}var hne=class{constructor(t={}){const{baseUrl:e="",...n}=t;this.baseUrl=e,this.opts=n}get(t,e){return Ou(`${this.baseUrl}${t}`,{...this.opts,...e||{},method:"get"})}delete(t,e){return Ou(`${this.baseUrl}${t}`,{...this.opts,...e||{},method:"delete"})}head(t,e){return Ou(`${this.baseUrl}${t}`,{...this.opts,...e||{},method:"head"})}options(t,e){return Ou(`${this.baseUrl}${t}`,{...this.opts,...e||{},method:"options"})}post(t,e,n){return Ou(`${this.baseUrl}${t}`,{...this.opts,...n||{},body:e,method:"post"})}put(t,e,n){return Ou(`${this.baseUrl}${t}`,{...this.opts,...n||{},body:e,method:"put"})}patch(t,e,n){return Ou(`${this.baseUrl}${t}`,{...this.opts,...n||{},body:e,method:"patch"})}};function pne({baseUrl:t,headers:e,params:n,timeout:r}){return new hne({baseUrl:t,headers:e,params:n,timeout:r})}var mne=!!(typeof process<"u"&&typeof Mw<"u"&&Mw.RAINBOW_PROVIDER_API_KEY),gne=pne({baseUrl:"https://enhanced-provider.rainbow.me",headers:{"x-api-key":typeof process<"u"&&typeof Mw<"u"&&Mw.RAINBOW_PROVIDER_API_KEY||"Lzbaso
1763BiLqltex3VkcQ7LRmL4PtfiiZ1EMJrizrgfonWN6byJReu/l6yrUoo3zLW"}});function yne(t,e,n={}){return[t,e,n]}function nw(t){return`rk-ens-name-${t}`}function bne(t){try{const e=t?JSON.parse(t):null;return typeof e=="object"?e:null}catch{return null}}function wne(t,e){if(!Di(t))return;const n=new Date,r=new Date(n.getTime()+180*6e4);localStorage.setItem(nw(t),JSON.stringify({ensName:e,expires:r.getTime()}))}function vne(t){const e=bne(localStorage.getItem(nw(t)));if(!e)return null;const{ensName:n,expires:r}=e;return typeof n!="string"||Number.isNaN(Number(r))||new Date().getTime()>Number(r)?(localStorage.removeItem(nw(t)),null):n}async function Ane({address:t}){const e=vne(t);if(e)return e;const r=(await gne.get("/v1/resolve-ens",{params:{address:t}})).data.data;return r&&wne(t,r),r}function Ene(t){const e=ND(),{data:n}=CZ({chainId:N2.id,address:t,query:{enabled:e}}),{data:r}=EP({queryKey:yne("address",t),queryFn:()=>Ane({address:t}),enabled:!e&&!!t&&mne,staleTime:10*(60*1e3),retry:1});return n||r}function OD({address:t,includeBalance:e}){const n=Ene(t),r=lne(n),{data:i}=xP({address:e?t:void 0});return{ensName:n,ensAvatar:r,balance:i}}function F2(){const{chain:t}=gr();return(t==null?void 0:t.id)??null}var BD="rk-transactions";function xne(t){try{const e=t?JSON.parse(t):{};return typeof e=="object"?e:{}}catch{return{}}}function WR(){return xne(typeof localStorage<"u"?localStorage.getItem(BD):null)}var Cne=/^0x([A-Fa-f0-9]{64})$/;function _ne(t){const e=[];return Cne.test(t.hash)||e.push("Invalid transaction hash"),typeof t.description!="string"&&e.push("Transaction must have a description"),typeof t.confirmations<"u"&&(!Number.isInteger(t.confirmations)||t.confirmations<1)&&e.push("Transaction confirmations must be a positiver integer"),e}function Tne({provider:t}){let e=WR(),n=t;const r=new Set,i=new Set,s=new Map;function a(O){n=O}function l(O,k){var P;return((P=e[O])==null?void 0:P[k])??[]}function u(O,k,P){const B=_ne(P);if(B.length>0)throw new Error(["Unable to add transaction",...B].join(` 1764`));g(O,k,U=>[{...P,status:"pending"},...U.filter(({hash:I})=>I!==P.hash)])}function d(O,k){g(O,k,()=>[])}function h(O,k,P,B){g(O,k,U=>U.map(I=>I.hash===P?{...I,status:B}:I))}async function m(O,k){await Promise.all(l(O,k).filter(P=>P.status==="pending").map(async P=>{const{confirmations:B,hash:U}=P,I=s.get(U);if(I)return await I;const R=n.waitForTransactionReceipt({confirmations:B,hash:U,timeout:3e5}).then(({status:M})=>{s.delete(U),M!==void 0&&(h(O,k,U,M===0||M==="reverted"?"failed":"confirmed"),v(M))}).catch(()=>{h(O,k,U,"failed")});return s.set(U,R),await R}))}function g(O,k,P){e=WR(),e[O]=e[O]??{};let B=0;const U=10,I=P(e[O][k]??[]).filter(({status:R})=>R==="pending"?!0:B++<=U);e[O][k]=I.length>0?I:void 0,w(),A(),m(O,k)}function w(){localStorage.setItem(BD,JSON.stringify(e))}function A(){for(const O of r)O()}function v(O){for(const k of i)k(O)}function x(O){return r.add(O),()=>{r.delete(O)}}function T(O){return i.add(O),()=>{i.delete(O)}}return{addTransaction:u,clearTransactions:d,getTransactions:l,onTransactionStatus:T,onChange:x,setProvider:a,waitForPendingTransactions:m}}var YR,PD=S.createContext(null);function Sne({children:t}){const e=_Z(),{address:n}=gr(),r=F2(),{refetch:i}=xP({address:n,query:{enabled:!1}}),[s]=S.useState(()=>YR??(YR=Tne({provider:e}))),a=S.useCallback(l=>{l==="success"&&i()},[i]);return S.useEffect(()=>{s.setProvider(e)},[s,e]),S.useEffect(()=>{n&&r&&s.waitForPendingTransactions(n,r)},[s,n,r]),S.useEffect(()=>{if(s&&n&&r)return s.onTransactionStatus(a)},[s,n,r,a]),S.createElement(PD.Provider,{value:s},t)}function DD(){const t=S.useContext(PD);if(!t)throw new Error("Transaction hooks must be used within RainbowKitProvider");return t}function MD(){const t=DD(),{address:e}=gr(),n=F2(),[r,i]=K.useState(()=>t&&e&&n?t.getTransactions(e,n):[]);return K.useEffect(()=>{if(t&&e&&n)return i(t.getTransactions(e,n)),t.onChange(()=>{i(t.getTransactions(e,n))})},[t,e,n]),r}var JR=t=>typeof t=="function"?t():t;function Ine(t,{extends:e}={}){const n={...bR(IR,JR(t))};if(!e)return n;const r=bR(IR,JR(e));return Object.fromEntries(Object.entries(n).filter(([s,a])=>a!==r[s]))}function XR(t,e={}){return Object.entries(Ine(t,e)).map(([n,r])=>`${n}:${r.replace(/[:;{}</>]/g,"")};`).join("")}var jD={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},Uy=K.createContext(jD),LD=K.createContext(!1);function Rne(t,e){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,t()},e)}}var UD=()=>{const[t,e]=K.useState({height:void 0,width:void 0});return K.useEffect(()=>{const n=Rne(()=>{e({height:window.innerHeight,width:window.innerWidth})},500);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),t},Fy=K.createContext({connector:null,setConnector:()=>{}});function kne({children:t}){const[e,n]=K.useState(null);return S.createElement(Fy.Provider,{value:K.useMemo(()=>({connector:e,setConnector:n}),[e])},t)}var Vy={COMPACT:"compact",WIDE:"wide"},e6=K.createContext(Vy.WIDE);function Nne({children:t,modalSize:e}){const{width:n}=UD(),r=n&&n<Ste,{connector:i}=K.useContext(Fy);return S.createElement(e6.Provider,{value:r||i?Vy.COMPACT:e},t)}var V2=K.createContext(!1),One="rk-version";
1764function Bne({version:t}){localStorage.setItem(One,t)}function Pne(){const t=K.useCallback(()=>{Bne({version:"2.2.8"})},[]);K.useEffect(()=>{t()},[t])}function Dne(t,e){const n={};for(const r of t){const i=e(r);i&&(n[i]=r)}return n}function z2(){return typeof navigator<"u"&&typeof navigator.userAgent<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function Mne(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function H2(){var e,n;if(typeof navigator>"u")return"Browser";const t=(e=navigator.userAgent)==null?void 0:e.toLowerCase();return(n=navigator.brave)!=null&&n.isBrave?"Brave":(t==null?void 0:t.indexOf("edg/"))>-1?"Edge":(t==null?void 0:t.indexOf("op"))>-1?"Opera":Mne()?"Arc":(t==null?void 0:t.indexOf("chrome"))>-1?"Chrome":(t==null?void 0:t.indexOf("firefox"))>-1?"Firefox":z2()?"Safari":"Browser"}var jne=ste.UAParser(),{os:q2}=jne;function Lne(){return q2.name==="Windows"}function Une(){return q2.name==="Mac OS"}function Fne(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(q2.name)}function $2(){return Lne()?"Windows":Une()?"macOS":Fne()?"Linux":"Desktop"}var Vne=t=>{var n,r,i,s,a,l,u,d,h,m,g;const e=H2();return{Arc:(n=t==null?void 0:t.downloadUrls)==null?void 0:n.chrome,Brave:(r=t==null?void 0:t.downloadUrls)==null?void 0:r.chrome,Chrome:(i=t==null?void 0:t.downloadUrls)==null?void 0:i.chrome,Edge:((s=t==null?void 0:t.downloadUrls)==null?void 0:s.edge)||((a=t==null?void 0:t.downloadUrls)==null?void 0:a.chrome),Firefox:(l=t==null?void 0:t.downloadUrls)==null?void 0:l.firefox,Opera:((u=t==null?void 0:t.downloadUrls)==null?void 0:u.opera)||((d=t==null?void 0:t.downloadUrls)==null?void 0:d.chrome),Safari:(h=t==null?void 0:t.downloadUrls)==null?void 0:h.safari,Browser:(m=t==null?void 0:t.downloadUrls)==null?void 0:m.browserExtension}[e]??((g=t==null?void 0:t.downloadUrls)==null?void 0:g.browserExtension)},zne=t=>{var n,r,i;return(y0()?(n=t==null?void 0:t.downloadUrls)==null?void 0:n.ios:(r=t==null?void 0:t.downloadUrls)==null?void 0:r.android)??((i=t==null?void 0:t.downloadUrls)==null?void 0:i.mobile)},Hne=t=>{var n,r,i,s,a;const e=$2();return{Windows:(n=t==null?void 0:t.downloadUrls)==null?void 0:n.windows,macOS:(r=t==null?void 0:t.downloadUrls)==null?void 0:r.macos,Linux:(i=t==null?void 0:t.downloadUrls)==null?void 0:i.linux,Desktop:(s=t==null?void 0:t.downloadUrls)==null?void 0:s.desktop}[e]??((a=t==null?void 0:t.downloadUrls)==null?void 0:a.desktop)},FD=(t,e)=>t.some(n=>n.id===e),qne=t=>!!t.isRainbowKitConnector,ZR=t=>{var e;return!!(!t.isRainbowKitConnector&&((e=t.icon)!=null&&e.replace(/\n/g,"").startsWith("data:image"))&&t.uid&&t.name)},$ne=(t,e)=>t.id==="walletConnect"&&e?{...t,walletConnectModalConnector:e}:t,Gne=({wallets:t,recentWallets:e})=>[...e,...t.filter(n=>!FD(e,n.id))],VD="rk-recent";function Qne(t){try{const e=t?JSON.parse(t):[];return Array.isArray(e)?e:[]}catch{return[]}}function zD(){return typeof localStorage<"u"?Qne(localStorage.getItem(VD)):[]}function Kne(t){return[...new Set(t)]}function Wne(t){const e=Kne([t,...zD()]);localStorage.setItem(VD,JSON.stringify(e))}function Hg(t=!1){var P,B,U;const e=sd(),n=sne(),{connectAsync:r,connectors:i}=CP(),s=i,{setIsWalletConnectModalOpen:a}=hM(),l=s.map(I=>({...I,...I.rkDetails||{}}));async function u(I){var F,j;const R=await I.getChainId(),M=await r({chainId:n??((F=e.find(({id:q})=>q===R))==null?void 0:F.id)??((j=e[0])==null?void 0:j.id),connector:I});return M&&Wne(I.id),M}async function d(I){try{a(!0),await u(I),a(!1)}catch(R){const M=R.name==="UserRejectedRequestError"||R.message==="Connection request reset. Please try again.";if(a(!1),!M)throw R}}const h=async(I,R)=>{const M=await I.getProvider();return I.id==="coinbase"?M.qrUrl:new Promise(F=>M.once("display_uri",j=>{F(R(j))}))},m=l.find(I=>I.id==="walletConnect"&&I.isWalletConnectModalConnector),g=l.filter(ZR).map(I=>({...I,groupIndex:0})),w=l.filter(qne).filter(I=>!I.isWalletConnectModalConnector).filter(I=>t?!g.some(M=>M.id===I.rdns):!0).map(I=>$ne(I,m)),A=[...g,...w],v=Dne(A,I=>I.id),T=zD().map(I=>
1764v[I]).filter(Boolean).slice(0,3),O=[],k=Gne({wallets:A,recentWallets:T});for(const I of k){if(!I)continue;const R=ZR(I),M=FD(T,I.id);if(R){O.push({...I,iconUrl:I.icon,ready:!0,connect:()=>u(I),groupName:"Installed",recent:M});continue}O.push({...I,ready:I.installed??!0,connect:()=>u(I),desktopDownloadUrl:Hne(I),extensionDownloadUrl:Vne(I),groupName:I.groupName,mobileDownloadUrl:zne(I),getQrCodeUri:(P=I.qrCode)!=null&&P.getUri?()=>h(I,I.qrCode.getUri):void 0,getDesktopUri:(B=I.desktop)!=null&&B.getUri?()=>h(I,I.desktop.getUri):void 0,getMobileUri:(U=I.mobile)!=null&&U.getUri?()=>{var F;return h(I,(F=I.mobile)==null?void 0:F.getUri)}:void 0,recent:M,showWalletConnectModal:I.walletConnectModalConnector?()=>d(I.walletConnectModalConnector):void 0})}return O}var HD=async()=>(await Te(async()=>{const{default:t}=await import("./assets-Q6ZU7ZJ5-P8HioiAD.js");return{default:t}},[])).default,Yne=()=>qo(HD),Jne=()=>S.createElement(tr,{background:"#d0d5de",borderRadius:"10",height:"48",src:HD,width:"48"}),qD=async()=>(await Te(async()=>{const{default:t}=await import("./login-UP3DZBGS-Db_wM5oQ.js");return{default:t}},[])).default,Xne=()=>qo(qD),Zne=()=>S.createElement(tr,{background:"#d0d5de",borderRadius:"10",height:"48",src:qD,width:"48"}),Fe=S.forwardRef(({as:t="div",children:e,className:n,color:r,display:i,font:s="body",id:a,size:l="16",style:u,tabIndex:d,textAlign:h="inherit",weight:m="regular",testId:g},w)=>S.createElement(W,{as:t,className:n,color:r,display:i,fontFamily:s,fontSize:l,fontWeight:m,id:a,ref:w,style:u,tabIndex:d,textAlign:h,testId:g},e));Fe.displayName="Text";var ere={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function Qr({disabled:t=!1,href:e,label:n,onClick:r,rel:i="noreferrer noopener",size:s="medium",target:a="_blank",testId:l,type:u="primary"}){const d=u==="primary",h=s!=="large",m=Rn(),g=t?"actionButtonSecondaryBackground":d?"accentColor":h?"actionButtonSecondaryBackground":null,{fontSize:w,height:A,paddingX:v,paddingY:x}=ere[s],T=!m||!h;return S.createElement(W,{...e?t?{}:{as:"a",href:e,rel:i,target:a}:{as:"button",type:"button"},onClick:t?void 0:r,...T?{borderColor:m&&!h&&!d?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!t&&In({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:v,paddingY:x,style:{willChange:"transform"},testId:l,textAlign:"center",transition:"transform",...g?{background:g}:{},...A?{height:A}:{}},S.createElement(Fe,{color:t?"modalTextSecondary":d?"accentColorForeground":"accentColor",size:w,weight:"bold"},n))}var tre=()=>Rn()?S.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Close"),S.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):S.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Close"),S.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893
1764C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),Gf=({"aria-label":t="Close",onClose:e})=>{const n=Rn();return S.createElement(W,{alignItems:"center","aria-label":t,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:In({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:e,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},S.createElement(tre,null))},$D=async()=>(await Te(async()=>{const{default:t}=await import("./sign-A7IJEUT5-CGsRnPrd.js");return{default:t}},[])).default;function nre({onClose:t,onCloseModal:e}){const{i18n:n}=K.useContext(kn),[{status:r,...i},s]=S.useState({status:"idle"}),a=Nte(),l=K.useCallback(async()=>{try{const A=await a.getNonce();s(v=>({...v,nonce:A}))}catch{s(A=>({...A,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"}))}},[a,n.t]),u=K.useRef(!1);S.useEffect(()=>{u.current||(u.current=!0,l())},[l]);const d=Rn(),{address:h,chain:m}=gr(),{signMessageAsync:g}=TZ(),w=async()=>{try{const A=m==null?void 0:m.id,{nonce:v}=i;if(!h||!A||!v)return;s(O=>({...O,errorMessage:void 0,status:"signing"}));const x=a.createMessage({address:h,chainId:A,nonce:v});let T;try{T=await g({message:x})}catch(O){return O instanceof Nt?s(k=>({...k,status:"idle"})):s(k=>({...k,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"}))}s(O=>({...O,status:"verifying"}));try{if(await a.verify({message:x,signature:T})){e();return}throw new Error}catch{return s(O=>({...O,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{s({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}};return S.createElement(W,{position:"relative"},S.createElement(W,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},S.createElement(Gf,{onClose:t})),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:d?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:d?"60px":"36px"}},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:d?"6":"4",style:{maxWidth:d?320:280}},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:d?"32":"16"},S.createElement(tr,{height:40,src:$D,width:40}),S.createElement(Fe,{color:"modalText",size:d?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:d?"16":"12"},S.createElement(Fe,{color:"modalTextSecondary",size:d?"16":"14",textAlign:"center"},n.t("sign_in.description")),r==="idle"&&i.errorMessage?S.createElement(Fe,{color:"error",size:d?"16":"14",textAlign:"center",weight:"bold"},i.errorMessage):null)),S.createElement(W,{alignItems:d?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},S.createElement(Qr,{disabled:!i.nonce||r==="signing"||r==="verifying",label:i.nonce?r==="signing"?n.t("sign_in.signature.waiting"):r==="verifying"?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:w,size:d?"large":"medium",testId:"auth-message-button"}),d?S.createElement(Qr,{label:"Cancel",onClick:t,size:"large",type:"secondary"}):S.createElement(W,{as:"button",borderRadius:"full",className:In({active:"shrink",hover:"grow"}),display:"block",onClick:t,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},S.createElement(Fe,{color:"closeButton",size:d?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function rre(){const t=sd(),e=Hg(),n=Xv()==="unauthenticated",r=K.useCallback(()=>{qo(...e.map(i=>i.iconUrl),...t.map(i=>i.iconUrl).filter(ID)),Rn()||(Yne(),Xne()),n&&qo($D)},[e,t,n]);K.useEffect(()=>{r()},[r])}var GD="WALLETCONNECT_DEEPLINK_CHOICE";function ire({mobileUri:t,name:e}){localStorage.setItem(GD,JSON.stringify({href:t.split("?")[0],name:e}))}function sre(){localStorage.removeItem(GD)}var QD=K.createContext(void 0),Ix="data-rk",KD=t=>({[Ix]:t||""}),ore=t=>{if(t&&!/^[a-zA-Z0-9_]+$/.test(t))throw new Error(`Invalid ID: ${t}`);return t?`[${Ix}="${t}"]`:`[${Ix}]`},are=()=>{const t=K.useContext(QD);return KD(t)},cre=nN();function lre({appInfo:t,avatar:e,children:n,coolMode:r=!1,id:i,initialChain:s,locale:a,modalSize:l=Vy.WIDE,showRecentTransactions:u=!1,theme:d=cre}){if(rre(),Pne(),cP({onDisconnect:sre}),typeof d=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const h=ore(i),m={...jD,...t},g=e??_D;return S.createElement(ine,{initialChain:s},S.createElement(kne,null,S.createElement(Qte,{locale:a},S.createElement(LD.Provider,{value:r},S.createElement(Nne,{modalSize:l},S.createElement(V2.Provider,{value:u},S.createElement(Sne,null,S.createElement(TD.Provider,{value:g},S.createElement(Uy.Provider,{value:m},S.createElement(QD.Provider,{value:i},S.createElement(ane,null,S.createElement(xie,null,d?S.createElement("div",{...KD(i)},S.createElement("style",{dangerouslySetInnerHTML:{__html:[`${h}{${XR("lightMode"in d?d.lightMode:d)}}`,"darkMode"in d?`@media(prefers-color-scheme:dark){${h}{${XR(d.darkMode,{extends:d.lightMode})}}}`:null].join("")}}),n):n))))))))))))}var ure="_9pm4ki5 ju367va ju367v15 ju367v8r",fre="_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",e7=(t,e)=>{const n=t.querySelectorAll("button:not(:disabled), a[href]");n.length!==0&&n[e==="end"?n.length-1:0].focus()};function dre(t){const e=K.useRef(null);return K.useEffect(()=>{const n=document.activeElement;return()=>{var r;(r=n.focus)==null||r.call(n)}},[]),K.useEffect(()=>{if(e.current){const n=e.current.querySelector("[data-auto-focus]");n?n.focus():e.current.focus()}},[]),S.createElement(S.Fragment,null,S.createElement("div",{onFocus:K.useCallback(()=>e.current&&e7(e.current,"end"),[]),tabIndex:0}),S.createElement("div",{ref:e,style:{outline:"none"},tabIndex:-1,...t}),S.createElement("div",{onFocus:K.useCallback(()=>e.current&&e7(e.current,"start"),[]),tabIndex:0}))}var hre=t=>t.stopPropagation();function jw({children:t,onClose:e,open:n,titleId:r}){K.useEffect(()=>{const d=h=>n&&h.key==="Escape"&&e();return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[n,e]);const[i,s]=K.useState(!0);K.useEffect(()=>{s(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const a=K.useCallback(()=>e(),[e]),l=are(),u=Rn();return S.createElement(S.Fragment,null,n?hee.createPortal(S.createElement(bD,{enabled:i},S.createElement(W,{...l},S.createElement(W,{...l,alignItems:u?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:fre,onClick:a,position:"fixed",role:"dialog"},S.createElement(dre,{className:ure,onClick:hre,role:"document"},t)))),document.body):null)}var pre="_1ckjpok7",mre="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",gre="_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",yre="_1ckjpok6 ju367vq",bre="_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",wre="_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r";function Lw({bottomSheetOnMobile:t=!1,children:e,marginTop:n,padding:r="16",paddingBottom:i,wide:s=!1}){const a=Rn(),u=K.useContext(e6)===Vy.COMPACT;return S.createElement(W,{marginTop:n},S.createElement(W,{className:[s?a?wre:u?gre:bre:mre,a?yre:null,a&&t?pre:null].join(" ")},S.createElement(W,{padding:r,paddingBottom:i??r},e)))}var t7=["k","m","b","t"];function Pb(t,e=1){return t.toString().replace(new RegExp(`(.+\\.\\d{${e}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function WD(t){if(t<1)return Pb(t,3);if(t<10**2)return Pb(t,2);if(t<10**4)return new Intl.NumberFormat().format(Number.parseFloat(Pb(t,1)));const e=10**1;let n=String(t);for(let r=t7.length-1;r>=0;r--){const i=10**((r+1)*3);
1764if(i<=t){t=t*e/i/e,n=Pb(t,1)+t7[r];break}}return n}function YD(t){return t.length<8?t:`${t.substring(0,4)}â¦${t.substring(t.length-4)}`}function JD(t){if(!t)return"";const e=t.split("."),n=e.pop();return e.join(".").length>24?`${e.join(".").substring(0,24)}...`:`${e.join(".")}.${n}`}var vre=()=>S.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Copied"),S.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),Are=()=>S.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Copy"),S.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),Ere=()=>S.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Disconnect"),S.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.
1764168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function xre(){const t=DD(),{address:e}=gr(),n=F2();return K.useCallback(()=>{if(!e||!n)throw new Error("No address or chain ID found");t.clearTransactions(e,n)},[t,e,n])}var XD=t=>{var e,n;return(n=(e=t==null?void 0:t.blockExplorers)==null?void 0:e.default)==null?void 0:n.url},ZD=()=>S.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Link"),S.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),Cre=()=>S.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Cancel"),S.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),_re=()=>S.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Success"),S.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),Tre=t=>
1764{switch(t){case"pending":return zg;case"confirmed":return _re;case"failed":return Cre;default:return zg}};function Sre({tx:t}){const e=Rn(),n=Tre(t.status),r=t.status==="failed"?"error":"accentColor",{chain:i}=gr(),s=t.status==="confirmed"?"Confirmed":t.status==="failed"?"Failed":"Pending",a=XD(i);return S.createElement(S.Fragment,null,S.createElement(W,{...a?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:In({active:"shrink"}),href:`${a}/tx/${t.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:e?"16":"14"},S.createElement(W,{color:r},S.createElement(n,null)),S.createElement(W,{display:"flex",flexDirection:"column",gap:e?"3":"1"},S.createElement(W,null,S.createElement(Fe,{color:"modalText",font:"body",size:e?"16":"14",weight:"bold"},t==null?void 0:t.description)),S.createElement(W,null,S.createElement(Fe,{color:t.status==="pending"?"modalTextSecondary":r,font:"body",
1764size:"14",weight:e?"medium":"regular"},s)))),a&&S.createElement(W,{alignItems:"center",color:"modalTextDim",display:"flex"},S.createElement(ZD,null))))}var Ire=3;function Rre({address:t}){const e=MD(),n=xre(),{chain:r}=gr(),i=XD(r),s=e.slice(0,Ire),a=s.length>0,l=Rn(),{appName:u}=K.useContext(Uy),{i18n:d}=K.useContext(kn);return S.createElement(S.Fragment,null,S.createElement(W,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:l?"8":"18"},a&&S.createElement(W,{paddingBottom:l?"4":"0",paddingTop:"8",paddingX:l?"12":"6"},S.createElement(W,{display:"flex",justifyContent:"space-between"},S.createElement(Fe,{color:"modalTextSecondary",size:l?"16":"14",weight:"semibold"},d.t("profile.transactions.recent.title")),S.createElement(W,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},S.createElement(W,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:In({active:"shrink"}),onClick:n,paddingX:l?"8":"12",paddingY:l?"4":"5",transition:"default",type:"button"},S.createElement(Fe,{color:"modalTextSecondary",size:l?"16":"14",weight:"semibold"},d.t("profile.transactions.clear.label")))))),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},a?s.map(h=>S.createElement(Sre,{key:h.hash,tx:h})):S.createElement(S.Fragment,null,S.createElement(W,{padding:l?"12":"8"},S.createElement(Fe,{color:"modalTextDim",size:l?"16":"14",weight:l?"medium":"bold"},u?d.t("profile.transactions.description",{appName:u}):d.t("profile.transactions.description_fallback"))),l&&S.createElement(W,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),i&&S.createElement(W,{paddingBottom:"18",paddingX:l?"8":"18"},S.createElement(W,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:In({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${i}/address/${t}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...l?{paddingLeft:"12"}:{}}
1764,S.createElement(Fe,{color:"modalText",font:"body",size:l?"16":"14",weight:l?"semibold":"bold"},d.t("profile.explorer.label")),S.createElement(ZD,null))))}function n7({action:t,icon:e,label:n,testId:r,url:i}){const s=Rn();return S.createElement(W,{...i?{as:"a",href:i,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...s?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:In({active:"shrinkSm",hover:s?void 0:"grow"}),display:"flex",onClick:t,padding:s?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},S.createElement(W,{color:"modalText",height:"max"},e),S.createElement(W,null,S.createElement(Fe,{color:"modalText",size:s?"12":"13",weight:"semibold"},n))))}function kre({address:t,ensAvatar:e,ensName:n,balance:r,onClose:i,onDisconnect:s}){const a=K.useContext(V2),[l,u]=K.useState(!1),d=K.useCallback(()=>{t&&(navigator.clipboard.writeText(t),u(!0))},[t]);if(K.useEffect(()=>{if(l){const x=setTimeout(()=>{u(!1)},1500);return()=>clearTimeout(x)}},[l]),!t)return null;const h=n?JD(n):YD(t),m=r==null?void 0:r.formatted,g=m?WD(Number.parseFloat(m)):void 0,w="rk_profile_title",A=Rn(),{i18n:v}=K.useContext(kn);return S.createElement(S.Fragment,null,S.createElement(W,{display:"flex",flexDirection:"column"},S.createElement(W,{background:"profileForeground",padding:"16"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:A?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},S.createElement(W,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},S.createElement(Gf,{onClose:i}))," ",S.createElement(W,{marginTop:A?"24":"0"},S.createElement(SD,{address:t,imageUrl:e,size:A?82:74})),S.createElement(W,{display:"flex",flexDirection:"column",gap:A?"4":"0",textAlign:"center"},S.createElement(W,{textAlign:"center"},S.createElement(Fe,{as:"h1",color:"modalText",id:w,size:A?"20":"18",weight:"heavy"},h)),!!r&&S.createElement(W,{textAlign:"center"},S.createElement(Fe,{as:"h1",color:"modalTextSecondary",id:w,size:A?"16":"14",weight:"semibold"},g," ",r.symbol)))),S.createElement(W,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},S.createElement(n7,{action:d,icon:l?S.createElement(vre,null):S.createElement(Are,null),label:l?v.t("profile.copy_address.copied"):v.t("profile.copy_address.label")}),S.createElement(n7,{action:s,icon:S.createElement(Ere,null),label:v.t("profile.disconnect.label"),testId:"disconnect-button"}))),a&&S.createElement(S.Fragment,null,S.createElement(W,{background:"generalBorder",height:"1",marginTop:"-1"}),S.createElement(W,null,S.createElement(Rre,{address:t})))))}function Nre({onClose:t,open:e}){const{address:n}=gr(),{balance:r,ensAvatar:i,ensName:s}=OD({address:n,includeBalance:e}),{disconnect:a}=Gv();return n?S.createElement(S.Fragment,null,n&&S.createElement(jw,{onClose:t,open:e,titleId:"rk_account_modal_title"},S.createElement(Lw,{bottomSheetOnMobile:!0,padding:"0"},S.createElement(kre,{address:n,ensAvatar:i,ensName:s,balance:r,onClose:t,onDisconnect:a})))):null}var Ore=({size:t})=>S.createElement("svg",{fill:"none",height:t,viewBox:"0 0 28 28",width:t,xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Disconnect"),S.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),Bre="v9horb0",G2=S.forwardRef(({children:t,currentlySelected:e=!1,onClick:n,testId:r,...i},s)=>{const a=Rn();return S.createElement(W,{as:"button",borderRadius:"menuButton",disabled:e,display:"flex",onClick:n,ref:s,testId:r,type:"button"},S.createElement(W,{borderRadius:"menuButton",className:[a?Bre:void 0,!e&&In({active:"shrink"})],padding:a?"8":"6",transition:"default",width:"full",...e?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}
1764:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...i},t))});G2.displayName="MenuButton";var Pre=({chainId:t,currentChainId:e,switchChain:n,chainIconSize:r,isLoading:i,src:s,name:a,iconBackground:l,idx:u})=>{const d=Rn(),{i18n:h}=K.useContext(kn),m=sd(),g=e===t;return S.createElement(K.Fragment,null,S.createElement(G2,{currentlySelected:g,onClick:g?void 0:()=>n({chainId:t}),testId:`chain-option-${t}`},S.createElement(W,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:r},s&&S.createElement(W,{height:"full",marginRight:"8"},S.createElement(tr,{alt:a,background:l,borderRadius:"full",height:r,src:s,width:r,testId:`chain-option-${t}-icon`})),S.createElement("div",null,a??a)),g&&S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},S.createElement(Fe,{color:"accentColorForeground",size:"14",weight:"medium"},h.t("chains.connected")),S.createElement(W,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),i&&S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},S.createElement(Fe,{color:"modalText",size:"14",weight:"medium"},h.t("chains.confirm")),S.createElement(W,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),d&&u<m.length-1&&S.createElement(W,{background:"generalBorderDim",height:"1",marginX:"8"}))},Dre=Pre,Mre="_18dqw9x0",jre="_18dqw9x1";function Lre({onClose:t,open:e}){const{chainId:n}=gr(),{chains:r}=nr(),[i,s]=K.useState(null),{switchChain:a}=SZ({mutation:{onMutate:({chainId:A})=>{s(A)},onSuccess:()=>{i&&s(null)},onError:()=>{i&&s(null)},onSettled:()=>{t()}}}),{i18n:l}=K.useContext(kn),{disconnect:u}=Gv(),d="rk_chain_modal_title",h=Rn(),m=r.some(A=>A.id===n),g=h?"36":"28",w=sd();return n?S.createElement(jw,{onClose:t,open:e,titleId:d},S.createElement(Lw,{bottomSheetOnMobile:!0,paddingBottom:"0"},S.createElement(W,{display:"flex",flexDirection:"column",gap:"14"},S.createElement(W,{display:"flex",flexDirection:"row",justifyContent:"space-between"},h&&S.createElement(W,{width:"30"}),S.createElement(W,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},S.createElement(Fe,{as:"h1",color:"modalText",id:d,size:h?"20":"18",weight:"heavy"},l.t("chains.title"))),S.createElement(Gf,{onClose:t})),!m&&S.createElement(W,{marginX:"8",textAlign:h?"center":"left"},S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},l.t("chains.wrong_network"))),S.createElement(W,{className:h?jre:Mre,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},w.map(({iconBackground:A,iconUrl:v,id:x,name:T},O)=>S.createElement(Dre,{key:x,chainId:x,currentChainId:n,switchChain:a,chainIconSize:g,isLoading:i===x,src:v,name:T,iconBackground:A,idx:O})),!m&&S.createElement(S.Fragment,null,S.createElement(W,{background:"generalBorderDim",height:"1",marginX:"8"}),S.createElement(G2,{onClick:()=>u(),testId:"chain-option-disconnect"},S.createElement(W,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:g},S.createElement(W,{alignItems:"center",color:"error",height:g,justifyContent:"center",marginRight:"8"},S.createElement(Ore,{size:Number(g)})),S.createElement("div",null,l.t("chains.disconnect"))))))))))):null}function Ure(t,e){const n={};for(const r of t){const i=e(r);i&&(n[i]||(n[i]=[]),n[i].push(r))}return n}var Q2=({children:t,href:e})=>S.createElement(W,{as:"a",color:"accentColor",href:e,rel:"noreferrer",target:"_blank"},t),K2=({children:t})=>S.createElement(Fe,{color:"modalTextSecondary",size:"12",weight:"medium"},t);function r7({compactModeEnabled:t=!1,getWallet:e}){const{disclaimer:n,learnMoreUrl:r}=K.useContext(Uy),{i18n:i}=K.useContext(kn);return S.createElement(S.Fragment,null,S.createElement(W,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},S.createElement(W,{marginBottom:"10"},!t&&S.createElement(Fe,{color:"modalText",size:"18",weight:"heavy"},i.t("intro.title"))),S.createElement(W,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},S.createElement(W,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},S.createElement(Jne,null)),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},i.t("intro.digital_asset.title")),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},i.t("intro.digital_asset.description")))),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},S.createElement(W,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},S.createElement(Zne,null)),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},i.t("intro.login.title")),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},i.t("intro.login.description"))))),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},S.createElement(Qr,{label:i.t("intro.get.label"),onClick:e}),S.createElement(W,{as:"a",className:In({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},S.createElement(Fe,{color:"accentColor",size:"14",weight:"bold"},i.t("intro.learn_more.label")))),n&&!t&&S.createElement(W,{marginBottom:"8",marginTop:"12",textAlign:"center"},S.createElement(n,{Link:Q2,Text:K2}))))}var eM=()=>S.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Back"),S.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.912
17641 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),Fre=()=>S.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},S.createElement("title",null,"Info"),S.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),Vre=({"aria-label":t="Info",onClick:e})=>{const n=Rn();return S.createElement(W,{alignItems:"center","aria-label":t,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:In({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:e,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},S.createElement(Fre,null))},tM=t=>{const e=K.useRef(null),n=K.useContext(LD),r=Zv(t);return K.useEffect(()=>{if(n&&e.current&&r)return Hre(e.current,r)},[n,r]),e},zre=()=>{const t="_rk_coolMode",e=document.getElementById(t);if(e)return e;const n=document.createElement("div");return n.setAttribute("id",t),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n},i7=0;function Hre(t,e){i7++;const n=[15,20,25,35,45],r=35;let i=[],s=!1,a=0,l=0;const u=zre();function d(){const P=n[Math.floor(Math.random()*n.length)],B=Math.random()*10,U=Math.random()*25,I=Math.random()*360,R=Math.random()*35*(Math.random()<=.5?-1:1),M=l-P/2,F=a-P/2,j=Math.random()<=.5?-1:1,q=document.createElement("div");q.innerHTML=`<img src="${e}" width="${P}" height="${P}" style="border-radius: 25%">`,q.setAttribute("style",["position:absolute","will-change:transform",`top:${M}px`,`left:${F}px`,`transform:rotate(${I}deg)`].join(";")),u.appendChild(q),i.push({direction:j,element:q,left:F,size:P,speedHorz:B,speedUp:U,spinSpeed:R,spinVal:I,top:M})}function h(){for(const P of i)P.left=P.left-P.speedHorz*P.direction,P.top=P.top-P.speedUp,P.speedUp=Math.min(P.size,P.speedUp-1),P.spinVal=P.spinVal+P.spinSpeed,P.top>=Math.max(window.innerHeight,document.body.clientHeight)+P.size&&(i=i.filter(B=>B!==P),P.element.remove()),P.element.setAttribute("style",["position:absolute","will-change:transform",`top:${P.top}px`,`left:${P.left}px`,`transform:rotate(${P.spinVal}deg)`].join(";"))}let m;function g(){s&&i.length<r&&d(),h(),m=requestAnimationFrame(g)}g();const w="ontouchstart"in window||navigator.msMaxTouchPoints,A=w?"touchstart":"mousedown",v=w?"touchend":"mouseup",x=w?"touchmove":"mousemove",T=P=>{var B,U;"touches"in P?(a=(B=P.touches)==null?void 0:B[0].clientX,l=(U=P.touches)==null?void 0:U[0].clientY):(a=P.clientX,l=P.clientY)},O=P=>{T(P),s=!0},k=()=>{s=!1};return t.addEventListener(x,T,{passive:!1}),t.addEventListener(A,O),t.addEventListener(v,k),t.addEventListener("mouseleave",k),()=>{t.removeEventListener(x,T),t.removeEventListener(A,O),t.removeEventListener(v,k),t.removeEventListener("mouseleave",k);const P=setInterval(()=>{m&&i.length===0&&(cancelAnimationFrame(m),clearInterval(P),--i7===0&&u.remove())},500)}}var qre="g5kl0l0",nM=({as:t="button",currentlySelected:e=!1,iconBackgroun
1764d:n,iconUrl:r,name:i,onClick:s,ready:a,recent:l,testId:u,isRainbowKitConnector:d,...h})=>{const m=tM(r),[g,w]=S.useState(!1),{i18n:A}=S.useContext(kn);return S.createElement(W,{display:"flex",flexDirection:"column",onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),ref:m},S.createElement(W,{as:t,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:e?void 0:[qre,In({active:"shrink"})],disabled:e,onClick:s,padding:"5",style:{willChange:"transform"},testId:u,transition:"default",width:"full",...e?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...h},S.createElement(W,{color:e?"accentColorForeground":"modalText",disabled:!a,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},S.createElement(tr,{background:n,...!g&&d?{borderColor:"actionButtonBorder"}:{},useAsImage:!d,borderRadius:"6",height:"28",src:r,width:"28"}),S.createElement(W,null,S.createElement(W,{style:{marginTop:l?-2:void 0},maxWidth:"200"},i),l&&S.createElement(Fe,{color:e?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},A.t("connect.recent")))))))};nM.displayName="ModalSelection";var $re="rk-latest-id";function Gre(t){localStorage.setItem($re,t)}var D3=(t,e=1)=>{let n=t.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=Number.parseInt(n.substring(0,2),16),i=Number.parseInt(n.substring(2,4),16),s=Number.parseInt(n.substring(4,6),16);return e>1&&e<=100&&(e=e/100),`rgba(${r},${i},${s},${e})`},Qre=t=>t?[D3(t,.2),D3(t,.14),D3(t,.1)]:null,Kre=t=>/^#([0-9a-f]{3}){1,2}$/i.test(t),rM=async()=>(await Te(async()=>{const{default:t}=await import("./connect-UA7M4XW6-IY3X6Bmr.js");return{default:t}},[])).default,Wre=()=>qo(rM),Yre=()=>S.createElement(tr,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:rM,width:"48"}),iM=async()=>(await Te(async()=>{const{default:t}=await import("./create-FASO7PVG-D_rvSpre.js");return{default:t}},[])).default,sM=()=>qo(iM),Jre=()=>S.createElement(tr,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:iM,width:"48"}),oM=async()=>(await Te(async()=>{const{default:t}=await import("./refresh-S4T5V5GX-CwqIaaxK.js");return{default:t}},[])).default,Xre=()=>qo(oM),Zre=()=>S.createElement(tr,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:oM,width:"48"}),aM=async()=>(await Te(async()=>{const{default:t}=await import("./scan-4UYSQ56Q-CjMz6-XC.js");return{default:t}},[])).default,cM=()=>qo(aM),eie=()=>S.createElement(tr,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:aM,width:"48"}),tie="_1vwt0cg0",nie="_1vwt0cg2 ju367v7a ju367v7v",rie="_1vwt0cg3",iie="_1vwt0cg4";function lM({ecc:t="medium",logoBackground:e,logoSize:n=50,logoUrl:r,size:i=200,uri:s}){const l=i-Number.parseInt("20",10)*2,u=Zv(r);return S.createElement(W,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:tie,padding:"20",width:"max"},S.createElement(W,{style:{height:l,userSelect:"none",width:l},userSelect:"none"},S.createElement(ko.Root,{errorCorrection:t,size:l,value:s},S.createElement(ko.Cells,{radius:1}),S.createElement(ko.Finder,{radius:.25}),u&&S.createElement(ko.Arena,null,S.createElement("img",{alt:"Wallet Logo",src:u,style:{objectFit:"cover",height:"88%",width:"88%",borderRadius:"22.5%",backgroundColor:e}})))))}var uM=async()=>{switch(H2()){case"Arc":return(await Te(async()=>{const{default:e}=await import("./Arc-VDBY7LNS-BChRXCXW.js");return{default:e}},[])).default;case"Brave":return(await Te(async()=>{const{default:e}=await import("./Brave-BRAKJXDS-mq-Xo37j.js");return{default:e}},[])).default;case"Chrome":return(await Te(async()=>{const{default:e}=await import("./Chrome-65Q5P54Y-DR9MQEVr.js");return{default:e}},[])).default;case"Edge":return(await Te(async()=>{const{default:e}=await import("./Edge-XSPUTORV-DEoZslQE.js");return{default:e}},[])).default;case"Firefox":return(await Te(async()=>{const{default:e}=await import("./Firefox-AAHGJQIP-Bp_Hm04m.js");return{default:e}},[])).default;case"Opera":return(await Te(async()=>{const{default:e}=await import("./Opera-KQZLSACL-Cwv5MDFy.js");return{default:e}},[])).default;case"Safari":return(await Te(async()=>{const{default:e}=await import("./Safari-ZPL37GXR-C4Ggg6rz.js");return{default:e}},[])).default;default:return(await Te(async()=>{const{default:e}=await import("./Browser-76IHF3Y2-BMhRaC5Z.js");return{default:e}},[])).default}},sie=()=>qo(uM),fM=async()=>{switch($2()){case"Windows":return(await Te(async()=>{const{default:e}=await import("./Windows-PPTHQER6-BlyV2p7Y.js");return{default:e}},[])).default;case"macOS":return(await Te(async()=>{const{default:e}=await import("./Macos-MW4AE7LN-Vvm8Drw3.js");return{default:e}},[])).default;case"Linux":return(await Te(async()=>{const{default:e}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:e}},[])).default;default:return(await Te(async()=>{const{default:e}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:e}},[])).default}},oie=()=>qo(fM);function aie({getWalletDownload:t,compactModeEnabled:e}){const r=Hg().filter(s=>s.isRainbowKitConnector).splice(0,5),{i18n:i}=K.useContext(kn);return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},r==null?void 0:r.filter(s=>{var a;return s.extensionDownloadUrl||s.desktopDownloadUrl||s.qrCode&&((a=s.downloadUrls)==null?void 0:a.qrCode)}).map(s=>
1764{const{downloadUrls:a,iconBackground:l,iconUrl:u,id:d,name:h,qrCode:m}=s,g=(a==null?void 0:a.qrCode)&&m,w=!!s.extensionDownloadUrl,A=(a==null?void 0:a.qrCode)&&w,v=(a==null?void 0:a.qrCode)&&!!s.desktopDownloadUrl;return S.createElement(W,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:s.id,width:"full"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},S.createElement(tr,{background:l,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:u,width:"48"}),S.createElement(W,{display:"flex",flexDirection:"column",gap:"2"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},h),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},A?i.t("get.mobile_and_extension.description"):v?i.t("get.mobile_and_desktop.description"):g?i.t("get.mobile.description"):w?i.t("get.extension.description"):null))),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},S.createElement(Qr,{label:i.t("get.action.label"),onClick:()=>t(d),type:"secondary"})))})),S.createElement(W,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},i.t("get.looking_for.title")),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},e?i.t("get.looking_for.desktop.compact_description"):i.t("get.looking_for.desktop.wide_description"))))}var M3="44";function cie({changeWalletStep:t,compactModeEnabled:e,connectionError:n,onClose:r,qrCodeUri:i,reconnect:s,wallet:a}){const{downloadUrls:l,iconBackground:u,iconUrl:d,name:h,qrCode:m,ready:g,showWalletConnectModal:w,getDesktopUri:A}=a,v=!!A,x=z2(),{i18n:T}=K.useContext(kn),O=!!a.extensionDownloadUrl,k=(l==null?void 0:l.qrCode)&&O,P=(l==null?void 0:l.qrCode)&&!!a.desktopDownloadUrl,B=m&&i,U=async()=>{const F=await(A==null?void 0:A());window.open(F,x?"_blank":"_self")},I=w?{description:e?T.t("connect.walletconnect.description.compact"):T.t("connect.walletconnect.description.full"),label:T.t("connect.walletconnect.open.label"),onClick:()=>{r(),w()}}:B?{description:T.t("connect.secondary_action.get.description",{wallet:h}),label:T.t("connect.secondary_action.get.label"),onClick:()=>t(k||P?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:R}=UD(),M=R&&R<768;return K.useEffect(()=>{sie(),oie()},[]),S.createElement(W,{display:"flex",flexDirection:"column",height:"full",width:"full"},B?S.createElement(W,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},S.createElement(lM,{logoBackground:u,logoSize:e?60:72,logoUrl:d,size:e?318:M?Math.max(280,Math.min(R-308,382)):382,uri:i})):S.createElement(W,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},S.createElement(W,{borderRadius:"10",height:M3,overflow:"hidden"},S.createElement(tr,{useAsImage:!a.isRainbowKitConnector,height:M3,src:d,width:M3})),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},S.createElement(Fe,{color:"modalText",size:"18",weight:"bold"},g?T.t("connect.status.opening",{wallet:h}):O?T.t("connect.status.not_installed",{wallet:h}):T.t("connect.status.not_available",{wallet:h})),!g&&O?S.createElement(W,{paddingTop:"20"},S.createElement(Qr,{href:a.extensionDownloadUrl,label:T.t("connect.secondary_action.install.label"),type:"secondary"})):null,g&&!B&&S.createElement(S.Fragment,null,S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},S.createElement(Fe,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},T.t("connect.status.confirm"))),S.createElement(W,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?S.createElement(Qr,{label:T.t("connect.secondary_action.retry.label"),onClick:async()=>{v&&U(),s(a)}}):S.createElement(W,{color:"modalTextSecondary"},S.createElement(zg,null))))))),S.createElement(W,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},g&&I&&S.createElement(S.Fragment,null,S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},I.description),S.createElement(Qr,{label:I.label,onClick:I.onClick,type:"secondary"}))))}
1764var j3=({actionLabel:t,description:e,iconAccent:n,iconBackground:r,iconUrl:i,isCompact:s,onAction:a,title:l,url:u,variant:d})=>{const h=d==="browser",m=!h&&n&&Qre(n);return S.createElement(W,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:s?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},S.createElement(W,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),h&&S.createElement(W,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},S.createElement(W,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},S.createElement(W,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},S.createElement(tr,{borderRadius:"full",height:"200",src:i,width:"200"})),S.createElement(W,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},S.createElement(tr,{borderRadius:"full",height:"200",src:i,width:"200"})))),!h&&m&&S.createElement(W,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},S.createElement(W,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${m[0]} 0%, ${m[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),S.createElement(W,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${m[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),S.createElement(W,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},S.createElement(W,null,S.createElement(tr,{height:"60",src:i,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},l),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},e),S.createElement(W,{marginTop:"14",width:"max"},S.createElement(Qr,{href:u,label:t,onClick:a,size:"medium"})))))};function lie({changeWalletStep:t,wallet:e}){const n=H2(),r=$2(),s=K.useContext(e6)==="compact",{desktop:a,desktopDownloadUrl:l,extension:u,extensionDownloadUrl:d,mobileDownloadUrl:h}=e,{i18n:m}=K.useContext(kn);return K.useEffect(()=>{sM(),cM(),Xre(),Wre()},[]),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},d&&S.createElement(j3,{actionLabel:m.t("get_options.extension.download.label",{browser:n}),description:m.t("get_options.extension.description"),iconUrl:uM,isCompact:s,onAction:()=>t(u!=null&&u.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:m.t("get_options.extension.title",{wallet:e.name,browser:n}),url:d,variant:"browser"}),l&&S.createElement(j3,{actionLabel:m.t("get_options.desktop.download.label",{platform:r}),description:m.t("get_options.desktop.description"),iconUrl:fM,isCompact:s,onAction:()=>t(a!=null&&a.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:m.t("get_options.desktop.title",{wallet:e.name,platform:r}),url:l,variant:"desktop"}),h&&S.createElement(j3,{actionLabel:m.t("get_options.mobile.download.label",{wallet:e.name}),description:m.t("get_options.mobile.description"),iconAccent:e.iconAccent,iconBackground:e.iconBackground,iconUrl:e.iconUrl,isCompact:s,onAction:()=>{t("DOWNLOAD")},title:m.t("get_options.mobile.title",{wallet:e.name}),variant:"app"})))}function uie({changeWalletStep:t,wallet:e}){const{downloadUrls:n,qrCode:r}=e,{i18n:i}=K.useContext(kn);return K.useEffect(()=>{sM(),cM()},[]),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},S.createElement(W,{style:{maxWidth:220,textAlign:"center"}},S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"semibold"},i.t("get_mobile.description"))),S.createElement(W,{height:"full"},n!=null&&n.qrCode?S.createElement(lM,{logoSize:0,size:268,uri:n.qrCode}):null),S.createElement(W,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},S.createElement(Qr,{label:i.t("get_mobile.continue.label"),onClick:()=>t(r!=null&&r.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Xa={connect:()=>S.createElement(Yre,null),create:()=>S.createElement(Jre,null),install:t=>
1764S.createElement(tr,{background:t.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:t.iconUrl,width:"48"}),refresh:()=>S.createElement(Zre,null),scan:()=>S.createElement(eie,null)};function fie({connectWallet:t,wallet:e}){var r,i,s,a;const{i18n:n}=K.useContext(kn);return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},S.createElement(W,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(i=(r=e==null?void 0:e.qrCode)==null?void 0:r.instructions)==null?void 0:i.steps.map((l,u)=>{var d;return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:u},S.createElement(W,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(d=Xa[l.step])==null?void 0:d.call(Xa,e)),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},n.t(l.title,void 0,{rawKeyIfTranslationMissing:!0})),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(l.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},S.createElement(Qr,{label:n.t("get_instructions.mobile.connect.label"),onClick:()=>t(e)}),S.createElement(W,{as:"a",className:In({active:"shrink",hover:"grow"}),display:"block",href:(a=(s=e==null?void 0:e.qrCode)==null?void 0:s.instructions)==null?void 0:a.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},S.createElement(Fe,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.mobile.learn_more.label")))))}function die({wallet:t}){var n,r,i,s;const{i18n:e}=K.useContext(kn);return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},S.createElement(W,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(r=(n=t==null?void 0:t.extension)==null?void 0:n.instructions)==null?void 0:r.steps.map((a,l)=>{var u;return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:l},S.createElement(W,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(u=Xa[a.step])==null?void 0:u.call(Xa,t)),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},e.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},e.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},S.createElement(Qr,{label:e.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),S.createElement(W,{as:"a",className:In({active:"shrink",hover:"grow"}),display:"block",href:(s=(i=t==null?void 0:t.extension)==null?void 0:i.instructions)==null?void 0:s.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},S.createElement(Fe,{color:"accentColor",size:"14",weight:"bold"},e.t("get_instructions.extension.learn_more.label")))))}function hie({connectWallet:t,wallet:e}){var r,i,s,a;const{i18n:n}=K.useContext(kn);return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},S.createElement(W,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(i=(r=e==null?void 0:e.desktop)==null?void 0:r.instructions)==null?void 0:i.steps.map((l,u)=>{var d;return S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:u},S.createElement(W,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(d=Xa[l.step])==null?void 0:d.call(Xa,e)),S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},S.createElement(Fe,{color:"modalText",size:"14",weight:"bold"},n.t(l.title,void 0,{rawKeyIfTranslationMissing:!0})),S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(l.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},S.createElement(Qr,{label:n.t("get_instructions.desktop.connect.label"),onClick:()=>t(e)}),S.createElement(W,{as:"a",className:In({active:"shrink",hover:"grow"}),display:"block",href:(a=(s=e==null?void 0:e.desktop)==null?void 0:s.instructions)==null?void 0:a.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},S.createElement(Fe,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.desktop.learn_more.label")))))}function pie({onClose:t}){const e="rk_connect_title",[n,r]=K.useState(),[i,s]=K.useState(),[a,l]=K.useState(),u=!!(i!=null&&i.qrCode)&&a,[d,h]=K.useState(!1),g=K.useContext(e6)===Vy.COMPACT,{disclaimer:w}=K.useContext(Uy),{i18n:A}=K.useContext(kn),v=z2(),x=K.useRef(!1),{connector:T}=K.useContext(Fy),k=Hg(!T).filter(me=>me.ready||!!me.extensionDownloadUrl).sort((me,ve)=>me.groupIndex-ve.groupIndex),P=Hg(),B=Ure(k,me=>me.groupName),U=["Recommended","Other","Popular","More","Others","Installed"];K.useEffect(()=>{T&&!x.current&&(L("CONNECT"),F(T),x.current=!0)},[T]);const I=me=>{var ve,_e;h(!1),me.ready&&((_e=(ve=me==null?void 0:me.connect)==null?void 0:ve.call(me))==null||_e.catch(()=>{h(!0)}))},R=async me=>{const ve=k.find(_e=>
1764me.id===_e.id);ve!=null&&ve.getDesktopUri&&setTimeout(async()=>{var Re;const _e=await((Re=ve==null?void 0:ve.getDesktopUri)==null?void 0:Re.call(ve));_e&&window.open(_e,v?"_blank":"_self")},0)},M=async me=>{var Re;const ve=k.find(De=>me.id===De.id),_e=await((Re=ve==null?void 0:ve.getQrCodeUri)==null?void 0:Re.call(ve));l(_e),setTimeout(()=>{s(ve),L("CONNECT")},_e?0:50)},F=async me=>{Gre(me.id),me.ready&&(M(me),R(me)),I(me),r(me.id),me.ready||(s(me),L(me!=null&&me.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT"))},j=me=>{var qe;const ve=P.find(it=>me===it.id),_e=(qe=ve==null?void 0:ve.downloadUrls)==null?void 0:qe.qrCode,Re=!!(ve!=null&&ve.desktopDownloadUrl),De=!!(ve!=null&&ve.extensionDownloadUrl);s(ve),L(_e&&(De||Re)?"DOWNLOAD_OPTIONS":_e?"DOWNLOAD":Re?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},q=()=>{r(void 0),s(void 0),l(void 0)},L=(me,ve=!1)=>{ve&&me==="GET"&&Se==="GET"?q():!ve&&me==="GET"?X("GET"):!ve&&me==="CONNECT"&&X("CONNECT"),te(me)},[Se,X]=K.useState("NONE"),[Q,te]=K.useState("NONE");let J=null,fe=null,$=null,se;K.useEffect(()=>{h(!1)},[Q,i]);const pe=!!(!!(i!=null&&i.extensionDownloadUrl)&&(i!=null&&i.mobileDownloadUrl));switch(Q){case"NONE":J=S.createElement(r7,{getWallet:()=>L("GET")});break;case"LEARN_COMPACT":J=S.createElement(r7,{compactModeEnabled:g,getWallet:()=>L("GET")}),fe=A.t("intro.title"),$="NONE";break;case"GET":J=S.createElement(aie,{getWalletDownload:j,compactModeEnabled:g}),fe=A.t("get.title"),$=g?"LEARN_COMPACT":"NONE";break;case"CONNECT":J=i&&S.createElement(cie,{changeWalletStep:L,compactModeEnabled:g,connectionError:d,onClose:t,qrCodeUri:a,reconnect:I,wallet:i}),fe=u&&(i.name==="WalletConnect"?A.t("connect_scan.fallback_title"):A.t("connect_scan.title",{wallet:i.name})),$=g?T?null:"NONE":null,se=g?T?()=>{}:q:()=>{};break;case"DOWNLOAD_OPTIONS":J=i&&S.createElement(lie,{changeWalletStep:L,wallet:i}),fe=i&&A.t("get_options.short_title",{wallet:i.name}),$=T?"CONNECT":g?"NONE":Se;break;case"DOWNLOAD":J=i&&S.createElement(uie,{changeWalletStep:L,wallet:i}),fe=i&&A.t("get_mobile.title",{wallet:i.name}),$=pe?"DOWNLOAD_OPTIONS":Se;break;case"INSTRUCTIONS_MOBILE":J=i&&S.createElement(fie,{connectWallet:F,wallet:i}),fe=i&&A.t("get_options.title",{wallet:g&&i.shortName||i.name}),$="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":J=i&&S.createElement(die,{wallet:i}),fe=i&&A.t("get_options.title",{wallet:g&&i.shortName||i.name}),$="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":J=i&&S.createElement(hie,{connectWallet:F,wallet:i}),fe=i&&A.t("get_options.title",{wallet:g&&i.shortName||i.name}),$="DOWNLOAD_OPTIONS";break}return S.createElement(W,{display:"flex",flexDirection:"row",style:{maxHeight:g?468:504}},(g?Q==="NONE":!0)&&S.createElement(W,{className:g?iie:rie,display:"flex",flexDirection:"column",marginTop:"16"},S.createElement(W,{display:"flex",justifyContent:"space-between"},g&&w&&S.createElement(W,{marginLeft:"16",width:"28"},S.createElement(Vre,{onClick:()=>L("LEARN_COMPACT")})),g&&!w&&S.createElement(W,{marginLeft:"16",width:"28"}),S.createElement(W,{marginLeft:g?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},S.createElement(Fe,{as:"h1",color:"modalText",id:e,size:"18",weight:"heavy",testId:"connect-header-label"},A.t("connect.title"))),g&&S.createElement(W,{marginRight:"16"},S.createElement(Gf,{onClose:t}))),S.createElement(W,{className:nie,paddingBottom:"18"},Object.entries(B).map(([me,ve],_e)=>ve.length>0&&S.createElement(K.Fragment,{key:_e},me?S.createElement(W,{marginBottom:"8",marginTop:"16",marginX:"6"},S.createElement(Fe,{color:me==="Installed"?"accentColor":"modalTextSecondary",size:"14",weight:"bold"},U.includes(me)?A.t(`connector_group.${me.toLowerCase()}`):me)):null,S.createElement(W,{display:"flex",flexDirection:"column",gap:"4"},ve.map(Re=>S.createElement(nM,{currentlySelected:Re.id===n,iconBackground:Re.iconBackground,iconUrl:Re.iconUrl,key:Re.id,name:Re.name,onClick:()=>F(Re),ready:Re.ready,recent:Re.recent,testId:`wallet-option-${Re.id}`,isRainbowKitConnector:Re.isRainbowKitConnector})))))),g&&S.createElement(S.Fragment,null,S.createElement(W,{background:"generalBorder",height:"1",marginTop:"-1"}),w?S.createElement(W,{paddingX:"24",paddingY:"16",textAlign:"center"},S.createElement(w,{Link:Q2,Text:K2})):S.createElement(W,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},S.createElement(W,{paddingY:"4"},S.createElement(Fe,{color:"modalTextSecondary",size:"14",weight:"medium"},A.t("connect.new_to_ethereum.description"))),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},S.createElement(W,{className:In({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>L("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},S.createElement(Fe,{color:"accentColor",size:"14",weight:"bold"},A.t("connect.new_to_ethereum.learn_more.label"))))))),(g?Q!=="NONE":!0)&&S.createElement(S.Fragment,null,!g&&S.createElement(W,{background:"generalBorder",minWidth:"1",
1764width:"1"}),S.createElement(W,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},S.createElement(W,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},S.createElement(W,{width:"28"},$&&S.createElement(W,{as:"button",className:In({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{$&&L($,!0),se==null||se()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},S.createElement(eM,null))),S.createElement(W,{display:"flex",justifyContent:"center",style:{flexGrow:1}},fe&&S.createElement(Fe,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},fe)),S.createElement(Gf,{onClose:t})),S.createElement(W,{display:"flex",flexDirection:"column",style:{minHeight:g?396:432}},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},J)))))}var mie="_1am14412",gie="_1am14410",yie="_1am14413",bie=({wallet:t})=>S.createElement("svg",{className:yie,viewBox:"0 0 86 86",width:"86",height:"86"}
1764,S.createElement("title",null,"Loading"),S.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${320/3}`,strokeDashoffset:160,className:mie,style:{stroke:(t==null?void 0:t.iconAccent)||"#0D3887"}}));function dM({onClose:t,wallet:e,connecting:n}){const{connect:r,iconBackground:i,iconUrl:s,id:a,name:l,getMobileUri:u,ready:d,shortName:h,showWalletConnectModal:m}=e,g=tM(s),w=K.useRef(!1),{i18n:A}=K.useContext(kn),v=K.useCallback(async()=>{if(a!=="walletConnect"&&(async()=>{const T=await(u==null?void 0:u());if(T)if(T&&ire({mobileUri:T,name:l}),T.startsWith("http")){const O=document.createElement("a");O.href=T,O.target="_blank",O.rel="noreferrer noopener",O.click()}else window.location.href=T})(),m){m(),t==null||t();return}try{await(r==null?void 0:r())}catch{}},[r,u,m,t,l,a]);return K.useEffect(()=>{n&&!w.current&&(v(),w.current=!0)},[n,v]),S.createElement(W,{as:"button",color:d?"modalText":"modalTextSecondary",disabled:!d,fontFamily:"body",key:a,onClick:v,ref:g,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${a}`,type:"button",width:"full"},S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},S.createElement(W,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?S.createElement(bie,{wallet:e}):null,S.createElement(tr,{background:i,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:s,width:"60"})),n?null:S.createElement(W,{display:"flex",flexDirection:"column",textAlign:"center"},S.createElement(Fe,{as:"h2",color:e.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},S.createElement(W,{as:"span",position:"relative"},h??l,!e.ready&&" (unsupported)")),e.recent&&S.createElement(Fe,{color:"accentColor",size:"12",weight:"medium"},A.t("connect.recent")))))}function wie({onClose:t}){var w;const e="rk_connect_title",n=Hg().filter(A=>A.isRainbowKitConnector),{disclaimer:r,learnMoreUrl:i}=K.useContext(Uy);let s=null,a=null,l=!1,u=null;const[d,h]=K.useState("CONNECT"),{i18n:m}=K.useContext(kn),g=y0();switch(d){case"CONNECT":{s=m.t("connect.title"),l=!0,a=S.createElement(W,null,S.createElement(W,{background:"profileForeground",className:gie,display:"flex",paddingBottom:"20",paddingTop:"6"},S.createElement(W,{display:"flex",style:{margin:"0 auto"}},n.filter(A=>A.ready).map(A=>S.createElement(W,{key:A.id,paddingX:"20"},S.createElement(W,{width:"60"},S.createElement(dM,{onClose:t,wallet:A})))))),S.createElement(W,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},S.createElement(W,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},S.createElement(Fe,{color:"modalText",size:"16",weight:"bold"},m.t("intro.title")),S.createElement(Fe,{color:"modalTextSecondary",size:"16"},m.t("intro.description")))),S.createElement(W,{paddingTop:"32",paddingX:"20"},S.createElement(W,{display:"flex",gap:"14",justifyContent:"center"},S.createElement(Qr,{label:m.t("intro.get.label"),onClick:()=>h("GET"),size:"large",type:"secondary"}),S.createElement(Qr,{href:i,label:m.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&S.createElement(W,{marginTop:"28",marginX:"32",textAlign:"center"},S.createElement(r,{Link:Q2,Text:K2})));break}case"GET":{s=m.t("get.title"),u="CONNECT";const A=(w=n==null?void 0:n.filter(v=>{var x,T,O;return((x=v.downloadUrls)==null?void 0:x.ios)||((T=v.downloadUrls)==null?void 0:T.android)||((O=v.downloadUrls)==null?void 0:O.mobile)}))==null?void 0:w.splice(0,3);a=S.createElement(W,null,S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},A.map((v,x)=>{const{downloadUrls:T,iconBackground:O,iconUrl:k,name:P}=v;return!(T!=null&&T.ios)&&!(T!=null&&T.android)&&!(T!=null&&T.mobile)?null:S.createElement(W,{display:"flex",gap:"16",key:v.id,paddingX:"20",width:"full"},S.createElement(W,{style:{minHeight:48,minWidth:48}},S.createElement(tr,{background:O,borderColor:"generalBorder",borderRadius:"10",height:"48",src:k,width:"48"})),S.createElement(W,{display:"flex",flexDirection:"column",width:"full"},S.createElement(W,{alignItems:"center",display:"flex",height:"48"},S.createElement(W,{width:"full"},S.createElement(Fe,{color:"modalText",size:"18",weight:"bold"},P)),S.createElement(Qr,{href:(g?T==null?void 0:T.ios:T==null?void 0:T.android)||(T==null?void 0:T.mobile),label:m.t("get.action.label"),size:"small",type:"secondary"})),x<A.length-1&&S.createElement(W,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"})))})),S.createElement(W,{style:{marginBottom:"42px"}}),S.createElement(W,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},S.createElement(W,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},S.createElement(Fe,{color:"modalText",size:"16",weight:"bold"},m.t("get.looking_for.title")),S.createElement(Fe,{color:"modalTextSecondary",size:"16"},m.t("get.looking_for.mobile.description")))));break}}return S.createElement(W,{display:"flex",flexDirection:"column",paddingBottom:"36"},S.createElement(W,{background:l?"profileForeground":"modalBackgroun
1764d",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},S.createElement(W,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},u&&S.createElement(W,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},S.createElement(W,{alignItems:"center",as:"button",className:In({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>h(u),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},S.createElement(eM,null))),S.createElement(W,{marginTop:"4",textAlign:"center",width:"full"},S.createElement(Fe,{as:"h1",color:"modalText",id:e,size:"20",weight:"bold"},s)),S.createElement(W,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},S.createElement(W,{style:{marginBottom:-20,marginTop:-20}},S.createElement(Gf,{onClose:t}))))),S.createElement(W,{display:"flex",flexDirection:"column"},a))}var vie=({onClose:t})=>{const{connector:e}=K.useContext(Fy),{i18n:n}=K.useContext(kn),r=(e==null?void 0:e.name)||"";return S.createElement(W,null,S.createElement(W,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},S.createElement(W,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},S.createElement(Gf,{onClose:t})),S.createElement(W,{width:"60"},S.createElement(dM,{onClose:t,wallet:e,connecting:!0})),S.createElement(W,{marginTop:"20"},S.createElement(Fe,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),S.createElement(W,{maxWidth:"full",marginTop:"8"},S.createElement(Fe,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function Aie({onClose:t}){const{connector:e}=K.useContext(Fy);return Rn()?e?S.createElement(vie,{onClose:t}):S.createElement(wie,{onClose:t}):S.createElement(pie,{onClose:t})}function Eie({onClose:t,open:e}){const n="rk_connect_title",r=L2(),{disconnect:i}=Gv(),{isConnecting:s}=gr(),a=S.useCallback(()=>{t(),i()},[t,i]),l=S.useCallback(()=>{s&&i(),t()},[t,i,s]);return r==="disconnected"?S.createElement(jw,{onClose:l,open:e,titleId:n},S.createElement(Lw,{bottomSheetOnMobile:!0,padding:"0",wide:!0},S.createElement(Aie,{onClose:l}))):r==="unauthenticated"?S.createElement(jw,{onClose:a,open:e,titleId:n},S.createElement(Lw,{bottomSheetOnMobile:!0,padding:"0"},S.createElement(nre,{onClose:a,onCloseModal:t}))):null}function L3(){const[t,e]=K.useState(!1);return{closeModal:K.useCallback(()=>e(!1),[]),isModalOpen:t,openModal:K.useCallback(()=>e(!0),[])}}var b0=K.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1,isWalletConnectModalOpen:!1,setIsWalletConnectModalOpen:()=>{}});function xie({children:t}){const{closeModal:e,isModalOpen:n,openModal:r}=L3(),{closeModal:i,isModalOpen:s,openModal:a}=L3(),{closeModal:l,isModalOpen:u,openModal:d}=L3(),[h,m]=K.useState(!1),g=L2(),{chainId:w}=gr(),{chains:A}=nr(),v=A.some(O=>
1764O.id===w),x=K.useCallback(({keepConnectModalOpen:O=!1}={})=>{O||e(),i(),l()},[e,i,l]),T=Xv()==="unauthenticated";return cP({onConnect:()=>x({keepConnectModalOpen:T}),onDisconnect:()=>x()}),K.useEffect(()=>{T&&x()},[T,x]),S.createElement(b0.Provider,{value:K.useMemo(()=>({accountModalOpen:s,chainModalOpen:u,connectModalOpen:n,isWalletConnectModalOpen:h,openAccountModal:v&&g==="connected"?a:void 0,openChainModal:g==="connected"?d:void 0,openConnectModal:g==="disconnected"||g==="unauthenticated"?r:void 0,setIsWalletConnectModalOpen:m}),[g,s,u,n,a,d,r,v,h])},t,S.createElement(Eie,{onClose:e,open:n}),S.createElement(Nre,{onClose:i,open:s}),S.createElement(Lre,{onClose:l,open:u}))}function Cie(){const{accountModalOpen:t,chainModalOpen:e,connectModalOpen:n}=K.useContext(b0);return{accountModalOpen:t,chainModalOpen:e,connectModalOpen:n}}function _ie(){const{accountModalOpen:t,openAccountModal:e}=K.useContext(b0);return{accountModalOpen:t,openAccountModal:e}}function Tie(){const{chainModalOpen:t,openChainModal:e}=K.useContext(b0);return{chainModalOpen:t,openChainModal:e}}function hM(){const{isWalletConnectModalOpen:t,setIsWalletConnectModalOpen:e}=K.useContext(b0);return{isWalletConnectModalOpen:t,setIsWalletConnectModalOpen:e}}function Sie(){const{connectModalOpen:t,openConnectModal:e}=K.useContext(b0),{isWalletConnectModalOpen:n}=hM();return{connectModalOpen:t||n,openConnectModal:e}}var U3=()=>{};function W2({children:t}){const e=cne(),{address:n}=gr(),{chainId:r}=gr(),{chains:i}=nr(),s=i.some(q=>q.id===r),a=one(),l=Xv()??void 0,u=r?a[r]:void 0,d=(u==null?void 0:u.name)??void 0,h=(u==null?void 0:u.iconUrl)??void 0,m=(u==null?void 0:u.iconBackground)??void 0,g=Zv(h),w=K.useContext(V2),A=MD().some(({status:q})=>q==="pending")&&w,{showBalance:v}=kD(),T=typeof v=="boolean"?v:v?vD(v)[Rn()?"smallScreen":"largeScreen"]:!0,{balance:O,ensAvatar:k,ensName:P}=OD({address:n,includeBalance:T}),B=O?`${WD(Number.parseFloat(O.formatted))} ${O.symbol}`:void 0,{openConnectModal:U}=Sie(),{openChainModal:I}=Tie(),{openAccountModal:R}=_ie(),{accountModalOpen:M,chainModalOpen:F,connectModalOpen:j}=Cie();return S.createElement(S.Fragment,null,t({account:n?{address:n,balanceDecimals:O==null?void 0:O.decimals,balanceFormatted:O==null?void 0:O.formatted,balanceSymbol:O==null?void 0:O.symbol,displayBalance:B,displayName:P?JD(P):YD(n),ensAvatar:k??void 0,ensName:P??void 0,hasPendingTransactions:A}:void 0,accountModalOpen:M,authenticationStatus:l,chain:r?{hasIcon:!!h,iconBackground:m,iconUrl:g,id:r,name:d,unsupported:!s}:void 0,chainModalOpen:F,connectModalOpen:j,mounted:e(),openAccountModal:R??U3,openChainModal:I??U3,openConnectModal:U??U3}))}W2.displayName="ConnectButton.Custom";var Gm={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function t6({accountStatus:t=Gm.accountStatus,chainStatus:e=Gm.chainStatus,label:n=Gm.label,showBalance:r=Gm.showBalance}){const i=sd(),s=L2(),{setShowBalance:a}=kD(),[l,u]=K.useState(!1),{i18n:d}=K.useContext(kn);return K.useEffect(()=>{a(r),l||u(!0)},[r,a]),l?S.createElement(W2,null,({account:h,chain:m,mounted:g,openAccountModal:w,openChainModal:A,openConnectModal:v})=>{const x=g&&s!=="loading",T=(m==null?void 0:m.unsupported)??!1;return S.createElement(W,{display:"flex",gap:"12",...!x&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},x&&h&&s==="connected"?S.createElement(S.Fragment,null,m&&(i.length>1||T)&&S.createElement(W,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:T?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:In({active:"shrink",hover:"grow"}),color:T?"connectButtonTextError":"connectButtonText",display:ih(e,O=>O==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:T?"unsupported":"supported",onClick:A,paddingX:"10",paddingY:"8",testId:T?"wrong-network-button":"chain-button",transition:"default",type:"button"},T?S.createElement(W,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},d.t("connect_wallet.wrong_network.label")):S.createElement(W,{alignItems:"center",display:"flex",gap:"6"},m.hasIcon?S.createElement(W,{display:ih(e,O=>O==="full"||O==="icon"?"block":"none"),height:"24",width:"24"},S.createElement(tr,{alt:m.name??"Chain icon",background:m.iconBackgroun
1764d,borderRadius:"full",height:"24",src:m.iconUrl,width:"24"})):null,S.createElement(W,{display:ih(e,O=>O==="icon"&&!m.iconUrl||O==="full"||O==="name"?"block":"none")},m.name??m.id)),S.createElement(kR,null)),!T&&S.createElement(W,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:In({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:w,testId:"account-button",transition:"default",type:"button"},h.displayBalance&&S.createElement(W,{display:ih(r,O=>O?"block":"none"),padding:"8",paddingLeft:"12"},h.displayBalance),S.createElement(W,{background:vD(r)[Rn()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},S.createElement(W,{alignItems:"center",display:"flex",gap:"6",height:"24"},S.createElement(W,{display:ih(t,O=>O==="full"||O==="avatar"?"block":"none")},S.createElement(SD,{address:h.address,imageUrl:h.ensAvatar,loading:h.hasPendingTransactions,size:24})),S.createElement(W,{alignItems:"center",display:"flex",gap:"6"},S.createElement(W,{display:ih(t,O=>O==="full"||O==="address"?"block":"none")},h.displayName),S.createElement(kR,null)))))):S.createElement(W,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:In({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:v,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},g&&n==="Connect Wallet"?d.t("connect_wallet.label"):n))}):S.createElement(S.Fragment,null)}t6.__defaultProps=Gm;t6.Custom=W2;var pM=({appName:t,appDescription:e,appUrl:n,appIcon:r})=>({name:t,description:e??t,url:n??(typeof window<"u"?window.location.origin:""),icons:[...r?[r]:[]]});function Iie(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>n!==void 0))}function Rie(t,e){const n=[];for(const r of t)n.some(i=>i[e]===r[e])||n.push(r);return n}var kie=(t,{projectId:e,walletConnectParameters:n,appName:r,appDescription:i,appUrl:s,appIcon:a})=>{if(!t.length)throw new Error("No wallet list was provided");for(const{wallets:w,groupName:A}of t)if(!w.length)throw new Error(`No wallets provided for group: ${A}`);let l=-1;const u=[],d=[],h=[],m=pM({appName:r,appDescription:i,appUrl:s,appIcon:a});for(const[w,{groupName:A,wallets:v}]of t.entries())for(const x of v){l++;const T=x({projectId:e,appName:r,appIcon:a,options:{metadata:m,...n},walletConnectParameters:{metadata:m,...n}});if(T!=null&&T.iconAccent&&!Kre(T==null?void 0:T.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${T.name}`);const O={...T,groupIndex:w+1,groupName:A,index:l};typeof T.hidden=="function"?h.push(O):d.push(O)}const g=Rie([...d,...h],"id");for(const{createConnector:w,groupIndex:A,groupName:v,hidden:x,...T}of g){if(typeof x=="function"&&x())continue;const O=B=>({rkDetails:Iie({...T,groupIndex:A,groupName:v,isRainbowKitConnector:!0,...B||{}})});T.id==="walletConnect"&&u.push(w(O({isWalletConnectModalConnector:!0,showQrModal:!0})));const P=w(O());u.push(P)}return u},s7=new Map,Nie=({projectId:t,walletConnectParameters:e,rkDetailsShowQrModal:n,rkDetailsIsWalletConnectModalConnector:r})=>{let i={...e||{},projectId:t,showQrModal:!1};n&&(i={...i,showQrModal:!0}),"customStoragePrefix"in i||(i={...i,customStoragePrefix:r?"clientOne":"clientTwo"});const s=JSON.stringify(i),a=s7.get(s);if(a)return a;const l=j2(i);return s7.set(s,l),l};function Oie({projectId:t,walletDetails:e,walletConnectParameters:n}){return r=>({...Nie({projectId:t,walletConnectParameters:n,rkDetailsShowQrModal:e.rkDetails.showQrModal,rkDetailsIsWalletConnectModalConnector:e.rkDetails.isWalletConnectModalConnector})(r),...e})}function Y2({projectId:t,walletConnectParameters:e}){const n="21fef48091f12692cad574a6f7753643";if(!t||t==="")throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");return t==="YOUR_PROJECT_ID"&&(t=n),r=>Oie({projectId:t,walletDetails:r,walletConnectParameters:e})}function mM(t){const e=typeof window<"u"?window:void 0;if(typeof e>"u"||typeof e.ethereum>"u")return;const n=e.ethereum.providers;return n?n.find(r=>r[t]):e.ethereum[t]?e.ethereum:void 0}function gM(t){const e=(n,r)=>{const[i,...s]=r.split("."),a=n[i];if(a)return s.length===0?a:e(a,s.join("."))};if(typeof window<"u")return e(window,t)}function Bie({flag:t,namespace:e}){return!!(e&&typeof gM(e)<"u"||typeof mM(t)<"u")}function Pie({flag:t,namespace:e}){var i;const n=typeof window<"u"?window:void 0;if(typeof n>"u")return;if(e){const s=gM(e);if(s)return s}const r=(i=n.ethereum)==null?void 0:i.providers;{const s=mM(t);if(s)return s}return typeof r<"u"&&r.length>0?r[0]:n.ethereum}function Die(t){return e=>{const n=t?{target:()=>({id:e.rkDetails.id,name:e.rkDetails.name,provider:t})}:{};return r=>({...qv(n)(r),...e})}}function Mie({flag:t,namespace:e,target:n}){const r=n||Pie({flag:t,namespace:e});return Die(r)}var yM=({appName:t,appIcon:e})=>{const n=i=>i,r=y0();return{id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",rdns:"com.coinbase.wallet",iconUrl:async()=>(await Te(async()=>{const{default:i}=await import("./coinbaseWallet-OKXU3TRC-DnGdeF1T.js");return{default:i}}
1764,[])).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:!0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},...r?{}:{qrCode:{getUri:n,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"wallet_connectors.coinbase.qr_code.step1.description",step:"install",title:"wallet_connectors.coinbase.qr_code.step1.title"},{description:"wallet_connectors.coinbase.qr_code.step2.description",step:"create",title:"wallet_connectors.coinbase.qr_code.step2.title"},{description:"wallet_connectors.coinbase.qr_code.step3.description",step:"scan",title:"wallet_connectors.coinbase.qr_code.step3.title"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"wallet_connectors.coinbase.extension.step1.description",step:"install",title:"wallet_connectors.coinbase.extension.step1.title"},{description:"wallet_connectors.coinbase.extension.step2.description",step:"create",title:"wallet_connectors.coinbase.extension.step2.title"},{description:"wallet_connectors.coinbase.extension.step3.description",step:"refresh",title:"wallet_connectors.coinbase.extension.step3.title"}]}}},createConnector:i=>{const{...s}=yM,a=Jv({appName:t,appLogoUrl:e,...s});return l=>({...a(l),...i})}}};function jie(t){return!(!(t!=null&&t.isMetaMask)||t.isBraveWallet&&!t._events&&!t._state||t.isApexWallet||t.isAvalanche||t.isBackpack||t.isBifrost||t.isBitKeep||t.isBitski||t.isBlockWallet||t.isCoinbaseWallet||t.isDawn||t.isEnkrypt||t.isExodus||t.isFrame||t.isFrontier||t.isGamestop||t.isHyperPay||t.isImToken||t.isKuCoinWallet||t.isMathWallet||t.isNestWallet||t.isOkxWallet||t.isOKExWallet||t.isOneInchIOSWallet||t.isOneInchAndroidWallet||t.isOpera||t.isPhantom||t.isPortal||t.isRabby||t.isRainbow||t.isStatus||t.isTalisman||t.isTally||t.isTokenPocket||t.isTokenary||t.isTrust||t.isTrustWallet||t.isXDEFI||t.isZeal||t.isZerion||t.__seif)}var Lie=({projectId:t,walletConnectParameters:e})=>{const n=typeof window<"u"?jie(window.ethereum):!1,r=!n&&!Rn(),i=n||Rn();return{id:"metaMask",name:"MetaMask",rdns:"io.metamask",iconUrl:async()=>(await Te(async()=>{const{default:s}=await import("./metaMaskWallet-SITXT2FV-BlemcphV.js");return{default:s}},[])).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:n||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},mobile:{getUri:i?s=>s:void 0},qrCode:r?{getUri:s=>`https://metamask.app.link/wc?uri=${encodeURIComponent(s)}`,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}},createConnector:r?Y2({projectId:t,walletConnectParameters:e}):(s=>a=>{var u,d,h;const l=D2({dappMetadata:{connector:"rainbowkit",name:(u=e==null?void 0:e.metadata)==null?void 0:u.name,iconUrl:(d=e==null?void 0:e.metadata)==null?void 0:d.icons[0],url:(h=e==null?void 0:e.metadata)==null?void 0:h.url},headless:!0,checkInstallationImmediately:!1,enableAnalytics:!1})(a);return{...l,...s,getChainId:async()=>{var m;try{return await l.getChainId()}catch{return((m=a.chains[0])==null?void 0:m.id)??1}}}})}},Uie=({projectId:t,walletConnectParameters:e})=>{const n=Bie({flag:"isRainbow"}),r=!n,i=s=>ED()?s:y0()?`rainbow://wc?uri=${encodeURIComponent(s)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(s)}&connector=rainbowkit`;return{id:"rainbow",name:"Rainbow",rdns:"me.rainbow",iconUrl:async()=>(await Te(async()=>{const{default:s}=await import("./rainbowWallet-O26YNBMX-DUhYus-9.js");return{default:s}}
1764,[])).default,iconBackground:"#0c2f78",installed:r?void 0:n,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},mobile:{getUri:r?i:void 0},qrCode:r?{getUri:i,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0,createConnector:r?Y2({projectId:t,walletConnectParameters:e}):Mie({flag:"isRainbow"})}},Fie=()=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await Te(async()=>{const{default:t}=await import("./safeWallet-5MNKTR5Z-D-5imDLD.js");return{default:t}},[])).default,installed:!(typeof window>"u")&&(window==null?void 0:window.parent)!==window,downloadUrls:{},createConnector:t=>e=>({...M2()(e),...t})}),Vie=({projectId:t,options:e})=>({id:"walletConnect",name:"WalletConnect",installed:void 0,iconUrl:async()=>(await Te(async()=>{const{default:r}=await import("./walletConnectWallet-YHWKVTDY-D3lyiczV.js");return{default:r}},[])).default,iconBackground:"#3b99fc",qrCode:{getUri:r=>r},createConnector:Y2({projectId:t,walletConnectParameters:e})}),zie=t=>t.reduce((n,r)=>{const i=r.id;return n[i]=kJ(),n},{}),Hie=({appName:t,appDescription:e,appUrl:n,appIcon:r,wallets:i,projectId:s,...a})=>{const{transports:l,chains:u,...d}=a,h=pM({appName:t,appDescription:e,appUrl:n,appIcon:r}),m=kie(i||[{groupName:"Popular",wallets:[Fie,Uie,yM,Lie,Vie]}],{projectId:s,appName:t,appDescription:e,appUrl:n,appIcon:r,walletConnectParameters:{metadata:h}});return hX({connectors:m,chains:u,transports:l||zie(u),...d})};const qie=({onCreateCard:t,totalCards:e})=>{const{isConnected:n,address:r}=gr(),{disconnect:i}=Gv(),[s,a]=K.useState(!1),l=K.useRef(null);return K.useEffect(()=>{const u=d=>{l.current&&!l.current.contains(d.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),G.jsx("header",{className:"shadow-sm border-b transition-colors duration-300",style:{backgroundColor:"var(--sepia-200)",borderColor:"var(--border-dark)"},children:G.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:G.jsxs("div",{className:"flex items-center justify-between h-16",children:[G.jsxs("div",{className:"flex items-center space-x-3",children:[G.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full border",style:{backgroundColor:"var(--sepia-300)",borderColor:"var(--border-dark)"},children:G.jsx(jp,{className:"w-6 h-6",style:{color:"#3B2F2F"}})}),G.jsxs("div",{children:[G.jsx("h1",{className:"text-xl font-bold",style:{color:"var(--text-primary-dark)"},children:"Rate KOLs, X Profiles & Influencers"}),G.jsxs("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:["Private, on-chain ratings · ",e," cards"]})]})]}),G.jsxs("div",{className:"flex items-center space-x-8",children:[G.jsx(t6.Custom,{children:({account:u,chain:d,openConnectModal:h,authenticationStatus:m,mounted:g})=>g&&m!=="loading"&&u&&d&&(m===void 0||m==="authenticated")?G.jsxs("div",{className:"relative",ref:l,children:[G.jsxs("button",{onClick:()=>a(!s),className:"sepia-button text-sm flex items-center space-x-2",children:[G.jsx("span",{children:u.displayName}),G.jsx(_z,{className:"w-4 h-4"})]}),s&&G.jsx("div",{className:"absolute right-0 mt-2 w-48 rounded-lg shadow-lg z-50",style:{backgroundColor:"var(--sepia-50)",border:"1px solid var(--border-dark)"},children:G.jsx("div",{className:"py-1",children:G.jsxs("button",{onClick:()=>{i(),a(!1)},className:"w-full px-4 py-2 text-sm flex items-center space-x-2 hover:bg-opacity-80 transition-colors",style:{color:"var(--text-primary-dark)"},children:[G.jsx(kz,{className:"w-4 h-4"}),G.jsx("span",{children:"Disconnect"})]})})})]}):G.jsx("button",{onClick:h,type:"button",className:"sepia-button text-lg",children:"Connect Wallet"})}),n&&G.jsxs("button",{onClick:t,className:"inline-flex items-center sepia-button font-medium",children:[G.jsx(eN,{className:"w-5 h-5 mr-2"}),"Create Card"]})]})]})})})},$ie=({value:t,onChange:e,placeholder:n="Search cards..."})=>G.jsxs("div",{className:"relative",children:[G.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:G.jsx(Dz,{className:"h-5 w-5",style:{color:"var(--text-secondary)"}})}),G.jsx("input",{type:"text",value:t,onChange:r=>e(r.target.value),className:"w-full pl-10 pr-4 py-2 sepia-input",placeholder:n})]}),bM=({rating:t,size:e="md"})=>{const n={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};return G.jsx("div",{className:"flex items-center space-x-1",children:[1,2,3,4,5].map(r=>G.jsx(m5,{className:`${n[e]}`,style:{color:r<=t?"#E8BF6B":"#B8A68C",fill:r<=t?"#E8BF6B":"transparent"}},r))})},Gie=()=>{};var o7={};/** 1765 * @license 1766 * Copyright 2017 Google LLC 1767 * 1768 * Licensed under the Apache License, Version 2.0 (the "License");
1769 * you may not use this file except in compliance with the License. 1770 * You may obtain a copy of the License at 1771 * 1772 * http://www.apache.org/licenses/LICENSE-2.0 1773 * 1774 * Unless required by applicable law or agreed to in writing, software 1775 * distributed under the License is distributed on an "AS IS" BASIS, 1776 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1777 * See the License for the specific language governing permissions and 1778 * limitations under the License. 1779 */const wM=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},Qie=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],a=t[n++],l=t[n++],u=((i&7)<<18|(s&63)<<12|(a&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(u&1023))}else{const s=t[n++],a=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63)}}return e.join("")},vM={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],a=i+1<t.length,l=a?t[i+1]:0,u=i+2<t.length,d=u?t[i+2]:0,h=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,w=d&63;u||(w=64,a||(g=64)),r.push(n[h],n[m],n[g],n[w])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(wM(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Qie(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||m==null)throw new Kie;const g=s<<2|l>>4;if(r.push(g),d!==64){const w=l<<4&240|d>>2;if(r.push(w),m!==64){const A=d<<6&192|m;r.push(A)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class Kie extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Wie=function(t){const e=wM(t);return vM.encodeByteArray(e,!0)},Uw=function(t){return Wie(t).replace(/\./g,"")},Yie=function(t){try{return vM.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 1780 * @license 1781 * Copyright 2022 Google LLC 1782 * 1783 * Licensed under the Apache License, Version 2.0 (the "License"); 1784 * you may not use this file except in compliance with the License. 1785 * You may obtain a copy of the License at 1786 * 1787 * http://www.apache.org/licenses/LICENSE-2.0 1788 * 1789 * Unless required by applicable law or agreed to in writing, software 1790 * distributed under the License is distributed on an "AS IS" BASIS, 1791 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1792 * See the License for the specific language governing permissions and 1793 * limitations under the License.
1794 */function Jie(){if(typeof self<"u")return self;if(typeof window<"u"||typeof window<"u")return window;throw new Error("Unable to locate global object.")}/** 1795 * @license 1796 * Copyright 2022 Google LLC 1797 * 1798 * Licensed under the Apache License, Version 2.0 (the "License"); 1799 * you may not use this file except in compliance with the License. 1800 * You may obtain a copy of the License at 1801 * 1802 * http://www.apache.org/licenses/LICENSE-2.0 1803 * 1804 * Unless required by applicable law or agreed to in writing, software 1805 * distributed under the License is distributed on an "AS IS" BASIS, 1806 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1807 * See the License for the specific language governing permissions and 1808 * limitations under the License. 1809 */const Xie=()=>Jie().__FIREBASE_DEFAULTS__,Zie=()=>{if(typeof process>"u"||typeof o7>"u")return;const t=o7.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},ese=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Yie(t[1]);return e&&JSON.parse(e)},J2=()=>{try{return Gie()||Xie()||Zie()||ese()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},tse=t=>{var e,n;return(n=(e=J2())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},nse=t=>{const e=tse(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},AM=()=>{var t;return(t=J2())===null||t===void 0?void 0:t.config};/** 1810 * @license 1811 * Copyright 2017 Google LLC 1812 * 1813 * Licensed under the Apache License, Version 2.0 (the "License"); 1814 * you may not use this file except in compliance with the License. 1815 * You may obtain a copy of the License at 1816 * 1817 * http://www.apache.org/licenses/LICENSE-2.0 1818 * 1819 * Unless required by applicable law or agreed to in writing, software 1820 * distributed under the License is distributed on an "AS IS" BASIS, 1821 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1822 * See the License for the specific language governing permissions and 1823 * limitations under the License. 1824 */class rse{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** 1825 * @license 1826 * Copyright 2025 Google LLC 1827 * 1828 * Licensed under the Apache License, Version 2.0 (the "License"); 1829 * you may not use this file except in compliance with the License. 1830 * You may obtain a copy of the License at 1831 * 1832 * http://www.apache.org/licenses/LICENSE-2.0 1833 * 1834 * Unless required by applicable law or agreed to in writing, software 1835 * distributed under the License is distributed on an "AS IS" BASIS, 1836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1837 * See the License for the specific language governing permissions and 1838 * limitations under the License. 1839 */function X2(t){try{return(t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return!1}}async function ise(t){return(await fetch(t,{credentials:"include"})).ok}/** 1840 * @license 1841 * Copyright 2021 Google LLC 1842 * 1843 * Licensed under the Apache License, Version 2.0 (the "License"); 1844 * you may not use this file except in compliance with the License. 1845 * You may obtain a copy of the License at 1846 * 1847 * http://www.apache.org/licenses/LICENSE-2.0 1848 * 1849 * Unless required by applicable law or agreed to in writing, software 1850 * distributed under the License is distributed on an "AS IS" BASIS, 1851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1852 * See the License for the specific language governing permissions and 1853 * limitations under the License. 1854 */function sse(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const a=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[Uw(JSON.stringify(n)),Uw(JSON.stringify(a)),""].join(".")}const sg={};function ose(){const t={prod:[],emulator:[]};for(const e of Object.keys(sg))sg[e]?t.emulator.push(e):t.prod.push(e);return t}function ase(t){let e=document.getElementById(t),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",t),n=!0),{created:n,element:e}}let a7=!1;function cse(t,e){if(typeof window>"u"||typeof document>"u"||!X2(window.location.host)||sg[t]===e||sg[t]||a7)return;sg[t]=e;function n(g){return`__firebase__banner__${g}`}const r="__firebase__banner",s=ose().prod.length>0;function a(){const g=document.getElementById(r);g&&g.remove()}function l(g){g.style.display="flex",g.style.background="#7faaf0",g.style.position="fixed",g.style.bottom="5px",g.style.left="5px",g.style.padding=".5em",g.style.borderRadius="5px",g.style.alignItems="center"}function u(g,w){g.setAttribute("width","24"),g.setAttribute("id",w),g.setAttribute("height","24"),g.setAttribute("viewBox","0 0 24 24"),g.setAttribute("fill","none"),g.style.marginLeft="-6px"}function d(){const g=document.createElement("span");
vendor: 5,001 bytes, lines 1854-1887
1854return g.style.cursor="pointer",g.style.marginLeft="16px",g.style.fontSize="24px",g.innerHTML=" ×",g.onclick=()=>{a7=!0,a()},g}function h(g,w){g.setAttribute("id",w),g.innerText="Learn more",g.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",g.setAttribute("target","__blank"),g.style.paddingLeft="5px",g.style.textDecoration="underline"}function m(){const g=ase(r),w=n("text"),A=document.getElementById(w)||document.createElement("span"),v=n("learnmore"),x=document.getElementById(v)||document.createElement("a"),T=n("preprendIcon"),O=document.getElementById(T)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(g.created){const k=g.element;l(k),h(x,v);const P=d();u(O,T),k.append(O,A,x,P),document.body.appendChild(k)}s?(A.innerText="Preview backend disconnected.",O.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 1855<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 1856</g> 1857<defs> 1858<clipPath id="clip0_6013_33858"> 1859<rect width="24" height="24" fill="white"/> 1860</clipPath> 1861</defs>`):(O.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 1862<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 1863</g> 1864<defs> 1865<clipPath id="clip0_6083_34804"> 1866<rect width="24" height="24" fill="white"/> 1867</clipPath> 1868</defs>`,A.innerText="Preview backend running in this workspace."),A.setAttribute("id",w)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",m):m()}/** 1869 * @license 1870 * Copyright 2017 Google LLC 1871 * 1872 * Licensed under the Apache License, Version 2.0 (the "License"); 1873 * you may not use this file except in compliance with the License. 1874 * You may obtain a copy of the License at 1875 * 1876 * http://www.apache.org/licenses/LICENSE-2.0 1877 * 1878 * Unless required by applicable law or agreed to in writing, software 1879 * distributed under the License is distributed on an "AS IS" BASIS, 1880 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1881 * See the License for the specific language governing permissions and 1882 * limitations under the License. 1883 */function lse(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function use(){var t;const e=(t=J2())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(window.process)==="[object process]"}catch{return!1}}function fse(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function dse(){return!use()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function EM(){try{return typeof indexedDB=="object"}catch{return!1}}function xM(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}function hse(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/** 1884 * @license 1885 * Copyright 2017 Google LLC 1886 * 1887 * Licensed under the Apache License, Version 2.0 (the "License");
1888 * you may not use this file except in compliance with the License. 1889 * You may obtain a copy of the License at 1890 * 1891 * http://www.apache.org/licenses/LICENSE-2.0 1892 * 1893 * Unless required by applicable law or agreed to in writing, software 1894 * distributed under the License is distributed on an "AS IS" BASIS, 1895 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1896 * See the License for the specific language governing permissions and 1897 * limitations under the License. 1898 */const pse="FirebaseError";class Jl extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=pse,Object.setPrototypeOf(this,Jl.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,n6.prototype.create)}}class n6{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],a=s?mse(s,r):"Error",l=`${this.serviceName}: ${a} (${i}).`;return new Jl(i,l,r)}}function mse(t,e){return t.replace(gse,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const gse=/\{\$([^}]+)}/g;function qg(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],a=e[i];if(c7(s)&&c7(a)){if(!qg(s,a))return!1}else if(s!==a)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function c7(t){return t!==null&&typeof t=="object"}/** 1899 * @license 1900 * Copyright 2019 Google LLC 1901 * 1902 * Licensed under the Apache License, Version 2.0 (the "License"); 1903 * you may not use this file except in compliance with the License. 1904 * You may obtain a copy of the License at 1905 * 1906 * http://www.apache.org/licenses/LICENSE-2.0 1907 * 1908 * Unless required by applicable law or agreed to in writing, software 1909 * distributed under the License is distributed on an "AS IS" BASIS, 1910 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1911 * See the License for the specific language governing permissions and 1912 * limitations under the License. 1913 */const yse=1e3,bse=2,wse=14400*1e3,vse=.5;function l7(t,e=yse,n=bse){const r=e*Math.pow(n,t),i=Math.round(vse*r*(Math.random()-.5)*2);return Math.min(wse,r+i)}/** 1914 * @license 1915 * Copyright 2021 Google LLC 1916 * 1917 * Licensed under the Apache License, Version 2.0 (the "License"); 1918 * you may not use this file except in compliance with the License. 1919 * You may obtain a copy of the License at 1920 * 1921 * http://www.apache.org/licenses/LICENSE-2.0 1922 * 1923 * Unless required by applicable law or agreed to in writing, software 1924 * distributed under the License is distributed on an "AS IS" BASIS, 1925 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1926 * See the License for the specific language governing permissions and 1927 * limitations under the License. 1928 */function $o(t){return t&&t._delegate?t._delegate:t}class oc{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** 1929 * @license 1930 * Copyright 2019 Google LLC 1931 * 1932 * Licensed under the Apache License, Version 2.0 (the "License"); 1933 * you may not use this file except in compliance with the License. 1934 * You may obtain a copy of the License at 1935 * 1936 * http://www.apache.org/licenses/LICENSE-2.0 1937 * 1938 * Unless required by applicable law or agreed to in writing, software 1939 * distributed under the License is distributed on an "AS IS" BASIS, 1940 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1941 * See the License for the specific language governing permissions and 1942 * limitations under the License. 1943 */const Mu="[DEFAULT]";/** 1944 * @license 1945 * Copyright 2019 Google LLC 1946 * 1947 * Licensed under the Apache License, Version 2.0 (the "License"); 1948 * you may not use this file except in compliance with the License. 1949 * You may obtain a copy of the License at 1950 * 1951 * http://www.apache.org/licenses/LICENSE-2.0 1952 * 1953 * Unless required by applicable law or agreed to in writing, softw
1953are 1954 * distributed under the License is distributed on an "AS IS" BASIS, 1955 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1956 * See the License for the specific language governing permissions and 1957 * limitations under the License. 1958 */class Ase{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new rse;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(xse(e))try{this.getOrInitializeService({instanceIdentifier:Mu})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Mu){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Mu){return this.instances.has(e)}getOptions(e=Mu){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&a.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const a=this.instances.get(i);return a&&e(a,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Ese(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Mu){return this.component?this.component.multipleInstances?e:Mu:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Ese(t){return t===Mu?void 0:t}function xse(t){return t.instantiationMode==="EAGER"}/** 1959 * @license 1960 * Copyright 2019 Google LLC 1961 * 1962 * Licensed under the Apache License, Version 2.0 (the "License"); 1963 * you may not use this file except in compliance with the License. 1964 * You may obtain a copy of the License at 1965 * 1966 * http://www.apache.org/licenses/LICENSE-2.0 1967 * 1968 * Unless required by applicable law or agreed to in writing, software 1969 * distributed under the License is distributed on an "AS IS" BASIS, 1970 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1971 * See the License for the specific language governing permissions and 1972 * limitations under the License. 1973 */class Cse{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new Ase(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** 1974 * @license 1975 * Copyright 2017 Google LLC 1976 * 1977 * Licensed under the Apache License, Version 2.0 (the "License");
1978 * you may not use this file except in compliance with the License. 1979 * You may obtain a copy of the License at 1980 * 1981 * http://www.apache.org/licenses/LICENSE-2.0 1982 * 1983 * Unless required by applicable law or agreed to in writing, software 1984 * distributed under the License is distributed on an "AS IS" BASIS, 1985 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1986 * See the License for the specific language governing permissions and 1987 * limitations under the License. 1988 */var Tt;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Tt||(Tt={}));const _se={debug:Tt.DEBUG,verbose:Tt.VERBOSE,info:Tt.INFO,warn:Tt.WARN,error:Tt.ERROR,silent:Tt.SILENT},Tse=Tt.INFO,Sse={[Tt.DEBUG]:"log",[Tt.VERBOSE]:"log",[Tt.INFO]:"info",[Tt.WARN]:"warn",[Tt.ERROR]:"error"},Ise=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=Sse[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Z2{constructor(e){this.name=e,this._logLevel=Tse,this._logHandler=Ise,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Tt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?_se[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Tt.DEBUG,...e),this._logHandler(this,Tt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Tt.VERBOSE,...e),this._logHandler(this,Tt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Tt.INFO,...e),this._logHandler(this,Tt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Tt.WARN,...e),this._logHandler(this,Tt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Tt.ERROR,...e),this._logHandler(this,Tt.ERROR,...e)}}const Rse=(t,e)=>e.some(n=>t instanceof n);let u7,f7;function kse(){return u7||(u7=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Nse(){return f7||(f7=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const CM=new WeakMap,Rx=new WeakMap,_M=new WeakMap,F3=new WeakMap,e_=new WeakMap;function Ose(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",a)},s=()=>{n(Nl(t.result)),i()},a=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",a)});return e.then(n=>{n instanceof IDBCursor&&CM.set(n,t)}).catch(()=>{}),e_.set(e,t),e}function Bse(t){if(Rx.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",a),t.removeEventListener("abort",a)},s=()=>{n(),i()},a=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",a),t.addEventListener("abort",a)});Rx.set(t,e)}let kx={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Rx.get(t);if(e==="objectStoreNames")return t.objectStoreNames||_M.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Nl(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Pse(t){kx=t(kx)}function Dse(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(V3(this),e,...n);return _M.set(r,e.sort?e.sort():[e]),Nl(r)}:Nse().includes(t)?function(...e){return t.apply(V3(this),e),Nl(CM.get(this))}:function(...e){return Nl(t.apply(V3(this),e))}}function Mse(t){return typeof t=="function"?Dse(t):(t instanceof IDBTransaction&&Bse(t),Rse(t,kse())?new Proxy(t,kx):t)}function Nl(t){if(t instanceof IDBRequest)return Ose(t);if(F3.has(t))return F3.get(t);const e=Mse(t);return e!==t&&(F3.set(t,e),e_.set(e,t)),e}const V3=t=>e_.get(t);function TM(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const a=indexedDB.open(t,e),l=Nl(a);return r&&a.addEventListener("upgradeneeded",u=>{r(Nl(a.result),u.oldVersion,u.newVersion,Nl(a.transaction),u)}),n&&a.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),l.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const jse=["get","getKey","getAll","getAllKeys","count"],Lse=["put","add","delete","clear"],z3=new Map;function d7(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(z3.get(e))return z3.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Lse.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||jse.includes(n)))return;const s=async function(a,...l){const u=this.transaction(a,i?"readwrite":"readonly");let d=u.store;
1988return r&&(d=d.index(l.shift())),(await Promise.all([d[n](...l),i&&u.done]))[0]};return z3.set(e,s),s}Pse(t=>({...t,get:(e,n,r)=>d7(e,n)||t.get(e,n,r),has:(e,n)=>!!d7(e,n)||t.has(e,n)}));/** 1989 * @license 1990 * Copyright 2019 Google LLC 1991 * 1992 * Licensed under the Apache License, Version 2.0 (the "License"); 1993 * you may not use this file except in compliance with the License. 1994 * You may obtain a copy of the License at 1995 * 1996 * http://www.apache.org/licenses/LICENSE-2.0 1997 * 1998 * Unless required by applicable law or agreed to in writing, software 1999 * distributed under the License is distributed on an "AS IS" BASIS, 2000 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2001 * See the License for the specific language governing permissions and 2002 * limitations under the License. 2003 */class Use{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Fse(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Fse(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Nx="@firebase/app",h7="0.13.2";/** 2004 * @license 2005 * Copyright 2019 Google LLC 2006 * 2007 * Licensed under the Apache License, Version 2.0 (the "License"); 2008 * you may not use this file except in compliance with the License. 2009 * You may obtain a copy of the License at 2010 * 2011 * http://www.apache.org/licenses/LICENSE-2.0 2012 * 2013 * Unless required by applicable law or agreed to in writing, software 2014 * distributed under the License is distributed on an "AS IS" BASIS, 2015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2016 * See the License for the specific language governing permissions and 2017 * limitations under the License. 2018 */const ac=new Z2("@firebase/app"),Vse="@firebase/app-compat",zse="@firebase/analytics-compat",Hse="@firebase/analytics",qse="@firebase/app-check-compat",$se="@firebase/app-check",Gse="@firebase/auth",Qse="@firebase/auth-compat",Kse="@firebase/database",Wse="@firebase/data-connect",Yse="@firebase/database-compat",Jse="@firebase/functions",Xse="@firebase/functions-compat",Zse="@firebase/installations",eoe="@firebase/installations-compat",toe="@firebase/messaging",noe="@firebase/messaging-compat",roe="@firebase/performance",i
2018oe="@firebase/performance-compat",soe="@firebase/remote-config",ooe="@firebase/remote-config-compat",aoe="@firebase/storage",coe="@firebase/storage-compat",loe="@firebase/firestore",uoe="@firebase/ai",foe="@firebase/firestore-compat",doe="firebase",hoe="11.10.0";/** 2019 * @license 2020 * Copyright 2019 Google LLC 2021 * 2022 * Licensed under the Apache License, Version 2.0 (the "License"); 2023 * you may not use this file except in compliance with the License. 2024 * You may obtain a copy of the License at 2025 * 2026 * http://www.apache.org/licenses/LICENSE-2.0 2027 * 2028 * Unless required by applicable law or agreed to in writing, software 2029 * distributed under the License is distributed on an "AS IS" BASIS, 2030 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2031 * See the License for the specific language governing permissions and 2032 * limitations under the License. 2033 */const Ox="[DEFAULT]",poe={[Nx]:"fire-core",[Vse]:"fire-core-compat",[Hse]:"fire-analytics",[zse]:"fire-analytics-compat",[$se]:"fire-app-check",[qse]:"fire-app-check-compat",[Gse]:"fire-auth",[Qse]:"fire-auth-compat",[Kse]:"fire-rtdb",[Wse]:"fire-data-connect",[Yse]:"fire-rtdb-compat",[Jse]:"fire-fn",[Xse]:"fire-fn-compat",[Zse]:"fire-iid",[eoe]:"fire-iid-compat",[toe]:"fire-fcm",[noe]:"fire-fcm-compat",[roe]:"fire-perf",[ioe]:"fire-perf-compat",[soe]:"fire-rc",[ooe]:"fire-rc-compat",[aoe]:"fire-gcs",[coe]:"fire-gcs-compat",[loe]:"fire-fst",[foe]:"fire-fst-compat",[uoe]:"fire-vertex","fire-js":"fire-js",[doe]:"fire-js-all"};/** 2034 * @license 2035 * Copyright 2019 Google LLC 2036 * 2037 * Licensed under the Apache License, Version 2.0 (the "License"); 2038 * you may not use this file except in compliance with the License. 2039 * You may obtain a copy of the License at 2040 * 2041 * http://www.apache.org/licenses/LICENSE-2.0 2042 * 2043 * Unless required by applicable law or agreed to in writing, software 2044 * distributed under the License is distributed on an "AS IS" BASIS, 2045 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2046 * See the License for the specific language governing permissions and 2047 * limitations under the License. 2048 */const Fw=new Map,moe=new Map,Bx=new Map;function p7(t,e){try{t.container.addComponent(e)}catch(n){ac.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Fl(t){const e=t.name;if(Bx.has(e))return ac.debug(`There were multiple attempts to register component ${e}.`),!1;Bx.set(e,t);for(const n of Fw.values())p7(n,t);for(const n of moe.values())p7(n,t);return!0}function zy(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function goe(t){return t==null?!1:t.settings!==void 0}/** 2049 * @license 2050 * Copyright 2019 Google LLC 2051 * 2052 * Licensed under the Apache License, Version 2.0 (the "License"); 2053 * you may not use this file except in compliance with the License. 2054 * You may obtain a copy of the License at 2055 * 2056 * http://www.apache.org/licenses/LICENSE-2.0 2057 * 2058 * Unless required by applicable law or agreed to in writing, software 2059 * distributed under the License is distributed on an "AS IS" BASIS, 2060 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2061 * See the License for the specific language governing permissions and 2062 * limitations under the License. 2063 */const yoe={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
2063d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Ol=new n6("app","Firebase",yoe);/** 2064 * @license 2065 * Copyright 2019 Google LLC 2066 * 2067 * Licensed under the Apache License, Version 2.0 (the "License"); 2068 * you may not use this file except in compliance with the License. 2069 * You may obtain a copy of the License at 2070 * 2071 * http://www.apache.org/licenses/LICENSE-2.0 2072 * 2073 * Unless required by applicable law or agreed to in writing, software 2074 * distributed under the License is distributed on an "AS IS" BASIS, 2075 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2076 * See the License for the specific language governing permissions and 2077 * limitations under the License. 2078 */class boe{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new oc("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Ol.create("app-deleted",{appName:this._name})}}/** 2079 * @license 2080 * Copyright 2019 Google LLC 2081 * 2082 * Licensed under the Apache License, Version 2.0 (the "License"); 2083 * you may not use this file except in compliance with the License. 2084 * You may obtain a copy of the License at 2085 * 2086 * http://www.apache.org/licenses/LICENSE-2.0 2087 * 2088 * Unless required by applicable law or agreed to in writing, software 2089 * distributed under the License is distributed on an "AS IS" BASIS, 2090 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2091 * See the License for the specific language governing permissions and 2092 * limitations under the License. 2093 */const woe=hoe;function SM(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:Ox,automaticDataCollectionEnabled:!0},e),i=r.name;if(typeof i!="string"||!i)throw Ol.create("bad-app-name",{appName:String(i)});if(n||(n=AM()),!n)throw Ol.create("no-options");const s=Fw.get(i);if(s){if(qg(n,s.options)&&qg(r,s.config))return s;throw Ol.create("duplicate-app",{appName:i})}const a=new Cse(i);for(const u of Bx.values())a.addComponent(u);const l=new boe(n,r,a);return Fw.set(i,l),l}function IM(t=Ox){const e=Fw.get(t);if(!e&&t===Ox&&AM())return SM();if(!e)throw Ol.create("no-app",{appName:t});return e}function Po(t,e,n){var r;let i=(r=poe[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),a=e.match(/\s|\//);if(s||a){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&l.push("and"),a&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),ac.warn(l.join(" "));return}Fl(new oc(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** 2094 * @license 2095 * Copyright 2021 Google LLC 2096 * 2097 * Licensed under the Apache License, Version 2.0 (the "License"); 2098 * you may not use this file except in compliance with the License. 2099 * You may obtain a copy of the License at 2100 * 2101 * http://www.apache.org/licenses/LICENSE-2.0 2102 * 2103 * Unless required by applicable law or agreed to in writing, softw
2103are 2104 * distributed under the License is distributed on an "AS IS" BASIS, 2105 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2106 * See the License for the specific language governing permissions and 2107 * limitations under the License. 2108 */const voe="firebase-heartbeat-database",Aoe=1,$g="firebase-heartbeat-store";let H3=null;function RM(){return H3||(H3=TM(voe,Aoe,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore($g)}catch(n){console.warn(n)}}}}).catch(t=>{throw Ol.create("idb-open",{originalErrorMessage:t.message})})),H3}async function Eoe(t){try{const n=(await RM()).transaction($g),r=await n.objectStore($g).get(kM(t));return await n.done,r}catch(e){if(e instanceof Jl)ac.warn(e.message);else{const n=Ol.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});ac.warn(n.message)}}}async function m7(t,e){try{const r=(await RM()).transaction($g,"readwrite");await r.objectStore($g).put(e,kM(t)),await r.done}catch(n){if(n instanceof Jl)ac.warn(n.message);else{const r=Ol.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});ac.warn(r.message)}}}function kM(t){return`${t.name}!${t.options.appId}`}/** 2109 * @license 2110 * Copyright 2021 Google LLC 2111 * 2112 * Licensed under the Apache License, Version 2.0 (the "License"); 2113 * you may not use this file except in compliance with the License. 2114 * You may obtain a copy of the License at 2115 * 2116 * http://www.apache.org/licenses/LICENSE-2.0 2117 * 2118 * Unless required by applicable law or agreed to in writing, software 2119 * distributed under the License is distributed on an "AS IS" BASIS, 2120 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2121 * See the License for the specific language governing permissions and 2122 * limitations under the License. 2123 */const xoe=1024,Coe=30;class _oe{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Soe(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=g7();if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(a=>a.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats.length>Coe){const a=Ioe(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(a,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){ac.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=g7(),{heartbeatsToSend:r,unsentEntries:i}=Toe(this._heartbeatsCache.heartbeats),s=Uw(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return ac.warn(n),""}}}function g7(){return new Date().toISOString().substring(0,10)}function Toe(t,e=xoe){const n=[];let r=t.slice();for(const i of t){const s=n.find(a=>a.agent===i.agent);if(s){if(s.dates.push(i.date),y7(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),y7(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class Soe{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return EM()?xM().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await Eoe(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return m7(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return m7(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function y7(t){return Uw(JSON.stringify({version:2,heartbeats:t})).length}function Ioe(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}/** 2124 * @license 2125 * Copyright 2019 Google LLC 2126 * 2127 * Licensed under the Apache License, Version 2.0 (the "License");
2128 * you may not use this file except in compliance with the License. 2129 * You may obtain a copy of the License at 2130 * 2131 * http://www.apache.org/licenses/LICENSE-2.0 2132 * 2133 * Unless required by applicable law or agreed to in writing, software 2134 * distributed under the License is distributed on an "AS IS" BASIS, 2135 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2136 * See the License for the specific language governing permissions and 2137 * limitations under the License. 2138 */function Roe(t){Fl(new oc("platform-logger",e=>new Use(e),"PRIVATE")),Fl(new oc("heartbeat",e=>new _oe(e),"PRIVATE")),Po(Nx,h7,t),Po(Nx,h7,"esm2017"),Po("fire-js","")}Roe("");var b7=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};/** @license 2139Copyright The Closure Library Authors. 2140SPDX-License-Identifier: Apache-2.0 2141*/var Bl,NM;(function(){var t;/** @license 2142 2143 Copyright The Closure Library Authors. 2144 SPDX-License-Identifier: Apache-2.0 2145*/function e(I,R){function M(){}M.prototype=R.prototype,I.D=R.prototype,I.prototype=new M,I.prototype.constructor=I,I.C=function(F,j,q){for(var L=Array(arguments.length-2),Se=2;Se<arguments.length;Se++)L[Se-2]=arguments[Se];return R.prototype[j].apply(F,L)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}e(r,n),r.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(I,R,M){M||(M=0);var F=Array(16);if(typeof R=="string")for(var j=0;16>j;++j)F[j]=R.charCodeAt(M++)|R.charCodeAt(M++)<<8|R.charCodeAt(M++)<<16|R.charCodeAt(M++)<<24;else for(j=0;16>j;++j)F[j]=R[M++]|R[M++]<<8|R[M++]<<16|R[M++]<<24;R=I.g[0],M=I.g[1],j=I.g[2];var q=I.g[3],L=R+(q^M&(j^q))+F[0]+3614090360&4294967295;R=M+(L<<7&4294967295|L>>>25),L=q+(j^R&(M^j))+F[1]+3905402710&4294967295,q=R+(L<<12&4294967295|L>>>20),L=j+(M^q&(R^M))+F[2]+606105819&4294967295,j=q+(L<<17&4294967295|L>>>15),L=M+(R^j&(q^R))+F[3]+3250441966&4294967295,M=j+(L<<22&4294967295|L>>>10),L=R+(q^M&(j^q))+F[4]+4118548399&4294967295,R=M+(L<<7&4294967295|L>>>25),L=q+(j^R&(M^j))+F[5]+1200080426&4294967295,q=R+(L<<12&4294967295|L>>>20),L=j+(M^q&(R^M))+F[6]+2821735955&4294967295,j=q+(L<<17&4294967295|L>>>15),L=M+(R^j&(q^R))+F[7]+4249261313&4294967295,M=j+(L<<22&4294967295|L>>>10),L=R+(q^M&(j^q))+F[8]+1770035416&4294967295,R=M+(L<<7&4294967295|L>>>25),L=q+(j^R&(M^j))+F[9]+2336552879&4294967295,q=R+(L<<12&4294967295|L>>>20),L=j+(M^q&(R^M))+F[10]+4294925233&4294967295,j=q+(L<<17&4294967295|L>>>15),L=M+(R^j&(q^R))+F[11]+2304563134&4294967295,M=j+(L<<22&4294967295|L>>>10),L=R+(q^M&(j^q))+F[12]+1804603682&4294967295,R=M+(L<<7&4294967295|L>>>25),L=q+(j^R&(M^j))+F[13]+4254626195&4294967295,q=R+(L<<12&4294967295|L>>>20),L=j+(M^q&(R^M))+F[14]+2792965006&4294967295,j=q+(L<<17&4294967295|L>>>15),L=M+(R^j&(q^R))+F[15]+1236535329&4294967295,M=j+(L<<22&4294967295|L>>>10),L=R+(j^q&(M^j))+F[1]+4129170786&4294967295,R=M+(L<<5&4294967295|L>>>27),L=q+(M^j&(R^M))+F[6]+3225465664&4294967295,q=R+(L<<9&4294967295|L>>>23),L=j+(R^M&(q^R))+F[11]+643717713&4294967295,j=q+(L<<14&4294967295|L>>>18),L=M+(q^R&(j^q))+F[0]+3921069994&4294967295,M=j+(L<<20&4294967295|L>>>12),L=R+(j^q&(M^j))+F[5]+3593408605&4294967295,R=M+(L<<5&4294967295|L>>>27),L=q+(M^j&(R^M))+F[10]+38016083&4294967295,q=R+(L<<9&4294967295|L>>>23),L=j+(R^M&(q^R))+F[15]+3634488961&4294967295,j=q+(L<<14&4294967295|L>>>18),L=M+(q^R&(j^q))+F[4]+3889429448&4294967295,M=j+(L<<20&4294967295|L>>>12),L=R+(j^q&(M^j))+F[9]+568446438&4294967295,R=M+(L<<5&4294967295|L>>>27),L=q+(M^j&(R^M))+F[14]+3275163606&4294967295,q=R+(L<<9&4294967295|L>>>23),L=j+(R^M&(q^R))+F[3]+4107603335&4294967295,j=q+(L<<14&4294967295|L>>>18),L=M+(q^R&(j^q))+F[8]+1163531501&4294967295,M=j+(L<<20&4294967295|L>>>12),L=R+(j^q&(M^j))+F[13]+2850285829&4294967295,R=M+(L<<5&4294967295|L>>>27),L=q+(M^j&(R^M))+F[2]+4243563512&4294967295,q=R+(L<<9&4294967295|L>>>23),L=j+(R^M&(q^R))+F[7]+1735328473&4294967295,j=q+(L<<14&4294967295|L>>>18),L=M+(q^R&(j^q))+F[12]+2368359562&4294967295,M=j+(L<<20&4294967295|L>>>12),L=R+(M^j^q)+F[5]+4294588738&4294967295,R=M+(L<<4&4294967295|L>>>28),L=q+(R^M^j)+F[8]+2272392833&4294967295,q=R+(L<<11&4294967295|L>>>21),L=j+(q^R^M)+F[11]+1839030562&4294967295,j=q+(L<<16&4294967295|L>>>16),L=M+(j^q^R)+F[14]+4259657740&4294967295,M=j+(L<<23&4294967295|L>>>9),L=R+(M^j^q)+F[1]+2763975236&4294967295,R=M+(L<<4&4294967295|L>>>28),L=q+(R^M^j)+F[4]+1272893353&4294967295,q=R+(L<<11&4294967295|L>>>21),L=j+(q^R^M)+F[7]+4139469664&4294967295,j=q+(L<<16&4294967295|L>>>16),L=M+(j^q^R)+F[10]+3200236656&4294967295,M=j+(L<<23&4294967295|L>>>9),L=R+(M^j^q)+F[13]+681279174&4294967295,R=M+(L<<4&4294967295|L>>>28),L=q+(R^M^j)+F[0]+3936430074&4294967295,q=R+(L<<11&4294967295|L>>>21),L=j+(q^R^M)+F[3]+3572445317&4294967295,j=q+(L<<16&4294967295|L>>>16),L=M+(j^q^R)+F[6]+76029189&4294967295,M=j+(L<<23&4294967295|L>>>9),L=R+(M^j^q)+F[9]+3654602809&4294967295,R=M+(L<<4&4294967295|L>>>28),L=q+(R^M^j)+F[12]+3873151461&4294967295,q=R+(L<<11&4294967295|L>>>21),L=j+(q^R^M)+F[15]+530742520&4294967295,j=q+(L<<16&4294967295|L>>>16),L=M+(j^q^R)+F[2]+3299628645&4294967295,M=j+(L<<23&4294967295|L>>>9),L=R+(j^(M|~q))+F[0]+4096336452&4294967295,R=M+(L<<6&4294967295|L>>>26),L=q+(M^(R|~j))+F[7]+1126891415&4294967295,q=R+(L<<10&4294967295|L>>>
vendor: 9,821 bytes, lines 2145-2152
214522),L=j+(R^(q|~M))+F[14]+2878612391&4294967295,j=q+(L<<15&4294967295|L>>>17),L=M+(q^(j|~R))+F[5]+4237533241&4294967295,M=j+(L<<21&4294967295|L>>>11),L=R+(j^(M|~q))+F[12]+1700485571&4294967295,R=M+(L<<6&4294967295|L>>>26),L=q+(M^(R|~j))+F[3]+2399980690&4294967295,q=R+(L<<10&4294967295|L>>>22),L=j+(R^(q|~M))+F[10]+4293915773&4294967295,j=q+(L<<15&4294967295|L>>>17),L=M+(q^(j|~R))+F[1]+2240044497&4294967295,M=j+(L<<21&4294967295|L>>>11),L=R+(j^(M|~q))+F[8]+1873313359&4294967295,R=M+(L<<6&4294967295|L>>>26),L=q+(M^(R|~j))+F[15]+4264355552&4294967295,q=R+(L<<10&4294967295|L>>>22),L=j+(R^(q|~M))+F[6]+2734768916&4294967295,j=q+(L<<15&4294967295|L>>>17),L=M+(q^(j|~R))+F[13]+1309151649&4294967295,M=j+(L<<21&4294967295|L>>>11),L=R+(j^(M|~q))+F[4]+4149444226&4294967295,R=M+(L<<6&4294967295|L>>>26),L=q+(M^(R|~j))+F[11]+3174756917&4294967295,q=R+(L<<10&4294967295|L>>>22),L=j+(R^(q|~M))+F[2]+718787259&4294967295,j=q+(L<<15&4294967295|L>>>17),L=M+(q^(j|~R))+F[9]+3951481745&4294967295,I.g[0]=I.g[0]+R&4294967295,I.g[1]=I.g[1]+(j+(L<<21&4294967295|L>>>11))&4294967295,I.g[2]=I.g[2]+j&4294967295,I.g[3]=I.g[3]+q&4294967295}r.prototype.u=function(I,R){R===void 0&&(R=I.length);for(var M=R-this.blockSize,F=this.B,j=this.h,q=0;q<R;){if(j==0)for(;q<=M;)i(this,I,q),q+=this.blockSize;if(typeof I=="string"){for(;q<R;)if(F[j++]=I.charCodeAt(q++),j==this.blockSize){i(this,F),j=0;break}}else for(;q<R;)if(F[j++]=I[q++],j==this.blockSize){i(this,F),j=0;break}}this.h=j,this.o+=R},r.prototype.v=function(){var I=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);I[0]=128;for(var R=1;R<I.length-8;++R)I[R]=0;var M=8*this.o;for(R=I.length-8;R<I.length;++R)I[R]=M&255,M/=256;for(this.u(I),I=Array(16),R=M=0;4>R;++R)for(var F=0;32>F;F+=8)I[M++]=this.g[R]>>>F&255;return I};function s(I,R){var M=l;return Object.prototype.hasOwnProperty.call(M,I)?M[I]:M[I]=R(I)}function a(I,R){this.h=R;for(var M=[],F=!0,j=I.length-1;0<=j;j--){var q=I[j]|0;F&&q==R||(M[j]=q,F=!1)}this.g=M}var l={};function u(I){return-128<=I&&128>I?s(I,function(R){return new a([R|0],0>R?-1:0)}):new a([I|0],0>I?-1:0)}function d(I){if(isNaN(I)||!isFinite(I))return m;if(0>I)return x(d(-I));for(var R=[],M=1,F=0;I>=M;F++)R[F]=I/M|0,M*=4294967296;return new a(R,0)}function h(I,R){if(I.length==0)throw Error("number format error: empty string");if(R=R||10,2>R||36<R)throw Error("radix out of range: "+R);if(I.charAt(0)=="-")return x(h(I.substring(1),R));if(0<=I.indexOf("-"))throw Error('number format error: interior "-" character');for(var M=d(Math.pow(R,8)),F=m,j=0;j<I.length;j+=8){var q=Math.min(8,I.length-j),L=parseInt(I.substring(j,j+q),R);8>q?(q=d(Math.pow(R,q)),F=F.j(q).add(d(L))):(F=F.j(M),F=F.add(d(L)))}return F}var m=u(0),g=u(1),w=u(16777216);t=a.prototype,t.m=function(){if(v(this))return-x(this).m();for(var I=0,R=1,M=0;M<this.g.length;M++){var F=this.i(M);I+=(0<=F?F:4294967296+F)*R,R*=4294967296}return I},t.toString=function(I){if(I=I||10,2>I||36<I)throw Error("radix out of range: "+I);if(A(this))return"0";if(v(this))return"-"+x(this).toString(I);for(var R=d(Math.pow(I,6)),M=this,F="";;){var j=P(M,R).g;M=T(M,j.j(R));var q=((0<M.g.length?M.g[0]:M.h)>>>0).toString(I);if(M=j,A(M))return q+F;for(;6>q.length;)q="0"+q;F=q+F}},t.i=function(I){return 0>I?0:I<this.g.length?this.g[I]:this.h};function A(I){if(I.h!=0)return!1;for(var R=0;R<I.g.length;R++)if(I.g[R]!=0)return!1;return!0}function v(I){return I.h==-1}t.l=function(I){return I=T(this,I),v(I)?-1:A(I)?0:1};function x(I){for(var R=I.g.length,M=[],F=0;F<R;F++)M[F]=~I.g[F];return new a(M,~I.h).add(g)}t.abs=function(){return v(this)?x(this):this},t.add=function(I){for(var R=Math.max(this.g.length,I.g.length),M=[],F=0,j=0;j<=R;j++){var q=F+(this.i(j)&65535)+(I.i(j)&65535),L=(q>>>16)+(this.i(j)>>>16)+(I.i(j)>>>16);F=L>>>16,q&=65535,L&=65535,M[j]=L<<16|q}return new a(M,M[M.length-1]&-2147483648?-1:0)};function T(I,R){return I.add(x(R))}t.j=function(I){if(A(this)||A(I))return m;if(v(this))return v(I)?x(this).j(x(I)):x(x(this).j(I));if(v(I))return x(this.j(x(I)));if(0>this.l(w)&&0>I.l(w))return d(this.m()*I.m());for(var R=this.g.length+I.g.length,M=[],F=0;F<2*R;F++)M[F]=0;for(F=0;F<this.g.length;F++)for(var j=0;j<I.g.length;j++){var q=this.i(F)>>>16,L=this.i(F)&65535,Se=I.i(j)>>>16,X=I.i(j)&65535;M[2*F+2*j]+=L*X,O(M,2*F+2*j),M[2*F+2*j+1]+=q*X,O(M,2*F+2*j+1),M[2*F+2*j+1]+=L*Se,O(M,2*F+2*j+1),M[2*F+2*j+2]+=q*Se,O(M,2*F+2*j+2)}for(F=0;F<R;F++)M[F]=M[2*F+1]<<16|M[2*F];for(F=R;F<2*R;F++)M[F]=0;return new a(M,0)};function O(I,R){for(;(I[R]&65535)!=I[R];)I[R+1]+=I[R]>>>16,I[R]&=65535,R++}function k(I,R){this.g=I,this.h=R}function P(I,R){if(A(R))throw Error("division by zero");if(A(I))return new k(m,m);if(v(I))return R=P(x(I),R),new k(x(R.g),x(R.h));if(v(R))return R=P(I,x(R)),new k(x(R.g),R.h);if(30<I.g.length){if(v(I)||v(R))throw Error("slowDivide_ only works with positive integers.");for(var M=g,F=R;0>=F.l(I);)M=B(M),F=B(F);var j=U(M,1),q=U(F,1);for(F=U(F,2),M=U(M,2);!A(F);){var L=q.add(F);0>=L.l(I)&&(j=j.add(M),q=L),F=U(F,1),M=U(M,1)}return R=T(I,j.j(R)),new k(j,R)}for(j=m;0<=I.l(R);){for(M=Math.max(1,Math.floor(I.m()/R.m())),F=Math.ceil(Math.log(M)/Math.LN2),F=48>=F?1:Math.pow(2,F-48),q=d(M),L=q.j(R);v(L)||0<L.l(I);)M-=F,q=d(M),L=q.j(R);A(q)&&(q=g),j=j.add(q),I=T(I,L)}return new k(j,I)}t.A=function(I){return P(this,I).h},t.and=function(I){for(var R=Math.max(this.g.length,I.g.length),M=[],F=0;F<R;F++)M[F]=this.i(F)&I.i(F);return new a(M,this.h&I.h)},t.or=function(I){for(var R=Math.max(this.g.length,I.g.length),M=[],F=0;F<R;F++)M[F]=this.i(F)|I.i(F);return new a(M,this.h|I.h)},t.xor=function(I){for(var R=Math.max(this.g.length,I.g.length),M=[],F=0;F<R;F++)M[F]=this.i(F)^I.i(F);return new a(M,this.h^I.h)};function B(I){for(var R=I.g.length+1,M=[],F=0;F<R;F++)M[F]=I.i(F)<<1|I.i(F-1)>>>31;return new a(M,I.h)}function U(I,R){var M=R>>5;R%=32;for(var F=I.g.length-M,j=[],q=0;q<F;q++)j[q]=0<R?I.i(q+M)>>>R|I.i(q+M+1)<<32-R:I.i(q+M);return new a(j,I.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,NM=r,a.prototype.add=a.prototype.add,a.prototype.multiply=a.prototype.j,a.prototype.modulo=a.prototype.A,a.prototype.compare=a.prototype.l,a.prototype.toNumber=a.prototype.m,a.prototype.toString=a.prototype.toString,a.prototype.getBits=a.prototype.i,a.fromNumber=d,a.fromString=h,Bl=a}).apply(typeof b7<"u"?b7:typeof self<"u"?self:typeof window<"u"?window:{});var Db=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};/** @license 2146Copyright The Closure Library Authors. 2147SPDX-License-Identifier: Apache-2.0 2148*/var OM,Qm,BM,rw,Px,PM,DM,MM;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(y,_,N){return y==Array.prototype||y==Object.prototype||(y[_]=N.value),y};function n(y){y=[typeof globalThis=="object"&&globalThis,y,typeof window=="object"&&window,typeof self=="object"&&self,typeof Db=="object"&&Db];for(var _=0;_<y.length;++_){var N=y[_];if(N&&N.Math==Math)return N}throw Error("Cannot find global object")}var r=n(this);function i(y,_){if(_)e:{var N=r;y=y.split(".");for(var H=0;H<y.length-1;H++){var ie=y[H];if(!(ie in N))break e;N=N[ie]}y=y[y.length-1],H=N[y],_=_(H),_!=H&&_!=null&&e(N,y,{configurable:!0,writable:!0,value:_})}}function s(y,_){y instanceof String&&(y+="");var N=0,H=!1,ie={next:function(){if(!H&&N<y.length){var de=N++;return{value:_(de,y[de]),done:!1}}return H=!0,{done:!0,value:void 0}}};return ie[Symbol.iterator]=function(){return ie},ie}i("Array.prototype.values",function(y){return y||function(){return s(this,function(_,N){return N})}});/** @license 2149 2150 Copyright The Closure Library Authors. 2151 SPDX-License-Identifier: Apache-2.0 2152*/var a=a||{},l=this||self;function u(y){var _=typeof y;return _=_!="object"?_:y?Array.isArray(y)?"array":_:"null",_=="array"||_=="object"&&typeof y.length=="number"}function d(y){var _=typeof y;return _=="object"&&y!=null||_=="function"}function h(y,_,N){return y.call.apply(y.bind,arguments)}function m(y,_,N){if(!y)throw Error();if(2<arguments.length){var H=Array.prototype.slice.call(arguments,2);return function(){var ie=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(ie,H),y.apply(_,ie)}}return function(){return y.apply(_,arguments)}}function g(y,_,N){return g=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?h:m,g.apply(null,arguments)}function w(y,_){var N=Array.prototype.slice.call(arguments,1);return function(){var H=N.slice();return H.push.apply(H,arguments),y.apply(this,H)}}function A(y,_){function N(){}N.prototype=_.prototype,y.aa=_.prototype,y.prototype=new N,y.prototype.constructor=y,y.Qb=function(H,ie,de){for(var Ie=Array(arguments.length-2),Et=2;Et<arguments.length;Et++)Ie[Et-2]=arguments[Et];return _.prototype[ie].apply(H,Ie)}}function v(y){const _=y.length;if(0<_){const N=Array(_);for(let H=0;H<_;H++)N[H]=y[H];return N}return[]}function x(y,_){for(let N=1;N<arguments.length;N++){const H=arguments[N];if(u(H)){const ie=y.length||0,de=H.length||0;y.length=ie+de;for(let Ie=0;Ie<de;Ie++)y[ie+Ie]=H[Ie]}else y.push(H)}}class T{constructor(_,N){this.i=_,this.j=N,this.h=0,this.g=null}get(){let _;return 0<this.h?(this.h--,_=this.g,this.g=_.next,_.next=null):_=this.i(),_}}function O(y){return/^[\s\xa0]*$/.test(y)}function k(){var y=l.navigator;return y&&(y=y.userAgent)?y:""}function P(y){return P[" "](y),y}P[" "]=function(){};var B=k().indexOf("Gecko")!=-1&&!(k().toLowerCase().indexOf("webkit")!=-1&&k().indexOf("Edge")==-1)&&!(k().indexOf("Trident")!=-1||k().indexOf("MSIE")!=-1)&&k().indexOf("Edge")==-1;function U(y,_,N){for(const H in y)_.call(N,y[H],H,y)}function I(y,_){for(const N in y)_.call(void 0,y[N],N,y)}function R(y){const _={};for(const N in y)_[N]=y[N];return _}const M="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
2152ing toString valueOf".split(" ");function F(y,_){let N,H;for(let ie=1;ie<arguments.length;ie++){H=arguments[ie];for(N in H)y[N]=H[N];for(let de=0;de<M.length;de++)N=M[de],Object.prototype.hasOwnProperty.call(H,N)&&(y[N]=H[N])}}function j(y){var _=1;y=y.split(":");const N=[];for(;0<_&&y.length;)N.push(y.shift()),_--;return y.length&&N.push(y.join(":")),N}function q(y){l.setTimeout(()=>{throw y},0)}function L(){var y=fe;let _=null;return y.g&&(_=y.g,y.g=y.g.next,y.g||(y.h=null),_.next=null),_}class Se{constructor(){this.h=this.g=null}add(_,N){const H=X.get();H.set(_,N),this.h?this.h.next=H:this.g=H,this.h=H}}var X=new T(()=>new Q,y=>y.reset());class Q{constructor(){this.next=this.g=this.h=null}set(_,N){this.h=_,this.g=N,this.next=null}reset(){this.next=this.g=this.h=null}}let te,J=!1,fe=new Se,$=()=>{const y=l.Promise.resolve(void 0);te=()=>{y.then(se)}};var se=()=>{for(var y;y=L();){try{y.h.call(y.g)}catch(N){q(N)}var _=X;_.j(y),100>_.h&&(_.h++,y.next=_.g,_.g=y)}J=!1};function ye(){this.s=this.s,this.C=this.C}ye.prototype.s=!1,ye.prototype.ma=function(){this.s||(this.s=!0,this.N())},ye.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function pe(y,_){this.type=y,this.g=this.target=_,this.defaultPrevented=!1}pe.prototype.h=function(){this.defaultPrevented=!0};var me=(function(){if(!l.addEventListener||!Object.defineProperty)return!1;var y=!1,_=Object.defineProperty({},"passive",{get:function(){y=!0}});try{const N=()=>{};l.addEventListener("test",N,_),l.removeEventListener("test",N,_)}catch{}return y})();function ve(y,_){if(pe.call(this,y?y.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,y){var N=this.type=y.type,H=y.changedTouches&&y.changedTouches.length?y.changedTouches[0]:null;if(this.target=y.target||y.srcElement,this.g=_,_=y.relatedTarget){if(B){e:{try{P(_.nodeName);var ie=!0;break e}catch{}ie=!1}ie||(_=null)}}else N=="mouseover"?_=y.fromElement:N=="mouseout"&&(_=y.toElement);this.relatedTarget=_,H?(this.clientX=H.clientX!==void 0?H.clientX:H.pageX,this.clientY=H.clientY!==void 0?H.clientY:H.pageY,this.screenX=H.screenX||0,this.screenY=H.screenY||0):(this.clientX=y.clientX!==void 0?y.clientX:y.pageX,this.clientY=y.clientY!==void 0?y.clientY:y.pageY,this.screenX=y.screenX||0,this.screenY=y.screenY||0),this.button=y.button,this.key=y.key||"",this.ctrlKey=y.ctrlKey,this.altKey=y.altKey,this.shiftKey=y.shiftKey,this.metaKey=y.metaKey,this.pointerId=y.pointerId||0,this.pointerType=typeof y.pointerType=="string"?y.pointerType:_e[y.pointerType]||"",this.state=y.state,this.i=y,y.defaultPrevented&&ve.aa.h.call(this)}}A(ve,pe);var _e={2:"touch",3:"pen",4:"mouse"};ve.prototype.h=function(){ve.aa.h.call(this);var y=this.i;y.preventDefault?y.preventDefault():y.returnValue=!1};var Re="closure_listenable_"+(1e6*Math.random()|0),De=0;function qe(y,_,N,H,ie){this.listener=y,this.proxy=null,this.src=_,this.type=N,this.capture=!!H,this.ha=ie,this.key=++De,this.da=this.fa=!1}function it(y){y.da=!0,y.listener=null,y.proxy=null,y.src=null,y.ha=null}function Vt(y){this.src=y,this.g={},this.h=0}Vt.prototype.add=function(y,_,N,H,ie){var de=y.toString();y=this.g[de],y||(y=this.g[de]=[],this.h++);var Ie=et(y,_,H,ie);return-1<Ie?(_=y[Ie],N||(_.fa=!1)):(_=new qe(_,this.src,de,!!H,ie),_.fa=N,y.push(_)),_};function Qe(y,_){var N=_.type;if(N in y.g){var H=y.g[N],ie=Array.prototype.indexOf.call(H,_,void 0),de;(de=0<=ie)&&Array.prototype.splice.call(H,ie,1),de&&(it(_),y.g[N].length==0&&(delete y.g[N],y.h--))}}function et(y,_,N,H){for(var ie=0;ie<y.length;++ie){var de=y[ie];if(!de.da&&de.listener==_&&de.capture==!!N&&de.ha==H)return ie}return-1}var Pt="closure_lm_"+(1e6*Math.random()|0),It={};function nn(y,_,N,H,ie){if(Array.isArray(_)){for(var de=0;de<_.length;de++)nn(y,_[de],N,H,ie);return null}return N=Wo(N),y&&y[Re]?y.K(_,N,d(H)?!!H.capture:!1,ie):St(y,_,N,!1,H,ie)}function St(y,_,N,H,ie,de){if(!_)throw Error("Invalid event type");var Ie=d(ie)?!!ie.capture:!!ie,Et=zn(y);if(Et||(y[Pt]=Et=new Vt(y)),N=Et.add(_,N,H,Ie,de),N.proxy)return N;if(H=Ir(),N.proxy=H,H.src=y,H.listener=N,y.addEventListener)me||(ie=Ie),ie===void 0&&(ie=!1),y.addEventListener(_.toString(),H,ie);else if(y.attachEvent)y.attachEvent(Vn(_.toString()),H);else if(y.addListener&&y.removeListener)y.addListener(H);else throw Error("addEventListener and attachEvent are unavailable.");return N}function Ir(){function y(N){return _.call(y.src,y.listener,N)}const _=ud;return y}function Ui(y,_,N,H,ie){if(Array.isArray(_))for(var de=0;de<_.length;de++)Ui(y,_[de],N,H,ie);else H=d(H)?!!H.capture:!!H,N=Wo(N),y&&y[Re]?(y=y.i,_=String(_).toString(),_ in y.g&&(de=y.g[_],N=et(de,N,H,ie),-1<N&&(it(de[N]),Array.prototype.splice.call(de,N,1),de.length==0&&(delete y.g[_],y.h--)))):y&&(y=zn(y))&&(_=y.g[_.toString()],y=-1,_&&(y=et(_,N,H,ie)),(N=-1<y?_[y]:null)&&ys(N))}function ys(y){if(typeof y!="number"&&y&&!y.da){var _=y.src;if(_&&_[Re])Qe(_.i,y);else{var N=y.type,H=y.proxy;_.removeEventListener?_.removeEventListener(N,H,y.capture):_.detachEvent?_.detachEvent(Vn(N),H):_.addListener&&_.removeListener&&_.removeListener(H),(N=zn(_))?(Qe(N,y),N.h==0&&(N.src=null,_[Pt]=null)):it(y)}}}function Vn(y){return y in It?It[y]:It[y]="on"+y}function ud(y,_){if(y.da)y=!0;else{_=new ve(_,this);var N=y.listener,H=y.ha||y.src;y.fa&&ys(y),y=N.call(H,_)}return y}function zn(y){return y=y[Pt],y instanceof Vt?y:null}var Fi="__closure_events_fn_"+(1e9*Math.random()>>>0);function Wo(y){return typeof y=="function"?y:(y[Fi]||(y[Fi]=function(_){return y.handleEvent(_)}),y[Fi])}function Ve(){ye.call(this),this.i=new Vt(this),this.M=this,this.F=null}A(Ve,ye),Ve.prototype[Re]=!0,Ve.prototype.removeEventListener=function(y,_,N,H){Ui(this,y,_,N,H)};function Le(y,_){var N,H=y.F;if(H)for(N=[];H;H=H.F)N.push(H);if(y=y.M,H=_.type||_,typeof _=="string")_=new pe(_,y);else if(_ instanceof pe)_.target=_.target||y;else{var ie=_;_=new pe(H,y),F(_,ie)}if(ie=!0,N)for(var de=N.length-1;0<=de;de--){var Ie=_.g=N[de];ie=He(Ie,H,!0,_)&&ie}if(Ie=_.g=y,ie=He(Ie,H,!0,_)&&ie,ie=He(Ie,H,!1,_)&&ie,N)for(de=0;de<N.length;de++)Ie=_.g=N[de],ie=He(Ie,H,!1,_)&&ie}Ve.prototype.N=function(){if(Ve.aa.N.call(this),this.i){var y=this.i,_;for(_ in y.g){for(var N=y.g[_],H=0;H<N.length;H++)it(N[H]);delete y.g[_],y.h--}}this.F=null},Ve.prototype.K=function(y,_,N,H){return this.i.add(String(y),_,!1,N,H)},Ve.prototype.L=function(y,_,N,H){return this.i.add(String(y),_,!0,N,H)};
vendor: 31,850 bytes, lines 2152-2164
2152function He(y,_,N,H){if(_=y.i.g[String(_)],!_)return!0;_=_.concat();for(var ie=!0,de=0;de<_.length;++de){var Ie=_[de];if(Ie&&!Ie.da&&Ie.capture==N){var Et=Ie.listener,On=Ie.ha||Ie.src;Ie.fa&&Qe(y.i,Ie),ie=Et.call(On,H)!==!1&&ie}}return ie&&!H.defaultPrevented}function rt(y,_,N){if(typeof y=="function")N&&(y=g(y,N));else if(y&&typeof y.handleEvent=="function")y=g(y.handleEvent,y);else throw Error("Invalid listener argument");return 2147483647<Number(_)?-1:l.setTimeout(y,_||0)}function Kr(y){y.g=rt(()=>{y.g=null,y.i&&(y.i=!1,Kr(y))},y.l);const _=y.h;y.h=null,y.m.apply(null,_)}class Wr extends ye{constructor(_,N){super(),this.m=_,this.l=N,this.h=null,this.i=!1,this.g=null}j(_){this.h=arguments,this.g?this.i=!0:Kr(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function ft(y){ye.call(this),this.h=y,this.g={}}A(ft,ye);var $e=[];function Hn(y){U(y.g,function(_,N){this.g.hasOwnProperty(N)&&ys(_)},y),y.g={}}ft.prototype.N=function(){ft.aa.N.call(this),Hn(this)},ft.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Rr=l.JSON.stringify,Yo=l.JSON.parse,tu=class{stringify(y){return l.JSON.stringify(y,void 0)}parse(y){return l.JSON.parse(y,void 0)}};function T0(){}T0.prototype.h=null;function S0(y){return y.h||(y.h=y.i())}function I0(){}var Jo={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Xo(){pe.call(this,"d")}A(Xo,pe);function R0(){pe.call(this,"c")}A(R0,pe);var Qs={},k0=null;function yc(){return k0=k0||new Ve}Qs.La="serverreachability";function fd(y){pe.call(this,Qs.La,y)}A(fd,pe);function bc(y){const _=yc();Le(_,new fd(_))}Qs.STAT_EVENT="statevent";function e1(y,_){pe.call(this,Qs.STAT_EVENT,y),this.stat=_}A(e1,pe);function Zt(y){const _=yc();Le(_,new e1(_,y))}Qs.Ma="timingevent";function Nn(y,_){pe.call(this,Qs.Ma,y),this.size=_}A(Nn,pe);function wn(y,_){if(typeof y!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){y()},_)}function Vi(){this.g=!0}Vi.prototype.xa=function(){this.g=!1};function N0(y,_,N,H,ie,de){y.info(function(){if(y.g)if(de)for(var Ie="",Et=de.split("&"),On=0;On<Et.length;On++){var xt=Et[On].split("=");if(1<xt.length){var $n=xt[0];xt=xt[1];var Bn=$n.split("_");Ie=2<=Bn.length&&Bn[1]=="type"?Ie+($n+"="+xt+"&"):Ie+($n+"=redacted&")}}else Ie=null;else Ie=de;return"XMLHTTP REQ ("+H+") [attempt "+ie+"]: "+_+` 2153`+N+` 2154`+Ie})}function V6(y,_,N,H,ie,de,Ie){y.info(function(){return"XMLHTTP RESP ("+H+") [ attempt "+ie+"]: "+_+` 2155`+N+` 2156`+de+" "+Ie})}function wc(y,_,N,H){y.info(function(){return"XMLHTTP TEXT ("+_+"): "+nu(y,N)+(H?" "+H:"")})}function t1(y,_){y.info(function(){return"TIMEOUT: "+_})}Vi.prototype.info=function(){};function nu(y,_){if(!y.g)return _;if(!_)return null;try{var N=JSON.parse(_);if(N){for(y=0;y<N.length;y++)if(Array.isArray(N[y])){var H=N[y];if(!(2>H.length)){var ie=H[1];if(Array.isArray(ie)&&!(1>ie.length)){var de=ie[0];if(de!="noop"&&de!="stop"&&de!="close")for(var Ie=1;Ie<ie.length;Ie++)ie[Ie]=""}}}}return Rr(N)}catch{return _}}var vc={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Zo={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Ks;function Ws(){}A(Ws,T0),Ws.prototype.g=function(){return new XMLHttpRequest},Ws.prototype.i=function(){return{}},Ks=new Ws;function kr(y,_,N,H){this.j=y,this.i=_,this.l=N,this.R=H||1,this.U=new ft(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new hn}function hn(){this.i=null,this.g="",this.h=!1}var O0={},dd={};function bs(y,_,N){y.L=1,y.v=au(mi(_)),y.m=N,y.P=!0,ea(y,null)}function ea(y,_){y.F=Date.now(),ru(y),y.A=mi(y.v);var N=y.A,H=y.R;Array.isArray(H)||(H=[String(H)]),L0(N.i,"t",H),y.C=0,N=y.j.J,y.h=new hn,y.g=y1(y.j,N?_:null,!y.m),0<y.O&&(y.M=new Wr(g(y.Y,y,y.g),y.O)),_=y.U,N=y.g,H=y.ca;var ie="readystatechange";Array.isArray(ie)||(ie&&($e[0]=ie.toString()),ie=$e);for(var de=0;de<ie.length;de++){var Ie=nn(N,ie[de],H||_.handleEvent,!1,_.h||_);if(!Ie)break;_.g[Ie.key]=Ie}_=y.H?R(y.H):{},y.m?(y.u||(y.u="POST"),_["Content-Type"]="application/x-www-form-urlencoded",y.g.ea(y.A,y.u,y.m,_)):(y.u="GET",y.g.ea(y.A,y.u,null,_)),bc(),N0(y.i,y.u,y.A,y.l,y.R,y.m)}kr.prototype.ca=function(y){y=y.target;const _=this.M;_&&$i(y)==3?_.j():this.Y(y)},kr.prototype.Y=function(y){try{if(y==this.g)e:{const Bn=$i(this.g);var _=this.g.Ba();const ca=this.g.Z();if(!(3>Bn)&&(Bn!=3||this.g&&(this.h.h||this.g.oa()||l1(this.g)))){this.J||Bn!=4||_==7||(_==8||0>=ca?bc(3):bc(2)),Ac(this);var N=this.g.Z();this.X=N;t:if(n1(this)){var H=l1(this.g);y="";var ie=H.length,de=$i(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){rr(this),Ys(this);var Ie="";break t}this.h.i=new l.TextDecoder}for(_=0;_<ie;_++)this.h.h=!0,y+=this.h.i.decode(H[_],{stream:!(de&&_==ie-1)});H.length=0,this.h.g+=y,this.C=0,Ie=this.h.g}else Ie=this.g.oa();if(this.o=N==200,V6(this.i,this.u,this.A,this.l,this.R,Bn,N),this.o){if(this.T&&!this.K){t:{if(this.g){var Et,On=this.g;if((Et=On.g?On.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!O(Et)){var xt=Et;break t}}xt=null}if(N=xt)wc(this.i,this.l,N,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,iu(this,N);else{this.o=!1,this.s=3,Zt(12),rr(this),Ys(this);break e}}if(this.P){N=!0;let ir;for(;!this.J&&this.C<Ie.length;)if(ir=r1(this,Ie),ir==dd){Bn==4&&(this.s=4,Zt(14),N=!1),wc(this.i,this.l,null,"[Incomplete Response]");break}else if(ir==O0){this.s=4,Zt(15),wc(this.i,this.l,Ie,"[Invalid Chunk]"),N=!1;break}else wc(this.i,this.l,ir,null),iu(this,ir);if(n1(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),Bn!=4||Ie.length!=0||this.h.h||(this.s=1,Zt(16),N=!1),this.o=this.o&&N,!N)wc(this.i,this.l,Ie,"[Invalid Chunked Response]"),rr(this),Ys(this);else if(0<Ie.length&&!this.W){this.W=!0;var $n=this.j;$n.g==this&&$n.ba&&!$n.M&&($n.j.info("Great, no buffering proxy detected. Bytes received: "+Ie.length),mu($n),$n.M=!0,Zt(11))}}else wc(this.i,this.l,Ie,null),iu(this,Ie);Bn==4&&rr(this),this.o&&!this.J&&(Bn==4?p1(this.j,this):(this.o=!1,ru(this)))}else G6(this.g),N==400&&0<Ie.indexOf("Unknown SID")?(this.s=3,Zt(12)):(this.s=0,Zt(13)),rr(this),Ys(this)}}}catch{}finally{}};function n1(y){return y.g?y.u=="GET"&&y.L!=2&&y.j.Ca:!1}function r1(y,_){var N=y.C,H=_.indexOf(` 2157`,N);return H==-1?dd:(N=Number(_.substring(N,H)),isNaN(N)?O0:(H+=1,H+N>_.length?dd:(_=_.slice(H,H+N),y.C=H+N,_)))}kr.prototype.cancel=function(){this.J=!0,rr(this)};function ru(y){y.S=Date.now()+y.I,i1(y,y.I)}function i1(y,_){if(y.B!=null)throw Error("WatchDog timer not null");y.B=wn(g(y.ba,y),_)}function Ac(y){y.B&&(l.clearTimeout(y.B),y.B=null)}kr.prototype.ba=function(){this.B=null;const y=Date.now();0<=y-this.S?(t1(this.i,this.A),this.L!=2&&(bc(),Zt(17)),rr(this),this.s=2,Ys(this)):i1(this,this.S-y)};function Ys(y){y.j.G==0||y.J||p1(y.j,y)}function rr(y){Ac(y);var _=y.M;_&&typeof _.ma=="function"&&_.ma(),y.M=null,Hn(y.U),y.g&&(_=y.g,y.g=null,_.abort(),_.ma())}function iu(y,_){try{var N=y.j;if(N.G!=0&&(N.g==y||B0(N.h,y))){if(!y.K&&B0(N.h,y)&&N.G==3){try{var H=N.Da.g.parse(_)}catch{H=null}if(Array.isArray(H)&&H.length==3){var ie=H;if(ie[0]==0){e:if(!N.u){if(N.g)if(N.g.F+3e3<y.F)Cd(N),Ed(N);else break e;H0(N),Zt(18)}}else N.za=ie[1],0<N.za-N.T&&37500>ie[2]&&N.F&&N.v==0&&!N.C&&(N.C=wn(g(N.Za,N),6e3));if(1>=pd(N.h)&&N.ca){try{N.ca()}catch{}N.ca=void 0}}else aa(N,11)}else if((y.K||N.g==y)&&Cd(N),!O(_))for(ie=N.Da.g.parse(_),_=0;_<ie.length;_++){let xt=ie[_];if(N.T=xt[0],xt=xt[1],N.G==2)if(xt[0]=="c"){N.K=xt[1],N.ia=xt[2];const $n=xt[3];$n!=null&&(N.la=$n,N.j.info("VER="+N.la));const Bn=xt[4];Bn!=null&&(N.Aa=Bn,N.j.info("SVER="+N.Aa));const ca=xt[5];ca!=null&&typeof ca=="number"&&0<ca&&(H=1.5*ca,N.L=H,N.j.info("backChannelRequestTimeoutMs_="+H)),H=N;const ir=y.g;if(ir){const ro=ir.g?ir.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(ro){var de=H.h;de.g||ro.indexOf("spdy")==-1&&ro.indexOf("quic")==-1&&ro.indexOf("h2")==-1||(de.j=de.l,de.g=new Set,de.h&&(md(de,de.h),de.h=null))}if(H.D){const $0=ir.g?ir.g.getResponseHeader("X-HTTP-Session-Id"):null;$0&&(H.ya=$0,zt(H.I,H.D,$0))}}N.G=3,N.l&&N.l.ua(),N.ba&&(N.R=Date.now()-y.F,N.j.info("Handshake RTT: "+N.R+"ms")),H=N;var Ie=y;if(H.qa=g1(H,H.J?H.ia:null,H.W),Ie.K){Nr(H.h,Ie);var Et=Ie,On=H.L;On&&(Et.I=On),Et.B&&(Ac(Et),ru(Et)),H.g=Ie}else d1(H);0<N.i.length&&xd(N)}else xt[0]!="stop"&&xt[0]!="close"||aa(N,7);else N.G==3&&(xt[0]=="stop"||xt[0]=="close"?xt[0]=="stop"?aa(N,7):V0(N):xt[0]!="noop"&&N.l&&N.l.ta(xt),N.v=0)}}bc(4)}catch{}}var s1=class{constructor(y,_){this.g=y,this.map=_}};function ta(y){this.l=y||10,l.PerformanceNavigationTiming?(y=l.performance.getEntriesByType("navigation"),y=0<y.length&&(y[0].nextHopProtocol=="hq"||y[0].nextHopProtocol=="h2")):y=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=y?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function hd(y){return y.h?!0:y.g?y.g.size>=y.j:!1}function pd(y){return y.h?1:y.g?y.g.size:0}function B0(y,_){return y.h?y.h==_:y.g?y.g.has(_):!1}function md(y,_){y.g?y.g.add(_):y.h=_}function Nr(y,_){y.h&&y.h==_?y.h=null:y.g&&y.g.has(_)&&y.g.delete(_)}ta.prototype.cancel=function(){if(this.i=P0(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const y of this.g.values())y.cancel();this.g.clear()}};function P0(y){if(y.h!=null)return y.i.concat(y.h.D);if(y.g!=null&&y.g.size!==0){let _=y.i;for(const N of y.g.values())_=_.concat(N.D);return _}return v(y.i)}function z6(y){if(y.V&&typeof y.V=="function")return y.V();if(typeof Map<"u"&&y instanceof Map||typeof Set<"u"&&y instanceof Set)return Array.from(y.values());if(typeof y=="string")return y.split("");if(u(y)){for(var _=[],N=y.length,H=0;H<N;H++)_.push(y[H]);return _}_=[],N=0;for(H in y)_[N++]=y[H];return _}function gd(y){if(y.na&&typeof y.na=="function")return y.na();if(!y.V||typeof y.V!="function"){if(typeof Map<"u"&&y instanceof Map)return Array.from(y.keys());if(!(typeof Set<"u"&&y instanceof Set)){if(u(y)||typeof y=="string"){var _=[];y=y.length;for(var N=0;N<y;N++)_.push(N);return _}_=[],N=0;for(const H in y)_[N++]=H;return _}}}function D0(y,_){if(y.forEach&&typeof y.forEach=="function")y.forEach(_,void 0);else if(u(y)||typeof y=="string")Array.prototype.forEach.call(y,_,void 0);else for(var N=gd(y),H=z6(y),ie=H.length,de=0;de<ie;de++)_.call(void 0,H[de],N&&N[de],y)}var su=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function H6(y,_){if(y){y=y.split("&");for(var N=0;N<y.length;N++){var H=y[N].indexOf("="),ie=null;if(0<=H){var de=y[N].substring(0,H);ie=y[N].substring(H+1)}else de=y[N];_(de,ie?decodeURIComponent(ie.replace(/\+/g," ")):"")}}}function vn(y){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,y instanceof vn){this.h=y.h,ou(this,y.j),this.o=y.o,this.g=y.g,Ec(this,y.s),this.l=y.l;var _=y.i,N=new ra;N.i=_.i,_.g&&(N.g=new Map(_.g),N.h=_.h),na(this,N),this.m=y.m}else y&&(_=String(y).match(su))?(this.h=!1,ou(this,_[1]||"",!0),this.o=zi(_[2]||""),this.g=zi(_[3]||"",!0),Ec(this,_[4]),this.l=zi(_[5]||"",!0),na(this,_[6]||"",!0),this.m=zi(_[7]||"")):(this.h=!1,this.i=new ra(null,this.h))}vn.prototype.toString=function(){var y=[],_=this.j;_&&y.push(cu(_,M0,!0),":");var N=this.g;return(N||_=="file")&&(y.push("//"),(_=this.o)&&y.push(cu(_,M0,!0),"@"),y.push(encodeURIComponent(String(N)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),N=this.s,N!=null&&y.push(":",String(N))),(N=this.l)&&(this.g&&N.charAt(0)!="/"&&y.push("/"),y.push(cu(N,N.charAt(0)=="/"?q6:j0,!0))),(N=this.i.toString())&&y.push("?",N),(N=this.m)&&y.push("#",cu(N,yd)),y.join("")};function mi(y){return new vn(y)}function ou(y,_,N){y.j=N?zi(_,!0):_,y.j&&(y.j=y.j.replace(/:$/,""))}function Ec(y,_){if(_){if(_=Number(_),isNaN(_)||0>_)throw Error("Bad port number "+_);y.s=_}else y.s=null}function na(y,_,N){_ instanceof ra?(y.i=_,a1(y.i,y.h)):(N||(_=cu(_,$6)),y.i=new ra(_,y.h))}function zt(y,_,N){y.i.set(_,N)}function au(y){return zt(y,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),y}function zi(y,_){return y?_?decodeURI(y.replace(/%25/g,"%2525")):decodeURIComponent(y):""}function cu(y,_,N){return typeof y=="string"?(y=encodeURI(y).replace(_,o1),N&&(y=y.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),y):null}function o1(y){return y=y.charCodeAt(0),"%"+(y>>4&15).toString(16)+(y&15).toString(16)}var M0=/[#\/\?@]/g,j0=/[#\?:]/g,q6=/[#\?]/g,$6=/[#\?@]/g,yd=/#/g;function ra(y,_){this.h=this.g=null,this.i=y||null,this.j=!!_}function Hi(y){y.g||(y.g=new Map,y.h=0,y.i&&H6(y.i,function(_,N){y.add(decodeURIComponent(_.replace(/\+/g," ")),N)}))}t=ra.prototype,t.add=function(y,_){Hi(this),this.i=null,y=Js(this,y);var N=this.g.get(y);return N||this.g.set(y,N=[]),N.push(_),this.h+=1,this};function ia(y,_){Hi(y),_=Js(y,_),y.g.has(_)&&(y.i=null,y.h-=y.g.get(_).length,y.g.delete(_))}function sa(y,_){return Hi(y),_=Js(y,_),y.g.has(_)}t.forEach=function(y,_){Hi(this),this.g.forEach(function(N,H){N.forEach(function(ie){y.call(_,ie,H,this)},this)},this)},t.na=function(){Hi(this);const y=Array.from(this.g.values()),_=Array.from(this.g.keys()),N=[];for(let H=0;H<_.length;H++){const ie=y[H];for(let de=0;de<ie.length;de++)N.push(_[H])}return N},t.V=function(y){Hi(this);let _=[];if(typeof y=="string")sa(this,y)&&(_=_.concat(this.g.get(Js(this,y))));else{y=Array.from(this.g.values());for(let N=0;N<y.length;N++)_=_.concat(y[N])}return _},t.set=function(y,_){return Hi(this),this.i=null,y=Js(this,y),sa(this,y)&&(this.h-=this.g.get(y).length),this.g.set(y,[_]),this.h+=1,this},t.get=function(y,_){return y?(y=this.V(y),0<y.length?String(y[0]):_):_};function L0(y,_,N){ia(y,_),0<N.length&&(y.i=null,y.g.set(Js(y,_),v(N)),y.h+=N.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const y=[],_=Array.from(this.g.keys());for(var N=0;N<_.length;N++){var H=_[N];const de=encodeURIComponent(String(H)),Ie=this.V(H);for(H=0;H<Ie.length;H++){var ie=de;Ie[H]!==""&&(ie+="="+encodeURIComponent(String(Ie[H]))),y.push(ie)}}return this.i=y.join("&")};function Js(y,_){return _=String(_),y.j&&(_=_.toLowerCase()),_}function a1(y,_){_&&!y.j&&(Hi(y),y.i=null,y.g.forEach(function(N,H){var ie=H.toLowerCase();H!=ie&&(ia(this,H),L0(this,ie,N))},y)),y.j=_}function lu(y,_){const N=new Vi;if(l.Image){const H=new Image;H.onload=w(qi,N,"TestLoadImage: loaded",!0,_,H),H.onerror=w(qi,N,"TestLoadImage: error",!1,_,H),H.onabort=w(qi,N,"TestLoadImage: abort",!1,_,H),H.ontimeout=w(qi,N,"TestLoadImage: timeout",!1,_,H),l.setTimeout(function(){H.ontimeout&&H.ontimeout()},1e4),H.src=y}else _(!1)}function ws(y,_){const N=new Vi,H=new AbortController,ie=setTimeout(()=>{H.abort(),qi(N,"TestPingServer: timeout",!1,_)},1e4);fetch(y,{signal:H.signal}).then(de=>{clearTimeout(ie),de.ok?qi(N,"TestPingServer: ok",!0,_):qi(N,"TestPingServer: server error",!1,_)}).catch(()=>{clearTimeout(ie),qi(N,"TestPingServer: error",!1,_)})}function qi(y,_,N,H,ie){try{ie&&(ie.onload=null,ie.onerror=null,ie.onabort=null,ie.ontimeout=null),H(N)}catch{}}function uu(){this.g=new tu}function Xs(y,_,N){const H=N||"";try{D0(y,function(ie,de){let Ie=ie;d(ie)&&(Ie=Rr(ie)),_.push(H+de+"="+encodeURIComponent(Ie))})}catch(ie){throw _.push(H+"type="+encodeURIComponent("_badmap")),ie}}function xc(y){this.l=y.Ub||null,this.j=y.eb||!1}A(xc,T0),xc.prototype.g=function(){return new oa(this.l,this.j)},xc.prototype.i=(function(y){return function(){return y}})({});function oa(y,_){Ve.call(this),this.D=y,this.o=_,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}A(oa,Ve),t=oa.prototype,t.open=function(y,_){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=y,this.A=_,this.readyState=1,eo(this)},t.send=function(y){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const _={headers:this.u,method:this.B,credentials:this.m,cache:void 0};y&&(_.body=y),(this.D||l).fetch(new Request(this.A,_)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Zs(this)),this.readyState=0},t.Sa=function(y){if(this.g&&(this.l=y,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=y.headers,this.readyState=2,eo(this)),this.g&&(this.readyState=3,eo(this),this.g)))if(this.responseType==="arraybuffer")y.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in y){if(this.j=y.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;U0(this)}else y.text().then(this.Ra.bind(this),this.ga.bind(this))};function U0(y){y.j.read().then(y.Pa.bind(y)).catch(y.ga.bind(y))}t.Pa=function(y){if(this.g){if(this.o&&y.value)this.response.push(y.value);else if(!this.o){var _=y.value?y.value:new Uint8Array(0);(_=this.v.decode(_,{stream:!y.done}))&&(this.response=this.responseText+=_)}y.done?Zs(this):eo(this),this.readyState==3&&U0(this)}},t.Ra=function(y){this.g&&(this.response=this.responseText=y,Zs(this))},t.Qa=function(y){this.g&&(this.response=y,Zs(this))},t.ga=function(){this.g&&Zs(this)};function Zs(y){y.readyState=4,y.l=null,y.j=null,y.v=null,eo(y)}t.setRequestHeader=function(y,_){this.u.append(y,_)},t.getResponseHeader=function(y){return this.h&&this.h.get(y.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const y=[],_=this.h.entries();for(var N=_.next();!N.done;)N=N.value,y.push(N[0]+": "+N[1]),N=_.next();return y.join(`\r 2158`)};function eo(y){y.onreadystatechange&&y.onreadystatechange.call(y)}Object.defineProperty(oa.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(y){this.m=y?"include":"same-origin"}});function F0(y){let _="";return U(y,function(N,H){_+=H,_+=":",_+=N,_+=`\r 2159`}),_}function qn(y,_,N){e:{for(H in N){var H=!1;break e}H=!0}H||(N=F0(N),typeof y=="string"?N!=null&&encodeURIComponent(String(N)):zt(y,_,N))}function Dt(y){Ve.call(this),this.headers=new Map,this.o=y||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}A(Dt,Ve);var bd=/^https?$/i,fu=["POST","PUT"];t=Dt.prototype,t.Ha=function(y){this.J=y},t.ea=function(y,_,N,H){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+y);_=_?_.toUpperCase():"GET",this.D=y,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Ks.g(),this.v=this.o?S0(this.o):S0(Ks),this.g.onreadystatechange=g(this.Ea,this);try{this.B=!0,this.g.open(_,String(y),!0),this.B=!1}catch(de){c1(this,de);return}if(y=N||"",N=new Map(this.headers),H)if(Object.getPrototypeOf(H)===Object.prototype)for(var ie in H)N.set(ie,H[ie]);else if(typeof H.keys=="function"&&typeof H.get=="function")for(const de of H.keys())N.set(de,H.get(de));else throw Error("Unknown input type for opt_headers: "+String(H));H=Array.from(N.keys()).find(de=>de.toLowerCase()=="content-type"),ie=l.FormData&&y instanceof l.FormData,!(0<=Array.prototype.indexOf.call(fu,_,void 0))||H||ie||N.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[de,Ie]of N)this.g.setRequestHeader(de,Ie);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{du(this),this.u=!0,this.g.send(y),this.u=!1}catch(de){c1(this,de)}};function c1(y,_){y.h=!1,y.g&&(y.j=!0,y.g.abort(),y.j=!1),y.l=_,y.m=5,wd(y),to(y)}function wd(y){y.A||(y.A=!0,Le(y,"complete"),Le(y,"error"))}t.abort=function(y){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=y||7,Le(this,"complete"),Le(this,"abort"),to(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),to(this,!0)),Dt.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?vd(this):this.bb())},t.bb=function(){vd(this)};function vd(y){if(y.h&&typeof a<"u"&&(!y.v[1]||$i(y)!=4||y.Z()!=2)){if(y.u&&$i(y)==4)rt(y.Ea,0,y);else if(Le(y,"readystatechange"),$i(y)==4){y.h=!1;try{const Ie=y.Z();e:switch(Ie){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var _=!0;break e;default:_=!1}var N;if(!(N=_)){var H;if(H=Ie===0){var ie=String(y.D).match(su)[1]||null;!ie&&l.self&&l.self.location&&(ie=l.self.location.protocol.slice(0,-1)),H=!bd.test(ie?ie.toLowerCase():"")}N=H}if(N)Le(y,"complete"),Le(y,"success");else{y.m=6;try{var de=2<$i(y)?y.g.statusText:""}catch{de=""}y.l=de+" ["+y.Z()+"]",wd(y)}}finally{to(y)}}}}function to(y,_){if(y.g){du(y);const N=y.g,H=y.v[0]?()=>{}:null;y.g=null,y.v=null,_||Le(y,"ready");try{N.onreadystatechange=H}catch{}}}function du(y){y.I&&(l.clearTimeout(y.I),y.I=null)}t.isActive=function(){return!!this.g};function $i(y){return y.g?y.g.readyState:0}t.Z=function(){try{return 2<$i(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(y){if(this.g){var _=this.g.responseText;return y&&_.indexOf(y)==0&&(_=_.substring(y.length)),Yo(_)}};function l1(y){try{if(!y.g)return null;if("response"in y.g)return y.g.response;switch(y.H){case"":case"text":return y.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in y.g)return y.g.mozResponseArrayBuffer}return null}catch{return null}}function G6(y){const _={};y=(y.g&&2<=$i(y)&&y.g.getAllResponseHeaders()||"").split(`\r 2160`);for(let H=0;H<y.length;H++){if(O(y[H]))continue;var N=j(y[H]);const ie=N[0];if(N=N[1],typeof N!="string")continue;N=N.trim();const de=_[ie]||[];_[ie]=de,de.push(N)}I(_,function(H){return H.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function hu(y,_,N){return N&&N.internalChannelParams&&N.internalChannelParams[y]||_}function Ad(y){this.Aa=0,this.i=[],this.j=new Vi,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=hu("failFast",!1,y),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=hu("baseRetryDelayMs",5e3,y),this.cb=hu("retryDelaySeedMs",1e4,y),this.Wa=hu("forwardChannelMaxRetries",2,y),this.wa=hu("forwardChannelRequestTimeoutMs",2e4,y),this.pa=y&&y.xmlHttpFactory||void 0,this.Xa=y&&y.Tb||void 0,this.Ca=y&&y.useFetchStreams||!1,this.L=void 0,this.J=y&&y.supportsCrossDomainXhr||!1,this.K="",this.h=new ta(y&&y.concurrentRequestLimit),this.Da=new uu,this.P=y&&y.fastHandshake||!1,this.O=y&&y.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=y&&y.Rb||!1,y&&y.xa&&this.j.xa(),y&&y.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&y&&y.detectBufferingProxy||!1,this.ja=void 0,y&&y.longPollingTimeout&&0<y.longPollingTimeout&&(this.ja=y.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=Ad.prototype,t.la=8,t.G=1,t.connect=function(y,_,N,H){Zt(0),this.W=y,this.H=_||{},N&&H!==void 0&&(this.H.OSID=N,this.H.OAID=H),this.F=this.X,this.I=g1(this,null,this.W),xd(this)};function V0(y){if(u1(y),y.G==3){var _=y.U++,N=mi(y.I);if(zt(N,"SID",y.K),zt(N,"RID",_),zt(N,"TYPE","terminate"),pu(y,N),_=new kr(y,y.j,_),_.L=2,_.v=au(mi(N)),N=!1,l.navigator&&l.navigator.sendBeacon)try{N=l.navigator.sendBeacon(_.v.toString(),"")}catch{}!N&&l.Image&&(new Image().src=_.v,N=!0),N||(_.g=y1(_.j,null),_.g.ea(_.v)),_.F=Date.now(),ru(_)}m1(y)}function Ed(y){y.g&&(mu(y),y.g.cancel(),y.g=null)}function u1(y){Ed(y),y.u&&(l.clearTimeout(y.u),y.u=null),Cd(y),y.h.cancel(),y.s&&(typeof y.s=="number"&&l.clearTimeout(y.s),y.s=null)}function xd(y){if(!hd(y.h)&&!y.s){y.s=!0;var _=y.Ga;te||$(),J||(te(),J=!0),fe.add(_,y),y.B=0}}function Q6(y,_){return pd(y.h)>=y.h.j-(y.s?1:0)?!1:y.s?(y.i=_.D.concat(y.i),!0):y.G==1||y.G==2||y.B>=(y.Va?0:y.Wa)?!1:(y.s=wn(g(y.Ga,y,_),q0(y,y.B)),y.B++,!0)}t.Ga=function(y){if(this.s)if(this.s=null,this.G==1){if(!y){this.U=Math.floor(1e5*Math.random()),y=this.U++;const ie=new kr(this,this.j,y);let de=this.o;if(this.S&&(de?(de=R(de),F(de,this.S)):de=this.S),this.m!==null||this.O||(ie.H=de,de=null),this.P)e:{for(var _=0,N=0;N<this.i.length;N++){t:{var H=this.i[N];if("__data__"in H.map&&(H=H.map.__data__,typeof H=="string")){H=H.length;break t}H=void 0}if(H===void 0)break;if(_+=H,4096<_){_=N;break e}if(_===4096||N===this.i.length-1){_=N+1;break e}}_=1e3}else _=1e3;_=f1(this,ie,_),N=mi(this.I),zt(N,"RID",y),zt(N,"CVER",22),this.D&&zt(N,"X-HTTP-Session-Id",this.D),pu(this,N),de&&(this.O?_="headers="+encodeURIComponent(String(F0(de)))+"&"+_:this.m&&qn(N,this.m,de)),md(this.h,ie),this.Ua&&zt(N,"TYPE","init"),this.P?(zt(N,"$req",_),zt(N,"SID","null"),ie.T=!0,bs(ie,N,null)):bs(ie,N,_),this.G=2}}else this.G==3&&(y?z0(this,y):this.i.length==0||hd(this.h)||z0(this))};function z0(y,_){var N;_?N=_.l:N=y.U++;const H=mi(y.I);zt(H,"SID",y.K),zt(H,"RID",N),zt(H,"AID",y.T),pu(y,H),y.m&&y.o&&qn(H,y.m,y.o),N=new kr(y,y.j,N,y.B+1),y.m===null&&(N.H=y.o),_&&(y.i=_.D.concat(y.i)),_=f1(y,N,1e3),N.I=Math.round(.5*y.wa)+Math.round(.5*y.wa*Math.random()),md(y.h,N),bs(N,H,_)}function pu(y,_){y.H&&U(y.H,function(N,H){zt(_,H,N)}),y.l&&D0({},function(N,H){zt(_,H,N)})}function f1(y,_,N){N=Math.min(y.i.length,N);var H=y.l?g(y.l.Na,y.l,y):null;e:{var ie=y.i;let de=-1;for(;;){const Ie=["count="+N];de==-1?0<N?(de=ie[0].g,Ie.push("ofs="+de)):de=0:Ie.push("ofs="+de);let Et=!0;for(let On=0;On<N;On++){let xt=ie[On].g;const $n=ie[On].map;if(xt-=de,0>xt)de=Math.max(0,ie[On].g-100),Et=!1;else try{Xs($n,Ie,"req"+xt+"_")}catch{H&&H($n)}}if(Et){H=Ie.join("&");break e}}}return y=y.i.splice(0,N),_.D=y,H}function d1(y){if(!y.g&&!y.u){y.Y=1;var _=y.Fa;te||$(),J||(te(),J=!0),fe.add(_,y),y.v=0}}function H0(y){return y.g||y.u||3<=y.v?!1:(y.Y++,y.u=wn(g(y.Fa,y),q0(y,y.v)),y.v++,!0)}t.Fa=function(){if(this.u=null,h1(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var y=2*this.R;this.j.info("BP detection timer enabled: "+y),this.A=wn(g(this.ab,this),y)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,Zt(10),Ed(this),h1(this))};function mu(y){y.A!=null&&(l.clearTimeout(y.A),y.A=null)}function h1(y){y.g=new kr(y,y.j,"rpc",y.Y),y.m===null&&(y.g.H=y.o),y.g.O=0;var _=mi(y.qa);zt(_,"RID","rpc"),zt(_,"SID",y.K),zt(_,"AID",y.T),zt(_,"CI",y.F?"0":"1"),!y.F&&y.ja&&zt(_,"TO",y.ja),zt(_,"TYPE","xmlhttp"),pu(y,_),y.m&&y.o&&qn(_,y.m,y.o),y.L&&(y.g.I=y.L);var N=y.g;y=y.ia,N.L=1,N.v=au(mi(_)),N.m=null,N.P=!0,ea(N,y)}t.Za=function(){this.C!=null&&(this.C=null,Ed(this),H0(this),Zt(19))};function Cd(y){y.C!=null&&(l.clearTimeout(y.C),y.C=null)}function p1(y,_){var N=null;if(y.g==_){Cd(y),mu(y),y.g=null;var H=2}else if(B0(y.h,_))N=_.D,Nr(y.h,_),H=1;else return;if(y.G!=0){if(_.o)if(H==1){N=_.m?_.m.length:0,_=Date.now()-_.F;var ie=y.B;H=yc(),Le(H,new Nn(H,N)),xd(y)}else d1(y);else if(ie=_.s,ie==3||ie==0&&0<_.X||!(H==1&&Q6(y,_)||H==2&&H0(y)))switch(N&&0<N.length&&(_=y.h,_.i=_.i.concat(N)),ie){case 1:aa(y,5);break;case 4:aa(y,10);break;case 3:aa(y,6);break;default:aa(y,2)}}}function q0(y,_){let N=y.Ta+Math.floor(Math.random()*y.cb);return y.isActive()||(N*=2),N*_}function aa(y,_){if(y.j.info("Error code "+_),_==2){var N=g(y.fb,y),H=y.Xa;const ie=!H;H=new vn(H||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||ou(H,"https"),au(H),ie?lu(H.toString(),N):ws(H.toString(),N)}else Zt(2);y.G=0,y.l&&y.l.sa(_),m1(y),u1(y)}t.fb=function(y){y?(this.j.info("Successfully pinged google.com"),Zt(2)):(this.j.info("Failed to ping google.com"),Zt(1))};function m1(y){if(y.G=0,y.ka=[],y.l){const _=P0(y.h);(_.length!=0||y.i.length!=0)&&(x(y.ka,_),x(y.ka,y.i),y.h.i.length=0,v(y.i),y.i.length=0),y.l.ra()}}function g1(y,_,N){var H=N instanceof vn?mi(N):new vn(N);if(H.g!="")_&&(H.g=_+"."+H.g),Ec(H,H.s);else{var ie=l.location;H=ie.protocol,_=_?_+"."+ie.hostname:ie.hostname,ie=+ie.port;var de=new vn(null);H&&ou(de,H),_&&(de.g=_),ie&&Ec(de,ie),N&&(de.l=N),H=de}return N=y.D,_=y.ya,N&&_&&zt(H,N,_),zt(H,"VER",y.la),pu(y,H),H}function y1(y,_,N){if(_&&!y.J)throw Error("Can't create secondary domain capable XhrIo object.");return _=y.Ca&&!y.pa?new Dt(new xc({eb:N})):new Dt(y.pa),_.Ha(y.J),_}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function b1(){}t=b1.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function _d(){}_d.prototype.g=function(y,_){return new Or(y,_)};function Or(y,_){Ve.call(this),this.g=new Ad(_),this.l=y,this.h=_&&_.messageUrlParams||null,y=_&&_.messageHeaders||null,_&&_.clientProtocolHeaderRequired&&(y?y["X-Client-Protocol"]="webchannel":y={"X-Client-Protocol":"webchannel"}),this.g.o=y,y=_&&_.initMessageHeaders||null,_&&_.messageContentType&&(y?y["X-WebChannel-Content-Type"]=_.messageContentType:y={"X-WebChannel-Content-Type":_.messageContentType}),_&&_.va&&(y?y["X-WebChannel-Client-Profile"]=_.va:y={"X-WebChannel-Client-Profile":_.va}),this.g.S=y,(y=_&&_.Sb)&&!O(y)&&(this.g.m=y),this.v=_&&_.supportsCrossDomainXhr||!1,this.u=_&&_.sendRawJson||!1,(_=_&&_.httpSessionIdParam)&&!O(_)&&(this.g.D=_,y=this.h,y!==null&&_ in y&&(y=this.h,_ in y&&delete y[_])),this.j=new no(this)}A(Or,Ve),Or.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Or.prototype.close=function(){V0(this.g)},Or.prototype.o=function(y){var _=this.g;if(typeof y=="string"){var N={};N.__data__=y,y=N}else this.u&&(N={},N.__data__=Rr(y),y=N);_.i.push(new s1(_.Ya++,y)),_.G==3&&xd(_)},Or.prototype.N=function(){this.g.l=null,delete this.j,V0(this.g),delete this.g,Or.aa.N.call(this)};function w1(y){Xo.call(this),y.__headers__&&(this.headers=y.__headers__,this.statusCode=y.__status__,delete y.__headers__,delete y.__status__);var _=y.__sm__;if(_){e:{for(const N in _){y=N;break e}y=void 0}(this.i=y)&&(y=this.i,_=_!==null&&y in _?_[y]:void 0),this.data=_}else this.data=y}A(w1,Xo);function v1(){R0.call(this),this.status=1}A(v1,R0);function no(y){this.g=y}A(no,b1),no.prototype.ua=function(){Le(this.g,"a")},no.prototype.ta=function(y){Le(this.g,new w1(y))},no.prototype.sa=function(y){Le(this.g,new v1)},no.prototype.ra=function(){Le(this.g,"b")},_d.prototype.createWebChannel=_d.prototype.g,Or.prototype.send=Or.prototype.o,Or.prototype.open=Or.prototype.m,Or.prototype.close=Or.prototype.close,MM=function(){return new _d},DM=function(){return yc()},PM=Qs,Px={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},vc.NO_ERROR=0,vc.TIMEOUT=8,vc.HTTP_ERROR=6,rw=vc,Zo.COMPLETE="complete",BM=Zo,I0.EventType=Jo,Jo.OPEN="a",Jo.CLOSE="b",Jo.ERROR="c",Jo.MESSAGE="d",Ve.prototype.listen=Ve.prototype.K,Qm=I0,Dt.prototype.listenOnce=Dt.prototype.L,Dt.prototype.getLastError=Dt.prototype.Ka,Dt.prototype.getLastErrorCode=Dt.prototype.Ba,Dt.prototype.getStatus=Dt.prototype.Z,Dt.prototype.getResponseJson=Dt.prototype.Oa,Dt.prototype.getResponseText=Dt.prototype.oa,Dt.prototype.send=Dt.prototype.ea,Dt.prototype.setWithCredentials=Dt.prototype.Ha,OM=Dt}).apply(typeof Db<"u"?Db:typeof self<"u"?self:typeof window<"u"?window:{});const w7="@firebase/firestore",v7="4.8.0";/** 2161 * @license 2162 * Copyright 2017 Google LLC 2163 * 2164 * Licensed under the Apache License, Version 2.0 (the "License");
2165 * you may not use this file except in compliance with the License. 2166 * You may obtain a copy of the License at 2167 * 2168 * http://www.apache.org/licenses/LICENSE-2.0 2169 * 2170 * Unless required by applicable law or agreed to in writing, software 2171 * distributed under the License is distributed on an "AS IS" BASIS, 2172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2173 * See the License for the specific language governing permissions and 2174 * limitations under the License. 2175 */class Cr{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Cr.UNAUTHENTICATED=new Cr(null),Cr.GOOGLE_CREDENTIALS=new Cr("google-credentials-uid"),Cr.FIRST_PARTY=new Cr("first-party-uid"),Cr.MOCK_USER=new Cr("mock-user");/** 2176 * @license 2177 * Copyright 2017 Google LLC 2178 * 2179 * Licensed under the Apache License, Version 2.0 (the "License"); 2180 * you may not use this file except in compliance with the License. 2181 * You may obtain a copy of the License at 2182 * 2183 * http://www.apache.org/licenses/LICENSE-2.0 2184 * 2185 * Unless required by applicable law or agreed to in writing, software 2186 * distributed under the License is distributed on an "AS IS" BASIS, 2187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2188 * See the License for the specific language governing permissions and 2189 * limitations under the License. 2190 */let w0="11.10.0";/** 2191 * @license 2192 * Copyright 2017 Google LLC 2193 * 2194 * Licensed under the Apache License, Version 2.0 (the "License"); 2195 * you may not use this file except in compliance with the License. 2196 * You may obtain a copy of the License at 2197 * 2198 * http://www.apache.org/licenses/LICENSE-2.0 2199 * 2200 * Unless required by applicable law or agreed to in writing, software 2201 * distributed under the License is distributed on an "AS IS" BASIS, 2202 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2203 * See the License for the specific language governing permissions and 2204 * limitations under the License. 2205 */const Qf=new Z2("@firebase/firestore");function uh(){return Qf.logLevel}function Ne(t,...e){if(Qf.logLevel<=Tt.DEBUG){const n=e.map(t_);Qf.debug(`Firestore (${w0}): ${t}`,...n)}}function cc(t,...e){if(Qf.logLevel<=Tt.ERROR){const n=e.map(t_);Qf.error(`Firestore (${w0}): ${t}`,...n)}}function Vl(t,...e){if(Qf.logLevel<=Tt.WARN){const n=e.map(t_);Qf.warn(`Firestore (${w0}): ${t}`,...n)}}function t_(t){if(typeof t=="string")return t;try{/** 2206* @license 2207* Copyright 2020 Google LLC 2208* 2209* Licensed under the Apache License, Version 2.0 (the "License"); 2210* you may not use this file except in compliance with the License. 2211* You may obtain a copy of the License at 2212* 2213* http://www.apache.org/licenses/LICENSE-2.0 2214* 2215* Unless required by applicable law or agreed to in writing, software 2216* distributed under the License is distributed on an "AS IS" BASIS, 2217* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2218* See the License for the specific language governing permissions and 2219* limitations under the License. 2220*/return(function(n){return JSON.stringify(n)})(t)}catch{return t}}/** 2221 * @license 2222 * Copyright 2017 Google LLC 2223 * 2224 * Licensed under the Apache License, Version 2.0 (the "License"); 2225 * you may not use this file except in compliance with the License. 2226 * You may obtain a copy of the License at 2227 * 2228 * http://www.apache.org/licenses/LICENSE-2.0 2229 * 2230 * Unless required by applicable law or agreed to in writing, software 2231 * distributed under the License is distributed on an "AS IS" BASIS, 2232 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2233 * See the License for the specific language governing permissions and 2234 * limitations under the License. 2235 */function Xe(t,e,n){let r="Unexpected state";typeof e=="string"?r=e:n=e,jM(t,r,n)}function jM(t,e,n){let r=`FIRESTORE (${w0}) INTERNAL ASSERTION FAILED: ${e} (ID: ${t.toString(16)})`;if(n!==void 0)try{r+=" CONTEXT: "+JSON.stringify(n)}catch{r+=" CONTEXT: "+n}throw cc(r),new Error(r)}function Lt(t,e,n,r){let i="Unexpected state";typeof n=="string"?i=n:r=n,t||jM(e,i,r)}function nt(t,e){return t}/** 2236 * @license 2237 * Copyright 2017 Google LLC 2238 * 2239 * Licensed under the Apache License, Version 2.0 (the "License");
2240 * you may not use this file except in compliance with the License. 2241 * You may obtain a copy of the License at 2242 * 2243 * http://www.apache.org/licenses/LICENSE-2.0 2244 * 2245 * Unless required by applicable law or agreed to in writing, software 2246 * distributed under the License is distributed on an "AS IS" BASIS, 2247 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2248 * See the License for the specific language governing permissions and 2249 * limitations under the License. 2250 */const xe={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class je extends Jl{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 2251 * @license 2252 * Copyright 2017 Google LLC 2253 * 2254 * Licensed under the Apache License, Version 2.0 (the "License"); 2255 * you may not use this file except in compliance with the License. 2256 * You may obtain a copy of the License at 2257 * 2258 * http://www.apache.org/licenses/LICENSE-2.0 2259 * 2260 * Unless required by applicable law or agreed to in writing, software 2261 * distributed under the License is distributed on an "AS IS" BASIS, 2262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2263 * See the License for the specific language governing permissions and 2264 * limitations under the License. 2265 */class Za{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}}/** 2266 * @license 2267 * Copyright 2017 Google LLC 2268 * 2269 * Licensed under the Apache License, Version 2.0 (the "License"); 2270 * you may not use this file except in compliance with the License. 2271 * You may obtain a copy of the License at 2272 * 2273 * http://www.apache.org/licenses/LICENSE-2.0 2274 * 2275 * Unless required by applicable law or agreed to in writing, software 2276 * distributed under the License is distributed on an "AS IS" BASIS, 2277 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2278 * See the License for the specific language governing permissions and 2279 * limitations under the License. 2280 */class LM{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class koe{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable((()=>n(Cr.UNAUTHENTICATED)))}shutdown(){}}class Noe{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable((()=>n(this.token.user)))}shutdown(){this.changeListener=null}}class Ooe{constructor(e){this.t=e,this.currentUser=Cr.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){Lt(this.o===void 0,42304);let r=this.i;const i=u=>this.i!==r?(r=this.i,n(u)):Promise.resolve();let s=new Za;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new Za,e.enqueueRetryable((()=>i(this.currentUser)))};const a=()=>{const u=s;e.enqueueRetryable((async()=>{await u.promise,await i(this.currentUser)}))},l=u=>{Ne("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=u,this.o&&(this.auth.addAuthTokenListener(this.o),a())};this.t.onInit((u=>l(u))),setTimeout((()=>{if(!this.auth){const u=this.t.getImmediate({optional:!0});u?l(u):(Ne("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Za)}}),0),a()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((r=>this.i!==e?(Ne("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Lt(typeof r.accessToken=="string",31837,{l:r}),new LM(r.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return Lt(e===null||typeof e=="string",2055,{h:e}),new Cr(e)}}class Boe{constructor(e,n,r){this.P=e,this.T=n,this.I=r,this.type="FirstParty",this.user=Cr.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);const e=this.R();return e&&this.A.set("Authorization",e),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}}class Poe{constructor(e,n,r){this.P=e,this.T=n,this.I=r}getToken(){return Promise.resolve(new Boe(this.P,this.T,this.I))}start(e,n){e.enqueueRetryable((()=>n(Cr.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class A7{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Doe{constructor(e,n){this.V=n,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,goe(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,n){Lt(this.o===void 0,3512);const r=s=>{s.error!=null&&Ne("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const a=s.token!==this.m;return this.m=s.token,Ne("FirebaseAppCheckTokenProvider",`Received ${a?"new":"existing"} token.`),a?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable((()=>r(s)))};const i=s=>{Ne("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((s=>i(s))),setTimeout((()=>
2280{if(!this.appCheck){const s=this.V.getImmediate({optional:!0});s?i(s):Ne("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new A7(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((n=>n?(Lt(typeof n.token=="string",44558,{tokenResult:n}),this.m=n.token,new A7(n.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** 2281 * @license 2282 * Copyright 2020 Google LLC 2283 * 2284 * Licensed under the Apache License, Version 2.0 (the "License"); 2285 * you may not use this file except in compliance with the License. 2286 * You may obtain a copy of the License at 2287 * 2288 * http://www.apache.org/licenses/LICENSE-2.0 2289 * 2290 * Unless required by applicable law or agreed to in writing, software 2291 * distributed under the License is distributed on an "AS IS" BASIS, 2292 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2293 * See the License for the specific language governing permissions and 2294 * limitations under the License. 2295 */function Moe(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}/** 2296 * @license 2297 * Copyright 2023 Google LLC 2298 * 2299 * Licensed under the Apache License, Version 2.0 (the "License"); 2300 * you may not use this file except in compliance with the License. 2301 * You may obtain a copy of the License at 2302 * 2303 * http://www.apache.org/licenses/LICENSE-2.0 2304 * 2305 * Unless required by applicable law or agreed to in writing, software 2306 * distributed under the License is distributed on an "AS IS" BASIS, 2307 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2308 * See the License for the specific language governing permissions and 2309 * limitations under the License. 2310 */function UM(){return new TextEncoder}/** 2311 * @license 2312 * Copyright 2017 Google LLC 2313 * 2314 * Licensed under the Apache License, Version 2.0 (the "License"); 2315 * you may not use this file except in compliance with the License. 2316 * You may obtain a copy of the License at 2317 * 2318 * http://www.apache.org/licenses/LICENSE-2.0 2319 * 2320 * Unless required by applicable law or agreed to in writing, software 2321 * distributed under the License is distributed on an "AS IS" BASIS, 2322 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2323 * See the License for the specific language governing permissions and 2324 * limitations under the License. 2325 */class n_{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const i=Moe(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%62))}return r}}function lt(t,e){return t<e?-1:t>e?1:0}function Dx(t,e){let n=0;for(;n<t.length&&n<e.length;){const r=t.codePointAt(n),i=e.codePointAt(n);if(r!==i){if(r<128&&i<128)return lt(r,i);{const s=UM(),a=joe(s.encode(E7(t,n)),s.encode(E7(e,n)));return a!==0?a:lt(r,i)}}n+=r>65535?2:1}return lt(t.length,e.length)}function E7(t,e){return t.codePointAt(e)>65535?t.substring(e,e+2):t.substring(e,e+1)}function joe(t,e){for(let n=0;n<t.length&&n<e.length;++n)if(t[n]!==e[n])return lt(t[n],e[n]);return lt(t.length,e.length)}function Wp(t,e,n){return t.length===e.length&&t.every(((r,i)=>n(r,e[i])))}/** 2326 * @license 2327 * Copyright 2017 Google LLC 2328 * 2329 * Licensed under the Apache License, Version 2.0 (the "License"); 2330 * you may not use this file except in compliance with the License. 2331 * You may obtain a copy of the License at 2332 * 2333 * http://www.apache.org/licenses/LICENSE-2.0 2334 * 2335 * Unless required by applicable law or agreed to in writing, software 2336 * distributed under the License is distributed on an "AS IS" BASIS, 2337 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2338 * See the License for the specific language governing permissions and 2339 * limitations under the License. 2340 */const x7="__name__";class po{constructor(e,n,r){n===void 0?n=0:n>e.length&&Xe(637,{offset:n,range:e.length}),r===void 0?r=e.length-n:r>e.length-n&&Xe(1746,{length:r,range:e.length-n}),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return po.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof po?e.forEach((r=>{n.push(r)})):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=po.compareSegments(e.get(i),n.get(i));if(s!==0)return s}return lt(e.length,n.length)}static compareSegments(e,n){const r=po.isNumericId(e),i=po.isNumericId(n);return r&&!i?-1:!r&&i?1:r&&i?po.extractNumericId(e).compare(po.extractNumericId(n)):Dx(e,n)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return Bl.fromString(e.substring(4,e.length-2))}}class Jt extends po{construct(e,n,r){return new Jt(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
2340toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new je(xe.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter((i=>i.length>0)))}return new Jt(n)}static emptyPath(){return new Jt([])}}const Loe=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class fr extends po{construct(e,n,r){return new fr(e,n,r)}static isValidIdentifier(e){return Loe.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),fr.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===x7}static keyField(){return new fr([x7])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new je(xe.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let a=!1;for(;i<e.length;){const l=e[i];if(l==="\\"){if(i+1===e.length)throw new je(xe.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const u=e[i+1];if(u!=="\\"&&u!=="."&&u!=="`")throw new je(xe.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else l==="`"?(a=!a,i++):l!=="."||a?(r+=l,i++):(s(),i++)}if(s(),a)throw new je(xe.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new fr(n)}static emptyPath(){return new fr([])}}/** 2341 * @license 2342 * Copyright 2017 Google LLC 2343 * 2344 * Licensed under the Apache License, Version 2.0 (the "License"); 2345 * you may not use this file except in compliance with the License. 2346 * You may obtain a copy of the License at 2347 * 2348 * http://www.apache.org/licenses/LICENSE-2.0 2349 * 2350 * Unless required by applicable law or agreed to in writing, software 2351 * distributed under the License is distributed on an "AS IS" BASIS, 2352 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2353 * See the License for the specific language governing permissions and 2354 * limitations under the License. 2355 */class Ge{constructor(e){this.path=e}static fromPath(e){return new Ge(Jt.fromString(e))}static fromName(e){return new Ge(Jt.fromString(e).popFirst(5))}static empty(){return new Ge(Jt.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Jt.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return Jt.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Ge(new Jt(e.slice()))}}/** 2356 * @license 2357 * Copyright 2017 Google LLC 2358 * 2359 * Licensed under the Apache License, Version 2.0 (the "License"); 2360 * you may not use this file except in compliance with the License. 2361 * You may obtain a copy of the License at 2362 * 2363 * http://www.apache.org/licenses/LICENSE-2.0 2364 * 2365 * Unless required by applicable law or agreed to in writing, software 2366 * distributed under the License is distributed on an "AS IS" BASIS, 2367 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2368 * See the License for the specific language governing permissions and 2369 * limitations under the License. 2370 */function FM(t,e,n){if(!n)throw new je(xe.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function Uoe(t,e,n,r){if(e===!0&&r===!0)throw new je(xe.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function C7(t){if(!Ge.isDocumentKey(t))throw new je(xe.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function _7(t){if(Ge.isDocumentKey(t))throw new je(xe.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function VM(t){return typeof t=="object"&&t!==null&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null)}function r_(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=(function(r){return r.constructor?r.constructor.name:null})(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":Xe(12329,{type:typeof t})}function Go(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new je(xe.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=r_(t);throw new je(xe.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** 2371 * @license 2372 * Copyright 2025 Google LLC 2373 * 2374 * Licensed under the Apache License, Version 2.0 (the "License");
2375 * you may not use this file except in compliance with the License. 2376 * You may obtain a copy of the License at 2377 * 2378 * http://www.apache.org/licenses/LICENSE-2.0 2379 * 2380 * Unless required by applicable law or agreed to in writing, software 2381 * distributed under the License is distributed on an "AS IS" BASIS, 2382 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2383 * See the License for the specific language governing permissions and 2384 * limitations under the License. 2385 */function Tn(t,e){const n={typeString:t};return e&&(n.value=e),n}function Hy(t,e){if(!VM(t))throw new je(xe.INVALID_ARGUMENT,"JSON must be an object");let n;for(const r in e)if(e[r]){const i=e[r].typeString,s="value"in e[r]?{value:e[r].value}:void 0;if(!(r in t)){n=`JSON missing required field: '${r}'`;break}const a=t[r];if(i&&typeof a!==i){n=`JSON field '${r}' must be a ${i}.`;break}if(s!==void 0&&a!==s.value){n=`Expected '${r}' field to equal '${s.value}'`;break}}if(n)throw new je(xe.INVALID_ARGUMENT,n);return!0}/** 2386 * @license 2387 * Copyright 2017 Google LLC 2388 * 2389 * Licensed under the Apache License, Version 2.0 (the "License"); 2390 * you may not use this file except in compliance with the License. 2391 * You may obtain a copy of the License at 2392 * 2393 * http://www.apache.org/licenses/LICENSE-2.0 2394 * 2395 * Unless required by applicable law or agreed to in writing, software 2396 * distributed under the License is distributed on an "AS IS" BASIS, 2397 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2398 * See the License for the specific language governing permissions and 2399 * limitations under the License. 2400 */const T7=-62135596800,S7=1e6;class Xt{static now(){return Xt.fromMillis(Date.now())}static fromDate(e){return Xt.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor((e-1e3*n)*S7);return new Xt(n,r)}constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new je(xe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new je(xe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<T7)throw new je(xe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new je(xe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/S7}_compareTo(e){return this.seconds===e.seconds?lt(this.nanoseconds,e.nanoseconds):lt(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:Xt._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(Hy(e,Xt._jsonSchema))return new Xt(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-T7;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}Xt._jsonSchemaVersion="firestore/timestamp/1.0",Xt._jsonSchema={type:Tn("string",Xt._jsonSchemaVersion),seconds:Tn("number"),nanoseconds:Tn("number")};/** 2401 * @license 2402 * Copyright 2017 Google LLC 2403 * 2404 * Licensed under the Apache License, Version 2.0 (the "License"); 2405 * you may not use this file except in compliance with the License. 2406 * You may obtain a copy of the License at 2407 * 2408 * http://www.apache.org/licenses/LICENSE-2.0 2409 * 2410 * Unless required by applicable law or agreed to in writing, software 2411 * distributed under the License is distributed on an "AS IS" BASIS, 2412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2413 * See the License for the specific language governing permissions and 2414 * limitations under the License. 2415 */class tt{static fromTimestamp(e){return new tt(e)}static min(){return new tt(new Xt(0,0))}static max(){return new tt(new Xt(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 2416 * @license 2417 * Copyright 2021 Google LLC 2418 * 2419 * Licensed under the Apache License, Version 2.0 (the "License");
2420 * you may not use this file except in compliance with the License. 2421 * You may obtain a copy of the License at 2422 * 2423 * http://www.apache.org/licenses/LICENSE-2.0 2424 * 2425 * Unless required by applicable law or agreed to in writing, software 2426 * distributed under the License is distributed on an "AS IS" BASIS, 2427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2428 * See the License for the specific language governing permissions and 2429 * limitations under the License. 2430 */const Gg=-1;function Foe(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=tt.fromTimestamp(r===1e9?new Xt(n+1,0):new Xt(n,r));return new zl(i,Ge.empty(),e)}function Voe(t){return new zl(t.readTime,t.key,Gg)}class zl{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new zl(tt.min(),Ge.empty(),Gg)}static max(){return new zl(tt.max(),Ge.empty(),Gg)}}function zoe(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=Ge.comparator(t.documentKey,e.documentKey),n!==0?n:lt(t.largestBatchId,e.largestBatchId))}/** 2431 * @license 2432 * Copyright 2020 Google LLC 2433 * 2434 * Licensed under the Apache License, Version 2.0 (the "License"); 2435 * you may not use this file except in compliance with the License. 2436 * You may obtain a copy of the License at 2437 * 2438 * http://www.apache.org/licenses/LICENSE-2.0 2439 * 2440 * Unless required by applicable law or agreed to in writing, software 2441 * distributed under the License is distributed on an "AS IS" BASIS, 2442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2443 * See the License for the specific language governing permissions and 2444 * limitations under the License. 2445 */const Hoe="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class qoe{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}/** 2446 * @license 2447 * Copyright 2017 Google LLC 2448 * 2449 * Licensed under the Apache License, Version 2.0 (the "License"); 2450 * you may not use this file except in compliance with the License. 2451 * You may obtain a copy of the License at 2452 * 2453 * http://www.apache.org/licenses/LICENSE-2.0 2454 * 2455 * Unless required by applicable law or agreed to in writing, software 2456 * distributed under the License is distributed on an "AS IS" BASIS, 2457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2458 * See the License for the specific language governing permissions and 2459 * limitations under the License. 2460 */async function v0(t){if(t.code!==xe.FAILED_PRECONDITION||t.message!==Hoe)throw t;Ne("LocalStore","Unexpectedly lost primary lease")}/** 2461 * @license 2462 * Copyright 2017 Google LLC 2463 * 2464 * Licensed under the Apache License, Version 2.0 (the "License"); 2465 * you may not use this file except in compliance with the License. 2466 * You may obtain a copy of the License at 2467 * 2468 * http://www.apache.org/licenses/LICENSE-2.0 2469 * 2470 * Unless required by applicable law or agreed to in writing, software 2471 * distributed under the License is distributed on an "AS IS" BASIS, 2472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2473 * See the License for the specific language governing permissions and 2474 * limitations under the License. 2475 */class Ae{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)}),(n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)}))}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&Xe(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new Ae(((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}}))}toPromise(){return new Promise(((e,n)=>{this.next(e,n)}))}wrapUserFunction(e){try{const n=e();return n instanceof Ae?n:Ae.resolve(n)}catch(n){return Ae.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction((()=>e(n))):Ae.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction((()=>e(n))):Ae.reject(n)}static resolve(e){return new Ae(((n,r)=>{n(e)}))}static reject(e){return new Ae(((n,r)=>{r(e)}))}static waitFor(e){return new Ae(((n,r)=>{let i=0,s=0,a=!1;e.forEach((l=>{++i,l.next((()=>{++s,a&&s===i&&n()}),(u=>r(u)))})),a=!0,s===i&&n()}))}static or(e){let n=Ae.resolve(!1);for(const r of e)n=n.next((i=>i?Ae.resolve(i):r()));return n}static forEach(e,n){const r=[];return e.forEach(((i,s)=>{r.push(n.call(this,i,s))})),this.waitFor(r)}static mapArray(e,n){return new Ae(((r,i)=>{const s=e.length,a=new Array(s);let l=0;for(let u=0;u<s;u++){const d=u;n(e[d]).next((h=>{a[d]=h,++l,l===s&&r(a)}),(h=>i(h)))}}))}static doWhile(e,n){return new Ae(((r,i)=>{const s=()=>{e()===!0?n().next((()=>{s()}),i):r()};s()}))}}function $oe(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function A0(t){return t.name==="IndexedDbTransactionError"}/** 2476 * @license 2477 * Copyright 2018 Google LLC 2478 * 2479 * Licensed under the Apache License, Version 2.0 (the "License");
2480 * you may not use this file except in compliance with the License. 2481 * You may obtain a copy of the License at 2482 * 2483 * http://www.apache.org/licenses/LICENSE-2.0 2484 * 2485 * Unless required by applicable law or agreed to in writing, software 2486 * distributed under the License is distributed on an "AS IS" BASIS, 2487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2488 * See the License for the specific language governing permissions and 2489 * limitations under the License. 2490 */class r6{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this._e(r),this.ae=r=>n.writeSequenceNumber(r))}_e(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ae&&this.ae(e),e}}r6.ue=-1;/** 2491 * @license 2492 * Copyright 2017 Google LLC 2493 * 2494 * Licensed under the Apache License, Version 2.0 (the "License"); 2495 * you may not use this file except in compliance with the License. 2496 * You may obtain a copy of the License at 2497 * 2498 * http://www.apache.org/licenses/LICENSE-2.0 2499 * 2500 * Unless required by applicable law or agreed to in writing, software 2501 * distributed under the License is distributed on an "AS IS" BASIS, 2502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2503 * See the License for the specific language governing permissions and 2504 * limitations under the License. 2505 */const i_=-1;function i6(t){return t==null}function Vw(t){return t===0&&1/t==-1/0}function Goe(t){return typeof t=="number"&&Number.isInteger(t)&&!Vw(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** 2506 * @license 2507 * Copyright 2017 Google LLC 2508 * 2509 * Licensed under the Apache License, Version 2.0 (the "License"); 2510 * you may not use this file except in compliance with the License. 2511 * You may obtain a copy of the License at 2512 * 2513 * http://www.apache.org/licenses/LICENSE-2.0 2514 * 2515 * Unless required by applicable law or agreed to in writing, software 2516 * distributed under the License is distributed on an "AS IS" BASIS, 2517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2518 * See the License for the specific language governing permissions and 2519 * limitations under the License. 2520 */const zM="�";function Qoe(t){let e="";for(let n=0;n<t.length;n++)e.length>0&&(e=I7(e)),e=Koe(t.get(n),e);return I7(e)}function Koe(t,e){let n=e;const r=t.length;for(let i=0;i<r;i++){const s=t.charAt(i);switch(s){case"\0":n+="��";break;case zM:n+="��";break;default:n+=s}}return n}function I7(t){return t+zM+"�"}/** 2521 * @license 2522 * Copyright 2017 Google LLC 2523 * 2524 * Licensed under the Apache License, Version 2.0 (the "License"); 2525 * you may not use this file except in compliance with the License. 2526 * You may obtain a copy of the License at 2527 * 2528 * http://www.apache.org/licenses/LICENSE-2.0 2529 * 2530 * Unless required by applicable law or agreed to in writing, software 2531 * distributed under the License is distributed on an "AS IS" BASIS, 2532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2533 * See the License for the specific language governing permissions and 2534 * limitations under the License. 2535 */function R7(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Xl(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function HM(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** 2536 * @license 2537 * Copyright 2017 Google LLC 2538 * 2539 * Licensed under the Apache License, Version 2.0 (the "License"); 2540 * you may not use this file except in compliance with the License. 2541 * You may obtain a copy of the License at 2542 * 2543 * http://www.apache.org/licenses/LICENSE-2.0 2544 * 2545 * Unless required by applicable law or agreed to in writing, software 2546 * distributed under the License is distributed on an "AS IS" BASIS, 2547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2548 * See the License for the specific language governing permissions and 2549 * limitations under the License. 2550 */class on{constructor(e,n){this.comparator=e,this.root=n||lr.EMPTY}insert(e,n){return new on(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,lr.BLACK,null,
vendor: 4,548 bytes, line 2550
2550null))}remove(e){return new on(this.comparator,this.root.remove(e,this.comparator).copy(null,null,lr.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((n,r)=>(e(n,r),!1)))}toString(){const e=[];return this.inorderTraversal(((n,r)=>(e.push(`${n}:${r}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Mb(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Mb(this.root,e,this.comparator,!1)}getReverseIterator(){return new Mb(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Mb(this.root,e,this.comparator,!0)}}class Mb{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class lr{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??lr.RED,this.left=i??lr.EMPTY,this.right=s??lr.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new lr(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return lr.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return lr.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,lr.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,lr.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw Xe(43730,{key:this.key,value:this.value});if(this.right.isRed())throw Xe(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw Xe(27949);return e+(this.isRed()?0:1)}}lr.EMPTY=null,lr.RED=!0,lr.BLACK=!1;
vendor: 4,232 bytes, lines 2550-2594
2550lr.EMPTY=new class{constructor(){this.size=0}get key(){throw Xe(57766)}get value(){throw Xe(16141)}get color(){throw Xe(16727)}get left(){throw Xe(29726)}get right(){throw Xe(36894)}copy(e,n,r,i,s){return this}insert(e,n,r){return new lr(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 2551 * @license 2552 * Copyright 2017 Google LLC 2553 * 2554 * Licensed under the Apache License, Version 2.0 (the "License"); 2555 * you may not use this file except in compliance with the License. 2556 * You may obtain a copy of the License at 2557 * 2558 * http://www.apache.org/licenses/LICENSE-2.0 2559 * 2560 * Unless required by applicable law or agreed to in writing, software 2561 * distributed under the License is distributed on an "AS IS" BASIS, 2562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2563 * See the License for the specific language governing permissions and 2564 * limitations under the License. 2565 */class Un{constructor(e){this.comparator=e,this.data=new on(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((n,r)=>(e(n),!1)))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new k7(this.data.getIterator())}getIteratorFrom(e){return new k7(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach((r=>{n=n.add(r)})),n}isEqual(e){if(!(e instanceof Un)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach((n=>{e.push(n)})),e}toString(){const e=[];return this.forEach((n=>e.push(n))),"SortedSet("+e.toString()+")"}copy(e){const n=new Un(this.comparator);return n.data=e,n}}class k7{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 2566 * @license 2567 * Copyright 2020 Google LLC 2568 * 2569 * Licensed under the Apache License, Version 2.0 (the "License"); 2570 * you may not use this file except in compliance with the License. 2571 * You may obtain a copy of the License at 2572 * 2573 * http://www.apache.org/licenses/LICENSE-2.0 2574 * 2575 * Unless required by applicable law or agreed to in writing, software 2576 * distributed under the License is distributed on an "AS IS" BASIS, 2577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2578 * See the License for the specific language governing permissions and 2579 * limitations under the License. 2580 */class Bi{constructor(e){this.fields=e,e.sort(fr.comparator)}static empty(){return new Bi([])}unionWith(e){let n=new Un(fr.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new Bi(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return Wp(this.fields,e.fields,((n,r)=>n.isEqual(r)))}}/** 2581 * @license 2582 * Copyright 2023 Google LLC 2583 * 2584 * Licensed under the Apache License, Version 2.0 (the "License"); 2585 * you may not use this file except in compliance with the License. 2586 * You may obtain a copy of the License at 2587 * 2588 * http://www.apache.org/licenses/LICENSE-2.0 2589 * 2590 * Unless required by applicable law or agreed to in writing, software 2591 * distributed under the License is distributed on an "AS IS" BASIS, 2592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2593 * See the License for the specific language governing permissions and 2594 * limitations under the License.
2595 */class qM extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 2596 * @license 2597 * Copyright 2020 Google LLC 2598 * 2599 * Licensed under the Apache License, Version 2.0 (the "License"); 2600 * you may not use this file except in compliance with the License. 2601 * You may obtain a copy of the License at 2602 * 2603 * http://www.apache.org/licenses/LICENSE-2.0 2604 * 2605 * Unless required by applicable law or agreed to in writing, software 2606 * distributed under the License is distributed on an "AS IS" BASIS, 2607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2608 * See the License for the specific language governing permissions and 2609 * limitations under the License. 2610 */class yr{constructor(e){this.binaryString=e}static fromBase64String(e){const n=(function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new qM("Invalid base64 string: "+s):s}})(e);return new yr(n)}static fromUint8Array(e){const n=(function(i){let s="";for(let a=0;a<i.length;++a)s+=String.fromCharCode(i[a]);return s})(e);return new yr(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return(function(n){return btoa(n)})(this.binaryString)}toUint8Array(){return(function(n){const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r})(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return lt(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}yr.EMPTY_BYTE_STRING=new yr("");const Woe=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Hl(t){if(Lt(!!t,39018),typeof t=="string"){let e=0;const n=Woe.exec(t);if(Lt(!!n,46558,{timestamp:t}),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:gn(t.seconds),nanos:gn(t.nanos)}}function gn(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function ql(t){return typeof t=="string"?yr.fromBase64String(t):yr.fromUint8Array(t)}/** 2611 * @license 2612 * Copyright 2020 Google LLC 2613 * 2614 * Licensed under the Apache License, Version 2.0 (the "License"); 2615 * you may not use this file except in compliance with the License. 2616 * You may obtain a copy of the License at 2617 * 2618 * http://www.apache.org/licenses/LICENSE-2.0 2619 * 2620 * Unless required by applicable law or agreed to in writing, software 2621 * distributed under the License is distributed on an "AS IS" BASIS, 2622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2623 * See the License for the specific language governing permissions and 2624 * limitations under the License. 2625 */const $M="server_timestamp",GM="__type__",QM="__previous_value__",KM="__local_write_time__";function s_(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{})[GM])===null||n===void 0?void 0:n.stringValue)===$M}function s6(t){const e=t.mapValue.fields[QM];return s_(e)?s6(e):e}function Qg(t){const e=Hl(t.mapValue.fields[KM].timestampValue);return new Xt(e.seconds,e.nanos)}/** 2626 * @license 2627 * Copyright 2017 Google LLC 2628 * 2629 * Licensed under the Apache License, Version 2.0 (the "License"); 2630 * you may not use this file except in compliance with the License. 2631 * You may obtain a copy of the License at 2632 * 2633 * http://www.apache.org/licenses/LICENSE-2.0 2634 * 2635 * Unless required by applicable law or agreed to in writing, software 2636 * distributed under the License is distributed on an "AS IS" BASIS, 2637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2638 * See the License for the specific language governing permissions and 2639 * limitations under the License. 2640 */class Yoe{constructor(e,n,r,i,s,a,l,u,d,h){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=a,this.autoDetectLongPolling=l,this.longPollingOptions=u,this.useFetchStreams=d,this.isUsingEmulator=h}}const zw="(default)";class Kg{constructor(e,n){this.projectId=e,this.database=n||zw}
vendor: 7,267 bytes, lines 2640-2659
2640static empty(){return new Kg("","")}get isDefaultDatabase(){return this.database===zw}isEqual(e){return e instanceof Kg&&e.projectId===this.projectId&&e.database===this.database}}/** 2641 * @license 2642 * Copyright 2020 Google LLC 2643 * 2644 * Licensed under the Apache License, Version 2.0 (the "License"); 2645 * you may not use this file except in compliance with the License. 2646 * You may obtain a copy of the License at 2647 * 2648 * http://www.apache.org/licenses/LICENSE-2.0 2649 * 2650 * Unless required by applicable law or agreed to in writing, software 2651 * distributed under the License is distributed on an "AS IS" BASIS, 2652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2653 * See the License for the specific language governing permissions and 2654 * limitations under the License. 2655 */const WM="__type__",Joe="__max__",jb={mapValue:{}},YM="__vector__",Hw="value";function $l(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?s_(t)?4:Zoe(t)?9007199254740991:Xoe(t)?10:11:Xe(28295,{value:t})}function Qo(t,e){if(t===e)return!0;const n=$l(t);if(n!==$l(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Qg(t).isEqual(Qg(e));case 3:return(function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const a=Hl(i.timestampValue),l=Hl(s.timestampValue);return a.seconds===l.seconds&&a.nanos===l.nanos})(t,e);case 5:return t.stringValue===e.stringValue;case 6:return(function(i,s){return ql(i.bytesValue).isEqual(ql(s.bytesValue))})(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return(function(i,s){return gn(i.geoPointValue.latitude)===gn(s.geoPointValue.latitude)&&gn(i.geoPointValue.longitude)===gn(s.geoPointValue.longitude)})(t,e);case 2:return(function(i,s){if("integerValue"in i&&"integerValue"in s)return gn(i.integerValue)===gn(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const a=gn(i.doubleValue),l=gn(s.doubleValue);return a===l?Vw(a)===Vw(l):isNaN(a)&&isNaN(l)}return!1})(t,e);case 9:return Wp(t.arrayValue.values||[],e.arrayValue.values||[],Qo);case 10:case 11:return(function(i,s){const a=i.mapValue.fields||{},l=s.mapValue.fields||{};if(R7(a)!==R7(l))return!1;for(const u in a)if(a.hasOwnProperty(u)&&(l[u]===void 0||!Qo(a[u],l[u])))return!1;return!0})(t,e);default:return Xe(52216,{left:t})}}function Wg(t,e){return(t.values||[]).find((n=>Qo(n,e)))!==void 0}function Yp(t,e){if(t===e)return 0;const n=$l(t),r=$l(e);if(n!==r)return lt(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return lt(t.booleanValue,e.booleanValue);case 2:return(function(s,a){const l=gn(s.integerValue||s.doubleValue),u=gn(a.integerValue||a.doubleValue);return l<u?-1:l>u?1:l===u?0:isNaN(l)?isNaN(u)?0:-1:1})(t,e);case 3:return N7(t.timestampValue,e.timestampValue);case 4:return N7(Qg(t),Qg(e));case 5:return Dx(t.stringValue,e.stringValue);case 6:return(function(s,a){const l=ql(s),u=ql(a);return l.compareTo(u)})(t.bytesValue,e.bytesValue);case 7:return(function(s,a){const l=s.split("/"),u=a.split("/");for(let d=0;d<l.length&&d<u.length;d++){const h=lt(l[d],u[d]);if(h!==0)return h}return lt(l.length,u.length)})(t.referenceValue,e.referenceValue);case 8:return(function(s,a){const l=lt(gn(s.latitude),gn(a.latitude));return l!==0?l:lt(gn(s.longitude),gn(a.longitude))})(t.geoPointValue,e.geoPointValue);case 9:return O7(t.arrayValue,e.arrayValue);case 10:return(function(s,a){var l,u,d,h;const m=s.fields||{},g=a.fields||{},w=(l=m[Hw])===null||l===void 0?void 0:l.arrayValue,A=(u=g[Hw])===null||u===void 0?void 0:u.arrayValue,v=lt(((d=w==null?void 0:w.values)===null||d===void 0?void 0:d.length)||0,((h=A==null?void 0:A.values)===null||h===void 0?void 0:h.length)||0);return v!==0?v:O7(w,A)})(t.mapValue,e.mapValue);case 11:return(function(s,a){if(s===jb.mapValue&&a===jb.mapValue)return 0;if(s===jb.mapValue)return 1;if(a===jb.mapValue)return-1;const l=s.fields||{},u=Object.keys(l),d=a.fields||{},h=Object.keys(d);u.sort(),h.sort();for(let m=0;m<u.length&&m<h.length;++m){const g=Dx(u[m],h[m]);if(g!==0)return g;const w=Yp(l[u[m]],d[h[m]]);if(w!==0)return w}return lt(u.length,h.length)})(t.mapValue,e.mapValue);default:throw Xe(23264,{le:n})}}function N7(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return lt(t,e);const n=Hl(t),r=Hl(e),i=lt(n.seconds,r.seconds);return i!==0?i:lt(n.nanos,r.nanos)}function O7(t,e){const n=t.values||[],r=e.values||[];for(let i=0;i<n.length&&i<r.length;++i){const s=Yp(n[i],r[i]);if(s)return s}return lt(n.length,r.length)}function Jp(t){return Mx(t)}function Mx(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?(function(n){const r=Hl(n);return`time(${r.seconds},${r.nanos})`})(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?(function(n){return ql(n).toBase64()})(t.bytesValue):"referenceValue"in t?(function(n){return Ge.fromName(n).toString()})(t.referenceValue):"geoPointValue"in t?(function(n){return`geo(${n.latitude},${n.longitude})`})(t.geoPointValue):"arrayValue"in t?(function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=Mx(s);return r+"]"})(t.arrayValue):"mapValue"in t?(function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const a of r)s?s=!1:i+=",",i+=`${a}:${Mx(n.fields[a])}`;return i+"}"})(t.mapValue):Xe(61005,{value:t})}function iw(t){switch($l(t)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=s6(t);return e?16+iw(e):16;case 5:return 2*t.stringValue.length;case 6:return ql(t.bytesValue).approximateByteSize();case 7:return t.referenceValue.length;case 9:return(function(r){return(r.values||[]).reduce(((i,s)=>i+iw(s)),0)})(t.arrayValue);case 10:case 11:return(function(r){let i=0;return Xl(r.fields,((s,a)=>{i+=s.length+iw(a)})),i})(t.mapValue);default:throw Xe(13486,{value:t})}}function jx(t){return!!t&&"integerValue"in t}function o_(t){return!!t&&"arrayValue"in t}function B7(t){return!!t&&"nullValue"in t}function P7(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function sw(t){return!!t&&"mapValue"in t}function Xoe(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{})[WM])===null||n===void 0?void 0:n.stringValue)===YM}function og(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return Xl(t.mapValue.fields,((n,r)=>e.mapValue.fields[n]=og(r))),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=og(t.arrayValue.values[n]);return e}return Object.assign({},t)}function Zoe(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue===Joe}/** 2656 * @license 2657 * Copyright 2017 Google LLC 2658 * 2659 * Licensed under the Apache License, Version 2.0 (the "License");
2660 * you may not use this file except in compliance with the License. 2661 * You may obtain a copy of the License at 2662 * 2663 * http://www.apache.org/licenses/LICENSE-2.0 2664 * 2665 * Unless required by applicable law or agreed to in writing, software 2666 * distributed under the License is distributed on an "AS IS" BASIS, 2667 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2668 * See the License for the specific language governing permissions and 2669 * limitations under the License. 2670 */class ai{constructor(e){this.value=e}static empty(){return new ai({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r<e.length-1;++r)if(n=(n.mapValue.fields||{})[e.get(r)],!sw(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=og(n)}setAll(e){let n=fr.emptyPath(),r={},i=[];e.forEach(((a,l)=>{if(!n.isImmediateParentOf(l)){const u=this.getFieldsMap(n);this.applyChanges(u,r,i),r={},i=[],n=l.popLast()}a?r[l.lastSegment()]=og(a):i.push(l.lastSegment())}));const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());sw(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Qo(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=n.mapValue.fields[e.get(r)];sw(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){Xl(n,((i,s)=>e[i]=s));for(const i of r)delete e[i]}clone(){return new ai(og(this.value))}}function JM(t){const e=[];return Xl(t.fields,((n,r)=>{const i=new fr([n]);if(sw(r)){const s=JM(r.mapValue).fields;
vendor: 4,181 bytes, lines 2670-2710
2670if(s.length===0)e.push(i);else for(const a of s)e.push(i.child(a))}else e.push(i)})),new Bi(e)}/** 2671 * @license 2672 * Copyright 2017 Google LLC 2673 * 2674 * Licensed under the Apache License, Version 2.0 (the "License"); 2675 * you may not use this file except in compliance with the License. 2676 * You may obtain a copy of the License at 2677 * 2678 * http://www.apache.org/licenses/LICENSE-2.0 2679 * 2680 * Unless required by applicable law or agreed to in writing, software 2681 * distributed under the License is distributed on an "AS IS" BASIS, 2682 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2683 * See the License for the specific language governing permissions and 2684 * limitations under the License. 2685 */class _r{constructor(e,n,r,i,s,a,l){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=a,this.documentState=l}static newInvalidDocument(e){return new _r(e,0,tt.min(),tt.min(),tt.min(),ai.empty(),0)}static newFoundDocument(e,n,r,i){return new _r(e,1,n,tt.min(),r,i,0)}static newNoDocument(e,n){return new _r(e,2,n,tt.min(),tt.min(),ai.empty(),0)}static newUnknownDocument(e,n){return new _r(e,3,n,tt.min(),tt.min(),ai.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(tt.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=ai.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=ai.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=tt.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof _r&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new _r(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** 2686 * @license 2687 * Copyright 2022 Google LLC 2688 * 2689 * Licensed under the Apache License, Version 2.0 (the "License"); 2690 * you may not use this file except in compliance with the License. 2691 * You may obtain a copy of the License at 2692 * 2693 * http://www.apache.org/licenses/LICENSE-2.0 2694 * 2695 * Unless required by applicable law or agreed to in writing, software 2696 * distributed under the License is distributed on an "AS IS" BASIS, 2697 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2698 * See the License for the specific language governing permissions and 2699 * limitations under the License. 2700 */class qw{constructor(e,n){this.position=e,this.inclusive=n}}function D7(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const s=e[i],a=t.position[i];if(s.field.isKeyField()?r=Ge.comparator(Ge.fromName(a.referenceValue),n.key):r=Yp(a,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function M7(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!Qo(t.position[n],e.position[n]))return!1;return!0}/** 2701 * @license 2702 * Copyright 2022 Google LLC 2703 * 2704 * Licensed under the Apache License, Version 2.0 (the "License"); 2705 * you may not use this file except in compliance with the License. 2706 * You may obtain a copy of the License at 2707 * 2708 * http://www.apache.org/licenses/LICENSE-2.0 2709 * 2710 * Unless required by applicable law or agreed to in writing, softw
2710are 2711 * distributed under the License is distributed on an "AS IS" BASIS, 2712 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2713 * See the License for the specific language governing permissions and 2714 * limitations under the License. 2715 */class $w{constructor(e,n="asc"){this.field=e,this.dir=n}}function eae(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/** 2716 * @license 2717 * Copyright 2022 Google LLC 2718 * 2719 * Licensed under the Apache License, Version 2.0 (the "License"); 2720 * you may not use this file except in compliance with the License. 2721 * You may obtain a copy of the License at 2722 * 2723 * http://www.apache.org/licenses/LICENSE-2.0 2724 * 2725 * Unless required by applicable law or agreed to in writing, software 2726 * distributed under the License is distributed on an "AS IS" BASIS, 2727 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2728 * See the License for the specific language governing permissions and 2729 * limitations under the License. 2730 */class XM{}class jn extends XM{constructor(e,n,r){super(),this.field=e,this.op=n,this.value=r}static create(e,n,r){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,r):new nae(e,n,r):n==="array-contains"?new sae(e,r):n==="in"?new oae(e,r):n==="not-in"?new aae(e,r):n==="array-contains-any"?new cae(e,r):new jn(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new rae(e,r):new iae(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&n.nullValue===void 0&&this.matchesComparison(Yp(n,this.value)):n!==null&&$l(this.value)===$l(n)&&this.matchesComparison(Yp(n,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return Xe(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Ko extends XM{constructor(e,n){super(),this.filters=e,this.op=n,this.he=null}static create(e,n){return new Ko(e,n)}matches(e){return ZM(this)?this.filters.find((n=>!n.matches(e)))===void 0:this.filters.find((n=>n.matches(e)))!==void 0}getFlattenedFilters(){return this.he!==null||(this.he=this.filters.reduce(((e,n)=>e.concat(n.getFlattenedFilters())),[])),this.he}getFilters(){return Object.assign([],this.filters)}}function ZM(t){return t.op==="and"}function ej(t){return tae(t)&&ZM(t)}function tae(t){for(const e of t.filters)if(e instanceof Ko)return!1;return!0}function Lx(t){if(t instanceof jn)return t.field.canonicalString()+t.op.toString()+Jp(t.value);if(ej(t))return t.filters.map((e=>Lx(e))).join(",");{const e=t.filters.map((n=>Lx(n))).join(",");return`${t.op}(${e})`}}function tj(t,e){return t instanceof jn?(function(r,i){return i instanceof jn&&r.op===i.op&&r.field.isEqual(i.field)&&Qo(r.value,i.value)})(t,e):t instanceof Ko?(function(r,i){return i instanceof Ko&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce(((s,a,l)=>s&&tj(a,i.filters[l])),!0):!1})(t,e):void Xe(19439)}function nj(t){return t instanceof jn?(function(n){return`${n.field.canonicalString()} ${n.op} ${Jp(n.value)}`})(t):t instanceof Ko?(function(n){return n.op.toString()+" {"+n.getFilters().map(nj).join(" ,")+"}"})(t):"Filter"}class nae extends jn{constructor(e,n,r){super(e,n,r),this.key=Ge.fromName(r.referenceValue)}matches(e){const n=Ge.comparator(e.key,this.key);return this.matchesComparison(n)}}class rae extends jn{constructor(e,n){super(e,"in",n),this.keys=rj("in",n)}matches(e){return this.keys.some((n=>n.isEqual(e.key)))}}class iae extends jn{constructor(e,n){super(e,"not-in",n),this.keys=rj("not-in",n)}matches(e){return!this.keys.some((n=>n.isEqual(e.key)))}}function rj(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map((r=>Ge.fromName(r.referenceValue)))}class sae extends jn{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return o_(n)&&Wg(n.arrayValue,this.value)}}class oae extends jn{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Wg(this.value.arrayValue,n)}}class aae extends jn{constructor(e,n){super(e,"not-in",n)}matches(e){if(Wg(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&n.nullValue===void 0&&!Wg(this.value.arrayValue,n)}}class cae extends jn{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!o_(n)||!n.arrayValue.values)&&n.arrayValue.values.some((r=>Wg(this.value.arrayValue,r)))}}/** 2731 * @license 2732 * Copyright 2019 Google LLC 2733 * 2734 * Licensed under the Apache License, Version 2.0 (the "License");
2735 * you may not use this file except in compliance with the License. 2736 * You may obtain a copy of the License at 2737 * 2738 * http://www.apache.org/licenses/LICENSE-2.0 2739 * 2740 * Unless required by applicable law or agreed to in writing, software 2741 * distributed under the License is distributed on an "AS IS" BASIS, 2742 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2743 * See the License for the specific language governing permissions and 2744 * limitations under the License. 2745 */class lae{constructor(e,n=null,r=[],i=[],s=null,a=null,l=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=a,this.endAt=l,this.Pe=null}}function j7(t,e=null,n=[],r=[],i=null,s=null,a=null){return new lae(t,e,n,r,i,s,a)}function a_(t){const e=nt(t);if(e.Pe===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((r=>Lx(r))).join(","),n+="|ob:",n+=e.orderBy.map((r=>(function(s){return s.field.canonicalString()+s.dir})(r))).join(","),i6(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map((r=>Jp(r))).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map((r=>Jp(r))).join(",")),e.Pe=n}return e.Pe}function c_(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!eae(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!tj(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!M7(t.startAt,e.startAt)&&M7(t.endAt,e.endAt)}function Ux(t){return Ge.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/** 2746 * @license 2747 * Copyright 2017 Google LLC 2748 * 2749 * Licensed under the Apache License, Version 2.0 (the "License"); 2750 * you may not use this file except in compliance with the License. 2751 * You may obtain a copy of the License at 2752 * 2753 * http://www.apache.org/licenses/LICENSE-2.0 2754 * 2755 * Unless required by applicable law or agreed to in writing, software 2756 * distributed under the License is distributed on an "AS IS" BASIS, 2757 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2758 * See the License for the specific language governing permissions and 2759 * limitations under the License. 2760 */class o6{constructor(e,n=null,r=[],i=[],s=null,a="F",l=null,u=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=a,this.startAt=l,this.endAt=u,this.Te=null,this.Ie=null,this.de=null,this.startAt,this.endAt}}function uae(t,e,n,r,i,s,a,l){return new o6(t,e,n,r,i,s,a,l)}function l_(t){return new o6(t)}function L7(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function fae(t){return t.collectionGroup!==null}function ag(t){const e=nt(t);if(e.Te===null){e.Te=[];const n=new Set;for(const s of e.explicitOrderBy)e.Te.push(s),n.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(a){let l=new Un(fr.comparator);return a.filters.forEach((u=>{u.getFlattenedFilters().forEach((d=>{d.isInequality()&&(l=l.add(d.field))}))})),l})(e).forEach((s=>{n.has(s.canonicalString())||s.isKeyField()||e.Te.push(new $w(s,r))}
2760)),n.has(fr.keyField().canonicalString())||e.Te.push(new $w(fr.keyField(),r))}return e.Te}function Do(t){const e=nt(t);return e.Ie||(e.Ie=dae(e,ag(t))),e.Ie}function dae(t,e){if(t.limitType==="F")return j7(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map((i=>{const s=i.dir==="desc"?"asc":"desc";return new $w(i.field,s)}));const n=t.endAt?new qw(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new qw(t.startAt.position,t.startAt.inclusive):null;return j7(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function Fx(t,e,n){return new o6(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function a6(t,e){return c_(Do(t),Do(e))&&t.limitType===e.limitType}function ij(t){return`${a_(Do(t))}|lt:${t.limitType}`}function fh(t){return`Query(target=${(function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map((i=>nj(i))).join(", ")}]`),i6(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map((i=>(function(a){return`${a.field.canonicalString()} (${a.dir})`})(i))).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map((i=>Jp(i))).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map((i=>Jp(i))).join(",")),`Target(${r})`})(Do(t))}; limitType=${t.limitType})`}function c6(t,e){return e.isFoundDocument()&&(function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):Ge.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)})(t,e)&&(function(r,i){for(const s of ag(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0})(t,e)&&(function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0})(t,e)&&(function(r,i){return!(r.startAt&&!(function(a,l,u){const d=D7(a,l,u);return a.inclusive?d<=0:d<0})(r.startAt,ag(r),i)||r.endAt&&!(function(a,l,u){const d=D7(a,l,u);return a.inclusive?d>=0:d>0})(r.endAt,ag(r),i))})(t,e)}function hae(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function sj(t){return(e,n)=>{let r=!1;for(const i of ag(t)){const s=pae(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function pae(t,e,n){const r=t.field.isKeyField()?Ge.comparator(e.key,n.key):(function(s,a,l){const u=a.data.field(s),d=l.data.field(s);return u!==null&&d!==null?Yp(u,d):Xe(42886)})(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return Xe(19790,{direction:t.dir})}}/** 2761 * @license 2762 * Copyright 2017 Google LLC 2763 * 2764 * Licensed under the Apache License, Version 2.0 (the "License"); 2765 * you may not use this file except in compliance with the License. 2766 * You may obtain a copy of the License at 2767 * 2768 * http://www.apache.org/licenses/LICENSE-2.0 2769 * 2770 * Unless required by applicable law or agreed to in writing, software 2771 * distributed under the License is distributed on an "AS IS" BASIS, 2772 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2773 * See the License for the specific language governing permissions and 2774 * limitations under the License. 2775 */class od{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,n]);i.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){Xl(this.inner,((n,r)=>{for(const[i,s]of r)e(i,s)}))}isEmpty(){return HM(this.inner)}size(){return this.innerSize}}/** 2776 * @license 2777 * Copyright 2017 Google LLC 2778 * 2779 * Licensed under the Apache License, Version 2.0 (the "License");
2780 * you may not use this file except in compliance with the License. 2781 * You may obtain a copy of the License at 2782 * 2783 * http://www.apache.org/licenses/LICENSE-2.0 2784 * 2785 * Unless required by applicable law or agreed to in writing, software 2786 * distributed under the License is distributed on an "AS IS" BASIS, 2787 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2788 * See the License for the specific language governing permissions and 2789 * limitations under the License. 2790 */const mae=new on(Ge.comparator);function lc(){return mae}const oj=new on(Ge.comparator);function Km(...t){let e=oj;for(const n of t)e=e.insert(n.key,n);return e}function aj(t){let e=oj;return t.forEach(((n,r)=>e=e.insert(n,r.overlayedDocument))),e}function Yu(){return cg()}function cj(){return cg()}function cg(){return new od((t=>t.toString()),((t,e)=>t.isEqual(e)))}const gae=new on(Ge.comparator),yae=new Un(Ge.comparator);function gt(...t){let e=yae;for(const n of t)e=e.add(n);return e}const bae=new Un(lt);function wae(){return bae}/** 2791 * @license 2792 * Copyright 2020 Google LLC 2793 * 2794 * Licensed under the Apache License, Version 2.0 (the "License"); 2795 * you may not use this file except in compliance with the License. 2796 * You may obtain a copy of the License at 2797 * 2798 * http://www.apache.org/licenses/LICENSE-2.0 2799 * 2800 * Unless required by applicable law or agreed to in writing, software 2801 * distributed under the License is distributed on an "AS IS" BASIS, 2802 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2803 * See the License for the specific language governing permissions and 2804 * limitations under the License. 2805 */function u_(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Vw(e)?"-0":e}}function lj(t){return{integerValue:""+t}}function uj(t,e){return Goe(e)?lj(e):u_(t,e)}/** 2806 * @license 2807 * Copyright 2018 Google LLC 2808 * 2809 * Licensed under the Apache License, Version 2.0 (the "License"); 2810 * you may not use this file except in compliance with the License. 2811 * You may obtain a copy of the License at 2812 * 2813 * http://www.apache.org/licenses/LICENSE-2.0 2814 * 2815 * Unless required by applicable law or agreed to in writing, software 2816 * distributed under the License is distributed on an "AS IS" BASIS, 2817 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2818 * See the License for the specific language governing permissions and 2819 * limitations under the License. 2820 */class l6{constructor(){this._=void 0}}function vae(t,e,n){return t instanceof Gw?(function(i,s){const a={fields:{[GM]:{stringValue:$M},[KM]:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&s_(s)&&(s=s6(s)),s&&(a.fields[QM]=s),{mapValue:a}})(n,e):t instanceof Yg?dj(t,e):t instanceof Jg?hj(t,e):(function(i,s){const a=fj(i,s),l=U7(a)+U7(i.Ee);return jx(a)&&jx(i.Ee)?lj(l):u_(i.serializer,l)})(t,e)}function Aae(t,e,n){return t instanceof Yg?dj(t,e):t instanceof Jg?hj(t,e):n}function fj(t,e){return t instanceof Xg?(function(r){return jx(r)||(function(s){return!!s&&"doubleValue"in s})(r)})(e)?e:{integerValue:0}:null}class Gw extends l6{}class Yg extends l6{constructor(e){super(),this.elements=e}}function dj(t,e){const n=pj(e);for(const r of t.elements)n.some((i=>Qo(i,r)))||n.push(r);return{arrayValue:{values:n}}}class Jg extends l6{constructor(e){super(),this.elements=e}}function hj(t,e){let n=pj(e);for(const r of t.elements)n=n.filter((i=>!Qo(i,r)));return{arrayValue:{values:n}}}class Xg extends l6{constructor(e,n){super(),this.serializer=e,this.Ee=n}}function U7(t){return gn(t.integerValue||t.doubleValue)}function pj(t){return o_(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/** 2821 * @license 2822 * Copyright 2017 Google LLC 2823 * 2824 * Licensed under the Apache License, Version 2.0 (the "License"); 2825 * you may not use this file except in compliance with the License. 2826 * You may obtain a copy of the License at 2827 * 2828 * http://www.apache.org/licenses/LICENSE-2.0 2829 * 2830 * Unless required by applicable law or agreed to in writing, software 2831 * distributed under the License is distributed on an "AS IS" BASIS, 2832 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2833 * See the License for the specific language governing permissions and 2834 * limitations under the License. 2835 */class Eae{constructor(e,n){this.field=e,this.transform=n}}function xae(t,e){return t.field.isEqual(e.field)&&(function(r,i){return r instanceof Yg&&i instanceof Yg||r instanceof Jg&&i instanceof Jg?Wp(r.elements,i.elements,Qo):r instanceof Xg&&i instanceof Xg?Qo(r.Ee,i.Ee):r instanceof Gw&&i instanceof Gw})(t.transform,e.transform)}class Cae{constructor(e,n){this.version=e,this.transformResults=n}}class Us{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new Us}static exists(e){return new Us(void 0,e)}static updateTime(e){return new Us(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function ow(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class u6{}function mj(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new yj(t.key,Us.none()):new qy(t.key,t.data,Us.none());{const n=t.data,r=ai.empty();let i=new Un(fr.comparator);for(let s of e.fields)if(!i.has(s)){let a=n.field(s);a===null&&s.length>1&&(s=s.popLast(),a=n.field(s)),a===null?r.delete(s):r.set(s,a),i=i.add(s)}return new Zl(t.key,r,new Bi(i.toArray()),Us.none())}}function _ae(t,e,n){t instanceof qy?(function(i,s,a){const l=i.value.clone(),u=V7(i.fieldTransforms,s,a.transformResults);l.setAll(u),s.convertToFoundDocument(a.version,l).setHasCommittedMutations()})(t,e,n):t instanceof Zl?(function(i,s,a){if(!ow(i.precondition,s))return void s.convertToUnknownDocument(a.version);const l=V7(i.fieldTransforms,s,a.transformResults),u=s.data;u.setAll(gj(i)),u.setAll(l),s.convertToFoundDocument(a.version,u).setHasCommittedMutations()})(t,e,n):(function(i,s,a){s.convertToNoDocument(a.version).setHasCommittedMutations()})(0,e,n)}function lg(t,e,n,r){return t instanceof qy?(function(s,a,l,u){if(!ow(s.precondition,a))return l;const d=s.value.clone(),h=z7(s.fieldTransforms,u,a);return d.setAll(h),a.convertToFoundDocument(a.version,d).setHasLocalMutations(),null})(t,e,n,r):t instanceof Zl?(function(s,a,l,u){if(!ow(s.precondition,a))return l;const d=z7(s.fieldTransforms,u,a),h=a.data;return h.setAll(gj(s)),h.setAll(d),a.convertToFoundDocument(a.version,h).setHasLocalMutations(),l===null?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map((m=>m.field)))})(t,e,n,r):(function(s,a,l){return ow(s.precondition,a)?(a.convertToNoDocument(a.version).setHasLocalMutations(),null):l})(t,e,n)}function Tae(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=fj(r.transform,i||null);s!=null&&(n===null&&(n=ai.empty()),n.set(r.field,s))}return n||null}function F7(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!(function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&Wp(r,i,((s,a)=>xae(s,a)))})(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class qy extends u6{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.prec
vendor: 4,155 bytes, lines 2835-2878
2835ondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class Zl extends u6{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function gj(t){const e=new Map;return t.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}})),e}function V7(t,e,n){const r=new Map;Lt(t.length===n.length,32656,{Ae:n.length,Re:t.length});for(let i=0;i<n.length;i++){const s=t[i],a=s.transform,l=e.data.field(s.field);r.set(s.field,Aae(a,l,n[i]))}return r}function z7(t,e,n){const r=new Map;for(const i of t){const s=i.transform,a=n.data.field(i.field);r.set(i.field,vae(s,a,e))}return r}class yj extends u6{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class Sae extends u6{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/** 2836 * @license 2837 * Copyright 2017 Google LLC 2838 * 2839 * Licensed under the Apache License, Version 2.0 (the "License"); 2840 * you may not use this file except in compliance with the License. 2841 * You may obtain a copy of the License at 2842 * 2843 * http://www.apache.org/licenses/LICENSE-2.0 2844 * 2845 * Unless required by applicable law or agreed to in writing, software 2846 * distributed under the License is distributed on an "AS IS" BASIS, 2847 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2848 * See the License for the specific language governing permissions and 2849 * limitations under the License. 2850 */class Iae{constructor(e,n,r,i){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&_ae(s,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=lg(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=lg(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=cj();return this.mutations.forEach((i=>{const s=e.get(i.key),a=s.overlayedDocument;let l=this.applyToLocalView(a,s.mutatedFields);l=n.has(i.key)?null:l;const u=mj(a,l);u!==null&&r.set(i.key,u),a.isValidDocument()||a.convertToNoDocument(tt.min())})),r}keys(){return this.mutations.reduce(((e,n)=>e.add(n.key)),gt())}isEqual(e){return this.batchId===e.batchId&&Wp(this.mutations,e.mutations,((n,r)=>F7(n,r)))&&Wp(this.baseMutations,e.baseMutations,((n,r)=>F7(n,r)))}}class f_{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){Lt(e.mutations.length===r.length,58842,{Ve:e.mutations.length,me:r.length});let i=(function(){return gae})();const s=e.mutations;for(let a=0;a<s.length;a++)i=i.insert(s[a].key,r[a].version);return new f_(e,n,r,i)}}/** 2851 * @license 2852 * Copyright 2022 Google LLC 2853 * 2854 * Licensed under the Apache License, Version 2.0 (the "License"); 2855 * you may not use this file except in compliance with the License. 2856 * You may obtain a copy of the License at 2857 * 2858 * http://www.apache.org/licenses/LICENSE-2.0 2859 * 2860 * Unless required by applicable law or agreed to in writing, software 2861 * distributed under the License is distributed on an "AS IS" BASIS, 2862 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2863 * See the License for the specific language governing permissions and 2864 * limitations under the License. 2865 */class Rae{constructor(e,n){this.largestBatchId=e,this.mutation=n}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ 2866 largestBatchId: ${this.largestBatchId}, 2867 mutation: ${this.mutation.toString()} 2868 }`}}/** 2869 * @license 2870 * Copyright 2017 Google LLC 2871 * 2872 * Licensed under the Apache License, Version 2.0 (the "License"); 2873 * you may not use this file except in compliance with the License. 2874 * You may obtain a copy of the License at 2875 * 2876 * http://www.apache.org/licenses/LICENSE-2.0 2877 * 2878 * Unless required by applicable law or agreed to in writing, softw
2878are 2879 * distributed under the License is distributed on an "AS IS" BASIS, 2880 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2881 * See the License for the specific language governing permissions and 2882 * limitations under the License. 2883 */class kae{constructor(e,n){this.count=e,this.unchangedNames=n}}/** 2884 * @license 2885 * Copyright 2017 Google LLC 2886 * 2887 * Licensed under the Apache License, Version 2.0 (the "License"); 2888 * you may not use this file except in compliance with the License. 2889 * You may obtain a copy of the License at 2890 * 2891 * http://www.apache.org/licenses/LICENSE-2.0 2892 * 2893 * Unless required by applicable law or agreed to in writing, software 2894 * distributed under the License is distributed on an "AS IS" BASIS, 2895 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2896 * See the License for the specific language governing permissions and 2897 * limitations under the License. 2898 */var xn,_t;function Nae(t){switch(t){case xe.OK:return Xe(64938);case xe.CANCELLED:case xe.UNKNOWN:case xe.DEADLINE_EXCEEDED:case xe.RESOURCE_EXHAUSTED:case xe.INTERNAL:case xe.UNAVAILABLE:case xe.UNAUTHENTICATED:return!1;case xe.INVALID_ARGUMENT:case xe.NOT_FOUND:case xe.ALREADY_EXISTS:case xe.PERMISSION_DENIED:case xe.FAILED_PRECONDITION:case xe.ABORTED:case xe.OUT_OF_RANGE:case xe.UNIMPLEMENTED:case xe.DATA_LOSS:return!0;default:return Xe(15467,{code:t})}}function bj(t){if(t===void 0)return cc("GRPC error has no .code"),xe.UNKNOWN;switch(t){case xn.OK:return xe.OK;case xn.CANCELLED:return xe.CANCELLED;case xn.UNKNOWN:return xe.UNKNOWN;case xn.DEADLINE_EXCEEDED:return xe.DEADLINE_EXCEEDED;case xn.RESOURCE_EXHAUSTED:return xe.RESOURCE_EXHAUSTED;case xn.INTERNAL:return xe.INTERNAL;case xn.UNAVAILABLE:return xe.UNAVAILABLE;case xn.UNAUTHENTICATED:return xe.UNAUTHENTICATED;case xn.INVALID_ARGUMENT:return xe.INVALID_ARGUMENT;case xn.NOT_FOUND:return xe.NOT_FOUND;case xn.ALREADY_EXISTS:return xe.ALREADY_EXISTS;case xn.PERMISSION_DENIED:return xe.PERMISSION_DENIED;case xn.FAILED_PRECONDITION:return xe.FAILED_PRECONDITION;case xn.ABORTED:return xe.ABORTED;case xn.OUT_OF_RANGE:return xe.OUT_OF_RANGE;case xn.UNIMPLEMENTED:return xe.UNIMPLEMENTED;case xn.DATA_LOSS:return xe.DATA_LOSS;default:return Xe(39323,{code:t})}}(_t=xn||(xn={}))[_t.OK=0]="OK",_t[_t.CANCELLED=1]="CANCELLED",_t[_t.UNKNOWN=2]="UNKNOWN",_t[_t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_t[_t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_t[_t.NOT_FOUND=5]="NOT_FOUND",_t[_t.ALREADY_EXISTS=6]="ALREADY_EXISTS",_t[_t.PERMISSION_DENIED=7]="PERMISSION_DENIED",_t[_t.UNAUTHENTICATED=16]="UNAUTHENTICATED",_t[_t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_t[_t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_t[_t.ABORTED=10]="ABORTED",_t[_t.OUT_OF_RANGE=11]="OUT_OF_RANGE",_t[_t.UNIMPLEMENTED=12]="UNIMPLEMENTED",_t[_t.INTERNAL=13]="INTERNAL",_t[_t.UNAVAILABLE=14]="UNAVAILABLE",_t[_t.DATA_LOSS=15]="DATA_LOSS";/** 2899 * @license 2900 * Copyright 2022 Google LLC 2901 * 2902 * Licensed under the Apache License, Version 2.0 (the "License"); 2903 * you may not use this file except in compliance with the License. 2904 * You may obtain a copy of the License at 2905 * 2906 * http://www.apache.org/licenses/LICENSE-2.0 2907 * 2908 * Unless required by applicable law or agreed to in writing, software 2909 * distributed under the License is distributed on an "AS IS" BASIS, 2910 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2911 * See the License for the specific language governing permissions and 2912 * limitations under the License. 2913 */const Oae=new Bl([4294967295,4294967295],0);function H7(t){const e=UM().encode(t),n=new NM;return n.update(e),new Uint8Array(n.digest())}function q7(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new Bl([n,r],0),new Bl([i,s],0)]}class d_{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Wm(`Invalid padding: ${n}`);if(r<0)throw new Wm(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Wm(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Wm(`Invalid padding when bitmap length is 0: ${n}`);this.fe=8*e.length-n,this.ge=Bl.fromNumber(this.fe)}pe(e,n,r){let i=e.add(n.multiply(Bl.fromNumber(r)));return i.compare(Oae)===1&&(i=new Bl([i.getBits(0),i.getBits(1)],0)),i.modulo(this.ge).toNumber()}ye(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.fe===0)return!1;const n=H7(e),[r,i]=q7(n);for(let s=0;s<this.hashCount;s++){const a=this.pe(r,i,s);if(!this.ye(a))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),a=new d_(s,i,n);return r.forEach((l=>a.insert(l))),a}insert(e){if(this.fe===0)return;const n=H7(e),[r,i]=q7(n);for(let s=0;s<this.hashCount;s++){const a=this.pe(r,i,s);this.we(a)}}we(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}
2913class Wm extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** 2914 * @license 2915 * Copyright 2017 Google LLC 2916 * 2917 * Licensed under the Apache License, Version 2.0 (the "License"); 2918 * you may not use this file except in compliance with the License. 2919 * You may obtain a copy of the License at 2920 * 2921 * http://www.apache.org/licenses/LICENSE-2.0 2922 * 2923 * Unless required by applicable law or agreed to in writing, software 2924 * distributed under the License is distributed on an "AS IS" BASIS, 2925 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2926 * See the License for the specific language governing permissions and 2927 * limitations under the License. 2928 */class f6{constructor(e,n,r,i,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,$y.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new f6(tt.min(),i,new on(lt),lc(),gt())}}class $y{constructor(e,n,r,i,s){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new $y(r,n,gt(),gt(),gt())}}/** 2929 * @license 2930 * Copyright 2017 Google LLC 2931 * 2932 * Licensed under the Apache License, Version 2.0 (the "License"); 2933 * you may not use this file except in compliance with the License. 2934 * You may obtain a copy of the License at 2935 * 2936 * http://www.apache.org/licenses/LICENSE-2.0 2937 * 2938 * Unless required by applicable law or agreed to in writing, software 2939 * distributed under the License is distributed on an "AS IS" BASIS, 2940 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2941 * See the License for the specific language governing permissions and 2942 * limitations under the License. 2943 */class aw{constructor(e,n,r,i){this.Se=e,this.removedTargetIds=n,this.key=r,this.be=i}}class wj{constructor(e,n){this.targetId=e,this.De=n}}class vj{constructor(e,n,r=yr.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class $7{constructor(){this.ve=0,this.Ce=G7(),this.Fe=yr.EMPTY_BYTE_STRING,this.Me=!1,this.xe=!0}get current(){return this.Me}get resumeToken(){return this.Fe}get Oe(){return this.ve!==0}get Ne(){return this.xe}Be(e){e.approximateByteSize()>0&&(this.xe=!0,this.Fe=e)}Le(){let e=gt(),n=gt(),r=gt();return this.Ce.forEach(((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:Xe(38017,{changeType:s})}})),new $y(this.Fe,this.Me,e,n,r)}ke(){this.xe=!1,this.Ce=G7()}qe(e,n){this.xe=!0,this.Ce=this.Ce.insert(e,n)}Qe(e){this.xe=!0,this.Ce=this.Ce.remove(e)}$e(){this.ve+=1}Ue(){this.ve-=1,Lt(this.ve>=0,3241,{ve:this.ve})}Ke(){this.xe=!0,this.Me=!0}}class Bae{constructor(e){this.We=e,this.Ge=new Map,this.ze=lc(),this.je=Lb(),this.Je=Lb(),this.He=new on(lt)}Ye(e){for(const n of e.Se)e.be&&e.be.isFoundDocument()?this.Ze(n,e.be):this.Xe(n,e.key,e.be);for(const n of e.removedTargetIds)this.Xe(n,e.key,e.be)}et(e){this.forEachTarget(e,(n=>{const r=this.tt(n);switch(e.state){case 0:this.nt(n)&&r.Be(e.resumeToken);break;case 1:r.Ue(),r.Oe||r.ke(),r.Be(e.resumeToken);break;case 2:r.Ue(),r.Oe||this.removeTarget(n);break;case 3:this.nt(n)&&(r.Ke(),r.Be(e.resumeToken));break;case 4:this.nt(n)&&(this.rt(n),r.Be(e.resumeToken));break;default:Xe(56790,{state:e.state})}}))}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Ge.forEach(((r,i)=>{this.nt(i)&&n(i)}))}it(e){const n=e.targetId,r=e.De.count,i=this.st(n);if(i){const s=i.target;if(Ux(s))if(r===0){const a=new Ge(s.path);this.Xe(n,a,_r.newNoDocument(a,tt.min()))}else Lt(r===1,20013,{expectedCount:r});else{const a=this.ot(n);if(a!==r){const l=this._t(e),u=l?this.ut(l,e,a):1;if(u!==0){this.rt(n);const d=u===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.He=this.He.insert(n,d)}}}}}_t(e){const n=e.De.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let a,l;try{a=ql(r).toUint8Array()}catch(u){if(u instanceof qM)return Vl("Decoding the base64 bloom filter in existence filter failed ("+u.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw u}try{l=new d_(a,i,s)}catch(u){return Vl(u instanceof Wm?"BloomFilter error: ":"Applying bloom filter failed: ",u),null}return l.fe===0?null:l}ut(e,n,r){return n.De.count===r-this.ht(e,n.targetId)?0:2}ht(e,n){const r=this.We.getRemoteKeysForTarget(n);let i=0;return r.forEach((s=>{const a=this.We.lt(),l=`projects/${a.projectId}/databases/${a.database}/documents/${s.path.canonicalString()}`;e.mightContain(l)||(this.Xe(n,s,null),i++)})),i}Pt(e){const n=new Map;this.Ge.forEach(((s,a)=>{const l=this.st(a);if(l){if(s.current&&Ux(l.target)){const u=new Ge(l.target.path);this.Tt(u).has(a)||this.It(a,u)||this.Xe(a,u,_r.newNoDocument(u,e))}s.Ne&&(n.set(a,s.Le()),s.ke())}}));let r=gt();this.Je.forEach(((s,a)=>{let l=!0;a.forEachWhile((u=>{const d=this.st(u);return!d||d.purpose==="TargetPurposeLimboResolution"||(l=!1,!1)})),l&&(r=r.add(s))})),this.ze.forEach(((s,a)=>a.setReadTime(e)));const i=new f6(e,n,this.He,this.ze,r);return this.ze=lc(),this.je=Lb(),this.Je=Lb(),this.He=new on(lt),i}Ze(e,n){if(!this.nt(e))return;const r=this.It(e,n.key)?2:0;this.tt(e).qe(n.key,r),this.ze=this.ze.insert(n.key,n),this.je=this.je.insert(n.key,this.Tt(n.key).add(e)),this.Je=this.Je.insert(n.key,this.dt(n.key).add(e))}Xe(e,n,r){if(!this.nt(e))return;const i=this.tt(e);this.It(e,n)?i.qe(n,1):i.Qe(n),this.Je=this.Je.insert(n,this.dt(n).delete(e)),this.Je=this.Je.insert(n,this.dt(n).add(e)),r&&(this.ze=this.ze.insert(n,r))}removeTarget(e){this.Ge.delete(e)}ot(e){const n=this.tt(e).Le();return this.We.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}$e(e){this.tt(e).$e()}tt(e){let n=this.Ge.get(e);return n||(n=new $7,this.Ge.set(e,n)),n}dt(e){let n=this.Je.get(e);return n||(n=new Un(lt),this.Je=this.Je.insert(e,n)),n}Tt(e){let n=this.je.get(e);return n||(n=new Un(lt),this.je=this.je.insert(e,n)),n}nt(e){const n=this.st(e)!==null;return n||Ne("WatchChangeAggregator","Detected inactive target",e),n}st(e){const n=this.Ge.get(e);return n&&n.Oe?null:this.We.Et(e)}rt(e){this.Ge.set(e,new $7),this.We.getRemoteKeysForTarget(e).forEach((n=>{this.Xe(e,n,null)}))}It(e,n){return this.We.getRemoteKeysForTarget(e).has(n)}}
vendor: 5,357 bytes, line 2943
2943function Lb(){return new on(Ge.comparator)}function G7(){return new on(Ge.comparator)}const Pae={asc:"ASCENDING",desc:"DESCENDING"},Dae={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Mae={and:"AND",or:"OR"};class jae{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Vx(t,e){return t.useProto3Json||i6(e)?e:{value:e}}function Qw(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Aj(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function Lae(t,e){return Qw(t,e.toTimestamp())}function Mo(t){return Lt(!!t,49232),tt.fromTimestamp((function(n){const r=Hl(n);return new Xt(r.seconds,r.nanos)})(t))}function h_(t,e){return zx(t,e).canonicalString()}function zx(t,e){const n=(function(i){return new Jt(["projects",i.projectId,"databases",i.database])})(t).child("documents");return e===void 0?n:n.child(e)}function Ej(t){const e=Jt.fromString(t);return Lt(Sj(e),10190,{key:e.toString()}),e}function Hx(t,e){return h_(t.databaseId,e.path)}function q3(t,e){const n=Ej(e);if(n.get(1)!==t.databaseId.projectId)throw new je(xe.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new je(xe.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new Ge(Cj(n))}function xj(t,e){return h_(t.databaseId,e)}function Uae(t){const e=Ej(t);return e.length===4?Jt.emptyPath():Cj(e)}function qx(t){return new Jt(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function Cj(t){return Lt(t.length>4&&t.get(4)==="documents",29091,{key:t.toString()}),t.popFirst(5)}function Q7(t,e,n){return{name:Hx(t,e),fields:n.value.mapValue.fields}}function Fae(t,e){let n;if("targetChange"in e){e.targetChange;const r=(function(d){return d==="NO_CHANGE"?0:d==="ADD"?1:d==="REMOVE"?2:d==="CURRENT"?3:d==="RESET"?4:Xe(39313,{state:d})})(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=(function(d,h){return d.useProto3Json?(Lt(h===void 0||typeof h=="string",58123),yr.fromBase64String(h||"")):(Lt(h===void 0||h instanceof Buffer||h instanceof Uint8Array,16193),yr.fromUint8Array(h||new Uint8Array))})(t,e.targetChange.resumeToken),a=e.targetChange.cause,l=a&&(function(d){const h=d.code===void 0?xe.UNKNOWN:bj(d.code);return new je(h,d.message||"")})(a);n=new vj(r,i,s,l||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=q3(t,r.document.name),s=Mo(r.document.updateTime),a=r.document.createTime?Mo(r.document.createTime):tt.min(),l=new ai({mapValue:{fields:r.document.fields}}),u=_r.newFoundDocument(i,s,a,l),d=r.targetIds||[],h=r.removedTargetIds||[];n=new aw(d,h,u.key,u)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=q3(t,r.document),s=r.readTime?Mo(r.readTime):tt.min(),a=_r.newNoDocument(i,s),l=r.removedTargetIds||[];n=new aw([],l,a.key,a)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=q3(t,r.document),s=r.removedTargetIds||[];n=new aw([],s,i,null)}else{if(!("filter"in e))return Xe(11601,{At:e});{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,a=new kae(i,s),l=r.targetId;n=new wj(l,a)}}return n}function Vae(t,e){let n;if(e instanceof qy)n={update:Q7(t,e.key,e.value)};else if(e instanceof yj)n={delete:Hx(t,e.key)};else if(e instanceof Zl)n={update:Q7(t,e.key,e.data),updateMask:Yae(e.fieldMask)};else{if(!(e instanceof Sae))return Xe(16599,{Rt:e.type});n={verify:Hx(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((r=>(function(s,a){const l=a.transform;if(l instanceof Gw)return{fieldPath:a.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof Yg)return{fieldPath:a.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof Jg)return{fieldPath:a.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof Xg)return{fieldPath:a.field.canonicalString(),increment:l.Ee};throw Xe(20930,{transform:a.transform})})(0,r)))),e.precondition.isNone||(n.currentDocument=(function(i,s){return s.updateTime!==void 0?{updateTime:Lae(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:Xe(27497)})(t,e.precondition)),n}function zae(t,e){return t&&t.length>0?(Lt(e!==void 0,14353),t.map((n=>(function(i,s){let a=i.updateTime?Mo(i.updateTime):Mo(s);return a.isEqual(tt.min())&&(a=Mo(s)),new Cae(a,i.transformResults||[])})(n,e)))):[]}function Hae(t,e){return{documents:[xj(t,e.path)]}}function qae(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=xj(t,i);const s=(function(d){if(d.length!==0)return Tj(Ko.create(d,"and"))})(e.filters);s&&(n.structuredQuery.where=s);const a=(function(d){if(d.length!==0)return d.map((h=>
2943(function(g){return{field:dh(g.field),direction:Qae(g.dir)}})(h)))})(e.orderBy);a&&(n.structuredQuery.orderBy=a);const l=Vx(t,e.limit);return l!==null&&(n.structuredQuery.limit=l),e.startAt&&(n.structuredQuery.startAt=(function(d){return{before:d.inclusive,values:d.position}})(e.startAt)),e.endAt&&(n.structuredQuery.endAt=(function(d){return{before:!d.inclusive,values:d.position}})(e.endAt)),{Vt:n,parent:i}}function $ae(t){let e=Uae(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Lt(r===1,65062);const h=n.from[0];h.allDescendants?i=h.collectionId:e=e.child(h.collectionId)}let s=[];n.where&&(s=(function(m){const g=_j(m);return g instanceof Ko&&ej(g)?g.getFilters():[g]})(n.where));let a=[];n.orderBy&&(a=(function(m){return m.map((g=>(function(A){return new $w(hh(A.field),(function(x){switch(x){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}})(A.direction))})(g)))})(n.orderBy));let l=null;n.limit&&(l=(function(m){let g;return g=typeof m=="object"?m.value:m,i6(g)?null:g})(n.limit));let u=null;n.startAt&&(u=(function(m){const g=!!m.before,w=m.values||[];return new qw(w,g)})(n.startAt));let d=null;return n.endAt&&(d=(function(m){const g=!m.before,w=m.values||[];return new qw(w,g)})(n.endAt)),uae(e,i,a,s,l,"F",u,d)}function Gae(t,e){const n=(function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Xe(28987,{purpose:i})}})(e.purpose);return n==null?null:{"goog-listen-tags":n}}function _j(t){return t.unaryFilter!==void 0?(function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=hh(n.unaryFilter.field);return jn.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=hh(n.unaryFilter.field);return jn.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=hh(n.unaryFilter.field);return jn.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const a=hh(n.unaryFilter.field);return jn.create(a,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return Xe(61313);default:return Xe(60726)}})(t):t.fieldFilter!==void 0?(function(n){return jn.create(hh(n.fieldFilter.field),(function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return Xe(58110);default:return Xe(50506)}})(n.fieldFilter.op),n.fieldFilter.value)})(t):t.compositeFilter!==void 0?(function(n){return Ko.create(n.compositeFilter.filters.map((r=>_j(r))),(function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return Xe(1026)}})(n.compositeFilter.op))})(t):Xe(30097,{filter:t})}function Qae(t){return Pae[t]}function Kae(t){return Dae[t]}function Wae(t){return Mae[t]}function dh(t){return{fieldPath:t.canonicalString()}}function hh(t){return fr.fromServerFormat(t.fieldPath)}function Tj(t){return t instanceof jn?(function(n){if(n.op==="=="){if(P7(n.value))return{unaryFilter:{field:dh(n.field),op:"IS_NAN"}};if(B7(n.value))return{unaryFilter:{field:dh(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(P7(n.value))return{unaryFilter:{field:dh(n.field),op:"IS_NOT_NAN"}};if(B7(n.value))return{unaryFilter:{field:dh(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:dh(n.field),op:Kae(n.op),value:n.value}}})(t):t instanceof Ko?(function(n){const r=n.getFilters().map((i=>Tj(i)));return r.length===1?r[0]:{compositeFilter:{op:Wae(n.op),filters:r}}})(t):Xe(54877,{filter:t})}function Yae(t){const e=[];return t.fields.forEach((n=>e.push(n.canonicalString()))),{fieldPaths:e}}function Sj(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** 2944 * @license 2945 * Copyright 2017 Google LLC 2946 * 2947 * Licensed under the Apache License, Version 2.0 (the "License");
2948 * you may not use this file except in compliance with the License. 2949 * You may obtain a copy of the License at 2950 * 2951 * http://www.apache.org/licenses/LICENSE-2.0 2952 * 2953 * Unless required by applicable law or agreed to in writing, software 2954 * distributed under the License is distributed on an "AS IS" BASIS, 2955 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2956 * See the License for the specific language governing permissions and 2957 * limitations under the License. 2958 */class Il{constructor(e,n,r,i,s=tt.min(),a=tt.min(),l=yr.EMPTY_BYTE_STRING,u=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=a,this.resumeToken=l,this.expectedCount=u}withSequenceNumber(e){return new Il(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new Il(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Il(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Il(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** 2959 * @license 2960 * Copyright 2017 Google LLC 2961 * 2962 * Licensed under the Apache License, Version 2.0 (the "License"); 2963 * you may not use this file except in compliance with the License. 2964 * You may obtain a copy of the License at 2965 * 2966 * http://www.apache.org/licenses/LICENSE-2.0 2967 * 2968 * Unless required by applicable law or agreed to in writing, software 2969 * distributed under the License is distributed on an "AS IS" BASIS, 2970 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2971 * See the License for the specific language governing permissions and 2972 * limitations under the License. 2973 */class Jae{constructor(e){this.gt=e}}function Xae(t){const e=$ae({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?Fx(e,e.limit,"L"):e}/** 2974 * @license 2975 * Copyright 2019 Google LLC 2976 * 2977 * Licensed under the Apache License, Version 2.0 (the "License"); 2978 * you may not use this file except in compliance with the License. 2979 * You may obtain a copy of the License at 2980 * 2981 * http://www.apache.org/licenses/LICENSE-2.0 2982 * 2983 * Unless required by applicable law or agreed to in writing, software 2984 * distributed under the License is distributed on an "AS IS" BASIS, 2985 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2986 * See the License for the specific language governing permissions and 2987 * limitations under the License. 2988 */class Zae{constructor(){this.Dn=new ece}addToCollectionParentIndex(e,n){return this.Dn.add(n),Ae.resolve()}getCollectionParents(e,n){return Ae.resolve(this.Dn.getEntries(n))}addFieldIndex(e,n){return Ae.resolve()}deleteFieldIndex(e,n){return Ae.resolve()}deleteAllFieldIndexes(e){return Ae.resolve()}createTargetIndexes(e,n){return Ae.resolve()}getDocumentsMatchingTarget(e,n){return Ae.resolve(null)}getIndexType(e,n){return Ae.resolve(0)}getFieldIndexes(e,n){return Ae.resolve([])}getNextCollectionGroupToUpdate(e){return Ae.resolve(null)}getMinOffset(e,n){return Ae.resolve(zl.min())}getMinOffsetFromCollectionGroup(e,n){return Ae.resolve(zl.min())}updateCollectionGroup(e,n,r){return Ae.resolve()}updateIndexEntries(e,n){return Ae.resolve()}}class ece{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new Un(Jt.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new Un(Jt.comparator)).toArray()}}/** 2989 * @license 2990 * Copyright 2018 Google LLC 2991 * 2992 * Licensed under the Apache License, Version 2.0 (the "License"); 2993 * you may not use this file except in compliance with the License. 2994 * You may obtain a copy of the License at 2995 * 2996 * http://www.apache.org/licenses/LICENSE-2.0 2997 * 2998 * Unless required by applicable law or agreed to in writing, softw
2998are 2999 * distributed under the License is distributed on an "AS IS" BASIS, 3000 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3001 * See the License for the specific language governing permissions and 3002 * limitations under the License. 3003 */const K7={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Ij=41943040;class ri{static withCacheSize(e){return new ri(e,ri.DEFAULT_COLLECTION_PERCENTILE,ri.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,n,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}}/** 3004 * @license 3005 * Copyright 2017 Google LLC 3006 * 3007 * Licensed under the Apache License, Version 2.0 (the "License"); 3008 * you may not use this file except in compliance with the License. 3009 * You may obtain a copy of the License at 3010 * 3011 * http://www.apache.org/licenses/LICENSE-2.0 3012 * 3013 * Unless required by applicable law or agreed to in writing, software 3014 * distributed under the License is distributed on an "AS IS" BASIS, 3015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3016 * See the License for the specific language governing permissions and 3017 * limitations under the License. 3018 */ri.DEFAULT_COLLECTION_PERCENTILE=10,ri.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ri.DEFAULT=new ri(Ij,ri.DEFAULT_COLLECTION_PERCENTILE,ri.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ri.DISABLED=new ri(-1,0,0);/** 3019 * @license 3020 * Copyright 2017 Google LLC 3021 * 3022 * Licensed under the Apache License, Version 2.0 (the "License"); 3023 * you may not use this file except in compliance with the License. 3024 * You may obtain a copy of the License at 3025 * 3026 * http://www.apache.org/licenses/LICENSE-2.0 3027 * 3028 * Unless required by applicable law or agreed to in writing, software 3029 * distributed under the License is distributed on an "AS IS" BASIS, 3030 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3031 * See the License for the specific language governing permissions and 3032 * limitations under the License. 3033 */class Xp{constructor(e){this._r=e}next(){return this._r+=2,this._r}static ar(){return new Xp(0)}static ur(){return new Xp(-1)}}/** 3034 * @license 3035 * Copyright 2020 Google LLC 3036 * 3037 * Licensed under the Apache License, Version 2.0 (the "License"); 3038 * you may not use this file except in compliance with the License. 3039 * You may obtain a copy of the License at 3040 * 3041 * http://www.apache.org/licenses/LICENSE-2.0 3042 * 3043 * Unless required by applicable law or agreed to in writing, software 3044 * distributed under the License is distributed on an "AS IS" BASIS, 3045 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3046 * See the License for the specific language governing permissions and 3047 * limitations under the License. 3048 */const W7="LruGarbageCollector",tce=1048576;function Y7([t,e],[n,r]){const i=lt(t,n);return i===0?lt(e,r):i}class nce{constructor(e){this.Tr=e,this.buffer=new Un(Y7),this.Ir=0}dr(){return++this.Ir}Er(e){const n=[e,this.dr()];if(this.buffer.size<this.Tr)this.buffer=this.buffer.add(n);else{const r=this.buffer.last();Y7(n,r)<0&&(this.buffer=this.buffer.delete(r).add(n))}}get maxValue(){return this.buffer.last()[0]}}class rce{constructor(e,n,r){this.garbageCollector=e,this.asyncQueue=n,this.localStore=r,this.Ar=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Rr(6e4)}stop(){this.Ar&&(this.Ar.cancel(),this.Ar=null)}get started(){return this.Ar!==null}Rr(e){Ne(W7,`Garbage collection scheduled in ${e}ms`),this.Ar=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(async()=>{this.Ar=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){A0(n)?Ne(W7,"Ignoring IndexedDB error during garbage collection: ",n):await v0(n)}await this.Rr(3e5)}))}}class ice{constructor(e,n){this.Vr=e,this.params=n}calculateTargetCount(e,n){return this.Vr.mr(e).next((r=>Math.floor(n/100*r)))}nthSequenceNumber(e,n){if(n===0)return Ae.resolve(r6.ue);const r=new nce(n);return this.Vr.forEachTarget(e,(i=>r.Er(i.sequenceNumber))).next((()=>this.Vr.gr(e,(i=>r.Er(i))))).next((()=>r.maxValue))}removeTargets(e,n,r){return this.Vr.removeTargets(e,n,r)}removeOrphanedDocuments(e,n){return this.Vr.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(Ne("LruGarbageCollector","Garbage collection skipped; disabled"),Ae.resolve(K7)):this.getCacheSize(e).next((r=>r<this.params.cacheSizeCollectionThreshold?(Ne("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),K7):this.pr(e,n)))}getCacheSize(e){return this.Vr.getCacheSize(e)}pr(e,n){let r,i,s,a,l,u,d;const h=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((m=>(m>this.params.maximumSequenceNumbersToCollect?(Ne("LruGarbageCollector",`C
3048apping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${m}`),i=this.params.maximumSequenceNumbersToCollect):i=m,a=Date.now(),this.nthSequenceNumber(e,i)))).next((m=>(r=m,l=Date.now(),this.removeTargets(e,r,n)))).next((m=>(s=m,u=Date.now(),this.removeOrphanedDocuments(e,r)))).next((m=>(d=Date.now(),uh()<=Tt.DEBUG&&Ne("LruGarbageCollector",`LRU Garbage Collection 3049 Counted targets in ${a-h}ms 3050 Determined least recently used ${i} in `+(l-a)+`ms 3051 Removed ${s} targets in `+(u-l)+`ms 3052 Removed ${m} documents in `+(d-u)+`ms 3053Total Duration: ${d-h}ms`),Ae.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:m}))))}}function sce(t,e){return new ice(t,e)}/** 3054 * @license 3055 * Copyright 2017 Google LLC 3056 * 3057 * Licensed under the Apache License, Version 2.0 (the "License"); 3058 * you may not use this file except in compliance with the License. 3059 * You may obtain a copy of the License at 3060 * 3061 * http://www.apache.org/licenses/LICENSE-2.0 3062 * 3063 * Unless required by applicable law or agreed to in writing, software 3064 * distributed under the License is distributed on an "AS IS" BASIS, 3065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3066 * See the License for the specific language governing permissions and 3067 * limitations under the License. 3068 */class oce{constructor(){this.changes=new od((e=>e.toString()),((e,n)=>e.isEqual(n))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,_r.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?Ae.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** 3069 * @license 3070 * Copyright 2017 Google LLC 3071 * 3072 * Licensed under the Apache License, Version 2.0 (the "License"); 3073 * you may not use this file except in compliance with the License. 3074 * You may obtain a copy of the License at 3075 * 3076 * http://www.apache.org/licenses/LICENSE-2.0 3077 * 3078 * Unless required by applicable law or agreed to in writing, software 3079 * distributed under the License is distributed on an "AS IS" BASIS, 3080 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3081 * See the License for the specific language governing permissions and 3082 * limitations under the License. 3083 *//** 3084 * @license 3085 * Copyright 2022 Google LLC 3086 * 3087 * Licensed under the Apache License, Version 2.0 (the "License"); 3088 * you may not use this file except in compliance with the License. 3089 * You may obtain a copy of the License at 3090 * 3091 * http://www.apache.org/licenses/LICENSE-2.0 3092 * 3093 * Unless required by applicable law or agreed to in writing, software 3094 * distributed under the License is distributed on an "AS IS" BASIS, 3095 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3096 * See the License for the specific language governing permissions and 3097 * limitations under the License. 3098 */class ace{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** 3099 * @license 3100 * Copyright 2017 Google LLC 3101 * 3102 * Licensed under the Apache License, Version 2.0 (the "License"); 3103 * you may not use this file except in compliance with the License. 3104 * You may obtain a copy of the License at 3105 * 3106 * http://www.apache.org/licenses/LICENSE-2.0 3107 * 3108 * Unless required by applicable law or agreed to in writing, software 3109 * distributed under the License is distributed on an "AS IS" BASIS, 3110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3111 * See the License for the specific language governing permissions and 3112 * limitations under the License. 3113 */class cce{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next((i=>(r=i,this.remoteDocumentCache.getEntry(e,n)))).next((i=>(r!==null&&lg(r.mutation,i,Bi.empty(),Xt.now()),i)))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next((r=>this.getLocalViewOfDocuments(e,r,gt()).next((()=>r))))}getLocalViewOfDocuments(e,n,r=gt()){const i=Yu();return this.populateOverlays(e,i,n).next((()=>this.computeViews(e,n,i,r).next((s=>{let a=Km();
3113return s.forEach(((l,u)=>{a=a.insert(l,u.overlayedDocument)})),a}))))}getOverlayedDocuments(e,n){const r=Yu();return this.populateOverlays(e,r,n).next((()=>this.computeViews(e,n,r,gt())))}populateOverlays(e,n,r){const i=[];return r.forEach((s=>{n.has(s)||i.push(s)})),this.documentOverlayCache.getOverlays(e,i).next((s=>{s.forEach(((a,l)=>{n.set(a,l)}))}))}computeViews(e,n,r,i){let s=lc();const a=cg(),l=(function(){return cg()})();return n.forEach(((u,d)=>{const h=r.get(d.key);i.has(d.key)&&(h===void 0||h.mutation instanceof Zl)?s=s.insert(d.key,d):h!==void 0?(a.set(d.key,h.mutation.getFieldMask()),lg(h.mutation,d,h.mutation.getFieldMask(),Xt.now())):a.set(d.key,Bi.empty())})),this.recalculateAndSaveOverlays(e,s).next((u=>(u.forEach(((d,h)=>a.set(d,h))),n.forEach(((d,h)=>{var m;return l.set(d,new ace(h,(m=a.get(d))!==null&&m!==void 0?m:null))})),l)))}recalculateAndSaveOverlays(e,n){const r=cg();let i=new on(((a,l)=>a-l)),s=gt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next((a=>{for(const l of a)l.keys().forEach((u=>{const d=n.get(u);if(d===null)return;let h=r.get(u)||Bi.empty();h=l.applyToLocalView(d,h),r.set(u,h);const m=(i.get(l.batchId)||gt()).add(u);i=i.insert(l.batchId,m)}))})).next((()=>{const a=[],l=i.getReverseIterator();for(;l.hasNext();){const u=l.getNext(),d=u.key,h=u.value,m=cj();h.forEach((g=>{if(!s.has(g)){const w=mj(n.get(g),r.get(g));w!==null&&m.set(g,w),s=s.add(g)}})),a.push(this.documentOverlayCache.saveOverlays(e,d,m))}return Ae.waitFor(a)})).next((()=>r))}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next((r=>this.recalculateAndSaveOverlays(e,r)))}getDocumentsMatchingQuery(e,n,r,i){return(function(a){return Ge.isDocumentKey(a.path)&&a.collectionGroup===null&&a.filters.length===0})(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):fae(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next((s=>{const a=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):Ae.resolve(Yu());let l=Gg,u=s;return a.next((d=>Ae.forEach(d,((h,m)=>(l<m.largestBatchId&&(l=m.largestBatchId),s.get(h)?Ae.resolve():this.remoteDocumentCache.getEntry(e,h).next((g=>{u=u.insert(h,g)}))))).next((()=>this.populateOverlays(e,d,s))).next((()=>this.computeViews(e,u,d,gt()))).next((h=>({batchId:l,changes:aj(h)})))))}))}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new Ge(n)).next((r=>{let i=Km();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i}))}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let a=Km();return this.indexManager.getCollectionParents(e,s).next((l=>Ae.forEach(l,(u=>{const d=(function(m,g){return new o6(g,null,m.explicitOrderBy.slice(),m.filters.slice(),m.limit,m.limitType,m.startAt,m.endAt)})(n,u.child(s));return this.getDocumentsMatchingCollectionQuery(e,d,r,i).next((h=>{h.forEach(((m,g)=>{a=a.insert(m,g)}))}))})).next((()=>a))))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next((a=>(s=a,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i)))).next((a=>{s.forEach(((u,d)=>{const h=d.getKey();a.get(h)===null&&(a=a.insert(h,_r.newInvalidDocument(h)))}));let l=Km();return a.forEach(((u,d)=>{const h=s.get(u);h!==void 0&&lg(h.mutation,d,Bi.empty(),Xt.now()),c6(n,d)&&(l=l.insert(u,d))})),l}))}}/** 3114 * @license 3115 * Copyright 2020 Google LLC 3116 * 3117 * Licensed under the Apache License, Version 2.0 (the "License"); 3118 * you may not use this file except in compliance with the License. 3119 * You may obtain a copy of the License at 3120 * 3121 * http://www.apache.org/licenses/LICENSE-2.0 3122 * 3123 * Unless required by applicable law or agreed to in writing, software 3124 * distributed under the License is distributed on an "AS IS" BASIS, 3125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3126 * See the License for the specific language governing permissions and 3127 * limitations under the License.
3128 */class lce{constructor(e){this.serializer=e,this.Br=new Map,this.Lr=new Map}getBundleMetadata(e,n){return Ae.resolve(this.Br.get(n))}saveBundleMetadata(e,n){return this.Br.set(n.id,(function(i){return{id:i.id,version:i.version,createTime:Mo(i.createTime)}})(n)),Ae.resolve()}getNamedQuery(e,n){return Ae.resolve(this.Lr.get(n))}saveNamedQuery(e,n){return this.Lr.set(n.name,(function(i){return{name:i.name,query:Xae(i.bundledQuery),readTime:Mo(i.readTime)}})(n)),Ae.resolve()}}/** 3129 * @license 3130 * Copyright 2022 Google LLC 3131 * 3132 * Licensed under the Apache License, Version 2.0 (the "License"); 3133 * you may not use this file except in compliance with the License. 3134 * You may obtain a copy of the License at 3135 * 3136 * http://www.apache.org/licenses/LICENSE-2.0 3137 * 3138 * Unless required by applicable law or agreed to in writing, software 3139 * distributed under the License is distributed on an "AS IS" BASIS, 3140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3141 * See the License for the specific language governing permissions and 3142 * limitations under the License. 3143 */class uce{constructor(){this.overlays=new on(Ge.comparator),this.kr=new Map}getOverlay(e,n){return Ae.resolve(this.overlays.get(n))}getOverlays(e,n){const r=Yu();return Ae.forEach(n,(i=>this.getOverlay(e,i).next((s=>{s!==null&&r.set(i,s)})))).next((()=>r))}saveOverlays(e,n,r){return r.forEach(((i,s)=>{this.wt(e,n,s)})),Ae.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.kr.get(r);return i!==void 0&&(i.forEach((s=>this.overlays=this.overlays.remove(s))),this.kr.delete(r)),Ae.resolve()}getOverlaysForCollection(e,n,r){const i=Yu(),s=n.length+1,a=new Ge(n.child("")),l=this.overlays.getIteratorFrom(a);for(;l.hasNext();){const u=l.getNext().value,d=u.getKey();if(!n.isPrefixOf(d.path))break;d.path.length===s&&u.largestBatchId>r&&i.set(u.getKey(),u)}return Ae.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new on(((d,h)=>d-h));const a=this.overlays.getIterator();for(;a.hasNext();){const d=a.getNext().value;if(d.getKey().getCollectionGroup()===n&&d.largestBatchId>r){let h=s.get(d.largestBatchId);h===null&&(h=Yu(),s=s.insert(d.largestBatchId,h)),h.set(d.getKey(),d)}}const l=Yu(),u=s.getIterator();for(;u.hasNext()&&(u.getNext().value.forEach(((d,h)=>l.set(d,h))),!(l.size()>=i)););return Ae.resolve(l)}wt(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const a=this.kr.get(i.largestBatchId).delete(r.key);this.kr.set(i.largestBatchId,a)}this.overlays=this.overlays.insert(r.key,new Rae(n,r));let s=this.kr.get(n);s===void 0&&(s=gt(),this.kr.set(n,s)),this.kr.set(n,s.add(r.key))}}/** 3144 * @license 3145 * Copyright 2024 Google LLC 3146 * 3147 * Licensed under the Apache License, Version 2.0 (the "License"); 3148 * you may not use this file except in compliance with the License. 3149 * You may obtain a copy of the License at 3150 * 3151 * http://www.apache.org/licenses/LICENSE-2.0 3152 * 3153 * Unless required by applicable law or agreed to in writing, software 3154 * distributed under the License is distributed on an "AS IS" BASIS, 3155 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3156 * See the License for the specific language governing permissions and 3157 * limitations under the License. 3158 */class fce{constructor(){this.sessionToken=yr.EMPTY_BYTE_STRING}getSessionToken(e){return Ae.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,Ae.resolve()}}/** 3159 * @license 3160 * Copyright 2017 Google LLC 3161 * 3162 * Licensed under the Apache License, Version 2.0 (the "License"); 3163 * you may not use this file except in compliance with the License. 3164 * You may obtain a copy of the License at 3165 * 3166 * http://www.apache.org/licenses/LICENSE-2.0 3167 * 3168 * Unless required by applicable law or agreed to in writing, software 3169 * distributed under the License is distributed on an "AS IS" BASIS, 3170 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3171 * See the License for the specific language governing permissions and 3172 * limitations under the License. 3173 */class p_{constructor(){this.qr=new Un(Xn.Qr),this.$r=new Un(Xn.Ur)}isEmpty(){return this.qr.isEmpty()}addReference(e,n){const r=new Xn(e,n);this.qr=this.qr.add(r),this.$r=this.$r.add(r)}Kr(e,n){e.forEach((r=>this.addReference(r,n)))}removeReference(e,n){this.Wr(new Xn(e,n))}Gr(e,n){e.forEach((r=>this.removeReference(r,n)))}zr(e){const n=new Ge(new Jt([])),r=new Xn(n,e),i=new Xn(n,e+1),s=[];return this.$r.forEachInRange([r,i],(a=>{this.Wr(a),s.push(a.key)})),s}jr(){this.qr.forEach((e=>this.Wr(e)))}Wr(e){this.qr=this.qr.delete(e),this.$r=this.$r.delete(e)}Jr(e){const n=new Ge(new Jt([])),r=new Xn(n,e),i=new Xn(n,e+1);let s=gt();return this.$r.forEachInRange([r,i],(a=>{s=s.add(a.key)})),s}
vendor: 12,955 bytes, lines 3173-3243
3173containsKey(e){const n=new Xn(e,0),r=this.qr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class Xn{constructor(e,n){this.key=e,this.Hr=n}static Qr(e,n){return Ge.comparator(e.key,n.key)||lt(e.Hr,n.Hr)}static Ur(e,n){return lt(e.Hr,n.Hr)||Ge.comparator(e.key,n.key)}}/** 3174 * @license 3175 * Copyright 2017 Google LLC 3176 * 3177 * Licensed under the Apache License, Version 2.0 (the "License"); 3178 * you may not use this file except in compliance with the License. 3179 * You may obtain a copy of the License at 3180 * 3181 * http://www.apache.org/licenses/LICENSE-2.0 3182 * 3183 * Unless required by applicable law or agreed to in writing, software 3184 * distributed under the License is distributed on an "AS IS" BASIS, 3185 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3186 * See the License for the specific language governing permissions and 3187 * limitations under the License. 3188 */class dce{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.er=1,this.Yr=new Un(Xn.Qr)}checkEmpty(e){return Ae.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.er;this.er++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const a=new Iae(s,n,r,i);this.mutationQueue.push(a);for(const l of i)this.Yr=this.Yr.add(new Xn(l.key,s)),this.indexManager.addToCollectionParentIndex(e,l.key.path.popLast());return Ae.resolve(a)}lookupMutationBatch(e,n){return Ae.resolve(this.Zr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.Xr(r),s=i<0?0:i;return Ae.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return Ae.resolve(this.mutationQueue.length===0?i_:this.er-1)}getAllMutationBatches(e){return Ae.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new Xn(n,0),i=new Xn(n,Number.POSITIVE_INFINITY),s=[];return this.Yr.forEachInRange([r,i],(a=>{const l=this.Zr(a.Hr);s.push(l)})),Ae.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new Un(lt);return n.forEach((i=>{const s=new Xn(i,0),a=new Xn(i,Number.POSITIVE_INFINITY);this.Yr.forEachInRange([s,a],(l=>{r=r.add(l.Hr)}))})),Ae.resolve(this.ei(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;Ge.isDocumentKey(s)||(s=s.child(""));const a=new Xn(new Ge(s),0);let l=new Un(lt);return this.Yr.forEachWhile((u=>{const d=u.key.path;return!!r.isPrefixOf(d)&&(d.length===i&&(l=l.add(u.Hr)),!0)}),a),Ae.resolve(this.ei(l))}ei(e){const n=[];return e.forEach((r=>{const i=this.Zr(r);i!==null&&n.push(i)})),n}removeMutationBatch(e,n){Lt(this.ti(n.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Yr;return Ae.forEach(n.mutations,(i=>{const s=new Xn(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((()=>{this.Yr=r}))}rr(e){}containsKey(e,n){const r=new Xn(n,0),i=this.Yr.firstAfterOrEqual(r);return Ae.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,Ae.resolve()}ti(e,n){return this.Xr(e)}Xr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Zr(e){const n=this.Xr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** 3189 * @license 3190 * Copyright 2017 Google LLC 3191 * 3192 * Licensed under the Apache License, Version 2.0 (the "License"); 3193 * you may not use this file except in compliance with the License. 3194 * You may obtain a copy of the License at 3195 * 3196 * http://www.apache.org/licenses/LICENSE-2.0 3197 * 3198 * Unless required by applicable law or agreed to in writing, software 3199 * distributed under the License is distributed on an "AS IS" BASIS, 3200 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3201 * See the License for the specific language governing permissions and 3202 * limitations under the License. 3203 */class hce{constructor(e){this.ni=e,this.docs=(function(){return new on(Ge.comparator)})(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,a=this.ni(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:a}),this.size+=a-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return Ae.resolve(r?r.document.mutableCopy():_r.newInvalidDocument(n))}getEntries(e,n){let r=lc();return n.forEach((i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():_r.newInvalidDocument(i))})),Ae.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=lc();const a=n.path,l=new Ge(a.child("__id-9223372036854775808__")),u=this.docs.getIteratorFrom(l);for(;u.hasNext();){const{key:d,value:{document:h}}=u.getNext();if(!a.isPrefixOf(d.path))break;d.path.length>a.length+1||zoe(Voe(h),r)<=0||(i.has(h.key)||c6(n,h))&&(s=s.insert(h.key,h.mutableCopy()))}return Ae.resolve(s)}getAllFromCollectionGroup(e,n,r,i){Xe(9500)}ri(e,n){return Ae.forEach(this.docs,(r=>n(r)))}newChangeBuffer(e){return new pce(this)}getSize(e){return Ae.resolve(this.size)}}class pce extends oce{constructor(e){super(),this.Or=e}applyChanges(e){const n=[];return this.changes.forEach(((r,i)=>{i.isValidDocument()?n.push(this.Or.addEntry(e,i)):this.Or.removeEntry(r)})),Ae.waitFor(n)}getFromCache(e,n){return this.Or.getEntry(e,n)}getAllFromCache(e,n){return this.Or.getEntries(e,n)}}/** 3204 * @license 3205 * Copyright 2017 Google LLC 3206 * 3207 * Licensed under the Apache License, Version 2.0 (the "License"); 3208 * you may not use this file except in compliance with the License. 3209 * You may obtain a copy of the License at 3210 * 3211 * http://www.apache.org/licenses/LICENSE-2.0 3212 * 3213 * Unless required by applicable law or agreed to in writing, software 3214 * distributed under the License is distributed on an "AS IS" BASIS, 3215 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3216 * See the License for the specific language governing permissions and 3217 * limitations under the License. 3218 */class mce{constructor(e){this.persistence=e,this.ii=new od((n=>a_(n)),c_),this.lastRemoteSnapshotVersion=tt.min(),this.highestTargetId=0,this.si=0,this.oi=new p_,this.targetCount=0,this._i=Xp.ar()}forEachTarget(e,n){return this.ii.forEach(((r,i)=>n(i))),Ae.resolve()}getLastRemoteSnapshotVersion(e){return Ae.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Ae.resolve(this.si)}allocateTargetId(e){return this.highestTargetId=this._i.next(),Ae.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.si&&(this.si=n),Ae.resolve()}hr(e){this.ii.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this._i=new Xp(n),this.highestTargetId=n),e.sequenceNumber>this.si&&(this.si=e.sequenceNumber)}addTargetData(e,n){return this.hr(n),this.targetCount+=1,Ae.resolve()}updateTargetData(e,n){return this.hr(n),Ae.resolve()}removeTargetData(e,n){return this.ii.delete(n.target),this.oi.zr(n.targetId),this.targetCount-=1,Ae.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.ii.forEach(((a,l)=>{l.sequenceNumber<=n&&r.get(l.targetId)===null&&(this.ii.delete(a),s.push(this.removeMatchingKeysForTargetId(e,l.targetId)),i++)})),Ae.waitFor(s).next((()=>i))}getTargetCount(e){return Ae.resolve(this.targetCount)}getTargetData(e,n){const r=this.ii.get(n)||null;return Ae.resolve(r)}addMatchingKeys(e,n,r){return this.oi.Kr(n,r),Ae.resolve()}removeMatchingKeys(e,n,r){this.oi.Gr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach((a=>{s.push(i.markPotentiallyOrphaned(e,a))})),Ae.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.oi.zr(n),Ae.resolve()}getMatchingKeysForTargetId(e,n){const r=this.oi.Jr(n);return Ae.resolve(r)}containsKey(e,n){return Ae.resolve(this.oi.containsKey(n))}}/** 3219 * @license 3220 * Copyright 2017 Google LLC 3221 * 3222 * Licensed under the Apache License, Version 2.0 (the "License"); 3223 * you may not use this file except in compliance with the License. 3224 * You may obtain a copy of the License at 3225 * 3226 * http://www.apache.org/licenses/LICENSE-2.0 3227 * 3228 * Unless required by applicable law or agreed to in writing, software 3229 * distributed under the License is distributed on an "AS IS" BASIS, 3230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3231 * See the License for the specific language governing permissions and 3232 * limitations under the License. 3233 */class Rj{constructor(e,n){this.ai={},this.overlays={},this.ui=new r6(0),this.ci=!1,this.ci=!0,this.li=new fce,this.referenceDelegate=e(this),this.hi=new mce(this),this.indexManager=new Zae,this.remoteDocumentCache=(function(i){return new hce(i)})((r=>this.referenceDelegate.Pi(r))),this.serializer=new Jae(n),this.Ti=new lce(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ci=!1,Promise.resolve()}get started(){return this.ci}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new uce,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.ai[e.toKey()];return r||(r=new dce(n,this.referenceDelegate),this.ai[e.toKey()]=r),r}getGlobalsCache(){return this.li}getTargetCache(){return this.hi}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ti}runTransaction(e,n,r){Ne("MemoryPersistence","Starting transaction:",e);const i=new gce(this.ui.next());return this.referenceDelegate.Ii(),r(i).next((s=>this.referenceDelegate.di(i).next((()=>s)))).toPromise().then((s=>(i.raiseOnCommittedEvent(),s)))}Ei(e,n){return Ae.or(Object.values(this.ai).map((r=>()=>r.containsKey(e,n))))}}class gce extends qoe{constructor(e){super(),this.currentSequenceNumber=e}}class m_{constructor(e){this.persistence=e,this.Ai=new p_,this.Ri=null}static Vi(e){return new m_(e)}get mi(){if(this.Ri)return this.Ri;throw Xe(60996)}addReference(e,n,r){return this.Ai.addReference(r,n),this.mi.delete(r.toString()),Ae.resolve()}removeReference(e,n,r){return this.Ai.removeReference(r,n),this.mi.add(r.toString()),Ae.resolve()}markPotentiallyOrphaned(e,n){return this.mi.add(n.toString()),Ae.resolve()}removeTarget(e,n){this.Ai.zr(n.targetId).forEach((i=>this.mi.add(i.toString())));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next((i=>{i.forEach((s=>this.mi.add(s.toString())))})).next((()=>r.removeTargetData(e,n)))}Ii(){this.Ri=new Set}di(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Ae.forEach(this.mi,(r=>{const i=Ge.fromPath(r);return this.fi(e,i).next((s=>{s||n.removeEntry(i,tt.min())}))})).next((()=>(this.Ri=null,n.apply(e))))}updateLimboDocument(e,n){return this.fi(e,n).next((r=>{r?this.mi.delete(n.toString()):this.mi.add(n.toString())}))}Pi(e){return 0}fi(e,n){return Ae.or([()=>Ae.resolve(this.Ai.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Ei(e,n)])}}class Kw{constructor(e,n){this.persistence=e,this.gi=new od((r=>Qoe(r.path)),((r,i)=>r.isEqual(i))),this.garbageCollector=sce(this,n)}static Vi(e,n){return new Kw(e,n)}Ii(){}di(e){return Ae.resolve()}forEachTarget(e,n){return this.persistence.getTargetCache().forEachTarget(e,n)}mr(e){const n=this.yr(e);return this.persistence.getTargetCache().getTargetCount(e).next((r=>n.next((i=>r+i))))}yr(e){let n=0;return this.gr(e,(r=>{n++})).next((()=>n))}gr(e,n){return Ae.forEach(this.gi,((r,i)=>this.Sr(e,r,i).next((s=>s?Ae.resolve():n(i)))))}removeTargets(e,n,r){return this.persistence.getTargetCache().removeTargets(e,n,r)}removeOrphanedDocuments(e,n){let r=0;const i=this.persistence.getRemoteDocumentCache(),s=i.newChangeBuffer();return i.ri(e,(a=>this.Sr(e,a,n).next((l=>{l||(r++,s.removeEntry(a,tt.min()))})))).next((()=>s.apply(e))).next((()=>r))}markPotentiallyOrphaned(e,n){return this.gi.set(n,e.currentSequenceNumber),Ae.resolve()}removeTarget(e,n){const r=n.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,n,r){return this.gi.set(r,e.currentSequenceNumber),Ae.resolve()}removeReference(e,n,r){return this.gi.set(r,e.currentSequenceNumber),Ae.resolve()}updateLimboDocument(e,n){return this.gi.set(n,e.currentSequenceNumber),Ae.resolve()}Pi(e){let n=e.key.toString().length;return e.isFoundDocument()&&(n+=iw(e.data.value)),n}Sr(e,n,r){return Ae.or([()=>this.persistence.Ei(e,n),()=>this.persistence.getTargetCache().containsKey(e,n),()=>{const i=this.gi.get(n);return Ae.resolve(i!==void 0&&i>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/** 3234 * @license 3235 * Copyright 2017 Google LLC 3236 * 3237 * Licensed under the Apache License, Version 2.0 (the "License"); 3238 * you may not use this file except in compliance with the License. 3239 * You may obtain a copy of the License at 3240 * 3241 * http://www.apache.org/licenses/LICENSE-2.0 3242 * 3243 * Unless required by applicable law or agreed to in writing, softw
3243are 3244 * distributed under the License is distributed on an "AS IS" BASIS, 3245 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3246 * See the License for the specific language governing permissions and 3247 * limitations under the License. 3248 */class g_{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.Is=r,this.ds=i}static Es(e,n){let r=gt(),i=gt();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new g_(e,n.fromCache,r,i)}}/** 3249 * @license 3250 * Copyright 2023 Google LLC 3251 * 3252 * Licensed under the Apache License, Version 2.0 (the "License"); 3253 * you may not use this file except in compliance with the License. 3254 * You may obtain a copy of the License at 3255 * 3256 * http://www.apache.org/licenses/LICENSE-2.0 3257 * 3258 * Unless required by applicable law or agreed to in writing, software 3259 * distributed under the License is distributed on an "AS IS" BASIS, 3260 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3261 * See the License for the specific language governing permissions and 3262 * limitations under the License. 3263 */class yce{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** 3264 * @license 3265 * Copyright 2019 Google LLC 3266 * 3267 * Licensed under the Apache License, Version 2.0 (the "License"); 3268 * you may not use this file except in compliance with the License. 3269 * You may obtain a copy of the License at 3270 * 3271 * http://www.apache.org/licenses/LICENSE-2.0 3272 * 3273 * Unless required by applicable law or agreed to in writing, software 3274 * distributed under the License is distributed on an "AS IS" BASIS, 3275 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3276 * See the License for the specific language governing permissions and 3277 * limitations under the License. 3278 */class bce{constructor(){this.As=!1,this.Rs=!1,this.Vs=100,this.fs=(function(){return dse()?8:$oe(lse())>0?6:4})()}initialize(e,n){this.gs=e,this.indexManager=n,this.As=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.ps(e,n).next((a=>{s.result=a})).next((()=>{if(!s.result)return this.ys(e,n,i,r).next((a=>{s.result=a}))})).next((()=>{if(s.result)return;const a=new yce;return this.ws(e,n,a).next((l=>{if(s.result=l,this.Rs)return this.Ss(e,n,a,l.size)}))})).next((()=>s.result))}Ss(e,n,r,i){return r.documentReadCount<this.Vs?(uh()<=Tt.DEBUG&&Ne("QueryEngine","SDK will not create cache indexes for query:",fh(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),Ae.resolve()):(uh()<=Tt.DEBUG&&Ne("QueryEngine","Query:",fh(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.fs*i?(uh()<=Tt.DEBUG&&Ne("QueryEngine","The SDK decides to create cache indexes for query:",fh(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Do(n))):Ae.resolve())}ps(e,n){if(L7(n))return Ae.resolve(null);let r=Do(n);return this.indexManager.getIndexType(e,r).next((i=>i===0?null:(n.limit!==null&&i===1&&(n=Fx(n,null,"F"),r=Do(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next((s=>{const a=gt(...s);return this.gs.getDocuments(e,a).next((l=>this.indexManager.getMinOffset(e,r).next((u=>{const d=this.bs(n,l);return this.Ds(n,d,a,u.readTime)?this.ps(e,Fx(n,null,"F")):this.vs(e,d,n,u)}))))})))))}ys(e,n,r,i){return L7(n)||i.isEqual(tt.min())?Ae.resolve(null):this.gs.getDocuments(e,r).next((s=>{const a=this.bs(n,s);return this.Ds(n,a,r,i)?Ae.resolve(null):(uh()<=Tt.DEBUG&&Ne("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),fh(n)),this.vs(e,a,n,Foe(i,Gg)).next((l=>l)))}))}bs(e,n){let r=new Un(sj(e));return n.forEach(((i,s)=>{c6(e,s)&&(r=r.add(s))})),r}Ds(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}ws(e,n,r){return uh()<=Tt.DEBUG&&Ne("QueryEngine","Using full collection scan to execute query:",fh(n)),this.gs.getDocumentsMatchingQuery(e,n,zl.min(),r)}
vendor: 1,687 bytes, lines 3278-3293
3278vs(e,n,r,i){return this.gs.getDocumentsMatchingQuery(e,r,i).next((s=>(n.forEach((a=>{s=s.insert(a.key,a)})),s)))}}/** 3279 * @license 3280 * Copyright 2020 Google LLC 3281 * 3282 * Licensed under the Apache License, Version 2.0 (the "License"); 3283 * you may not use this file except in compliance with the License. 3284 * You may obtain a copy of the License at 3285 * 3286 * http://www.apache.org/licenses/LICENSE-2.0 3287 * 3288 * Unless required by applicable law or agreed to in writing, software 3289 * distributed under the License is distributed on an "AS IS" BASIS, 3290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3291 * See the License for the specific language governing permissions and 3292 * limitations under the License. 3293 */const y_="LocalStore",wce=3e8;class vce{constructor(e,n,r,i){this.persistence=e,this.Cs=n,this.serializer=i,this.Fs=new on(lt),this.Ms=new od((s=>a_(s)),c_),this.xs=new Map,this.Os=e.getRemoteDocumentCache(),this.hi=e.getTargetCache(),this.Ti=e.getBundleCache(),this.Ns(r)}Ns(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new cce(this.Os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Os.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(n=>e.collect(n,this.Fs)))}}function Ace(t,e,n,r){return new vce(t,e,n,r)}async function kj(t,e){const n=nt(t);return await n.persistence.runTransaction("Handle user change","readonly",(r=>{let i;
3293return n.mutationQueue.getAllMutationBatches(r).next((s=>(i=s,n.Ns(e),n.mutationQueue.getAllMutationBatches(r)))).next((s=>{const a=[],l=[];let u=gt();for(const d of i){a.push(d.batchId);for(const h of d.mutations)u=u.add(h.key)}for(const d of s){l.push(d.batchId);for(const h of d.mutations)u=u.add(h.key)}return n.localDocuments.getDocuments(r,u).next((d=>({Bs:d,removedBatchIds:a,addedBatchIds:l})))}))}))}function Ece(t,e){const n=nt(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(r=>{const i=e.batch.keys(),s=n.Os.newChangeBuffer({trackRemovals:!0});return(function(l,u,d,h){const m=d.batch,g=m.keys();let w=Ae.resolve();return g.forEach((A=>{w=w.next((()=>h.getEntry(u,A))).next((v=>{const x=d.docVersions.get(A);Lt(x!==null,48541),v.version.compareTo(x)<0&&(m.applyToRemoteDocument(v,d),v.isValidDocument()&&(v.setReadTime(d.commitVersion),h.addEntry(v)))}))})),w.next((()=>l.mutationQueue.removeMutationBatch(u,m)))})(n,r,e,s).next((()=>s.apply(r))).next((()=>n.mutationQueue.performConsistencyCheck(r))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,(function(l){let u=gt();for(let d=0;d<l.mutationResults.length;++d)l.mutationResults[d].transformResults.length>0&&(u=u.add(l.batch.mutations[d].key));return u})(e)))).next((()=>n.localDocuments.getDocuments(r,i)))}))}function Nj(t){const e=nt(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(n=>e.hi.getLastRemoteSnapshotVersion(n)))}function xce(t,e){const n=nt(t),r=e.snapshotVersion;let i=n.Fs;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(s=>{const a=n.Os.newChangeBuffer({trackRemovals:!0});i=n.Fs;const l=[];
3293e.targetChanges.forEach(((h,m)=>{const g=i.get(m);if(!g)return;l.push(n.hi.removeMatchingKeys(s,h.removedDocuments,m).next((()=>n.hi.addMatchingKeys(s,h.addedDocuments,m))));let w=g.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(m)!==null?w=w.withResumeToken(yr.EMPTY_BYTE_STRING,tt.min()).withLastLimboFreeSnapshotVersion(tt.min()):h.resumeToken.approximateByteSize()>0&&(w=w.withResumeToken(h.resumeToken,r)),i=i.insert(m,w),(function(v,x,T){return v.resumeToken.approximateByteSize()===0||x.snapshotVersion.toMicroseconds()-v.snapshotVersion.toMicroseconds()>=wce?!0:T.addedDocuments.size+T.modifiedDocuments.size+T.removedDocuments.size>0})(g,w,h)&&l.push(n.hi.updateTargetData(s,w))}));let u=lc(),d=gt();if(e.documentUpdates.forEach((h=>{e.resolvedLimboDocuments.has(h)&&l.push(n.persistence.referenceDelegate.updateLimboDocument(s,h))})),l.push(Cce(s,a,e.documentUpdates).next((h=>{u=h.Ls,d=h.ks}))),!r.isEqual(tt.min())){const h=n.hi.getLastRemoteSnapshotVersion(s).next((m=>n.hi.setTargetsMetadata(s,s.currentSequenceNumber,r)));l.push(h)}return Ae.waitFor(l).next((()=>a.apply(s))).next((()=>n.localDocuments.getLocalViewOfDocuments(s,u,d))).next((()=>u))})).then((s=>(n.Fs=i,s)))}function Cce(t,e,n){let r=gt(),i=gt();return n.forEach((s=>r=r.add(s))),e.getEntries(t,r).next((s=>{let a=lc();return n.forEach(((l,u)=>{const d=s.get(l);u.isFoundDocument()!==d.isFoundDocument()&&(i=i.add(l)),u.isNoDocument()&&u.version.isEqual(tt.min())?(e.removeEntry(l,u.readTime),a=a.insert(l,u)):!d.isValidDocument()||u.version.compareTo(d.version)>0||u.version.compareTo(d.version)===0&&d.hasPendingWrites?(e.addEntry(u),a=a.insert(l,u)):Ne(y_,"Ignoring outdated watch update for ",l,". Current version:",d.version," Watch version:",u.version)})),{Ls:a,ks:i}}))}function _ce(t,e){const n=nt(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(r=>(e===void 0&&(e=i_),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e))))}function Tce(t,e){const n=nt(t);return n.persistence.runTransaction("Allocate target","readwrite",(r=>{let i;return n.hi.getTargetData(r,e).next((s=>s?(i=s,Ae.resolve(i)):n.hi.allocateTargetId(r).next((a=>(i=new Il(e,a,"TargetPurposeListen",r.currentSequenceNumber),n.hi.addTargetData(r,i).next((()=>i)))))))})).then((r=>{const i=n.Fs.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Fs=n.Fs.insert(r.targetId,r),n.Ms.set(e,r.targetId)),r}))}async function $x(t,e,n){const r=nt(t),i=r.Fs.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,(a=>r.persistence.referenceDelegate.removeTarget(a,i)))}catch(a){if(!A0(a))throw a;Ne(y_,`Failed to update sequence numbers for target ${e}: ${a}`)}r.Fs=r.Fs.remove(e),r.Ms.delete(i.target)}function J7(t,e,n){const r=nt(t);let i=tt.min(),s=gt();return r.persistence.runTransaction("Execute query","readwrite",(a=>(function(u,d,h){const m=nt(u),g=m.Ms.get(h);return g!==void 0?Ae.resolve(m.Fs.get(g)):m.hi.getTargetData(d,h)})(r,a,Do(e)).next((l=>{if(l)return i=l.lastLimboFreeSnapshotVersion,r.hi.getMatchingKeysForTargetId(a,l.targetId).next((u=>{s=u}))})).next((()=>r.Cs.getDocumentsMatchingQuery(a,e,n?i:tt.min(),n?s:gt()))).next((l=>(Sce(r,hae(e),l),{documents:l,qs:s})))))}function Sce(t,e,n){let r=t.xs.get(e)||tt.min();n.forEach(((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)})),t.xs.set(e,r)}class X7{constructor(){this.activeTargetIds=wae()}Gs(e){this.activeTargetIds=this.activeTargetIds.add(e)}zs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ws(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Ice{constructor(){this.Fo=new X7,this.Mo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e,n=!0){return n&&this.Fo.Gs(e),this.Mo[e]||"not-current"}updateQueryState(e,n,r){this.Mo[e]=n}removeLocalQueryTarget(e){this.Fo.zs(e)}isLocalQueryTarget(e){return this.Fo.activeTargetIds.has(e)}clearQueryState(e){delete this.Mo[e]}getAllActiveQueryTargets(){return this.Fo.activeTargetIds}isActiveQueryTarget(e){return this.Fo.activeTargetIds.has(e)}start(){return this.Fo=new X7,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** 3294 * @license 3295 * Copyright 2019 Google LLC 3296 * 3297 * Licensed under the Apache License, Version 2.0 (the "License");
3298 * you may not use this file except in compliance with the License. 3299 * You may obtain a copy of the License at 3300 * 3301 * http://www.apache.org/licenses/LICENSE-2.0 3302 * 3303 * Unless required by applicable law or agreed to in writing, software 3304 * distributed under the License is distributed on an "AS IS" BASIS, 3305 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3306 * See the License for the specific language governing permissions and 3307 * limitations under the License. 3308 */class Rce{xo(e){}shutdown(){}}/** 3309 * @license 3310 * Copyright 2019 Google LLC 3311 * 3312 * Licensed under the Apache License, Version 2.0 (the "License"); 3313 * you may not use this file except in compliance with the License. 3314 * You may obtain a copy of the License at 3315 * 3316 * http://www.apache.org/licenses/LICENSE-2.0 3317 * 3318 * Unless required by applicable law or agreed to in writing, software 3319 * distributed under the License is distributed on an "AS IS" BASIS, 3320 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3321 * See the License for the specific language governing permissions and 3322 * limitations under the License. 3323 */const Z7="ConnectivityMonitor";class e9{constructor(){this.Oo=()=>this.No(),this.Bo=()=>this.Lo(),this.ko=[],this.qo()}xo(e){this.ko.push(e)}shutdown(){window.removeEventListener("online",this.Oo),window.removeEventListener("offline",this.Bo)}qo(){window.addEventListener("online",this.Oo),window.addEventListener("offline",this.Bo)}No(){Ne(Z7,"Network connectivity changed: AVAILABLE");for(const e of this.ko)e(0)}Lo(){Ne(Z7,"Network connectivity changed: UNAVAILABLE");for(const e of this.ko)e(1)}static C(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 3324 * @license 3325 * Copyright 2023 Google LLC 3326 * 3327 * Licensed under the Apache License, Version 2.0 (the "License"); 3328 * you may not use this file except in compliance with the License. 3329 * You may obtain a copy of the License at 3330 * 3331 * http://www.apache.org/licenses/LICENSE-2.0 3332 * 3333 * Unless required by applicable law or agreed to in writing, software 3334 * distributed under the License is distributed on an "AS IS" BASIS, 3335 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3336 * See the License for the specific language governing permissions and 3337 * limitations under the License. 3338 */let Ub=null;function Gx(){return Ub===null?Ub=(function(){return 268435456+Math.round(2147483648*Math.random())})():Ub++,"0x"+Ub.toString(16)}/** 3339 * @license 3340 * Copyright 2020 Google LLC 3341 * 3342 * Licensed under the Apache License, Version 2.0 (the "License"); 3343 * you may not use this file except in compliance with the License. 3344 * You may obtain a copy of the License at 3345 * 3346 * http://www.apache.org/licenses/LICENSE-2.0 3347 * 3348 * Unless required by applicable law or agreed to in writing, software 3349 * distributed under the License is distributed on an "AS IS" BASIS, 3350 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3351 * See the License for the specific language governing permissions and 3352 * limitations under the License. 3353 */const $3="RestConnection",kce={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class Nce{get Qo(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const n=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.$o=n+"://"+e.host,this.Uo=`projects/${r}/databases/${i}`,this.Ko=this.databaseId.database===zw?`project_id=${r}`:`project_id=${r}&database_id=${i}`}Wo(e,n,r,i,s){const a=Gx(),l=this.Go(e,n.toUriEncodedString());Ne($3,`Sending RPC '${e}' ${a}:`,l,r);const u={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.Ko};this.zo(u,i,s);const{host:d}=new URL(l),h=X2(d);return this.jo(e,l,u,r,h).then((m=>(Ne($3,`Received RPC '${e}' ${a}: `,m),m)),(m=>{throw Vl($3,`RPC '${e}' ${a} failed with error: `,m,"url: ",l,"request:",r),m}))}Jo(e,n,r,i,s,a){return this.Wo(e,n,r,i,s)}zo(e,n,r){e["X-Goog-Api-Client"]=(function(){return"gl-js/ fire/"+w0})(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEac
vendor: 4,261 bytes, lines 3353-3383
3353h(((i,s)=>e[s]=i)),r&&r.headers.forEach(((i,s)=>e[s]=i))}Go(e,n){const r=kce[e];return`${this.$o}/v1/${n}:${r}`}terminate(){}}/** 3354 * @license 3355 * Copyright 2017 Google LLC 3356 * 3357 * Licensed under the Apache License, Version 2.0 (the "License"); 3358 * you may not use this file except in compliance with the License. 3359 * You may obtain a copy of the License at 3360 * 3361 * http://www.apache.org/licenses/LICENSE-2.0 3362 * 3363 * Unless required by applicable law or agreed to in writing, software 3364 * distributed under the License is distributed on an "AS IS" BASIS, 3365 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3366 * See the License for the specific language governing permissions and 3367 * limitations under the License. 3368 */class Oce{constructor(e){this.Ho=e.Ho,this.Yo=e.Yo}Zo(e){this.Xo=e}e_(e){this.t_=e}n_(e){this.r_=e}onMessage(e){this.i_=e}close(){this.Yo()}send(e){this.Ho(e)}s_(){this.Xo()}o_(){this.t_()}__(e){this.r_(e)}a_(e){this.i_(e)}}/** 3369 * @license 3370 * Copyright 2017 Google LLC 3371 * 3372 * Licensed under the Apache License, Version 2.0 (the "License"); 3373 * you may not use this file except in compliance with the License. 3374 * You may obtain a copy of the License at 3375 * 3376 * http://www.apache.org/licenses/LICENSE-2.0 3377 * 3378 * Unless required by applicable law or agreed to in writing, software 3379 * distributed under the License is distributed on an "AS IS" BASIS, 3380 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3381 * See the License for the specific language governing permissions and 3382 * limitations under the License. 3383 */const vr="WebChannelConnection";class Bce extends Nce{constructor(e){super(e),this.u_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}jo(e,n,r,i,s){const a=Gx();return new Promise(((l,u)=>{const d=new OM;d.setWithCredentials(!0),d.listenOnce(BM.COMPLETE,(()=>{try{switch(d.getLastErrorCode()){case rw.NO_ERROR:const m=d.getResponseJson();Ne(vr,`XHR for RPC '${e}' ${a} received:`,JSON.stringify(m)),l(m);break;case rw.TIMEOUT:Ne(vr,`RPC '${e}' ${a} timed out`),u(new je(xe.DEADLINE_EXCEEDED,"Request time out"));break;case rw.HTTP_ERROR:const g=d.getStatus();if(Ne(vr,`RPC '${e}' ${a} failed with status:`,g,"response text:",d.getResponseText()),g>0){let w=d.getResponseJson();Array.isArray(w)&&(w=w[0]);const A=w==null?void 0:w.error;if(A&&A.status&&A.message){const v=(function(T){const O=T.toLowerCase().replace(/_/g,"-");return Object.values(xe).indexOf(O)>=0?O:xe.UNKNOWN})(A.status);u(new je(v,A.message))}else u(new je(xe.UNKNOWN,"Server responded with status "+d.getStatus()))}else u(new je(xe.UNAVAILABLE,"Connection failed."));break;default:Xe(9055,{c_:e,streamId:a,l_:d.getLastErrorCode(),h_:d.getLastError()})}}finally{Ne(vr,`RPC '${e}' ${a} completed.`)}}));const h=JSON.stringify(i);Ne(vr,`RPC '${e}' ${a} sending request:`,i),d.send(n,"POST",h,r,15)}))}P_(e,n,r){const i=Gx(),s=[this.$o,"/","google.firestore.v1.Firestore","/",e,"/channel"],a=MM(),l=DM(),u={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},d=this.longPollingOptions.timeoutSeconds;d!==void 0&&(u.longPollingTimeout=Math.round(1e3*d)),this.useFetchStreams&&(u.useFetchStreams=!0),this.zo(u.initMessageHeaders,n,r),u.encodeInitMessageHeaders=!0;const h=s.join("");Ne(vr,`Creating RPC '${e}' stream ${i}: ${h}`,u);const m=a.createWebChannel(h,u);this.T_(m);let g=!1,w=!1;const A=new Oce({Ho:x=>{w?Ne(vr,`Not sending because RPC '${e}' stream ${i} is closed:`,x):(g||(Ne(vr,`Opening RPC '${e}' stream ${i} transport.`),m.open(),g=!0),Ne(vr,`RPC '${e}' stream ${i} sending:`,x),m.send(x))},Yo:()=>m.close()}),v=(x,T,O)=>{x.listen(T,(k=>{try{O(k)}catch(P){setTimeout((()=>{throw P}),0)}}))};return v(m,Qm.EventType.OPEN,(()=>{w||(Ne(vr,`RPC '${e}' stream ${i} transport opened.`),A.s_())})),v(m,Qm.EventType.CLOSE,(()=>{w||(w=!0,Ne(vr,`RPC '${e}' stream ${i} transport closed`),A.__(),this.I_(m))}
3383)),v(m,Qm.EventType.ERROR,(x=>{w||(w=!0,Vl(vr,`RPC '${e}' stream ${i} transport errored. Name:`,x.name,"Message:",x.message),A.__(new je(xe.UNAVAILABLE,"The operation could not be completed")))})),v(m,Qm.EventType.MESSAGE,(x=>{var T;if(!w){const O=x.data[0];Lt(!!O,16349);const k=O,P=(k==null?void 0:k.error)||((T=k[0])===null||T===void 0?void 0:T.error);if(P){Ne(vr,`RPC '${e}' stream ${i} received error:`,P);const B=P.status;let U=(function(M){const F=xn[M];if(F!==void 0)return bj(F)})(B),I=P.message;U===void 0&&(U=xe.INTERNAL,I="Unknown error status: "+B+" with message "+P.message),w=!0,A.__(new je(U,I)),m.close()}else Ne(vr,`RPC '${e}' stream ${i} received:`,O),A.a_(O)}})),v(l,PM.STAT_EVENT,(x=>{x.stat===Px.PROXY?Ne(vr,`RPC '${e}' stream ${i} detected buffering proxy`):x.stat===Px.NOPROXY&&Ne(vr,`RPC '${e}' stream ${i} detected no buffering proxy`)})),setTimeout((()=>{A.o_()}),0),A}terminate(){this.u_.forEach((e=>e.close())),this.u_=[]}T_(e){this.u_.push(e)}I_(e){this.u_=this.u_.filter((n=>n===e))}}function G3(){return typeof document<"u"?document:null}/** 3384 * @license 3385 * Copyright 2020 Google LLC 3386 * 3387 * Licensed under the Apache License, Version 2.0 (the "License"); 3388 * you may not use this file except in compliance with the License. 3389 * You may obtain a copy of the License at 3390 * 3391 * http://www.apache.org/licenses/LICENSE-2.0 3392 * 3393 * Unless required by applicable law or agreed to in writing, software 3394 * distributed under the License is distributed on an "AS IS" BASIS, 3395 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3396 * See the License for the specific language governing permissions and 3397 * limitations under the License. 3398 */function d6(t){return new jae(t,!0)}/** 3399 * @license 3400 * Copyright 2017 Google LLC 3401 * 3402 * Licensed under the Apache License, Version 2.0 (the "License"); 3403 * you may not use this file except in compliance with the License. 3404 * You may obtain a copy of the License at 3405 * 3406 * http://www.apache.org/licenses/LICENSE-2.0 3407 * 3408 * Unless required by applicable law or agreed to in writing, software 3409 * distributed under the License is distributed on an "AS IS" BASIS, 3410 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3411 * See the License for the specific language governing permissions and 3412 * limitations under the License. 3413 */class Oj{constructor(e,n,r=1e3,i=1.5,s=6e4){this.Fi=e,this.timerId=n,this.d_=r,this.E_=i,this.A_=s,this.R_=0,this.V_=null,this.m_=Date.now(),this.reset()}reset(){this.R_=0}f_(){this.R_=this.A_}g_(e){this.cancel();const n=Math.floor(this.R_+this.p_()),r=Math.max(0,Date.now()-this.m_),i=Math.max(0,n-r);i>0&&Ne("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.R_} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.V_=this.Fi.enqueueAfterDelay(this.timerId,i,(()=>(this.m_=Date.now(),e()))),this.R_*=this.E_,this.R_<this.d_&&(this.R_=this.d_),this.R_>this.A_&&(this.R_=this.A_)}y_(){this.V_!==null&&(this.V_.skipDelay(),this.V_=null)}cancel(){this.V_!==null&&(this.V_.cancel(),this.V_=null)}p_(){return(Math.random()-.5)*this.R_}}/** 3414 * @license 3415 * Copyright 2017 Google LLC 3416 * 3417 * Licensed under the Apache License, Version 2.0 (the "License"); 3418 * you may not use this file except in compliance with the License. 3419 * You may obtain a copy of the License at 3420 * 3421 * http://www.apache.org/licenses/LICENSE-2.0 3422 * 3423 * Unless required by applicable law or agreed to in writing, software 3424 * distributed under the License is distributed on an "AS IS" BASIS, 3425 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3426 * See the License for the specific language governing permissions and 3427 * limitations under the License. 3428 */const t9="PersistentStream";class Bj{constructor(e,n,r,i,s,a,l,u){this.Fi=e,this.w_=r,this.S_=i,this.connection=s,this.authCredentialsProvider=a,this.appCheckCredentialsProvider=l,this.listener=u,this.state=0,this.b_=0,this.D_=null,this.v_=null,this.stream=null,this.C_=0,this.F_=new Oj(e,n)}M_(){return this.state===1||this.state===5||this.x_()}x_(){return this.state===2||this.state===3}start(){this.C_=0,this.state!==4?this.auth():this.O_()}async stop(){this.M_()&&await this.close(0)}N_(){this.state=0,this.F_.reset()}B_(){this.x_()&&this.D_===null&&(this.D_=this.Fi.enqueueAfterDelay(this.w_,6e4,(()=>this.L_())))}k_(e){this.q_(),this.stream.send(e)}async L_(){if(this.x_())return this.close(0)}q_(){this.D_&&(this.D_.cancel(),this.D_=null)}Q_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,n){this.q_(),this.Q_(),this.F_.cancel(),this.b_++,e!==4?this.F_.reset():n&&n.code===xe.RESOURCE_EXHAUSTED?(cc(n.toString()),cc("Using maximum backoff delay to prevent overloading the backend."),this.F_.f_()):n&&n.code===xe.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.U_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.n_(n)}U_(){}auth(){this.state=1;const e=this.K_(this.b_),n=this.b_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([r,i])=>{this.b_===n&&this.W_(r,i)}),(r=>{e((()=>{const i=new je(xe.UNKNOWN,"Fetching auth token failed: "+r.message);return this.G_(i)}))}))}W_(e,n){const r=this.K_(this.b_);this.stream=this.z_(e,n),this.stream.Zo((()=>{r((()=>this.listener.Zo()))})),this.stream.e_((()=>{r((()=>(this.state=2,this.v_=this.Fi.enqueueAfterDelay(this.S_,1e4,(()=>(this.x_()&&(this.state=3),Promise.resolve()))),this.listener.e_())))})),this.stream.n_((i=>{r((()=>this.G_(i)))})),this.stream.onMessage((i=>{r((()=>++this.C_==1?this.j_(i):this.onNext(i)))}))}O_(){this.state=5,this.F_.g_((async()=>{this.state=0,this.start()}))}G_(e){return Ne(t9,`close with error: ${e}`),this.stream=null,this.close(4,e)}K_(e){return n=>{this.Fi.enqueueAndForget((()=>this.b_===e?n():(Ne(t9,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Pce extends Bj{constructor(e,n,r,i,s,a){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,a),this.serializer
3428=s}z_(e,n){return this.connection.P_("Listen",e,n)}j_(e){return this.onNext(e)}onNext(e){this.F_.reset();const n=Fae(this.serializer,e),r=(function(s){if(!("targetChange"in s))return tt.min();const a=s.targetChange;return a.targetIds&&a.targetIds.length?tt.min():a.readTime?Mo(a.readTime):tt.min()})(e);return this.listener.J_(n,r)}H_(e){const n={};n.database=qx(this.serializer),n.addTarget=(function(s,a){let l;const u=a.target;if(l=Ux(u)?{documents:Hae(s,u)}:{query:qae(s,u).Vt},l.targetId=a.targetId,a.resumeToken.approximateByteSize()>0){l.resumeToken=Aj(s,a.resumeToken);const d=Vx(s,a.expectedCount);d!==null&&(l.expectedCount=d)}else if(a.snapshotVersion.compareTo(tt.min())>0){l.readTime=Qw(s,a.snapshotVersion.toTimestamp());const d=Vx(s,a.expectedCount);d!==null&&(l.expectedCount=d)}return l})(this.serializer,e);const r=Gae(this.serializer,e);r&&(n.labels=r),this.k_(n)}Y_(e){const n={};n.database=qx(this.serializer),n.removeTarget=e,this.k_(n)}}class Dce extends Bj{constructor(e,n,r,i,s,a){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,a),this.serializer=s}get Z_(){return this.C_>0}start(){this.lastStreamToken=void 0,super.start()}U_(){this.Z_&&this.X_([])}z_(e,n){return this.connection.P_("Write",e,n)}j_(e){return Lt(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,Lt(!e.writeResults||e.writeResults.length===0,55816),this.listener.ea()}onNext(e){Lt(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.F_.reset();const n=zae(e.writeResults,e.commitTime),r=Mo(e.commitTime);return this.listener.ta(r,n)}na(){const e={};e.database=qx(this.serializer),this.k_(e)}X_(e){const n={streamToken:this.lastStreamToken,writes:e.map((r=>Vae(this.serializer,r)))};this.k_(n)}}/** 3429 * @license 3430 * Copyright 2017 Google LLC 3431 * 3432 * Licensed under the Apache License, Version 2.0 (the "License"); 3433 * you may not use this file except in compliance with the License. 3434 * You may obtain a copy of the License at 3435 * 3436 * http://www.apache.org/licenses/LICENSE-2.0 3437 * 3438 * Unless required by applicable law or agreed to in writing, software 3439 * distributed under the License is distributed on an "AS IS" BASIS, 3440 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3441 * See the License for the specific language governing permissions and 3442 * limitations under the License. 3443 */class Mce{}class jce extends Mce{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.ra=!1}ia(){if(this.ra)throw new je(xe.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(e,n,r,i){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([s,a])=>this.connection.Wo(e,zx(n,r),i,s,a))).catch((s=>{throw s.name==="FirebaseError"?(s.code===xe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new je(xe.UNKNOWN,s.toString())}))}Jo(e,n,r,i,s){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([a,l])=>this.connection.Jo(e,zx(n,r),i,a,l,s))).catch((a=>{throw a.name==="FirebaseError"?(a.code===xe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),a):new je(xe.UNKNOWN,a.toString())}))}terminate(){this.ra=!0,this.connection.terminate()}}class Lce{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.sa=0,this.oa=null,this._a=!0}aa(){this.sa===0&&(this.ua("Unknown"),this.oa=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.oa=null,this.ca("Backend didn't respond within 10 seconds."),this.ua("Offline"),Promise.resolve()))))}la(e){this.state==="Online"?this.ua("Unknown"):(this.sa++,this.sa>=1&&(this.ha(),this.ca(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ua("Offline")))}set(e){this.ha(),this.sa=0,e==="Online"&&(this._a=!1),this.ua(e)}ua(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ca(e){const n=`Could not reach Cloud Firestore backend. ${e} 3444This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this._a?(cc(n),this._a=!1):Ne("OnlineStateTracker",n)}ha(){this.oa!==null&&(this.oa.cancel(),this.oa=null)}}/** 3445 * @license 3446 * Copyright 2017 Google LLC 3447 * 3448 * Licensed under the Apache License, Version 2.0 (the "License");
3449 * you may not use this file except in compliance with the License. 3450 * You may obtain a copy of the License at 3451 * 3452 * http://www.apache.org/licenses/LICENSE-2.0 3453 * 3454 * Unless required by applicable law or agreed to in writing, software 3455 * distributed under the License is distributed on an "AS IS" BASIS, 3456 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3457 * See the License for the specific language governing permissions and 3458 * limitations under the License. 3459 */const Kf="RemoteStore";class Uce{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Pa=[],this.Ta=new Map,this.Ia=new Set,this.da=[],this.Ea=s,this.Ea.xo((a=>{r.enqueueAndForget((async()=>{ad(this)&&(Ne(Kf,"Restarting streams for network reachability change."),await(async function(u){const d=nt(u);d.Ia.add(4),await Gy(d),d.Aa.set("Unknown"),d.Ia.delete(4),await h6(d)})(this))}))})),this.Aa=new Lce(r,i)}}async function h6(t){if(ad(t))for(const e of t.da)await e(!0)}async function Gy(t){for(const e of t.da)await e(!1)}function Pj(t,e){const n=nt(t);n.Ta.has(e.targetId)||(n.Ta.set(e.targetId,e),A_(n)?v_(n):E0(n).x_()&&w_(n,e))}function b_(t,e){const n=nt(t),r=E0(n);n.Ta.delete(e),r.x_()&&Dj(n,e),n.Ta.size===0&&(r.x_()?r.B_():ad(n)&&n.Aa.set("Unknown"))}function w_(t,e){if(t.Ra.$e(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(tt.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}E0(t).H_(e)}function Dj(t,e){t.Ra.$e(e),E0(t).Y_(e)}function v_(t){t.Ra=new Bae({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),Et:e=>t.Ta.get(e)||null,lt:()=>t.datastore.serializer.databaseId}),E0(t).start(),t.Aa.aa()}function A_(t){return ad(t)&&!E0(t).M_()&&t.Ta.size>0}function ad(t){return nt(t).Ia.size===0}function Mj(t){t.Ra=void 0}async function Fce(t){t.Aa.set("Online")}async function Vce(t){t.Ta.forEach(((e,n)=>{w_(t,e)}))}async function zce(t,e){Mj(t),A_(t)?(t.Aa.la(e),v_(t)):t.Aa.set("Unknown")}async function Hce(t,e,n){if(t.Aa.set("Online"),e instanceof vj&&e.state===2&&e.cause)try{await(async function(i,s){const a=s.cause;for(const l of s.targetIds)i.Ta.has(l)&&(await i.remoteSyncer.rejectListen(l,a),i.Ta.delete(l),i.Ra.removeTarget(l))})(t,e)}catch(r){Ne(Kf,"Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Ww(t,r)}else if(e instanceof aw?t.Ra.Ye(e):e instanceof wj?t.Ra.it(e):t.Ra.et(e),!n.isEqual(tt.min()))try{const r=await Nj(t.localStore);n.compareTo(r)>=0&&await(function(s,a){const l=s.Ra.Pt(a);
3459return l.targetChanges.forEach(((u,d)=>{if(u.resumeToken.approximateByteSize()>0){const h=s.Ta.get(d);h&&s.Ta.set(d,h.withResumeToken(u.resumeToken,a))}})),l.targetMismatches.forEach(((u,d)=>{const h=s.Ta.get(u);if(!h)return;s.Ta.set(u,h.withResumeToken(yr.EMPTY_BYTE_STRING,h.snapshotVersion)),Dj(s,u);const m=new Il(h.target,u,d,h.sequenceNumber);w_(s,m)})),s.remoteSyncer.applyRemoteEvent(l)})(t,n)}catch(r){Ne(Kf,"Failed to raise snapshot:",r),await Ww(t,r)}}async function Ww(t,e,n){if(!A0(e))throw e;t.Ia.add(1),await Gy(t),t.Aa.set("Offline"),n||(n=()=>Nj(t.localStore)),t.asyncQueue.enqueueRetryable((async()=>{Ne(Kf,"Retrying IndexedDB access"),await n(),t.Ia.delete(1),await h6(t)}))}function jj(t,e){return e().catch((n=>Ww(t,n,e)))}async function p6(t){const e=nt(t),n=Gl(e);let r=e.Pa.length>0?e.Pa[e.Pa.length-1].batchId:i_;for(;qce(e);)try{const i=await _ce(e.localStore,r);if(i===null){e.Pa.length===0&&n.B_();break}r=i.batchId,$ce(e,i)}catch(i){await Ww(e,i)}Lj(e)&&Uj(e)}function qce(t){return ad(t)&&t.Pa.length<10}function $ce(t,e){t.Pa.push(e);const n=Gl(t);n.x_()&&n.Z_&&n.X_(e.mutations)}function Lj(t){return ad(t)&&!Gl(t).M_()&&t.Pa.length>0}function Uj(t){Gl(t).start()}async function Gce(t){Gl(t).na()}async function Qce(t){const e=Gl(t);for(const n of t.Pa)e.X_(n.mutations)}async function Kce(t,e,n){const r=t.Pa.shift(),i=f_.from(r,e,n);await jj(t,(()=>t.remoteSyncer.applySuccessfulWrite(i))),await p6(t)}async function Wce(t,e){e&&Gl(t).Z_&&await(async function(r,i){if((function(a){return Nae(a)&&a!==xe.ABORTED})(i.code)){const s=r.Pa.shift();Gl(r).N_(),await jj(r,(()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i))),await p6(r)}})(t,e),Lj(t)&&Uj(t)}async function n9(t,e){const n=nt(t);n.asyncQueue.verifyOperationInProgress(),Ne(Kf,"RemoteStore received new credentials");const r=ad(n);n.Ia.add(3),await Gy(n),r&&n.Aa.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.Ia.delete(3),await h6(n)}async function Yce(t,e){const n=nt(t);e?(n.Ia.delete(2),await h6(n)):e||(n.Ia.add(2),await Gy(n),n.Aa.set("Unknown"))}
vendor: 4,445 bytes, lines 3459-3496
3459function E0(t){return t.Va||(t.Va=(function(n,r,i){const s=nt(n);return s.ia(),new Pce(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)})(t.datastore,t.asyncQueue,{Zo:Fce.bind(null,t),e_:Vce.bind(null,t),n_:zce.bind(null,t),J_:Hce.bind(null,t)}),t.da.push((async e=>{e?(t.Va.N_(),A_(t)?v_(t):t.Aa.set("Unknown")):(await t.Va.stop(),Mj(t))}))),t.Va}function Gl(t){return t.ma||(t.ma=(function(n,r,i){const s=nt(n);return s.ia(),new Dce(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)})(t.datastore,t.asyncQueue,{Zo:()=>Promise.resolve(),e_:Gce.bind(null,t),n_:Wce.bind(null,t),ea:Qce.bind(null,t),ta:Kce.bind(null,t)}),t.da.push((async e=>{e?(t.ma.N_(),await p6(t)):(await t.ma.stop(),t.Pa.length>0&&(Ne(Kf,`Stopping write stream with ${t.Pa.length} pending writes`),t.Pa=[]))}))),t.ma}/** 3460 * @license 3461 * Copyright 2017 Google LLC 3462 * 3463 * Licensed under the Apache License, Version 2.0 (the "License"); 3464 * you may not use this file except in compliance with the License. 3465 * You may obtain a copy of the License at 3466 * 3467 * http://www.apache.org/licenses/LICENSE-2.0 3468 * 3469 * Unless required by applicable law or agreed to in writing, software 3470 * distributed under the License is distributed on an "AS IS" BASIS, 3471 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3472 * See the License for the specific language governing permissions and 3473 * limitations under the License. 3474 */class E_{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Za,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((a=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const a=Date.now()+r,l=new E_(e,n,a,i,s);return l.start(r),l}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new je(xe.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function x_(t,e){if(cc("AsyncQueue",`${e}: ${t}`),A0(t))return new je(xe.UNAVAILABLE,`${e}: ${t}`);throw t}/** 3475 * @license 3476 * Copyright 2017 Google LLC 3477 * 3478 * Licensed under the Apache License, Version 2.0 (the "License"); 3479 * you may not use this file except in compliance with the License. 3480 * You may obtain a copy of the License at 3481 * 3482 * http://www.apache.org/licenses/LICENSE-2.0 3483 * 3484 * Unless required by applicable law or agreed to in writing, software 3485 * distributed under the License is distributed on an "AS IS" BASIS, 3486 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3487 * See the License for the specific language governing permissions and 3488 * limitations under the License. 3489 */class Oh{static emptySet(e){return new Oh(e.comparator)}constructor(e){this.comparator=e?(n,r)=>e(n,r)||Ge.comparator(n.key,r.key):(n,r)=>Ge.comparator(n.key,r.key),this.keyedMap=Km(),this.sortedSet=new on(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((n,r)=>(e(n),!1)))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof Oh)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach((n=>{e.push(n.toString())})),e.length===0?"DocumentSet ()":`DocumentSet ( 3490 `+e.join(` 3491`)+` 3492)`}copy(e,n){const r=new Oh;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** 3493 * @license 3494 * Copyright 2017 Google LLC 3495 * 3496 * Licensed under the Apache License, Version 2.0 (the "License");
3497 * you may not use this file except in compliance with the License. 3498 * You may obtain a copy of the License at 3499 * 3500 * http://www.apache.org/licenses/LICENSE-2.0 3501 * 3502 * Unless required by applicable law or agreed to in writing, software 3503 * distributed under the License is distributed on an "AS IS" BASIS, 3504 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3505 * See the License for the specific language governing permissions and 3506 * limitations under the License. 3507 */class r9{constructor(){this.fa=new on(Ge.comparator)}track(e){const n=e.doc.key,r=this.fa.get(n);r?e.type!==0&&r.type===3?this.fa=this.fa.insert(n,e):e.type===3&&r.type!==1?this.fa=this.fa.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.fa=this.fa.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.fa=this.fa.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.fa=this.fa.remove(n):e.type===1&&r.type===2?this.fa=this.fa.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.fa=this.fa.insert(n,{type:2,doc:e.doc}):Xe(63341,{At:e,ga:r}):this.fa=this.fa.insert(n,e)}pa(){const e=[];return this.fa.inorderTraversal(((n,r)=>{e.push(r)})),e}}class Zp{constructor(e,n,r,i,s,a,l,u,d){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=a,this.syncStateChanged=l,this.excludesMetadataChanges=u,this.hasCachedResults=d}static fromInitialDocuments(e,n,r,i,s){const a=[];return n.forEach((l=>{a.push({type:0,doc:l})})),new Zp(e,n,Oh.emptySet(n),a,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&a6(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!0}}/** 3508 * @license 3509 * Copyright 2017 Google LLC 3510 * 3511 * Licensed under the Apache License, Version 2.0 (the "License"); 3512 * you may not use this file except in compliance with the License. 3513 * You may obtain a copy of the License at 3514 * 3515 * http://www.apache.org/licenses/LICENSE-2.0 3516 * 3517 * Unless required by applicable law or agreed to in writing, software 3518 * distributed under the License is distributed on an "AS IS" BASIS, 3519 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3520 * See the License for the specific language governing permissions and 3521 * limitations under the License. 3522 */class Jce{constructor(){this.ya=void 0,this.wa=[]}Sa(){return this.wa.some((e=>e.ba()))}}class Xce{constructor(){this.queries=i9(),this.onlineState="Unknown",this.Da=new Set}terminate(){(function(n,r){const i=nt(n),s=i.queries;i.queries=i9(),s.forEach(((a,l)=>{for(const u of l.wa)u.onError(r)}))})(this,new je(xe.ABORTED,"Firestore shutting down"))}}function i9(){return new od((t=>ij(t)),a6)}async function Fj(t,e){const n=nt(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.Sa()&&e.ba()&&(r=2):(s=new Jce,r=e.ba()?0:1);try{switch(r){case 0:s.ya=await n.onListen(i,!0);break;case 1:s.ya=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(a){const l=x_(a,`Initialization of query '${fh(e.query)}' failed`);return void e.onError(l)}n.queries.set(i,s),s.wa.push(e),e.va(n.onlineState),s.ya&&e.Ca(s.ya)&&C_(n)}async function Vj(t,e){const n=nt(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const a=s.wa.indexOf(e);a>=0&&(s.wa.splice(a,1),s.wa.length===0?i=e.ba()?0:1:!s.Sa()&&e.ba()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function Zce(t,e){const n=nt(t);let r=!1;for(const i of e){const s=i.query,a=n.queries.get(s);if(a){for(const l of a.wa)l.Ca(i)&&(r=!0);a.ya=i}}r&&C_(n)}function ele(t,e,n){const r=nt(t),i=r.queries.get(e);if(i)for(const s of i.wa)s.onError(n);r.queries.delete(e)}
3522function C_(t){t.Da.forEach((e=>{e.next()}))}var Qx,s9;(s9=Qx||(Qx={})).Fa="default",s9.Cache="cache";class zj{constructor(e,n,r){this.query=e,this.Ma=n,this.xa=!1,this.Oa=null,this.onlineState="Unknown",this.options=r||{}}Ca(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new Zp(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.xa?this.Na(e)&&(this.Ma.next(e),n=!0):this.Ba(e,this.onlineState)&&(this.La(e),n=!0),this.Oa=e,n}onError(e){this.Ma.error(e)}va(e){this.onlineState=e;let n=!1;return this.Oa&&!this.xa&&this.Ba(this.Oa,e)&&(this.La(this.Oa),n=!0),n}Ba(e,n){if(!e.fromCache||!this.ba())return!0;const r=n!=="Offline";return(!this.options.ka||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}Na(e){if(e.docChanges.length>0)return!0;const n=this.Oa&&this.Oa.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}La(e){e=Zp.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.xa=!0,this.Ma.next(e)}ba(){return this.options.source!==Qx.Cache}}/** 3523 * @license 3524 * Copyright 2017 Google LLC 3525 * 3526 * Licensed under the Apache License, Version 2.0 (the "License"); 3527 * you may not use this file except in compliance with the License. 3528 * You may obtain a copy of the License at 3529 * 3530 * http://www.apache.org/licenses/LICENSE-2.0 3531 * 3532 * Unless required by applicable law or agreed to in writing, software 3533 * distributed under the License is distributed on an "AS IS" BASIS, 3534 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3535 * See the License for the specific language governing permissions and 3536 * limitations under the License. 3537 */class Hj{constructor(e){this.key=e}}class qj{constructor(e){this.key=e}}class tle{constructor(e,n){this.query=e,this.Ha=n,this.Ya=null,this.hasCachedResults=!1,this.current=!1,this.Za=gt(),this.mutatedKeys=gt(),this.Xa=sj(e),this.eu=new Oh(this.Xa)}get tu(){return this.Ha}nu(e,n){const r=n?n.ru:new r9,i=n?n.eu:this.eu;let s=n?n.mutatedKeys:this.mutatedKeys,a=i,l=!1;const u=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,d=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal(((h,m)=>{const g=i.get(h),w=c6(this.query,m)?m:null,A=!!g&&this.mutatedKeys.has(g.key),v=!!w&&(w.hasLocalMutations||this.mutatedKeys.has(w.key)&&w.hasCommittedMutations);let x=!1;g&&w?g.data.isEqual(w.data)?A!==v&&(r.track({type:3,doc:w}),x=!0):this.iu(g,w)||(r.track({type:2,doc:w}),x=!0,(u&&this.Xa(w,u)>0||d&&this.Xa(w,d)<0)&&(l=!0)):!g&&w?(r.track({type:0,doc:w}),x=!0):g&&!w&&(r.track({type:1,doc:g}),x=!0,(u||d)&&(l=!0)),x&&(w?(a=a.add(w),s=v?s.add(h):s.delete(h)):(a=a.delete(h),s=s.delete(h)))})),this.query.limit!==null)for(;a.size>this.query.limit;){const h=this.query.limitType==="F"?a.last():a.first();a=a.delete(h.key),s=s.delete(h.key),r.track({type:1,doc:h})}return{eu:a,ru:r,Ds:l,mutatedKeys:s}}iu(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r,i){const s=this.eu;this.eu=e.eu,this.mutatedKeys=e.mutatedKeys;const a=e.ru.pa();a.sort(((h,m)=>(function(w,A){const v=x=>{switch(x){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Xe(20277,{At:x})}};return v(w)-v(A)})(h.type,m.type)||this.Xa(h.doc,m.doc))),this.su(r),i=i!=null&&i;const l=n&&!i?this.ou():[],u=this.Za.size===0&&this.current&&!i?1:0,d=u!==this.Ya;return this.Ya=u,a.length!==0||d?{snapshot:new Zp(this.query,e.eu,s,a,e.mutatedKeys,u===0,d,!1,!!r&&r.resumeToken.approximateByteSize()>0),_u:l}:{_u:l}}va(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({eu:this.eu,ru:new r9,mutatedKeys:this.mutatedKeys,Ds:!1},!1)):{_u:[]}}au(e){return!this.Ha.has(e)&&!!this.eu.has(e)&&!this.eu.get(e).hasLocalMutations}su(e){e&&(e.addedDocuments.forEach((n=>this.Ha=this.Ha.add(n))),e.modifiedDocuments.forEach((n=>{})),e.removedDocuments.forEach((n=>this.Ha=this.Ha.delete(n))),this.current=e.current)}ou(){if(!this.current)return[];const e=this.Za;this.Za=gt(),this.eu.forEach((r=>{this.au(r.key)&&(this.Za=this.Za.add(r.key))}
3537));const n=[];return e.forEach((r=>{this.Za.has(r)||n.push(new qj(r))})),this.Za.forEach((r=>{e.has(r)||n.push(new Hj(r))})),n}uu(e){this.Ha=e.qs,this.Za=gt();const n=this.nu(e.documents);return this.applyChanges(n,!0)}cu(){return Zp.fromInitialDocuments(this.query,this.eu,this.mutatedKeys,this.Ya===0,this.hasCachedResults)}}const __="SyncEngine";class nle{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class rle{constructor(e){this.key=e,this.lu=!1}}class ile{constructor(e,n,r,i,s,a){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=a,this.hu={},this.Pu=new od((l=>ij(l)),a6),this.Tu=new Map,this.Iu=new Set,this.du=new on(Ge.comparator),this.Eu=new Map,this.Au=new p_,this.Ru={},this.Vu=new Map,this.mu=Xp.ur(),this.onlineState="Unknown",this.fu=void 0}get isPrimaryClient(){return this.fu===!0}}async function sle(t,e,n=!0){const r=Yj(t);let i;const s=r.Pu.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.cu()):i=await $j(r,e,n,!0),i}async function ole(t,e){const n=Yj(t);await $j(n,e,!0,!1)}async function $j(t,e,n,r){const i=await Tce(t.localStore,Do(e)),s=i.targetId,a=t.sharedClientState.addLocalQueryTarget(s,n);let l;return r&&(l=await ale(t,e,s,a==="current",i.resumeToken)),t.isPrimaryClient&&n&&Pj(t.remoteStore,i),l}async function ale(t,e,n,r,i){t.gu=(m,g,w)=>(async function(v,x,T,O){let k=x.view.nu(T);k.Ds&&(k=await J7(v.localStore,x.query,!1).then((({documents:I})=>x.view.nu(I,k))));const P=O&&O.targetChanges.get(x.targetId),B=O&&O.targetMismatches.get(x.targetId)!=null,U=x.view.applyChanges(k,v.isPrimaryClient,P,B);return a9(v,x.targetId,U._u),U.snapshot})(t,m,g,w);const s=await J7(t.localStore,e,!0),a=new tle(e,s.qs),l=a.nu(s.documents),u=$y.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),d=a.applyChanges(l,t.isPrimaryClient,u);a9(t,n,d._u);const h=new nle(e,n,a);return t.Pu.set(e,h),t.Tu.has(n)?t.Tu.get(n).push(e):t.Tu.set(n,[e]),d.snapshot}async function cle(t,e,n){const r=nt(t),i=r.Pu.get(e),s=r.Tu.get(i.targetId);if(s.length>1)return r.Tu.set(i.targetId,s.filter((a=>!a6(a,e)))),void r.Pu.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
3537ientState.isActiveQueryTarget(i.targetId)||await $x(r.localStore,i.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(i.targetId),n&&b_(r.remoteStore,i.targetId),Kx(r,i.targetId)})).catch(v0)):(Kx(r,i.targetId),await $x(r.localStore,i.targetId,!0))}async function lle(t,e){const n=nt(t),r=n.Pu.get(e),i=n.Tu.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),b_(n.remoteStore,r.targetId))}async function ule(t,e,n){const r=yle(t);try{const i=await(function(a,l){const u=nt(a),d=Xt.now(),h=l.reduce(((w,A)=>w.add(A.key)),gt());let m,g;return u.persistence.runTransaction("Locally write mutations","readwrite",(w=>{let A=lc(),v=gt();return u.Os.getEntries(w,h).next((x=>{A=x,A.forEach(((T,O)=>{O.isValidDocument()||(v=v.add(T))}))})).next((()=>u.localDocuments.getOverlayedDocuments(w,A))).next((x=>{m=x;const T=[];for(const O of l){const k=Tae(O,m.get(O.key).overlayedDocument);k!=null&&T.push(new Zl(O.key,k,JM(k.value.mapValue),Us.exists(!0)))}return u.mutationQueue.addMutationBatch(w,d,T,l)})).next((x=>{g=x;const T=x.applyToLocalDocumentSet(m,v);return u.documentOverlayCache.saveOverlays(w,x.batchId,T)}))})).then((()=>({batchId:g.batchId,changes:aj(m)})))})(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),(function(a,l,u){let d=a.Ru[a.currentUser.toKey()];d||(d=new on(lt)),d=d.insert(l,u),a.Ru[a.currentUser.toKey()]=d})(r,i.batchId,n),await Qy(r,i.changes),await p6(r.remoteStore)}catch(i){const s=x_(i,"Failed to persist write");n.reject(s)}}async function Gj(t,e){const n=nt(t);try{const r=await xce(n.localStore,e);
3537e.targetChanges.forEach(((i,s)=>{const a=n.Eu.get(s);a&&(Lt(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1,22616),i.addedDocuments.size>0?a.lu=!0:i.modifiedDocuments.size>0?Lt(a.lu,14607):i.removedDocuments.size>0&&(Lt(a.lu,42227),a.lu=!1))})),await Qy(n,r,e)}catch(r){await v0(r)}}function o9(t,e,n){const r=nt(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.Pu.forEach(((s,a)=>{const l=a.view.va(e);l.snapshot&&i.push(l.snapshot)})),(function(a,l){const u=nt(a);u.onlineState=l;let d=!1;u.queries.forEach(((h,m)=>{for(const g of m.wa)g.va(l)&&(d=!0)})),d&&C_(u)})(r.eventManager,e),i.length&&r.hu.J_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function fle(t,e,n){const r=nt(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Eu.get(e),s=i&&i.key;if(s){let a=new on(Ge.comparator);a=a.insert(s,_r.newNoDocument(s,tt.min()));const l=gt().add(s),u=new f6(tt.min(),new Map,new on(lt),a,l);await Gj(r,u),r.du=r.du.remove(s),r.Eu.delete(e),T_(r)}else await $x(r.localStore,e,!1).then((()=>Kx(r,e,n))).catch(v0)}async function dle(t,e){const n=nt(t),r=e.batch.batchId;try{const i=await Ece(n.localStore,e);Kj(n,r,null),Qj(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Qy(n,i)}catch(i){await v0(i)}}async function hle(t,e,n){const r=nt(t);try{const i=await(function(a,l){const u=nt(a);return u.persistence.runTransaction("Reject batch","readwrite-primary",(d=>{let h;return u.mutationQueue.lookupMutationBatch(d,l).next((m=>(Lt(m!==null,37113),h=m.keys(),u.mutationQueue.removeMutationBatch(d,m)))).next((()=>u.mutationQueue.performConsistencyCheck(d))).next((()=>u.documentOverlayCache.removeOverlaysForBatchId(d,h,l))).next((()=>u.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(d,h))).next((()=>u.localDocuments.getDocuments(d,h)))}))})(r.localStore,e);Kj(r,e,n),Qj(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await Qy(r,i)}catch(i){await v0(i)}}function Qj(t,e){(t.Vu.get(e)||[]).forEach((n=>{n.resolve()})),t.Vu.delete(e)}function Kj(t,e,n){const r=nt(t);let i=r.Ru[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.Ru[r.currentUser.toKey()]=i}}
vendor: 1,311 bytes, line 3537
3537function Kx(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Tu.get(e))t.Pu.delete(r),n&&t.hu.pu(r,n);t.Tu.delete(e),t.isPrimaryClient&&t.Au.zr(e).forEach((r=>{t.Au.containsKey(r)||Wj(t,r)}))}function Wj(t,e){t.Iu.delete(e.path.canonicalString());const n=t.du.get(e);n!==null&&(b_(t.remoteStore,n),t.du=t.du.remove(e),t.Eu.delete(n),T_(t))}function a9(t,e,n){for(const r of n)r instanceof Hj?(t.Au.addReference(r.key,e),ple(t,r)):r instanceof qj?(Ne(__,"Document no longer in limbo: "+r.key),t.Au.removeReference(r.key,e),t.Au.containsKey(r.key)||Wj(t,r.key)):Xe(19791,{yu:r})}function ple(t,e){const n=e.key,r=n.path.canonicalString();t.du.get(n)||t.Iu.has(r)||(Ne(__,"New document in limbo: "+n),t.Iu.add(r),T_(t))}function T_(t){for(;t.Iu.size>0&&t.du.size<t.maxConcurrentLimboResolutions;){const e=t.Iu.values().next().value;t.Iu.delete(e);const n=new Ge(Jt.fromString(e)),r=t.mu.next();t.Eu.set(r,new rle(n)),t.du=t.du.insert(n,r),Pj(t.remoteStore,new Il(Do(l_(n.path)),r,"TargetPurposeLimboResolution",r6.ue))}}async function Qy(t,e,n){const r=nt(t),i=[],s=[],a=[];r.Pu.isEmpty()||(r.Pu.forEach(((l,u)=>{a.push(r.gu(u,e,n).then((d=>{var h;if((d||n)&&r.isPrimaryClient){const m=d?!d.fromCache:(h=n==null?void 0:n.targetChanges.get(u.targetId))===null||h===void 0?void 0:h.current;
3537r.sharedClientState.updateQueryState(u.targetId,m?"current":"not-current")}if(d){i.push(d);const m=g_.Es(u.targetId,d);s.push(m)}})))})),await Promise.all(a),r.hu.J_(i),await(async function(u,d){const h=nt(u);try{await h.persistence.runTransaction("notifyLocalViewChanges","readwrite",(m=>Ae.forEach(d,(g=>Ae.forEach(g.Is,(w=>h.persistence.referenceDelegate.addReference(m,g.targetId,w))).next((()=>Ae.forEach(g.ds,(w=>h.persistence.referenceDelegate.removeReference(m,g.targetId,w)))))))))}catch(m){if(!A0(m))throw m;Ne(y_,"Failed to update sequence numbers: "+m)}for(const m of d){const g=m.targetId;if(!m.fromCache){const w=h.Fs.get(g),A=w.snapshotVersion,v=w.withLastLimboFreeSnapshotVersion(A);h.Fs=h.Fs.insert(g,v)}}})(r.localStore,s))}async function mle(t,e){const n=nt(t);if(!n.currentUser.isEqual(e)){Ne(__,"User change. New user:",e.toKey());const r=await kj(n.localStore,e);n.currentUser=e,(function(s,a){s.Vu.forEach((l=>{l.forEach((u=>{u.reject(new je(xe.CANCELLED,a))}))})),s.Vu.clear()})(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Qy(n,r.Bs)}}function gle(t,e){const n=nt(t),r=n.Eu.get(e);if(r&&r.lu)return gt().add(r.key);{let i=gt();const s=n.Tu.get(e);if(!s)return i;for(const a of s){const l=n.Pu.get(a);i=i.unionWith(l.view.tu)}return i}}function Yj(t){const e=nt(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=Gj.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=gle.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=fle.bind(null,e),e.hu.J_=Zce.bind(null,e.eventManager),e.hu.pu=ele.bind(null,e.eventManager),e}function yle(t){const e=nt(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=dle.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=hle.bind(null,e),e}class Yw{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=d6(e.databaseInfo.databaseId),this.sharedClientState=this.bu(e),this.persistence=this.Du(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Cu(e,this.localStore),this.indexBackfillerScheduler=this.Fu(e,this.localStore)}Cu(e,n){return null}Fu(e,n){return null}vu(e){return Ace(this.persistence,new bce,e.initialUser,this.serializer)}Du(e){return new Rj(m_.Vi,this.serializer)}bu(e){return new Ice}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}Yw.provider={build:()=>new Yw};class ble extends Yw{constructor(e){super(),this.cacheSizeBytes=e}Cu(e,n){Lt(this.persistence.referenceDelegate instanceof Kw,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new rce(r,e.asyncQueue,n)}Du(e){const n=this.cacheSizeBytes!==void 0?ri.withCacheSize(this.cacheSizeBytes):ri.DEFAULT;return new Rj((r=>Kw.Vi(r,n)),this.serializer)}}class Wx{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>o9(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=mle.bind(null,this.syncEngine),await Yce(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return(function(){return new Xce})()}createDatastore(e){const n=d6(e.databaseInfo.databaseId),r=(function(s){return new Bce(s)})(e.databaseInfo);return(function(s,a,l,u){return new jce(s,a,l,u)})(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return(function(r,i,s,a,l){return new Uce(r,i,s,a,l)})(this.localStore,this.datastore,e.asyncQueue,(n=>o9(this.syncEngine,n,0)),(function(){return e9.C()?new e9:new Rce})())}createSyncEngine(e,n){return(function(i,s,a,l,u,d,h){const m=new ile(i,s,a,l,u,d);return h&&(m.fu=!0),m})(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
3537ientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e,n;await(async function(i){const s=nt(i);Ne(Kf,"RemoteStore shutting down."),s.Ia.add(5),await Gy(s),s.Ea.shutdown(),s.Aa.set("Unknown")})(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}Wx.provider={build:()=>new Wx};/** 3538 * @license 3539 * Copyright 2020 Google LLC 3540 * 3541 * Licensed under the Apache License, Version 2.0 (the "License"); 3542 * you may not use this file except in compliance with the License. 3543 * You may obtain a copy of the License at 3544 * 3545 * http://www.apache.org/licenses/LICENSE-2.0 3546 * 3547 * Unless required by applicable law or agreed to in writing, software 3548 * distributed under the License is distributed on an "AS IS" BASIS, 3549 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3550 * See the License for the specific language governing permissions and 3551 * limitations under the License. 3552 *//** 3553 * @license 3554 * Copyright 2017 Google LLC 3555 * 3556 * Licensed under the Apache License, Version 2.0 (the "License"); 3557 * you may not use this file except in compliance with the License. 3558 * You may obtain a copy of the License at 3559 * 3560 * http://www.apache.org/licenses/LICENSE-2.0 3561 * 3562 * Unless required by applicable law or agreed to in writing, software 3563 * distributed under the License is distributed on an "AS IS" BASIS, 3564 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3565 * See the License for the specific language governing permissions and 3566 * limitations under the License. 3567 */class Jj{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.xu(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.xu(this.observer.error,e):cc("Uncaught Error in snapshot listener:",e.toString()))}Ou(){this.muted=!0}xu(e,n){setTimeout((()=>{this.muted||e(n)}),0)}}/** 3568 * @license 3569 * Copyright 2017 Google LLC 3570 * 3571 * Licensed under the Apache License, Version 2.0 (the "License"); 3572 * you may not use this file except in compliance with the License. 3573 * You may obtain a copy of the License at 3574 * 3575 * http://www.apache.org/licenses/LICENSE-2.0 3576 * 3577 * Unless required by applicable law or agreed to in writing, software 3578 * distributed under the License is distributed on an "AS IS" BASIS, 3579 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3580 * See the License for the specific language governing permissions and 3581 * limitations under the License. 3582 */const Ql="FirestoreClient";class wle{constructor(e,n,r,i,s){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Cr.UNAUTHENTICATED,this.clientId=n_.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,(async a=>{Ne(Ql,"Received user=",a.uid),await this.authCredentialListener(a),this.user=a})),this.appCheckCredentials.start(r,(a=>(Ne(Ql,"Received new app check token=",a),this.appCheckCredentialListener(a,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Za;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=x_(n,"Failed to shutdown persistence");e.reject(r)}})),e.promise}}async function Q3(t,e){t.asyncQueue.verifyOperationInProgress(),Ne(Ql,"Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener((async i=>{r.isEqual(i)||(await kj(e.localStore,i),r=i)})),e.persistence.setDatabaseDeletedListener((()=>{Vl("Terminating Firestore due to IndexedDb database deletion"),t.terminate().then((()=>{Ne("Terminating Firestore due to IndexedDb database deletion completed successfully")}
3582)).catch((i=>{Vl("Terminating Firestore due to IndexedDb database deletion failed",i)}))})),t._offlineComponents=e}async function c9(t,e){t.asyncQueue.verifyOperationInProgress();const n=await vle(t);Ne(Ql,"Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener((r=>n9(e.remoteStore,r))),t.setAppCheckTokenChangeListener(((r,i)=>n9(e.remoteStore,i))),t._onlineComponents=e}async function vle(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){Ne(Ql,"Using user provided OfflineComponentProvider");try{await Q3(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!(function(i){return i.name==="FirebaseError"?i.code===xe.FAILED_PRECONDITION||i.code===xe.UNIMPLEMENTED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11})(n))throw n;Vl("Error using user provided cache. Falling back to memory cache: "+n),await Q3(t,new Yw)}}else Ne(Ql,"Using default OfflineComponentProvider"),await Q3(t,new ble(void 0));return t._offlineComponents}async function Xj(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(Ne(Ql,"Using user provided OnlineComponentProvider"),await c9(t,t._uninitializedComponentsProvider._online)):(Ne(Ql,"Using default OnlineComponentProvider"),await c9(t,new Wx))),t._onlineComponents}function Ale(t){return Xj(t).then((e=>e.syncEngine))}async function Zj(t){const e=await Xj(t),n=e.eventManager;return n.onListen=sle.bind(null,e.syncEngine),n.onUnlisten=cle.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=ole.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=lle.bind(null,e.syncEngine),n}function Ele(t,e,n={}){const r=new Za;return t.asyncQueue.enqueueAndForget((async()=>(function(s,a,l,u,d){const h=new Jj({next:g=>{h.Ou(),a.enqueueAndForget((()=>Vj(s,m)));const w=g.docs.has(l);!w&&g.fromCache?d.reject(new je(xe.UNAVAILABLE,"Failed to get document because the client is offline.")):w&&g.fromCache&&u&&u.source==="server"?d.reject(new je(xe.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):d.resolve(g)},error:g=>d.reject(g)}),m=new zj(l_(l.path),h,{includeMetadataChanges:!0,ka:!0});return Fj(s,m)})(await Zj(t),t.asyncQueue,e,n,r))),r.promise}function xle(t,e,n={}){const r=new Za;return t.asyncQueue.enqueueAndForget((async()=>(function(s,a,l,u,d){const h=new Jj({next:g=>{h.Ou(),a.enqueueAndForget((()=>Vj(s,m))),g.fromCache&&u.source==="server"?d.reject(new je(xe.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):d.resolve(g)},error:g=>d.reject(g)}),m=new zj(l,h,{includeMetadataChanges:!0,ka:!0});return Fj(s,m)})(await Zj(t),t.asyncQueue,e,n,r))),r.promise}/** 3583 * @license 3584 * Copyright 2023 Google LLC 3585 * 3586 * Licensed under the Apache License, Version 2.0 (the "License"); 3587 * you may not use this file except in compliance with the License. 3588 * You may obtain a copy of the License at 3589 * 3590 * http://www.apache.org/licenses/LICENSE-2.0 3591 * 3592 * Unless required by applicable law or agreed to in writing, software 3593 * distributed under the License is distributed on an "AS IS" BASIS, 3594 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3595 * See the License for the specific language governing permissions and 3596 * limitations under the License. 3597 */function eL(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** 3598 * @license 3599 * Copyright 2020 Google LLC 3600 * 3601 * Licensed under the Apache License, Version 2.0 (the "License"); 3602 * you may not use this file except in compliance with the License. 3603 * You may obtain a copy of the License at 3604 * 3605 * http://www.apache.org/licenses/LICENSE-2.0 3606 * 3607 * Unless required by applicable law or agreed to in writing, software 3608 * distributed under the License is distributed on an "AS IS" BASIS, 3609 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3610 * See the License for the specific language governing permissions and 3611 * limitations under the License. 3612 */const l9=new Map;/** 3613 * @license 3614 * Copyright 2020 Google LLC 3615 * 3616 * Licensed under the Apache License, Version 2.0 (the "License");
3617 * you may not use this file except in compliance with the License. 3618 * You may obtain a copy of the License at 3619 * 3620 * http://www.apache.org/licenses/LICENSE-2.0 3621 * 3622 * Unless required by applicable law or agreed to in writing, software 3623 * distributed under the License is distributed on an "AS IS" BASIS, 3624 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3625 * See the License for the specific language governing permissions and 3626 * limitations under the License. 3627 */const tL="firestore.googleapis.com",u9=!0;class f9{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new je(xe.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=tL,this.ssl=u9}else this.host=e.host,this.ssl=(n=e.ssl)!==null&&n!==void 0?n:u9;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=Ij;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<tce)throw new je(xe.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}Uoe("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=eL((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),(function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new je(xe.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new je(xe.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new je(xe.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(function(r,i){return r.timeoutSeconds===i.timeoutSeconds})(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class m6{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new f9({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new je(xe.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new je(xe.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new f9(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=(function(r){if(!r)return new koe;switch(r.type){case"firstParty":return new Poe(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new je(xe.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}})(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return(function(n){const r=l9.get(n);r&&(Ne("ComponentProvider","Removing Datastore"),l9.delete(n),r.terminate())})(this),Promise.resolve()}}function Cle(t,e,n,r={}){var i;t=Go(t,m6);const s=X2(e),a=t._getSettings(),l=Object.assign(Object.assign({},a),{emulatorOptions:t._getEmulatorOptions()}),u=`${e}:${n}`;s&&(ise(`https://${u}`),cse("Firestore",!0)),a.host!==tL&&a.host!==u&&Vl("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const d=Object.assign(Object.assign({},a),{host:u,ssl:s,emulatorOptions:r});if(!qg(d,l)&&(t._setSettings(d),r.mockUserToken)){let h,m;if(typeof r.mockUserToken=="string")h=r.mockUserToken,m=Cr.MOCK_USER;else{h=sse(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const g=r.mockUserToken.sub||r.mockUserToken.user_id;if(!g)throw new je(xe.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");m=new Cr(g)}t._authCredentials=new Noe(new LM(h,m))}}/** 3628 * @license 3629 * Copyright 2020 Google LLC 3630 * 3631 * Licensed under the Apache License, Version 2.0 (the "License");
3632 * you may not use this file except in compliance with the License. 3633 * You may obtain a copy of the License at 3634 * 3635 * http://www.apache.org/licenses/LICENSE-2.0 3636 * 3637 * Unless required by applicable law or agreed to in writing, software 3638 * distributed under the License is distributed on an "AS IS" BASIS, 3639 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3640 * See the License for the specific language governing permissions and 3641 * limitations under the License. 3642 */class g6{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new g6(this.firestore,e,this._query)}}class Sn{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Pl(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Sn(this.firestore,e,this._key)}toJSON(){return{type:Sn._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,n,r){if(Hy(n,Sn._jsonSchema))return new Sn(e,r||null,new Ge(Jt.fromString(n.referencePath)))}}Sn._jsonSchemaVersion="firestore/documentReference/1.0",Sn._jsonSchema={type:Tn("string",Sn._jsonSchemaVersion),referencePath:Tn("string")};class Pl extends g6{constructor(e,n,r){super(e,n,l_(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Sn(this.firestore,null,new Ge(e))}withConverter(e){return new Pl(this.firestore,e,this._path)}}function y6(t,e,...n){if(t=$o(t),FM("collection","path",e),t instanceof m6){const r=Jt.fromString(e,...n);return _7(r),new Pl(t,null,r)}{if(!(t instanceof Sn||t instanceof Pl))throw new je(xe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Jt.fromString(e,...n));return _7(r),new Pl(t.firestore,null,r)}}function e0(t,e,...n){if(t=$o(t),arguments.length===1&&(e=n_.newId()),FM("doc","path",e),t instanceof m6){const r=Jt.fromString(e,...n);return C7(r),new Sn(t,null,new Ge(r))}{if(!(t instanceof Sn||t instanceof Pl))throw new je(xe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Jt.fromString(e,...n));return C7(r),new Sn(t.firestore,t instanceof Pl?t.converter:null,new Ge(r))}}/** 3643 * @license 3644 * Copyright 2020 Google LLC 3645 * 3646 * Licensed under the Apache License, Version 2.0 (the "License"); 3647 * you may not use this file except in compliance with the License. 3648 * You may obtain a copy of the License at 3649 * 3650 * http://www.apache.org/licenses/LICENSE-2.0 3651 * 3652 * Unless required by applicable law or agreed to in writing, software 3653 * distributed under the License is distributed on an "AS IS" BASIS, 3654 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3655 * See the License for the specific language governing permissions and 3656 * limitations under the License. 3657 */const d9="AsyncQueue";class h9{constructor(e=Promise.resolve()){this.Zu=[],this.Xu=!1,this.ec=[],this.tc=null,this.nc=!1,this.rc=!1,this.sc=[],this.F_=new Oj(this,"async_queue_retry"),this.oc=()=>{const r=G3();r&&Ne(d9,"Visibility state changed to "+r.visibilityState),this.F_.y_()},this._c=e;const n=G3();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.oc)}get isShuttingDown(){return this.Xu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.ac(),this.uc(e)}enterRestrictedMode(e){if(!this.Xu){this.Xu=!0,this.rc=e||!1;const n=G3();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.oc)}}enqueue(e){if(this.ac(),this.Xu)return new Promise((()=>{}));const n=new Za;return this.uc((()=>this.Xu&&this.rc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise))).then((()=>n.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Zu.push(e),this.cc())))}async cc(){if(this.Zu.length!==0){try{await this.Zu[0](),this.Zu.shift(),this.F_.reset()}catch(e){if(!A0(e))throw e;Ne(d9,"Operation failed with retryable error: "+e)}this.Zu.length>0&&this.F_.g_((()=>this.cc()))}}uc(e){const n=this._c.then((()=>(this.nc=!0,e().catch((r=>{throw this.tc=r,this.nc=!1,cc("INTERNAL UNHANDLED ERROR: ",p9(r)),r})).then((r=>(this.nc=!1,r))))));return this._c=n,n}enqueueAfterDelay(e,n,r){this.ac(),this.sc.indexOf(e)>-1&&(n=0);const i=E_.createAndSchedule(this,e,n,r,(s=>this.lc(s)));return this.ec.push(i),i}ac(){this.tc&&Xe(47125,{hc:p9(this.tc)})}verifyOperationInProgress(){}async Pc(){let e;do e=this._c,await e;while(e!==this._c)}Tc(e){for(const n of this.ec)if(n.timerId===e)return!0;return!1}Ic(e){return this.Pc().then((()=>{this.ec.sort(((n,r)=>n.targetTimeMs-r.targetTimeMs));for(const n of this.ec)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.Pc()}))}dc(e){this.sc.push(e)}lc(e){const n=this.ec.indexOf(e);this.ec.splice(n,1)}}function p9(t){let e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+` 3658`+t.stack),e}class x0 extends m6{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new h9,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new h9(e),this._firestoreClient=void 0,await e}}}function b6(t,e){const n=typeof t=="object"?t:IM(),r=typeof t=="string"?t:zw,i=zy(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=nse("firestore");s&&Cle(i,...s)}return i}function S_(t){if(t._terminated)throw new je(xe.FAILED_PRECONDITION,"The client has already been terminated.");return t._firestoreClient||_le(t),t._firestoreClient}function _le(t){var e,n,r;const i=t._freezeSettings(),s=(function(l,u,d,h){return new Yoe(l,u,d,h.host,h.ssl,h.experimentalForceLongPolling,h.experimentalAutoDetectLongPolling,eL(h.experimentalLongPollingOptions),h.useFetchStreams,h.isUsingEmulator)})(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._componentsProvider||!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),t._firestoreClient=new wle(t._authCredentials,t._appCheckCredentials,t._queue,s,t._componentsProvider&&(function(l){const u=l==null?void 0:l._online.build();return{_offline:l==null?void 0:l._offline.build(u),_online:u}})(t._componentsProvider))}/** 3659 * @license 3660 * Copyright 2020 Google LLC 3661 * 3662 * Licensed under the Apache License, Version 2.0 (the "License");
3663 * you may not use this file except in compliance with the License. 3664 * You may obtain a copy of the License at 3665 * 3666 * http://www.apache.org/licenses/LICENSE-2.0 3667 * 3668 * Unless required by applicable law or agreed to in writing, software 3669 * distributed under the License is distributed on an "AS IS" BASIS, 3670 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3671 * See the License for the specific language governing permissions and 3672 * limitations under the License. 3673 */class hs{constructor(e){this._byteString=e}static fromBase64String(e){try{return new hs(yr.fromBase64String(e))}catch(n){throw new je(xe.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new hs(yr.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:hs._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(Hy(e,hs._jsonSchema))return hs.fromBase64String(e.bytes)}}hs._jsonSchemaVersion="firestore/bytes/1.0",hs._jsonSchema={type:Tn("string",hs._jsonSchemaVersion),bytes:Tn("string")};/** 3674 * @license 3675 * Copyright 2020 Google LLC 3676 * 3677 * Licensed under the Apache License, Version 2.0 (the "License"); 3678 * you may not use this file except in compliance with the License. 3679 * You may obtain a copy of the License at 3680 * 3681 * http://www.apache.org/licenses/LICENSE-2.0 3682 * 3683 * Unless required by applicable law or agreed to in writing, software 3684 * distributed under the License is distributed on an "AS IS" BASIS, 3685 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3686 * See the License for the specific language governing permissions and 3687 * limitations under the License. 3688 */class w6{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new je(xe.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new fr(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 3689 * @license 3690 * Copyright 2020 Google LLC 3691 * 3692 * Licensed under the Apache License, Version 2.0 (the "License"); 3693 * you may not use this file except in compliance with the License. 3694 * You may obtain a copy of the License at 3695 * 3696 * http://www.apache.org/licenses/LICENSE-2.0 3697 * 3698 * Unless required by applicable law or agreed to in writing, software 3699 * distributed under the License is distributed on an "AS IS" BASIS, 3700 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3701 * See the License for the specific language governing permissions and 3702 * limitations under the License. 3703 */class v6{constructor(e){this._methodName=e}}/** 3704 * @license 3705 * Copyright 2017 Google LLC 3706 * 3707 * Licensed under the Apache License, Version 2.0 (the "License"); 3708 * you may not use this file except in compliance with the License. 3709 * You may obtain a copy of the License at 3710 * 3711 * http://www.apache.org/licenses/LICENSE-2.0 3712 * 3713 * Unless required by applicable law or agreed to in writing, software 3714 * distributed under the License is distributed on an "AS IS" BASIS, 3715 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3716 * See the License for the specific language governing permissions and 3717 * limitations under the License. 3718 */class jo{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new je(xe.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new je(xe.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return lt(this._lat,e._lat)||lt(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:jo._jsonSchemaVersion}}static fromJSON(e){if(Hy(e,jo._jsonSchema))return new jo(e.latitude,e.longitude)}}jo._jsonSchemaVersion="firestore/geoPoint/1.0",jo._jsonSchema={type:Tn("str
3718ing",jo._jsonSchemaVersion),latitude:Tn("number"),longitude:Tn("number")};/** 3719 * @license 3720 * Copyright 2024 Google LLC 3721 * 3722 * Licensed under the Apache License, Version 2.0 (the "License"); 3723 * you may not use this file except in compliance with the License. 3724 * You may obtain a copy of the License at 3725 * 3726 * http://www.apache.org/licenses/LICENSE-2.0 3727 * 3728 * Unless required by applicable law or agreed to in writing, software 3729 * distributed under the License is distributed on an "AS IS" BASIS, 3730 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3731 * See the License for the specific language governing permissions and 3732 * limitations under the License. 3733 */class Lo{constructor(e){this._values=(e||[]).map((n=>n))}toArray(){return this._values.map((e=>e))}isEqual(e){return(function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0})(this._values,e._values)}toJSON(){return{type:Lo._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(Hy(e,Lo._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every((n=>typeof n=="number")))return new Lo(e.vectorValues);throw new je(xe.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}Lo._jsonSchemaVersion="firestore/vectorValue/1.0",Lo._jsonSchema={type:Tn("string",Lo._jsonSchemaVersion),vectorValues:Tn("object")};/** 3734 * @license 3735 * Copyright 2017 Google LLC 3736 * 3737 * Licensed under the Apache License, Version 2.0 (the "License"); 3738 * you may not use this file except in compliance with the License. 3739 * You may obtain a copy of the License at 3740 * 3741 * http://www.apache.org/licenses/LICENSE-2.0 3742 * 3743 * Unless required by applicable law or agreed to in writing, software 3744 * distributed under the License is distributed on an "AS IS" BASIS, 3745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3746 * See the License for the specific language governing permissions and 3747 * limitations under the License. 3748 */const Tle=/^__.*__$/;class Sle{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new Zl(e,this.data,this.fieldMask,n,this.fieldTransforms):new qy(e,this.data,n,this.fieldTransforms)}}class nL{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new Zl(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function rL(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Xe(40011,{Ec:t})}}class I_{constructor(e,n,r,i,s,a){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Ac(),this.fieldTransforms=s||[],this.fieldMask=a||[]}get path(){return this.settings.path}get Ec(){return this.settings.Ec}Rc(e){return new I_(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Vc(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.Rc({path:r,mc:!1});return i.fc(e),i}gc(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.Rc({path:r,mc:!1});return i.Ac(),i}yc(e){return this.Rc({path:void 0,mc:!0})}wc(e){return Jw(e,this.settings.methodName,this.settings.Sc||!1,this.path,this.settings.bc)}contains(e){return this.fieldMask.find((n=>e.isPrefixOf(n)))!==void 0||this.fieldTransforms.find((n=>e.isPrefixOf(n.field)))!==void 0}Ac(){if(this.path)for(let e=0;e<this.path.length;e++)this.fc(this.path.get(e))}fc(e){if(e.length===0)throw this.wc("Document fields must not be empty");if(rL(this.Ec)&&Tle.test(e))throw this.wc('Document fields cannot begin and end with "__"')}}class Ile{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||d6(e)}Dc(e,n,r,i=!1){return new I_({Ec:e,methodName:n,bc:r,path:fr.emptyPath(),mc:!1,Sc:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function R_(t){const e=t._freezeSettings(),n=d6(t._databaseId);return new Ile(t._databaseId,!!e.ignoreUndefinedProperties,n)}function iL(t,e,n,r,i,s={}){const a=t.Dc(s.merge||s.mergeFields?2:0,e,n,i);N_("Data must be an object, but it was:",a,r);const l=sL(r,a);let u,d;if(s.merge)u=new Bi(a.fieldMask),d=a.fieldTransforms;else if(s.mergeFields){const h=[];for(const m of s.mergeFields){const g=Yx(e,m,n);if(!a.contains(g))throw new je(xe.INVALID_ARGUMENT,`Field '${g}' is specified in your field mask but missing from your input data.`);aL(h,g)||h.push(g)}u=new Bi(h),d=a.fieldTransforms.filter((m=>u.covers(m.field)))}else u=null,d=a.fieldTransforms;return new Sle(new ai(l),u,d)}class A6 extends v6{_toFieldTransform(e){if(e.Ec!==2)throw e.Ec===1?e.wc(`${this._methodName}() can only appear at the top level of your update data`):e.wc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof A6}}class k_ extends v6{constructor(e,n){super(e),this.Cc=n}_toFieldTransform(e){const n=new Xg(e.serializer,uj(e.serializer,this.Cc));return new Eae(e.path,n)}isEqual(e){return e instanceof k_&&this.Cc===e.Cc}}function Rle(t,e,n,r){const i=t.Dc(1,e,n);N_("Data must be an object, but it was:",i,r);const s=[],a=ai.empty();Xl(r,((u,d)=>{const h=O_(e,u,n);d=$o(d);const m=i.gc(h);if(d instanceof A6)s.push(h);else{const g=E6(d,m);g!=null&&(s.push(h),a.set(h,g))}}));const l=new Bi(s);return new nL(a,l,i.fieldTransforms)}function kle(t,e,n,r,i,s){const a=t.Dc(1,e,n),l=[Yx(e,r,n)],u=[i];if(s.length%2!=0)throw new je(xe.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let g=0;g<s.length;g+=2)l.push(Yx(e,s[g])),u.push(s[g+1]);const d=[],h=ai.empty();for(let g=l.length-1;g>=0;--g)if(!aL(d,l[g])){const w=l[g];let A=u[g];A=$o(A);const v=a.gc(w);if(A instanceof A6)d.push(w);else{const x=E6(A,v);x!=null&&(d.push(w),h.set(w,x))}}const m=new Bi(d);return new nL(h,m,a.fieldTransforms)}function E6(t,e){if(oL(t=$o(t)))return N_("Unsupported field value:",e,t),sL(t,e);if(t instanceof v6)return(function(r,i){if(!rL(i.Ec))throw i.wc(`${r._methodName}
3748() can only be used with update() and set()`);if(!i.path)throw i.wc(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)})(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.mc&&e.Ec!==4)throw e.wc("Nested arrays are not supported");return(function(r,i){const s=[];let a=0;for(const l of r){let u=E6(l,i.yc(a));u==null&&(u={nullValue:"NULL_VALUE"}),s.push(u),a++}return{arrayValue:{values:s}}})(t,e)}return(function(r,i){if((r=$o(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return uj(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=Xt.fromDate(r);return{timestampValue:Qw(i.serializer,s)}}if(r instanceof Xt){const s=new Xt(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:Qw(i.serializer,s)}}if(r instanceof jo)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof hs)return{bytesValue:Aj(i.serializer,r._byteString)};if(r instanceof Sn){const s=i.databaseId,a=r.firestore._databaseId;if(!a.isEqual(s))throw i.wc(`Document reference is for database ${a.projectId}/${a.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:h_(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof Lo)return(function(a,l){return{mapValue:{fields:{[WM]:{stringValue:YM},[Hw]:{arrayValue:{values:a.toArray().map((d=>
3748{if(typeof d!="number")throw l.wc("VectorValues must only contain numeric values.");return u_(l.serializer,d)}))}}}}}})(r,i);throw i.wc(`Unsupported field value: ${r_(r)}`)})(t,e)}function sL(t,e){const n={};return HM(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Xl(t,((r,i)=>{const s=E6(i,e.Vc(r));s!=null&&(n[r]=s)})),{mapValue:{fields:n}}}function oL(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof Xt||t instanceof jo||t instanceof hs||t instanceof Sn||t instanceof v6||t instanceof Lo)}function N_(t,e,n){if(!oL(n)||!VM(n)){const r=r_(n);throw r==="an object"?e.wc(t+" a custom object"):e.wc(t+" "+r)}}function Yx(t,e,n){if((e=$o(e))instanceof w6)return e._internalPath;if(typeof e=="string")return O_(t,e);throw Jw("Field path arguments must be of type string or ",t,!1,void 0,n)}const Nle=new RegExp("[~\\*/\\[\\]]");function O_(t,e,n){if(e.search(Nle)>=0)throw Jw(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new w6(...e.split("."))._internalPath}catch{throw Jw(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function Jw(t,e,n,r,i){const s=r&&!r.isEmpty(),a=i!==void 0;let l=`Function ${e}() called with invalid data`;n&&(l+=" (via `toFirestore()`)"),l+=". ";let u="";return(s||a)&&(u+=" (found",s&&(u+=` in field ${r}`),a&&(u+=` in document ${i}`),u+=")"),new je(xe.INVALID_ARGUMENT,l+t+u)}function aL(t,e){return t.some((n=>n.isEqual(e)))}/** 3749 * @license 3750 * Copyright 2020 Google LLC 3751 * 3752 * Licensed under the Apache License, Version 2.0 (the "License"); 3753 * you may not use this file except in compliance with the License. 3754 * You may obtain a copy of the License at 3755 * 3756 * http://www.apache.org/licenses/LICENSE-2.0 3757 * 3758 * Unless required by applicable law or agreed to in writing, software 3759 * distributed under the License is distributed on an "AS IS" BASIS, 3760 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3761 * See the License for the specific language governing permissions and 3762 * limitations under the License. 3763 */class cL{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Sn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new Ole(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(lL("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class Ole extends cL{data(){return super.data()}}function lL(t,e){return typeof e=="string"?O_(t,e):e instanceof w6?e._internalPath:e._delegate._internalPath}/** 3764 * @license 3765 * Copyright 2020 Google LLC 3766 * 3767 * Licensed under the Apache License, Version 2.0 (the "License"); 3768 * you may not use this file except in compliance with the License. 3769 * You may obtain a copy of the License at 3770 * 3771 * http://www.apache.org/licenses/LICENSE-2.0 3772 * 3773 * Unless required by applicable law or agreed to in writing, software 3774 * distributed under the License is distributed on an "AS IS" BASIS, 3775 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3776 * See the License for the specific language governing permissions and 3777 * limitations under the License. 3778 */function Ble(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new je(xe.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Ple{convertValue(e,n="none"){switch($l(e)){case 0:return null;case 1:return e.booleanValue;case 2:return gn(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(ql(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 11:return this.convertObject(e.mapValue,n);case 10:return this.convertVectorValue(e.mapValue);default:throw Xe(62114,{value:e})}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Xl(e,((i,s)=>{r[i]=this.convertValue(s,n)})),r}convertVectorValue(e){var n,r,i;const s=(i=(r=(n=e.fields)===null||n===void 0?void 0:n[Hw].arrayValue)===null||r===void 0?void 0:r.values)===null||i===void 0?void 0:i.map((a=>gn(a.doubleValue)));return new Lo(s)}convertGeoPoint(e){return new jo(gn(e.latitude),gn(e.longitude))}convertArray(e,n){return(e.values||[]).map((r=>this.convertValue(r,n)))}convertServerTimestamp(e,n){switch(n){case"previous":const r=s6(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Qg(e));default:return null}}convertTimestamp(e){const n=Hl(e);return new Xt(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=Jt.fromString(e);Lt(Sj(r),9688,{name:e});const i=new Kg(r.get(1),r.get(3)),s=new Ge(r.popFirst(5));return i.isEqual(n)||cc(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** 3779 * @license 3780 * Copyright 2020 Google LLC 3781 * 3782 * Licensed under the Apache License, Version 2.0 (the "License");
3783 * you may not use this file except in compliance with the License. 3784 * You may obtain a copy of the License at 3785 * 3786 * http://www.apache.org/licenses/LICENSE-2.0 3787 * 3788 * Unless required by applicable law or agreed to in writing, software 3789 * distributed under the License is distributed on an "AS IS" BASIS, 3790 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3791 * See the License for the specific language governing permissions and 3792 * limitations under the License. 3793 */function uL(t,e,n){let r;return r=t?t.toFirestore(e):e,r}class Ym{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Pf extends cL{constructor(e,n,r,i,s,a){super(e,n,r,i,a),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new cw(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(lL("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new je(xe.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,n={};return n.type=Pf._jsonSchemaVersion,n.bundle="",n.bundleSource="DocumentSnapshot",n.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?n:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),n.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),n)}}Pf._jsonSchemaVersion="firestore/documentSnapshot/1.0",Pf._jsonSchema={type:Tn("string",Pf._jsonSchemaVersion),bundleSource:Tn("string","DocumentSnapshot"),bundleName:Tn("string"),bundle:Tn("str
3793ing")};class cw extends Pf{data(e={}){return super.data(e)}}class Bh{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Ym(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach((n=>e.push(n))),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach((r=>{e.call(n,new cw(this._firestore,this._userDataWriter,r.key,r,new Ym(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new je(xe.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=(function(i,s){if(i._snapshot.oldDocs.isEmpty()){let a=0;return i._snapshot.docChanges.map((l=>{const u=new cw(i._firestore,i._userDataWriter,l.doc.key,l.doc,new Ym(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);return l.doc,{type:"added",doc:u,oldIndex:-1,newIndex:a++}}))}{let a=i._snapshot.oldDocs;return i._snapshot.docChanges.filter((l=>s||l.type!==3)).map((l=>{const u=new cw(i._firestore,i._userDataWriter,l.doc.key,l.doc,new Ym(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);let d=-1,h=-1;return l.type!==0&&(d=a.indexOf(l.doc.key),a=a.delete(l.doc.key)),l.type!==1&&(a=a.add(l.doc),h=a.indexOf(l.doc.key)),{type:Dle(l.type),doc:u,oldIndex:d,newIndex:h}}))}})(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new je(xe.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=Bh._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=n_.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const n=[],r=[],i=[];return this.docs.forEach((s=>{s._document!==null&&(n.push(s._document),r.push(this._userDataWriter.convertObjectMap(s._document.data.value.mapValue.fields,"previous")),i.push(s.ref.path))})),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function Dle(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Xe(61501,{type:t})}}/** 3794 * @license 3795 * Copyright 2020 Google LLC 3796 * 3797 * Licensed under the Apache License, Version 2.0 (the "License"); 3798 * you may not use this file except in compliance with the License. 3799 * You may obtain a copy of the License at 3800 * 3801 * http://www.apache.org/licenses/LICENSE-2.0 3802 * 3803 * Unless required by applicable law or agreed to in writing, software 3804 * distributed under the License is distributed on an "AS IS" BASIS, 3805 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3806 * See the License for the specific language governing permissions and 3807 * limitations under the License. 3808 */function fL(t){t=Go(t,Sn);const e=Go(t.firestore,x0);return Ele(S_(e),t._key).then((n=>Mle(e,t,n)))}Bh._jsonSchemaVersion="firestore/querySnapshot/1.0",Bh._jsonSchema={type:Tn("string",Bh._jsonSchemaVersion),bundleSource:Tn("string","QuerySnapshot"),bundleName:Tn("string"),bundle:Tn("str
3808ing")};class dL extends Ple{constructor(e){super(),this.firestore=e}convertBytes(e){return new hs(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new Sn(this.firestore,null,n)}}function hL(t){t=Go(t,g6);const e=Go(t.firestore,x0),n=S_(e),r=new dL(e);return Ble(t._query),xle(n,t._query).then((i=>new Bh(e,r,t,i)))}function m9(t,e,n){t=Go(t,Sn);const r=Go(t.firestore,x0),i=uL(t.converter,e);return B_(r,[iL(R_(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,Us.none())])}function pL(t,e,n,...r){t=Go(t,Sn);const i=Go(t.firestore,x0),s=R_(i);let a;return a=typeof(e=$o(e))=="string"||e instanceof w6?kle(s,"updateDoc",t._key,e,n,r):Rle(s,"updateDoc",t._key,e),B_(i,[a.toMutation(t._key,Us.exists(!0))])}function mL(t,e){const n=Go(t.firestore,x0),r=e0(t),i=uL(t.converter,e);return B_(n,[iL(R_(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,Us.exists(!1))]).then((()=>r))}function B_(t,e){return(function(r,i){const s=new Za;return r.asyncQueue.enqueueAndForget((async()=>ule(await Ale(r),i,s))),s.promise})(S_(t),e)}function Mle(t,e,n){const r=n.docs.get(e._key),i=new dL(t);return new Pf(t,i,e._key,r,new Ym(n.hasPendingWrites,n.fromCache),e.converter)}function jle(t){return new k_("increment",t)}(function(e,n=!0){(function(i){w0=i})(woe),Fl(new oc("firestore",((r,{instanceIdentifier:i,options:s})=>{const a=r.getProvider("app").getImmediate(),l=new x0(new Ooe(r.getProvider("auth-internal")),new Doe(a,r.getProvider("app-check-internal")),(function(d,h){if(!Object.prototype.hasOwnProperty.apply(d.options,["projectId"]))throw new je(xe.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Kg(d.options.projectId,h)})(a,i),a);return s=Object.assign({useFetchStreams:n},s),l._setSettings(s),l}),"PUBLIC").setMultipleInstances(!0)),Po(w7,v7,e),Po(w7,v7,"esm2017")})();var Lle="firebase",Ule="11.10.0";/** 3809 * @license 3810 * Copyright 2020 Google LLC 3811 * 3812 * Licensed under the Apache License, Version 2.0 (the "License"); 3813 * you may not use this file except in compliance with the License. 3814 * You may obtain a copy of the License at 3815 * 3816 * http://www.apache.org/licenses/LICENSE-2.0 3817 * 3818 * Unless required by applicable law or agreed to in writing, software 3819 * distributed under the License is distributed on an "AS IS" BASIS, 3820 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3821 * See the License for the specific language governing permissions and 3822 * limitations under the License. 3823 */Po(Lle,Ule,"app");const gL="@firebase/installations",P_="0.6.18";/** 3824 * @license 3825 * Copyright 2019 Google LLC 3826 * 3827 * Licensed under the Apache License, Version 2.0 (the "License"); 3828 * you may not use this file except in compliance with the License. 3829 * You may obtain a copy of the License at 3830 * 3831 * http://www.apache.org/licenses/LICENSE-2.0 3832 * 3833 * Unless required by applicable law or agreed to in writing, software 3834 * distributed under the License is distributed on an "AS IS" BASIS, 3835 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3836 * See the License for the specific language governing permissions and 3837 * limitations under the License. 3838 */const yL=1e4,bL=`w:${P_}`,wL="FIS_v2",Fle="https://firebaseinstallations.googleapis.com/v1",Vle=3600*1e3,zle="installations",Hle="Installations";/** 3839 * @license 3840 * Copyright 2019 Google LLC 3841 * 3842 * Licensed under the Apache License, Version 2.0 (the "License"); 3843 * you may not use this file except in compliance with the License. 3844 * You may obtain a copy of the License at 3845 * 3846 * http://www.apache.org/licenses/LICENSE-2.0 3847 * 3848 * Unless required by applicable law or agreed to in writing, software 3849 * distributed under the License is distributed on an "AS IS" BASIS, 3850 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3851 * See the License for the specific language governing permissions and 3852 * limitations under the License. 3853 */const qle={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},Wf=new n6(zle,Hle,qle);function vL(t){return t instanceof Jl&&t.code.includes("request-failed")}/** 3854 * @license 3855 * Copyright 2019 Google LLC 3856 * 3857 * Licensed under the Apache License, Version 2.0 (the "License");
3858 * you may not use this file except in compliance with the License. 3859 * You may obtain a copy of the License at 3860 * 3861 * http://www.apache.org/licenses/LICENSE-2.0 3862 * 3863 * Unless required by applicable law or agreed to in writing, software 3864 * distributed under the License is distributed on an "AS IS" BASIS, 3865 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3866 * See the License for the specific language governing permissions and 3867 * limitations under the License. 3868 */function AL({projectId:t}){return`${Fle}/projects/${t}/installations`}function EL(t){return{token:t.token,requestStatus:2,expiresIn:Gle(t.expiresIn),creationTime:Date.now()}}async function xL(t,e){const r=(await e.json()).error;return Wf.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function CL({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function $le(t,{refreshToken:e}){const n=CL(t);return n.append("Authorization",Qle(e)),n}async function _L(t){const e=await t();return e.status>=500&&e.status<600?t():e}function Gle(t){return Number(t.replace("s","000"))}function Qle(t){return`${wL} ${t}`}/** 3869 * @license 3870 * Copyright 2019 Google LLC 3871 * 3872 * Licensed under the Apache License, Version 2.0 (the "License"); 3873 * you may not use this file except in compliance with the License. 3874 * You may obtain a copy of the License at 3875 * 3876 * http://www.apache.org/licenses/LICENSE-2.0 3877 * 3878 * Unless required by applicable law or agreed to in writing, software 3879 * distributed under the License is distributed on an "AS IS" BASIS, 3880 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3881 * See the License for the specific language governing permissions and 3882 * limitations under the License. 3883 */async function Kle({appConfig:t,heartbeatServiceProvider:e},{fid:n}){const r=AL(t),i=CL(t),s=e.getImmediate({optional:!0});if(s){const d=await s.getHeartbeatsHeader();d&&i.append("x-firebase-client",d)}const a={fid:n,authVersion:wL,appId:t.appId,sdkVersion:bL},l={method:"POST",headers:i,body:JSON.stringify(a)},u=await _L(()=>fetch(r,l));if(u.ok){const d=await u.json();return{fid:d.fid||n,registrationStatus:2,refreshToken:d.refreshToken,authToken:EL(d.authToken)}}else throw await xL("Create Installation",u)}/** 3884 * @license 3885 * Copyright 2019 Google LLC 3886 * 3887 * Licensed under the Apache License, Version 2.0 (the "License"); 3888 * you may not use this file except in compliance with the License. 3889 * You may obtain a copy of the License at 3890 * 3891 * http://www.apache.org/licenses/LICENSE-2.0 3892 * 3893 * Unless required by applicable law or agreed to in writing, software 3894 * distributed under the License is distributed on an "AS IS" BASIS, 3895 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3896 * See the License for the specific language governing permissions and 3897 * limitations under the License. 3898 */function TL(t){return new Promise(e=>{setTimeout(e,t)})}/** 3899 * @license 3900 * Copyright 2019 Google LLC 3901 * 3902 * Licensed under the Apache License, Version 2.0 (the "License"); 3903 * you may not use this file except in compliance with the License. 3904 * You may obtain a copy of the License at 3905 * 3906 * http://www.apache.org/licenses/LICENSE-2.0 3907 * 3908 * Unless required by applicable law or agreed to in writing, software 3909 * distributed under the License is distributed on an "AS IS" BASIS, 3910 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3911 * See the License for the specific language governing permissions and 3912 * limitations under the License. 3913 */function Wle(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}/** 3914 * @license 3915 * Copyright 2019 Google LLC 3916 * 3917 * Licensed under the Apache License, Version 2.0 (the "License"); 3918 * you may not use this file except in compliance with the License. 3919 * You may obtain a copy of the License at 3920 * 3921 * http://www.apache.org/licenses/LICENSE-2.0 3922 * 3923 * Unless required by applicable law or agreed to in writing, software 3924 * distributed under the License is distributed on an "AS IS" BASIS, 3925 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3926 * See the License for the specific language governing permissions and 3927 * limitations under the License. 3928 */const Yle=/^[cdef][\w-]{21}$/,Jx="";function Jle(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const n=Xle(t);return Yle.test(n)?n:Jx}catch{return Jx}}function Xle(t){return Wle(t).substr(0,22)}/** 3929 * @license 3930 * Copyright 2019 Google LLC 3931 * 3932 * Licensed under the Apache License, Version 2.0 (the "License");
3933 * you may not use this file except in compliance with the License. 3934 * You may obtain a copy of the License at 3935 * 3936 * http://www.apache.org/licenses/LICENSE-2.0 3937 * 3938 * Unless required by applicable law or agreed to in writing, software 3939 * distributed under the License is distributed on an "AS IS" BASIS, 3940 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3941 * See the License for the specific language governing permissions and 3942 * limitations under the License. 3943 */function x6(t){return`${t.appName}!${t.appId}`}/** 3944 * @license 3945 * Copyright 2019 Google LLC 3946 * 3947 * Licensed under the Apache License, Version 2.0 (the "License"); 3948 * you may not use this file except in compliance with the License. 3949 * You may obtain a copy of the License at 3950 * 3951 * http://www.apache.org/licenses/LICENSE-2.0 3952 * 3953 * Unless required by applicable law or agreed to in writing, software 3954 * distributed under the License is distributed on an "AS IS" BASIS, 3955 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3956 * See the License for the specific language governing permissions and 3957 * limitations under the License. 3958 */const SL=new Map;function IL(t,e){const n=x6(t);RL(n,e),Zle(n,e)}function RL(t,e){const n=SL.get(t);if(n)for(const r of n)r(e)}function Zle(t,e){const n=eue();n&&n.postMessage({key:t,fid:e}),tue()}let Ju=null;function eue(){return!Ju&&"BroadcastChannel"in self&&(Ju=new BroadcastChannel("[Firebase] FID Change"),Ju.onmessage=t=>{RL(t.data.key,t.data.fid)}),Ju}function tue(){SL.size===0&&Ju&&(Ju.close(),Ju=null)}/** 3959 * @license 3960 * Copyright 2019 Google LLC 3961 * 3962 * Licensed under the Apache License, Version 2.0 (the "License"); 3963 * you may not use this file except in compliance with the License. 3964 * You may obtain a copy of the License at 3965 * 3966 * http://www.apache.org/licenses/LICENSE-2.0 3967 * 3968 * Unless required by applicable law or agreed to in writing, software 3969 * distributed under the License is distributed on an "AS IS" BASIS, 3970 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3971 * See the License for the specific language governing permissions and 3972 * limitations under the License. 3973 */const nue="firebase-installations-database",rue=1,Yf="firebase-installations-store";let K3=null;function D_(){return K3||(K3=TM(nue,rue,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(Yf)}}})),K3}async function Xw(t,e){const n=x6(t),i=(await D_()).transaction(Yf,"readwrite"),s=i.objectStore(Yf),a=await s.get(n);return await s.put(e,n),await i.done,(!a||a.fid!==e.fid)&&IL(t,e.fid),e}async function kL(t){const e=x6(t),r=(await D_()).transaction(Yf,"readwrite");await r.objectStore(Yf).delete(e),await r.done}async function C6(t,e){const n=x6(t),i=(await D_()).transaction(Yf,"readwrite"),s=i.objectStore(Yf),a=await s.get(n),l=e(a);return l===void 0?await s.delete(n):await s.put(l,n),await i.done,l&&(!a||a.fid!==l.fid)&&IL(t,l.fid),l}/** 3974 * @license 3975 * Copyright 2019 Google LLC 3976 * 3977 * Licensed under the Apache License, Version 2.0 (the "License"); 3978 * you may not use this file except in compliance with the License. 3979 * You may obtain a copy of the License at 3980 * 3981 * http://www.apache.org/licenses/LICENSE-2.0 3982 * 3983 * Unless required by applicable law or agreed to in writing, software 3984 * distributed under the License is distributed on an "AS IS" BASIS, 3985 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3986 * See the License for the specific language governing permissions and 3987 * limitations under the License. 3988 */async function M_(t){let e;const n=await C6(t.appConfig,r=>{const i=iue(r),s=sue(t,i);return e=s.registrationPromise,s.installationEntry});return n.fid===Jx?{installationEntry:await e}:{installationEntry:n,registrationPromise:e}}function iue(t){const e=t||{fid:Jle(),registrationStatus:0};return NL(e)}function sue(t,e){if(e.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(Wf.create("app-offline"));return{installationEntry:e,registrationPromise:i}}const n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},r=oue(t,n);return{installationEntry:n,registrationPromise:r}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:aue(t)}:{installationEntry:e}}async function oue(t,e){try{const n=await Kle(t,e);return Xw(t.appConfig,n)}catch(n){throw vL(n)&&n.customData.serverCode===409?await kL(t.appConfig):await Xw(t.appConfig,{fid:e.fid,registrationStatus:0}),n}}async function aue(t){let e=await g9(t.appConfig);for(;e.registrationStatus===1;)await TL(100),e=await g9(t.appConfig);if(e.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await M_(t);return r||n}return e}function g9(t){return C6(t,e=>{if(!e)throw Wf.create("installation-not-found");return NL(e)})}function NL(t){return cue(t)?{fid:t.fid,registrationStatus:0}:t}function cue(t){return t.registrationStatus===1&&t.registrationTime+yL<Date.now()}/** 3989 * @license 3990 * Copyright 2019 Google LLC 3991 * 3992 * Licensed under the Apache License, Version 2.0 (the "License");
3993 * you may not use this file except in compliance with the License. 3994 * You may obtain a copy of the License at 3995 * 3996 * http://www.apache.org/licenses/LICENSE-2.0 3997 * 3998 * Unless required by applicable law or agreed to in writing, software 3999 * distributed under the License is distributed on an "AS IS" BASIS, 4000 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4001 * See the License for the specific language governing permissions and 4002 * limitations under the License. 4003 */async function lue({appConfig:t,heartbeatServiceProvider:e},n){const r=uue(t,n),i=$le(t,n),s=e.getImmediate({optional:!0});if(s){const d=await s.getHeartbeatsHeader();d&&i.append("x-firebase-client",d)}const a={installation:{sdkVersion:bL,appId:t.appId}},l={method:"POST",headers:i,body:JSON.stringify(a)},u=await _L(()=>fetch(r,l));if(u.ok){const d=await u.json();return EL(d)}else throw await xL("Generate Auth Token",u)}function uue(t,{fid:e}){return`${AL(t)}/${e}/authTokens:generate`}/** 4004 * @license 4005 * Copyright 2019 Google LLC 4006 * 4007 * Licensed under the Apache License, Version 2.0 (the "License"); 4008 * you may not use this file except in compliance with the License. 4009 * You may obtain a copy of the License at 4010 * 4011 * http://www.apache.org/licenses/LICENSE-2.0 4012 * 4013 * Unless required by applicable law or agreed to in writing, software 4014 * distributed under the License is distributed on an "AS IS" BASIS, 4015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4016 * See the License for the specific language governing permissions and 4017 * limitations under the License. 4018 */async function j_(t,e=!1){let n;const r=await C6(t.appConfig,s=>{if(!OL(s))throw Wf.create("not-registered");const a=s.authToken;if(!e&&hue(a))return s;if(a.requestStatus===1)return n=fue(t,e),s;{if(!navigator.onLine)throw Wf.create("app-offline");const l=mue(s);return n=due(t,l),l}});return n?await n:r.authToken}async function fue(t,e){let n=await y9(t.appConfig);for(;n.authToken.requestStatus===1;)await TL(100),n=await y9(t.appConfig);const r=n.authToken;return r.requestStatus===0?j_(t,e):r}function y9(t){return C6(t,e=>{if(!OL(e))throw Wf.create("not-registered");const n=e.authToken;return gue(n)?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function due(t,e){try{const n=await lue(t,e),r=Object.assign(Object.assign({},e),{authToken:n});return await Xw(t.appConfig,r),n}catch(n){if(vL(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await kL(t.appConfig);else{const r=Object.assign(Object.assign({},e),{authToken:{requestStatus:0}});await Xw(t.appConfig,r)}throw n}}function OL(t){return t!==void 0&&t.registrationStatus===2}function hue(t){return t.requestStatus===2&&!pue(t)}function pue(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+Vle}function mue(t){const e={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:e})}function gue(t){return t.requestStatus===1&&t.requestTime+yL<Date.now()}/** 4019 * @license 4020 * Copyright 2019 Google LLC 4021 * 4022 * Licensed under the Apache License, Version 2.0 (the "License"); 4023 * you may not use this file except in compliance with the License. 4024 * You may obtain a copy of the License at 4025 * 4026 * http://www.apache.org/licenses/LICENSE-2.0 4027 * 4028 * Unless required by applicable law or agreed to in writing, software 4029 * distributed under the License is distributed on an "AS IS" BASIS, 4030 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4031 * See the License for the specific language governing permissions and 4032 * limitations under the License. 4033 */async function yue(t){const e=t,{installationEntry:n,registrationPromise:r}=await M_(e);return r?r.catch(console.error):j_(e).catch(console.error),n.fid}/** 4034 * @license 4035 * Copyright 2019 Google LLC 4036 * 4037 * Licensed under the Apache License, Version 2.0 (the "License"); 4038 * you may not use this file except in compliance with the License. 4039 * You may obtain a copy of the License at 4040 * 4041 * http://www.apache.org/licenses/LICENSE-2.0 4042 * 4043 * Unless required by applicable law or agreed to in writing, softw
4043are 4044 * distributed under the License is distributed on an "AS IS" BASIS, 4045 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4046 * See the License for the specific language governing permissions and 4047 * limitations under the License. 4048 */async function bue(t,e=!1){const n=t;return await wue(n),(await j_(n,e)).token}async function wue(t){const{registrationPromise:e}=await M_(t);e&&await e}/** 4049 * @license 4050 * Copyright 2019 Google LLC 4051 * 4052 * Licensed under the Apache License, Version 2.0 (the "License"); 4053 * you may not use this file except in compliance with the License. 4054 * You may obtain a copy of the License at 4055 * 4056 * http://www.apache.org/licenses/LICENSE-2.0 4057 * 4058 * Unless required by applicable law or agreed to in writing, software 4059 * distributed under the License is distributed on an "AS IS" BASIS, 4060 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4061 * See the License for the specific language governing permissions and 4062 * limitations under the License. 4063 */function vue(t){if(!t||!t.options)throw W3("App Configuration");if(!t.name)throw W3("App Name");const e=["projectId","apiKey","appId"];for(const n of e)if(!t.options[n])throw W3(n);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function W3(t){return Wf.create("missing-app-config-values",{valueName:t})}/** 4064 * @license 4065 * Copyright 2020 Google LLC 4066 * 4067 * Licensed under the Apache License, Version 2.0 (the "License"); 4068 * you may not use this file except in compliance with the License. 4069 * You may obtain a copy of the License at 4070 * 4071 * http://www.apache.org/licenses/LICENSE-2.0 4072 * 4073 * Unless required by applicable law or agreed to in writing, software 4074 * distributed under the License is distributed on an "AS IS" BASIS, 4075 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4076 * See the License for the specific language governing permissions and 4077 * limitations under the License. 4078 */const BL="installations",Aue="installations-internal",Eue=t=>{const e=t.getProvider("app").getImmediate(),n=vue(e),r=zy(e,"heartbeat");return{app:e,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},xue=t=>{const e=t.getProvider("app").getImmediate(),n=zy(e,BL).getImmediate();return{getId:()=>yue(n),getToken:i=>bue(n,i)}};function Cue(){Fl(new oc(BL,Eue,"PUBLIC")),Fl(new oc(Aue,xue,"PRIVATE"))}Cue();Po(gL,P_);Po(gL,P_,"esm2017");/** 4079 * @license 4080 * Copyright 2019 Google LLC 4081 * 4082 * Licensed under the Apache License, Version 2.0 (the "License"); 4083 * you may not use this file except in compliance with the License. 4084 * You may obtain a copy of the License at 4085 * 4086 * http://www.apache.org/licenses/LICENSE-2.0 4087 * 4088 * Unless required by applicable law or agreed to in writing, software 4089 * distributed under the License is distributed on an "AS IS" BASIS, 4090 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4091 * See the License for the specific language governing permissions and 4092 * limitations under the License. 4093 */const Zw="analytics",_ue="firebase_id",Tue="origin",Sue=60*1e3,Iue="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",L_="https://www.googletagmanager.com/gtag/js";/** 4094 * @license 4095 * Copyright 2019 Google LLC 4096 * 4097 * Licensed under the Apache License, Version 2.0 (the "License"); 4098 * you may not use this file except in compliance with the License. 4099 * You may obtain a copy of the License at 4100 * 4101 * http://www.apache.org/licenses/LICENSE-2.0 4102 * 4103 * Unless required by applicable law or agreed to in writing, software 4104 * distributed under the License is distributed on an "AS IS" BASIS, 4105 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4106 * See the License for the specific language governing permissions and 4107 * limitations under the License. 4108 */const li=new Z2("@firebase/analytics");/** 4109 * @license 4110 * Copyright 2019 Google LLC 4111 * 4112 * Licensed under the Apache License, Version 2.0 (the "License"); 4113 * you may not use this file except in compliance with the License. 4114 * You may obtain a copy of the License at 4115 * 4116 * http://www.apache.org/licenses/LICENSE-2.0 4117 * 4118 * Unless required by applicable law or agreed to in writing, softw
4118are 4119 * distributed under the License is distributed on an "AS IS" BASIS, 4120 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4121 * See the License for the specific language governing permissions and 4122 * limitations under the License. 4123 */const Rue={"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},Pi=new n6("analytics","Analytics",Rue);/** 4124 * @license 4125 * Copyright 2019 Google LLC 4126 * 4127 * Licensed under the Apache License, Version 2.0 (the "License"); 4128 * you may not use this file except in compliance with the License. 4129 * You may obtain a copy of the License at 4130 * 4131 * http://www.apache.org/licenses/LICENSE-2.0 4132 * 4133 * Unless required by applicable law or agreed to in writing, software 4134 * distributed under the License is distributed on an "AS IS" BASIS, 4135 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4136 * See the License for the specific language governing permissions and 4137 * limitations under the License. 4138 */function kue(t){if(!t.startsWith(L_)){const e=Pi.create("invalid-gtag-resource",{gtagURL:t});return li.warn(e.message),""}return t}function PL(t){return Promise.all(t.map(e=>e.catch(n=>n)))}function Nue(t,e){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(t,e)),n}function Oue(t,e){const n=Nue("firebase-js-sdk-policy",{createScriptURL:kue}),r=document.createElement("script"),i=`${L_}?l=${t}&id=${e}`;r.src=n?n==null?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function Bue(t){let e=[];return Array.isArray(window[t])?e=window[t]:window[t]=e,e}async function Pue(t,e,n,r,i,s){const a=r[i];try{if(a)await e[a];else{const u=(await PL(n)).find(d=>d.measurementId===i);u&&await e[u.appId]}}catch(l){li.error(l)}t("config",i,s)}async function Due(t,e,n,r,i){try{let s=[];if(i&&i.send_to){let a=i.send_to;Array.isArray(a)||(a=[a]);const l=await PL(n);for(const u of a){const d=l.find(m=>m.measurementId===u),h=d&&e[d.appId];if(h)s.push(h);else{s=[];break}}}s.length===0&&(s=Object.values(e)),await Promise.all(s),t("event",r,i||{})}catch(s){li.error(s)}}function Mue(t,e,n,r){async function i(s,...a){try{if(s==="event"){const[l,u]=a;await Due(t,e,n,l,u)}else if(s==="config"){const[l,u]=a;await Pue(t,e,n,r,l,u)}else if(s==="consent"){const[l,u]=a;t("consent",l,u)}else if(s==="get"){const[l,u,d]=a;t("get",l,u,d)}else if(s==="set"){const[l]=a;t("set",l)}else t(s,...a)}catch(l){li.error(l)}}return i}function jue(t,e,n,r,i){let s=function(...a){window[r].push(arguments)};return window[i]&&typeof window[i]=="function"&&(s=window[i]),window[i]=Mue(s,t,e,n),{gtagCore:s,wrappedGtag:window[i]}}function Lue(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes(L_)&&n.src.includes(t))return n;return null}/** 4139 * @license 4140 * Copyright 2020 Google LLC 4141 * 4142 * Licensed under the Apache License, Version 2.0 (the "License");
4143 * you may not use this file except in compliance with the License. 4144 * You may obtain a copy of the License at 4145 * 4146 * http://www.apache.org/licenses/LICENSE-2.0 4147 * 4148 * Unless required by applicable law or agreed to in writing, software 4149 * distributed under the License is distributed on an "AS IS" BASIS, 4150 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4151 * See the License for the specific language governing permissions and 4152 * limitations under the License. 4153 */const Uue=30,Fue=1e3;class Vue{constructor(e={},n=Fue){this.throttleMetadata=e,this.intervalMillis=n}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,n){this.throttleMetadata[e]=n}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const DL=new Vue;function zue(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function Hue(t){var e;const{appId:n,apiKey:r}=t,i={method:"GET",headers:zue(r)},s=Iue.replace("{app-id}",n),a=await fetch(s,i);if(a.status!==200&&a.status!==304){let l="";try{const u=await a.json();!((e=u.error)===null||e===void 0)&&e.message&&(l=u.error.message)}catch{}throw Pi.create("config-fetch-failed",{httpStatus:a.status,responseMessage:l})}return a.json()}async function que(t,e=DL,n){const{appId:r,apiKey:i,measurementId:s}=t.options;if(!r)throw Pi.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw Pi.create("no-api-key")}const a=e.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},l=new Que;return setTimeout(async()=>{l.abort()},Sue),ML({appId:r,apiKey:i,measurementId:s},a,l,e)}async function ML(t,{throttleEndTimeMillis:e,backoffCount:n},r,i=DL){var s;const{appId:a,measurementId:l}=t;try{await $ue(r,e)}catch(u){if(l)return li.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${l} provided in the "measurementId" field in the local Firebase config. [${u==null?void 0:u.message}]`),{appId:a,measurementId:l};throw u}try{const u=await Hue(t);return i.deleteThrottleMetadata(a),u}catch(u){const d=u;if(!Gue(d)){if(i.deleteThrottleMetadata(a),l)return li.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${l} provided in the "measurementId" field in the local Firebase config. [${d==null?void 0:d.message}]`),{appId:a,measurementId:l};throw u}const h=Number((s=d==null?void 0:d.customData)===null||s===void 0?void 0:s.httpStatus)===503?l7(n,i.intervalMillis,Uue):l7(n,i.intervalMillis),m={throttleEndTimeMillis:Date.now()+h,backoffCount:n+1};return i.setThrottleMetadata(a,m),li.debug(`Calling attemptFetch again in ${h} millis`),ML(t,m,r,i)}}function $ue(t,e){return new Promise((n,r)=>{const i=Math.max(e-Date.now(),0),s=setTimeout(n,i);t.addEventListener(()=>{clearTimeout(s),r(Pi.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function Gue(t){if(!(t instanceof Jl)||!t.customData)return!1;const e=Number(t.customData.httpStatus);return e===429||e===500||e===503||e===504}class Que{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Kue(t,e,n,r,i){if(i&&i.global){t("event",n,r);return}else{const s=await e,a=Object.assign(Object.assign({},r),{send_to:s});t("event",n,a)}}/** 4154 * @license 4155 * Copyright 2020 Google LLC 4156 * 4157 * Licensed under the Apache License, Version 2.0 (the "License"); 4158 * you may not use this file except in compliance with the License. 4159 * You may obtain a copy of the License at 4160 * 4161 * http://www.apache.org/licenses/LICENSE-2.0 4162 * 4163 * Unless required by applicable law or agreed to in writing, software 4164 * distributed under the License is distributed on an "AS IS" BASIS, 4165 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4166 * See the License for the specific language governing permissions and 4167 * limitations under the License. 4168 */async function Wue(){if(EM())try{await xM()}catch(t){return li.warn(Pi.create("indexeddb-unavailable",{errorInfo:t==null?void 0:t.toString()}).message),!1}else return li.warn(Pi.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function Yue(t,e,n,r,i,s,a){var l;const u=que(t);u.then(w=>{n[w.measurementId]=w.appId,t.options.measurementId&&w.measurementId!==t.options.measurementId&&li.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${w.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(w=>li.error(w)),e.push(u);const d=Wue().then(w=>
4168{if(w)return r.getId()}),[h,m]=await Promise.all([u,d]);Lue(s)||Oue(s,h.measurementId),i("js",new Date);const g=(l=a==null?void 0:a.config)!==null&&l!==void 0?l:{};return g[Tue]="firebase",g.update=!0,m!=null&&(g[_ue]=m),i("config",h.measurementId,g),h.measurementId}/** 4169 * @license 4170 * Copyright 2019 Google LLC 4171 * 4172 * Licensed under the Apache License, Version 2.0 (the "License"); 4173 * you may not use this file except in compliance with the License. 4174 * You may obtain a copy of the License at 4175 * 4176 * http://www.apache.org/licenses/LICENSE-2.0 4177 * 4178 * Unless required by applicable law or agreed to in writing, software 4179 * distributed under the License is distributed on an "AS IS" BASIS, 4180 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4181 * See the License for the specific language governing permissions and 4182 * limitations under the License. 4183 */class Jue{constructor(e){this.app=e}_delete(){return delete ug[this.app.options.appId],Promise.resolve()}}let ug={},b9=[];const w9={};let Y3="dataLayer",Xue="gtag",v9,jL,A9=!1;function Zue(){const t=[];if(fse()&&t.push("This is a browser extension environment."),hse()||t.push("Cookies are not available."),t.length>0){const e=t.map((r,i)=>`(${i+1}) ${r}`).join(" "),n=Pi.create("invalid-analytics-context",{errorInfo:e});li.warn(n.message)}}function efe(t,e,n){Zue();const r=t.options.appId;if(!r)throw Pi.create("no-app-id");if(!t.options.apiKey)if(t.options.measurementId)li.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw Pi.create("no-api-key");if(ug[r]!=null)throw Pi.create("already-exists",{id:r});if(!A9){Bue(Y3);const{wrappedGtag:s,gtagCore:a}=jue(ug,b9,w9,Y3,Xue);jL=s,v9=a,A9=!0}return ug[r]=Yue(t,b9,w9,e,v9,Y3,n),new Jue(t)}function tfe(t=IM()){t=$o(t);const e=zy(t,Zw);return e.isInitialized()?e.getImmediate():nfe(t)}function nfe(t,e={}){const n=zy(t,Zw);if(n.isInitialized()){const i=n.getImmediate();if(qg(e,n.getOptions()))return i;throw Pi.create("already-initialized")}return n.initialize({options:e})}function rfe(t,e,n,r){t=$o(t),Kue(jL,ug[t.app.options.appId],e,n,r).catch(i=>li.error(i))}const E9="@firebase/analytics",x9="0.10.17";function ife(){Fl(new oc(Zw,(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("installations-internal").getImmediate();return efe(r,i,n)},"PUBLIC")),Fl(new oc("analytics-internal",t,"PRIVATE")),Po(E9,x9),Po(E9,x9,"esm2017");function t(e){try{const n=e.getProvider(Zw).getImmediate();return{logEvent:(r,i,s)=>rfe(n,r,i,s)}}catch(n){throw Pi.create("interop-component-reg-failed",{reason:n})}}}ife();const sfe={apiKey:"AIzaSyA3UcpnjAwN5N5EQUwNCyofPU4AF8d2rcQ",authDomain:"reviews-d3db6.firebaseapp.com",projectId:"reviews-d3db6",storageBucket:"reviews-d3db6.appspot.com",messagingSenderId:"1058129381478",appId:"1:1058129381478:web:b2a6f8cdb2e935f545c5a7",measurementId:"G-Z4LV0EWJ7Y"},_6=SM(sfe);tfe(_6);const LL=b6(_6);async function UL({cardId:t,userId:e,text:n,createdAt:r}){const i=(n||"").trim();!t||!e||i.length===0||await mL(y6(LL,"cards",t,"comments"),{cardId:t,userId:e,text:i,createdAt:r})}async function FL(t){return(await hL(y6(LL,"cards",t,"comments"))).docs.map(n=>({id:n.id,...n.data()}))}const ofe=({cardId:t})=>{const[e,n]=K.useState([]);return K.useEffect(()=>{FL(t).then(n);const r=i=>{i.detail.cardId===t&&n(s=>[{id:String(i.detail.createdAt),cardId:t,userId:i.detail.userId,text:i.detail.text,createdAt:i.detail.createdAt},...s])};return window.addEventListener("new-comment",r),()=>window.removeEventListener("new-comment",r)},[t]),e.length===0?null:G.jsxs("div",{className:"mt-3 space-y-2",children:[e.slice(0,3).map(r=>G.jsxs("div",{className:"flex items-start space-x-2",children:[G.jsx("img",{src:`https://api.dicebear.com/7.x/pixel-art/svg?seed=${encodeURIComponent(r.userId||"anon")}`,className:"w-6 h-6 rounded-full"}),G.jsx("div",{className:"text-xs",style:{color:"var(--text-secondary)"},children:r.text})]},r.id)),e.length>3&&G.jsxs("div",{className:"text-xs",style:{color:"var(--text-secondary)"},children:["and ",e.length-3," moreâ¦"]})]})};let Jm=null;async function afe(){if(Jm)return Jm;if(typeof window>"u"||!window.ethereum)throw new Error("Ethereum provider not found. Please install MetaMask or connect a wallet.");const t=await Te(()=>import("https://cdn.zama.org/relayer-sdk-js/0.2.0/relayer-sdk-js.js"),[]),{initSDK:e,createInstance:n,SepoliaConfig:r}=t;await e();const i={...r,network:window.ethereum};return Jm=await n(i),Jm}function VL(){return Jm}async function cfe(t){var n,r;const e=VL();if(!e)throw new Error("FHE instance not initialized. Call initializeFheInstance() first.");try{let i=t;if(typeof i=="string"&&i.startsWith("0x")&&i.length===66){const s=await e.publicDecrypt([i]);return Number(s[i])}else throw new Error("Invalid ciphertext handle for decryption")}catch(i){throw(n=i==null?void 0:i.message)!=null&&n.includes("Failed to fetch")||(r=i==null?void 0:i.message)!=null&&r.includes("NetworkError")?new Error("Decryption service is temporarily unavailable. Please try again later."):i}}async function C9(t,e=3){let n;for(let r=0;r<e;r++)try{return await cfe(t)}catch(i){n=i;const s=String((i==null?void 0:i.message)||"").toLowerCase();if(!(s.includes("failed to fetch")||s.includes("temporarily unavailable")||s.includes("network")))break;const l=250*Math.pow(2,r);await new Promise(u=>setTimeout(u,l))}throw n}async function lfe(t,e,n=3){let r=null;for(let i=0;i<n;i++){const s=await e.getEncryptedStats(t),a=(s==null?void 0:s.sum)||(s==null?void 0:s[0]),l=(s==null?void 0:s.count)||(s==null?void 0:s[1]);if(r&&r.s===a&&r.c===l)return{encryptedSum:a,encryptedCount:l};r={s:a,c:l},await new Promise(u=>setTimeout(u,50))}return{encryptedSum:(r==null?void 0:r.s)||"0x",encryptedCount:(r==null?void 0:r.c)||"0x"}}function ufe(t,e){return e&&e>0&&t===0?"Encrypted":t===0?"No ratings yet":t.toFixed(1)}async function ffe(t,e,n=2e4){const r=Date.now()+Math.max(2e3,n);let i=0;for(;Date.now()<r;){i++;try{const{encryptedSum:s,encryptedCount:a}=await lfe(t,e,3);console.log("[FHE] attempt stable stats",{cardId:String(t),encryptedSum:s,encryptedCount:a,attempt:i});const l=await C9(s,4);await new Promise(h=>setTimeout(h,150));const u=await C9(a,4),d=u>0?l/u:0;return console.log("[FHE] success decrypt",{cardId:String(t),sum:l,count:u,average:d,attempt:i}),{sum:l,count:u,average:d}}catch(s){const a=Math.min(2e3,250*Math.pow(2,Math.min(4,i)));console.log("[FHE] decrypt retry",{cardId:String(t),attempt:i,backoff:a,error:String((s==null?void 0:s.message)||s)}),await new Promise(l=>setTimeout(l,a))}}return console.log("[FHE] decrypt timeout",{cardId:String(t),budgetMs:n}),null}const dfe=({card:t,onClick:e})=>G.jsxs("div",{onClick:e,className:"relative sticky-note hover:shadow-xl transition-all duration-300 cursor-pointer group overflow-hidden",children:[G.jsx("div",{className:"sticky-pin"}),G.jsxs("div",{className:"relative p-7",children:[G.jsxs("div",{className:"flex items-start justify-between mb-4",children:[G.jsxs("div",{className:"flex items-center space-x-3",children:[t.twitterHandle&&G.jsx("div",{className:"w-12 h-12 rounded-full border",style:{borderColor:"var(--border-dark)",overflow:"hidden",backgroundColor:"var(--sepia-100)"},children:G.jsx("img",{src:`https://unavatar.io/twitter/${t.twitterHandle}`,alt:t.kolName||t.title,className:"w-full h-full object-cover"})}),G.jsxs("div",{children:[G.jsx("h3",{className:"text-lg font-semibold transition-colors duration-200 group-hover:opacity-80",style:{color:"var(--text-primary-dark)"},children:t.kolName||t.title}),t.twitterHandle&&G.jsxs("p",{className:"text-xs",style:{color:"var(--text-secondary)"},children:["@",t.twitterHandle]})]})]}),G.jsx("div",{className:"flex items-center space-x-1",style:{color:"var(--text-secondary)"},children:G.jsx(ww,{className:"w-4 h-4"})})]}),t.description&&G.jsx("p",{className:"text-sm mb-4 line-clamp-2",style:{color:"var(--text-secondary)"},children:t.description}),G.jsxs("div",{className:"flex items-center justify-between",children:[G.jsxs("div",{className:"flex flex-col",children:[G.jsxs("div",{className:"flex items-center space-x-2",children:[G.jsx(bM,{rating:t.averageRating??0}),t.isDecrypting?G.jsx("span",{className:"animate-spin w-5 h-5 border-2 border-t-transparent roun
4183ded-full",style:{borderColor:"var(--sepia-500)"}}):t.decryptionError?G.jsx("span",{style:{color:"var(--sepia-700)"},title:"Decryption relayer is down for maintenance. Ratings will be visible once service is restored.",children:G.jsx(ww,{className:"inline w-5 h-5"})}):(t.totalReviews??0)>0?G.jsx("span",{className:"text-base font-semibold",style:{color:"var(--text-primary-dark)"},children:ufe(t.averageRating??0,t.totalReviews)}):null]}),G.jsx("span",{className:"text-xs mt-1",style:{color:"var(--text-secondary)"},children:(t.totalReviews??0)===0?"No ratings yet":`${t.totalReviews} ${t.totalReviews===1?"rating":"ratings"}`})]}),G.jsxs("div",{className:"flex items-center space-x-2",style:{color:"var(--text-secondary)"},children:[G.jsx("button",{className:"px-3 py-1 text-xs sepia-button",onClick:n=>{n.stopPropagation(),e()},children:"Rate"}),t.id&&G.jsx("a",{className:"px-3 py-1 text-xs sepia-button",href:"#",onClick:n=>{n.preventDefault(),n.stopPropagation(),window.dispatchEvent(new CustomEvent("open-comments",{detail:{cardId:t.id}}))},children:"Comments"})]})]})]}),t.id&&G.jsx(ofe,{cardId:t.id})]}),hfe=()=>G.jsx("div",{className:"relative sticky-note animate-pulse",children:G.jsxs("div",{className:"p-6",children:[G.jsx("div",{className:"h-6 w-1/2 rounded mb-4",style:{backgroundColor:"var(--sepia-200)"}}),G.jsx("div",{className:"h-4 w-3/4 rounded mb-2",style:{backgroundColor:"var(--sepia-200)"}}),G.jsx("div",{className:"h-4 w-2/3 rounded mb-6",style:{backgroundColor:"var(--sepia-200)"}}),G.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[G.jsx("div",{className:"h-6 w-24 rounded",style:{backgroundColor:"var(--sepia-200)"}}),G.jsx("div",{className:"h-6 w-6 rounded-full",style:{backgroundColor:"var(--sepia-200)"}})]}),G.jsx("div",{className:"h-4 w-1/3 rounded",style:{backgroundColor:"var(--sepia-200)"}})]})}),pfe=({cards:t,onCardClick:e,loading:n})=>n?G.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:6}).map((r,i)=>G.jsx(hfe,{},i))}):t.length===0?G.jsx("div",{className:"text-center py-12",children:G.jsxs("div",{className:"max-w-md mx-auto",children:[G.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:"var(--sepia-300)"},children:G.jsx("div",{className:"w-8 h-8 rounded-full",style:{backgroundColor:"var(--sepia-500)"}})}),G.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"var(--text-primary-dark)"},children:"No cards yet"}),G.jsx("p",{style:{color:"var(--text-secondary)"},children:"Create your first review card to get started with community feedback."})]})}):G.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map((r,i)=>G.jsx(dfe,{card:r,onClick:()=>e(r)},r.id||i))}),mfe=({isOpen:t,onClose:e,onSubmit:n,isLoading:r,creationFee:i,ethBalance:s})=>{const[a,l]=K.useState(""),[u,d]=K.useState(""),[h,m]=K.useState(""),g=u?`https://unavatar.io/twitter/${u.replace("@","")}`:"",w=T=>{T.preventDefault(),a.trim()&&u.trim()&&(n({title:a,description:h,twitterHandle:u.replace("@",""),twitterAvatarUrl:g}),l(""),d(""),m(""))},A=parseFloat(i||"0.005"),x=parseFloat(s||"0")>=A;return t?G.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center min-h-screen",children:[G.jsx("div",{className:"fixed inset-0 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.3)"},onClick:e}),G.jsxs("div",{className:"relative w-full max-w-xl p-8 overflow-hidden text-left align-middle transition-all transform rounded-2xl",style:{backgroundColor:"var(--sepia-50)",border:"1px solid var(--border-dark)",boxShadow:"0 10px 0 0 #C4843C"},children:[G.jsxs("div",{className:"flex items-center justify-between mb-6",children:[G.jsxs("div",{className:"flex items-center space-x-3",children:[G.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full border",style:{backgroundColor:"var(--sepia-300)",borderColor:"var(--border-dark)"},children:G.jsx(eN,{className:"w-6 h-6",style:{color:"#3B2F2F"}})}),G.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-primary-dark)"},children:"Create Rating Card"})]}),G.jsx("button",{onClick:e,className:"p-2 rounded-full transition-colors duration-200",style:{color:"var(--text-secondary)"},children:G.jsx(Iy,{className:"w-5 h-5"})})]}),G.jsx("div",{className:"mb-2 flex justify-end",children:G.jsxs("span",{className:"inline-block px-3 py-1 rounded-full text-xs font-semibold",style:{backgroundColor:"var(--sepia-100)",color:"#5B4A3A",border:"1px solid var(--border-dark)"},children:["Card creation fee: ",i||"0.005"," ETH"]})}),G.jsx("div",{className:"mb-3 p-3 rounded-lg",style:{backgroundColor:"var(--sepia-100)",border:"1px solid var(--border-dark)"},children:G.jsx("div",{className:"text-sm",style:{color:"var(--text-secondary)"},children:u?G.jsxs(G.Fragment,{children:["You are creating a rating card for ",G.jsxs("span",{className:"font-semibold",style:{color:"#5B4A3A"},children:["@",u.replace("@","")]}),"."]}):G.jsx(G.Fragment,{children:"Enter the name and X handle to create a rating card (works for creators, KOLs, influencers, or any X profile)."})})}),G.jsx("div",{className:"mb-6 p-4 rounded-lg",style:{backgroundColor:"var(--sepia-100)",border:"1px solid var(--border-dark)"},children:G.jsxs("div",{className:"flex items-start space-x-3",children:[G.jsx(jp,{className:"w-5 h-5 mt-0.5",style:{color:"var(--sepia-600)"}}),G.jsxs("div",{children:[G.jsx("p",{className:"text-sm font-medium",style:{color:"#5B4A3A"},children:"Privacy First"}),G.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"All ratings are encrypted and anonymous. Only average ratings are visible."})]})]})}),G.jsxs("form",{onSubmit:w,className:"space-y-4",children:[G.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[G.jsxs("div",{children:[G.jsx("label",{htmlFor:"kolName",className:"block text-sm font-medium mb-2",style:{color:"var(--text-primary-dark)"},children:"Name or Profile Title *"}),G.jsx("input",{type:"text",id:"kolName",required:!0,value:a,onChange:T=>l(T.target.value),className:"w-full px-3 py-2 sepia-input",placeholder:"e.g. John Doe or Project Alpha"})]}),G.jsxs("div",{children:[G.jsx("label",{htmlFor:"twitter",className:"block text-sm font-medium mb-2",style:{color:"var(--text-primary-dark)"},children:"X handle (username) *"}),G.jsxs("div",{className:"flex items-center space-x-3",children:[G.jsx("input",{type:"text",id:"twitter",required:!0,value:u,onChange:T=>d(T.target.value),className:"flex-1 px-3 py-2 sepia-input",placeholder:"username (without @)"}
4183),G.jsx("div",{className:"w-14 h-14 rounded-full border",style:{borderColor:"var(--border-dark)",backgroundColor:"var(--sepia-100)",overflow:"hidden"},children:g&&G.jsx("img",{src:g,alt:"avatar",className:"w-full h-full object-cover"})})]})]})]}),G.jsxs("div",{children:[G.jsx("label",{htmlFor:"description",className:"block text-sm font-medium mb-2",style:{color:"var(--text-primary-dark)"},children:"Description"}),G.jsx("textarea",{id:"description",value:h,onChange:T=>m(T.target.value),className:"w-full px-3 py-2 sepia-input min-h-[60px]",placeholder:"Add more context or details (optional)"})]}),G.jsxs("div",{className:"flex space-x-3 pt-4",children:[G.jsx("button",{type:"button",onClick:e,className:"flex-1 px-4 py-2 rounded-lg transition-colors duration-200 sepia-button",children:"Cancel"}),G.jsx("button",{type:"submit",disabled:r||!a.trim()||!u.trim()||!x,className:"flex-1 px-4 py-2 font-medium rounded-lg transition-colors duration-200 disabled:cursor-not-allowed sepia-button",children:r?"Creating...":"Create Card"})]}),G.jsxs("div",{className:"mt-6",children:[G.jsx("p",{className:"text-sm mb-2",style:{color:"var(--text-secondary)"},children:"Preview"}),G.jsxs("div",{className:"sticky-note p-4",children:[G.jsxs("div",{className:"flex items-center space-x-3 mb-3",children:[G.jsx("div",{className:"w-12 h-12 rounded-full border",style:{borderColor:"var(--border-dark)",overflow:"hidden",backgroundColor:"var(--sepia-100)"},children:g?G.jsx("img",{src:g,alt:"avatar",className:"w-full h-full object-cover"}):null}),G.jsxs("div",{children:[G.jsx("div",{className:"text-base font-semibold",style:{color:"var(--text-primary-dark)"},children:a||"Name / Profile"}),G.jsx("div",{className:"text-xs",style:{color:"var(--text-secondary)"},children:u?`@${u.replace("@","")}`:"@handle"})]})]}),G.jsx("div",{className:"text-sm",style:{color:"var(--text-secondary)"},children:h||"Short description about the person/profile or what to rate."})]})]})]}),!x&&!0&&G.jsx("div",{className:"text-xs mt-2 text-center",style:{color:"#e53e3e"},children:"Insufficient ETH to pay the creation fee."})]})]}):null},gfe=({isOpen:t,onClose:e,onSubmit:n,card:r,isLoading:i,reviewStatus:s="idle",hasVoted:a=!1})=>{const[l,u]=K.useState(0),[d,h]=K.useState(0),[m,g]=K.useState(""),w=x=>{x.preventDefault();const T=m.trim(),O=!a&&l>0,k=a&&T.length>0;(O||k)&&n({rating:O?l:0,comment:T||void 0})},A=()=>{u(0),h(0),e()};if(!t||!r)return null;let v=a?"Submit Comment":"Submit Rating";return i&&(a?v="Submitting...":s==="encrypting"?v="Encrypting...":s==="reviewing"?v="Rating...":v="Submitting..."),G.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center min-h-screen",children:[G.jsx("div",{className:"fixed inset-0 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.3)"},onClick:A}),G.jsxs("div",{className:"relative w-full max-w-lg p-6 overflow-hidden text-left align-middle transition-all transform rounded-2xl",style:{backgroundColor:"var(--sepia-50)",border:"1px solid var(--border-dark)",boxShadow:"0 10px 0 0 #C4843C"},children:[G.jsxs("div",{className:"flex items-center justify-between mb-6",children:[G.jsxs("div",{className:"flex items-center space-x-3",children:[G.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full border",style:{backgroundColor:"var(--sepia-300)",borderColor:"var(--border-dark)"},children:G.jsx(m5,{className:"w-6 h-6",style:{color:"#3B2F2F"}})}),G.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-primary-dark)"},children:"Submit Rating"})]}),G.jsx("button",{onClick:A,className:"p-2 rounded-full transition-colors duration-200",style:{color:"var(--text-secondary)"},children:G.jsx(Iy,{className:"w-5 h-5"})})]}),G.jsxs("div",{className:"mb-6 p-4 rounded-lg",style:{backgroundColor:"var(--sepia-100)",border:"1px solid var(--border-dark)"},children:[G.jsx("h4",{className:"font-semibold mb-2",style:{color:"var(--text-primary-dark)"},children:r.title}),r.description&&G.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:r.description}),G.jsxs("div",{className:"flex items-center space-x-2 mt-3",children:[G.jsx(bM,{rating:r.averageRating??0,size:"sm"}),G.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary-dark)"},children:(r.averageRating??0).toFixed(1)}),G.jsxs("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:["(",r.totalReviews??0," ratings)"]})]})]}),G.jsx("div",{className:"mb-6 p-4 rounded-lg",style:{backgroundColor:"var(--sepia-100)",border:"1px solid var(--border-dark)"},children:G.jsxs("div",{className:"flex items-start space-x-3",children:[G.jsx(jp,{className:"w-5 h-5 mt-0.5",style:{color:"var(--sepia-600)"}}),G.jsxs("div",{children:[G.jsx("p",{className:"text-sm font-medium",style:{color:"#5B4A3A"},children:"Your Rating is Private"}),G.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"Your rating is encrypted and anonymous. Only the average rating is visible to others."})]})]})}),G.jsxs("form",{onSubmit:w,className:"space-y-6",children:[G.jsxs("div",{children:[G.jsx("label",{className:"block text-sm font-medium mb-3",style:{color:"var(--text-primary-dark)"},children:"Your Rating *"}),G.jsxs("div",{className:"flex items-center space-x-2",children:[[1,2,3,4,5].map(x=>G.jsx("button",{type:"button",onClick:()=>u(x),onMouseEnter:()=>h(x),onMouseLeave:()=>h(0),className:"p-1 rounded-full transition-colors duration-200",disabled:a,children:G.jsx(m5,{className:`w-8 h-8 transition-colors duration-200 ${x<=(d||l),""}`,style:{color:x<=(d||l)?"#E8BF6B":"#B8A68C",fill:x<=(d||l)?"#E8BF6B":"transparent"}})},x)),l>0&&G.jsxs("span",{className:"ml-3 text-lg font-semibold",style:{color:"var(--text-primary-dark)"},children:[l," star",l!==1?"s":""]})]}),a&&G.jsx("div",{className:"mt-2 text-sm font-semibold",style:{color:"#2f855a"},children:"You have already submitted a rating for this card."})]}),G.jsxs("div",{className:"flex space-x-3 pt-4",children:[G.jsx("button",{type:"button",onClick:A,className:"flex-1 px-4 py-2 rounded-lg transition-colors duration-200 sepia-button",children:"Cancel"}),G.jsxs("button",{type:"submit",disabled:i||!(!a&&l>0)&&!(a&&m.trim().length>0),className:"flex-1 px-4 py-2 font-medium rounded-lg transition-colors duration-200 disabled:cursor-not-allowed flex items-center justify-center space-x-2 sepia-button",children:[i?G.jsx("div",{className:"w-5 h-5 border-2 border-t-transparent roun
4183ded-full animate-spin",style:{borderColor:"#3B2F2F"}}):null,G.jsx(jz,{className:"w-4 h-4"}),G.jsx("span",{children:v})]})]})]})]})]})},yfe=({isOpen:t,onClose:e,cardId:n})=>{const[r,i]=K.useState(!1),[s,a]=K.useState([]),[l,u]=K.useState(""),{address:d}=gr();return K.useEffect(()=>{!t||!n||(i(!0),FL(n).then(h=>a(h)).finally(()=>i(!1)))},[t,n]),!t||!n?null:G.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center min-h-screen",children:[G.jsx("div",{className:"fixed inset-0 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.3)"},onClick:e}),G.jsxs("div",{className:"relative w-full max-w-2xl p-8 overflow-hidden text-left align-middle transition-all transform rounded-2xl",style:{backgroundColor:"var(--sepia-50)",border:"1px solid var(--border-dark)",boxShadow:"0 10px 0 0 #C4843C"},children:[G.jsxs("div",{className:"flex items-center justify-between mb-4",children:[G.jsxs("div",{className:"flex items-center space-x-2",children:[G.jsx(Oz,{className:"w-6 h-6",style:{color:"#3B2F2F"}}),G.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-primary-dark)"},children:"Comments"})]}),G.jsx("button",{onClick:e,className:"p-2 rounded-full",style:{color:"var(--text-secondary)"},children:G.jsx(Iy,{className:"w-5 h-5"})})]}),r?G.jsx("div",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"Loading..."}):s.length===0?G.jsx("div",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"No comments yet."}):G.jsx("ul",{className:"space-y-4 max-h-[28rem] overflow-auto pr-2",children:s.map(h=>G.jsxs("li",{className:"flex items-start space-x-3",children:[G.jsx("img",{src:`https://api.dicebear.com/7.x/pixel-art/svg?seed=${encodeURIComponent(h.userId||"anon")}`,alt:"avatar",className:"w-8 h-8 rounded-full"}),G.jsx("div",{children:G.jsx("div",{className:"text-sm",style:{color:"var(--text-primary-dark)"},children:h.text})})]},h.id))}),G.jsxs("div",{className:"mt-4",children:[G.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"var(--text-primary-dark)"},children:"Add a comment"}),G.jsx("textarea",{value:l,onChange:h=>u(h.target.value),className:"w-full px-3 py-2 sepia-input min-h-[70px]",placeholder:"Write your comment (anonymous)"}),G.jsx("div",{className:"mt-2 flex justify-end",children:G.jsx("button",{className:"px-4 py-2 sepia-button",onClick:async()=>{const h=l.trim();if(!n||!d||h.length===0)return;const m=Date.now();await UL({cardId:n,userId:d,text:h,createdAt:m}),a([{id:String(m),cardId:n,userId:d,text:h,createdAt:m},...s]),u(""),window.dispatchEvent(new CustomEvent("new-comment",{detail:{cardId:n,userId:d,text:h,createdAt:m}}))},children:"Submit Comment"})})]})]})]})},bfe=({isOpen:t,onClose:e})=>t?G.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center min-h-screen",children:[G.jsx("div",{className:"fixed inset-0 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.3)"},onClick:e}),G.jsxs("div",{className:"relative w-full max-w-xl p-8 overflow-hidden text-left align-middle transition-all transform rounded-2xl sticky-note",children:[G.jsx("div",{className:"sticky-pin"}),G.jsxs("div",{className:"flex items-center justify-between mb-6",children:[G.jsxs("div",{className:"flex items-center space-x-3",children:[G.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-full border",style:{backgroundColor:"var(--sepia-300)",borderColor:"var(--border-dark)"},children:G.jsx(ww,{className:"w-6 h-6",style:{color:"#3B2F2F"}})}),G.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-primary-dark)"},children:"Connect Wallet to Continue"})]}),G.jsx("button",{onClick:e,className:"p-2 rounded-full transition-colors duration-200",style:{color:"var(--text-secondary)"},children:G.jsx(Iy,{className:"w-5 h-5"})})]}),G.jsx("div",{className:"mb-6 p-4 rounded-lg",style:{backgroundColor:"var(--sepia-100)",border:"1px solid var(--border-dark)"},children:G.jsxs("div",{className:"flex items-start space-x-3",children:[G.jsx(jp,{className:"w-5 h-5 mt-0.5",style:{color:"var(--sepia-600)"}}),G.jsxs("div",{children:[G.jsx("p",{className:"text-sm font-medium",style:{color:"#5B4A3A"},children:"Private Ratings Require Wallet"}),G.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"Connect your wallet to view decrypted ratings and submit anonymous reviews powered by ZAMA FHE."})]})]})}),G.jsxs("div",{className:"flex space-x-3 pt-4",children:[G.jsx("button",{onClick:e,className:"flex-1 px-4 py-2 rounded-lg transition-colors duration-200 sepia-button",children:"Browse Cards"}
4183),G.jsx(t6.Custom,{children:({openConnectModal:n})=>G.jsx("button",{onClick:n,className:"flex-1 px-4 py-2 font-medium rounded-lg transition-colors duration-200 sepia-button",children:"Connect Wallet"})})]})]})]}):null,zL=()=>(K.useEffect(()=>{document.documentElement.classList.add("dark")},[]),{theme:"dark"}),wfe=({message:t,isVisible:e,onClose:n,duration:r=3e3})=>(zL(),K.useEffect(()=>{if(e){const i=setTimeout(n,r);return()=>clearTimeout(i)}},[e,n,r]),e?G.jsx("div",{className:"fixed top-4 right-4 z-50",children:G.jsx("div",{className:"backdrop-blur-md rounded-lg p-4 border max-w-sm animate-in slide-in-from-right",style:{backgroundColor:"var(--sepia-50)",borderColor:"var(--border-dark)",boxShadow:"0 8px 0 0 #C4843C"},children:G.jsxs("div",{className:"flex items-center space-x-3",children:[G.jsx(Sz,{className:"w-5 h-5 text-green-500"}),G.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary-dark)"},children:t}),G.jsx("button",{onClick:n,className:"p-1 rounded-full transition-colors duration-200",style:{color:"var(--text-secondary)"},children:G.jsx(Iy,{className:"w-4 h-4"})})]})})}):null),U_=b6(_6);async function vfe(t){return await mL(y6(U_,"cards"),{...t,id:""})}async function Afe(t,e){await pL(e0(U_,"cards",t),{id:e})}async function Efe(){return(await hL(y6(U_,"cards"))).docs.map(e=>({...e.data(),docId:e.id}))}const Xx=b6(_6);async function xfe({cardId:t,userId:e,rating:n,createdAt:r,comment:i}){if(!t||t.trim()===""||!e||e.trim()==="")throw new Error("Invalid cardId or userId provided");const s={userId:e,rating:n,createdAt:r,cardId:t};if(typeof i=="string"){const l=i.trim();l.length>0&&(s.comment=l)}await m9(e0(Xx,"cards",t,"ratings",e),s);const a=e0(Xx,"reviewCounts",t);await pL(a,{count:jle(1)}).catch(async()=>{await m9(a,{count:1})})}async function Cfe(t){const e=await fL(e0(Xx,"reviewCounts",t));return e.exists()?e.data().count:0}const _fe=({onEnter:t})=>G.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center transition-all duration-300 p-4",style:{backgroundColor:"var(--sepia-100)"},children:[G.jsxs("div",{className:"max-w-2xl w-full rounded-3xl p-8 flex flex-col items-center animate-in",style:{backgroundColor:"var(--sepia-50)",border:"1px solid var(--border-dark)",boxShadow:"0 10px 0 0 #C4843C"},children:[G.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[G.jsx(jp,{size:36,style:{color:"#3B2F2F"}}),G.jsx("h1",{className:"text-3xl sm:text-4xl font-extrabold tracking-tight",style:{color:"var(--text-primary-dark)"},children:"Rate KOLs & X Influencers"})]}),G.jsxs("p",{className:"text-lg sm:text-xl mb-6 text-center font-medium",style:{color:"var(--text-secondary)"},children:["Anonymous, on-chain ratings for your favorite creators â powered by ",G.jsx("span",{className:"font-bold",style:{color:"var(--sepia-600)"},children:"ZAMA FHE"})]}),G.jsxs("div",{className:"space-y-6 w-full mb-8",children:[G.jsxs("div",{className:"flex items-start gap-4",children:[G.jsx(ww,{className:"flex-shrink-0 mt-1.5",size:28,style:{color:"var(--sepia-600)"}}),G.jsxs("div",{children:[G.jsxs("h2",{className:"text-xl font-semibold mb-1 flex items-center gap-2",style:{color:"var(--text-primary-dark)"},children:["Why privacy matters for KOL ratings ",G.jsx(Fz,{className:"text-yellow-400",size:18})]}),G.jsxs("p",{style:{color:"var(--text-secondary)"},children:["Public scores invite bias and retaliation. Here, your vote stays ",G.jsx("span",{className:"font-bold",style:{color:"var(--sepia-600)"},children:"fully confidential"})," while aggregates remain verifiable."]})]})]}),G.jsxs("div",{className:"flex items-start gap-4",children:[G.jsx(jp,{className:"flex-shrink-0 mt-1.5",size:28,style:{color:"var(--sepia-600)"}}),G.jsxs("div",{children:[G.jsx("h2",{className:"text-xl font-semibold mb-1 flex items-center gap-2",style:{color:"var(--text-primary-dark)"},children:"What is ZAMA FHE?"}),G.jsxs("p",{style:{color:"var(--text-secondary)"},children:[G.jsx("span",{className:"font-bold",children:"Fully Homomorphic Encryption (FHE)"})," lets us compute on encrypted data directly on-chain. Ratings are encrypted endâtoâend and only revealed as aggregates."]})]})]}),G.jsxs("div",{className:"flex items-start gap-4",children:[G.jsx(Hz,{className:"flex-shrink-0 mt-1.5",size:28,style:{color:"var(--sepia-600)"}}),G.jsxs("div",{children:[G.jsx("h2",{className:"text-xl font-semibold mb-1 flex items-center gap-2",style:{color:"var(--text-primary-dark)"},children:"Why we chose ZAMA"}),G.jsxs("p",{style:{color:"var(--text-secondary)"},children:["ZAMAâs FHEVM enables ",G.jsx("span",{className:"font-bold text-primary",children:"confidential, onâchain ratings"})," without sacrificing transparency or security."]})]})]})]}),G.jsxs("button",{onClick:t,className:"flex items-center gap-2 rounded-2xl font-bold text-lg transition-all duration-300 transform hover:scale-105 sepia-button",children:["Enter Ratings ",G.jsx(xz,{size:22})]})]}),G.jsxs("div",{className:"mt-8 text-center text-xs",style:{color:"var(--text-secondary)"},children:["Powered by ",G.jsx("a",{href:"https://zama.ai",target:"_blank",rel:"noopener noreferrer",className:"underline font-semibold",style:{color:"var(--sepia-600)"},children:"ZAMA FHE"})," · ",G.jsx("a",{href:"https://docs.zama.ai",target:"_blank",rel:"noopener noreferrer",className:"underline font-semibold",style:{color:"var(--sepia-600)"},children:"Learn More"})]})]}),Tfe="6.15.0";function Sfe(t,e,n){const r=e.split("|").map(s=>s.trim());for(let s=0;s<r.length;s++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}const i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${n}`,i.value=t,i}async function Lr(t){const e=Object.keys(t);return(await Promise.all(e.map(r=>Promise.resolve(t[r])))).reduce((r,i,s)=>(r[e[s]]=i,r),{})}function We(t,e,n){for(let r in e){let i=e[r];const s=n?n[r]:null;s&&Sfe(i,s,r),Object.defineProperty(t,r,{enumerable:!0,value:i,writable:!1})}}function Ah(t,e){if(t==null)return"null";if(e==null&&(e=new Set),typeof t=="object"){if(e.has(t))return"[Circular]";e.add(t)}if(Array.isArray(t))return"[ "+t.map(n=>Ah(n,e)).join(", ")+" ]";if(t instanceof Uint8Array){const n="0123456789abcdef";let r="0x";for(let i=0;i<t.length;i++)r+=n[t[i]>>4],r+=n[t[i]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return Ah(t.toJSON(),e);switch(typeof t){case"boolean":case"number":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{const n=Object.keys(t);return n.sort(),"{ "+n.map(r=>`${Ah(r,e)}: ${Ah(t[r],e)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function dr(t,e){return t&&t.code===e}function F_(t){return dr(t,"CALL_EXCEPTION")}function tn(t,e,n){let r=t;{const s=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will over
4183write populated values: ${Ah(n)}`);for(const a in n){if(a==="shortMessage")continue;const l=n[a];s.push(a+"="+Ah(l))}}s.push(`code=${e}`),s.push(`version=${Tfe}`),s.length&&(t+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return We(i,{code:e}),n&&Object.assign(i,n),i.shortMessage==null&&We(i,{shortMessage:r}),i}function Ee(t,e,n,r){if(!t)throw tn(e,n,r)}function ne(t,e,n,r){Ee(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function HL(t,e,n){n==null&&(n=""),n&&(n=": "+n),Ee(t>=e,"missing argument"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Ee(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="eÌ")throw new Error("broken");t.push(e)}catch{}return t},[]);function Ky(t,e,n){if(n==null&&(n=""),t!==e){let r=n,i="new";n&&(r+=".",i+=" "+n),Ee(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function qL(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((t.length-2)/2);let i=2;for(let s=0;s<r.length;s++)r[s]=parseInt(t.substring(i,i+2),16),i+=2;return r}ne(!1,"invalid BytesLike value",e||"value",t)}function ut(t,e){return qL(t,e,!1)}function Vr(t,e){return qL(t,e,!0)}function Yt(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function V_(t){return Yt(t,!0)||t instanceof Uint8Array}const _9="0123456789abcdef";function ke(t){const e=ut(t);let n="0x";for(let r=0;r<e.length;r++){const i=e[r];n+=_9[(i&240)>>4]+_9[i&15]}return n}function dn(t){return"0x"+t.map(e=>ke(e).substring(2)).join("")}function Ph(t){return Yt(t,!0)?(t.length-2)/2:ut(t).length}function un(t,e,n){const r=ut(t);return n!=null&&n>r.length&&Ee(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),ke(r.slice(e??0,n??r.length))}function $L(t,e,n){const r=ut(t);Ee(e>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),n?i.set(r,e-r.length):i.set(r,0),ke(i)}function uc(t,e){return $L(t,e,!0)}function Ife(t,e){return $L(t,e,!1)}const T6=BigInt(0),Ms=BigInt(1),Eh=9007199254740991;function ev(t,e){const n=S6(t,"value"),r=BigInt(ot(e,"width"));if(Ee(n>>r===T6,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),n>>r-Ms){const i=(Ms<<r)-Ms;return-((~n&i)+Ms)}return n}function GL(t,e){let n=Pe(t,"value");const r=BigInt(ot(e,"width")),i=Ms<<r-Ms;if(n<T6){n=-n,Ee(n<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const s=(Ms<<r)-Ms;return(~n&s)+Ms}else Ee(n<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return n}function Xu(t,e){const n=S6(t,"value"),r=BigInt(ot(e,"bits"));return n&(Ms<<r)-Ms}function Pe(t,e){switch(typeof t){case"bigint":return t;case"number":return ne(Number.isInteger(t),"underflow",e||"value",t),ne(t>=-Eh&&t<=Eh,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(n){ne(!1,`invalid BigNumberish string: ${n.message}`,e||"value",t)}}ne(!1,"invalid BigNumberish value",e||"value",t)}function S6(t,e){const n=Pe(t,e);return Ee(n>=T6,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),n}const T9="0123456789abcdef";function I6(t){if(t instanceof Uint8Array){let e="0x0";for(const n of t)e+=T9[n>>4],e+=T9[n&15];return BigInt(e)}return Pe(t)}function ot(t,e){switch(typeof t){case"bigint":return ne(t>=-Eh&&t<=Eh,"overflow",e||"value",t),Number(t);case"number":return ne(Number.isInteger(t),"underflow",e||"value",t),ne(t>=-Eh&&t<=Eh,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return ot(BigInt(t),e)}catch(n){ne(!1,`invalid numeric string: ${n.message}`,e||"value",t)}}ne(!1,"invalid numeric value",e||"value",t)}function Rfe(t){return ot(I6(t))}function Kl(t,e){let r=S6(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const i=ot(e,"width");for(Ee(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length<i*2;)r="0"+r}return"0x"+r}function Ln(t){const e=S6(t,"value");if(e===T6)return new Uint8Array([]);let n=e.toString(16);n.length%2&&(n="0"+n);
4183const r=new Uint8Array(n.length/2);for(let i=0;i<r.length;i++){const s=i*2;r[i]=parseInt(n.substring(s,s+2),16)}return r}function Ps(t){let e=ke(V_(t)?t:Ln(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const S9="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const I9=BigInt(58);function kfe(t){const e=ut(t);let n=I6(e),r="";for(;n;)r=S9[Number(n%I9)]+r,n/=I9;for(let i=0;i<e.length&&!e[i];i++)r=S9[0]+r;return r}function Nfe(t){t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return ut(e)}function Ofe(t){const e=ut(t);let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}var Yh;class QL{constructor(e,n,r){ae(this,"filter");ae(this,"emitter");ee(this,Yh);z(this,Yh,n),We(this,{emitter:e,filter:r})}async removeListener(){C(this,Yh)!=null&&await this.emitter.off(this.filter,C(this,Yh))}}Yh=new WeakMap;function Bfe(t,e,n,r,i){ne(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",n)}function KL(t,e,n,r,i){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let s=0;for(let a=e+1;a<n.length&&n[a]>>6===2;a++)s++;return s}return t==="OVERRUN"?n.length-e-1:0}function Pfe(t,e,n,r,i){return t==="OVERLONG"?(ne(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),KL(t,e,n))}const Dfe=Object.freeze({error:Bfe,ignore:KL,replace:Pfe});function Mfe(t,e){e==null&&(e=Dfe.error);const n=ut(t,"bytes"),r=[];let i=0;for(;i<n.length;){const s=n[i++];if(s>>7===0){r.push(s);continue}let a=null,l=null;if((s&224)===192)a=1,l=127;else if((s&240)===224)a=2,l=2047;else if((s&248)===240)a=3,l=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,n,r):i+=e("BAD_PREFIX",i-1,n,r);continue}if(i-1+a>=n.length){i+=e("OVERRUN",i-1,n,r);continue}let u=s&(1<<8-a-1)-1;for(let d=0;d<a;d++){let h=n[i];if((h&192)!=128){i+=e("MISSING_CONTINUE",i,n,r),u=null;break}u=u<<6|h&63,i++}if(u!==null){if(u>1114111){i+=e("OUT_OF_RANGE",i-1-a,n,r,u);continue}if(u>=55296&&u<=57343){i+=e("UTF16_SURROGATE",i-1-a,n,r,u);continue}if(u<=l){i+=e("OVERLONG",i-1-a,n,r,u);continue}r.push(u)}}return r}function ec(t,e){ne(typeof t=="string","invalid string value","str",t);let n=[];for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);if(i<128)n.push(i);else if(i<2048)n.push(i>>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const s=t.charCodeAt(r);ne(r<t.length&&(s&64512)===56320,"invalid surrogate pair","str",t);const a=65536+((i&1023)<<10)+(s&1023);n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(a&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return new Uint8Array(n)}function jfe(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function tv(t,e){return jfe(Mfe(t,e))}function WL(t){async function e(n,r){Ee(r==null||!r.cancelled,"request cancelled before sending","CANCELLED");const i=n.url.split(":")[0].toLowerCase();Ee(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),Ee(i==="https"||!n.credentials||n.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=null;const a=new AbortController,l=setTimeout(()=>{s=tn("request timeout","TIMEOUT"),a.abort()},n.timeout);r&&r.addListener(()=>{s=tn("request cancelled","CANCELLED"),a.abort()});const u=Object.assign({},t,{method:n.method,headers:new Headers(Array.from(n)),body:n.body||void 0,signal:a.signal});let d;try{d=await fetch(n.url,u)}catch(w){throw clearTimeout(l),s||w}clearTimeout(l);const h={};d.headers.forEach((w,A)=>{h[A.toLowerCase()]=w});const m=await d.arrayBuffer(),g=m==null?null:new Uint8Array(m);return{statusCode:d.status,statusMessage:d.statusText,headers:h,body:g}}return e}const Lfe=12,Ufe=250;let R9=WL();const Ffe=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Vfe=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let J3=!1;async function YL(t,e){try{const n=t.match(Ffe);if(!n)throw new Error("invalid data");return new Dl(200,"OK",{"content-type":n[1]||"text/plain"},n[2]?Nfe(n[3]):Hfe(n[3]))}catch{return new Dl(599,"BAD REQUEST (invalid data: URI)",{},null,new fc(t))}}function JL(t){async function e(n,r){try{const i=n.match(Vfe);if(!i)throw new Error("invalid link");return new fc(`${t}${i[2]}`)}catch{return new Dl(599,"BAD REQUEST (invalid IPFS URI)",{},null,new fc(n))}}return e}const Fb={data:YL,ipfs:JL("https://gateway.ipfs.io/ipfs/")},XL=new WeakMap;var df,fl;class zfe{constructor(e){ee(this,df);ee(this,fl);z(this,df,[]),z(this,fl,!1),XL.set(e,()=>{if(!C(this,fl)){z(this,fl,!0);for(const n of C(this,df))setTimeout(()=>{n()},0);z(this,df,[])}})}addListener(e){Ee(!C(this,fl),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),C(this,df).push(e)}get cancelled(){return C(this,fl)}checkSignal(){Ee(!this.cancelled,"cancelled","CANCELLED",{})}}
4183df=new WeakMap,fl=new WeakMap;function Vb(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Jh,Xh,Is,Da,Zh,ep,Yn,_i,Ma,hf,pf,mf,bo,Rs,dl,gf,Xm;const pv=class pv{constructor(e){ee(this,gf);ee(this,Jh);ee(this,Xh);ee(this,Is);ee(this,Da);ee(this,Zh);ee(this,ep);ee(this,Yn);ee(this,_i);ee(this,Ma);ee(this,hf);ee(this,pf);ee(this,mf);ee(this,bo);ee(this,Rs);ee(this,dl);z(this,ep,String(e)),z(this,Jh,!1),z(this,Xh,!0),z(this,Is,{}),z(this,Da,""),z(this,Zh,3e5),z(this,Rs,{slotInterval:Ufe,maxAttempts:Lfe}),z(this,dl,null)}get url(){return C(this,ep)}set url(e){z(this,ep,String(e))}get body(){return C(this,Yn)==null?null:new Uint8Array(C(this,Yn))}set body(e){if(e==null)z(this,Yn,void 0),z(this,_i,void 0);else if(typeof e=="string")z(this,Yn,ec(e)),z(this,_i,"text/plain");else if(e instanceof Uint8Array)z(this,Yn,e),z(this,_i,"application/octet-stream");else if(typeof e=="object")z(this,Yn,ec(JSON.stringify(e))),z(this,_i,"application/json");else throw new Error("invalid body")}hasBody(){return C(this,Yn)!=null}get method(){return C(this,Da)?C(this,Da):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),z(this,Da,String(e).toUpperCase())}get headers(){const e=Object.assign({},C(this,Is));return C(this,Ma)&&(e.authorization=`Basic ${Ofe(ec(C(this,Ma)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&C(this,_i)&&(e["content-type"]=C(this,_i)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,n){C(this,Is)[String(e).toLowerCase()]=String(n)}clearHeaders(){z(this,Is,{})}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r<n.length){const i=n[r++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return C(this,Ma)||null}setCredentials(e,n){ne(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),z(this,Ma,`${e}:${n}`)}get allowGzip(){return C(this,Xh)}set allowGzip(e){z(this,Xh,!!e)}get allowInsecureAuthentication(){return!!C(this,Jh)}set allowInsecureAuthentication(e){z(this,Jh,!!e)}get timeout(){return C(this,Zh)}set timeout(e){ne(e>=0,"timeout must be non-zero","timeout",e),z(this,Zh,e)}get preflightFunc(){return C(this,hf)||null}set preflightFunc(e){z(this,hf,e)}get processFunc(){return C(this,pf)||null}set processFunc(e){z(this,pf,e)}get retryFunc(){return C(this,mf)||null}set retryFunc(e){z(this,mf,e)}get getUrlFunc(){return C(this,dl)||R9}set getUrlFunc(e){z(this,dl,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${C(this,Yn)?ke(C(this,Yn)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(C(this,Rs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(C(this,Rs).maxAttempts=e.maxAttempts)}send(){return Ee(C(this,bo)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),z(this,bo,new zfe(this)),he(this,gf,Xm).call(this,0,k9()+this.timeout,0,this,new Dl(0,"",{},null,this))}cancel(){Ee(C(this,bo)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=XL.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const n=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();Ee(this.method==="GET"&&(n!=="https"||r!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new pv(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,z(i,Is,Object.assign({},C(this,Is))),C(this,Yn)&&z(i,Yn,new Uint8Array(C(this,Yn))),z(i,_i,C(this,_i)
4183),i}clone(){const e=new pv(this.url);return z(e,Da,C(this,Da)),C(this,Yn)&&z(e,Yn,C(this,Yn)),z(e,_i,C(this,_i)),z(e,Is,Object.assign({},C(this,Is))),z(e,Ma,C(this,Ma)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),z(e,hf,C(this,hf)),z(e,pf,C(this,pf)),z(e,mf,C(this,mf)),z(e,Rs,Object.assign({},C(this,Rs))),z(e,dl,C(this,dl)),e}static lockConfig(){J3=!0}static getGateway(e){return Fb[e.toLowerCase()]||null}static registerGateway(e,n){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(J3)throw new Error("gateways locked");Fb[e]=n}static registerGetUrl(e){if(J3)throw new Error("gateways locked");R9=e}static createGetUrlFunc(e){return WL(e)}static createDataGateway(){return YL}static createIpfsGatewayFunc(e){return JL(e)}};Jh=new WeakMap,Xh=new WeakMap,Is=new WeakMap,Da=new WeakMap,Zh=new WeakMap,ep=new WeakMap,Yn=new WeakMap,_i=new WeakMap,Ma=new WeakMap,hf=new WeakMap,pf=new WeakMap,mf=new WeakMap,bo=new WeakMap,Rs=new WeakMap,dl=new WeakMap,gf=new WeakSet,Xm=async function(e,n,r,i,s){var h,m,g;if(e>=C(this,Rs).maxAttempts)return s.makeServerError("exceeded maximum retry limit");Ee(k9()<=n,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await qfe(r);let a=this.clone();const l=(a.url.split(":")[0]||"").toLowerCase();if(l in Fb){const w=await Fb[l](a.url,Vb(C(i,bo)));if(w instanceof Dl){let A=w;if(this.processFunc){Vb(C(i,bo));try{A=await this.processFunc(a,A)}catch(v){(v.throttle==null||typeof v.stall!="number")&&A.makeServerError("error in post-processing function",v).assertOk()}}return A}a=w}this.preflightFunc&&(a=await this.preflightFunc(a));const u=await this.getUrlFunc(a,Vb(C(i,bo)));let d=new Dl(u.statusCode,u.statusMessage,u.headers,u.body,i);if(d.statusCode===301||d.statusCode===302){try{const w=d.headers.location||"";return he(h=a.redirect(w),gf,Xm).call(h,e+1,n,0,i,d)}catch{}return d}else if(d.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,d,e))){const w=d.headers["retry-after"];let A=C(this,Rs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof w=="string"&&w.match(/^[1-9][0-9]*$/)&&(A=parseInt(w)),he(m=a.clone(),gf,Xm).call(m,e+1,n,A,i,d)}if(this.processFunc){Vb(C(i,bo));try{d=await this.processFunc(a,d)}catch(w){(w.throttle==null||typeof w.stall!="number")&&d.makeServerError("error in post-processing function",w).assertOk();let A=C(this,Rs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return w.stall>=0&&(A=w.stall),he(g=a.clone(),gf,Xm).call(g,e+1,n,A,i,d)}}return d};let fc=pv;var my,gy,yy,Ti,tp,yf;const sT=class sT{constructor(e,n,r,i,s){ee(this,my);ee(this,gy);ee(this,yy);ee(this,Ti);ee(this,tp);ee(this,yf);z(this,my,e),z(this,gy,n),z(this,yy,Object.keys(r).reduce((a,l)=>(a[l.toLowerCase()]=String(r[l]),a),{})),z(this,Ti,i==null?null:new Uint8Array(i)),z(this,tp,s||null),z(this,yf,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${C(this,Ti)?ke(C(this,Ti)):"null"}>`}get statusCode(){return C(this,my)}get statusMessage(){return C(this,gy)}get headers(){return Object.assign({},C(this,yy))}get body(){return C(this,Ti)==null?null:new Uint8Array(C(this,Ti))}get bodyText(){try{return C(this,Ti)==null?"":tv(C(this,Ti))}catch{Ee(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Ee(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,n=Object.keys(e);let r=0;return{next:()=>{if(r<n.length){const i=n[r++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(e,n){let r;e?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${e})`);const i=new sT(599,r,this.headers,this.body,C(this,tp)||void 0);return z(i,yf,{message:e,error:n}),i}throwThrottleError(e,n){n==null?n=-1:ne(Number.isInteger(n)&&n>=0,"invalid stall timeout","stall",n);const r=new Error(e||"throttling requests");throw We(r,{stall:n,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return C(this,Ti)!=null}get request(){return C(this,tp)}ok(){return C(this,yf).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:n}=C(this,yf);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{C(this,Ti)&&(i=tv(C(this,Ti)))}catch{}Ee(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:n,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};my=new WeakMap,gy=new WeakMap,yy=new WeakMap,Ti=new WeakMap,tp=new WeakMap,yf=new WeakMap;let Dl=sT;function k9(){return new Date().getTime()}function Hfe(t){return ec(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function qfe(t){return new Promise(e=>setTimeout(e,t))}const $fe=BigInt(-1),xs=BigInt(0),xh=BigInt(1),Gfe=BigInt(5),sh={};let Dh="0000";for(;Dh.length<80;)Dh+=Dh;function Bu(t){let e=Dh;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function Fm(t,e,n){const r=BigInt(e.width);if(e.signed){const i=xh<<r-xh;Ee(n==null||t>=-i&&t<i,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:t}),t>xs?t=ev(Xu(t,r),r):t=-ev(Xu(-t,r),r)}else{const i=xh<<r;Ee(n==null||t>=0&&t<i,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:t}),t=(t%i+i)%i&i-xh}return t}function X3(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,n=128,r=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{const s=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);ne(s,"invalid fixed format","format",t),e=s[1]!=="u",n=parseInt(s[2]),r=parseInt(s[3])}}else if(t){const s=t,a=(l,u,d)=>
4183s[l]==null?d:(ne(typeof s[l]===u,"invalid fixed format ("+l+" not "+u+")","format."+l,s[l]),s[l]);e=a("signed","boolean",e),n=a("width","number",n),r=a("decimals","number",r)}ne(n%8===0,"invalid FixedNumber width (not byte aligned)","format.width",n),ne(r<=80,"invalid FixedNumber decimals (too large)","format.decimals",r);const i=(e?"":"u")+"fixed"+String(n)+"x"+String(r);return{signed:e,width:n,decimals:r,name:i}}function Qfe(t,e){let n="";t<xs&&(n="-",t*=$fe);let r=t.toString();if(e===0)return n+r;for(;r.length<=e;)r=Dh+r;const i=r.length-e;for(r=r.substring(0,i)+"."+r.substring(i);r[0]==="0"&&r[1]!==".";)r=r.substring(1);for(;r[r.length-1]==="0"&&r[r.length-2]!==".";)r=r.substring(0,r.length-1);return n+r}var ks,Gt,Mr,Mt,ju,Ta,Zx,eC,tC,nC;const tl=class tl{constructor(e,n,r){ee(this,Mt);ae(this,"format");ee(this,ks);ee(this,Gt);ee(this,Mr);ae(this,"_value");Ky(e,sh,"FixedNumber"),z(this,Gt,n),z(this,ks,r);const i=Qfe(n,r.decimals);We(this,{format:r.name,_value:i}),z(this,Mr,Bu(r.decimals))}get signed(){return C(this,ks).signed}get width(){return C(this,ks).width}get decimals(){return C(this,ks).decimals}get value(){return C(this,Gt)}addUnsafe(e){return he(this,Mt,Zx).call(this,e)}add(e){return he(this,Mt,Zx).call(this,e,"add")}subUnsafe(e){return he(this,Mt,eC).call(this,e)}sub(e){return he(this,Mt,eC).call(this,e,"sub")}mulUnsafe(e){return he(this,Mt,tC).call(this,e)}mul(e){return he(this,Mt,tC).call(this,e,"mul")}mulSignal(e){he(this,Mt,ju).call(this,e);const n=C(this,Gt)*C(e,Gt);return Ee(n%C(this,Mr)===xs,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),he(this,Mt,Ta).call(this,n/C(this,Mr),"mulSignal")}divUnsafe(e){return he(this,Mt,nC).call(this,e)}div(e){return he(this,Mt,nC).call(this,e,"div")}divSignal(e){Ee(C(e,Gt)!==xs,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),he(this,Mt,ju).call(this,e);const n=C(this,Gt)*C(this,Mr);return Ee(n%C(e,Gt)===xs,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),he(this,Mt,Ta).call(this,n/C(e,Gt),"divSignal")}cmp(e){let n=this.value,r=e.value;const i=this.decimals-e.decimals;return i>0?r*=Bu(i):i<0&&(n*=Bu(-i)),n<r?-1:n>r?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=C(this,Gt);return C(this,Gt)<xs&&(e-=C(this,Mr)-xh),e=C(this,Gt)/C(this,Mr)*C(this,Mr),he(this,Mt,Ta).call(this,e,"floor")}ceiling(){let e=C(this,Gt);return C(this,Gt)>xs&&(e+=C(this,Mr)-xh),e=C(this,Gt)/C(this,Mr)*C(this,Mr),he(this,Mt,Ta).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const n=this.decimals-e,r=Gfe*Bu(n-1);let i=this.value+r;const s=Bu(n);return i=i/s*s,Fm(i,C(this,ks),"round"),new tl(sh,i,C(this,ks))}isZero(){return C(this,Gt)===xs}isNegative(){return C(this,Gt)<xs}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return tl.fromString(this.toString(),e)}static fromValue(e,n,r){const i=n==null?0:ot(n),s=X3(r);let a=Pe(e,"value");const l=i-s.decimals;if(l>0){const u=Bu(l);Ee(a%u===xs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),a/=u}else l<0&&(a*=Bu(-l));return Fm(a,s,"fromValue"),new tl(sh,a,s)}static fromString(e,n){const r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);ne(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);const i=X3(n);let s=r[2]||"0",a=r[3]||"";for(;a.length<i.decimals;)a+=Dh;Ee(a.substring(i.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),a=a.substring(0,i.decimals);const l=BigInt(r[1]+s+a);return Fm(l,i,"fromString"),new tl(sh,l,i)}static fromBytes(e,n){let r=I6(ut(e,"value"));const i=X3(n);return i.signed&&(r=ev(r,i.width)),Fm(r,i,"fromBytes"),new tl(sh,r,i)}};ks=new WeakMap,Gt=new WeakMap,Mr=new WeakMap,Mt=new WeakSet,ju=function(e){ne(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)},Ta=function(e,n){return e=Fm(e,C(this,ks),n),new tl(sh,e,C(this,ks))}
4183,Zx=function(e,n){return he(this,Mt,ju).call(this,e),he(this,Mt,Ta).call(this,C(this,Gt)+C(e,Gt),n)},eC=function(e,n){return he(this,Mt,ju).call(this,e),he(this,Mt,Ta).call(this,C(this,Gt)-C(e,Gt),n)},tC=function(e,n){return he(this,Mt,ju).call(this,e),he(this,Mt,Ta).call(this,C(this,Gt)*C(e,Gt)/C(this,Mr),n)},nC=function(e,n){return Ee(C(e,Gt)!==xs,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),he(this,Mt,ju).call(this,e),he(this,Mt,Ta).call(this,C(this,Gt)*C(this,Mr)/C(e,Gt),n)};let nv=tl;function Kfe(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function N9(t,e,n){let r=0;for(let i=0;i<n;i++)r=r*256+t[e+i];return r}function O9(t,e,n,r){const i=[];for(;n<e+1+r;){const s=ZL(t,n);i.push(s.result),n+=s.consumed,Ee(n<=e+1+r,"child data too short","BUFFER_OVERRUN",{buffer:t,length:r,offset:e})}return{consumed:1+r,result:i}}function ZL(t,e){Ee(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const n=r=>{Ee(r<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:r})};if(t[e]>=248){const r=t[e]-247;n(e+1+r);const i=N9(t,e+1,r);return n(e+1+r+i),O9(t,e,e+1+r,r+i)}else if(t[e]>=192){const r=t[e]-192;return n(e+1+r),O9(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;n(e+1+r);const i=N9(t,e+1,r);n(e+1+r+i);const s=ke(t.slice(e+1+r,e+1+r+i));return{consumed:1+r+i,result:s}}else if(t[e]>=128){const r=t[e]-128;n(e+1+r);const i=ke(t.slice(e+1,e+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:Kfe(t[e])}}function Wy(t){const e=ut(t,"data"),n=ZL(e,0);return ne(n.consumed===e.length,"unexpected junk after rlp payload","data",t),n.result}function B9(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function eU(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(s){r=r.concat(eU(s))}),r.length<=55)return r.unshift(192+r.length),r;const i=B9(r.length);return i.unshift(247+i.length),i.concat(r)}const e=Array.prototype.slice.call(ut(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const n=B9(e.length);return n.unshift(183+n.length),n.concat(e)}const P9="0123456789abcdef";function Wl(t){let e="0x";for(const n of eU(t))e+=P9[n>>4],e+=P9[n&15];return e}function Wfe(t,e){let n=18;return n=ot(e,"unit"),nv.fromValue(t,n,{decimals:n,width:512}).toString()}function Yfe(t,e){ne(typeof t=="string","value must be a string","value",t);let n=18;return n=ot(e,"unit"),nv.fromString(t,{decimals:n,width:512}).value}function D9(t){return Wfe(t,18)}function Jfe(t){return Yfe(t,18)}const zr=32,rC=new Uint8Array(zr),Xfe=["then"],zb={},tU=new WeakMap;function Fu(t){return tU.get(t)}function M9(t,e){tU.set(t,e)}function Vm(t,e){const n=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}function iC(t,e,n){return t.indexOf(null)>=0?e.map((r,i)=>r instanceof t0?iC(Fu(r),r,n):r):t.reduce((r,i,s)=>{let a=e.getValue(i);return i in r||(n&&a instanceof t0&&(a=iC(Fu(a),a,n)),r[i]=a),r},{})}var np;const Ch=class Ch extends Array{constructor(...n){const r=n[0];let i=n[1],s=(n[2]||[]).slice(),a=!0;r!==zb&&(i=n,s=[],a=!1);super(i.length);ee(this,np);i.forEach((d,h)=>{this[h]=d});const l=s.reduce((d,h)=>(typeof h=="string"&&d.set(h,(d.get(h)||0)+1),d),new Map);if(M9(this,Object.freeze(i.map((d,h)=>{const m=s[h];return m!=null&&l.get(m)===1?m:null}))),z(this,np,[]),C(this,np)==null&&C(this,np),!a)return;Object.freeze(this);const u=new Proxy(this,{get:(d,h,m)=>{if(typeof h=="string"){if(h.match(/^[0-9]+$/)){const w=ot(h,"%index");if(w<0||w>=this.length)throw new RangeError("out of result range");const A=d[w];return A instanceof Error&&Vm(`index ${w}`,A),A}if(Xfe.indexOf(h)>=0)return Reflect.get(d,h,m);const g=d[h];if(g instanceof Function)return function(...w){return g.apply(this===m?d:this,w)};if(!(h in d))return d.getValue.apply(this===m?d:this,[h])}return Reflect.get(d,h,m)}});return M9(u,Fu(this)),u}toArray(n){const r=[];return this.forEach((i,s)=>{i instanceof Error&&Vm(`index ${s}`,i),n&&i instanceof Ch&&(i=i.toArray(n)),r.push(i)}),r}toObject(n){const r=Fu(this);return r.reduce((i,s,a)=>(Ee(s!=null,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),iC(r,this,n)),{})}slice(n,r){n==null&&(n=0),n<0&&(n+=this.length,n<0&&(n=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=Fu(this),s=[],a=[];for(let l=n;l<r;l++)s.push(this[l]),a.push(i[l]);return new Ch(zb,s,a)}filter(n,r){const i=Fu(this),s=[],a=[];for(let l=0;l<this.length;l++){const u=this[l];u instanceof Error&&Vm(`index ${l}`,u),n.call(r,u,l,this)&&(s.push(u),a.push(i[l]))}return new Ch(zb,s,a)}map(n,r){const i=[];for(let s=0;s<this.length;s++){const a=this[s];a instanceof Error&&Vm(`index ${s}`,a),i.push(n.call(r,a,s,this))}return i}getValue(n){const r=Fu(this).indexOf(n);if(r===-1)return;const i=this[r];return i instanceof Error&&Vm(`property ${JSON.stringify(n)}`,i.error),i}static fromItems(n,r){return new Ch(zb,n,r)}};np=new WeakMap;let t0=Ch;function j9(t){let e=Ln(t);return Ee(e.length<=zr,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:zr,offset:e.length}),e.length!==zr&&(e=Vr(dn([rC.slice(e.length%zr),e]))),e}class gc{constructor(e,n,r,i){ae(this,"name");ae(this,"type");ae(this,"localName");ae(this,"dynamic");We(this,{name:e,type:n,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,n){ne(!1,e,this.localName,n)}}var ja,bf,rp,lw;class sC{constructor(){ee(this,rp);ee(this,ja);ee(this,bf);z(this,ja,[]),z(this,bf,0)}get data(){return dn(C(this,ja))}get length(){return C(this,bf)}appendWriter(e){return he(this,rp,lw).call(this,Vr(e.data))}writeBytes(e){let n=Vr(e);const r=n.length%zr;return r&&(n=Vr(dn([n,rC.slice(r)]))),he(this,rp,lw).call(this,n)}writeValue(e){return he(this,rp,lw).call(this,j9(e))}writeUpdatableValue(){const e=C(this,ja).length;return C(this,ja).push(rC),z(this,bf,C(this,bf)+zr),n=>{C(this,ja)[e]=j9(n)}}}ja=new WeakMap,bf=new WeakMap,rp=new WeakSet,lw=function(e){return C(this,ja).push(e),z(this,bf,C(this,bf)+e.length),e.length};var ti,Si,wf,vf,hl,td,aC,nU;const oT=class oT{constructor(e,n,r){ee(this,td);ae(this,"allowLoose");ee(this,ti);ee(this,Si);ee(this,wf);ee(this,vf);ee(this,hl);We(this,{allowLoose:!!n}),z(this,ti,Vr(e)),z(this,wf,0),z(this,vf,null),z(this,hl,r??1024),z(this,Si,0)}get data(){return ke(C(this,ti))}get dataLength(){return C(this,ti).length}get consumed(){return C(this,Si)}get bytes(){return new Uint8Array(C(this,ti))}subReader(e){const n=new oT(C(this,ti).slice(C(this,Si)+e),this.allowLoose,C(this,hl));return z(n,vf,this),n}readBytes(e,n){let r=he(this,td,nU).call(this,0,e,!!n);return he(this,td,aC).call(this,e),z(this,Si,C(this,Si)+r.length),r.slice(0,e)}readValue(){return I6(this.readBytes(zr))}readIndex(){return Rfe(this.readBytes(zr))}};ti=new WeakMap,Si=new WeakMap,wf=new WeakMap,vf=new WeakMap,hl=new WeakMap,td=new WeakSet,aC=function(e){var n;if(C(this,vf))return he(n=C(this,vf),td,aC).call(n,e);z(this,wf,C(this,wf)+e),Ee(C(this,hl)<1||C(this,wf)<=C(this,hl)*this.dataLength,`c
4183ompressed ABI data exceeds inflation ratio of ${C(this,hl)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Vr(C(this,ti)),offset:C(this,Si),length:e,info:{bytesRead:C(this,wf),dataLength:this.dataLength}})},nU=function(e,n,r){let i=Math.ceil(n/zr)*zr;return C(this,Si)+i>C(this,ti).length&&(this.allowLoose&&r&&C(this,Si)+n<=C(this,ti).length?i=n:Ee(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Vr(C(this,ti)),length:C(this,ti).length,offset:C(this,Si)+i})),C(this,ti).slice(C(this,Si),C(this,Si)+i)};let oC=oT;function rv(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function z_(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function Zfe(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");rv(t.outputLen),rv(t.blockLen)}function n0(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function rU(t,e){z_(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Z3=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const iU=t=>t instanceof Uint8Array,ede=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),e5=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),fo=(t,e)=>t<<32-e|t>>>e,tde=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!tde)throw new Error("Non little-endian hardware is not supported");function nde(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function R6(t){if(typeof t=="string"&&(t=nde(t)),!iU(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function rde(...t){const e=new Uint8Array(t.reduce((r,i)=>r+i.length,0));let n=0;return t.forEach(r=>{if(!iU(r))throw new Error("Uint8Array expected");e.set(r,n),n+=r.length}),e}class H_{clone(){return this._cloneInto()}}function q_(t){const e=r=>t().update(R6(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function ide(t=32){if(Z3&&typeof Z3.getRandomValues=="function")return Z3.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class sU extends H_{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,Zfe(e);const r=R6(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(let a=0;a<s.length;a++)s[a]^=54;this.iHash.update(s),this.oHash=e.create();for(let a=0;a<s.length;a++)s[a]^=106;this.oHash.update(s),s.fill(0)}update(e){return n0(this),this.iHash.update(e),this}digestInto(e){n0(this),z_(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:i,destroyed:s,blockLen:a,outputLen:l}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=a,e.outputLen=l,e.oHash=n._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const oU=(t,e,n)=>new sU(t,e).update(n).digest();oU.create=(t,e)=>new sU(t,e);function sde(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const i=BigInt(32),s=BigInt(4294967295),a=Number(n>>i&s),l=Number(n&s),u=r?4:0,d=r?0:4;t.setUint32(e+u,a,r),t.setUint32(e+d,l,r)}class aU extends H_{constructor(e,n,r,i){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=e5(this.buffer)}update(e){n0(this);const{view:n,buffer:r,blockLen:i}=this;e=R6(e);const s=e.length;for(let a=0;a<s;){const l=Math.min(i-this.pos,s-a);if(l===i){const u=e5(e);for(;i<=s-a;a+=i)this.process(u,a);continue}r.set(e.subarray(a,a+l),this.pos),this.pos+=l,a+=l,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){n0(this),rU(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:a}=this;n[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let m=a;m<i;m++)n[m]=0;sde(r,i-8,BigInt(this.length*8),s),this.process(r,0);const l=e5(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=u/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<d;m++)l.setUint32(4*m,h[m],s)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:s,destroyed:a,pos:l}=this;return e.length=i,e.pos=l,e.finished=s,e.destroyed=a,i%n&&e.buffer.set(r),e}}const ode=(t,e,n)=>t&e^~t&n,ade=(t,e,n)=>t&e^t&n^e&n,cde=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
vendor: 3,381 bytes, line 4183
4183734187,3204031479,3329325298]),Wc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yc=new Uint32Array(64);class lde extends aU{constructor(){super(64,32,8,!1),this.A=Wc[0]|0,this.B=Wc[1]|0,this.C=Wc[2]|0,this.D=Wc[3]|0,this.E=Wc[4]|0,this.F=Wc[5]|0,this.G=Wc[6]|0,this.H=Wc[7]|0}get(){const{A:e,B:n,C:r,D:i,E:s,F:a,G:l,H:u}=this;return[e,n,r,i,s,a,l,u]}set(e,n,r,i,s,a,l,u){this.A=e|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=a|0,this.G=l|0,this.H=u|0}process(e,n){for(let m=0;m<16;m++,n+=4)Yc[m]=e.getUint32(n,!1);for(let m=16;m<64;m++){const g=Yc[m-15],w=Yc[m-2],A=fo(g,7)^fo(g,18)^g>>>3,v=fo(w,17)^fo(w,19)^w>>>10;Yc[m]=v+Yc[m-7]+A+Yc[m-16]|0}let{A:r,B:i,C:s,D:a,E:l,F:u,G:d,H:h}=this;for(let m=0;m<64;m++){const g=fo(l,6)^fo(l,11)^fo(l,25),w=h+g+ode(l,u,d)+cde[m]+Yc[m]|0,v=(fo(r,2)^fo(r,13)^fo(r,22))+ade(r,i,s)|0;h=d,d=u,u=l,l=a+w|0,a=s,s=i,i=r,r=w+v|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,a=a+this.D|0,l=l+this.E|0,u=u+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,i,s,a,l,u,d,h)}roundClean(){Yc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const cU=q_(()=>new lde),Hb=BigInt(2**32-1),cC=BigInt(32);function lU(t,e=!1){return e?{h:Number(t&Hb),l:Number(t>>cC&Hb)}:{h:Number(t>>cC&Hb)|0,l:Number(t&Hb)|0}}function uU(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:a}=lU(t[i],e);[n[i],r[i]]=[s,a]}return[n,r]}const ude=(t,e)=>BigInt(t>>>0)<<cC|BigInt(e>>>0),fde=(t,e,n)=>t>>>n,dde=(t,e,n)=>t<<32-n|e>>>n,hde=(t,e,n)=>t>>>n|e<<32-n,pde=(t,e,n)=>t<<32-n|e>>>n,mde=(t,e,n)=>t<<64-n|e>>>n-32,gde=(t,e,n)=>t>>>n-32|e<<64-n,yde=(t,e)=>e,bde=(t,e)=>t,fU=(t,e,n)=>t<<n|e>>>32-n,dU=(t,e,n)=>e<<n|t>>>32-n,hU=(t,e,n)=>e<<n-32|t>>>64-n,pU=(t,e,n)=>t<<n-32|e>>>64-n;function wde(t,e,n,r){const i=(e>>>0)+(r>>>0);return{h:t+n+(i/2**32|0)|0,l:i|0}}const vde=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),Ade=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,Ede=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),xde=(t,e,n,r,i)=>e+n+r+i+(t/2**32|0)|0,Cde=(t,e,n,r,i)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(i>>>0),_de=(t,e,n,r,i,s)=>e+n+r+i+s+(t/2**32|0)|0,at={fromBig:lU,split:uU,toBig:ude,shrSH:fde,shrSL:dde,rotrSH:hde,rotrSL:pde,rotrBH:mde,rotrBL:gde,rotr32H:yde,rotr32L:bde,rotlSH:fU,rotlSL:dU,rotlBH:hU,rotlBL:pU,add:wde,add3L:vde,add3H:Ade,add4L:Ede,add4H:xde,add5H:_de,add5L:Cde},[Tde,Sde]=at.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
41835771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Jc=new Uint32Array(80),Xc=new Uint32Array(80);class Ide extends aU{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}
4183get(){const{Ah:e,Al:n,Bh:r,Bl:i,Ch:s,Cl:a,Dh:l,Dl:u,Eh:d,El:h,Fh:m,Fl:g,Gh:w,Gl:A,Hh:v,Hl:x}=this;return[e,n,r,i,s,a,l,u,d,h,m,g,w,A,v,x]}set(e,n,r,i,s,a,l,u,d,h,m,g,w,A,v,x){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=s|0,this.Cl=a|0,this.Dh=l|0,this.Dl=u|0,this.Eh=d|0,this.El=h|0,this.Fh=m|0,this.Fl=g|0,this.Gh=w|0,this.Gl=A|0,this.Hh=v|0,this.Hl=x|0}process(e,n){for(let k=0;k<16;k++,n+=4)Jc[k]=e.getUint32(n),Xc[k]=e.getUint32(n+=4);for(let k=16;k<80;k++){const P=Jc[k-15]|0,B=Xc[k-15]|0,U=at.rotrSH(P,B,1)^at.rotrSH(P,B,8)^at.shrSH(P,B,7),I=at.rotrSL(P,B,1)^at.rotrSL(P,B,8)^at.shrSL(P,B,7),R=Jc[k-2]|0,M=Xc[k-2]|0,F=at.rotrSH(R,M,19)^at.rotrBH(R,M,61)^at.shrSH(R,M,6),j=at.rotrSL(R,M,19)^at.rotrBL(R,M,61)^at.shrSL(R,M,6),q=at.add4L(I,j,Xc[k-7],Xc[k-16]),L=at.add4H(q,U,F,Jc[k-7],Jc[k-16]);Jc[k]=L|0,Xc[k]=q|0}let{Ah:r,Al:i,Bh:s,Bl:a,Ch:l,Cl:u,Dh:d,Dl:h,Eh:m,El:g,Fh:w,Fl:A,Gh:v,Gl:x,Hh:T,Hl:O}=this;for(let k=0;k<80;k++){const P=at.rotrSH(m,g,14)^at.rotrSH(m,g,18)^at.rotrBH(m,g,41),B=at.rotrSL(m,g,14)^at.rotrSL(m,g,18)^at.rotrBL(m,g,41),U=m&w^~m&v,I=g&A^~g&x,R=at.add5L(O,B,I,Sde[k],Xc[k]),M=at.add5H(R,T,P,U,Tde[k],Jc[k]),F=R|0,j=at.rotrSH(r,i,28)^at.rotrBH(r,i,34)^at.rotrBH(r,i,39),q=at.rotrSL(r,i,28)^at.rotrBL(r,i,34)^at.rotrBL(r,i,39),L=r&s^r&l^s&l,Se=i&a^i&u^a&u;T=v|0,O=x|0,v=w|0,x=A|0,w=m|0,A=g|0,{h:m,l:g}=at.add(d|0,h|0,M|0,F|0),d=l|0,h=u|0,l=s|0,u=a|0,s=r|0,a=i|0;const X=at.add3L(F,q,Se);r=at.add3H(X,M,j,L),i=X|0}({h:r,l:i}=at.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:s,l:a}=at.add(this.Bh|0,this.Bl|0,s|0,a|0),{h:l,l:u}=at.add(this.Ch|0,this.Cl|0,l|0,u|0),{h:d,l:h}=at.add(this.Dh|0,this.Dl|0,d|0,h|0),{h:m,l:g}=at.add(this.Eh|0,this.El|0,m|0,g|0),{h:w,l:A}=at.add(this.Fh|0,this.Fl|0,w|0,A|0),{h:v,l:x}=at.add(this.Gh|0,this.Gl|0,v|0,x|0),{h:T,l:O}=at.add(this.Hh|0,this.Hl|0,T|0,O|0),this.set(r,i,s,a,l,u,d,h,m,g,w,A,v,x,T,O)}roundClean(){Jc.fill(0),Xc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Rde=q_(()=>new Ide);function kde(){if(typeof self<"u")return self;if(typeof window<"u"||typeof window<"u")return window;throw new Error("unable to locate global object")}const L9=kde();L9.crypto||L9.msCrypto;function Nde(t){switch(t){case"sha256":return cU.create();case"sha512":return Rde.create()}ne(!1,"invalid hashing algorithm name","algorithm",t)}const[mU,gU,yU]=[[],[],[]],Ode=BigInt(0),zm=BigInt(1),Bde=BigInt(2),Pde=BigInt(7),Dde=BigInt(256),Mde=BigInt(113);for(let t=0,e=zm,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],mU.push(2*(5*r+n)),gU.push((t+1)*(t+2)/2%64);let i=Ode;for(let s=0;s<7;s++)e=(e<<zm^(e>>Pde)*Mde)%Dde,e&Bde&&(i^=zm<<(zm<<BigInt(s))-zm);yU.push(i)}const[jde,Lde]=uU(yU,!0),U9=(t,e,n)=>n>32?hU(t,e,n):fU(t,e,n),F9=(t,e,n)=>n>32?pU(t,e,n):dU(t,e,n);function Ude(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let a=0;a<10;a++)n[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const l=(a+8)%10,u=(a+2)%10,d=n[u],h=n[u+1],m=U9(d,h,1)^n[l],g=F9(d,h,1)^n[l+1];for(let w=0;w<50;w+=10)t[a+w]^=m,t[a+w+1]^=g}let i=t[2],s=t[3];for(let a=0;a<24;a++){const l=gU[a],u=U9(i,s,l),d=F9(i,s,l),h=mU[a];i=t[h],s=t[h+1],t[h]=u,t[h+1]=d}for(let a=0;a<50;a+=10){for(let l=0;l<10;l++)n[l]=t[a+l];for(let l=0;l<10;l++)t[a+l]^=~n[(l+2)%10]&n[(l+4)%10]}t[0]^=jde[r],t[1]^=Lde[r]}n.fill(0)}class $_ extends H_{constructor(e,n,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,rv(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=ede(this.state)}keccak(){Ude(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){n0(this);const{blockLen:n,state:r}=this;e=R6(e);const i=e.length;for(let s=0;s<i;){const a=Math.min(n-this.pos,i-s);for(let l=0;l<a;l++)r[this.pos++]^=e[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:i}=this;e[r]^=n,(n&128)!==0&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){n0(this,!1),z_(e),this.finish();const n=this.state,{blockLen:r}=this;for(let i=0,s=e.length;i<s;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,s-i);e.set(n.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return rv(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(rU(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:n,suffix:r,outputLen:i,rounds:s,enableXOF:a}=this;return e||(e=new $_(n,r,i,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}}const Fde=(t,e,n)=>q_(()=>new $_(e,t,n)),Vde=Fde(1,136,256/8);let bU=!1;const wU=function(t){return Vde(t)};let vU=wU;function Cn(t){const e=ut(t,"data");return ke(vU(e))}Cn._=wU;Cn.lock=function(){bU=!0};Cn.register=function(t){if(bU)throw new TypeError("keccak256 is locked");vU=t};Object.freeze(Cn);const AU=function(t){return Nde("sha256").update(t).digest()};let EU=AU,xU=!1;function C0(t){const e=ut(t,"data");return ke(EU(e))}C0._=AU;C0.lock=function(){xU=!0};C0.register=function(t){if(xU)throw new Error("sha256 is locked");EU=t};Object.freeze(C0);Object.freeze(C0);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const CU=BigInt(0),k6=BigInt(1),zde=BigInt(2),N6=t=>t instanceof Uint8Array,Hde=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function r0(t){if(!N6(t))throw new Error("Uint8Array expected");let e="";for(let n=0;n<t.length;n++)e+=Hde[t[n]];return e}function _U(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function G_(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function i0(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(e/2);for(let r=0;r<n.length;r++){const i=r*2,s=t.slice(i,i+2),a=Number.parseInt(s,16);if(Number.isNaN(a)||a<0)throw new Error("Invalid byte sequence");n[r]=a}return n}function Df(t){return G_(r0(t))}function Q_(t){if(!N6(t))throw new Error("Uint8Array expected");return G_(r0(Uint8Array.from(t).reverse()))}function s0(t,e){return i0(t.toString(16).padStart(e*2,"0"))}function K_(t,e){return s0(t,e).reverse()}function qde(t){return i0(_U(t))}function _s(t,e,n){let r;if(typeof e=="string")try{r=i0(e)}catch(s){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${s}`)}else if(N6(e))r=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(`${t} expected ${n} bytes, got ${i}`);return r}function Zg(...t){const e=new Uint8Array(t.reduce((r,i)=>r+i.length,0));let n=0;return t.forEach(r=>{if(!N6(r))throw new Error("Uint8Array expected");
vendor: 6,714 bytes, line 4183
4183e.set(r,n),n+=r.length}),e}function $de(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Gde(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Qde(t){let e;for(e=0;t>CU;t>>=k6,e+=1);return e}function Kde(t,e){return t>>BigInt(e)&k6}const Wde=(t,e,n)=>t|(n?k6:CU)<<BigInt(e),W_=t=>(zde<<BigInt(t-1))-k6,t5=t=>new Uint8Array(t),V9=t=>Uint8Array.from(t);function TU(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=t5(t),i=t5(t),s=0;const a=()=>{r.fill(1),i.fill(0),s=0},l=(...m)=>n(i,r,...m),u=(m=t5())=>{i=l(V9([0]),m),r=l(),m.length!==0&&(i=l(V9([1]),m),r=l())},d=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let m=0;const g=[];for(;m<e;){r=l();const w=r.slice();g.push(w),m+=r.length}return Zg(...g)};return(m,g)=>{a(),u(m);let w;for(;!(w=g(d()));)u();return a(),w}}const Yde={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Yy(t,e,n={}){const r=(i,s,a)=>{const l=Yde[s];if(typeof l!="function")throw new Error(`Invalid validator "${s}", expected function`);const u=t[i];if(!(a&&u===void 0)&&!l(u,t))throw new Error(`Invalid param ${String(i)}=${u} (${typeof u}), expected ${s}`)};for(const[i,s]of Object.entries(e))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return t}const Jde=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Kde,bitLen:Qde,bitMask:W_,bitSet:Wde,bytesToHex:r0,bytesToNumberBE:Df,bytesToNumberLE:Q_,concatBytes:Zg,createHmacDrbg:TU,ensureBytes:_s,equalBytes:$de,hexToBytes:i0,hexToNumber:G_,numberToBytesBE:s0,numberToBytesLE:K_,numberToHexUnpadded:_U,numberToVarBytesBE:qde,utf8ToBytes:Gde,validateObject:Yy},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const er=BigInt(0),bn=BigInt(1),Vu=BigInt(2),Xde=BigInt(3),lC=BigInt(4),z9=BigInt(5),H9=BigInt(8);BigInt(9);BigInt(16);function si(t,e){const n=t%e;return n>=er?n:e+n}function Zde(t,e,n){if(n<=er||e<er)throw new Error("Expected power/modulo > 0");if(n===bn)return er;let r=bn;for(;e>er;)e&bn&&(r=r*t%n),t=t*t%n,e>>=bn;return r}function es(t,e,n){let r=t;for(;e-- >er;)r*=r,r%=n;return r}function uC(t,e){if(t===er||e<=er)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=si(t,e),r=e,i=er,s=bn;for(;n!==er;){const l=r/n,u=r%n,d=i-s*l;r=n,n=u,i=s,s=d}if(r!==bn)throw new Error("invert: does not exist");return si(i,e)}function ehe(t){const e=(t-bn)/Vu;let n,r,i;for(n=t-bn,r=0;n%Vu===er;n/=Vu,r++);for(i=Vu;i<t&&Zde(i,e,t)!==t-bn;i++);if(r===1){const a=(t+bn)/lC;return function(u,d){const h=u.pow(d,a);if(!u.eql(u.sqr(h),d))throw new Error("Cannot find square root");return h}}const s=(n+bn)/Vu;return function(l,u){if(l.pow(u,e)===l.neg(l.ONE))throw new Error("Cannot find square root");let d=r,h=l.pow(l.mul(l.ONE,i),n),m=l.pow(u,s),g=l.pow(u,n);for(;!l.eql(g,l.ONE);){if(l.eql(g,l.ZERO))return l.ZERO;let w=1;for(let v=l.sqr(g);w<d&&!l.eql(v,l.ONE);w++)v=l.sqr(v);const A=l.pow(h,bn<<BigInt(d-w-1));h=l.sqr(A),m=l.mul(m,A),g=l.mul(g,h),d=w}return m}}function the(t){if(t%lC===Xde){const e=(t+bn)/lC;return function(r,i){const s=r.pow(i,e);if(!r.eql(r.sqr(s),i))throw new Error("Cannot find square root");return s}}if(t%H9===z9){const e=(t-z9)/H9;return function(r,i){const s=r.mul(i,Vu),a=r.pow(s,e),l=r.mul(i,a),u=r.mul(r.mul(l,Vu),a),d=r.mul(l,r.sub(u,r.ONE));if(!r.eql(r.sqr(d),i))throw new Error("Cannot find square root");return d}}return ehe(t)}const nhe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function rhe(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=nhe.reduce((r,i)=>(r[i]="function",r),e);return Yy(t,n)}function ihe(t,e,n){if(n<er)throw new Error("Expected power > 0");if(n===er)return t.ONE;if(n===bn)return e;let r=t.ONE,i=e;for(;n>er;)n&bn&&(r=t.mul(r,i)),i=t.sqr(i),n>>=bn;return r}function she(t,e){const n=new Array(e.length),r=e.reduce((s,a,l)=>t.is0(a)?s:(n[l]=s,t.mul(s,a)),t.ONE),i=t.inv(r);return e.reduceRight((s,a,l)=>t.is0(a)?s:(n[l]=t.mul(s,n[l]),t.mul(s,a)),i),n}function SU(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function ohe(t,e,n=!1,r={}){if(t<=er)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:s}=SU(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=the(t),l=Object.freeze({ORDER:t,BITS:i,BYTES:s,MASK:W_(i),ZERO:er,ONE:bn,create:u=>si(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof u}`);return er<=u&&u<t},is0:u=>u===er,isOdd:u=>(u&bn)===bn,neg:u=>si(-u,t),eql:(u,d)=>u===d,sqr:u=>si(u*u,t),add:(u,d)=>si(u+d,t),sub:(u,d)=>si(u-d,t),mul:(u,d)=>si(u*d,t),pow:(u,d)=>ihe(l,u,d),div:(u,d)=>si(u*uC(d,t),t),sqrN:u=>u*u,addN:(u,d)=>u+d,subN:(u,d)=>u-d,mulN:(u,d)=>u*d,inv:u=>uC(u,t),sqrt:r.sqrt||(u=>a(l,u)),invertBatch:u=>she(l,u),cmov:(u,d,h)=>h?d:u,toBytes:u=>n?K_(u,s):s0(u,s),fromBytes:u=>{if(u.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${u.length}`);return n?Q_(u):Df(u)}});return Object.freeze(l)}function IU(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function RU(t){const e=IU(t);return e+Math.ceil(e/2)}function ahe(t,e,n=!1){const r=t.length,i=IU(e),s=RU(e);if(r<16||r<s||r>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const a=n?Df(t):Q_(t),l=si(a,e-bn)+bn;return n?K_(l,i):s0(l,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const che=BigInt(0),n5=BigInt(1);function lhe(t,e){const n=(i,s)=>{const a=s.negate();return i?a:s},r=i=>{const s=Math.ceil(e/i)+1,a=2**(i-1);return{windows:s,windowSize:a}};return{constTimeNegate:n,unsafeLadder(i,s){let a=t.ZERO,l=i;for(;s>che;)s&n5&&(a=a.add(l)),l=l.double(),s>>=n5;return a},precomputeWindow(i,s){const{windows:a,windowSize:l}=r(s),u=[];let d=i,h=d;for(let m=0;m<a;m++){h=d,u.push(h);for(let g=1;g<l;g++)h=h.add(d),u.push(h);d=h.double()}return u},wNAF(i,s,a){const{windows:l,windowSize:u}=r(i);let d=t.ZERO,h=t.BASE;
4183const m=BigInt(2**i-1),g=2**i,w=BigInt(i);for(let A=0;A<l;A++){const v=A*u;let x=Number(a&m);a>>=w,x>u&&(x-=g,a+=n5);const T=v,O=v+Math.abs(x)-1,k=A%2!==0,P=x<0;x===0?h=h.add(n(k,s[T])):d=d.add(n(P,s[O]))}return{p:d,f:h}},wNAFCached(i,s,a,l){const u=i._WINDOW_SIZE||1;let d=s.get(i);return d||(d=this.precomputeWindow(i,u),u!==1&&s.set(i,l(d))),this.wNAF(u,d,a)}}}function kU(t){return rhe(t.Fp),Yy(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...SU(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function uhe(t){const e=kU(t);Yy(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=e;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:fhe,hexToBytes:dhe}=Jde,Zu={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Zu;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:fhe(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Zu,n=typeof t=="string"?dhe(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=Zu._parseInt(n.subarray(2)),{d:a,l}=Zu._parseInt(s);if(l.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(t){const e=d=>Number.parseInt(d[0],16)&8?"00"+d:d,n=d=>{const h=d.toString(16);return h.length&1?`0${h}`:h},r=e(n(t.s)),i=e(n(t.r)),s=r.length/2,a=i.length/2,l=n(s),u=n(a);return`30${n(a+s+4)}02${u}${i}02${l}${r}`}},Qa=BigInt(0),ls=BigInt(1);BigInt(2);const q9=BigInt(3);BigInt(4);function hhe(t){const e=uhe(t),{Fp:n}=e,r=e.toBytes||((A,v,x)=>{const T=v.toAffine();return Zg(Uint8Array.from([4]),n.toBytes(T.x),n.toBytes(T.y))}),i=e.fromBytes||(A=>{const v=A.subarray(1),x=n.fromBytes(v.subarray(0,n.BYTES)),T=n.fromBytes(v.subarray(n.BYTES,2*n.BYTES));return{x,y:T}});function s(A){const{a:v,b:x}=e,T=n.sqr(A),O=n.mul(T,A);return n.add(n.add(O,n.mul(A,v)),x)}if(!n.eql(n.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function a(A){return typeof A=="bigint"&&Qa<A&&A<e.n}function l(A){if(!a(A))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function u(A){const{allowedPrivateKeyLengths:v,nByteLength:x,wrapPrivateKey:T,n:O}=e;if(v&&typeof A!="bigint"){if(A instanceof Uint8Array&&(A=r0(A)),typeof A!="string"||!v.includes(A.length))throw new Error("Invalid key");A=A.padStart(x*2,"0")}let k;try{k=typeof A=="bigint"?A:Df(_s("private key",A,x))}catch{throw new Error(`private key must be ${x} bytes, hex or bigint, not ${typeof A}`)}return T&&(k=si(k,O)),l(k),k}const d=new Map;function h(A){if(!(A instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(v,x,T){if(this.px=v,this.py=x,this.pz=T,v==null||!n.isValid(v))throw new Error("x required");if(x==null||!n.isValid(x))throw new Error("y required");if(T==null||!n.isValid(T))throw new Error("z required")}static fromAffine(v){const{x,y:T}=v||{};if(!v||!n.isValid(x)||!n.isValid(T))throw new Error("invalid affine point");if(v instanceof m)throw new Error("projective point not allowed");const O=k=>n.eql(k,n.ZERO);
vendor: 5,226 bytes, line 4183
4183return O(x)&&O(T)?m.ZERO:new m(x,T,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(v){const x=n.invertBatch(v.map(T=>T.pz));return v.map((T,O)=>T.toAffine(x[O])).map(m.fromAffine)}static fromHex(v){const x=m.fromAffine(i(_s("pointHex",v)));return x.assertValidity(),x}static fromPrivateKey(v){return m.BASE.multiply(u(v))}_setWindowSize(v){this._WINDOW_SIZE=v,d.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:v,y:x}=this.toAffine();if(!n.isValid(v)||!n.isValid(x))throw new Error("bad point: x or y not FE");const T=n.sqr(x),O=s(v);if(!n.eql(T,O))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:v}=this.toAffine();if(n.isOdd)return!n.isOdd(v);throw new Error("Field doesn't support isOdd")}equals(v){h(v);const{px:x,py:T,pz:O}=this,{px:k,py:P,pz:B}=v,U=n.eql(n.mul(x,B),n.mul(k,O)),I=n.eql(n.mul(T,B),n.mul(P,O));return U&&I}negate(){return new m(this.px,n.neg(this.py),this.pz)}double(){const{a:v,b:x}=e,T=n.mul(x,q9),{px:O,py:k,pz:P}=this;let B=n.ZERO,U=n.ZERO,I=n.ZERO,R=n.mul(O,O),M=n.mul(k,k),F=n.mul(P,P),j=n.mul(O,k);return j=n.add(j,j),I=n.mul(O,P),I=n.add(I,I),B=n.mul(v,I),U=n.mul(T,F),U=n.add(B,U),B=n.sub(M,U),U=n.add(M,U),U=n.mul(B,U),B=n.mul(j,B),I=n.mul(T,I),F=n.mul(v,F),j=n.sub(R,F),j=n.mul(v,j),j=n.add(j,I),I=n.add(R,R),R=n.add(I,R),R=n.add(R,F),R=n.mul(R,j),U=n.add(U,R),F=n.mul(k,P),F=n.add(F,F),R=n.mul(F,j),B=n.sub(B,R),I=n.mul(F,M),I=n.add(I,I),I=n.add(I,I),new m(B,U,I)}add(v){h(v);const{px:x,py:T,pz:O}=this,{px:k,py:P,pz:B}=v;let U=n.ZERO,I=n.ZERO,R=n.ZERO;const M=e.a,F=n.mul(e.b,q9);let j=n.mul(x,k),q=n.mul(T,P),L=n.mul(O,B),Se=n.add(x,T),X=n.add(k,P);Se=n.mul(Se,X),X=n.add(j,q),Se=n.sub(Se,X),X=n.add(x,O);let Q=n.add(k,B);return X=n.mul(X,Q),Q=n.add(j,L),X=n.sub(X,Q),Q=n.add(T,O),U=n.add(P,B),Q=n.mul(Q,U),U=n.add(q,L),Q=n.sub(Q,U),R=n.mul(M,X),U=n.mul(F,L),R=n.add(U,R),U=n.sub(q,R),R=n.add(q,R),I=n.mul(U,R),q=n.add(j,j),q=n.add(q,j),L=n.mul(M,L),X=n.mul(F,X),q=n.add(q,L),L=n.sub(j,L),L=n.mul(M,L),X=n.add(X,L),j=n.mul(q,X),I=n.add(I,j),j=n.mul(Q,X),U=n.mul(Se,U),U=n.sub(U,j),j=n.mul(Se,q),R=n.mul(Q,R),R=n.add(R,j),new m(U,I,R)}subtract(v){return this.add(v.negate())}is0(){return this.equals(m.ZERO)}wNAF(v){return w.wNAFCached(this,d,v,x=>{const T=n.invertBatch(x.map(O=>O.pz));return x.map((O,k)=>O.toAffine(T[k])).map(m.fromAffine)})}multiplyUnsafe(v){const x=m.ZERO;if(v===Qa)return x;if(l(v),v===ls)return this;const{endo:T}=e;if(!T)return w.unsafeLadder(this,v);let{k1neg:O,k1:k,k2neg:P,k2:B}=T.splitScalar(v),U=x,I=x,R=this;for(;k>Qa||B>Qa;)k&ls&&(U=U.add(R)),B&ls&&(I=I.add(R)),R=R.double(),k>>=ls,B>>=ls;return O&&(U=U.negate()),P&&(I=I.negate()),I=new m(n.mul(I.px,T.beta),I.py,I.pz),U.add(I)}multiply(v){l(v);let x=v,T,O;const{endo:k}=e;if(k){const{k1neg:P,k1:B,k2neg:U,k2:I}=k.splitScalar(x);let{p:R,f:M}=this.wNAF(B),{p:F,f:j}=this.wNAF(I);R=w.constTimeNegate(P,R),F=w.constTimeNegate(U,F),F=new m(n.mul(F.px,k.beta),F.py,F.pz),T=R.add(F),O=M.add(j)}else{const{p:P,f:B}=this.wNAF(x);T=P,O=B}return m.normalizeZ([T,O])[0]}multiplyAndAddUnsafe(v,x,T){const O=m.BASE,k=(B,U)=>U===Qa||U===ls||!B.equals(O)?B.multiplyUnsafe(U):B.multiply(U),P=k(this,x).add(k(v,T));return P.is0()?void 0:P}toAffine(v){const{px:x,py:T,pz:O}=this,k=this.is0();v==null&&(v=k?n.ONE:n.inv(O));const P=n.mul(x,v),B=n.mul(T,v),U=n.mul(O,v);if(k)return{x:n.ZERO,y:n.ZERO};if(!n.eql(U,n.ONE))throw new Error("invZ was invalid");return{x:P,y:B}}isTorsionFree(){const{h:v,isTorsionFree:x}=e;if(v===ls)return!0;if(x)return x(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:x}=e;return v===ls?this:x?x(m,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),r(m,this,v)}toHex(v=!0){return r0(this.toRawBytes(v))}}m.BASE=new m(e.Gx,e.Gy,n.ONE),m.ZERO=new m(n.ZERO,n.ONE,n.ZERO);const g=e.nBitLength,w=lhe(m,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:m,normPrivateKeyToScalar:u,weierstrassEquation:s,isWithinCurveOrder:a}}function phe(t){const e=kU(t);return Yy(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function mhe(t){const e=phe(t),{Fp:n,n:r}=e,i=n.BYTES+1,s=2*n.BYTES+1;function a(X){return Qa<X&&X<n.ORDER}function l(X){return si(X,r)}function u(X){return uC(X,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:h,weierstrassEquation:m,isWithinCurveOrder:g}=hhe({...e,toBytes(X,Q,te){const J=Q.toAffine(),fe=n.toBytes(J.x),$=Zg;return te?$(Uint8Array.from([Q.hasEvenY()?2:3]),fe):$(Uint8Array.from([4]),fe,n.toBytes(J.y))},fromBytes(X){const Q=X.length,te=X[0],J=X.subarray(1);if(Q===i&&(te===2||te===3)){const fe=Df(J);if(!a(fe))throw new Error("Point is not on curve");const $=m(fe);let se=n.sqrt($);const ye=(se&ls)===ls;return(te&1)===1!==ye&&(se=n.neg(se)),{x:fe,y:se}}else if(Q===s&&te===4){const fe=n.fromBytes(J.subarray(0,n.BYTES)),$=n.fromBytes(J.subarray(n.BYTES,2*n.BYTES));return{x:fe,y:$}}else throw new Error(`Point of length ${Q}
4183 was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),w=X=>r0(s0(X,e.nByteLength));function A(X){const Q=r>>ls;return X>Q}function v(X){return A(X)?l(-X):X}const x=(X,Q,te)=>Df(X.slice(Q,te));class T{constructor(Q,te,J){this.r=Q,this.s=te,this.recovery=J,this.assertValidity()}static fromCompact(Q){const te=e.nByteLength;return Q=_s("compactSignature",Q,te*2),new T(x(Q,0,te),x(Q,te,2*te))}static fromDER(Q){const{r:te,s:J}=Zu.toSig(_s("DER",Q));return new T(te,J)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(Q){return new T(this.r,this.s,Q)}recoverPublicKey(Q){const{r:te,s:J,recovery:fe}=this,$=I(_s("msgHash",Q));if(fe==null||![0,1,2,3].includes(fe))throw new Error("recovery id invalid");const se=fe===2||fe===3?te+e.n:te;if(se>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ye=(fe&1)===0?"02":"03",pe=d.fromHex(ye+w(se)),me=u(se),ve=l(-$*me),_e=l(J*me),Re=d.BASE.multiplyAndAddUnsafe(pe,ve,_e);if(!Re)throw new Error("point at infinify");return Re.assertValidity(),Re}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,l(-this.s),this.recovery):this}toDERRawBytes(){return i0(this.toDERHex())}toDERHex(){return Zu.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i0(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const O={isValidPrivateKey(X){try{return h(X),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const X=RU(e.n);return ahe(e.randomBytes(X),e.n)},precompute(X=8,Q=d.BASE){return Q._setWindowSize(X),Q.multiply(BigInt(3)),Q}};function k(X,Q=!0){return d.fromPrivateKey(X).toRawBytes(Q)}function P(X){const Q=X instanceof Uint8Array,te=typeof X=="string",J=(Q||te)&&X.length;return Q?J===i||J===s:te?J===2*i||J===2*s:X instanceof d}function B(X,Q,te=!0){if(P(X))throw new Error("first arg must be private key");if(!P(Q))throw new Error("second arg must be public key");return d.fromHex(Q).multiply(h(X)).toRawBytes(te)}const U=e.bits2int||function(X){const Q=Df(X),te=X.length*8-e.nBitLength;return te>0?Q>>BigInt(te):Q},I=e.bits2int_modN||function(X){return l(U(X))},R=W_(e.nBitLength);function M(X){if(typeof X!="bigint")throw new Error("bigint expected");if(!(Qa<=X&&X<R))throw new Error(`bigint expected < 2^${e.nBitLength}`);return s0(X,e.nByteLength)}function F(X,Q,te=j){if(["recovered","canonical"].some(qe=>qe in te))throw new Error("sign() legacy options not supported");const{hash:J,randomBytes:fe}=e;let{lowS:$,prehash:se,extraEntropy:ye}=te;$==null&&($=!0),X=_s("msgHash",X),se&&(X=_s("prehashed msgHash",J(X)));const pe=I(X),me=h(Q),ve=[M(me),M(pe)];if(ye!=null){const qe=ye===!0?fe(n.BYTES):ye;ve.push(_s("extraEntropy",qe))}const _e=Zg(...ve),Re=pe;function De(qe){const it=U(qe);if(!g(it))return;const Vt=u(it),Qe=d.BASE.multiply(it).toAffine(),et=l(Qe.x);if(et===Qa)return;const Pt=l(Vt*l(Re+et*me));if(Pt===Qa)return;let It=(Qe.x===et?0:2)|Number(Qe.y&ls),nn=Pt;return $&&A(Pt)&&(nn=v(Pt),It^=1),new T(et,nn,It)}return{seed:_e,k2sig:De}}const j={lowS:e.lowS,prehash:!1},q={lowS:e.lowS,prehash:!1};function L(X,Q,te=j){const{seed:J,k2sig:fe}=F(X,Q,te),$=e;return TU($.hash.outputLen,$.nByteLength,$.hmac)(J,fe)}d.BASE._setWindowSize(8);function Se(X,Q,te,J=q){var Qe;const fe=X;if(Q=_s("msgHash",Q),te=_s("publicKey",te),"strict"in J)throw new Error("options.strict was renamed to lowS");const{lowS:$,prehash:se}=J;let ye,pe;try{if(typeof fe=="string"||fe instanceof Uint8Array)try{ye=T.fromDER(fe)}catch(et){if(!(et instanceof Zu.Err))throw et;ye=T.fromCompact(fe)}else if(typeof fe=="object"&&typeof fe.r=="bigint"&&typeof fe.s=="bigint"){const{r:et,s:Pt}=fe;ye=new T(et,Pt)}else throw new Error("PARSE");pe=d.fromHex(te)}catch(et){if(et.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if($&&ye.hasHighS())return!1;se&&(Q=e.hash(Q));const{r:me,s:ve}=ye,_e=I(Q),Re=u(ve),De=l(_e*Re),qe=l(me*Re),it=(Qe=d.BASE.multiplyAndAddUnsafe(pe,De,qe))==null?void 0:Qe.toAffine();return it?l(it.x)===me:!1}return{CURVE:e,getPublicKey:k,getSharedSecret:B,sign:L,verify:Se,ProjectivePoint:d,Signature:T,utils:O}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ghe(t){return{hash:t,hmac:(e,...n)=>oU(t,e,rde(...n)),randomBytes:ide}}function yhe(t,e){const n=r=>mhe({...t,...ghe(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const NU=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),$9=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),bhe=BigInt(1),fC=BigInt(2),G9=(t,e)=>(t+e/fC)/e;function whe(t){const e=NU,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),l=BigInt(44),u=BigInt(88),d=t*t*t%e,h=d*d*t%e,m=es(h,n,e)*h%e,g=es(m,n,e)*h%e,w=es(g,fC,e)*d%e,A=es(w,i,e)*w%e,v=es(A,s,e)*A%e,x=es(v,l,e)*v%e,T=es(x,u,e)*
4183x%e,O=es(T,l,e)*v%e,k=es(O,n,e)*h%e,P=es(k,a,e)*A%e,B=es(P,r,e)*d%e,U=es(B,fC,e);if(!dC.eql(dC.sqr(U),t))throw new Error("Cannot find square root");return U}const dC=ohe(NU,void 0,void 0,{sqrt:whe}),el=yhe({a:BigInt(0),b:BigInt(7),Fp:dC,n:$9,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=$9,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-bhe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,a=BigInt("0x100000000000000000000000000000000"),l=G9(s*t,e),u=G9(-r*t,e);let d=si(t-l*n-u*i,e),h=si(-l*r-u*s,e);const m=d>a,g=h>a;if(m&&(d=e-d),g&&(h=e-h),d>a||h>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:m,k1:d,k2neg:g,k2:h}}}},cU);BigInt(0);el.ProjectivePoint;const ey="0x0000000000000000000000000000000000000000",Q9="0x0000000000000000000000000000000000000000000000000000000000000000",K9=BigInt(0),W9=BigInt(1),Y9=BigInt(2),J9=BigInt(27),X9=BigInt(28),qb=BigInt(35),oh={};function Z9(t){return uc(Ln(t),32)}var ip,wo,sp,Af;const Cs=class Cs{constructor(e,n,r,i){ee(this,ip);ee(this,wo);ee(this,sp);ee(this,Af);Ky(e,oh,"Signature"),z(this,ip,n),z(this,wo,r),z(this,sp,i),z(this,Af,null)}get r(){return C(this,ip)}
4183set r(e){ne(Ph(e)===32,"invalid r","value",e),z(this,ip,ke(e))}get s(){return ne(parseInt(C(this,wo).substring(0,3))<8,"non-canonical s; use ._s","s",C(this,wo)),C(this,wo)}set s(e){ne(Ph(e)===32,"invalid s","value",e),z(this,wo,ke(e))}get _s(){return C(this,wo)}isValid(){return parseInt(C(this,wo).substring(0,3))<8}get v(){return C(this,sp)}set v(e){const n=ot(e,"value");ne(n===27||n===28,"invalid v","v",e),z(this,sp,n)}get networkV(){return C(this,Af)}get legacyChainId(){const e=this.networkV;return e==null?null:Cs.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=ut(this.s);return this.yParity&&(e[0]|=128),ke(e)}get compactSerialized(){return dn([this.r,this.yParityAndS])}get serialized(){return dn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this._s}"${this.isValid()?"":', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Cs(oh,this.r,this._s,this.v);return this.networkV&&z(e,Af,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this._s,v:this.v}}static getChainId(e){const n=Pe(e,"v");return n==J9||n==X9?K9:(ne(n>=qb,"invalid EIP-155 v","v",e),(n-qb)/Y9)}static getChainIdV(e,n){return Pe(e)*Y9+BigInt(35+n-27)}static getNormalizedV(e){const n=Pe(e);return n===K9||n===J9?27:n===W9||n===X9?28:(ne(n>=qb,"invalid v","v",e),n&W9?27:28)}static from(e){function n(d,h){ne(d,h,"signature",e)}if(e==null)return new Cs(oh,Q9,Q9,27);if(typeof e=="string"){const d=ut(e,"signature");if(d.length===64){const h=ke(d.slice(0,32)),m=d.slice(32,64),g=m[0]&128?28:27;return m[0]&=127,new Cs(oh,h,ke(m),g)}if(d.length===65){const h=ke(d.slice(0,32)),m=ke(d.slice(32,64)),g=Cs.getNormalizedV(d[64]);return new Cs(oh,h,m,g)}n(!1,"invalid raw signature length")}if(e instanceof Cs)return e.clone();const r=e.r;n(r!=null,"missing r");const i=Z9(r),s=(function(d,h){if(d!=null)return Z9(d);if(h!=null){n(Yt(h,32),"invalid yParityAndS");const m=ut(h);return m[0]&=127,ke(m)}n(!1,"missing s")})(e.s,e.yParityAndS),{networkV:a,v:l}=(function(d,h,m){if(d!=null){const g=Pe(d);return{networkV:g>=qb?g:void 0,v:Cs.getNormalizedV(g)}}if(h!=null)return n(Yt(h,32),"invalid yParityAndS"),{v:ut(h)[0]&128?28:27};if(m!=null){switch(ot(m,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}n(!1,"invalid yParity")}n(!1,"missing v")})(e.v,e.yParityAndS,e.yParity),u=new Cs(oh,i,s,l);return a&&z(u,Af,a),n(e.yParity==null||ot(e.yParity,"sig.yParity")===u.yParity,"yParity mismatch"),n(e.yParityAndS==null||e.yParityAndS===u.yParityAndS,"yParityAndS mismatch"),u}};ip=new WeakMap,wo=new WeakMap,sp=new WeakMap,Af=new WeakMap;let ui=Cs;var La;const Hu=class Hu{constructor(e){ee(this,La);
4183ne(Ph(e)===32,"invalid private key","privateKey","[REDACTED]"),z(this,La,ke(e))}get privateKey(){return C(this,La)}get publicKey(){return Hu.computePublicKey(C(this,La))}get compressedPublicKey(){return Hu.computePublicKey(C(this,La),!0)}sign(e){ne(Ph(e)===32,"invalid digest length","digest",e);const n=el.sign(Vr(e),Vr(C(this,La)),{lowS:!0});return ui.from({r:Kl(n.r,32),s:Kl(n.s,32),v:n.recovery?28:27})}computeSharedSecret(e){const n=Hu.computePublicKey(e);return ke(el.getSharedSecret(Vr(C(this,La)),ut(n),!1))}static computePublicKey(e,n){let r=ut(e,"key");if(r.length===32){const s=el.getPublicKey(r,!!n);return ke(s)}if(r.length===64){const s=new Uint8Array(65);s[0]=4,s.set(r,1),r=s}const i=el.ProjectivePoint.fromHex(r);return ke(i.toRawBytes(n))}static recoverPublicKey(e,n){ne(Ph(e)===32,"invalid digest length","digest",e);const r=ui.from(n);let i=el.Signature.fromCompact(Vr(dn([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const s=i.recoverPublicKey(Vr(e));return ne(s!=null,"invalid signature for digest","signature",n),"0x"+s.toHex(!1)}static addPoints(e,n,r){const i=el.ProjectivePoint.fromHex(Hu.computePublicKey(e).substring(2)),s=el.ProjectivePoint.fromHex(Hu.computePublicKey(n).substring(2));return"0x"+i.add(s).toHex(!!r)}};La=new WeakMap;let ty=Hu;const vhe=BigInt(0),Ahe=BigInt(36);function ek(t){t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=e[i].charCodeAt(0);const r=ut(Cn(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(r[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Y_={};for(let t=0;t<10;t++)Y_[String(t)]=String(t);for(let t=0;t<26;t++)Y_[String.fromCharCode(65+t)]=String(10+t);const tk=15;function Ehe(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>Y_[r]).join("");for(;e.length>=tk;){let r=e.substring(0,tk);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}const xhe=(function(){const t={};for(let e=0;e<36;e++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[n]=BigInt(e)}return t})();function Che(t){t=t.toLowerCase();let e=vhe;for(let n=0;n<t.length;n++)e=e*Ahe+xhe[t[n]];return e}function Bt(t){if(ne(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=ek(t);return ne(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){ne(t.substring(2,4)===Ehe(t),"bad icap checksum","address",t);let e=Che(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return ek("0x"+e)}ne(!1,"invalid address","address",t)}function _he(t){const e=Bt(t.from);let r=Pe(t.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,Bt(un(Cn(Wl([e,r])),12))}function OU(t){return t&&typeof t.getAddress=="function"}async function r5(t,e){const n=await e;return(n==null||n==="0x0000000000000000000000000000000000000000")&&(Ee(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),ne(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),Bt(n)}function Hr(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?Bt(t):(Ee(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),r5(t,e.resolveName(t)));if(OU(t))return r5(t,t.getAddress());if(t&&typeof t.then=="function")return r5(t,t);ne(!1,"unsupported addressable value","target",t)}const Sa={};function Be(t,e){let n=!1;return e<0&&(n=!0,e*=-1),new Sr(Sa,`${n?"":"u"}int${e}`,t,{signed:n,width:e})}function kt(t,e){return new Sr(Sa,`bytes${e||""}`,t,{size:e})}const nk=Symbol.for("_ethers_typed");var Ef;const Ia=class Ia{constructor(e,n,r,i){ae(this,"type");ae(this,"value");ee(this,Ef);ae(this,"_typedSymbol");i==null&&(i=null),Ky(Sa,e,"Typed"),We(this,{_typedSymbol:nk,type:n,value:r}),z(this,Ef,i),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")}
4183)`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return C(this,Ef)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return C(this,Ef)===!0?-1:C(this,Ef)===!1?this.value.length:null}static from(e,n){return new Ia(Sa,e,n)}static uint8(e){return Be(e,8)}static uint16(e){return Be(e,16)}static uint24(e){return Be(e,24)}static uint32(e){return Be(e,32)}static uint40(e){return Be(e,40)}static uint48(e){return Be(e,48)}static uint56(e){return Be(e,56)}static uint64(e){return Be(e,64)}static uint72(e){return Be(e,72)}static uint80(e){return Be(e,80)}static uint88(e){return Be(e,88)}static uint96(e){return Be(e,96)}static uint104(e){return Be(e,104)}static uint112(e){return Be(e,112)}static uint120(e){return Be(e,120)}static uint128(e){return Be(e,128)}static uint136(e){return Be(e,136)}static uint144(e){return Be(e,144)}static uint152(e){return Be(e,152)}static uint160(e){return Be(e,160)}static uint168(e){return Be(e,168)}static uint176(e){return Be(e,176)}static uint184(e){return Be(e,184)}static uint192(e){return Be(e,192)}static uint200(e){return Be(e,200)}static uint208(e){return Be(e,208)}static uint216(e){return Be(e,216)}static uint224(e){return Be(e,224)}static uint232(e){return Be(e,232)}static uint240(e){return Be(e,240)}static uint248(e){return Be(e,248)}static uint256(e){return Be(e,256)}static uint(e){return Be(e,256)}static int8(e){return Be(e,-8)}static int16(e){return Be(e,-16)}static int24(e){return Be(e,-24)}static int32(e){return Be(e,-32)}static int40(e){return Be(e,-40)}static int48(e){return Be(e,-48)}static int56(e){return Be(e,-56)}static int64(e){return Be(e,-64)}static int72(e){return Be(e,-72)}static int80(e){return Be(e,-80)}static int88(e){return Be(e,-88)}static int96(e){return Be(e,-96)}static int104(e){return Be(e,-104)}static int112(e){return Be(e,-112)}static int120(e){return Be(e,-120)}static int128(e){return Be(e,-128)}static int136(e){return Be(e,-136)}static int144(e){return Be(e,-144)}static int152(e){return Be(e,-152)}static int160(e){return Be(e,-160)}static int168(e){return Be(e,-168)}static int176(e){return Be(e,-176)}static int184(e){return Be(e,-184)}static int192(e){return Be(e,-192)}static int200(e){return Be(e,-200)}static int208(e){return Be(e,-208)}static int216(e){return Be(e,-216)}static int224(e){return Be(e,-224)}static int232(e){return Be(e,-232)}static int240(e){return Be(e,-240)}static int248(e){return Be(e,-248)}static int256(e){return Be(e,-256)}static int(e){return Be(e,-256)}static bytes1(e){return kt(e,1)}static bytes2(e){return kt(e,2)}static bytes3(e){return kt(e,3)}static bytes4(e){return kt(e,4)}static bytes5(e){return kt(e,5)}static bytes6(e){return kt(e,6)}static bytes7(e){return kt(e,7)}static bytes8(e){return kt(e,8)}static bytes9(e){return kt(e,9)}static bytes10(e){return kt(e,10)}static bytes11(e){return kt(e,11)}static bytes12(e){return kt(e,12)}static bytes13(e){return kt(e,13)}static bytes14(e){return kt(e,14)}static bytes15(e){return kt(e,15)}static bytes16(e){return kt(e,16)}static bytes17(e){return kt(e,17)}static bytes18(e){return kt(e,18)}static bytes19(e){return kt(e,19)}static bytes20(e){return kt(e,20)}static bytes21(e){return kt(e,21)}static bytes22(e){return kt(e,22)}static bytes23(e){return kt(e,23)}static bytes24(e){return kt(e,24)}static bytes25(e){return kt(e,25)}static bytes26(e){return kt(e,26)}static bytes27(e){return kt(e,27)}static bytes28(e){return kt(e,28)}static bytes29(e){return kt(e,29)}static bytes30(e){return kt(e,30)}static bytes31(e){return kt(e,31)}static bytes32(e){return kt(e,32)}static address(e){return new Ia(Sa,"address",e)}static bool(e){return new Ia(Sa,"bool",!!e)}static bytes(e){return new Ia(Sa,"bytes",e)}static string(e){return new Ia(Sa,"string",e)}static array(e,n){throw new Error("not implemented yet")}static tuple(e,n){throw new Error("not implemented yet")}static overrides(e){return new Ia(Sa,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===nk}static dereference(e,n){if(Ia.isTyped(e)){if(e.type!==n)throw new Error(`invalid type: expecetd ${n}, got ${e.type}`);return e.value}return e}};Ef=new WeakMap;let Sr=Ia;class The extends gc{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,n){let r=Sr.dereference(n,"string");try{r=Bt(r)}catch(i){return this._throwError(i.message,n)}return e.writeValue(r)}decode(e){return Bt(Kl(e.readValue(),20))}}class She extends gc{constructor(n){super(n.name,n.type,"_",n.dynamic);ae(this,"coder");
4183this.coder=n}defaultValue(){return this.coder.defaultValue()}encode(n,r){return this.coder.encode(n,r)}decode(n){return this.coder.decode(n)}}function BU(t,e,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n=="object"){let u={};r=e.map(d=>{const h=d.localName;return Ee(h,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:d},value:n}),Ee(!u[h],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:d},value:n}),u[h]=!0,n[h]})}else ne(!1,"invalid tuple value","tuple",n);ne(e.length===r.length,"types/value length mismatch","tuple",n);let i=new sC,s=new sC,a=[];e.forEach((u,d)=>{let h=r[d];if(u.dynamic){let m=s.length;u.encode(s,h);let g=i.writeUpdatableValue();a.push(w=>{g(w+m)})}else u.encode(i,h)}),a.forEach(u=>{u(i.length)});let l=t.appendWriter(i);return l+=t.appendWriter(s),l}function PU(t,e){let n=[],r=[],i=t.subReader(0);return e.forEach(s=>{let a=null;if(s.dynamic){let l=t.readIndex(),u=i.subReader(l);try{a=s.decode(u)}catch(d){if(dr(d,"BUFFER_OVERRUN"))throw d;a=d,a.baseType=s.name,a.name=s.localName,a.type=s.type}}else try{a=s.decode(t)}catch(l){if(dr(l,"BUFFER_OVERRUN"))throw l;a=l,a.baseType=s.name,a.name=s.localName,a.type=s.type}if(a==null)throw new Error("investigate");n.push(a),r.push(s.localName||null)}),t0.fromItems(n,r)}class Ihe extends gc{constructor(n,r,i){const s=n.type+"["+(r>=0?r:"")+"]",a=r===-1||n.dynamic;super("array",s,i,a);ae(this,"coder");ae(this,"length");We(this,{coder:n,length:r})}defaultValue(){const n=this.coder.defaultValue(),r=[];for(let i=0;i<this.length;i++)r.push(n);return r}encode(n,r){const i=Sr.dereference(r,"array");Array.isArray(i)||this._throwError("expected array value",i);let s=this.length;s===-1&&(s=i.length,n.writeValue(i.length)),HL(i.length,s,"coder array"+(this.localName?" "+this.localName:""));let a=[];for(let l=0;l<i.length;l++)a.push(this.coder);return BU(n,a,i)}decode(n){let r=this.length;r===-1&&(r=n.readIndex(),Ee(r*zr<=n.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:n.bytes,offset:r*zr,length:n.dataLength}));let i=[];for(let s=0;s<r;s++)i.push(new She(this.coder));return PU(n,i)}}class Rhe extends gc{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,n){const r=Sr.dereference(n,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}class DU extends gc{constructor(e,n){super(e,e,n,!0)}defaultValue(){return"0x"}encode(e,n){n=Vr(n);let r=e.writeValue(n.length);return r+=e.writeBytes(n),r}decode(e){return e.readBytes(e.readIndex(),!0)}}class khe extends DU{constructor(e){super("bytes",e)}decode(e){return ke(super.decode(e))}}class Nhe extends gc{constructor(n,r){let i="bytes"+String(n);super(i,i,r,!1);ae(this,"size");We(this,{size:n},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(n,r){let i=Vr(Sr.dereference(r,this.type));return i.length!==this.size&&this._throwError("incorrect data length",r),n.writeBytes(i)}decode(n){return ke(n.readBytes(this.size))}}const Ohe=new Uint8Array([]);class Bhe extends gc{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,n){return n!=null&&this._throwError("not null",n),e.writeBytes(Ohe)}decode(e){return e.readBytes(0),null}}const Phe=BigInt(0),Dhe=BigInt(1),Mhe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class jhe extends gc{constructor(n,r,i){const s=(r?"int":"uint")+n*8;super(s,s,i,!1);ae(this,"size");ae(this,"signed");We(this,{size:n,signed:r},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(n,r){let i=Pe(Sr.dereference(r,this.type)),s=Xu(Mhe,zr*8);if(this.signed){let a=Xu(s,this.size*8-1);(i>a||i<-(a+Dhe))&&this._throwError("value out-of-bounds",r),i=GL(i,8*zr)}else(i<Phe||i>Xu(s,this.size*8))&&this._throwError("value out-of-bounds",r);return n.writeValue(i)}decode(n){let r=Xu(n.readValue(),this.size*8);return this.signed&&(r=ev(r,this.size*8)),r}}class Lhe extends DU{constructor(e){super("string",e)}defaultValue(){return""}encode(e,n){return super.encode(e,ec(Sr.dereference(n,"string")))}decode(e){return tv(super.decode(e))}}class $b extends gc{constructor(n,r){let i=!1;const s=[];
4183n.forEach(l=>{l.dynamic&&(i=!0),s.push(l.type)});const a="tuple("+s.join(",")+")";super("tuple",a,r,i);ae(this,"coders");We(this,{coders:Object.freeze(n.slice())})}defaultValue(){const n=[];this.coders.forEach(i=>{n.push(i.defaultValue())});const r=this.coders.reduce((i,s)=>{const a=s.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});return this.coders.forEach((i,s)=>{let a=i.localName;!a||r[a]!==1||(a==="length"&&(a="_length"),n[a]==null&&(n[a]=n[s]))}),Object.freeze(n)}encode(n,r){const i=Sr.dereference(r,"tuple");return BU(n,this.coders,i)}decode(n){return PU(n,this.coders)}}function i5(t,e){return{address:Bt(t),storageKeys:e.map((n,r)=>(ne(Yt(n,32),"invalid slot",`storageKeys[${r}]`,n),n.toLowerCase()))}}function cd(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(ne(n.length===2,"invalid slot set",`value[${r}]`,n),i5(n[0],n[1])):(ne(n!=null&&typeof n=="object","invalid address-slot set","value",t),i5(n.address,n.storageKeys)));ne(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(n=>{const r=t[n].reduce((i,s)=>(i[s]=!0,i),{});return i5(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function MU(t){return{address:Bt(t.address),nonce:Pe(t.nonce!=null?t.nonce:0),chainId:Pe(t.chainId!=null?t.chainId:0),signature:ui.from(t.signature)}}function Uhe(t){let e;return typeof t=="string"?e=ty.computePublicKey(t,!1):e=t.publicKey,Bt(Cn("0x"+e.substring(4)).substring(26))}function Fhe(t,e){return Uhe(ty.recoverPublicKey(t,e))}const Zn=BigInt(0),Vhe=BigInt(2),zhe=BigInt(27),Hhe=BigInt(28),qhe=BigInt(35),$he=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),s5=4096*32;function Ghe(t){return{blobToKzgCommitment:r=>{if("computeBlobProof"in t){if("blobToKzgCommitment"in t&&typeof t.blobToKzgCommitment=="function")return ut(t.blobToKzgCommitment(ke(r)))}else if("blobToKzgCommitment"in t&&typeof t.blobToKzgCommitment=="function")return ut(t.blobToKzgCommitment(r));if("blobToKZGCommitment"in t&&typeof t.blobToKZGCommitment=="function")return ut(t.blobToKZGCommitment(ke(r)));ne(!1,"unsupported KZG library","kzg",t)},computeBlobKzgProof:(r,i)=>{if("computeBlobProof"in t&&typeof t.computeBlobProof=="function")return ut(t.computeBlobProof(ke(r),ke(i)));if("computeBlobKzgProof"in t&&typeof t.computeBlobKzgProof=="function")return t.computeBlobKzgProof(r,i);if("computeBlobKZGProof"in t&&typeof t.computeBlobKZGProof=="function")return ut(t.computeBlobKZGProof(ke(r),ke(i)));ne(!1,"unsupported KZG library","kzg",t)}}}function rk(t,e){let n=t.toString(16);for(;n.length<2;)n="0"+n;return n+=C0(e).substring(4),"0x"+n}function _0(t){return t==="0x"?null:Bt(t)}function O6(t,e){try{return cd(t)}catch(n){ne(!1,n.message,e,t)}}function Qhe(t,e){try{if(!Array.isArray(t))throw new Error("authorizationList: invalid array");const n=[];for(let r=0;r<t.length;r++){const i=t[r];if(!Array.isArray(i))throw new Error(`authorization[${r}
4183]: invalid array`);if(i.length!==6)throw new Error(`authorization[${r}]: wrong length`);if(!i[1])throw new Error(`authorization[${r}]: null address`);n.push({address:_0(i[1]),nonce:Qt(i[2],"nonce"),chainId:Qt(i[0],"chainId"),signature:ui.from({yParity:ld(i[3],"yParity"),r:uc(i[4],32),s:uc(i[5],32)})})}return n}catch(n){ne(!1,n.message,e,t)}}function ld(t,e){return t==="0x"?0:ot(t,e)}function Qt(t,e){if(t==="0x")return Zn;const n=Pe(t,e);return ne(n<=$he,"value exceeds uint size",e,n),n}function vt(t,e){const n=Pe(t,"value"),r=Ln(n);return ne(r.length<=32,"value too large",`tx.${e}`,n),r}function B6(t){return cd(t).map(e=>[e.address,e.storageKeys])}function Khe(t){return t.map(e=>[vt(e.chainId,"chainId"),e.address,vt(e.nonce,"nonce"),vt(e.signature.yParity,"yParity"),Ln(e.signature.r),Ln(e.signature.s)])}function Whe(t,e){ne(Array.isArray(t),`invalid ${e}`,"value",t);for(let n=0;n<t.length;n++)ne(Yt(t[n],32),"invalid ${ param } hash",`value[${n}]`,t[n]);return t}function Yhe(t){const e=Wy(t);ne(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const n={type:0,nonce:ld(e[0],"nonce"),gasPrice:Qt(e[1],"gasPrice"),gasLimit:Qt(e[2],"gasLimit"),to:_0(e[3]),value:Qt(e[4],"value"),data:ke(e[5]),chainId:Zn};if(e.length===6)return n;
4183const r=Qt(e[6],"v"),i=Qt(e[7],"r"),s=Qt(e[8],"s");if(i===Zn&&s===Zn)n.chainId=r;else{let a=(r-qhe)/Vhe;a<Zn&&(a=Zn),n.chainId=a,ne(a!==Zn||r===zhe||r===Hhe,"non-canonical legacy v","v",e[6]),n.signature=ui.from({r:uc(e[7],32),s:uc(e[8],32),v:r})}return n}function Jhe(t,e){const n=[vt(t.nonce,"nonce"),vt(t.gasPrice||0,"gasPrice"),vt(t.gasLimit,"gasLimit"),t.to||"0x",vt(t.value,"value"),t.data];let r=Zn;if(t.chainId!=Zn)r=Pe(t.chainId,"tx.chainId"),ne(!e||e.networkV==null||e.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){const s=t.signature.legacyChainId;s!=null&&(r=s)}if(!e)return r!==Zn&&(n.push(Ln(r)),n.push("0x"),n.push("0x")),Wl(n);let i=BigInt(27+e.yParity);return r!==Zn?i=ui.getChainIdV(r,e.v):BigInt(e.v)!==i&&ne(!1,"tx.chainId/sig.v mismatch","sig",e),n.push(Ln(i)),n.push(Ln(e.r)),n.push(Ln(e.s)),Wl(n)}function P6(t,e){let n;try{if(n=ld(e[0],"yParity"),n!==0&&n!==1)throw new Error("bad yParity")}catch{ne(!1,"invalid yParity","yParity",e[0])}const r=uc(e[1],32),i=uc(e[2],32),s=ui.from({r,s:i,yParity:n});t.signature=s}function Xhe(t){const e=Wy(ut(t).slice(1));ne(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",ke(t));const n={type:2,chainId:Qt(e[0],"chainId"),nonce:ld(e[1],"nonce"),maxPriorityFeePerGas:Qt(e[2],"maxPriorityFeePerGas"),maxFeePerGas:Qt(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:Qt(e[4],"gasLimit"),to:_0(e[5]),value:Qt(e[6],"value"),data:ke(e[7]),accessList:O6(e[8],"accessList")};return e.length===9||P6(n,e.slice(9)),n}function Zhe(t,e){const n=[vt(t.chainId,"chainId"),vt(t.nonce,"nonce"),vt(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),vt(t.maxFeePerGas||0,"maxFeePerGas"),vt(t.gasLimit,"gasLimit"),t.to||"0x",vt(t.value,"value"),t.data,B6(t.accessList||[])];return e&&(n.push(vt(e.yParity,"yParity")),n.push(Ln(e.r)),n.push(Ln(e.s))),dn(["0x02",Wl(n)])}function epe(t){const e=Wy(ut(t).slice(1));ne(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",ke(t));const n={type:1,chainId:Qt(e[0],"chainId"),nonce:ld(e[1],"nonce"),gasPrice:Qt(e[2],"gasPrice"),gasLimit:Qt(e[3],"gasLimit"),to:_0(e[4]),value:Qt(e[5],"value"),data:ke(e[6]),accessList:O6(e[7],"accessList")};return e.length===8||P6(n,e.slice(8)),n}function tpe(t,e){const n=[vt(t.chainId,"chainId"),vt(t.nonce,"nonce"),vt(t.gasPrice||0,"gasPrice"),vt(t.gasLimit,"gasLimit"),t.to||"0x",vt(t.value,"value"),t.data,B6(t.accessList||[])];return e&&(n.push(vt(e.yParity,"recoveryParam")),n.push(Ln(e.r)),n.push(Ln(e.s))),dn(["0x01",Wl(n)])}function npe(t){let e=Wy(ut(t).slice(1)),n="3",r=null;if(e.length===4&&Array.isArray(e[0])){n="3 (network format)";const s=e[1],a=e[2],l=e[3];ne(Array.isArray(s),"invalid network format: blobs not an array","fields[1]",s),ne(Array.isArray(a),"invalid network format: commitments not an array","fields[2]",a),ne(Array.isArray(l),"invalid network format: proofs not an array","fields[3]",l),ne(s.length===a.length,"invalid network format: blobs/commitments length mismatch","fields",e),ne(s.length===l.length,"invalid network format: blobs/proofs length mismatch","fields",e),r=[];for(let u=0;u<e[1].length;u++)r.push({data:s[u],commitment:a[u],proof:l[u]});e=e[0]}ne(Array.isArray(e)&&(e.length===11||e.length===14),`invalid field count for transaction type: ${n}`,"data",ke(t));const i={type:3,chainId:Qt(e[0],"chainId"),nonce:ld(e[1],"nonce"),maxPriorityFeePerGas:Qt(e[2],"maxPriorityFeePerGas"),maxFeePerGas:Qt(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:Qt(e[4],"gasLimit"),to:_0(e[5]),value:Qt(e[6],"value"),data:ke(e[7]),accessList:O6(e[8],"accessList"),maxFeePerBlobGas:Qt(e[9],"maxFeePerBlobGas"),blobVersionedHashes:e[10]};r&&(i.blobs=r),ne(i.to!=null,`invalid address for transaction type: ${n}`,"data",t),ne(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",t);for(let s=0;s<i.blobVersionedHashes.length;s++)ne(Yt(i.blobVersionedHashes[s],32),`invalid blobVersionedHash at index ${s}: must be length 32`,"data",t);return e.length===11||P6(i,e.slice(11)),i}function rpe(t,e,n){const r=[vt(t.chainId,"chainId"),vt(t.nonce,"nonce"),vt(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),vt(t.maxFeePerGas||0,"maxFeePerGas"),vt(t.gasLimit,"gasLimit"),t.to||ey,vt(t.value,"value"),t.data,B6(t.accessList||[]),vt(t.maxFeePerBlobGas||0,"maxFeePerBlobGas"),Whe(t.blobVersionedHashes||[],"blobVersionedHashes")];return e&&(r.push(vt(e.yParity,"yParity")),r.push(Ln(e.r)),r.push(Ln(e.s)),n)?dn(["0x03",Wl([r,n.map(i=>i.data),n.map(i=>i.commitment),n.map(i=>i.proof)])]):dn(["0x03",Wl(r)])}function ipe(t){const e=Wy(ut(t).slice(1));ne(Array.isArray(e)&&(e.length===10||e.length===13),"invalid field count for transaction type: 4","data",ke(t));const n={type:4,chainId:Qt(e[0],"chainId"),nonce:ld(e[1],"nonce"),maxPriorityFeePerGas:Qt(e[2],"maxPriorityFeePerGas"),maxFeePerGas:Qt(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:Qt(e[4],"gasLim
4183it"),to:_0(e[5]),value:Qt(e[6],"value"),data:ke(e[7]),accessList:O6(e[8],"accessList"),authorizationList:Qhe(e[9],"authorizationList")};return e.length===10||P6(n,e.slice(10)),n}function spe(t,e){const n=[vt(t.chainId,"chainId"),vt(t.nonce,"nonce"),vt(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),vt(t.maxFeePerGas||0,"maxFeePerGas"),vt(t.gasLimit,"gasLimit"),t.to||"0x",vt(t.value,"value"),t.data,B6(t.accessList||[]),Khe(t.authorizationList||[])];return e&&(n.push(vt(e.yParity,"yParity")),n.push(Ln(e.r)),n.push(Ln(e.s))),dn(["0x04",Wl(n)])}var Ns,op,ap,cp,lp,up,fp,dp,hp,pp,mp,gp,xf,pl,vo,ml,yp,bp,uw;const ho=class ho{constructor(){ee(this,bp);ee(this,Ns);ee(this,op);ee(this,ap);ee(this,cp);ee(this,lp);ee(this,up);ee(this,fp);ee(this,dp);ee(this,hp);ee(this,pp);ee(this,mp);ee(this,gp);ee(this,xf);ee(this,pl);ee(this,vo);ee(this,ml);ee(this,yp);z(this,Ns,null),z(this,op,null),z(this,cp,0),z(this,lp,Zn),z(this,up,null),z(this,fp,null),z(this,dp,null),z(this,ap,"0x"),z(this,hp,Zn),z(this,pp,Zn),z(this,mp,null),z(this,gp,null),z(this,xf,null),z(this,pl,null),z(this,vo,null),z(this,ml,null),z(this,yp,null)}get type(){return C(this,Ns)}set type(e){switch(e){case null:z(this,Ns,null);break;case 0:case"legacy":z(this,Ns,0);break;case 1:case"berlin":case"eip-2930":z(this,Ns,1);break;case 2:case"london":case"eip-1559":z(this,Ns,2);break;case 3:case"cancun":case"eip-4844":z(this,Ns,3);break;case 4:case"pectra":case"eip-7702":z(this,Ns,4);break;default:ne(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const e=C(this,op);return e==null&&this.type===3?ey:e}set to(e){z(this,op,e==null?null:Bt(e))}get nonce(){return C(this,cp)}set nonce(e){z(this,cp,ot(e,"value"))}get gasLimit(){return C(this,lp)}set gasLimit(e){z(this,lp,Pe(e))}get gasPrice(){const e=C(this,up);return e==null&&(this.type===0||this.type===1)?Zn:e}set gasPrice(e){z(this,up,e==null?null:Pe(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=C(this,fp);return e??(this.type===2||this.type===3?Zn:null)}set maxPriorityFeePerGas(e){z(this,fp,e==null?null:Pe(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=C(this,dp);return e??(this.type===2||this.type===3?Zn:null)}set maxFeePerGas(e){z(this,dp,e==null?null:Pe(e,"maxFeePerGas"))}get data(){return C(this,ap)}set data(e){z(this,ap,ke(e))}get value(){return C(this,hp)}set value(e){z(this,hp,Pe(e,"value"))}get chainId(){return C(this,pp)}set chainId(e){z(this,pp,Pe(e))}get signature(){return C(this,mp)||null}set signature(e){z(this,mp,e==null?null:ui.from(e))}get accessList(){const e=C(this,gp)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){z(this,gp,e==null?null:cd(e))}get authorizationList(){const e=C(this,yp)||null;return e==null&&this.type===4?[]:e}set authorizationList(e){z(this,yp,e==null?null:e.map(n=>MU(n)))}get maxFeePerBlobGas(){const e=C(this,xf);return e==null&&this.type===3?Zn:e}set maxFeePerBlobGas(e){z(this,xf,e==null?null:Pe(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=C(this,pl);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){ne(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let n=0;n<e.length;n++)ne(Yt(e[n],32),"invalid blobVersionedHash",`value[${n}]`,e[n])}z(this,pl,e)}get blobs(){return C(this,ml)==null?null:C(this,ml).map(e=>Object.assign({},e))}set blobs(e){if(e==null){z(this,ml,null);return}const n=[],r=[];for(let i=0;i<e.length;i++){const s=e[i];if(V_(s)){Ee(C(this,vo),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let a=ut(s);if(ne(a.length<=s5,"blob is too large",`blobs[${i}]`,s),a.length!==s5){const d=new Uint8Array(s5);d.set(a),a=d}const l=C(this,vo).blobToKzgCommitment(a),u=ke(C(this,vo).computeBlobKzgProof(a,l));n.push({data:ke(a),commitment:ke(l),proof:u}),r.push(rk(1,l))}else{const a=ke(s.commitment);n.push({data:ke(s.data),commitment:a,proof:ke(s.proof)}),r.push(rk(1,a))}}z(this,ml,n),z(this,pl,r)}get kzg(){return C(this,vo)}set kzg(e){e==null?z(this,vo,null):z(this,vo,Ghe(e))}get hash(){return this.signature==null?null:Cn(he(this,bp,uw).call(this,!0,!1))}get unsignedHash(){return Cn(this.unsignedSerialized)}get from(){return this.signature==null?null:Fhe(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:ty.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return he(this,bp,uw).call(this,!0,!0)}
4183get unsignedSerialized(){return he(this,bp,uw).call(this,!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,n=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=C(this,xf)!=null||C(this,pl);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&Ee(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Ee(!n||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Ee(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):this.authorizationList&&this.authorizationList.length?s.push(4):n?s.push(2):e?(s.push(1),r||s.push(0)):r?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return ho.from(this)}toJSON(){const e=n=>n==null?null:n.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new ho;if(typeof e=="string"){const r=ut(e);if(r[0]>=127)return ho.from(Yhe(r));switch(r[0]){case 1:return ho.from(epe(r));case 2:return ho.from(Xhe(r));case 3:return ho.from(npe(r));case 4:return ho.from(ipe(r))}Ee(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const n=new ho;return e.type!=null&&(n.type=e.type),e.to!=null&&(n.to=e.to),e.nonce!=null&&(n.nonce=e.nonce),e.gasLimit!=null&&(n.gasLimit=e.gasLimit),e.gasPrice!=null&&(n.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(n.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(n.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(n.data=e.data),e.value!=null&&(n.value=e.value),e.chainId!=null&&(n.chainId=e.chainId),e.signature!=null&&(n.signature=ui.from(e.signature)),e.accessList!=null&&(n.accessList=e.accessList),e.authorizationList!=null&&(n.authorizationList=e.authorizationList),e.blobVersionedHashes!=null&&(n.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(n.kzg=e.kzg),e.blobs!=null&&(n.blobs=e.blobs),e.hash!=null&&(ne(n.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),ne(n.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(ne(n.isSigned(),"unsigned transaction cannot define '.from'","tx",e),ne(n.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),n}};Ns=new WeakMap,op=new WeakMap,ap=new WeakMap,cp=new WeakMap,lp=new WeakMap,up=new WeakMap,fp=new WeakMap,dp=new WeakMap,hp=new WeakMap,pp=new WeakMap,mp=new WeakMap,gp=new WeakMap,xf=new WeakMap,pl=new WeakMap,vo=new WeakMap,ml=new WeakMap,yp=new WeakMap,bp=new WeakSet,uw=function(e,n){Ee(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=e?this.signature:null;switch(this.inferType()){case 0:return Jhe(this,r);case 1:return tpe(this,r);case 2:return Zhe(this,r);case 3:return rpe(this,r,n?this.blobs:null);case 4:return spe(this,r)}Ee(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let iv=ho;function Jf(t){return Cn(ec(t))}var ope="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQ
4183BgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9ey
4183MgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduP
4183jbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESV
4183FFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";
4183const ik=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),sk=4;function ape(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,s=[0,1];for(let B=1;B<r;B++)s.push(i+=n());let a=n(),l=e;e+=a;let u=0,d=0;function h(){return u==0&&(d=d<<8|t[e++],u=8),d>>--u&1}const m=31,g=2**m,w=g>>>1,A=w>>1,v=g-1;let x=0;for(let B=0;B<m;B++)x=x<<1|h();let T=[],O=0,k=g;for(;;){let B=Math.floor(((x-O+1)*i-1)/k),U=0,I=r;for(;I-U>1;){let F=U+I>>>1;B<s[F]?I=F:U=F}if(U==0)break;T.push(U);let R=O+Math.floor(k*s[U]/i),M=O+Math.floor(k*s[U+1]/i)-1;for(;((R^M)&w)==0;)x=x<<1&v|h(),R=R<<1&v,M=M<<1&v|1;for(;R&~M&A;)x=x&w|x<<1&v>>>1|h(),R=R<<1^w,M=(M^w)<<1|w|1;O=R,k=1+M-R}let P=r-4;return T.map(B=>{switch(B-P){case 3:return P+65792+(t[l++]<<16|t[l++]<<8|t[l++]);case 2:return P+256+(t[l++]<<8|t[l++]);case 1:return P+t[l++];default:return B-1}})}function cpe(t){let e=0;return()=>t[e++]}function jU(t){return cpe(ape(lpe(t)))}function lpe(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>
4183e[i.charCodeAt(0)]=s);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,s=0,a=0,l=0;i<n;i++)l=l<<6|e[t.charCodeAt(i)],a+=6,a>=8&&(r[s++]=l>>(a-=8));return r}function upe(t){return t&1?~t>>1:t>>1}function fpe(t,e){let n=Array(t);for(let r=0,i=0;r<t;r++)n[r]=i+=upe(e());return n}function ny(t,e=0){let n=[];for(;;){let r=t(),i=t();if(!i)break;e+=r;for(let s=0;s<i;s++)n.push(e+s);e+=i+1}return n}function LU(t){return ry(()=>{let e=ny(t);if(e.length)return e})}function UU(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(dpe(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(hpe(n,t))}return e.flat()}function ry(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function FU(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)fpe(t,n).forEach((s,a)=>r[a].push(s));return r}function dpe(t,e){let n=1+e(),r=e(),i=ry(e);return FU(i.length,1+t,e).flatMap((a,l)=>{let[u,...d]=a;return Array(i[l]).fill().map((h,m)=>{let g=m*r;return[u+m*n,d.map(w=>w+g)]})})}function hpe(t,e){let n=1+e();return FU(n,1+t,e).map(i=>[i[0],i.slice(1)])}function ppe(t){let e=[],n=ny(t);return i(r([]),[]),e;function r(s){let a=t(),l=ry(()=>{let u=ny(t).map(d=>n[d]);if(u.length)return r(u)});return{S:a,B:l,Q:s}}function i({S:s,B:a},l,u){if(!(s&4&&u===l[l.length-1])){s&2&&(u=l[l.length-1]),s&1&&e.push(l);for(let d of a)for(let h of d.Q)i(d,[...l,h],u)}}}function mpe(t){return t.toString(16).toUpperCase().padStart(2,"0")}function VU(t){return`{${mpe(t)}}`}function gpe(t){let e=[];for(let n=0,r=t.length;n<r;){let i=t.codePointAt(n);n+=i<65536?1:2,e.push(i)}return e}function o0(t){let n=t.length;if(n<4096)return String.fromCodePoint(...t);let r=[];for(let i=0;i<n;)r.push(String.fromCodePoint(...t.slice(i,i+=4096)));return r.join("")}function ype(t,e){let n=t.length,r=n-e.length;for(let i=0;r==0&&i<n;i++)r=t[i]-e[i];return r}var bpe=
vendor: 7,453 bytes, line 4183
4183"AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g"
4183;const iy=44032,sv=4352,ov=4449,av=4519,zU=19,HU=21,a0=28,cv=HU*a0,wpe=zU*cv,vpe=iy+wpe,Ape=sv+zU,Epe=ov+HU,xpe=av+a0;function Zm(t){return t>>24&255}function qU(t){return t&16777215}let hC,ok,pC,fw;function Cpe(){let t=jU(bpe);hC=new Map(LU(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),ok=new Set(ny(t)),pC=new Map,fw=new Map;for(let[e,n]of UU(t)){if(!ok.has(e)&&n.length==2){let[r,i]=n,s=fw.get(r);s||(s=new Map,fw.set(r,s)),s.set(i,e)}pC.set(e,n.reverse())}}function $U(t){return t>=iy&&t<vpe}function _pe(t,e){if(t>=sv&&t<Ape&&e>=ov&&e<Epe)return iy+(t-sv)*cv+(e-ov)*a0;if($U(t)&&e>av&&e<xpe&&(t-iy)%a0==0)return t+(e-av);{let n=fw.get(t);return n&&(n=n.get(e),n)?n:-1}}function GU(t){hC||Cpe();let e=[],n=[],r=!1;function i(s){let a=hC.get(s);a&&(r=!0,s|=a),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if($U(s)){let a=s-iy,l=a/cv|0,u=a%cv/a0|0,d=a%a0;i(sv+l),i(ov+u),d>0&&i(av+d)}else{let a=pC.get(s);a?n.push(...a):i(s)}if(!n.length)break;s=n.pop()}if(r&&e.length>1){let s=Zm(e[0]);for(let a=1;a<e.length;a++){let l=Zm(e[a]);if(l==0||s<=l){s=l;continue}let u=a-1;for(;;){let d=e[u+1];if(e[u+1]=e[u],e[u]=d,!u||(s=Zm(e[--u]),s<=l))break}s=Zm(e[a])}}return e}function Tpe(t){let e=[],n=[],r=-1,i=0;for(let s of t){let a=Zm(s),l=qU(s);if(r==-1)a==0?r=l:e.push(l);else if(i>0&&i>=a)a==0?(e.push(r,...n),n.length=0,r=l):n.push(l),i=a;else{let u=_pe(r,l);u>=0?r=u:i==0&&a==0?(e.push(r),r=l):(n.push(l),i=a)}}return r>=0&&e.push(r,...n),e}function QU(t){return GU(t).map(qU)}function Spe(t){return Tpe(GU(t))}const ak=45,KU=".",WU=65039,YU=1,lv=t=>Array.from(t);function sy(t,e){return t.P.has(e)||t.Q.has(e)}class Ipe extends Array{get is_emoji(){return!0}}let mC,JU,ef,gC,XU,Mh,o5,ph,Lu,ck,yC;function J_(){if(mC)return;let t=jU(ope);const e=()=>ny(t),n=()=>new Set(e()),r=(h,m)=>m.forEach(g=>h.add(g));mC=new Map(UU(t)),JU=n(),ef=e(),gC=new Set(e().map(h=>ef[h])),ef=new Set(ef),XU=n(),n();let i=LU(t),s=t();const a=()=>{let h=new Set;return e().forEach(m=>r(h,i[m])),r(h,e()),h};Mh=ry(h=>{let m=ry(t).map(g=>g+96);if(m.length){let g=h>=s;m[0]-=32,m=o0(m),g&&(m=`Restricted[${m}]`);let w=a(),A=a(),v=!t();return{N:m,P:w,Q:A,M:v,R:g}}}),o5=n(),ph=new Map;let l=e().concat(lv(o5)).sort((h,m)=>h-m);l.forEach((h,m)=>{let g=t(),w=l[m]=g?l[m-g]:{V:[],M:new Map};w.V.push(h),o5.has(h)||ph.set(h,w)});for(let{V:h,M:m}of new Set(ph.values())){let g=[];for(let A of h){let v=Mh.filter(T=>sy(T,A)),x=g.find(({G:T})=>v.some(O=>T.has(O)));x||(x={G:new Set,V:[]},g.push(x)),x.V.push(A),r(x.G,v)}let w=g.flatMap(A=>lv(A.G));for(let{G:A,V:v}of g){let x=new Set(w.filter(T=>!A.has(T)));for(let T of v)m.set(T,x)}}Lu=new Set;let u=new Set;const d=h=>Lu.has(h)?u.add(h):Lu.add(h);for(let h of Mh){for(let m of h.P)d(m);for(let m of h.Q)d(m)}for(let h of Lu)!ph.has(h)&&!u.has(h)&&ph.set(h,YU);r(Lu,QU(Lu)),ck=ppe(t).map(h=>Ipe.from(h)).sort(ype),yC=new Map;for(let h of ck){let m=[yC];for(let g of h){let w=m.map(A=>{let v=A.get(g);return v||(v=new Map,A.set(g,v)),v});g===WU?m.push(...w):m=w}for(let g of m)g.V=h}}function X_(t){return(ZU(t)?"":`${Z_(D6([t]))} `)+VU(t)}function Z_(t){return`"${t}"â`}function Rpe(t){if(t.length>=4&&t[2]==ak&&t[3]==ak)throw new Error(`invalid label extension: "${o0(t.slice(0,4))}"`)}function kpe(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function Npe(t){let e=t[0],n=ik.get(e);if(n)throw fg(`leading ${n}`);let r=t.length,i=-1;for(let s=1;s<r;s++){e=t[s];let a=ik.get(e);if(a){if(i==s)throw fg(`${n} + ${a}`);i=s+1,n=a}}if(i==r)throw fg(`trailing ${n}`)}function D6(t,e=1/0,n=VU){let r=[];Ope(t[0])&&r.push("â"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,s=t.length;for(let a=0;a<s;a++){let l=t[a];ZU(l)&&(r.push(o0(t.slice(i,a))),r.push(n(l)),i=a+1)}return r.push(o0(t.slice(i,s))),r.join("")}function Ope(t){return J_(),ef.has(t)}function ZU(t){return J_(),XU.has(t)}function Bpe(t){return jpe(Ppe(t,Spe,Fpe))}function Ppe(t,e,n){if(!t)return[];J_();let r=0;return t.split(KU).map(i=>{let s=gpe(i),a={input:s,offset:r};r+=s.length+1;try{let l=a.tokens=Upe(s,e,n),u=l.length,d;if(!u)throw new Error("empty label");let h=a.output=l.flat();if(kpe(h),!(a.emoji=u>1||l[0].is_emoji)&&h.every(g=>g<128))Rpe(h),d="ASCII";else{let g=l.flatMap(w=>w.is_emoji?[]:w);if(!g.length)d="Emoji";else{if(ef.has(h[0]))throw fg("leading combining mark");for(let v=1;v<u;v++){let x=l[v];
4183if(!x.is_emoji&&ef.has(x[0]))throw fg(`emoji + combining mark: "${o0(l[v-1])} + ${D6([x[0]])}"`)}Npe(h);let w=lv(new Set(g)),[A]=Mpe(w);Lpe(A,g),Dpe(A,w),d=A.N}}a.type=d}catch(l){a.error=l}return a})}function Dpe(t,e){let n,r=[];for(let i of e){let s=ph.get(i);if(s===YU)return;if(s){let a=s.M.get(i);if(n=n?n.filter(l=>a.has(l)):lv(a),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(s=>sy(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function Mpe(t){let e=Mh;for(let n of t){let r=e.filter(i=>sy(i,n));if(!r.length)throw Mh.some(i=>sy(i,n))?tF(e[0],n):eF(n);if(e=r,r.length==1)break}return e}function jpe(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${Z_(D6(e,63))}: ${i}`)}return o0(r)}).join(KU)}function eF(t){return new Error(`disallowed character: ${X_(t)}`)}function tF(t,e){let n=X_(e),r=Mh.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function fg(t){return new Error(`illegal placement: ${t}`)}function Lpe(t,e){for(let n of e)if(!sy(t,n))throw tF(t,n);if(t.M){let n=QU(e);for(let r=1,i=n.length;r<i;r++)if(gC.has(n[r])){let s=r+1;for(let a;s<i&&gC.has(a=n[s]);s++)for(let l=r;l<s;l++)if(n[l]==a)throw new Error(`duplicate non-spacing marks: ${X_(a)}`);if(s-r>sk)throw new Error(`excessive non-spacing marks: ${Z_(D6(n.slice(r-1,s)))} (${s-r}/${sk})`);r=s}}}function Upe(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let s=Vpe(t);if(s)i.length&&(r.push(e(i)),i=[]),r.push(n(s));else{let a=t.pop();if(Lu.has(a))i.push(a);else{let l=mC.get(a);if(l)i.push(...l);else if(!JU.has(a))throw eF(a)}}}return i.length&&r.push(e(i)),r}function Fpe(t){return t.filter(e=>e!=WU)}function Vpe(t,e){let n=yC,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:s}=n;s&&(r=s,t.length=i)}return r}const nF=new Uint8Array(32);nF.fill(0);function lk(t){return ne(t.length!==0,"invalid ENS name; empty component","comp",t),t}function rF(t){const e=ec(zpe(t)),n=[];if(t.length===0)return n;let r=0;for(let i=0;i<e.length;i++)e[i]===46&&(n.push(lk(e.slice(r,i))),r=i+1);return ne(r<e.length,"invalid ENS name; empty component","name",t),n.push(lk(e.slice(r))),n}function zpe(t){try{if(t.length===0)throw new Error("empty label");return Bpe(t)}catch(e){ne(!1,`invalid ENS name (${e.message})`,"name",t)}}function bC(t){ne(typeof t=="string","invalid ENS name; not a string","name",t),ne(t.length,"invalid ENS name (empty label)","name",t);let e=nF;const n=rF(t);for(;n.length;)e=Cn(dn([e,Cn(n.pop())]));return ke(e)}function Hpe(t,e){const n=e;return ne(n<=255,"DNS encoded label cannot exceed 255","length",n),ke(dn(rF(t).map(r=>{ne(r.length<=n,`label ${JSON.stringify(t)} exceeds ${n} bytes`,"name",t);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}const iF=new Uint8Array(32);iF.fill(0);const qpe=BigInt(-1),sF=BigInt(0),oF=BigInt(1),$pe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Gpe(t){const e=ut(t),n=e.length%32;return n?dn([e,iF.slice(n)]):ke(e)}const Qpe=Kl(oF,32),Kpe=Kl(sF,32),uk={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},a5=["name","version","chainId","verifyingContract","salt"];function fk(t){return function(e){return ne(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Wpe={name:fk("name"),version:fk("version"),chainId:function(t){const e=Pe(t,"domain.chainId");return ne(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Ps(e)},verifyingContract:function(t){try{return Bt(t).toLowerCase()}catch{}ne(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=ut(t,"domain.salt");return ne(e.length===32,'invalid domain value "salt"',"domain.salt",t),ke(e)}};function c5(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const n=e[1]==="",r=parseInt(e[2]);ne(r%8===0&&r!==0&&r<=256&&e[2]===String(r),"invalid numeric width","type",t);const i=Xu($pe,n?r-1:r),s=n?(i+oF)*qpe:sF;return function(a){const l=Pe(a,"value");return ne(l>=s&&l<=i,`value out-of-bounds for ${t}`,"value",l),Kl(n?GL(l,256):l,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return ne(n!==0&&n<=32&&e[1]===String(n),"invalid bytes width","type",t),function(r){const i=ut(r);return ne(i.length===n,`invalid length for ${t}`,"value",r),Gpe(r)}}}switch(t){case"address":return function(e){return uc(Bt(e),32)};case"bool":return function(e){return e?Qpe:Kpe};case"bytes":return function(e){return Cn(e)};case"string":return function(e){return Jf(e)}}return null}function dk(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}function Gb(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var by,Ua,wp,mv,aF;const ts=class ts{constructor(e){ee(this,mv);ae(this,"primaryType");ee(this,by);
4183ee(this,Ua);ee(this,wp);z(this,Ua,new Map),z(this,wp,new Map);const n=new Map,r=new Map,i=new Map,s={};Object.keys(e).forEach(u=>{s[u]=e[u].map(({name:d,type:h})=>{let{base:m,index:g}=Gb(h);return m==="int"&&!e.int&&(m="int256"),m==="uint"&&!e.uint&&(m="uint256"),{name:d,type:m+(g||"")}}),n.set(u,new Set),r.set(u,[]),i.set(u,new Set)}),z(this,by,JSON.stringify(s));for(const u in s){const d=new Set;for(const h of s[u]){ne(!d.has(h.name),`duplicate variable name ${JSON.stringify(h.name)} in ${JSON.stringify(u)}`,"types",e),d.add(h.name);const m=Gb(h.type).base;ne(m!==u,`circular type reference to ${JSON.stringify(m)}`,"types",e),!c5(m)&&(ne(r.has(m),`unknown type ${JSON.stringify(m)}`,"types",e),r.get(m).push(u),n.get(u).add(m))}}const a=Array.from(r.keys()).filter(u=>r.get(u).length===0);ne(a.length!==0,"missing primary type","types",e),ne(a.length===1,`ambiguous primary types or unused types: ${a.map(u=>JSON.stringify(u)).join(", ")}`,"types",e),We(this,{primaryType:a[0]});function l(u,d){ne(!d.has(u),`circular type reference to ${JSON.stringify(u)}`,"types",e),d.add(u);for(const h of n.get(u))if(r.has(h)){l(h,d);for(const m of d)i.get(m).add(h)}d.delete(u)}l(this.primaryType,new Set);for(const[u,d]of i){const h=Array.from(d);h.sort(),C(this,Ua).set(u,dk(u,s[u])+h.map(m=>dk(m,s[m])).join(""))}}get types(){return JSON.parse(C(this,by))}getEncoder(e){let n=C(this,wp).get(e);return n||(n=he(this,mv,aF).call(this,e),C(this,wp).set(e,n)),n}encodeType(e){const n=C(this,Ua).get(e);return ne(n,`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Cn(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(c5(e))return r(e,n);const i=Gb(e).array;if(i)return ne(i.count===-1||i.count===n.length,`array length mismatch; expected length ${i.count}`,"value",n),n.map(a=>this._visit(i.prefix,a,r));const s=this.types[e];if(s)return s.reduce((a,{name:l,type:u})=>(a[l]=this._visit(u,n[l],r),a),{});ne(!1,`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new ts(e)}static getPrimaryType(e){return ts.from(e).primaryType}static hashStruct(e,n,r){return ts.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){if(e[r]==null)continue;const i=uk[r];ne(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:i})}return n.sort((r,i)=>a5.indexOf(r.name)-a5.indexOf(i.name)),ts.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return dn(["0x1901",ts.hashDomain(e),ts.from(n).hash(r)])}static hash(e,n,r){return Cn(ts.encode(e,n,r))}static async resolveNames(e,n,r,i){e=Object.assign({},e);for(const l in e)e[l]==null&&delete e[l];const s={};e.verifyingContract&&!Yt(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const a=ts.from(n);a.visit(r,(l,u)=>(l==="address"&&!Yt(u,20)&&(s[u]="0x"),u));for(const l in s)s[l]=await i(l);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),r=a.visit(r,(l,u)=>l==="address"&&s[u]?s[u]:u),{domain:e,value:r}}static getPayload(e,n,r){ts.hashDomain(e);const i={},s=[];a5.forEach(u=>{const d=e[u];d!=null&&(i[u]=Wpe[u](d),s.push({name:u,type:uk[u]}))});const a=ts.from(n);n=a.types;const l=Object.assign({},n);return ne(l.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",n),l.EIP712Domain=s,a.encode(r),{types:l,domain:i,primaryType:a.primaryType,message:a.visit(r,(u,d)=>{if(u.match(/^bytes(\d*)/))return ke(ut(d));if(u.match(/^u?int/))return Pe(d).toString();switch(u){case"address":return d.toLowerCase();case"bool":return!!d;case"string":return ne(typeof d=="string","invalid string","value",d),d}ne(!1,"unsupported type","type",u)})}}};by=new WeakMap,Ua=new WeakMap,wp=new WeakMap,mv=new WeakSet,aF=function(e){{const i=c5(e);if(i)return i}const n=Gb(e).array;if(n){const i=n.prefix,s=this.getEncoder(i);return a=>{ne(n.count===-1||n.count===a.length,`array length mismatch; expected length ${n.count}`,"value",a);let l=a.map(s);return C(this,Ua).has(i)&&(l=l.map(Cn)),Cn(dn(l))}}
4183const r=this.types[e];if(r){const i=Jf(C(this,Ua).get(e));return s=>{const a=r.map(({name:l,type:u})=>{const d=this.getEncoder(u)(s[l]);return C(this,Ua).has(u)?Cn(d):d});return a.unshift(i),dn(a)}}ne(!1,`unknown type: ${e}`,"type",e)};let uv=ts;function qr(t){const e=new Set;return t.forEach(n=>e.add(n)),Object.freeze(e)}const Ype="external public payable override",Jpe=qr(Ype.split(" ")),cF="constant external internal payable private public pure view override",Xpe=qr(cF.split(" ")),lF="constructor error event fallback function receive struct",uF=qr(lF.split(" ")),fF="calldata memory storage payable indexed",Zpe=qr(fF.split(" ")),e0e="tuple returns",t0e=[lF,fF,e0e,cF].join(" "),n0e=qr(t0e.split(" ")),r0e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},i0e=new RegExp("^(\\s*)"),s0e=new RegExp("^([0-9]+)"),o0e=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),dF=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),hF=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var cr,Os,wy,wC;const gv=class gv{constructor(e){ee(this,wy);ee(this,cr);ee(this,Os);z(this,cr,0),z(this,Os,e.slice())}get offset(){return C(this,cr)}get length(){return C(this,Os).length-C(this,cr)}clone(){return new gv(C(this,Os))}reset(){z(this,cr,0)}popKeyword(e){const n=this.peek();if(n.type!=="KEYWORD"||!e.has(n.text))throw new Error(`expected keyword ${n.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const n=this.peek();throw new Error(`expected ${e}; got ${n.type} ${JSON.stringify(n.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=he(this,wy,wC).call(this,C(this,cr)+1,e.match+1);return z(this,cr,e.match+1),n}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const n=[];for(;C(this,cr)<e.match-1;){const r=this.peek().linkNext;n.push(he(this,wy,wC).call(this,C(this,cr)+1,r)),z(this,cr,r)}return z(this,cr,e.match+1),n}peek(){if(C(this,cr)>=C(this,Os).length)throw new Error("out-of-bounds");return C(this,Os)[C(this,cr)]}peekKeyword(e){const n=this.peekType("KEYWORD");return n!=null&&e.has(n)?n:null}peekType(e){if(this.length===0)return null;const n=this.peek();return n.type===e?n.text:null}pop(){const e=this.peek();return $c(this,cr)._++,e}toString(){const e=[];for(let n=C(this,cr);n<C(this,Os).length;n++){const r=C(this,Os)[n];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}};cr=new WeakMap,Os=new WeakMap,wy=new WeakSet,wC=function(e=0,n=0){return new gv(C(this,Os).slice(e,n).map(r=>Object.freeze(Object.assign({},r,{match:r.match-e,linkBack:r.linkBack-e,linkNext:r.linkNext-e}))))};let qs=gv;function eu(t){const e=[],n=a=>{const l=s<t.length?JSON.stringify(t[s]):"$EOI";throw new Error(`invalid token ${l} at ${s}: ${a}`)};let r=[],i=[],s=0;for(;s<t.length;){let a=t.substring(s),l=a.match(i0e);l&&(s+=l[1].length,a=t.substring(s));const u={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};e.push(u);let d=r0e[a[0]]||"";if(d){if(u.type=d,u.text=a[0],s++,d==="OPEN_PAREN")r.push(e.length-1),i.push(e.length-1);else if(d=="CLOSE_PAREN")r.length===0&&n("no matching open bracket"),u.match=r.pop(),e[u.match].match=e.length-1,u.depth--,u.linkBack=i.pop(),e[u.linkBack].linkNext=e.length-1;else if(d==="COMMA")u.linkBack=i.pop(),e[u.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(d==="OPEN_BRACKET")u.type="BRACKET";else if(d==="CLOSE_BRACKET"){let h=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const m=e.pop().text;h=m+h,e[e.length-1].value=ot(m)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=h}continue}if(l=a.match(o0e),l){if(u.text=l[1],s+=u.text.length,n0e.has(u.text)){u.type="KEYWORD";continue}if(u.text.match(hF)){u.type="TYPE";continue}u.type="ID";continue}if(l=a.match(s0e),l){u.text=l[1],u.type="NUMBER",s+=u.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`)}return new qs(e.map(a=>Object.freeze(a)))}function hk(t,e){let n=[];for(const r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function M6(t,e){if(e.peekKeyword(uF)){const n=e.pop().text;if(n!==t)throw new Error(`expected ${t}, got ${n}`)}return e.popType("ID")}function dc(t,e){const n=new Set;for(;;){const r=t.peekType("KEYWORD");if(r==null||e&&!e.has(r))break;if(t.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function pF(t){let e=dc(t,Xpe);return hk(e,qr("constant payable nonpayable".split(" "))),hk(e,qr("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function tc(t,e){return t.popParams().map(n=>mr.from(n,e))}
4183function mF(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return Pe(t.pop().text);throw new Error("invalid gas")}return null}function Xf(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const a0e=new RegExp(/^(.*)\[([0-9]*)\]$/);function pk(t){const e=t.match(hF);if(ne(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const n=parseInt(e[2]);ne(n!==0&&n<=32,"invalid bytes length","type",t)}else if(e[3]){const n=parseInt(e[3]);ne(n!==0&&n<=256&&n%8===0,"invalid numeric width","type",t)}return t}const sn={},fi=Symbol.for("_ethers_internal"),mk="_ParamTypeInternal",gk="_ErrorInternal",yk="_EventInternal",bk="_ConstructorInternal",wk="_FallbackInternal",vk="_FunctionInternal",Ak="_StructInternal";var vp,dw;const ns=class ns{constructor(e,n,r,i,s,a,l,u){ee(this,vp);ae(this,"name");ae(this,"type");ae(this,"baseType");ae(this,"indexed");ae(this,"components");ae(this,"arrayLength");ae(this,"arrayChildren");if(Ky(e,sn,"ParamType"),Object.defineProperty(this,fi,{value:mk}),a&&(a=Object.freeze(a.slice())),i==="array"){if(l==null||u==null)throw new Error("")}else if(l!=null||u!=null)throw new Error("");if(i==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");We(this,{name:n,type:r,baseType:i,indexed:s,components:a,arrayLength:l,arrayChildren:u})}format(e){if(e==null&&(e="sighash"),e==="json"){const r=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=r,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let n="";return this.isArray()?(n+=this.arrayChildren.format(e),n+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?n+="("+this.components.map(r=>r.format(e)).join(e==="full"?", ":",")+")":n+=this.type,e!=="sighash"&&(this.indexed===!0&&(n+=" indexed"),e==="full"&&this.name&&(n+=" "+this.name)),n}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map(i=>r.arrayChildren.walk(i,n))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map((i,s)=>r.components[s].walk(i,n))}return n(this.type,e)}async walkAsync(e,n){const r=[],i=[e];return he(this,vp,dw).call(this,r,e,n,s=>{i[0]=s}),r.length&&await Promise.all(r),i[0]}static from(e,n){if(ns.isParamType(e))return e;if(typeof e=="string")try{return ns.from(eu(e),n)}catch{ne(!1,"invalid param type","obj",e)}else if(e instanceof qs){let l="",u="",d=null;dc(e,qr(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(u="tuple",d=e.popParams().map(v=>ns.from(v)),l=`tuple(${d.map(v=>v.format()).join(",")})`):(l=pk(e.popType("TYPE")),u=l);let h=null,m=null;for(;e.length&&e.peekType("BRACKET");){const v=e.pop();h=new ns(sn,"",l,u,null,d,m,h),m=v.value,l+=v.text,u="array",d=null}let g=null;if(dc(e,Zpe).has("indexed")){if(!n)throw new Error("");g=!0}const A=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new ns(sn,A,l,u,g,d,m,h)}const r=e.name;ne(!r||typeof r=="string"&&r.match(dF),"invalid name","obj.name",r);let i=e.indexed;i!=null&&(ne(n,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,a=s.match(a0e);if(a){const l=parseInt(a[2]||"-1"),u=ns.from({type:a[1],components:e.components});return new ns(sn,r||"",s,"array",i,null,l,u)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const l=e.components!=null?e.components.map(d=>ns.from(d)):null;return new ns(sn,r||"",s,"tuple",i,l,null,null)}return s=pk(e.type),new ns(sn,r||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[fi]===mk}};vp=new WeakSet,dw=function(e,n,r,i){if(this.isArray()){if(!Array.isArray(n))throw new Error("invalid array value");if(this.arrayLength!==-1&&n.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,l=n.slice();l.forEach((u,d)=>{var h;he(h=a,vp,dw).call(h,e,u,r,m=>{l[d]=m})}),i(l);return}if(this.isTuple()){const a=this.components;let l;if(Array.isArray(n))l=n.slice();else{if(n==null||typeof n!="object")throw new Error("invalid tuple value");l=a.map(u=>{if(!u.name)throw new Error("cannot use object value with unnamed components");if(!(u.name in n))throw new Error(`missing value for component ${u.name}`);return n[u.name]})}if(l.length!==this.components.length)throw new Error("array is wrong length");l.forEach((u,d)=>{var h;he(h=a[d],vp,dw).call(h,e,u,r,m=>{l[d]=m})}),i(l);return}
4183const s=r(this.type,n);s.then?e.push((async function(){i(await s)})()):i(s)};let mr=ns;class Zf{constructor(e,n,r){ae(this,"type");ae(this,"inputs");Ky(e,sn,"Fragment"),r=Object.freeze(r.slice()),We(this,{type:n,inputs:r})}static from(e){if(typeof e=="string"){try{Zf.from(JSON.parse(e))}catch{}return Zf.from(eu(e))}if(e instanceof qs)switch(e.peekKeyword(uF)){case"constructor":return Ka.from(e);case"error":return oi.from(e);case"event":return So.from(e);case"fallback":case"receive":return ka.from(e);case"function":return Io.from(e);case"struct":return Mf.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Ka.from(e);case"error":return oi.from(e);case"event":return So.from(e);case"fallback":case"receive":return ka.from(e);case"function":return Io.from(e);case"struct":return Mf.from(e)}Ee(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}ne(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Ka.isFragment(e)}static isError(e){return oi.isFragment(e)}static isEvent(e){return So.isFragment(e)}static isFunction(e){return Io.isFragment(e)}static isStruct(e){return Mf.isFragment(e)}}class j6 extends Zf{constructor(n,r,i,s){super(n,r,s);ae(this,"name");ne(typeof i=="string"&&i.match(dF),"invalid identifier","name",i),s=Object.freeze(s.slice()),We(this,{name:i})}}function oy(t,e){return"("+e.map(n=>n.format(t)).join(t==="full"?", ":",")+")"}class oi extends j6{constructor(e,n,r){super(e,"error",n,r),Object.defineProperty(this,fi,{value:gk})}get selector(){return Jf(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});const n=[];return e!=="sighash"&&n.push("error"),n.push(this.name+oy(e,this.inputs)),n.join(" ")}static from(e){if(oi.isFragment(e))return e;if(typeof e=="string")return oi.from(eu(e));if(e instanceof qs){const n=M6("error",e),r=tc(e);return Xf(e),new oi(sn,n,r)}return new oi(sn,e.name,e.inputs?e.inputs.map(mr.from):[])}static isFragment(e){return e&&e[fi]===gk}}class So extends j6{constructor(n,r,i,s){super(n,"event",r,i);ae(this,"anonymous");Object.defineProperty(this,fi,{value:yk}),We(this,{anonymous:s})}get topicHash(){return Jf(this.format("sighash"))}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("event"),r.push(this.name+oy(n,this.inputs)),n!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(n,r){return r=(r||[]).map(s=>mr.from(s)),new So(sn,n,r,!1).topicHash}static from(n){if(So.isFragment(n))return n;if(typeof n=="string")try{return So.from(eu(n))}catch{ne(!1,"invalid event fragment","obj",n)}else if(n instanceof qs){const r=M6("event",n),i=tc(n,!0),s=!!dc(n,qr(["anonymous"])).has("anonymous");return Xf(n),new So(sn,r,i,s)}return new So(sn,n.name,n.inputs?n.inputs.map(r=>mr.from(r,!0)):[],!!n.anonymous)}static isFragment(n){return n&&n[fi]===yk}}class Ka extends Zf{constructor(n,r,i,s,a){super(n,r,i);ae(this,"payable");ae(this,"gas");Object.defineProperty(this,fi,{value:bk}),We(this,{payable:s,gas:a})}format(n){if(Ee(n!=null&&n!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),n==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[`constructor${oy(n,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(n){if(Ka.isFragment(n))return n;if(typeof n=="string")try{return Ka.from(eu(n))}catch{ne(!1,"invalid constuctor fragment","obj",n)}else if(n instanceof qs){dc(n,qr(["constructor"]));const r=tc(n),i=!!dc(n,Jpe).has("payable"),s=mF(n);return Xf(n),new Ka(sn,"constructor",r,i,s)}return new Ka(sn,"constructor",n.inputs?n.inputs.map(mr.from):[],!!n.payable,n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[fi]===bk}}class ka extends Zf{constructor(n,r,i){super(n,"fallback",r);ae(this,"payable");Object.defineProperty(this,fi,{value:wk}),We(this,{payable:i})}format(n){const r=this.inputs.length===0?"receive":"fallback";if(n==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(n){if(ka.isFragment(n))return n;if(typeof n=="string")try{return ka.from(eu(n))}catch{ne(!1,"invalid fallback fragment","obj",n)}else if(n instanceof qs){const r=n.toString(),i=n.peekKeyword(qr(["fallback","receive"]));if(ne(i,"type must be fallback or receive","obj",r),n.popKeyword(qr(["fallback","receive"]))==="receive"){const u=tc(n);return ne(u.length===0,"receive cannot have arguments","obj.inputs",u),dc(n,qr(["payable"])),Xf(n),new ka(sn,[],!0)}let a=tc(n);
4183a.length?ne(a.length===1&&a[0].type==="bytes","invalid fallback inputs","obj.inputs",a.map(u=>u.format("minimal")).join(", ")):a=[mr.from("bytes")];const l=pF(n);if(ne(l==="nonpayable"||l==="payable","fallback cannot be constants","obj.stateMutability",l),dc(n,qr(["returns"])).has("returns")){const u=tc(n);ne(u.length===1&&u[0].type==="bytes","invalid fallback outputs","obj.outputs",u.map(d=>d.format("minimal")).join(", "))}return Xf(n),new ka(sn,a,l==="payable")}if(n.type==="receive")return new ka(sn,[],!0);if(n.type==="fallback"){const r=[mr.from("bytes")],i=n.stateMutability==="payable";return new ka(sn,r,i)}ne(!1,"invalid fallback description","obj",n)}static isFragment(n){return n&&n[fi]===wk}}class Io extends j6{constructor(n,r,i,s,a,l){super(n,"function",r,s);ae(this,"constant");ae(this,"outputs");ae(this,"stateMutability");ae(this,"payable");ae(this,"gas");Object.defineProperty(this,fi,{value:vk}),a=Object.freeze(a.slice()),We(this,{constant:i==="view"||i==="pure",gas:l,outputs:a,payable:i==="payable",stateMutability:i})}get selector(){return Jf(this.format("sighash")).substring(0,10)}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n))),outputs:this.outputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("function"),r.push(this.name+oy(n,this.inputs)),n!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(oy(n,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(n,r){return r=(r||[]).map(s=>mr.from(s)),new Io(sn,n,"view",r,[],null).selector}static from(n){if(Io.isFragment(n))return n;if(typeof n=="string")try{return Io.from(eu(n))}catch{ne(!1,"invalid function fragment","obj",n)}else if(n instanceof qs){const i=M6("function",n),s=tc(n),a=pF(n);let l=[];dc(n,qr(["returns"])).has("returns")&&(l=tc(n));const u=mF(n);return Xf(n),new Io(sn,i,a,s,l,u)}let r=n.stateMutability;return r==null&&(r="payable",typeof n.constant=="boolean"?(r="view",n.constant||(r="payable",typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable"))):typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable")),new Io(sn,n.name,r,n.inputs?n.inputs.map(mr.from):[],n.outputs?n.outputs.map(mr.from):[],n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[fi]===vk}}class Mf extends j6{constructor(e,n,r){super(e,"struct",n,r),Object.defineProperty(this,fi,{value:Ak})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Mf.from(eu(e))}catch{ne(!1,"invalid struct fragment","obj",e)}else if(e instanceof qs){const n=M6("struct",e),r=tc(e);return Xf(e),new Mf(sn,n,r)}return new Mf(sn,e.name,e.inputs?e.inputs.map(mr.from):[])}static isFragment(e){return e&&e[fi]===Ak}}const Gs=new Map;Gs.set(0,"GENERIC_PANIC");Gs.set(1,"ASSERT_FALSE");Gs.set(17,"OVERFLOW");Gs.set(18,"DIVIDE_BY_ZERO");Gs.set(33,"ENUM_RANGE_ERROR");Gs.set(34,"BAD_STORAGE_DATA");Gs.set(49,"STACK_UNDERFLOW");Gs.set(50,"ARRAY_RANGE_ERROR");Gs.set(65,"OUT_OF_MEMORY");Gs.set(81,"UNINITIALIZED_FUNCTION_CALL");const c0e=new RegExp(/^bytes([0-9]*)$/),l0e=new RegExp(/^(u?int)([0-9]*)$/);let l5=null,Ek=1024;function u0e(t,e,n,r){let i="missing revert data",s=null;const a=null;let l=null;if(n){i="execution reverted";const d=ut(n);if(n=ke(n),d.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(d.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(ke(d.slice(0,4))==="0x08c379a0")try{s=r.decode(["string"],d.slice(4))[0],l={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(ke(d.slice(0,4))==="0x4e487b71")try{const h=Number(r.decode(["uint256"],d.slice(4))[0]);l={signature:"Panic(uint256)",name:"Panic",args:[h]},s=`Panic due to ${Gs.get(h)||"UNKNOWN"}(${h})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const u={to:e.to?Bt(e.to):null,data:e.data||"0x"};return e.from&&(u.from=Bt(e.from)),tn(i,"CALL_EXCEPTION",{action:t,data:n,reason:s,transaction:u,invocation:a,revert:l})}var gl,mh;const yv=class yv{constructor(){ee(this,gl)}getDefaultValue(e){const n=e.map(i=>he(this,gl,mh).call(this,mr.from(i)));return new $b(n,"_").defaultValue()}encode(e,n){HL(n.length,e.length,"types/values length mismatch");const r=e.map(a=>he(this,gl,mh).call(this,mr.from(a))),i=new $b(r,"_"),s=new sC;return i.encode(s,n),s.data}decode(e,n,r){const i=e.map(a=>he(this,gl,mh).call(this,mr.from(a)));return new $b(i,"_").decode(new oC(n,r,Ek))}static _setDefaultMaxInflation(e){ne(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Ek=e}static defaultAbiCoder(){return l5==null&&(l5=new yv),l5}static getBuiltinCallException(e,n,r){return u0e(e,n,r,yv.defaultAbiCoder())}};gl=new WeakSet,mh=function(e){if(e.isArray())return new Ihe(he(this,gl,mh).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new $b(e.components.map(r=>he(this,gl,mh).call(this,r)),e.name);switch(e.baseType){case"address":return new The(e.name);case"bool":return new Rhe(e.name);
4183case"string":return new Lhe(e.name);case"bytes":return new khe(e.name);case"":return new Bhe(e.name)}let n=e.type.match(l0e);if(n){let r=parseInt(n[2]||"256");return ne(r!==0&&r<=256&&r%8===0,"invalid "+n[1]+" bit length","param",e),new jhe(r/8,n[1]==="int",e.name)}if(n=e.type.match(c0e),n){let r=parseInt(n[1]);return ne(r!==0&&r<=32,"invalid bytes length","param",e),new Nhe(r,e.name)}ne(!1,"invalid type","type",e.type)};let ay=yv;class f0e{constructor(e,n,r){ae(this,"fragment");ae(this,"name");ae(this,"signature");ae(this,"topic");ae(this,"args");const i=e.name,s=e.format();We(this,{fragment:e,name:i,signature:s,topic:n,args:r})}}class d0e{constructor(e,n,r,i){ae(this,"fragment");ae(this,"name");ae(this,"args");ae(this,"signature");ae(this,"selector");ae(this,"value");const s=e.name,a=e.format();We(this,{fragment:e,name:s,args:r,signature:a,selector:n,value:i})}}class h0e{constructor(e,n,r){ae(this,"fragment");ae(this,"name");ae(this,"args");ae(this,"signature");ae(this,"selector");const i=e.name,s=e.format();We(this,{fragment:e,name:i,args:r,signature:s,selector:n})}}class xk{constructor(e){ae(this,"hash");ae(this,"_isIndexed");We(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const Ck={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},_k={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&Ck[t.toString()]&&(e=Ck[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Ao,Eo,xo,Ar,Uo,hw,pw;const qu=class qu{constructor(e){ee(this,Uo);ae(this,"fragments");ae(this,"deploy");ae(this,"fallback");ae(this,"receive");ee(this,Ao);ee(this,Eo);ee(this,xo);ee(this,Ar);let n=[];typeof e=="string"?n=JSON.parse(e):n=e,z(this,xo,new Map),z(this,Ao,new Map),z(this,Eo,new Map);const r=[];for(const a of n)try{r.push(Zf.from(a))}catch(l){console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`,l.message)}We(this,{fragments:Object.freeze(r)});let i=null,s=!1;z(this,Ar,this.getAbiCoder()),this.fragments.forEach((a,l)=>{let u;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}We(this,{deploy:a});return;case"fallback":a.inputs.length===0?s=!0:(ne(!i||a.payable!==i.payable,"conflicting fallback fragments",`fragments[${l}]`,a),i=a,s=i.payable);return;case"function":u=C(this,xo);break;case"event":u=C(this,Eo);break;case"error":u=C(this,Ao);break;default:return}const d=a.format();u.has(d)||u.set(d,a)}),this.deploy||We(this,{deploy:Ka.from("constructor()")}),We(this,{fallback:i,receive:s})}format(e){const n=e?"minimal":"full";return this.fragments.map(i=>i.format(n))}formatJson(){const e=this.fragments.map(n=>n.format("json"));return JSON.stringify(e.map(n=>JSON.parse(n)))}getAbiCoder(){return ay.defaultAbiCoder()}getFunctionName(e){const n=he(this,Uo,hw).call(this,e,null,!1);return ne(n,"no matching function","key",e),n.name}hasFunction(e){return!!he(this,Uo,hw).call(this,e,null,!1)}getFunction(e,n){return he(this,Uo,hw).call(this,e,n||null,!0)}forEachFunction(e){const n=Array.from(C(this,xo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;r<n.length;r++){const i=n[r];e(C(this,xo).get(i),r)}}getEventName(e){const n=he(this,Uo,pw).call(this,e,null,!1);return ne(n,"no matching event","key",e),n.name}hasEvent(e){return!!he(this,Uo,pw).call(this,e,null,!1)}getEvent(e,n){return he(this,Uo,pw).call(this,e,n||null,!0)}forEachEvent(e){const n=Array.from(C(this,Eo).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;r<n.length;r++){const i=n[r];e(C(this,Eo).get(i),r)}}getError(e,n){if(Yt(e)){const i=e.toLowerCase();if(_k[i])return oi.from(_k[i].signature);for(const s of C(this,Ao).values())if(i===s.selector)return s;return null}if(e.indexOf("(")===-1){const i=[];for(const[s,a]of C(this,Ao))s.split("(")[0]===e&&i.push(a);if(i.length===0)return e==="Error"?oi.from("error Error(string)"):e==="Panic"?oi.from("error Panic(uint256)"):null;if(i.length>1){const s=i.map(a=>JSON.stringify(a.format())).join(", ");ne(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=oi.from(e).format(),e==="Error(string)")return oi.from("error Error(string)");if(e==="Panic(uint256)")return oi.from("error Panic(uint256)");const r=C(this,Ao).get(e);return r||null}forEachError(e){const n=Array.from(C(this,Ao).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;r<n.length;r++){const i=n[r];e(C(this,Ao).get(i),r)}}_decodeParams(e,n){return C(this,Ar).decode(e,n)}_encodeParams(e,n){return C(this,Ar).encode(e,n)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,n){if(typeof e=="string"){const r=this.getError(e);ne(r,"unknown error","fragment",e),e=r}return ne(un(n,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",n),this._decodeParams(e.inputs,un(n,4))}encodeErrorResult(e,n){if(typeof e=="string"){const r=this.getError(e);ne(r,"unknown error","fragment",e),e=r}return dn([e.selector,this._encodeParams(e.inputs,n||[])])}decodeFunctionData(e,n){if(typeof e=="string"){const r=this.getFunction(e);ne(r,"unknown function","fragment",e),e=r}return ne(un(n,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",n),this._decodeParams(e.inputs,un(n,4))}encodeFunctionData(e,n){if(typeof e=="string"){const r=this.getFunction(e);ne(r,"unknown function","fragment",e),e=r}return dn([e.selector,this._encodeParams(e.inputs,n||[])])}decodeFunctionResult(e,n){if(typeof e=="string"){const s=this.getFunction(e);ne(s,"unknown function","fragment",e),e=s}let r="invalid length for result data";const i=Vr(n);if(i.length%32===0)try{return C(this,Ar).decode(e.outputs,i)}catch{r="could not decode result data"}Ee(!1,r,"BAD_DATA",{value:ke(i),info:{method:e.name,signature:e.format()}})}makeError(e,n){const r=ut(e,"data"),i=ay.getBuiltinCallException("call",n,r);if(i.message.startsWith("execution reverted (unknown custom error)")){const l=ke(r.slice(0,4)),u=this.getError(l);
4183if(u)try{const d=C(this,Ar).decode(u.inputs,r.slice(4));i.revert={name:u.name,signature:u.format(),args:d},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const a=this.parseTransaction(n);return a&&(i.invocation={method:a.name,signature:a.signature,args:a.args}),i}encodeFunctionResult(e,n){if(typeof e=="string"){const r=this.getFunction(e);ne(r,"unknown function","fragment",e),e=r}return ke(C(this,Ar).encode(e.outputs,n||[]))}encodeFilterTopics(e,n){if(typeof e=="string"){const s=this.getEvent(e);ne(s,"unknown event","eventFragment",e),e=s}Ee(n.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:n.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const i=(s,a)=>s.type==="string"?Jf(a):s.type==="bytes"?Cn(ke(a)):(s.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":s.type.match(/^u?int/)?a=Kl(a):s.type.match(/^bytes/)?a=Ife(a,32):s.type==="address"&&C(this,Ar).encode(["address"],[a]),uc(ke(a),32));for(n.forEach((s,a)=>{const l=e.inputs[a];if(!l.indexed){ne(s==null,"cannot filter non-indexed parameters; must be null","contract."+l.name,s);return}s==null?r.push(null):l.baseType==="array"||l.baseType==="tuple"?ne(!1,"filtering with tuples or arrays not supported","contract."+l.name,s):Array.isArray(s)?r.push(s.map(u=>i(l,u))):r.push(i(l,s))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(e,n){if(typeof e=="string"){const a=this.getEvent(e);ne(a,"unknown event","eventFragment",e),e=a}const r=[],i=[],s=[];return e.anonymous||r.push(e.topicHash),ne(n.length===e.inputs.length,"event arguments/values mismatch","values",n),e.inputs.forEach((a,l)=>{const u=n[l];if(a.indexed)if(a.type==="string")r.push(Jf(u));else if(a.type==="bytes")r.push(Cn(u));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");r.push(C(this,Ar).encode([a.type],[u]))}else i.push(a),s.push(u)}),{data:C(this,Ar).encode(i,s),topics:r}}decodeEventLog(e,n,r){if(typeof e=="string"){const w=this.getEvent(e);ne(w,"unknown event","eventFragment",e),e=w}if(r!=null&&!e.anonymous){const w=e.topicHash;ne(Yt(r[0],32)&&r[0].toLowerCase()===w,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],s=[],a=[];e.inputs.forEach((w,A)=>{w.indexed?w.type==="string"||w.type==="bytes"||w.baseType==="tuple"||w.baseType==="array"?(i.push(mr.from({type:"bytes32",name:w.name})),a.push(!0)):(i.push(w),a.push(!1)):(s.push(w),a.push(!1))});const l=r!=null?C(this,Ar).decode(i,dn(r)):null,u=C(this,Ar).decode(s,n,!0),d=[],h=[];let m=0,g=0;return e.inputs.forEach((w,A)=>{let v=null;if(w.indexed)if(l==null)v=new xk(null);else if(a[A])v=new xk(l[g++]);else try{v=l[g++]}catch(x){v=x}else try{v=u[m++]}catch(x){v=x}d.push(v),h.push(w.name||null)}),t0.fromItems(d,h)}parseTransaction(e){const n=ut(e.data,"tx.data"),r=Pe(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(ke(n.slice(0,4)));if(!i)return null;const s=C(this,Ar).decode(i.inputs,n.slice(4));return new d0e(i,i.selector,s,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const n=this.getEvent(e.topics[0]);return!n||n.anonymous?null:new f0e(n,n.topicHash,this.decodeEventLog(n,e.data,e.topics))}parseError(e){const n=ke(e),r=this.getError(un(n,0,4));if(!r)return null;const i=C(this,Ar).decode(r.inputs,un(n,4));return new h0e(r,r.selector,i)}static from(e){return e instanceof qu?e:typeof e=="string"?new qu(JSON.parse(e)):typeof e.formatJson=="function"?new qu(e.formatJson()):typeof e.format=="function"?new qu(e.format("json")):new qu(e)}};Ao=new WeakMap,Eo=new WeakMap,xo=new WeakMap,Ar=new WeakMap,Uo=new WeakSet,hw=function(e,n,r){if(Yt(e)){const s=e.toLowerCase();for(const a of C(this,xo).values())if(s===a.selector)return a;return null}if(e.indexOf("(")===-1){const s=[];
4183for(const[a,l]of C(this,xo))a.split("(")[0]===e&&s.push(l);if(n){const a=n.length>0?n[n.length-1]:null;let l=n.length,u=!0;Sr.isTyped(a)&&a.type==="overrides"&&(u=!1,l--);for(let d=s.length-1;d>=0;d--){const h=s[d].inputs.length;h!==l&&(!u||h!==l-1)&&s.splice(d,1)}for(let d=s.length-1;d>=0;d--){const h=s[d].inputs;for(let m=0;m<n.length;m++)if(Sr.isTyped(n[m])){if(m>=h.length){if(n[m].type==="overrides")continue;s.splice(d,1);break}if(n[m].type!==h[m].baseType){s.splice(d,1);break}}}}if(s.length===1&&n&&n.length!==s[0].inputs.length){const a=n[n.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&r){const a=s.map(l=>JSON.stringify(l.format())).join(", ");ne(!1,`ambiguous function description (i.e. matches ${a})`,"key",e)}return s[0]}const i=C(this,xo).get(Io.from(e).format());return i||null},pw=function(e,n,r){if(Yt(e)){const s=e.toLowerCase();for(const a of C(this,Eo).values())if(s===a.topicHash)return a;return null}if(e.indexOf("(")===-1){const s=[];
4183for(const[a,l]of C(this,Eo))a.split("(")[0]===e&&s.push(l);if(n){for(let a=s.length-1;a>=0;a--)s[a].inputs.length<n.length&&s.splice(a,1);for(let a=s.length-1;a>=0;a--){const l=s[a].inputs;for(let u=0;u<n.length;u++)if(Sr.isTyped(n[u])&&n[u].type!==l[u].baseType){s.splice(a,1);break}}}if(s.length===0)return null;if(s.length>1&&r){const a=s.map(l=>JSON.stringify(l.format())).join(", ");ne(!1,`ambiguous event description (i.e. matches ${a})`,"key",e)}return s[0]}const i=C(this,Eo).get(So.from(e).format());return i||null};let vC=qu;const gF=BigInt(0);function jh(t){return t??null}function yn(t){return t==null?null:t.toString()}class Tk{constructor(e,n,r){ae(this,"gasPrice");ae(this,"maxFeePerGas");ae(this,"maxPriorityFeePerGas");We(this,{gasPrice:jh(e),maxFeePerGas:jh(n),maxPriorityFeePerGas:jh(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:n,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:yn(e),maxFeePerGas:yn(n),maxPriorityFeePerGas:yn(r)}}}function fv(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=ke(t.data));const n="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=Pe(t[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=ot(t[i],`request.${i}`));return t.accessList&&(e.accessList=cd(t.accessList)),t.authorizationList&&(e.authorizationList=t.authorizationList.slice()),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(i=>V_(i)?ke(i):Object.assign({},i))),e}var Fa;class p0e{constructor(e,n){ae(this,"provider");ae(this,"number");ae(this,"hash");ae(this,"timestamp");ae(this,"parentHash");ae(this,"parentBeaconBlockRoot");ae(this,"nonce");ae(this,"difficulty");ae(this,"gasLimit");ae(this,"gasUsed");ae(this,"stateRoot");ae(this,"receiptsRoot");ae(this,"blobGasUsed");ae(this,"excessBlobGas");ae(this,"miner");ae(this,"prevRandao");ae(this,"extraData");ae(this,"baseFeePerGas");ee(this,Fa);z(this,Fa,e.transactions.map(r=>typeof r!="string"?new cy(r,n):r)),We(this,{provider:n,hash:jh(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:jh(e.prevRandao),extraData:e.extraData,baseFeePerGas:jh(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return C(this,Fa).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=C(this,Fa).slice();return e.length===0?[]:(Ee(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:n,extraData:r,gasLimit:i,gasUsed:s,hash:a,miner:l,prevRandao:u,nonce:d,number:h,parentHash:m,parentBeaconBlockRoot:g,stateRoot:w,receiptsRoot:A,timestamp:v,transactions:x}=this;return{_type:"Block",baseFeePerGas:yn(e),difficulty:yn(n),extraData:r,gasLimit:yn(i),gasUsed:yn(s),blobGasUsed:yn(this.blobGasUsed),excessBlobGas:yn(this.excessBlobGas),hash:a,miner:l,prevRandao:u,nonce:d,number:h,parentHash:m,timestamp:v,parentBeaconBlockRoot:g,stateRoot:w,receiptsRoot:A,transactions:x}}[Symbol.iterator](){let e=0;const n=this.transactions;return{next:()=>e<this.length?{value:n[e++],done:!1}:{value:void 0,done:!0}}}get length(){return C(this,Fa).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let n;if(typeof e=="number")n=C(this,Fa)[e];else{const r=e.toLowerCase();for(const i of C(this,Fa))if(typeof i=="string"){if(i!==r)continue;n=i;break}else{if(i.hash!==r)continue;n=i;break}}if(n==null)throw new Error("no such tx");return typeof n=="string"?await this.provider.getTransaction(n):n}getPrefetchedTransaction(e){const n=this.prefetchedTransactions;if(typeof e=="number")return n[e];e=e.toLowerCase();for(const r of n)if(r.hash===e)return r;ne(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return m0e(this)}}Fa=new WeakMap;class Jy{constructor(e,n){ae(this,"provider");ae(this,"transactionHash");ae(this,"blockHash");ae(this,"blockNumber");ae(this,"removed");ae(this,"address");ae(this,"data");ae(this,"topics");ae(this,"index");ae(this,"transactionIndex");this.provider=n;const r=Object.freeze(e.topics.slice());We(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:r,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:n,blockNumber:r,data:i,index:s,removed:a,topics:l,transactionHash:u,transactionIndex:d}=this;return{_type:"log",address:e,blockHash:n,blockNumber:r,data:i,index:s,removed:a,topics:l,transactionHash:u,transactionIndex:d}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return Ee(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return Ee(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return Ee(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return g0e(this)}}var vy;class yF{constructor(e,n){ae(this,"provider");ae(this,"to");ae(this,"from");ae(this,"contractAddress");ae(this,"hash");ae(this,"index");ae(this,"blockHash");ae(this,"blockNumber");ae(this,"logsBloom");ae(this,"gasUsed");ae(this,"blobGasUsed");ae(this,"cumulativeGasUsed");ae(this,"gasPrice");ae(this,"blobGasPrice");ae(this,"type");ae(this,"status");ae(this,"root");ee(this,vy);z(this,vy,Object.freeze(e.logs.map(i=>new Jy(i,n))));let r=gF;e.effectiveGasPrice!=null?r=e.effectiveGasPrice:e.gasPrice!=null&&(r=e.gasPrice),We(this,{provider:n,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return C(this,vy)}toJSON(){const{to:e,from:n,contractAddress:r,hash:i,index:s,blockHash:a,blockNumber:l,logsBloom:u,logs:d,status:h,root:m}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:l,contractAddress:r,cumulativeGasUsed:yn(this.cumulativeGasUsed),from:n,gasPrice:yn(this.gasPrice),blobGasUsed:yn(this.blobGasUsed),blobGasPrice:yn(this.blobGasPrice),gasUsed:yn(this.gasUsed),hash:i,index:s,logs:d,logsBloom:u,root:m,status:h,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return wF(this)}reorderedEvent(e){return Ee(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),bF(this,e)}}vy=new WeakMap;var yl;const aT=class aT{constructor(e,n){ae(this,"provider");ae(this,"blockNumber");ae(this,"blockHash");ae(this,"index");ae(this,"hash");ae(this,"type");ae(this,"to");ae(this,"from");ae(this,"nonce");
4183ae(this,"gasLimit");ae(this,"gasPrice");ae(this,"maxPriorityFeePerGas");ae(this,"maxFeePerGas");ae(this,"maxFeePerBlobGas");ae(this,"data");ae(this,"value");ae(this,"chainId");ae(this,"signature");ae(this,"accessList");ae(this,"blobVersionedHashes");ae(this,"authorizationList");ee(this,yl);this.provider=n,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.maxFeePerBlobGas=e.maxFeePerBlobGas!=null?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,this.blobVersionedHashes=e.blobVersionedHashes!=null?e.blobVersionedHashes:null,this.authorizationList=e.authorizationList!=null?e.authorizationList:null,z(this,yl,-1)}toJSON(){const{blockNumber:e,blockHash:n,index:r,hash:i,type:s,to:a,from:l,nonce:u,data:d,signature:h,accessList:m,blobVersionedHashes:g}=this;return{_type:"TransactionResponse",accessList:m,blockNumber:e,blockHash:n,blobVersionedHashes:g,chainId:yn(this.chainId),data:d,from:l,gasLimit:yn(this.gasLimit),gasPrice:yn(this.gasPrice),hash:i,maxFeePerGas:yn(this.maxFeePerGas),maxPriorityFeePerGas:yn(this.maxPriorityFeePerGas),maxFeePerBlobGas:yn(this.maxFeePerBlobGas),nonce:u,signature:h,to:a,index:r,type:s,value:yn(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const r=await this.getTransaction();r&&(e=r.blockNumber)}if(e==null)return null;const n=this.provider.getBlock(e);if(n==null)throw new Error("TODO");return n}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:n,blockNumber:r}=await Lr({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return n==null||n.blockNumber==null?0:r-n.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,n){const r=e??1,i=n??0;let s=C(this,yl),a=-1,l=s===-1;const u=async()=>{if(l)return null;const{blockNumber:g,nonce:w}=await Lr({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(w<this.nonce){s=g;return}if(l)return null;const A=await this.getTransaction();if(!(A&&A.blockNumber!=null))for(a===-1&&(a=s-3,a<C(this,yl)&&(a=C(this,yl)));a<=g;){if(l)return null;const v=await this.provider.getBlock(a,!0);if(v==null)return;for(const x of v)if(x===this.hash)return;for(let x=0;x<v.length;x++){const T=await v.getTransaction(x);if(T.from===this.from&&T.nonce===this.nonce){if(l)return null;const O=await this.provider.getTransactionReceipt(T.hash);if(O==null||g-O.blockNumber+1<r)return;let k="replaced";T.data===this.data&&T.to===this.to&&T.value===this.value?k="repriced":T.data==="0x"&&T.from===T.to&&T.value===gF&&(k="cancelled"),Ee(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:k==="replaced"||k==="cancelled",reason:k,replacement:T.replaceableTransaction(s),hash:T.hash,receipt:O})}}a++}},d=g=>{if(g==null||g.status!==0)return g;Ee(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:g.to,from:g.from,data:""},receipt:g})},h=await this.provider.getTransactionReceipt(this.hash);if(r===0)return d(h);if(h){if(r===1||await h.confirmations()>=r)return d(h)}else if(await u(),r===0)return null;return await new Promise((g,w)=>{const A=[],v=()=>{A.forEach(T=>T())};if(A.push(()=>{l=!0}),i>0){const T=setTimeout(()=>{v(),w(tn("wait for transaction timeout","TIMEOUT"))},i);A.push(()=>{clearTimeout(T)})}const x=async T=>{if(await T.confirmations()>=r){v();try{g(d(T))}catch(O){w(O)}}};if(A.push(()=>{this.provider.off(this.hash,x)}),this.provider.on(this.hash,x),s>=0){const T=async()=>{try{await u()}catch(O){if(dr(O,"TRANSACTION_REPLACED")){v(),w(O);return}}l||this.provider.once("block",T)};A.push(()=>{this.provider.off("block",T)}),this.provider.once("block",T)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return Ee(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),wF(this)}reorderedEvent(e){return Ee(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ee(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),bF(this,e)}replaceableTransaction(e){ne(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const n=new aT(this,this.provider);return z(n,yl,e),n}};yl=new WeakMap;let cy=aT;function m0e(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function bF(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function wF(t){return{orphan:"drop-transaction",tx:t}}function g0e(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class eT extends Jy{constructor(n,r,i){super(n,n.provider);ae(this,"interface");ae(this,"fragment");ae(this,"args");const s=r.decodeEventLog(i,n.data,n.topics);We(this,{args:s,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class vF extends Jy{constructor(n,r){super(n,n.provider);ae(this,"error");We(this,{error:r})}}var Ap;class y0e extends yF{constructor(n,r,i){super(i,r);ee(this,Ap);z(this,Ap,n)}get logs(){return super.logs.map(n=>{const r=n.topics.length?C(this,Ap).getEvent(n.topics[0]):null;if(r)try{return new eT(n,C(this,Ap),r)}catch(i){return new vF(n,i)}return n})}}Ap=new WeakMap;var Ay;class tT extends cy{constructor(n,r,i){super(i,r);ee(this,Ay);z(this,Ay,n)}async wait(n,r){const i=await super.wait(n,r);return i==null?null:new y0e(C(this,Ay),this.provider,i)}}Ay=new WeakMap;class AF extends QL{constructor(n,r,i,s){super(n,r,i);ae(this,"log");We(this,{log:s})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class b0e extends AF{constructor(e,n,r,i,s){super(e,n,r,new eT(s,e.interface,i));const a=e.interface.decodeEventLog(i,this.log.data,this.log.topics);We(this,{args:a,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const Sk=BigInt(0);function EF(t){return t&&typeof t.call=="function"}function xF(t){return t&&typeof t.estimateGas=="function"}function L6(t){return t&&typeof t.resolveName=="function"}function CF(t){return t&&typeof t.sendTransaction=="function"}function _F(t){if(t!=null){if(L6(t))return t;if(t.provider)return t.provider}}var Ey;class w0e{constructor(e,n,r){ee(this,Ey);ae(this,"fragment");
4183if(We(this,{fragment:n}),n.inputs.length<r.length)throw new Error("too many arguments");const i=ed(e.runner,"resolveName"),s=L6(i)?i:null;z(this,Ey,(async function(){const a=await Promise.all(n.inputs.map((l,u)=>r[u]==null?null:l.walkAsync(r[u],(h,m)=>h==="address"?Array.isArray(m)?Promise.all(m.map(g=>Hr(g,s))):Hr(m,s):m)));return e.interface.encodeFilterTopics(n,a)})())}getTopicFilter(){return C(this,Ey)}}Ey=new WeakMap;function ed(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function tf(t){return t==null?null:t.provider||null}async function TF(t,e){const n=Sr.dereference(t,"overrides");ne(typeof n=="object","invalid overrides parameter","overrides",t);const r=fv(n);return ne(r.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),ne(r.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function v0e(t,e,n){const r=ed(t,"resolveName"),i=L6(r)?r:null;return await Promise.all(e.map((s,a)=>s.walkAsync(n[a],(l,u)=>(u=Sr.dereference(u,l),l==="address"?Hr(u,i):u))))}function A0e(t){const e=async function(a){const l=await TF(a,["data"]);l.to=await t.getAddress(),l.from&&(l.from=await Hr(l.from,_F(t.runner)));const u=t.interface,d=Pe(l.value||Sk,"overrides.value")===Sk,h=(l.data||"0x")==="0x";u.fallback&&!u.fallback.payable&&u.receive&&!h&&!d&&ne(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),ne(u.fallback||h,"cannot send data to receive-only contract","overrides.data",l.data);const m=u.receive||u.fallback&&u.fallback.payable;return ne(m||d,"cannot send value to non-payable fallback","overrides.value",l.value),ne(u.fallback||h,"cannot send data to receive-only contract","overrides.data",l.data),l},n=async function(a){const l=ed(t.runner,"call");Ee(EF(l),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const u=await e(a);try{return await l.call(u)}catch(d){throw F_(d)&&d.data?t.interface.makeError(d.data,u):d}},r=async function(a){const l=t.runner;Ee(CF(l),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const u=await l.sendTransaction(await e(a)),d=tf(t.runner);return new tT(t.interface,d,u)},i=async function(a){const l=ed(t.runner,"estimateGas");return Ee(xF(l),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await l.estimateGas(await e(a))},s=async a=>await r(a);return We(s,{_contract:t,estimateGas:i,populateTransaction:e,send:r,staticCall:n}),s}function E0e(t,e){const n=function(...d){const h=t.interface.getFunction(e,d);return Ee(h,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:d}}),h},r=async function(...d){const h=n(...d);let m={};if(h.inputs.length+1===d.length&&(m=await TF(d.pop()),m.from&&(m.from=await Hr(m.from,_F(t.runner)))),h.inputs.length!==d.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const g=await v0e(t.runner,h.inputs,d);return Object.assign({},m,await Lr({to:t.getAddress(),data:t.interface.encodeFunctionData(h,g)}))},i=async function(...d){const h=await l(...d);return h.length===1?h[0]:h},s=async function(...d){const h=t.runner;Ee(CF(h),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const m=await h.sendTransaction(await r(...d)),g=tf(t.runner);return new tT(t.interface,g,m)},a=async function(...d){const h=ed(t.runner,"estimateGas");return Ee(xF(h),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await h.estimateGas(await r(...d))},l=async function(...d){const h=ed(t.runner,"call");Ee(EF(h),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const m=await r(...d);let g="0x";try{g=await h.call(m)}catch(A){throw F_(A)&&A.data?t.interface.makeError(A.data,m):A}const w=n(...d);return t.interface.decodeFunctionResult(w,g)},u=async(...d)=>n(...d).constant?await i(...d):await s(...d);return We(u,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:a,populateTransaction:r,send:s,staticCall:i,staticCallResult:l}),Object.defineProperty(u,"fragment",{configurable:!1,enumerable:!0,get:()=>{const d=t.interface.getFunction(e);return Ee(d,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),d}}),u}function x0e(t,e){const n=function(...i){const s=t.interface.getEvent(e,i);return Ee(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},r=function(...i){return new w0e(t,n(...i),i)};return We(r,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return Ee(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),r}const dv=Symbol.for("_ethersInternal_contract"),SF=new WeakMap;function C0e(t,e){SF.set(t[dv],e)}function Ci(t){return SF.get(t[dv])}function _0e(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function nT(t,e){let n,r=null;
4183if(Array.isArray(e)){const s=function(a){if(Yt(a,32))return a;const l=t.interface.getEvent(a);return ne(l,"unknown fragment","name",a),l.topicHash};n=e.map(a=>a==null?null:Array.isArray(a)?a.map(s):s(a))}else e==="*"?n=[null]:typeof e=="string"?Yt(e,32)?n=[e]:(r=t.interface.getEvent(e),ne(r,"unknown fragment","event",e),n=[r.topicHash]):_0e(e)?n=await e.getTopicFilter():"fragment"in e?(r=e.fragment,n=[r.topicHash]):ne(!1,"unknown event name","event",e);n=n.map(s=>{if(s==null)return null;if(Array.isArray(s)){const a=Array.from(new Set(s.map(l=>l.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return s.toLowerCase()});const i=n.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:r,tag:i,topics:n}}async function eg(t,e){const{subs:n}=Ci(t);return n.get((await nT(t,e)).tag)||null}async function Ik(t,e,n){const r=tf(t.runner);Ee(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:a}=await nT(t,n),{addr:l,subs:u}=Ci(t);let d=u.get(s);if(!d){const m={address:l||t,topics:a},g=x=>{let T=i;if(T==null)try{T=t.interface.getEvent(x.topics[0])}catch{}if(T){const O=T,k=i?t.interface.decodeEventLog(i,x.data,x.topics):[];EC(t,n,k,P=>new b0e(t,P,n,O,x))}else EC(t,n,[],O=>new AF(t,O,n,x))};let w=[];d={tag:s,listeners:[],start:()=>{w.length||w.push(r.on(m,g))},stop:async()=>{if(w.length==0)return;let x=w;w=[],await Promise.all(x),r.off(m,g)}},u.set(s,d)}return d}let AC=Promise.resolve();async function T0e(t,e,n,r){await AC;const i=await eg(t,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:a,once:l})=>{const u=Array.from(n);r&&u.push(r(l?null:a));try{a.call(t,...u)}catch{}return!l}),i.listeners.length===0&&(i.stop(),Ci(t).subs.delete(i.tag)),s>0}async function EC(t,e,n,r){try{await AC}catch{}const i=T0e(t,e,n,r);return AC=i,await i}const Qb=["then"];var Yk;Yk=dv;const dg=class dg{constructor(e,n,r,i){ae(this,"target");ae(this,"interface");ae(this,"runner");ae(this,"filters");ae(this,Yk);ae(this,"fallback");ne(typeof e=="string"||OU(e),"invalid value for Contract target","target",e),r==null&&(r=null);const s=vC.from(n);We(this,{target:e,runner:r,interface:s}),Object.defineProperty(this,dv,{value:{}});let a,l=null,u=null;if(i){const m=tf(r);u=new tT(this.interface,m,i)}let d=new Map;if(typeof e=="string")if(Yt(e))l=e,a=Promise.resolve(e);else{const m=ed(r,"resolveName");if(!L6(m))throw tn("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=m.resolveName(e).then(g=>{if(g==null)throw tn("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ci(this).addr=g,g})}else a=e.getAddress().then(m=>{if(m==null)throw new Error("TODO");return Ci(this).addr=m,m});C0e(this,{addrPromise:a,addr:l,deployTx:u,subs:d});const h=new Proxy({},{get:(m,g,w)=>{if(typeof g=="symbol"||Qb.indexOf(g)>=0)return Reflect.get(m,g,w);try{return this.getEvent(g)}catch(A){if(!dr(A,"INVALID_ARGUMENT")||A.argument!=="key")throw A}},has:(m,g)=>Qb.indexOf(g)>=0?Reflect.has(m,g):Reflect.has(m,g)||this.interface.hasEvent(String(g))});return We(this,{filters:h}),We(this,{fallback:s.receive||s.fallback?A0e(this):null}),new Proxy(this,{get:(m,g,w)=>{if(typeof g=="symbol"||g in m||Qb.indexOf(g)>=0)return Reflect.get(m,g,w);try{return m.getFunction(g)}catch(A){if(!dr(A,"INVALID_ARGUMENT")||A.argument!=="key")throw A}},has:(m,g)=>typeof g=="symbol"||g in m||Qb.indexOf(g)>=0?Reflect.has(m,g):m.interface.hasFunction(g)})}connect(e){return new dg(this.target,this.interface,e)}attach(e){return new dg(e,this.interface,this.runner)}async getAddress(){return await Ci(this).addrPromise}async getDeployedCode(){const e=tf(this.runner);Ee(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const n=await e.getCode(await this.getAddress());return n==="0x"?null:n}async waitForDeployment(){const e=this.deploymentTransaction();
4183if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=tf(this.runner);return Ee(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",a)}catch(l){s(l)}};a()})}deploymentTransaction(){return Ci(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),E0e(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),x0e(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,n,r){n==null&&(n=0),r==null&&(r="latest");const{addr:i,addrPromise:s}=Ci(this),a=i||await s,{fragment:l,topics:u}=await nT(this,e),d={address:a,topics:u,fromBlock:n,toBlock:r},h=tf(this.runner);return Ee(h,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await h.getLogs(d)).map(m=>{let g=l;if(g==null)try{g=this.interface.getEvent(m.topics[0])}catch{}if(g)try{return new eT(m,this.interface,g)}catch(w){return new vF(m,w)}return new Jy(m,h)})}async on(e,n){const r=await Ik(this,"on",e);return r.listeners.push({listener:n,once:!1}),r.start(),this}async once(e,n){const r=await Ik(this,"once",e);return r.listeners.push({listener:n,once:!0}),r.start(),this}async emit(e,...n){return await EC(this,e,n,null)}async listenerCount(e){if(e){const i=await eg(this,e);return i?i.listeners.length:0}const{subs:n}=Ci(this);let r=0;for(const{listeners:i}of n.values())r+=i.length;return r}async listeners(e){if(e){const i=await eg(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:n}=Ci(this);let r=[];for(const{listeners:i}of n.values())r=r.concat(i.map(({listener:s})=>s));return r}async off(e,n){const r=await eg(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:s})=>s).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(n==null||r.listeners.length===0)&&(r.stop(),Ci(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const n=await eg(this,e);if(!n)return this;n.stop(),Ci(this).subs.delete(n.tag)}else{const{subs:n}=Ci(this);for(const{tag:r,stop:i}of n.values())i(),n.delete(r)}return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return await this.off(e,n)}static buildClass(e){class n extends dg{constructor(i,s=null){super(i,e,s)}}return n}static from(e,n,r){return r==null&&(r=null),new this(e,n,r)}};let xC=dg;function S0e(){return xC}class js extends S0e(){}function u5(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):ne(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class I0e{constructor(e){ae(this,"name");We(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,n){throw new Error("unsupported coin")}async decodeAddress(e,n){throw new Error("unsupported coin")}}const IF=new RegExp("^(ipfs)://(.*)$","i"),Rk=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),IF,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var bl,Cf,wl,gh,bv,RF;const _h=class _h{constructor(e,n,r){ee(this,wl);ae(this,"provider");ae(this,"address");ae(this,"name");ee(this,bl);ee(this,Cf);We(this,{provider:e,address:n,name:r}),z(this,bl,null),z(this,Cf,new js(n,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return C(this,bl)==null&&z(this,bl,(async()=>{try{return await C(this,Cf).supportsInterface("0x9061b923")}catch(e){if(dr(e,"CALL_EXCEPTION"))return!1;throw z(this,bl,null),e}})()),await C(this,bl)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await he(this,wl,gh).call(this,"addr(bytes32)");return s==null||s===ey?null:s}catch(s){if(dr(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const a=await he(this,wl,gh).call(this,"addr(bytes32,uint)",[s]);if(Yt(a,20))return Bt(a)}let n=null;for(const s of this.provider.plugins)if(s instanceof I0e&&s.supportsCoinType(e)){n=s;break}if(n==null)return null;const r=await he(this,wl,gh).call(this,"addr(bytes32,uint)",[e]);if(r==null||r==="0x")return null;const i=await n.decodeAddress(e,r);if(i!=null)return i;Ee(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const n=await he(this,wl,gh).call(this,"text(bytes32,string)",[e]);return n==null||n==="0x"?null:n}async getContentHash(){const e=await he(this,wl,gh).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const n=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const i=n[1]==="e3010170"?"ipfs":"ipns",s=parseInt(n[4],16);if(n[5].length===s*2)return`${i}://${kfe("0x"+n[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;Ee(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(n==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r<Rk.length;r++){const i=n.match(Rk[r]);if(i==null)continue;const s=i[1].toLowerCase();switch(s){case"https":case"data":return e.push({type:"url",value:n}),{linkage:e,url:n};case"ipfs":{const a=u5(n);return e.push({type:"ipfs",value:n}),e.push({type:"url",value:a}),{linkage:e,url:a}}case"erc721":case"erc1155":{const a=s==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:s,value:n});const l=await this.getAddress();if(l==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const u=(i[2]||"").split("/");if(u.length!==2)return e.push({type:`!${s}caip`,value:i[2]||""}),{url:null,linkage:e};const d=u[1],h=new js(u[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(s==="erc721"){const v=await h.ownerOf(d);if(l!==v)return e.push({type:"!owner",value:v}),{url:null,linkage:e};e.push({type:"owner",value:v})}else if(s==="erc1155"){const v=await h.balanceOf(l,d);
4183if(!v)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:v.toString()})}let m=await h[a](d);if(m==null||m==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:m}),s==="erc1155"&&(m=m.replace("{id}",Kl(d,32).substring(2)),e.push({type:"metadata-url-expanded",value:m})),m.match(/^ipfs:/i)&&(m=u5(m)),e.push({type:"metadata-url",value:m});let g={};const w=await new fc(m).send();w.assertOk();try{g=w.bodyJson}catch{try{e.push({type:"!metadata",value:w.bodyText})}catch{const T=w.body;return T&&e.push({type:"!metadata",value:ke(T)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!g)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(g)});let A=g.image;if(typeof A!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!A.match(/^(https:\/\/|data:)/i)){if(A.match(IF)==null)return e.push({type:"!imageUrl-ipfs",value:A}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:A}),A=u5(A)}return e.push({type:"url",value:A}),{linkage:e,url:A}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const n=await e.getNetwork(),r=n.getPlugin("org.ethers.plugins.network.Ens");return Ee(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:n}}),r.address}static async fromName(e,n){var i;let r=n;for(;;){if(r===""||r==="."||n!=="eth"&&r==="eth")return null;const s=await he(i=_h,bv,RF).call(i,e,r);if(s!=null){const a=new _h(e,s,n);return r!==n&&!await a.supportsWildcard()?null:a}r=r.split(".").slice(1).join(".")}}};bl=new WeakMap,Cf=new WeakMap,wl=new WeakSet,gh=async function(e,n){
4183n=(n||[]).slice();const r=C(this,Cf).interface;n.unshift(bC(this.name));let i=null;await this.supportsWildcard()&&(i=r.getFunction(e),Ee(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),n=[Hpe(this.name,255),r.encodeFunctionData(i,n)],e="resolve(bytes,bytes)"),n.push({enableCcipRead:!0});try{const s=await C(this,Cf)[e](...n);return i?r.decodeFunctionResult(i,s)[0]:s}catch(s){if(!dr(s,"CALL_EXCEPTION"))throw s}return null},bv=new WeakSet,RF=async function(e,n){const r=await _h.getEnsAddress(e);try{const s=await new js(r,["function resolver(bytes32) view returns (address)"],e).resolver(bC(n),{enableCcipRead:!0});return s===ey?null:s}catch(i){throw i}return null},ee(_h,bv);let hv=_h;const kk=BigInt(0);function wt(t,e){return(function(n){return n==null?e:t(n)})}function ly(t,e){return(n=>{if(e&&n==null)return null;if(!Array.isArray(n))throw new Error("not an array");return n.map(r=>t(r))})}function Xy(t,e){return(n=>{const r={};for(const i in t){let s=i;if(e&&i in e&&!(s in n)){for(const a of e[i])if(a in n){s=a;break}}try{const a=t[i](n[s]);a!==void 0&&(r[i]=a)}catch(a){const l=a instanceof Error?a.message:"not-an-error";Ee(!1,`invalid value for value.${i} (${l})`,"BAD_DATA",{value:n})}}return r})}function R0e(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}ne(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function c0(t){return ne(Yt(t,!0),"invalid data","value",t),t}function ur(t){return ne(Yt(t,32),"invalid hash","value",t),t}const k0e=Xy({address:Bt,blockHash:ur,blockNumber:ot,data:c0,index:ot,removed:wt(R0e,!1),topics:ly(ur),transactionHash:ur,transactionIndex:ot},{index:["logIndex"]});function N0e(t){return k0e(t)}const O0e=Xy({hash:wt(ur),parentHash:ur,parentBeaconBlockRoot:wt(ur,null),number:ot,timestamp:ot,nonce:wt(c0),difficulty:Pe,gasLimit:Pe,gasUsed:Pe,stateRoot:wt(ur,null),receiptsRoot:wt(ur,null),blobGasUsed:wt(Pe,null),excessBlobGas:wt(Pe,null),miner:wt(Bt),prevRandao:wt(ur,null),extraData:c0,baseFeePerGas:wt(Pe)},{prevRandao:["mixHash"]});function B0e(t){const e=O0e(t);return e.transactions=t.transactions.map(n=>typeof n=="string"?n:kF(n)),e}const P0e=Xy({transactionIndex:ot,blockNumber:ot,transactionHash:ur,address:Bt,topics:ly(ur),data:c0,index:ot,blockHash:ur},{index:["logIndex"]});function D0e(t){return P0e(t)}const M0e=Xy({to:wt(Bt,null),from:wt(Bt,null),contractAddress:wt(Bt,null),index:ot,root:wt(ke),gasUsed:Pe,blobGasUsed:wt(Pe,null),logsBloom:wt(c0),blockHash:ur,hash:ur,logs:ly(D0e),blockNumber:ot,cumulativeGasUsed:Pe,effectiveGasPrice:wt(Pe),blobGasPrice:wt(Pe,null),status:wt(ot),type:wt(ot,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function j0e(t){return M0e(t)}function kF(t){t.to&&Pe(t.to)===kk&&(t.to="0x0000000000000000000000000000000000000000");const e=Xy({hash:ur,index:wt(ot,void 0),type:n=>n==="0x"||n==null?0:ot(n),accessList:wt(cd,null),blobVersionedHashes:wt(ly(ur,!0),null),authorizationList:wt(ly(n=>{let r;if(n.signature)r=n.signature;else{let i=n.yParity;i==="0x1b"?i=0:i==="0x1c"&&(i=1),r=Object.assign({},n,{yParity:i})}return{address:Bt(n.address),chainId:Pe(n.chainId),nonce:Pe(n.nonce),signature:ui.from(r)}},!1),null),blockHash:wt(ur,null),blockNumber:wt(ot,null),transactionIndex:wt(ot,null),from:Bt,gasPrice:wt(Pe),maxPriorityFeePerGas:wt(Pe),maxFeePerGas:wt(Pe),maxFeePerBlobGas:wt(Pe,null),gasLimit:Pe,to:wt(Bt,null),value:Pe,nonce:ot,data:c0,creates:wt(Bt,null),chainId:wt(Pe,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=_he(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=ui.from(t.signature):e.signature=ui.from(t),e.chainId==null){const n=e.signature.legacyChainId;n!=null&&(e.chainId=n)}return e.blockHash&&Pe(e.blockHash)===kk&&(e.blockHash=null),e}const L0e="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Zy{constructor(e){ae(this,"name");We(this,{name:e})}clone(){return new Zy(this.name)}}class U6 extends Zy{constructor(n,r){n==null&&(n=0);super(`org.ethers.network.plugins.GasCost#${n||0}`);ae(this,"effectiveBlock");ae(this,"txBase");ae(this,"txCreate");ae(this,"txDataZero");ae(this,"txDataNonzero");ae(this,"txAccessListStorageKey");ae(this,"txAccessListAddress");const i={effectiveBlock:n};function s(a,l){let u=(r||{})[a];u==null&&(u=l),ne(typeof u=="number",`invalud value for ${a}`,"costs",r),i[a]=u}s("txBase",21e3),s("txCreate",32e3),s("txDataZero",4),s("txDataNonzero",16),s("txAccessListStorageKey",1900),s("txAccessListAddress",2400),We(this,i)}clone(){return new U6(this.effectiveBlock,this)}}class F6 extends Zy{constructor(n,r){super("org.ethers.plugins.network.Ens");ae(this,"address");ae(this,"targetNetwork");We(this,{address:n||L0e,targetNetwork:r??1})}clone(){return new F6(this.address,this.targetNetwork)}}var xy,Cy;class U0e extends Zy{constructor(n,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");ee(this,xy);ee(this,Cy);z(this,xy,n),z(this,Cy,r)}get url(){return C(this,xy)}get processFunc(){return C(this,Cy)}clone(){return this}}xy=new WeakMap,Cy=new WeakMap;const f5=new Map;var Ep,xp,vl;const Th=class Th{constructor(e,n){ee(this,Ep);ee(this,xp);ee(this,vl);z(this,Ep,e),z(this,xp,Pe(n)),z(this,vl,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return C(this,Ep)}set name(e){z(this,Ep,e)}get chainId(){return C(this,xp)}set chainId(e){z(this,xp,Pe(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===Pe(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===Pe(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===Pe(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(C(this,vl).values())}attachPlugin(e){if(C(this,vl).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return C(this,vl).set(e.name,e.clone()),this}getPlugin(e){return C(this,vl).get(e)||null}getPlugins(e){return this.plugins.filter(n=>n.name.split("#")[0]===e)}clone(){const e=new Th(this.name,this.chainId);return this.plugins.forEach(n=>{e.attachPlugin(n.clone())}),e}computeIntrinsicGas(e){const n=this.getPlugin("org.ethers.plugins.network.GasCost")||new U6;let r=n.txBase;if(e.to==null&&(r+=n.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?r+=n.txDataZero:r+=n.txDataNonzero;if(e.accessList){const i=cd(e.accessList);for(const s in i)r+=n.txAccessListAddress+n.txAccessListStorageKey*i[s].storageKeys.length}return r}static from(e){if(F0e(),e==null)return Th.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const n=f5.get(e);if(n)return n();if(typeof e=="bigint")return new Th("unknown",e);ne(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){ne(typeof e.name=="string"&&typeof e.chainId=="number","invali
4183d network object name or chainId","network",e);const n=new Th(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&n.attachPlugin(new F6(e.ensAddress,e.ensNetwork)),n}ne(!1,"invalid network","network",e)}static register(e,n){typeof e=="number"&&(e=BigInt(e));const r=f5.get(e);r&&ne(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),f5.set(e,n)}};Ep=new WeakMap,xp=new WeakMap,vl=new WeakMap;let No=Th;function Nk(t,e){const n=String(t);if(!n.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const r=n.split(".");if(r.length===1&&r.push(""),r.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;r[1].length<e;)r[1]+="0";if(r[1].length>9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function Ok(t){return new U0e(t,async(e,n,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[s,a]=await Promise.all([r.send(),e()]);i=s;const l=i.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:Nk(l.maxFee,9),maxPriorityFeePerGas:Nk(l.maxPriorityFee,9)}}catch(s){Ee(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:s})}})}let Bk=!1;function F0e(){if(Bk)return;Bk=!0;function t(e,n,r){const i=function(){const s=new No(e,n);return r.ensNetwork!=null&&s.attachPlugin(new F6(null,r.ensNetwork)),s.attachPlugin(new U6),(r.plugins||[]).forEach(a=>{s.attachPlugin(a)}),s};No.register(e,i),No.register(n,i),r.altNames&&r.altNames.forEach(s=>{No.register(s,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[Ok("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Ok("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function CC(t){return JSON.parse(JSON.stringify(t))}var Va,ss,Al,Co,Cp,mw;class V0e{constructor(e){ee(this,Cp);ee(this,Va);ee(this,ss);ee(this,Al);ee(this,Co);z(this,Va,e),z(this,ss,null),z(this,Al,4e3),z(this,Co,-2)}get pollingInterval(){return C(this,Al)}set pollingInterval(e){z(this,Al,e)}start(){C(this,ss)||(z(this,ss,C(this,Va)._setTimeout(he(this,Cp,mw).bind(this),C(this,Al))),he(this,Cp,mw).call(this))}stop(){C(this,ss)&&(C(this,Va)._clearTimeout(C(this,ss)),z(this,ss,null))}pause(e){this.stop(),e&&z(this,Co,-2)}resume(){this.start()}}Va=new WeakMap,ss=new WeakMap,Al=new WeakMap,Co=new WeakMap,Cp=new WeakSet,mw=async function(){try{const e=await C(this,Va).getBlockNumber();if(C(this,Co)===-2){z(this,Co,e);return}if(e!==C(this,Co)){for(let n=C(this,Co)+1;n<=e;n++){if(C(this,ss)==null)return;await C(this,Va).emit("block",n)}z(this,Co,e)}}catch{}C(this,ss)!=null&&z(this,ss,C(this,Va)._setTimeout(he(this,Cp,mw).bind(this),C(this,Al)))};var _f,Tf,El;class rT{constructor(e){ee(this,_f);ee(this,Tf);ee(this,El);z(this,_f,e),z(this,El,!1),z(this,Tf,n=>{this._poll(n,C(this,_f))})}async _poll(e,n){throw new Error("sub-classes must override this")}start(){C(this,El)||(z(this,El,!0),C(this,Tf).call(this,-2),C(this,_f).on("block",C(this,Tf)))}stop(){C(this,El)&&(z(this,El,!1),C(this,_f).off("block",C(this,Tf)))}pause(e){this.stop()}resume(){this.start()}}_f=new WeakMap,Tf=new WeakMap,El=new WeakMap;var _p,za;class z0e extends rT{constructor(n,r){super(n);ee(this,_p);ee(this,za);z(this,_p,r),z(this,za,-2)}pause(n){n&&z(this,za,-2),super.pause(n)}async _poll(n,r){const i=await r.getBlock(C(this,_p));i!=null&&(C(this,za)===-2?z(this,za,i.number):i.number>C(this,za)&&(r.emit(C(this,_p),i.number),z(this,za,i.number)))}}_p=new WeakMap,za=new WeakMap;var wv;class H0e extends rT{constructor(n,r){super(n);ee(this,wv);z(this,wv,CC(r))}async _poll(n,r){throw new Error("@TODO")}}wv=new WeakMap;var Tp;class q0e extends rT{constructor(n,r){super(n);ee(this,Tp);z(this,Tp,r)}async _poll(n,r){const i=await r.getTransactionReceipt(C(this,Tp));i&&r.emit(C(this,Tp),i)}}Tp=new WeakMap;var Ha,Sp,Ip,xl,os,vv,NF;class iT{constructor(e,n){ee(this,vv);ee(this,Ha);ee(this,Sp);ee(this,Ip);ee(this,xl);ee(this,os);z(this,Ha,e),z(this,Sp,CC(n)),z(this,Ip,he(this,vv,NF).bind(this)),z(this,xl,!1),z(this,os,-2)}
4183start(){C(this,xl)||(z(this,xl,!0),C(this,os)===-2&&C(this,Ha).getBlockNumber().then(e=>{z(this,os,e)}),C(this,Ha).on("block",C(this,Ip)))}stop(){C(this,xl)&&(z(this,xl,!1),C(this,Ha).off("block",C(this,Ip)))}pause(e){this.stop(),e&&z(this,os,-2)}resume(){this.start()}}Ha=new WeakMap,Sp=new WeakMap,Ip=new WeakMap,xl=new WeakMap,os=new WeakMap,vv=new WeakSet,NF=async function(e){if(C(this,os)===-2)return;const n=CC(C(this,Sp));n.fromBlock=C(this,os)+1,n.toBlock=e;const r=await C(this,Ha).getLogs(n);if(r.length===0){C(this,os)<e-60&&z(this,os,e-60);return}for(const i of r)C(this,Ha).emit(C(this,Sp),i),z(this,os,i.blockNumber)};const $0e=BigInt(2),G0e=10;function Kb(t){return t&&typeof t.then=="function"}function gw(t,e){return t+":"+JSON.stringify(e,(n,r)=>{if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((s,a)=>(s[a]=r[a],s),{})}return r})}class OF{constructor(e){ae(this,"name");We(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function Q0e(t){return JSON.parse(JSON.stringify(t))}function _C(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function d5(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(Yt(t,32)){const n=t.toLowerCase();return{type:"transaction",tag:gw("tx",{hash:n}),hash:n}}if(t.orphan){const n=t;return{type:"orphan",tag:gw("orphan",n),filter:Q0e(n)}}if(t.address||t.topics){const n=t,r={topics:(n.topics||[]).map(i=>i==null?null:Array.isArray(i)?_C(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(n.address){const i=[],s=[],a=l=>{Yt(l)?i.push(l):s.push((async()=>{i.push(await Hr(l,e))})())};Array.isArray(n.address)?n.address.forEach(a):a(n.address),s.length&&await Promise.all(s),r.address=_C(i.map(l=>l.toLowerCase()))}return{filter:r,tag:gw("event",r),type:"event"}}ne(!1,"unknown ProviderEvent","event",t)}function h5(){return new Date().getTime()}const K0e={cacheTimeout:250,pollingInterval:4e3};var Er,Cl,xr,Rp,Ii,Sf,_l,qa,_y,as,kp,Np,ht,xi,TC,SC,tg,IC,ng,yw;class W0e{constructor(e,n){ee(this,ht);ee(this,Er);ee(this,Cl);ee(this,xr);ee(this,Rp);ee(this,Ii);ee(this,Sf);ee(this,_l);ee(this,qa);ee(this,_y);ee(this,as);ee(this,kp);ee(this,Np);if(z(this,Np,Object.assign({},K0e,n||{})),e==="any")z(this,Sf,!0),z(this,Ii,null);else if(e){const r=No.from(e);z(this,Sf,!1),z(this,Ii,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else z(this,Sf,!1),z(this,Ii,null);z(this,qa,-1),z(this,_l,new Map),z(this,Er,new Map),z(this,Cl,new Map),z(this,xr,null),z(this,Rp,!1),z(this,_y,1),z(this,as,new Map),z(this,kp,!1)}get pollingInterval(){return C(this,Np).pollingInterval}get provider(){return this}get plugins(){return Array.from(C(this,Cl).values())}attachPlugin(e){if(C(this,Cl).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return C(this,Cl).set(e.name,e.connect(this)),this}getPlugin(e){return C(this,Cl).get(e)||null}get disableCcipRead(){return C(this,kp)}set disableCcipRead(e){z(this,kp,!!e)}async ccipReadFetch(e,n,r){if(this.disableCcipRead||r.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=n.toLowerCase(),a=[];for(let l=0;l<r.length;l++){const u=r[l],d=u.replace("{sender}",i).replace("{data}",s),h=new fc(d);u.indexOf("{data}")===-1&&(h.body={data:s,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:h,index:l,urls:r});let m="unknown error",g;try{g=await h.send()}catch(w){a.push(w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:h,result:{error:w}});continue}try{const w=g.bodyJson;if(w.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:h,result:w}),w.data;w.message&&(m=w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:h,result:w})}catch{}Ee(g.statusCode<400||g.statusCode>=500,`response not found during CCIP fetch: ${m}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:u,errorMessage:m}}
4183),a.push(m)}Ee(!1,`error encountered during CCIP fetch: ${a.map(l=>JSON.stringify(l)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:a}})}_wrapBlock(e,n){return new p0e(B0e(e),this)}_wrapLog(e,n){return new Jy(N0e(e),this)}_wrapTransactionReceipt(e,n){return new yF(j0e(e),this)}_wrapTransactionResponse(e,n){return new cy(kF(e),this)}_detectNetwork(){Ee(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Ee(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=ot(await he(this,ht,xi).call(this,{method:"getBlockNumber"}),"%response");return C(this,qa)>=0&&z(this,qa,e),e}_getAddress(e){return Hr(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(Yt(e))return Yt(e,32)?e:Ps(e);if(typeof e=="bigint"&&(e=ot(e,"blockTag")),typeof e=="number")return e>=0?Ps(e):C(this,qa)>=0?Ps(C(this,qa)+e):this.getBlockNumber().then(n=>Ps(n+e));ne(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const n=(e.topics||[]).map(u=>u==null?null:Array.isArray(u)?_C(u.map(d=>d.toLowerCase())):u.toLowerCase()),r="blockHash"in e?e.blockHash:void 0,i=(u,d,h)=>{let m;switch(u.length){case 0:break;case 1:m=u[0];break;default:u.sort(),m=u}if(r&&(d!=null||h!=null))throw new Error("invalid filter");const g={};return m&&(g.address=m),n.length&&(g.topics=n),d&&(g.fromBlock=d),h&&(g.toBlock=h),r&&(g.blockHash=r),g};let s=[];if(e.address)if(Array.isArray(e.address))for(const u of e.address)s.push(this._getAddress(u));else s.push(this._getAddress(e.address));let a;"fromBlock"in e&&(a=this._getBlockTag(e.fromBlock));let l;return"toBlock"in e&&(l=this._getBlockTag(e.toBlock)),s.filter(u=>typeof u!="string").length||a!=null&&typeof a!="string"||l!=null&&typeof l!="string"?Promise.all([Promise.all(s),a,l]).then(u=>i(u[0],u[1],u[2])):i(s,a,l)}_getTransactionRequest(e){const n=fv(e),r=[];if(["to","from"].forEach(i=>{if(n[i]==null)return;const s=Hr(n[i],this);Kb(s)?r.push((async function(){n[i]=await s})()):n[i]=s}),n.blockTag!=null){const i=this._getBlockTag(n.blockTag);
4183Kb(i)?r.push((async function(){n.blockTag=await i})()):n.blockTag=i}return r.length?(async function(){return await Promise.all(r),n})():n}async getNetwork(){if(C(this,Ii)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw C(this,Ii)===i&&z(this,Ii,null),s}})();return z(this,Ii,i),(await i).clone()}const e=C(this,Ii),[n,r]=await Promise.all([e,this._detectNetwork()]);return n.chainId!==r.chainId&&(C(this,Sf)?(this.emit("network",r,n),C(this,Ii)===e&&z(this,Ii,Promise.resolve(r))):Ee(!1,`network changed: ${n.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),n.clone()}async getFeeData(){const e=await this.getNetwork(),n=async()=>{const{_block:i,gasPrice:s,priorityFee:a}=await Lr({_block:he(this,ht,IC).call(this,"latest",!1),gasPrice:(async()=>{try{const h=await he(this,ht,xi).call(this,{method:"getGasPrice"});return Pe(h,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const h=await he(this,ht,xi).call(this,{method:"getPriorityFee"});return Pe(h,"%response")}catch{}return null})()});let l=null,u=null;const d=this._wrapBlock(i,e);return d&&d.baseFeePerGas&&(u=a??BigInt("1000000000"),l=d.baseFeePerGas*$0e+u),new Tk(s,l,u)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new fc(r.url),s=await r.processFunc(n,this,i);return new Tk(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await n()}async estimateGas(e){let n=this._getTransactionRequest(e);return Kb(n)&&(n=await n),Pe(await he(this,ht,xi).call(this,{method:"estimateGas",transaction:n}),"%response")}async call(e){const{tx:n,blockTag:r}=await Lr({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await he(this,ht,SC).call(this,he(this,ht,TC).call(this,n,r,e.enableCcipRead?0:-1))}async getBalance(e,n){return Pe(await he(this,ht,tg).call(this,{method:"getBalance"},e,n),"%response")}async getTransactionCount(e,n){return ot(await he(this,ht,tg).call(this,{method:"getTransactionCount"},e,n),"%response")}async getCode(e,n){return ke(await he(this,ht,tg).call(this,{method:"getCode"},e,n))}async getStorage(e,n,r){const i=Pe(n,"position");return ke(await he(this,ht,tg).call(this,{method:"getStorage",position:i},e,r))}async broadcastTransaction(e){const{blockNumber:n,hash:r,network:i}=await Lr({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=iv.from(e);if(s.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(n)}async getBlock(e,n){const{network:r,params:i}=await Lr({network:this.getNetwork(),params:he(this,ht,IC).call(this,e,!!n)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(e){const{network:n,params:r}=await Lr({network:this.getNetwork(),params:he(this,ht,xi).call(this,{method:"getTransaction",hash:e})});return r==null?null:this._wrapTransactionResponse(r,n)}async getTransactionReceipt(e){const{network:n,params:r}=await Lr({network:this.getNetwork(),params:he(this,ht,xi).call(this,{method:"getTransactionReceipt",hash:e})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await he(this,ht,xi).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,n)}async getTransactionResult(e){const{result:n}=await Lr({network:this.getNetwork(),result:he(this,ht,xi).call(this,{method:"getTransactionResult",hash:e})});return n==null?null:ke(n)}async getLogs(e){let n=this._getFilter(e);Kb(n)&&(n=await n);const{network:r,params:i}=await Lr({network:this.getNetwork(),params:he(this,ht,xi).call(this,{method:"getLogs",filter:n})});return i.map(s=>this._wrapLog(s,r))}_getProvider(e){Ee(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await hv.fromName(this,e)}async getAvatar(e){const n=await this.getResolver(e);return n?await n.getAvatar():null}async resolveName(e){const n=await this.getResolver(e);return n?await n.getAddress():null}async lookupAddress(e){e=Bt(e);
4183const n=bC(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await hv.getEnsAddress(this),s=await new js(r,["function resolver(bytes32) view returns (address)"],this).resolver(n);if(s==null||s===ey)return null;const l=await new js(s,["function name(bytes32) view returns (string)"],this).name(n);return await this.resolveName(l)!==e?null:l}catch(r){if(dr(r,"BAD_DATA")&&r.value==="0x"||dr(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(e,n,r){const i=n??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,a)=>{let l=null;const u=(async d=>{try{const h=await this.getTransactionReceipt(e);if(h!=null&&d-h.blockNumber+1>=i){s(h),l&&(clearTimeout(l),l=null);return}}catch(h){console.log("EEE",h)}this.once("block",u)});r!=null&&(l=setTimeout(()=>{l!=null&&(l=null,this.off("block",u),a(tn("timeout","TIMEOUT",{reason:"timeout"})))},r)),u(await this.getBlockNumber())})}async waitForBlock(e){Ee(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const n=C(this,as).get(e);n&&(n.timer&&clearTimeout(n.timer),C(this,as).delete(e))}_setTimeout(e,n){n==null&&(n=0);const r=$c(this,_y)._++,i=()=>{C(this,as).delete(r),e()};if(this.paused)C(this,as).set(r,{timer:null,func:i,time:n});else{const s=setTimeout(i,n);C(this,as).set(r,{timer:s,func:i,time:h5()})}return r}_forEachSubscriber(e){for(const n of C(this,Er).values())e(n.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new OF(e.type);case"block":{const n=new V0e(this);return n.pollingInterval=this.pollingInterval,n}case"safe":case"finalized":return new z0e(this,e.type);case"event":return new iT(this,e.filter);case"transaction":return new q0e(this,e.hash);case"orphan":return new H0e(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,n){for(const r of C(this,Er).values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=n,r.started&&n.start(),C(this,xr)!=null&&n.pause(C(this,xr));break}}async on(e,n){const r=await he(this,ht,yw).call(this,e);return r.listeners.push({listener:n,once:!1}),r.started||(r.subscriber.start(),r.started=!0,C(this,xr)!=null&&r.subscriber.pause(C(this,xr))),this}async once(e,n){const r=await he(this,ht,yw).call(this,e);return r.listeners.push({listener:n,once:!0}),r.started||(r.subscriber.start(),r.started=!0,C(this,xr)!=null&&r.subscriber.pause(C(this,xr))),this}async emit(e,...n){const r=await he(this,ht,ng).call(this,e,n);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:s,once:a})=>{const l=new QL(this,a?null:s,e);try{s.call(this,...n,l)}catch{}return!a}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),C(this,Er).delete(r.tag)),i>0}async listenerCount(e){if(e){const r=await he(this,ht,ng).call(this,e);return r?r.listeners.length:0}let n=0;for(const{listeners:r}of C(this,Er).values())n+=r.length;return n}async listeners(e){if(e){const r=await he(this,ht,ng).call(this,e);return r?r.listeners.map(({listener:i})=>i):[]}let n=[];for(const{listeners:r}of C(this,Er).values())n=n.concat(r.map(({listener:i})=>i));return n}async off(e,n){const r=await he(this,ht,ng).call(this,e);if(!r)return this;if(n){const i=r.listeners.map(({listener:s})=>s).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(!n||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),C(this,Er).delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:n,started:r,subscriber:i}=await he(this,ht,yw).call(this,e);r&&i.stop(),C(this,Er).delete(n)}else for(const[n,{started:r,subscriber:i}]of C(this,Er))r&&i.stop(),C(this,Er).delete(n);return this}async addListener(e,n){return await this.on(e,n)}async removeListener(e,n){return this.off(e,n)}get destroyed(){return C(this,Rp)}destroy(){this.removeAllListeners();for(const e of C(this,as).keys())this._clearTimeout(e);z(this,Rp,!0)}get paused(){return C(this,xr)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(z(this,qa,-1),C(this,xr)!=null){if(C(this,xr)==!!e)return;Ee(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}
4183this._forEachSubscriber(n=>n.pause(e)),z(this,xr,!!e);for(const n of C(this,as).values())n.timer&&clearTimeout(n.timer),n.time=h5()-n.time}resume(){if(C(this,xr)!=null){this._forEachSubscriber(e=>e.resume()),z(this,xr,null);for(const e of C(this,as).values()){let n=e.time;n<0&&(n=0),e.time=h5(),setTimeout(e.func,n)}}}}Er=new WeakMap,Cl=new WeakMap,xr=new WeakMap,Rp=new WeakMap,Ii=new WeakMap,Sf=new WeakMap,_l=new WeakMap,qa=new WeakMap,_y=new WeakMap,as=new WeakMap,kp=new WeakMap,Np=new WeakMap,ht=new WeakSet,xi=async function(e){const n=C(this,Np).cacheTimeout;if(n<0)return await this._perform(e);const r=gw(e.method,e);let i=C(this,_l).get(r);return i||(i=this._perform(e),C(this,_l).set(r,i),setTimeout(()=>{C(this,_l).get(r)===i&&C(this,_l).delete(r)},n)),await i},TC=async function(e,n,r){Ee(r<G0e,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:n,enableCcipRead:!0})});const i=fv(e);try{return ke(await this._perform({method:"call",transaction:i,blockTag:n}))}catch(s){if(!this.disableCcipRead&&F_(s)&&s.data&&r>=0&&n==="latest"&&i.to!=null&&un(s.data,0,4)==="0x556f1830"){const a=s.data,l=await Hr(i.to,this);let u;try{u=eme(un(s.data,4))}catch(m){Ee(!1,m.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:a}})}Ee(u.sender.toLowerCase()===l.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:u.errorArgs}});const d=await this.ccipReadFetch(i,u.calldata,u.urls);Ee(d!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:u.errorArgs}});const h={to:l,data:dn([u.selector,Z0e([d,u.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:h});try{const m=await he(this,ht,TC).call(this,h,n,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},h),result:m}),m}catch(m){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},h),error:m}),m}}throw s}},SC=async function(e){const{value:n}=await Lr({network:this.getNetwork(),value:e});return n},tg=async function(e,n,r){let i=this._getAddress(n),s=this._getBlockTag(r);return(typeof i!="string"||typeof s!="string")&&([i,s]=await Promise.all([i,s])),await he(this,ht,SC).call(this,he(this,ht,xi).call(this,Object.assign(e,{address:i,blockTag:s})))},IC=async function(e,n){if(Yt(e,32))return await he(this,ht,xi).call(this,{method:"getBlock",blockHash:e,includeTransactions:n});let r=this._getBlockTag(e);return typeof r!="string"&&(r=await r),await he(this,ht,xi).call(this,{method:"getBlock",blockTag:r,includeTransactions:n})},ng=async function(e,n){let r=await d5(e,this);return r.type==="event"&&n&&n.length>0&&n[0].removed===!0&&(r=await d5({orphan:"drop-log",log:n[0]},this)),C(this,Er).get(r.tag)||null},yw=async function(e){const n=await d5(e,this),r=n.tag;let i=C(this,Er).get(r);return i||(i={subscriber:this._getSubscriber(n),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},C(this,Er).set(r,i)),i};function Y0e(t,e){try{const n=RC(t,e);if(n)return tv(n)}catch{}return null}function RC(t,e){if(t==="0x")return null;try{const n=ot(un(t,e,e+32)),r=ot(un(t,n,n+32));return un(t,n+32,n+32+r)}catch{}return null}function Pk(t){const e=Ln(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function J0e(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const X0e=new Uint8Array([]);function Z0e(t){const e=[];let n=0;for(let r=0;r<t.length;r++)e.push(X0e),n+=32;for(let r=0;r<t.length;r++){const i=ut(t[r]);e[r]=Pk(n),e.push(Pk(i.length)),e.push(J0e(i)),n+=32+Math.ceil(i.length/32)*32}return dn(e)}const Dk="0x0000000000000000000000000000000000000000000000000000000000000000";function eme(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};Ee(Ph(t)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=un(t,0,32);Ee(un(n,0,12)===un(Dk,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=un(n,12);try{const r=[],i=ot(un(t,32,64)),s=ot(un(t,i,i+32)),a=un(t,i+32);for(let l=0;l<s;l++){const u=Y0e(a,l*32);if(u==null)throw new Error("abort");r.push(u)}e.urls=r}catch{Ee(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=RC(t,64);if(r==null)throw new Error("abort");e.calldata=r}catch{Ee(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}Ee(un(t,100,128)===un(Dk,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=un(t,96,100);try{const r=RC(t,128);if(r==null)throw new Error("abort");e.extraData=r}catch{Ee(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}
4183return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(r=>e[r]),e}function Pu(t,e){if(t.provider)return t.provider;Ee(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function Mk(t,e){let n=fv(e);if(n.to!=null&&(n.to=Hr(n.to,t)),n.from!=null){const r=n.from;n.from=Promise.all([t.getAddress(),Hr(r,t)]).then(([i,s])=>(ne(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else n.from=t.getAddress();return await Lr(n)}class tme{constructor(e){ae(this,"provider");We(this,{provider:e||null})}async getNonce(e){return Pu(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await Mk(this,e)}async populateTransaction(e){const n=Pu(this,"populateTransaction"),r=await Mk(this,e);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const a=Pe(r.chainId);ne(a===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=i.chainId;const s=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||s)?ne(!1,"eip-1559 transaction do not support gasPrice","tx",e):(r.type===0||r.type===1)&&s&&ne(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const a=await n.getFeeData();Ee(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice)}else{const a=await n.getFeeData();if(r.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,r.gasPrice!=null){const l=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=l,r.maxPriorityFeePerGas=l}else r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(Ee(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice),r.type=0):Ee(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(r.type===2||r.type===3||r.type===4)&&(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await Lr(r)}async populateAuthorization(e){const n=Object.assign({},e);return n.chainId==null&&(n.chainId=(await Pu(this,"getNetwork").getNetwork()).chainId),n.nonce==null&&(n.nonce=await this.getNonce()),n}async estimateGas(e){return Pu(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Pu(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Pu(this,"resolveName").resolveName(e)}async sendTransaction(e){const n=Pu(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const i=iv.from(r);return await n.broadcastTransaction(await this.signTransaction(i))}authorize(e){Ee(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}function nme(t){return JSON.parse(JSON.stringify(t))}var jr,_o,If,Tl,Rf,Op,Yl,kC,NC;class BF{constructor(e){ee(this,Yl);ee(this,jr);ee(this,_o);ee(this,If);ee(this,Tl);ee(this,Rf);ee(this,Op);z(this,jr,e),z(this,_o,null),z(this,If,he(this,Yl,kC).bind(this)),z(this,Tl,!1),z(this,Rf,null),z(this,Op,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,n){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){C(this,Tl)||(z(this,Tl,!0),he(this,Yl,kC).call(this,-2))}stop(){C(this,Tl)&&(z(this,Tl,!1),z(this,Op,!0),he(this,Yl,NC).call(this),C(this,jr).off("block",C(this,If)))}pause(e){e&&he(this,Yl,NC).call(this),C(this,jr).off("block",C(this,If))}resume(){this.start()}}jr=new WeakMap,_o=new WeakMap,If=new WeakMap,Tl=new WeakMap,Rf=new WeakMap,Op=new WeakMap,Yl=new WeakSet,kC=async function(e){try{C(this,_o)==null&&z(this,_o,this._subscribe(C(this,jr)));let n=null;try{n=await C(this,_o)}catch(s){if(!dr(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(n==null){z(this,_o,null),C(this,jr)._recoverSubscriber(this,this._recover(C(this,jr)));return}const r=await C(this,jr).getNetwork();if(C(this,Rf)||z(this,Rf,r),C(this,Rf).chainId!==r.chainId)throw new Error("chaid changed");if(C(this,Op))return;const i=await C(this,jr).send("eth_getFilterChanges",[n]);await this._emitResults(C(this,jr),i)}catch(n){console.log("@TODO",n)}C(this,jr).once("block",C(this,If))},NC=function(){const e=C(this,_o);e&&(z(this,_o,null),e.then(n=>{C(this,jr).destroyed||C(this,jr).send("eth_uninstallFilter",[n])}))};var kf;class rme extends BF{constructor(n,r){super(n);ee(this,kf);z(this,kf,nme(r))}_recover(n){return new iT(n,C(this,kf))}async _subscribe(n){return await n.send("eth_newFilter",[C(this,kf)])}
4183async _emitResults(n,r){for(const i of r)n.emit(C(this,kf),n._wrapLog(i,n._network))}}kf=new WeakMap;class ime extends BF{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,n){for(const r of n)e.emit("pending",r)}}const sme="bigint,boolean,function,number,string,symbol".split(/,/g);function bw(t){if(t==null||sme.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(bw);if(typeof t=="object")return Object.keys(t).reduce((e,n)=>(e[n]=t[n],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function ome(t){return new Promise(e=>{setTimeout(e,t)})}function ah(t){return t&&t.toLowerCase()}function jk(t){return t&&typeof t.pollingInterval=="number"}const PF={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class p5 extends tme{constructor(n,r){super(n);ae(this,"address");r=Bt(r),We(this,{address:r})}connect(n){Ee(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(n){return await this.populateCall(n)}async sendUncheckedTransaction(n){const r=bw(n),i=[];if(r.from){const a=r.from;i.push((async()=>{const l=await Hr(a,this.provider);ne(l!=null&&l.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=l})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const a=r.to;i.push((async()=>{r.to=await Hr(a,this.provider)})())}i.length&&await Promise.all(i);const s=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[s])}async sendTransaction(n){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(n);return await new Promise((s,a)=>{const l=[1e3,100];let u=0;const d=async()=>{try{const h=await this.provider.getTransaction(i);if(h!=null){s(h.replaceableTransaction(r));return}}catch(h){if(dr(h,"CANCELLED")||dr(h,"BAD_DATA")||dr(h,"NETWORK_ERROR")||dr(h,"UNSUPPORTED_OPERATION")){h.info==null&&(h.info={}),h.info.sendTransactionHash=i,a(h);return}if(dr(h,"INVALID_ARGUMENT")&&(u++,h.info==null&&(h.info={}),h.info.sendTransactionHash=i,u>10)){a(h);return}this.provider.emit("error",tn("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:h}))}this.provider._setTimeout(()=>{d()},l.pop()||4e3)};d()})}async signTransaction(n){const r=bw(n);if(r.from){const s=await Hr(r.from,this.provider);ne(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=s}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(n){const r=typeof n=="string"?ec(n):n;return await this.provider.send("personal_sign",[ke(r),this.address.toLowerCase()])}async signTypedData(n,r,i){const s=bw(i),a=await uv.resolveNames(n,r,s,async l=>{const u=await Hr(l);return ne(u!=null,"TypedData does not support null address","value",l),u});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(uv.getPayload(a.domain,r,a.value))])}async unlock(n){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),n,null])}async _legacySignMessage(n){const r=typeof n=="string"?ec(n):n;return await this.provider.send("eth_sign",[this.address.toLowerCase(),ke(r)])}}var Nf,Bp,$a,To,Bs,cs,ni,Ty,OC;class ame extends W0e{constructor(n,r){super(n,r);ee(this,Ty);ee(this,Nf);ee(this,Bp);ee(this,$a);ee(this,To);ee(this,Bs);ee(this,cs);ee(this,ni);z(this,Bp,1),z(this,Nf,Object.assign({},PF,r||{})),z(this,$a,[]),z(this,To,null),z(this,cs,null),z(this,ni,null);{let s=null;const a=new Promise(l=>{s=l});z(this,Bs,{promise:a,resolve:s})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(ne(!i||n!=="any","staticNetwork cannot be used on special network 'any'","options",r),i&&n!=null&&z(this,cs,No.from(n))):i&&(ne(n==null||i.matches(n),"staticNetwork MUST match network object","options",r),z(this,cs,i))}_getOption(n){return C(this,Nf)[n]}get _network(){return Ee(C(this,cs),"network is not available yet","NETWORK_E
4183RROR"),C(this,cs)}async _perform(n){if(n.method==="call"||n.method==="estimateGas"){let i=n.transaction;if(i&&i.type!=null&&Pe(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=await this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(n=Object.assign({},n,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(n);return r!=null?await this.send(r.method,r.args):super._perform(n)}async _detectNetwork(){const n=this._getOption("staticNetwork");if(n)if(n===!0){if(C(this,cs))return C(this,cs)}else return n;return C(this,ni)?await C(this,ni):this.ready?(z(this,ni,(async()=>{try{const r=No.from(Pe(await this.send("eth_chainId",[])));return z(this,ni,null),r}catch(r){throw z(this,ni,null),r}})()),await C(this,ni)):(z(this,ni,(async()=>{const r={id:$c(this,Bp)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0],z(this,ni,null)}catch(s){throw z(this,ni,null),this.emit("debug",{action:"receiveRpcError",error:s}),s}
4183if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return No.from(Pe(i.result));throw this.getRpcError(r,i)})()),await C(this,ni))}_start(){C(this,Bs)==null||C(this,Bs).resolve==null||(C(this,Bs).resolve(),z(this,Bs,null),(async()=>{for(;C(this,cs)==null&&!this.destroyed;)try{z(this,cs,await this._detectNetwork())}catch(n){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",tn("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:n}})),await ome(1e3)}he(this,Ty,OC).call(this)})())}async _waitUntilReady(){if(C(this,Bs)!=null)return await C(this,Bs).promise}_getSubscriber(n){return n.type==="pending"?new ime(this):n.type==="event"?this._getOption("polling")?new iT(this,n.filter):new rme(this,n.filter):n.type==="orphan"&&n.filter.orphan==="drop-log"?new OF("orphan"):super._getSubscriber(n)}get ready(){return C(this,Bs)==null}getRpcTransaction(n){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(n[i]==null)return;let s=i;i==="gasLimit"&&(s="gas"),r[s]=Ps(Pe(n[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{n[i]!=null&&(r[i]=ke(n[i]))}),n.accessList&&(r.accessList=cd(n.accessList)),n.blobVersionedHashes&&(r.blobVersionedHashes=n.blobVersionedHashes.map(i=>i.toLowerCase())),n.authorizationList&&(r.authorizationList=n.authorizationList.map(i=>{const s=MU(i);return{address:s.address,nonce:Ps(s.nonce),chainId:Ps(s.chainId),yParity:Ps(s.signature.yParity),r:Ps(s.signature.r),s:Ps(s.signature.s)}})),r}getRpcRequest(n){switch(n.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[ah(n.address),n.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[ah(n.address),n.blockTag]};case"getCode":return{method:"eth_getCode",args:[ah(n.address),n.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[ah(n.address),"0x"+n.position.toString(16),n.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[n.signedTransaction]};case"getBlock":if("blockTag"in n)return{method:"eth_getBlockByNumber",args:[n.blockTag,!!n.includeTransactions]};if("blockHash"in n)return{method:"eth_getBlockByHash",args:[n.blockHash,!!n.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[n.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[n.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(n.transaction),n.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(n.transaction)]};case"getLogs":return n.filter&&n.filter.address!=null&&(Array.isArray(n.filter.address)?n.filter.address=n.filter.address.map(ah):n.filter.address=ah(n.filter.address)),{method:"eth_getLogs",args:[n.filter]}}return null}getRpcError(n,r){const{method:i}=n,{error:s}=r;if(i==="eth_estimateGas"&&s.message){const u=s.message;if(!u.match(/revert/i)&&u.match(/insufficient funds/i))return tn("insufficient funds","INSUFFICIENT_FUNDS",{transaction:n.params[0],info:{payload:n,error:s}});if(u.match(/nonce/i)&&u.match(/too low/i))return tn("nonce has already been used","NONCE_EXPIRED",{transaction:n.params[0],info:{payload:n,error:s}})}if(i==="eth_call"||i==="eth_estimateGas"){const u=BC(s),d=ay.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",n.params[0],u?u.data:null);return d.info={error:s,payload:n},d}const a=JSON.stringify(lme(s));if(typeof s.message=="string"&&s.message.match(/user denied|ethers-user-denied/i))return tn("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:n,error:s}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const u=n.params[0];if(a.match(/insufficient funds|base fee exceeds gas limit/i))return tn("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:u,info:{error:s}});if(a.match(/nonce/i)&&a.match(/too low/i))return tn("nonce has already been used","NONCE_EXPIRED",{transaction:u,info:{error:s}});if(a.match(/replacement transaction/i)&&a.match(/underpriced/i))return tn("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:u,info:{error:s}});if(a.match(/only replay-protected/i))return tn("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:u,info:{error:s}}})}let l=!!a.match(/the method .* does not exist/i);return l||s&&s.details&&s.details.startsWith("Unauthorized method:")&&(l=!0),l?tn("unsupported operation","UNSUPPORTED_OPERATION",{operation:n.method,info:{error:s,payload:n}}):tn("could not coalesce error","UNKNOWN_ERROR",{error:s,payload:n})}send(n,r){if(this.destroyed)return Promise.reject(tn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n}));const i=$c(this,Bp)._++,s=new Promise((a,l)=>{C(this,$a).push({resolve:a,reject:l,payload:{method:n,params:r,id:i,jsonrpc:"2.0"}})});return he(this,Ty,OC).call(this),s}async getSigner(n){n==null&&(n=0);const r=this.send("eth_accounts",[]);if(typeof n=="number"){const s=await r;if(n>=s.length)throw new Error("no such account");return new p5(this,s[n])}const{accounts:i}=await Lr({network:this.getNetwork(),accounts:r});n=Bt(n);for(const s of i)if(Bt(s)===n)return new p5(this,n);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new p5(this,r))}destroy(){C(this,To)&&(clearTimeout(C(this,To)),z(this,To,null));for(const{payload:n,reject:r}of C(this,$a))r(tn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n.method}));z(this,$a,[]),super.destroy()}}Nf=new WeakMap,Bp=new WeakMap,$a=new WeakMap,To=new WeakMap,Bs=new WeakMap,cs=new WeakMap,ni=new WeakMap,Ty=new WeakSet,OC=function(){if(C(this,To))return;const n=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");z(this,To,setTimeout(()=>{z(this,To,null);const r=C(this,$a);for(z(this,$a,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==C(this,Nf).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(a=>a.payload)).length>C(this,Nf).batchMaxSize){r.unshift(i.pop());break}(async()=>{const s=i.length===1?i[0].payload:i.map(a=>a.payload);
4183this.emit("debug",{action:"sendRpcPayload",payload:s});try{const a=await this._send(s);this.emit("debug",{action:"receiveRpcResult",result:a});for(const{resolve:l,reject:u,payload:d}of i){if(this.destroyed){u(tn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:d.method}));continue}const h=a.filter(m=>m.id===d.id)[0];if(h==null){const m=tn("missing response for request","BAD_DATA",{value:a,info:{payload:d}});this.emit("error",m),u(m);continue}if("error"in h){u(this.getRpcError(d,h));continue}l(h.result)}}catch(a){this.emit("debug",{action:"receiveRpcError",error:a});for(const{reject:l}of i)l(a)}})()}},n))};var Sl;class DF extends ame{constructor(n,r){super(n,r);ee(this,Sl);let i=this._getOption("pollingInterval");i==null&&(i=PF.pollingInterval),z(this,Sl,i)}_getSubscriber(n){const r=super._getSubscriber(n);return jk(r)&&(r.pollingInterval=C(this,Sl)),r}get pollingInterval(){return C(this,Sl)}set pollingInterval(n){if(!Number.isInteger(n)||n<0)throw new Error("invalid interval");z(this,Sl,n),this._forEachSubscriber(r=>{jk(r)&&(r.pollingInterval=C(this,Sl))})}}Sl=new WeakMap;var Pp;class cme extends DF{constructor(n,r,i){n==null&&(n="http://localhost:8545");super(r,i);ee(this,Pp);typeof n=="string"?z(this,Pp,new fc(n)):z(this,Pp,n.clone())}_getConnection(){return C(this,Pp).clone()}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){const r=this._getConnection();r.body=JSON.stringify(n),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let s=i.bodyJson;return Array.isArray(s)||(s=[s]),s}}Pp=new WeakMap;function BC(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&Yt(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const n=BC(t[e]);if(n)return n}return null}if(typeof t=="string")try{return BC(JSON.parse(t))}catch{}return null}function PC(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const n in t)PC(t[n],e);if(typeof t=="string")try{return PC(JSON.parse(t),e)}catch{}}}function lme(t){const e=[];return PC(t,e),e}var Dp,Mp;const $u=class $u extends DF{constructor(n,r,i){const s=Object.assign({},i??{},{batchMaxCount:1});ne(n&&n.request,"invalid EIP-1193 provider","ethereum",n);super(r,s);ee(this,Dp);ee(this,Mp);z(this,Mp,null),i&&i.providerInfo&&z(this,Mp,i.providerInfo),z(this,Dp,async(a,l)=>{const u={method:a,params:l};this.emit("debug",{action:"sendEip1193Request",payload:u});try{const d=await n.request(u);return this.emit("debug",{action:"receiveEip1193Result",result:d}),d}catch(d){const h=new Error(d.message);throw h.code=d.code,h.data=d.data,h.payload=u,this.emit("debug",{action:"receiveEip1193Error",error:h}),h}})}get providerInfo(){return C(this,Mp)}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){ne(!Array.isArray(n),"EIP-1193 does not support batch request","payload",n);try{const r=await C(this,Dp).call(this,n.method,n.params||[]);return[{id:n.id,result:r}]}catch(r){return[{id:n.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(n,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(n,r)}async hasSigner(n){n==null&&(n=0);const r=await this.send("eth_accounts",[]);return typeof n=="number"?r.length>n:(n=n.toLowerCase(),r.filter(i=>i.toLowerCase()===n).length!==0)}async getSigner(n){if(n==null&&(n=0),!await this.hasSigner(n))try{await C(this,Dp).call(this,"eth_requestAccounts",[])}catch(r){const i=r.payload;throw this.getRpcError(i,{id:i.id,error:r})}return await super.getSigner(n)}static async discover(n){if(n==null&&(n={}),n.provider)return new $u(n.provider);const r=n.window?n.window:typeof window<"u"?window:null;if(r==null)return null;const i=n.anyProvider;if(i&&r.ethereum)return new $u(r.ethereum);if(!("addEventListener"in r&&"dispatchEvent"in r&&"removeEventListener"in r))return null;const s=n.timeout?n.timeout:300;return s===0?null:await new Promise((a,l)=>{let u=[];const d=g=>{u.push(g.detail),i&&h()},h=()=>
4183{if(clearTimeout(m),u.length)if(n&&n.filter){const g=n.filter(u.map(w=>Object.assign({},w.info)));if(g==null)a(null);else if(g instanceof $u)a(g);else{let w=null;if(g.uuid&&(w=u.filter(v=>g.uuid===v.info.uuid)[0]),w){const{provider:A,info:v}=w;a(new $u(A,void 0,{providerInfo:v}))}else l(tn("filter returned unknown info","UNSUPPORTED_OPERATION",{value:g}))}}else{const{provider:g,info:w}=u[0];a(new $u(g,void 0,{providerInfo:w}))}else a(null);r.removeEventListener("eip6963:announceProvider",d)},m=setTimeout(()=>{h()},s);r.addEventListener("eip6963:announceProvider",d),r.dispatchEvent(new Event("eip6963:requestProvider"))})}};Dp=new WeakMap,Mp=new WeakMap;let zu=$u;const ume=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"cardId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"CardCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"newFee",type:"uint256"}],name:"CreationFeeChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"FeesWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"cardId",type:"uint256"},{indexed:!0,internalType:"address",name:"rater",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"RatingSubmitted",type:"event"},{inputs:[],name:"createReviewCard",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"creationFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"cardId",type:"uint256"}],name:"getCardInfo",outputs:[{internalType:"uint256",name:"createdAt",type:"uint256"},{internalType:"address",name:"creator",type:"address"},{internalType:"bool",name:"exists",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"cardId",type:"uint256"}],name:"getEncryptedStats",outputs:[{internalType:"bytes32",name:"sum",type:"bytes32"},{internalType:"bytes32",name:"count",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalCards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"cardId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"hasAddressVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"hasVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextCardId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"reviewCards",outputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"euint64",name:"encryptedSum",type:"bytes32"},{internalType:"euint64",name:"encryptedCount",type:"bytes32"},{internalType:"bool",name:"exists",type:"bool"},{internalType:"uint256",name:"createdAt",type:"uint256"},{internalType:"address",name:"creator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"newFee",type:"uint256"}],name:"setCreationFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"cardId",type:"uint256"},{internalType:"externalEuint64",name:"encryptedRating",type:"bytes32"},{internalType:"bytes",name:"inputProof",type:"bytes"}],name:"submitEncryptedRating",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawFees",outputs:[],stateMutability:"nonpayable",type:"function"}],fme={abi:ume},yh=fme.abi,Uu="0xB218C0A83FB718683DdbF97B56e01DF3de3bfCF3";async function dme(t,e,n){const r=VL();if(!r)throw new Error("FHE instance not initialized");const i=Bt(e),s=await r.createEncryptedInput(i,n);s.add64(t);const{handles:a,inputProof:l}
4183=await s.encrypt(),u=ke(a[0]),d=ke(l);return{encryptedHex:u,proofHex:d}}async function hme(t,e){return await(await new js(Uu,yh,t).createReviewCard({value:Jfe(e)})).wait()}function pme(){const[t,e]=K.useState(!1),[n,r]=K.useState(!1),[i,s]=K.useState(!1),[a,l]=K.useState(!1),[u,d]=K.useState(null),[h,m]=K.useState(null),[g,w]=K.useState(!1),[A,v]=K.useState(!1),[x,T]=K.useState(""),[O,k]=K.useState({message:"",isVisible:!1});zL();const{address:P}=gr(),{connect:B,connectors:U}=CP(),[I,R]=K.useState(()=>{try{return localStorage.getItem("rm_seenLanding")==="1"}catch{return!1}}),[M,F]=K.useState([]),[,j]=K.useState(null),[q,L]=K.useState(""),[Se,X]=K.useState("idle"),[Q,te]=K.useState(""),[J,fe]=K.useState(!1),[,$]=K.useState(!1),[se,ye]=K.useState(!0);K.useEffect(()=>{(async()=>{await afe(),$(!0),await pe()})();const De=qe=>{r(!1),d(qe.detail.cardId),s(!0)};return window.addEventListener("open-comments",De),()=>window.removeEventListener("open-comments",De)},[]),K.useEffect(()=>{l(!P)},[P]);const pe=async()=>{var it,Vt;ye(!0);const Re=await Efe(),De=await Promise.all(Re.filter(Qe=>Qe.docId&&(Qe.kolName||Qe.twitterHandle||Qe.title)&&Qe.createdAt).map(async Qe=>{const et=Qe.id&&typeof Qe.id=="string"&&Qe.id.trim()!==""?await Cfe(Qe.id):0;return{...Qe,totalReviews:et,averageRating:0,isDecrypting:!0,decryptionError:!1}}));F(De),ye(!1);let qe=null;try{const Qe="https://sepolia.infura.io/v3/34c3a5f3ecf943498710543fe38b50f4";if(Qe&&Qe.length>0){const et=new cme(Qe);qe=new js(Uu,yh,et)}else if(window.ethereum){const et=new zu(window.ethereum);qe=new js(Uu,yh,et)}}catch{}for(let Qe=0;Qe<De.length;Qe++){const et=De[Qe];let Pt=0,It=!1,nn=!1;if(et.id!==void 0&&qe)try{It=!0;const St=await ffe(parseInt(et.id),qe,3e4);Pt=St?St.average:0,It=!1}catch(St){(it=St==null?void 0:St.message)!=null&&it.includes("Decryption service is temporarily unavailable")||(Vt=St==null?void 0:St.message)!=null&&Vt.includes("Failed to fetch"),It=!1,nn=!0,Pt=0}F(St=>{const Ir=[...St];return Ir[Qe]={...Ir[Qe],averageRating:Pt,isDecrypting:It,decryptionError:nn},Ir}),await new Promise(St=>setTimeout(St,3e3))}};K.useEffect(()=>{async function Re(){try{if(!window.ethereum)return;const De=new zu(window.ethereum),it=await new js(Uu,yh,De).creationFee();L(D9(it))}catch{}}Re()},[]),K.useEffect(()=>{async function Re(){if(!P||!window.ethereum){te("");return}try{const qe=await new zu(window.ethereum).getBalance(P);te(D9(qe))}catch{te("")}}Re()},[P]),K.useEffect(()=>{(async()=>{if(!h||!P){fe(!1);return}try{const De=b6(),qe=e0(De,"cards",h.id,"ratings",P),it=await fL(qe);fe(it.exists())}catch{fe(!1)}})()},[h,P]);const me=async({title:Re,description:De,twitterHandle:qe,twitterAvatarUrl:it})=>{var Vt;if(!P){k({message:"Connect your wallet first!",isVisible:!0}),U&&U.length>0&&B({connector:U[0]});return}w(!0);try{const Qe=Date.now(),et=await vfe({title:qe,description:De,creator:P,createdAt:Qe,kolName:Re,twitterHandle:qe,twitterAvatarUrl:it});j(et.id),k({message:"Card created! Waiting for on-chain confirmation...",isVisible:!0}),pe();const Pt=!1;if(!window.ethereum)throw new Error("No wallet found");const It=new zu(window.ethereum),nn=await It.getSigner(),St=q&&parseFloat(q)>0?q:"0.005",Ir=await hme(nn,St),Ui=new js(Uu,yh,It),ys=(Vt=Ir.logs)==null?void 0:Vt.map(Vn=>{try{return Ui.interface.parseLog(Vn)}catch{return null}}).find(Vn=>Vn&&Vn.name==="CardCreated"&&Vn.args.creator.toLowerCase()===P.toLowerCase());if(ys){const Vn=ys.args.cardId.toString();await Afe(et.id,Vn),k({message:"Card confirmed on-chain!",isVisible:!0}),pe(),e(!1)}else k({message:"On-chain card creation event not found.",isVisible:!0})}catch(Qe){k({message:"Error creating card: "+(Qe.message||Qe),isVisible:!0})}finally{w(!1),j(null)}},ve=async({rating:Re,comment:De})=>{if(!(!P||!h)){v(!0),X("encrypting"),await new Promise(qe=>setTimeout(qe,0));try{const it=Re===0;if(!it){const{encryptedHex:Qe,proofHex:et}=await dme(Re,Uu,P);if(X("reviewing"),!window.ethereum)throw new Error("No wallet found");const It=await new zu(window.ethereum).getSigner();await(await new js(Uu,yh,It).submitEncryptedRating(h.id,Qe,et,{gasLimit:5e5})).wait()}const Vt=Date.now();it||await xfe({cardId:h.id,userId:P,rating:Re,createdAt:Vt,comment:De}),De&&De.trim().length>0&&await UL({cardId:h.id,userId:P,text:De,createdAt:Vt}),k({message:"Rating submitted!",isVisible:!0}),r(!1),v(!1),pe()}catch{}finally{X("idle")}}},_e=K.useMemo(()=>{const Re=x.toLowerCase();return M.filter(De=>{const qe=(De.kolName||"").toLowerCase(),it=(De.twitterHandle||De.title||"").toLowerCase();return qe.includes(Re)||it.includes(Re)})},[M,x]);return I?G.jsxs("div",{className:"min-h-screen transition-colors duration-300",style:{backgroundColor:"var(--sepia-100)"},children:[G.jsx(qie,{onCreateCard:()=>e(!0),totalCards:M.length}),G.jsxs("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[G.jsx("div",{className:"mb-8",children:G.jsxs("div",{className:"max-w-2xl mx-auto",children:[G.jsxs("div",{className:"text-center mb-8",children:[G.jsx("h2",{className:"text-4xl sm:text-5xl font-extrabold mb-4 transition-colors duration-300",style:{color:"var(--text-primary-dark)",transform:"rotate(-0.5deg)"},children:"Rate KOLs, X Profiles & X Influencers"}),G.jsx("p",{className:"text-lg transition-colors duration-300",style:{color:"var(--text-secondary)"},children:"Anonymous, on-chain ratings powered by ZAMA FHE. Private ratings, public aggregates."})]}),G.jsx($ie,{value:x,onChange:T,placeholder:"Search KOLs or @handles..."})]})}),G.jsx(pfe,{cards:_e,onCardClick:Re=>{m(Re),r(!0)},loading:se}),G.jsx(mfe,{isOpen:t,onClose:()=>e(!1),onSubmit:me,isLoading:g,creationFee:q,ethBalance:Q}),G.jsx(gfe,{isOpen:n,onClose:()=>{r(!1),m(null)},onSubmit:ve,card:h,isLoading:A,reviewStatus:Se,hasVoted:J}),G.jsx(yfe,{isOpen:i,onClose:()=>s(!1),cardId:u}),G.jsx(bfe,{isOpen:a,onClose:()=>l(!1)}),G.jsx(wfe,{message:O.message,isVisible:O.isVisible,onClose:()=>k({message:"",isVisible:!1})})]})]}):G.jsx(_fe,{onEnter:()=>{try{localStorage.setItem("rm_seenLanding","1")}
4183catch{}R(!0)}})}const mme=Hie({appName:"RatingsMarket",projectId:"ed1deffe285a3c80426c7502b6b773dd",chains:[dee],ssr:!1}),gme=new WX;gz.createRoot(document.getElementById("root")).render(G.jsx(K.StrictMode,{children:G.jsx(gX,{config:mme,children:G.jsx(cZ,{client:gme,children:G.jsx(lre,{children:G.jsx(pme,{})})})})}));const Lk=Object.freeze(Object.defineProperty({__proto__:null,default:g5},Symbol.toStringTag,{value:"Module"}));export{Ce as B,iX as E,rg as H,Ag as T,Nt as U,Te as _,D$ as a,Ho as b,Bv as c,v$ as d,nd as e,Fo as f,zC as g,$s as h,Dv as i,GO as j,YQ as k,Rv as l,Jk as m,eP as n,wh as o,Tv as p,kJ as q,bme as r,pr as s,rc as t,ege as u,nX as v,L5 as w};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.