@hyperbridge/simplex 0.16.6 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/simplex.js +535 -182
- package/dist/bin/simplex.js.map +1 -1
- package/dist/index.cjs +324 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -50
- package/dist/index.d.ts +68 -50
- package/dist/index.js +324 -75
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/index-Be446eYK.js +106 -0
- package/dist/ui/assets/index-C3T-gubp.css +1 -0
- package/dist/ui/index.html +2 -2
- package/package.json +2 -2
- package/dist/ui/assets/index-CsBo6xg3.js +0 -106
- package/dist/ui/assets/index-PIGVK8XG.css +0 -1
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function I(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),le=ae(null),ue=ae(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(se),I(se,e)}function fe(){oe(se),oe(ce),oe(le)}function pe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=Zd(t,e.type);t!==n&&(I(ce,e),I(se,n))}function me(e){ce.current===e&&(oe(se),oe(ce)),ue.current===e&&(oe(ue),sp._currentValue=ne)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
-
`),l=s.split(`
|
|
5
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,L=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,R=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,z=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var B=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-B(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-B(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-B(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function nt(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var rt=Math.random().toString(36).slice(2),V=`__reactFiber$`+rt,H=`__reactProps$`+rt,it=`__reactContainer$`+rt,at=`__reactEvents$`+rt,ot=`__reactListeners$`+rt,st=`__reactHandles$`+rt,U=`__reactResources$`+rt,W=`__reactMarker$`+rt;function ct(e){delete e[V],delete e[H],delete e[at],delete e[ot],delete e[st]}function lt(e){var t=e[V];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[V]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bf(e);e!==null;){if(n=e[V])return n;e=bf(e)}return t}e=n,n=e.parentNode}return null}function ut(e){if(e=e[V]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ft(e){var t=e[U];return t||=e[U]={hoistableStyles:new Map,hoistableScripts:new Map},t}function pt(e){e[W]=!0}var mt=new Set,ht={};function gt(e,t){_t(e,t),_t(e+`Capture`,t)}function _t(e,t){for(ht[e]=t,e=0;e<t.length;e++)mt.add(t[e])}var vt=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]*$`),yt={},bt={};function xt(e){return Se.call(bt,e)?!0:Se.call(yt,e)?!1:vt.test(e)?bt[e]=!0:(yt[e]=!0,!1)}function St(e,t,n){if(xt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ct(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function wt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Tt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Et(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Dt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ot(e){if(!e._valueTracker){var t=Et(e)?`checked`:`value`;e._valueTracker=Dt(e,t,``+e[t])}}function kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Et(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function At(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var jt=/[\n"\\]/g;function Mt(e){return e.replace(jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Nt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Tt(t)):e.value!==``+Tt(t)&&(e.value=``+Tt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ft(e,o,Tt(n)):Ft(e,o,Tt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Tt(s):e.removeAttribute(`name`)}function Pt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ot(e);return}n=n==null?``:``+Tt(n),t=t==null?n:``+Tt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ot(e)}function Ft(e,t,n){t===`number`&&At(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function It(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Tt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lt(e,t,n){if(t!=null&&(t=``+Tt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Tt(n)}function Rt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Tt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ot(e)}function zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bt=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 Vt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Bt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ht(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Vt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Vt(e,o,t[o])}function Ut(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Wt=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`],[`colorRendering`,`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`]]),Gt=/^[\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 Kt(e){return Gt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function qt(){}var Jt=null;function Yt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xt=null,Zt=null;function Qt(e){var t=ut(e);if(t&&(e=t.stateNode)){var n=e[H]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Nt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Mt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[H]||null;if(!a)throw Error(i(90));Nt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&kt(r)}break a;case`textarea`:Lt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&It(e,!!n.multiple,t,!1)}}}var $t=!1;function en(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(Xt!==null||Zt!==null)&&(Eu(),Xt&&(t=Xt,e=Zt,Zt=Xt=null,Qt(t),e)))for(t=0;t<e.length;t++)Qt(e[t])}}function tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[H]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var nn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,"passive",{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,cn=null;function ln(){if(cn)return cn;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return cn=i.slice(e,1<r?1-r:void 0)}function un(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dn(){return!0}function fn(){return!1}function pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?dn:fn,this.isPropagationStopped=fn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=dn)},persist:function(){},isPersistent:dn}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=pn(mn),gn=f({},mn,{view:0,detail:0}),_n=pn(gn),vn,yn,bn,xn=f({},gn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==bn&&(bn&&e.type===`mousemove`?(vn=e.screenX-bn.screenX,yn=e.screenY-bn.screenY):yn=vn=0,bn=e),vn)},movementY:function(e){return`movementY`in e?e.movementY:yn}}),Sn=pn(xn),Cn=pn(f({},xn,{dataTransfer:0})),wn=pn(f({},gn,{relatedTarget:0})),Tn=pn(f({},mn,{animationName:0,elapsedTime:0,pseudoElement:0})),En=pn(f({},mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Dn=pn(f({},mn,{data:0})),On={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},kn={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`},An={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=An[e])?!!t[e]:!1}function Mn(){return jn}var Nn=pn(f({},gn,{key:function(e){if(e.key){var t=On[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=un(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mn,charCode:function(e){return e.type===`keypress`?un(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?un(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Pn=pn(f({},xn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Fn=pn(f({},gn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mn})),In=pn(f({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=pn(f({},xn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Rn=pn(f({},mn,{newState:0,oldState:0})),zn=[9,13,27,32],Bn=nn&&`CompositionEvent`in window,Vn=null;nn&&`documentMode`in document&&(Vn=document.documentMode);var Hn=nn&&`TextEvent`in window&&!Vn,Un=nn&&(!Bn||Vn&&8<Vn&&11>=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=ln(),cn=sn=on=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Un&&t.locale!==`ko`?null:t.data;default:return null}}var Zn={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 Qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Zn[e.type]:t===`textarea`}function $n(e,t,n,r){Xt?Zt?Zt.push(r):Zt=[r]:Xt=r,t=Pd(t,`onChange`),0<t.length&&(n=new hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var er=null,tr=null;function nr(e){Ed(e,0)}function rr(e){if(kt(dt(e)))return e}function ir(e,t){if(e===`change`)return t}var ar=!1;if(nn){var or;if(nn){var sr=`oninput`in document;if(!sr){var cr=document.createElement(`div`);cr.setAttribute(`oninput`,`return;`),sr=typeof cr.oninput==`function`}or=sr}else or=!1;ar=or&&(!document.documentMode||9<document.documentMode)}function lr(){er&&(er.detachEvent(`onpropertychange`,ur),tr=er=null)}function ur(e){if(e.propertyName===`value`&&rr(tr)){var t=[];$n(t,tr,e,Yt(e)),en(nr,t)}}function dr(e,t,n){e===`focusin`?(lr(),er=t,tr=n,er.attachEvent(`onpropertychange`,ur)):e===`focusout`&&lr()}function fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return rr(tr)}function pr(e,t){if(e===`click`)return rr(t)}function mr(e,t){if(e===`input`||e===`change`)return rr(t)}function hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var gr=typeof Object.is==`function`?Object.is:hr;function _r(e,t){if(gr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!gr(e[i],t[i]))return!1}return!0}function vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yr(e,t){var n=vr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=nn&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==At(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Pd(Tr,`onSelect`),0<r.length&&(t=new hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ar={animationend:kr(`Animation`,`AnimationEnd`),animationiteration:kr(`Animation`,`AnimationIteration`),animationstart:kr(`Animation`,`AnimationStart`),transitionrun:kr(`Transition`,`TransitionRun`),transitionstart:kr(`Transition`,`TransitionStart`),transitioncancel:kr(`Transition`,`TransitionCancel`),transitionend:kr(`Transition`,`TransitionEnd`)},jr={},Mr={};nn&&(Mr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),`TransitionEvent`in window||delete Ar.transitionend.transition);function Nr(e){if(jr[e])return jr[e];if(!Ar[e])return e;var t=Ar[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mr)return jr[e]=t[n];return e}var Pr=Nr(`animationend`),Fr=Nr(`animationiteration`),Ir=Nr(`animationstart`),Lr=Nr(`transitionrun`),Rr=Nr(`transitionstart`),zr=Nr(`transitioncancel`),Br=Nr(`transitionend`),Vr=new Map,Hr=`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(` `);Hr.push(`scrollEnd`);function Ur(e,t){Vr.set(e,t),gt(t,[e])}var Wr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Gr=[],Kr=0,qr=0;function Jr(){for(var e=Kr,t=qr=Kr=0;t<e;){var n=Gr[t];Gr[t++]=null;var r=Gr[t];Gr[t++]=null;var i=Gr[t];Gr[t++]=null;var a=Gr[t];if(Gr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Qr(n,i,a)}}function Yr(e,t,n,r){Gr[Kr++]=e,Gr[Kr++]=t,Gr[Kr++]=n,Gr[Kr++]=r,qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Xr(e,t,n,r){return Yr(e,t,n,r),$r(e)}function Zr(e,t){return Yr(e,null,null,t),$r(e)}function Qr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-B(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function $r(e){if(50<_u)throw _u=0,vu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ei={};function ti(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(e,t,n,r){return new ti(e,t,n,r)}function ri(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ii(e,t){var n=e.alternate;return n===null?(n=ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ai(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function oi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ri(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ni(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return si(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ni(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ni(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ni(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function si(e,t,n,r){return e=ni(7,e,r,t),e.lanes=n,e}function ci(e,t,n){return e=ni(6,e,null,t),e.lanes=n,e}function li(e){var t=ni(18,null,null,0);return t.stateNode=e,t}function ui(e,t,n){return t=ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var di=new WeakMap;function fi(e,t){if(typeof e==`object`&&e){var n=di.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},di.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var pi=[],mi=0,hi=null,gi=0,_i=[],vi=0,yi=null,bi=1,xi=``;function Si(e,t){pi[mi++]=gi,pi[mi++]=hi,hi=e,gi=t}function Ci(e,t,n){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,yi=e;var r=bi;e=xi;var i=32-B(r)-1;r&=~(1<<i),n+=1;var a=32-B(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,bi=1<<32-B(t)+i|n<<i|r,xi=a+e}else bi=1<<a|n<<i|r,xi=e}function wi(e){e.return!==null&&(Si(e,1),Ci(e,1,0))}function Ti(e){for(;e===hi;)hi=pi[--mi],pi[mi]=null,gi=pi[--mi],pi[mi]=null;for(;e===yi;)yi=_i[--vi],_i[vi]=null,xi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null}function Ei(e,t){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,bi=t.id,xi=t.overflow,yi=e}var Di=null,Oi=null,ki=!1,Ai=null,ji=!1,Mi=Error(i(519));function Ni(e){throw zi(fi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Mi}function Pi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[V]=e,t[H]=r,n){case`dialog`:Dd(`cancel`,t),Dd(`close`,t);break;case`iframe`:case`object`:case`embed`:Dd(`load`,t);break;case`video`:case`audio`:for(n=0;n<wd.length;n++)Dd(wd[n],t);break;case`source`:Dd(`error`,t);break;case`img`:case`image`:case`link`:Dd(`error`,t),Dd(`load`,t);break;case`details`:Dd(`toggle`,t);break;case`input`:Dd(`invalid`,t),Pt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Dd(`invalid`,t);break;case`textarea`:Dd(`invalid`,t),Rt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Bd(t.textContent,n)?(r.popover!=null&&(Dd(`beforetoggle`,t),Dd(`toggle`,t)),r.onScroll!=null&&Dd(`scroll`,t),r.onScrollEnd!=null&&Dd(`scrollend`,t),r.onClick!=null&&(t.onclick=qt),t=!0):t=!1,t||Ni(e,!0)}function Fi(e){for(Di=e.return;Di;)switch(Di.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:Di=Di.return}}function Ii(e){if(e!==Di)return!1;if(!ki)return Fi(e),ki=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Qd(e.type,e.memoizedProps)),n=!n),n&&Oi&&Ni(e),Fi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Oi=yf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Oi=yf(e)}else t===27?(t=Oi,sf(e.type)?(e=vf,vf=null,Oi=e):Oi=t):Oi=Di?_f(e.stateNode.nextSibling):null;return!0}function Li(){Oi=Di=null,ki=!1}function Ri(){var e=Ai;return e!==null&&(ru===null?ru=e:ru.push.apply(ru,e),Ai=null),e}function zi(e){Ai===null?Ai=[e]:Ai.push(e)}var Bi=ae(null),Vi=null,Hi=null;function Ui(e,t,n){I(Bi,t._currentValue),t._currentValue=n}function Wi(e){e._currentValue=Bi.current,oe(Bi)}function Gi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ki(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Gi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Gi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function qi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;gr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&Ki(t,e,n,r),t.flags|=262144}function Ji(e){for(e=e.firstContext;e!==null;){if(!gr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Yi(e){Vi=e,Hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xi(e){return Qi(Vi,e)}function Zi(e,t){return Vi===null&&Yi(e),Qi(e,t)}function Qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Hi===null){if(e===null)throw Error(i(308));Hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Hi=Hi.next=t;return n}var $i=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ea=t.unstable_scheduleCallback,ta=t.unstable_NormalPriority,na={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ra(){return{controller:new $i,data:new Map,refCount:0}}function ia(e){e.refCount--,e.refCount===0&&ea(ta,function(){e.controller.abort()})}var aa=null,oa=0,sa=0,ca=null;function la(e,t){if(aa===null){var n=aa=[];oa=0,sa=vd(),ca={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return oa++,t.then(ua,ua),t}function ua(){if(--oa===0&&aa!==null){ca!==null&&(ca.status=`fulfilled`);var e=aa;aa=null,sa=0,ca=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function da(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var fa=P.S;P.S=function(e,t){ou=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&la(e,t),fa!==null&&fa(e,t)};var pa=ae(null);function ma(){var e=pa.current;return e===null?Vl.pooledCache:e}function ha(e,t){t===null?I(pa,pa.current):I(pa,t.pool)}function ga(){var e=ma();return e===null?null:{parent:na._currentValue,pool:e}}var _a=Error(i(460)),va=Error(i(474)),ya=Error(i(542)),ba={then:function(){}};function xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Sa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(qt,qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then(qt,qt);else{if(e=Vl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e}throw wa=t,_a}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(wa=e,_a):e}}var wa=null;function Ta(){if(wa===null)throw Error(i(459));var e=wa;return wa=null,e}function Ea(e){if(e===_a||e===ya)throw Error(i(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),Sa(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ja(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ma(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ca(i)===t.type)?(t=a(t,n.props),Aa(t,n),t.return=e,t):(t=oi(n.type,n.key,n.props,null,e.mode,r),Aa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=si(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=oi(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case v:return t=ui(t,e.mode,n),t.return=e,t;case O:return t=Ca(t),f(e,t,n)}if(te(t)||M(t))return t=si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===C)return f(e,Zi(e,t),n);ja(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ca(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===C)return p(e,t,Zi(e,n),r);ja(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ca(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ka(r),i);if(r.$$typeof===C)return m(e,t,n,Zi(t,r),i);ja(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ki&&Si(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ki&&Si(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ki&&Si(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ki&&Si(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ki&&Si(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ki&&Si(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ca(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ka(o),c);if(o.$$typeof===C)return b(e,r,Zi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=b(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Ul&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ga(n[e],t)}var qa=ae(null),Ja=ae(0);function Ya(e,t){e=Yl,I(Ja,e),I(qa,t),Yl=e|t.baseLanes}function Xa(){I(Ja,Yl),I(qa,qa.current)}function Za(){Yl=Ja.current,oe(qa),oe(Ja)}var Qa=ae(null),$a=null;function eo(e){var t=e.alternate;I(ao,ao.current&1),I(Qa,e),$a===null&&(t===null||qa.current!==null||t.memoizedState!==null)&&($a=e)}function to(e){I(ao,ao.current),I(Qa,e),$a===null&&($a=e)}function no(e){e.tag===22?(I(ao,ao.current),I(Qa,e),$a===null&&($a=e)):ro(e)}function ro(){I(ao,ao.current),I(Qa,Qa.current)}function io(e){oe(Qa),$a===e&&($a=null),oe(ao)}var ao=ae(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mf(n)||hf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var so=0,co=null,lo=null,uo=null,fo=!1,po=!1,mo=!1,ho=0,go=0,_o=null,vo=0;function yo(){throw Error(i(321))}function bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gr(e[n],t[n]))return!1;return!0}function xo(e,t,n,r,i,a){return so=a,co=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Rs:zs,mo=!1,a=n(r,i),mo=!1,po&&(a=Co(t,n,r,i)),So(e),a}function So(e){P.H=Ls;var t=lo!==null&&lo.next!==null;if(so=0,uo=lo=co=null,fo=!1,go=0,_o=null,t)throw Error(i(300));e===null||nc||(e=e.dependencies,e!==null&&Ji(e)&&(nc=!0))}function Co(e,t,n,r){co=e;var a=0;do{if(po&&(_o=null),go=0,po=!1,25<=a)throw Error(i(301));if(a+=1,uo=lo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Bs,o=t(n,r)}while(po);return o}function wo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?jo(t):t,e=e.useState()[0],(lo===null?null:lo.memoizedState)!==e&&(co.flags|=1024),t}function To(){var e=ho!==0;return ho=0,e}function Eo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Do(e){if(fo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fo=!1}so=0,uo=lo=co=null,po=!1,go=ho=0,_o=null}function Oo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return uo===null?co.memoizedState=uo=e:uo=uo.next=e,uo}function ko(){if(lo===null){var e=co.alternate;e=e===null?null:e.memoizedState}else e=lo.next;var t=uo===null?co.memoizedState:uo.next;if(t!==null)uo=t,lo=e;else{if(e===null)throw co.alternate===null?Error(i(467)):Error(i(310));lo=e,e={memoizedState:lo.memoizedState,baseState:lo.baseState,baseQueue:lo.baseQueue,queue:lo.queue,next:null},uo===null?co.memoizedState=uo=e:uo=uo.next=e}return uo}function Ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jo(e){var t=go;return go+=1,_o===null&&(_o=[]),e=Sa(_o,e,t),t=co,(uo===null?t.memoizedState:uo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Rs:zs),e}function Mo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return jo(e);if(e.$$typeof===C)return Xi(e)}throw Error(i(438,String(e)))}function No(e){var t=null,n=co.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=co.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Ao(),co.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Po(e,t){return typeof t==`function`?t(e):t}function Fo(e){return Io(ko(),lo,e)}function Io(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(so&f)===f:(Ul&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===sa&&(d=!0);else if((so&p)===p){u=u.next,p===sa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,co.lanes|=p,Zl|=p;f=u.action,mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,co.lanes|=f,Zl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!gr(o,e.memoizedState)&&(nc=!0,d&&(n=ca,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Lo(e){var t=ko(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);gr(o,t.memoizedState)||(nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ro(e,t,n){var r=co,a=ko(),o=ki;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!gr((lo||a).memoizedState,n);if(s&&(a.memoizedState=n,nc=!0),a=a.queue,ls(Vo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||uo!==null&&uo.memoizedState.tag&1){if(r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,a,n,t),null),Vl===null)throw Error(i(349));o||so&127||zo(r,t,n)}return n}function zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=co.updateQueue,t===null?(t=Ao(),co.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bo(e,t,n,r){t.value=n,t.getSnapshot=r,Ho(t)&&Uo(e)}function Vo(e,t,n){return n(function(){Ho(t)&&Uo(e)})}function Ho(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gr(e,n)}catch{return!0}}function Uo(e){var t=Zr(e,2);t!==null&&xu(t,e,2)}function Wo(e){var t=Oo();if(typeof e==`function`){var n=e;if(e=n(),mo){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:e},t}function Go(e,t,n,r){return e.baseState=n,Io(e,lo,typeof r==`function`?r:Po)}function Ko(e,t,n,r,a){if(Ps(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Jo(e,t,s)}catch(n){Xo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Jo(e,t,a)}catch(n){Xo(e,t,n)}}function Jo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Yo(e,t,n)},function(n){return Xo(e,t,n)}):Yo(e,t,n)}function Yo(e,t,n){t.status=`fulfilled`,t.value=n,Zo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,qo(e,n)))}function Xo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Zo(t),t=t.next;while(t!==r)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qo(e,t){return t}function $o(e,t){if(ki){var n=Vl.formState;if(n!==null){a:{var r=co;if(ki){if(Oi){b:{for(var i=Oi,a=ji;i.nodeType!==8;){if(!a){i=null;break b}if(i=_f(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Oi=_f(i.nextSibling),r=i.data===`F!`;break a}}Ni(r)}r=!1}r&&(t=n[0])}}return n=Oo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:t},n.queue=r,n=js.bind(null,co,r),r.dispatch=n,r=Wo(!1),a=Ns.bind(null,co,!1,r.queue),r=Oo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ko.bind(null,co,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function es(e){return ts(ko(),lo,e)}function ts(e,t,n){if(t=Io(e,t,Qo)[0],e=Fo(Po)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=jo(t)}catch(e){throw e===_a?ya:e}else r=t;t=ko();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(co.flags|=2048,is(9,{destroy:void 0},ns.bind(null,i,n),null)),[r,a,e]}function ns(e,t){e.action=t}function rs(e){var t=ko(),n=lo;if(n!==null)return ts(t,n,e);ko(),t=t.memoizedState,n=ko();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=co.updateQueue,t===null&&(t=Ao(),co.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function as(){return ko().memoizedState}function os(e,t,n,r){var i=Oo();co.flags|=e,i.memoizedState=is(1|t,{destroy:void 0},n,r===void 0?null:r)}function ss(e,t,n,r){var i=ko();r=r===void 0?null:r;var a=i.memoizedState.inst;lo!==null&&r!==null&&bo(r,lo.memoizedState.deps)?i.memoizedState=is(t,a,n,r):(co.flags|=e,i.memoizedState=is(1|t,a,n,r))}function cs(e,t){os(8390656,8,e,t)}function ls(e,t){ss(2048,8,e,t)}function us(e){co.flags|=4;var t=co.updateQueue;if(t===null)t=Ao(),co.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ds(e){var t=ko().memoizedState;return us({ref:t,nextImpl:e}),function(){if(Bl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function fs(e,t){return ss(4,2,e,t)}function ps(e,t){return ss(4,4,e,t)}function ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hs(e,t,n){n=n==null?null:n.concat([e]),ss(4,4,ms.bind(null,t,e),n)}function gs(){}function _s(e,t){var n=ko();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vs(e,t){var n=ko();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&bo(t,r[1]))return r[0];if(r=e(),mo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function ys(e,t,n){return n===void 0||so&1073741824&&!(Ul&261930)?e.memoizedState=t:(e.memoizedState=n,e=bu(),co.lanes|=e,Zl|=e,n)}function bs(e,t,n,r){return gr(n,t)?n:qa.current===null?!(so&42)||so&1073741824&&!(Ul&261930)?(nc=!0,e.memoizedState=n):(e=bu(),co.lanes|=e,Zl|=e,t):(e=ys(e,n,r),gr(e,t)||(nc=!0),e)}function xs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ns(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,da(c,r),yu(e)):Ms(e,t,r,yu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,ne,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},yu())}function Es(){return Xi(sp)}function Ds(){return ko().memoizedState}function Os(){return ko().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ra(n);var r=za(t,e,n);r!==null&&(xu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=Xr(e,t,n,r),n!==null&&(xu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,yu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),Vl===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return xu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&xu(t,e,2)}function Ps(e){var t=e.alternate;return e===co||t!==null&&t===co}function Fs(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Ls={readContext:Xi,use:Mo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ls.useEffectEvent=yo;var Rs={readContext:Xi,use:Mo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,co,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,co,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Oo(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,co,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=co,a=Oo();if(ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||zo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=Vl.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-B(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=vo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Es,useFormState:$o,useActionState:$o,useOptimistic:function(e){var t=Oo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,co,!0,n),n.dispatch=t,[e,t]},useMemoCache:No,useCacheRefresh:function(){return Oo().memoizedState=ks.bind(null,co)},useEffectEvent:function(e){var t=Oo(),n={impl:e};return t.memoizedState=n,function(){if(Bl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:Xi,use:Mo,useCallback:_s,useContext:Xi,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Fo,useRef:as,useState:function(){return Fo(Po)},useDebugValue:gs,useDeferredValue:function(e,t){return bs(ko(),lo.memoizedState,e,t)},useTransition:function(){var e=Fo(Po)[0],t=ko().memoizedState;return[typeof e==`boolean`?e:jo(e),t]},useSyncExternalStore:Ro,useId:Ds,useHostTransitionStatus:Es,useFormState:es,useActionState:es,useOptimistic:function(e,t){return Go(ko(),lo,e,t)},useMemoCache:No,useCacheRefresh:Os};zs.useEffectEvent=ds;var Bs={readContext:Xi,use:Mo,useCallback:_s,useContext:Xi,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Lo,useRef:as,useState:function(){return Lo(Po)},useDebugValue:gs,useDeferredValue:function(e,t){var n=ko();return lo===null?ys(n,e,t):bs(n,lo.memoizedState,e,t)},useTransition:function(){var e=Lo(Po)[0],t=ko().memoizedState;return[typeof e==`boolean`?e:jo(e),t]},useSyncExternalStore:Ro,useId:Ds,useHostTransitionStatus:Es,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){var n=ko();return lo===null?(n.baseState=e,[e,n.queue.dispatch]):Go(n,lo,e,t)},useMemoCache:No,useCacheRefresh:Os};Bs.useEffectEvent=ds;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(xu(t,e,r),Ba(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(xu(t,e,r),Ba(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yu(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=za(e,r,n),t!==null&&(xu(t,e,n),Ba(t,e,n))}};function Us(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!_r(n,r)||!_r(i,a):!0}function Ws(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){Wr(e)}function qs(e){console.error(e)}function Js(e){Wr(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Ra(e),e.tag=3,e}function $s(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(lu===null?lu=new Set([this]):lu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ec(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&qi(t,n,a,!0),n=Qa.current,n!==null){switch(n.tag){case 31:case 13:return $a===null?Nu():n.alternate===null&&Xl===0&&(Xl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Qu(e,r,a)),!1;case 22:return n.flags|=65536,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Qu(e,r,a)),!1}throw Error(i(435,n.tag))}return Qu(e,r,a),Nu(),!1}if(ki)return t=Qa.current,t===null?(r!==Mi&&(t=Error(i(423),{cause:r}),zi(fi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=fi(r,n),a=Zs(e.stateNode,r,a),Va(e,a),Xl!==4&&(Xl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Mi&&(e=Error(i(422),{cause:r}),zi(fi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=fi(o,n),nu===null?nu=[o]:nu.push(o),Xl!==4&&(Xl=2),t===null)return!0;r=fi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Zs(n.stateNode,r,e),Va(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(lu===null||!lu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Qs(a),$s(a,e,n,r),Va(n,a),!1}n=n.return}while(n!==null);return!1}var tc=Error(i(461)),nc=!1;function rc(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(t,e.child,n,r)}function ic(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Yi(t),r=xo(e,t,n,o,a,i),s=To(),e!==null&&!nc?(Eo(e,t,i),Oc(e,t,i)):(ki&&s&&wi(t),t.flags|=1,rc(e,t,r,i),t.child)}function ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ri(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=oi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!kc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?_r:n,n(o,r)&&e.ref===t.ref)return Oc(e,t,i)}return t.flags|=1,e=ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function oc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(_r(a,r)&&e.ref===t.ref)if(nc=!1,t.pendingProps=r=a,kc(e,i))e.flags&131072&&(nc=!0);else return t.lanes=e.lanes,Oc(e,t,i)}return mc(e,t,n,r,i)}function sc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ha(t,a===null?null:a.cachePool),a===null?Xa():Ya(t,a),no(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ha(t,null),Xa(),ro(t)):(ha(t,a.cachePool),Ya(t,a),ro(t),t.memoizedState=null);return rc(e,t,i,n),t.child}function cc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lc(e,t,n,r,i){var a=ma();return a=a===null?null:{parent:na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ha(t,null),Xa(),no(t),e!==null&&qi(e,t,r,!0),t.childLanes=i,null}function uc(e,t){return t=Cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dc(e,t,n){return Na(t,e.child,null,n),e=uc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function fc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ki){if(r.mode===`hidden`)return e=uc(t,r),t.lanes=536870912,cc(null,e);if(to(t),(e=Oi)?(e=pf(e,ji),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=li(e),n.return=t,t.child=n,Di=t,Oi=null)):e=null,e===null)throw Ni(t);return t.lanes=536870912,null}return uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(to(t),a)if(t.flags&256)t.flags&=-257,t=dc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(nc||qi(e,t,n,!1),a=(n&e.childLanes)!==0,nc||a){if(r=Vl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Zr(e,s),xu(r,e,s),tc;Nu(),t=dc(e,t,n)}else e=o.treeContext,Oi=_f(s.nextSibling),Di=t,ki=!0,Ai=null,ji=!1,e!==null&&Ei(t,e),t=uc(t,r),t.flags|=4096;return t}return e=ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mc(e,t,n,r,i){return Yi(t),n=xo(e,t,n,r,void 0,i),r=To(),e!==null&&!nc?(Eo(e,t,i),Oc(e,t,i)):(ki&&r&&wi(t),t.flags|=1,rc(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return Yi(t),t.updateQueue=null,n=Co(t,r,n,i),So(e),r=To(),e!==null&&!nc?(Eo(e,t,a),Oc(e,t,a)):(ki&&r&&wi(t),t.flags|=1,rc(e,t,n,a),t.child)}function gc(e,t,n,r,i){if(Yi(t),t.stateNode===null){var a=ei,o=n.contextType;typeof o==`object`&&o&&(a=Xi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ia(t),o=n.contextType,a.context=typeof o==`object`&&o?Xi(o):ei,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Hs.enqueueReplaceState(a,a.state,null),Wa(t,r,a,i),Ua(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ei,typeof u==`object`&&u&&(o=Xi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ws(t,a,r,o),Fa=!1;var f=t.memoizedState;a.state=f,Wa(t,r,a,i),Ua(),l=t.memoizedState,s||f!==l||Fa?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=Fa||Us(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,La(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ei,typeof l==`object`&&l&&(c=Xi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ws(t,a,r,c),Fa=!1,f=t.memoizedState,a.state=f,Wa(t,r,a,i),Ua();var p=t.memoizedState;o!==d||f!==p||Fa||e!==null&&e.dependencies!==null&&Ji(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=Fa||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ji(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,pc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):rc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Oc(e,t,i),e}function _c(e,t,n,r){return Li(),t.flags|=256,rc(e,t,n,r),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:ga()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=eu),e}function xc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ao.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ki){if(a?eo(t):ro(t),(e=Oi)?(e=pf(e,ji),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=li(e),n.return=t,t.child=n,Di=t,Oi=null)):e=null,e===null)throw Ni(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ro(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=si(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(null,r)):(eo(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(eo(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=si(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Na(t,e.child,null,n),r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,t=cc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(eo(t),hf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,zi({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(nc||qi(e,t,n,!1),s=(n&e.childLanes)!==0,nc||s){if(s=Vl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Zr(e,r),xu(s,e,r),tc;mf(c)||Nu(),t=wc(e,t,n)}else mf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Oi=_f(c.nextSibling),Di=t,ki=!0,Ai=null,ji=!1,e!==null&&Ei(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(ro(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ii(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=si(c,a,n,null),c.flags|=2):c=ii(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,cc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=yc(n):(a=c.cachePool,a===null?a=ga():(l=na._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(e.child,r)):(eo(t),n=e.child,e=n.sibling,n=ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Sc(e,t){return t=Cc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Cc(e,t){return e=ni(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return Na(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gi(e.return,t,n)}function Ec(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ao.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,I(ao,o),rc(e,t,r,n),r=ki?gi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a,r);break;case`together`:Ec(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Oc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ji(e))):!0}function Ac(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Ui(t,na,e.memoizedState.cache),Li();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(eo(t),e=Oc(e,t,n),e===null?null:e.sibling):xc(e,t,n):(eo(t),t.flags|=128,null);eo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),I(ao,ao.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Ui(t,na,e.memoizedState.cache)}return Oc(e,t,n)}function jc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)nc=!0;else{if(!kc(e,n)&&!(t.flags&128))return nc=!1,Ac(e,t,n);nc=!!(e.flags&131072)}else nc=!1,ki&&t.flags&1048576&&Ci(t,gi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e==`function`)ri(e)?(r=Gs(e,r),t.tag=1,t=gc(null,t,e,r,n)):(t.tag=0,t=mc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ic(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Gs(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,La(e,t),Wa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ui(t,na,r),r!==o.cache&&Ki(t,[na],n,!0),Ua(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=_c(e,t,r,n);break a}else if(r!==a){a=fi(Error(i(424)),t),zi(a),t=_c(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Oi=_f(e.firstChild),Di=t,ki=!0,Ai=null,ji=!0,n=Pa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Li(),r===a){t=Oc(e,t,n);break a}rc(e,t,r,n)}t=t.child}return t;case 26:return pc(e,t),e===null?(n=Rf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ki||(n=t.type,e=t.pendingProps,r=Yd(le.current).createElement(n),r[V]=t,r[H]=e,Ud(r,n,e),pt(r),t.stateNode=r):t.memoizedState=Rf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&ki&&(r=t.stateNode=xf(t.type,t.pendingProps,le.current),Di=t,ji=!0,a=Oi,sf(t.type)?(vf=a,Oi=_f(r.firstChild)):Oi=a),rc(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ki&&((a=r=Oi)&&(r=df(r,t.type,t.pendingProps,ji),r===null?a=!1:(t.stateNode=r,Di=t,Oi=_f(r.firstChild),ji=!1,a=!0)),a||Ni(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Qd(a,o)?r=null:s!==null&&Qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=xo(e,t,wo,null,null,n),sp._currentValue=a),pc(e,t),rc(e,t,r,n),t.child;case 6:return e===null&&ki&&((e=n=Oi)&&(n=ff(n,t.pendingProps,ji),n===null?e=!1:(t.stateNode=n,Di=t,Oi=null,e=!0)),e||Ni(t)),null;case 13:return xc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,n):rc(e,t,r,n),t.child;case 11:return ic(e,t,t.type,t.pendingProps,n);case 7:return rc(e,t,t.pendingProps,n),t.child;case 8:return rc(e,t,t.pendingProps.children,n),t.child;case 12:return rc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ui(t,t.type,r.value),rc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Yi(t),a=Xi(a),r=r(a),t.flags|=1,rc(e,t,r,n),t.child;case 14:return ac(e,t,t.type,t.pendingProps,n);case 15:return oc(e,t,t.type,t.pendingProps,n);case 19:return Dc(e,t,n);case 31:return fc(e,t,n);case 22:return sc(e,t,n,t.pendingProps);case 24:return Yi(t),r=Xi(na),e===null?(a=ma(),a===null&&(a=Vl,o=ra(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ia(t),Ui(t,na,a)):((e.lanes&n)!==0&&(La(e,t),Wa(t,null,null,n),Ua()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ui(t,na,r),r!==a.cache&&Ki(t,[na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ui(t,na,r))),rc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Mc(e){e.flags|=4}function Nc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Au())e.flags|=8192;else throw wa=ba,va}else e.flags&=-16777217}function Pc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(Au())e.flags|=8192;else throw wa=ba,va}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,tu|=t)}function Ic(e,t){if(!ki)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Lc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rc(e,t,n){var r=t.pendingProps;switch(Ti(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lc(t),null;case 1:return Lc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Wi(na),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ri())),Lc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(Lc(t),Nc(t,a,null,r,n)):(Lc(t),Pc(t,o))):o?o===e.memoizedState?(Lc(t),t.flags&=-16777217):(Mc(t),Lc(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),Lc(t),Nc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}e=se.current,Ii(t)?Pi(t,e):(e=xf(a,r,n),t.stateNode=e,Mc(t))}return Lc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}if(o=se.current,Ii(t))Pi(t,o);else{var s=Yd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[V]=t,o[H]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[V]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ni(t,!0)}else e=Yd(e).createTextNode(r),e[V]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[V]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[V]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Lc(t),null);case 4:return fe(),e===null&&Ad(t.stateNode.containerInfo),Lc(t),null;case 10:return Wi(t.type),Lc(t),null;case 19:if(oe(ao),r=t.memoizedState,r===null)return Lc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return I(ao,ao.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}else{if(!a)if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return Lc(t),null}else 2*Ee()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=ao.current,I(ao,a?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&oe(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(ao),null;case 4:return fe(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&oe(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Bc(e,t){switch(Ti(t),t.tag){case 3:Wi(na),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:oe(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&oe(pa);break;case 24:Wi(na)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Zu(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Zu(e,e.return,t)}}}function Wc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Zu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Zu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Zu(e,t,n)}else n.current=null}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Zu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[H]=t}catch(t){Zu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[V]=e,t[H]=n}catch(t){Zu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,qd=gp,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Gs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Zu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:uf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Vc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Zu(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Zu(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ka(e,t)}catch(e){Zu(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:xl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=td.bind(null,n),gf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),el=i,tl=a}break;case 30:break;default:xl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ct(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var cl=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=cl,i=ll;sf(n.type)&&(cl=n.stateNode,ll=!1),ul(e,t,n),Sf(n.stateNode),cl=r,ll=i;break;case 5:tl||Kc(n,t);case 6:if(r=cl,i=ll,cl=null,ul(e,t,n),cl=r,ll=i,cl!==null)if(ll)try{(cl.nodeType===9?cl.body:cl.nodeName===`HTML`?cl.ownerDocument.body:cl).removeChild(n.stateNode)}catch(e){Zu(n,t,e)}else try{cl.removeChild(n.stateNode)}catch(e){Zu(n,t,e)}break;case 18:cl!==null&&(ll?(e=cl,cf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):cf(cl,n.stateNode));break;case 4:r=cl,i=ll,cl=n.stateNode.containerInfo,ll=!0,ul(e,t,n),cl=r,ll=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ul(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ul(e,t,n),tl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Zu(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Zu(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=nd.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(sf(c.type)){cl=c.stateNode,ll=!1;break a}break;case 5:cl=c.stateNode,ll=!1;break a;case 3:case 4:cl=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(cl===null)throw Error(i(160));dl(o,s,a),cl=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=_l;if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[W]||o[V]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ud(o,r,n),o[V]=e,pt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Xf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ud(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[V]=e,pt(o),r=o}e.stateNode=r}else Zf(a,e.type,e.stateNode);else e.stateNode=Gf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Zf(a,e.type,e.stateNode):Gf(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{zt(a,``)}catch(t){Zu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Zu(e,e.return,t)}}break;case 3:if(Yf=null,a=_l,_l=Tf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Zu(e,e.return,t)}nl&&(nl=!1,bl(e));break;case 4:r=_l,_l=Tf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(au=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,gl(t,e),tl=d,el=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Zu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Zu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?lf(m,!0):lf(l.stateNode,!1)}catch(e){Zu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(zt(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Zu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),Sl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),Sl(t);break;case 27:Sf(t.stateNode);case 26:case 5:Kc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Vc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Zu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ga(c[i],s)}catch(e){Zu(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Gc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ia(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Vc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Zu(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&ep(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=Tf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Rl={getCacheForType:function(e){var t=Xi(na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xi(na).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,Bl=0,Vl=null,Hl=null,Ul=0,Wl=0,Gl=null,Kl=!1,ql=!1,Jl=!1,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=null,ru=null,iu=!1,au=0,ou=0,su=1/0,cu=null,lu=null,uu=0,du=null,fu=null,pu=0,mu=0,hu=null,gu=null,_u=0,vu=null;function yu(){return Bl&2&&Ul!==0?Ul&-Ul:P.T===null?tt():vd()}function bu(){if(eu===0)if(!(Ul&536870912)||ki){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),eu=e}else eu=536870912;return e=Qa.current,e!==null&&(e.flags|=32),eu}function xu(e,t,n){(e===Vl&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)&&(Ou(e,0),Tu(e,Ul,eu,!1)),Je(e,n),(!(Bl&2)||e!==Vl)&&(e===Vl&&(!(Bl&2)&&(Ql|=n),Xl===4&&Tu(e,Ul,eu,!1)),ud(e))}function Su(e,t,n){if(Bl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||We(e,t),a=r?Iu(e,t):Pu(e,t,!0),o=r;do{if(a===0){ql&&!r&&Tu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!wu(n)){a=Pu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=nu;var l=c.current.memoizedState.isDehydrated;if(l&&(Ou(c,s).flags|=256),s=Pu(c,s,!1),s!==2){if(Jl&&!l){c.errorRecoveryDisabledLanes|=o,Ql|=o,a=4;break a}o=ru,ru=a,o!==null&&(ru===null?ru=o:ru.push.apply(ru,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ou(e,0),Tu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Tu(r,t,eu,!Kl);break a;case 2:ru=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=au+300-Ee(),10<a)){if(Tu(r,t,eu,!Kl),Ue(r,0,!0)!==0)break a;pu=t,r.timeoutHandle=tf(Cu.bind(null,r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,`Throttled`,-0,0),a);break a}Cu(r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,null,-0,0)}}break}while(1);ud(e)}function Cu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qt},Ml(t,a,d);var m=(a&62914560)===a?au-Ee():(a&4194048)===a?ou-Ee():0;if(m=np(d,m),m!==null){pu=a,e.cancelPendingCommit=m(Uu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Tu(e,a,o,!l);return}}Uu(e,t,a,n,r,i,o,s,c)}function wu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!gr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tu(e,t,n,r){t&=~$l,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-B(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function Eu(){return Bl&6?!0:(dd(0,!1),!1)}function Du(){if(Hl!==null){if(Wl===0)var e=Hl.return;else e=Hl,Hi=Vi=null,Do(e),Da=null,Oa=0,e=Hl;for(;e!==null;)Bc(e.alternate,e),e=e.return;Hl=null}}function Ou(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),pu=0,Du(),Vl=e,Hl=n=ii(e.current,null),Ul=t,Wl=0,Gl=null,Kl=!1,ql=We(e,t),Jl=!1,tu=eu=$l=Ql=Zl=Xl=0,ru=nu=null,iu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-B(r),a=1<<i;t|=e[i],r&=~a}return Yl=t,Jr(),n}function ku(e,t){co=null,P.H=Ls,t===_a||t===ya?(t=Ta(),Wl=3):t===va?(t=Ta(),Wl=4):Wl=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Gl=t,Hl===null&&(Xl=1,Ys(e,fi(t,e.current)))}function Au(){var e=Qa.current;return e===null?!0:(Ul&4194048)===Ul?$a===null:(Ul&62914560)===Ul||Ul&536870912?e===$a:!1}function ju(){var e=P.H;return P.H=Ls,e===null?Ls:e}function Mu(){var e=P.A;return P.A=Rl,e}function Nu(){Xl=4,Kl||(Ul&4194048)!==Ul&&Qa.current!==null||(ql=!0),!(Zl&134217727)&&!(Ql&134217727)||Vl===null||Tu(Vl,Ul,eu,!1)}function Pu(e,t,n){var r=Bl;Bl|=2;var i=ju(),a=Mu();(Vl!==e||Ul!==t)&&(cu=null,Ou(e,t)),t=!1;var o=Xl;a:do try{if(Wl!==0&&Hl!==null){var s=Hl,c=Gl;switch(Wl){case 8:Du(),o=6;break a;case 3:case 2:case 9:case 6:Qa.current===null&&(t=!0);var l=Wl;if(Wl=0,Gl=null,Bu(e,s,c,l),n&&ql){o=0;break a}break;default:l=Wl,Wl=0,Gl=null,Bu(e,s,c,l)}}Fu(),o=Xl;break}catch(t){ku(e,t)}while(1);return t&&e.shellSuspendCounter++,Hi=Vi=null,Bl=r,P.H=i,P.A=a,Hl===null&&(Vl=null,Ul=0,Jr()),o}function Fu(){for(;Hl!==null;)Ru(Hl)}function Iu(e,t){var n=Bl;Bl|=2;var r=ju(),a=Mu();Vl!==e||Ul!==t?(cu=null,su=Ee()+500,Ou(e,t)):ql=We(e,t);a:do try{if(Wl!==0&&Hl!==null){t=Hl;var o=Gl;b:switch(Wl){case 1:Wl=0,Gl=null,Bu(e,t,o,1);break;case 2:case 9:if(xa(o)){Wl=0,Gl=null,zu(t);break}t=function(){Wl!==2&&Wl!==9||Vl!==e||(Wl=7),ud(e)},o.then(t,t);break a;case 3:Wl=7;break a;case 4:Wl=5;break a;case 7:xa(o)?(Wl=0,Gl=null,zu(t)):(Wl=0,Gl=null,Bu(e,t,o,7));break;case 5:var s=null;switch(Hl.tag){case 26:s=Hl.memoizedState;case 5:case 27:var c=Hl;if(s?$f(s):c.stateNode.complete){Wl=0,Gl=null;var l=c.sibling;if(l!==null)Hl=l;else{var u=c.return;u===null?Hl=null:(Hl=u,Vu(u))}break b}}Wl=0,Gl=null,Bu(e,t,o,5);break;case 6:Wl=0,Gl=null,Bu(e,t,o,6);break;case 8:Du(),Xl=6;break a;default:throw Error(i(462))}}Lu();break}catch(t){ku(e,t)}while(1);return Hi=Vi=null,P.H=r,P.A=a,Bl=n,Hl===null?(Vl=null,Ul=0,Jr(),Xl):0}function Lu(){for(;Hl!==null&&!we();)Ru(Hl)}function Ru(e){var t=jc(e.alternate,e,Yl);e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function zu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Ul);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Ul);break;case 5:Do(t);default:Bc(n,t),t=Hl=ai(t,Yl),t=jc(n,t,Yl)}e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function Bu(e,t,n,r){Hi=Vi=null,Do(t),Da=null,Oa=0;var i=t.return;try{if(ec(e,i,t,n,Ul)){Xl=1,Ys(e,fi(n,e.current)),Hl=null;return}}catch(t){if(i!==null)throw Hl=i,t;Xl=1,Ys(e,fi(n,e.current)),Hl=null;return}t.flags&32768?(ki||r===1?e=!0:ql||Ul&536870912?e=!1:(Kl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hu(t,e)):Vu(t)}function Vu(e){var t=e;do{if(t.flags&32768){Hu(t,Kl);return}e=t.return;var n=Rc(t.alternate,t,Yl);if(n!==null){Hl=n;return}if(t=t.sibling,t!==null){Hl=t;return}Hl=t=e}while(t!==null);Xl===0&&(Xl=5)}function Hu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,Hl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Hl=e;return}Hl=e=n}while(e!==null);Xl=6,Hl=null}function Uu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ju();while(uu!==0);if(Bl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=qr,Ye(e,n,o,s,c,l),e===Vl&&(Hl=Vl=null,Ul=0),fu=t,du=e,pu=n,mu=o,hu=a,gu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,rd(ke,function(){return Yu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Bl,Bl|=4;try{al(e,t,n)}finally{Bl=s,F.p=a,P.T=r}}uu=1,Wu(),Gu(),Ku()}}function Wu(){if(uu===1){uu=0;var e=du,t=fu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Bl;Bl|=4;try{vl(t,e);var a=Jd,o=xr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&br(s.ownerDocument.documentElement,s)){if(c!==null&&Sr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gp=!!qd,Jd=qd=null}finally{Bl=i,F.p=r,P.T=n}}e.current=t,uu=2}}function Gu(){if(uu===2){uu=0;var e=du,t=fu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Bl;Bl|=4;try{ol(e,t.alternate,t)}finally{Bl=i,F.p=r,P.T=n}}uu=3}}function Ku(){if(uu===4||uu===3){uu=0,Te();var e=du,t=fu,n=pu,r=gu;t.subtreeFlags&10256||t.flags&10256?uu=5:(uu=0,fu=du=null,qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(lu=null),et(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}pu&3&&Ju(),ud(e),i=e.pendingLanes,n&261930&&i&42?e===vu?_u++:(_u=0,vu=e):_u=0,dd(0,!1)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ia(t)))}function Ju(){return Wu(),Gu(),Ku(),Yu()}function Yu(){if(uu!==5)return!1;var e=du,t=mu;mu=0;var n=et(pu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,dd(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{F.p=a,P.T=r,qu(e,t)}}function Xu(e,t,n){t=fi(n,t),t=Zs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Je(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=fi(n,e),n=Qs(2),r=za(t,n,2),r!==null&&($s(n,r,t,e),Je(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>Ee()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=Ke()),e=Zr(e,t),e!==null&&(Je(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ed(e,n)}function rd(e,t){return Ce(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-B(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Ul,a=Ue(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,gd(r,a));r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=Ee(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-B(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Vl,n=Ul,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&L(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&L(r),et(n)){case 2:case 8:n=R;break;case 32:n=ke;break;case 268435456:n=z;break;default:n=ke}return r=hd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&L(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(uu!==0&&uu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ju()&&e.callbackNode!==n)return null;var r=Ul;return r=Ue(e,e===Vl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Su(e,r,t),md(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Ju())return null;Su(e,t,!0)}function _d(){af(function(){Bl&6?Ce(Oe,fd):pd()})}function vd(){if(ld===0){var e=sa;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),ld=e}return ld}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Kt(``+e)}function bd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function xd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=yd((i[H]||null).action),o=r.submitter;o&&(t=(t=o[H]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ld!==0){var e=o?bd(i,o):new FormData(i);Cs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?bd(i,o):new FormData(i),Cs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<Hr.length;Sd++){var Cd=Hr[Sd];Ur(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}Ur(Pr,`onAnimationEnd`),Ur(Fr,`onAnimationIteration`),Ur(Ir,`onAnimationStart`),Ur(`dblclick`,`onDoubleClick`),Ur(`focusin`,`onFocus`),Ur(`focusout`,`onBlur`),Ur(Lr,`onTransitionRun`),Ur(Rr,`onTransitionStart`),Ur(zr,`onTransitionCancel`),Ur(Br,`onTransitionEnd`),_t(`onMouseEnter`,[`mouseout`,`mouseover`]),_t(`onMouseLeave`,[`mouseout`,`mouseover`]),_t(`onPointerEnter`,[`pointerout`,`pointerover`]),_t(`onPointerLeave`,[`pointerout`,`pointerover`]),gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var wd=`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(` `),Td=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(wd));function Ed(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Wr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Wr(e)}i.currentTarget=null,a=c}}}}function Dd(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(jd(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),jd(n,e,r,t)}var kd=`_reactListening`+Math.random().toString(36).slice(2);function Ad(e){if(!e[kd]){e[kd]=!0,mt.forEach(function(t){t!==`selectionchange`&&(Td.has(t)||Od(t,!1,e),Od(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kd]||(t[kd]=!0,Od(`selectionchange`,!1,t))}}function jd(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!rn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Md(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=lt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}en(function(){var r=a,i=Yt(n),s=[];a:{var c=Vr.get(e);if(c!==void 0){var l=hn,u=e;switch(e){case`keypress`:if(un(n)===0)break a;case`keydown`:case`keyup`:l=Nn;break;case`focusin`:u=`focus`,l=wn;break;case`focusout`:u=`blur`,l=wn;break;case`beforeblur`:case`afterblur`:l=wn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Sn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Cn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Fn;break;case Pr:case Fr:case Ir:l=Tn;break;case Br:l=In;break;case`scroll`:case`scrollend`:l=_n;break;case`wheel`:l=Ln;break;case`copy`:case`cut`:case`paste`:l=En;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Pn;break;case`toggle`:case`beforetoggle`:l=Rn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=tn(m,p),g!=null&&d.push(Nd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Jt&&(u=n.relatedTarget||n.fromElement)&&(lt(u)||u[it]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?lt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Sn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Pn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:dt(l),h=u==null?c:dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,lt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Fd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Id(s,c,l,d,!1),u!==null&&f!==null&&Id(s,f,u,d,!0)}}a:{if(c=r?dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ir;else if(Qn(c))if(ar)v=mr;else{v=fr;var y=dr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ut(r.elementType)&&(v=ir):v=pr;if(v&&=v(e,r)){$n(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ft(c,`number`,c.value)}switch(y=r?dt(r):window,e){case`focusin`:(Qn(y)||y.contentEditable===`true`)&&(wr=y,Tr=r,Er=null);break;case`focusout`:Er=Tr=wr=null;break;case`mousedown`:Dr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Dr=!1,Or(s,n,i);break;case`selectionchange`:if(Cr)break;case`keydown`:case`keyup`:Or(s,n,i)}var b;if(Bn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Jn?Kn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Un&&n.locale!==`ko`&&(Jn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Jn&&(b=ln()):(on=i,sn=`value`in on?on.value:on.textContent,Jn=!0)),y=Pd(r,x),0<y.length&&(x=new Dn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=qn(n),b!==null&&(x.data=b)))),(b=Hn?Yn(e,n):Xn(e,n))&&(x=Pd(r,`onBeforeInput`),0<x.length&&(y=new Dn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),xd(s,e,r,n,i)}Ed(s,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=tn(e,n),i!=null&&r.unshift(Nd(e,i,a)),i=tn(e,t),i!=null&&r.push(Nd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Fd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Id(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=tn(n,a),l!=null&&o.unshift(Nd(n,l,c))):i||(l=tn(n,a),l!=null&&o.push(Nd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ld=/\r\n?/g,Rd=/\u0000|\uFFFD/g;function zd(e){return(typeof e==`string`?e:``+e).replace(Ld,`
|
|
9
|
-
`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Wt.get(n)||n,St(e,n,r))}}function Hd(e,t,n,r,a,o){switch(n){case`style`:Ht(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&zt(e,``+r);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[H]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):St(e,n,r)}}}function Ud(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Dd(`error`,e),Dd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,o,s,n,null)}}a&&Vd(e,t,`srcSet`,n.srcSet,n,null),r&&Vd(e,t,`src`,n.src,n,null);return;case`input`:Dd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Vd(e,t,r,d,n,null)}}Pt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Dd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Vd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&It(e,!!r,n,!0):It(e,!!r,t,!1);return;case`textarea`:for(s in Dd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Vd(e,t,s,c,n,null)}Rt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Vd(e,t,l,r,n,null)}return;case`dialog`:Dd(`beforetoggle`,e),Dd(`toggle`,e),Dd(`cancel`,e),Dd(`close`,e);break;case`iframe`:case`object`:Dd(`load`,e);break;case`video`:case`audio`:for(r=0;r<wd.length;r++)Dd(wd[r],e);break;case`image`:Dd(`error`,e),Dd(`load`,e);break;case`details`:Dd(`toggle`,e);break;case`embed`:case`source`:case`link`:Dd(`error`,e),Dd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Vd(e,t,u,r,n,null)}return;default:if(Ut(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Hd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Vd(e,t,c,r,n,null))}function Wd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Vd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Vd(e,t,p,m,r,f)}}Nt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Vd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Vd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?It(e,!!n,n?[]:``,!1):It(e,!!n,t,!0)):It(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Vd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Vd(e,t,s,a,r,o)}Lt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Vd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Vd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Vd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Vd(e,t,u,p,r,m)}return;default:if(Ut(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Hd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Hd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Vd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Vd(e,t,f,p,r,m)}function Gd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Kd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Gd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var qd=null,Jd=null;function Yd(e){return e.nodeType===9?e:e.ownerDocument}function Xd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Zd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $d=null;function ef(){var e=window.event;return e&&e.type===`popstate`?e===$d?!1:($d=e,!0):($d=null,!1)}var tf=typeof setTimeout==`function`?setTimeout:void 0,nf=typeof clearTimeout==`function`?clearTimeout:void 0,rf=typeof Promise==`function`?Promise:void 0,af=typeof queueMicrotask==`function`?queueMicrotask:rf===void 0?tf:function(e){return rf.resolve(null).then(e).catch(of)};function of(e){setTimeout(function(){throw e})}function sf(e){return e===`head`}function cf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[W]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sf(e.ownerDocument.body);n=i}while(n);Hp(t)}function lf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function uf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:uf(n),ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function df(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[W])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=_f(e.nextSibling),e===null)break}return null}function ff(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_f(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_f(e.nextSibling),e===null))return null;return e}function mf(e){return e.data===`$?`||e.data===`$~`}function hf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function _f(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var vf=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _f(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function xf(e,t,n){switch(t=Yd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Sf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ct(e)}var Cf=new Map,wf=new Set;function Tf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ef=F.d;F.d={f:Df,r:Of,D:jf,C:Mf,L:Nf,m:Pf,X:If,S:Ff,M:Lf};function Df(){var e=Ef.f(),t=Eu();return e||t}function Of(e){var t=ut(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):Ef.r(e)}var kf=typeof document>`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=le.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Yf=null;function Xf(e,t,n){if(Yf===null){var r=new Map,i=Yf=new Map;i.set(n,r)}else i=Yf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[W]||a[V]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Zf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*Kd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function cp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ni(3,null,null,t),e.current=a,a.stateNode=e,t=ra(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ia(a),e}function up(e){return e?(e=ei,e):ei}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=za(e,r,t),n!==null&&(xu(n,e,t),Ba(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&xu(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=yu();t=$e(t);var n=Zr(e,t);n!==null&&xu(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,yp(e,t,n,r)}finally{F.p=a,P.T=i}}function vp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,yp(e,t,n,r)}finally{F.p=a,P.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Md(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=ut(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-B(o);s.entanglements[1]|=c,o&=~c}ud(a),!(Bl&6)&&(su=Ee()+500,dd(0,!1))}}break;case 31:case 13:s=Zr(a,2),s!==null&&xu(s,a,2),Eu(),pp(a,2)}if(a=bp(r),a===null&&Md(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Md(e,t,r,null,n)}}function bp(e){return e=Yt(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=lt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){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(De()){case Oe:return 2;case R:return 8;case ke:case Ae:return 32;case z:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`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 Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ut(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=lt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,nt(e.priority,function(){hp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){hp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jt=r,n.target.dispatchEvent(r),Jt=null}else return t=ut(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sp(r||n)===null)continue;break}var a=ut(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[H]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[H]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,yu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Eu(),t[it]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.7`)throw Error(i(527,Kp,`19.2.7`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Ne=Jp.inject(qp),Pe=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[it]=t.current,Ad(e),new Wp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()}))(),b=u(p(),1),x=u(_(),1);function S(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var C=e=>{switch(e){case`success`:return E;case`info`:return O;case`warning`:return D;case`error`:return k;default:return null}},w=Array(12).fill(0),T=({visible:e,className:t})=>b.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},b.createElement(`div`,{className:`sonner-spinner`},w.map((e,t)=>b.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),E=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},b.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),D=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},b.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),O=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},b.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),k=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},b.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),A=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},b.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),b.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),j=()=>{let[e,t]=b.useState(document.hidden);return b.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},M=1,N=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:M++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],b.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(te(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||M++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ee=(e,t)=>{let n=t?.id||M++;return N.addToast({title:e,...t,id:n}),n},te=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,P=Object.assign(ee,{success:N.success,info:N.info,warning:N.warning,error:N.error,custom:N.custom,message:N.message,promise:N.promise,dismiss:N.dismiss,loading:N.loading},{getHistory:()=>N.toasts,getToasts:()=>N.getActiveToasts()});S(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function F(e){return e.label!==void 0}var ne=3,re=`24px`,ie=`16px`,ae=4e3,oe=356,I=14,se=45,ce=200;function le(...e){return e.filter(Boolean).join(` `)}function ue(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var de=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:x,gap:S,expandByDefault:w,classNames:E,icons:D,closeButtonAriaLabel:O=`Close toast`}=e,[k,M]=b.useState(null),[N,ee]=b.useState(null),[te,P]=b.useState(!1),[ne,re]=b.useState(!1),[ie,oe]=b.useState(!1),[I,de]=b.useState(!1),[fe,pe]=b.useState(!1),[me,he]=b.useState(0),[ge,_e]=b.useState(0),ve=b.useRef(n.duration||y||ae),ye=b.useRef(null),be=b.useRef(null),xe=c===0,Se=c+1<=o,Ce=n.type,L=n.dismissible!==!1,we=n.className||``,Te=n.descriptionClassName||``,Ee=b.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),De=b.useMemo(()=>n.closeButton??p,[n.closeButton,p]),Oe=b.useMemo(()=>n.duration||y||ae,[n.duration,y]),R=b.useRef(0),ke=b.useRef(0),Ae=b.useRef(0),z=b.useRef(null),[je,Me]=x.split(`-`),Ne=b.useMemo(()=>s.reduce((e,t,n)=>n>=Ee?e:e+t.height,0),[s,Ee]),Pe=j(),Fe=n.invert||t,B=Ce===`loading`;ke.current=b.useMemo(()=>Ee*S+Ne,[Ee,Ne]),b.useEffect(()=>{ve.current=Oe},[Oe]),b.useEffect(()=>{P(!0)},[]),b.useEffect(()=>{let e=be.current;if(e){let t=e.getBoundingClientRect().height;return _e(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),b.useLayoutEffect(()=>{if(!te)return;let e=be.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,_e(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[te,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ie=b.useCallback(()=>{re(!0),he(ke.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},ce)},[n,d,a,ke]);b.useEffect(()=>{if(n.promise&&Ce===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Pe?(()=>{if(Ae.current<R.current){let e=new Date().getTime()-R.current;ve.current-=e}Ae.current=new Date().getTime()})():ve.current!==1/0&&(R.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ie()},ve.current)),()=>clearTimeout(e)},[u,i,n,Ce,Pe,Ie]),b.useEffect(()=>{n.delete&&(Ie(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ie,n.delete]);function Le(){return D?.loading?b.createElement(`div`,{className:le(E?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":Ce===`loading`},D.loading):b.createElement(T,{className:le(E?.loader,n?.classNames?.loader),visible:Ce===`loading`})}let Re=n.icon||D?.[Ce]||C(Ce);return b.createElement(`li`,{tabIndex:0,ref:be,className:le(_,we,E?.toast,n?.classNames?.toast,E?.default,E?.[Ce],n?.classNames?.[Ce]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":te,"data-promise":!!n.promise,"data-swiped":fe,"data-removed":ne,"data-visible":Se,"data-y-position":je,"data-x-position":Me,"data-index":c,"data-front":xe,"data-swiping":ie,"data-dismissible":L,"data-type":Ce,"data-invert":Fe,"data-swipe-out":I,"data-swipe-direction":N,"data-expanded":!!(u||w&&te),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${ne?me:ke.current}px`,"--initial-height":w?`auto`:`${ge}px`,...m,...n.style},onDragEnd:()=>{oe(!1),M(null),z.current=null},onPointerDown:e=>{e.button!==2&&(B||!L||(ye.current=new Date,he(ke.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(oe(!0),z.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(I||!L)return;z.current=null;let e=Number(be.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(be.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ye.current?.getTime(),i=k===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=se||a>.11){he(ke.current),n.onDismiss==null||n.onDismiss.call(n,n),ee(k===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ie(),de(!0);return}else{var o,s;(o=be.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=be.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}pe(!1),oe(!1),M(null)},onPointerMove:t=>{var n,r;if(!z.current||!L||window.getSelection()?.toString().length>0)return;let i=t.clientY-z.current.y,a=t.clientX-z.current.x,o=e.swipeDirections??ue(x);!k&&(Math.abs(a)>1||Math.abs(i)>1)&&M(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(k===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(k===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&pe(!0),(n=be.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=be.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},De&&!n.jsx&&Ce!==`loading`?b.createElement(`button`,{"aria-label":O,"data-disabled":B,"data-close-button":!0,onClick:B||!L?()=>{}:()=>{Ie(),n.onDismiss==null||n.onDismiss.call(n,n)},className:le(E?.closeButton,n?.classNames?.closeButton)},D?.close??A):null,(Ce||n.icon||n.promise)&&n.icon!==null&&(D?.[Ce]!==null||n.icon)?b.createElement(`div`,{"data-icon":``,className:le(E?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Le():null,n.type===`loading`?null:Re):null,b.createElement(`div`,{"data-content":``,className:le(E?.content,n?.classNames?.content)},b.createElement(`div`,{"data-title":``,className:le(E?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?b.createElement(`div`,{"data-description":``,className:le(v,Te,E?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),b.isValidElement(n.cancel)?n.cancel:n.cancel&&F(n.cancel)?b.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{F(n.cancel)&&L&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ie())},className:le(E?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,b.isValidElement(n.action)?n.action:n.action&&F(n.action)?b.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{F(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Ie())},className:le(E?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function fe(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function pe(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ie:re;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var me=b.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=ne,toastOptions:g,dir:_=fe(),gap:v=I,icons:y,containerAriaLabel:S=`Notifications`}=e,[C,w]=b.useState([]),T=b.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=b.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=b.useState([]),[k,A]=b.useState(!1),[j,M]=b.useState(!1),[ee,te]=b.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=b.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),re=b.useRef(null),ie=b.useRef(!1),ae=b.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||N.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return b.useEffect(()=>N.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{x.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),b.useEffect(()=>{if(d!==`system`){te(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?te(`dark`):te(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{te(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{te(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),b.useEffect(()=>{C.length<=1&&A(!1)},[C]),b.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),b.useEffect(()=>{if(P.current)return()=>{re.current&&(re.current.focus({preventScroll:!0}),re.current=null,ie.current=!1)}},[P.current]),b.createElement(`section`,{ref:t,"aria-label":`${S} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?b.createElement(`ol`,{key:t,dir:_===`auto`?fe():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ee,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${oe}px`,"--gap":`${v}px`,...m,...pe(l,u)},onBlur:e=>{ie.current&&!e.currentTarget.contains(e.relatedTarget)&&(ie.current=!1,re.current&&=(re.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ie.current||(ie.current=!0,re.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>b.createElement(de,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:j,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ae,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:v,expanded:k,swipeDirections:e.swipeDirections}))):null}))}),he=class extends Error{status;constructor(e,t){super(t),this.status=e}};async function ge(e,t){let n=await fetch(e,{...t,headers:{"Content-Type":`application/json`,"X-Simplex-UI":`1`,...t?.headers}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new he(n.status,r.error??`HTTP ${n.status}`);return{body:r,response:n}}async function _e(e,t){return(await ge(e,t)).body}var ve={get:e=>_e(e),getWithMeta:e=>ge(e),post:(e,t)=>_e(e,{method:`POST`,body:JSON.stringify(t??{})}),put:(e,t)=>_e(e,{method:`PUT`,body:JSON.stringify(t)}),del:(e,t)=>_e(e,{method:`DELETE`,body:t===void 0?void 0:JSON.stringify(t)})},ye={overview:`/`,"limit-orders":`/limit-orders`,orders:`/orders`,wallet:`/wallet`,logs:`/logs`,operations:`/operations`};function be(e){let t=e.replace(/\/+$/,``)||`/`;return Object.entries(ye).find(([,e])=>e===t)?.[0]??`overview`}function xe(){let[e,t]=(0,b.useState)(()=>be(window.location.pathname));return(0,b.useEffect)(()=>{let e=()=>t(be(window.location.pathname));return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),[e,(0,b.useCallback)((e,n)=>{if(window.location.pathname!==ye[e]){let t=ye[e]+window.location.search;n?.replace?window.history.replaceState(null,``,t):window.history.pushState(null,``,t)}t(e)},[])]}var Se=``+new URL(`hyperfx-logo-DglLKgC2.webp`,import.meta.url).href,Ce=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),L=s(((e,t)=>{t.exports=Ce()}))();function we(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,...e,children:[(0,L.jsx)(`path`,{d:`M4 4v16h16`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,L.jsx)(`path`,{d:`m7 15 3.5-4 3 2.25L19 7`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Te(e){return(0,L.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,...e,children:(0,L.jsx)(`path`,{d:`m4.5 10 3.25 3.25L15.5 5.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ee(e){return(0,L.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,...e,children:(0,L.jsx)(`path`,{d:`m5 7.5 5 5 5-5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function De(e){return(0,L.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,...e,children:(0,L.jsx)(`path`,{d:`m5.5 5.5 9 9m0-9-9 9`,strokeLinecap:`round`})})}function Oe(e){return(0,L.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:(0,L.jsx)(`path`,{d:`M10 3v9m0 0 3.25-3.25M10 12 6.75 8.75M4 15.5v1h12v-1`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function R(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`rect`,{x:`6.5`,y:`6.5`,width:`9`,height:`9`,rx:`1.5`}),(0,L.jsx)(`path`,{d:`M13.5 6.5v-2A1.5 1.5 0 0 0 12 3H4.5A1.5 1.5 0 0 0 3 4.5V12A1.5 1.5 0 0 0 4.5 13.5h2`})]})}function ke(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`path`,{d:`M8 5H5.5A1.5 1.5 0 0 0 4 6.5v8A1.5 1.5 0 0 0 5.5 16h8a1.5 1.5 0 0 0 1.5-1.5V12`}),(0,L.jsx)(`path`,{d:`M11 4h5v5M16 4l-7 7`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Ae(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`rect`,{x:`3`,y:`3`,width:`5.5`,height:`5.5`,rx:`1.2`}),(0,L.jsx)(`rect`,{x:`11.5`,y:`3`,width:`5.5`,height:`5.5`,rx:`1.2`}),(0,L.jsx)(`rect`,{x:`3`,y:`11.5`,width:`5.5`,height:`5.5`,rx:`1.2`}),(0,L.jsx)(`rect`,{x:`11.5`,y:`11.5`,width:`5.5`,height:`5.5`,rx:`1.2`})]})}function z(e){return(0,L.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:(0,L.jsx)(`path`,{d:`M2.5 10h3l2-5 4.2 10 2.1-5H17.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function je(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`path`,{d:`M3 5.5A2.5 2.5 0 0 1 5.5 3h9A1.5 1.5 0 0 1 16 4.5v11A1.5 1.5 0 0 1 14.5 17h-9A2.5 2.5 0 0 1 3 14.5v-9Z`}),(0,L.jsx)(`path`,{d:`M13 8h4v4h-4a2 2 0 1 1 0-4Z`})]})}function Me(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`path`,{d:`M4 4v12M10 4v12M16 4v12`,strokeLinecap:`round`}),(0,L.jsx)(`circle`,{cx:`4`,cy:`7`,r:`1.8`,fill:`currentColor`,stroke:`none`}),(0,L.jsx)(`circle`,{cx:`10`,cy:`13`,r:`1.8`,fill:`currentColor`,stroke:`none`}),(0,L.jsx)(`circle`,{cx:`16`,cy:`9`,r:`1.8`,fill:`currentColor`,stroke:`none`})]})}function Ne(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`rect`,{x:`2.5`,y:`3.5`,width:`15`,height:`13`,rx:`2`}),(0,L.jsx)(`path`,{d:`M5.5 8.25 7.75 10.5 5.5 12.75M10 12.75h4.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Pe(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,...e,children:[(0,L.jsx)(`circle`,{cx:`10`,cy:`10`,r:`2.5`}),(0,L.jsx)(`path`,{d:`M16.2 11.5a6.6 6.6 0 0 0 0-3l1.3-1-1.5-2.6-1.6.7A6.4 6.4 0 0 0 12 4.2L11.8 2H8.2L8 4.2a6.4 6.4 0 0 0-2.4 1.4L4 4.9 2.5 7.5l1.3 1a6.6 6.6 0 0 0 0 3l-1.3 1L4 15.1l1.6-.7A6.4 6.4 0 0 0 8 15.8l.2 2.2h3.6l.2-2.2a6.4 6.4 0 0 0 2.4-1.4l1.6.7 1.5-2.6-1.3-1Z`,strokeLinejoin:`round`})]})}function Fe(e){return(0,L.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,...e,children:(0,L.jsx)(`path`,{d:`m7.5 5 5 5-5 5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function B(e){let{value:t,chars:n=10,copyLabel:r=`Copy value`,children:i}=e,[a,o]=(0,b.useState)(!1);return(0,L.jsxs)(`span`,{className:`copy-value`,children:[(0,L.jsx)(`span`,{className:`copy-value-text mono`,title:t,children:i??(t.length>n?`${t.slice(0,n)}…`:t)}),(0,L.jsx)(`button`,{type:`button`,className:`copy-value-button`,"aria-label":a?`Copied`:r,title:a?`Copied`:r,onClick:()=>{navigator.clipboard.writeText(t).then(()=>{o(!0),window.setTimeout(()=>o(!1),1200)}).catch(()=>o(!1))},children:a?(0,L.jsx)(Te,{"aria-hidden":`true`}):(0,L.jsx)(R,{"aria-hidden":`true`})})]})}var Ie=Object.defineProperty,Le=(e,t)=>Ie(e,`name`,{value:t,configurable:!0}),Re=!!(typeof window<`u`&&window.document&&window.document.createElement);function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return Le(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Le(ze,`composeEventHandlers`);function Be(e){if(!Re)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Le(Be,`getOwnerWindow`);function Ve(e){if(!Re)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Le(Ve,`getOwnerDocument`);function He(e,t=!1){let{activeElement:n}=Ve(e);if(!n?.nodeName)return null;if(Ue(n)&&n.contentDocument)return He(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ve(n).getElementById(e);if(t)return t}}return n}Le(He,`getActiveElement`);function Ue(e){return e.tagName===`IFRAME`}Le(Ue,`isFrame`);var We=Object.defineProperty,Ge=(e,t)=>We(e,`name`,{value:t,configurable:!0});function Ke(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ge(Ke,`setRef`);function qe(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ke(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ke(e[t],null)}}}}Ge(qe,`composeRefs`);function Je(...e){return b.useCallback(qe(...e),e)}Ge(Je,`useComposedRefs`);var Ye=Object.defineProperty,Xe=(e,t)=>Ye(e,`name`,{value:t,configurable:!0});function Ze(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=Xe(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=b.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Xe(i,`useContext`),[r,i]}Xe(Ze,`createContext`);function Qe(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Xe(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Xe(s,`useContext`),[o,s]}Xe(r,`createContext`);let i=Xe(()=>{let t=n.map(e=>b.createContext(e));return Xe(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,$e(i,...t)]}Xe(Qe,`createContextScope`);function $e(...e){let t=e[0];if(e.length===1)return t;let n=Xe(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Xe(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Xe($e,`composeContextScopes`);var et=globalThis?.document?b.useLayoutEffect:()=>{},tt=Object.defineProperty,nt=(e,t)=>tt(e,`name`,{value:t,configurable:!0}),rt=b.useId||(()=>void 0),V=0;function H(e){let[t,n]=b.useState(rt());return et(()=>{e||n(e=>e??String(V++))},[e]),e||(t?`radix-${t}`:``)}nt(H,`useId`);var it=Object.defineProperty,at=(e,t)=>it(e,`name`,{value:t,configurable:!0}),ot=b.useEffectEvent,st=b.useInsertionEffect;function U(e){if(typeof ot==`function`)return ot(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof st==`function`?st(()=>{t.current=e}):et(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}at(U,`useEffectEvent`);var W=Object.defineProperty,ct=(e,t)=>W(e,`name`,{value:t,configurable:!0}),lt=b.useInsertionEffect||et;function ut({prop:e,defaultProp:t,onChange:n=ct(()=>{},`onChange`),caller:r}){let[i,a,o]=dt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=ft(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}ct(ut,`useControllableState`);function dt({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return lt(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}ct(dt,`useUncontrolledState`);function ft(e){return typeof e==`function`}ct(ft,`isFunction`);var pt=Symbol(`RADIX:SYNC_STATE`);function mt(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=U(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===pt)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:pt,state:i})},[i,d.state,c]),[h,f]}ct(mt,`useControllableStateReducer`);var ht=Object.defineProperty,gt=(e,t)=>ht(e,`name`,{value:t,configurable:!0});function _t(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Et(r)&&typeof At==`function`&&(r=At(r._payload)),b.Children.forEach(r,e=>{if(wt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Et(n)&&typeof At==`function`&&(n=At(n._payload)),a=xt(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=b.cloneElement(a,void 0,s):!o&&b.Children.count(r)===1&&b.isValidElement(r)&&(a=r);let c=a?Ct(a):void 0,l=Je(n,c);if(!a){if(r||r===0)throw Error(o?kt(e):Ot(e));return r}let u=St(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}gt(_t,`createSlot`);var vt=_t(`Slot`),yt=Symbol.for(`radix.slottable`);function bt(e){let t=gt(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=yt,t}gt(bt,`createSlottable`);var xt=gt((e,t)=>{if(`child`in e.props){let t=e.props.child;return b.isValidElement(t)?b.cloneElement(t,void 0,e.props.children(t.props.children)):null}return b.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function St(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}gt(St,`mergeProps`);function Ct(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}gt(Ct,`getElementRef`);function wt(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===yt}gt(wt,`isSlottable`);var Tt=Symbol.for(`react.lazy`);function Et(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Tt&&`_payload`in e&&Dt(e._payload)}gt(Et,`isLazyComponent`);function Dt(e){return typeof e==`object`&&!!e&&`then`in e}gt(Dt,`isPromiseLike`);var Ot=gt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),kt=gt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),At=b.use,jt=Object.defineProperty,Mt=(e,t)=>jt(e,`name`,{value:t,configurable:!0}),Nt=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=_t(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Pt(e,t){e&&x.flushSync(()=>e.dispatchEvent(t))}Mt(Pt,`dispatchDiscreteCustomEvent`);var Ft=Object.defineProperty,It=(e,t)=>Ft(e,`name`,{value:t,configurable:!0});function Lt(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}It(Lt,`useCallbackRef`);var Rt=Object.defineProperty,zt=(e,t)=>Rt(e,`name`,{value:t,configurable:!0}),Bt=`dismissableLayer.update`,Vt=`dismissableLayer.pointerDownOutside`,Ht=`dismissableLayer.focusOutside`,Ut,Wt=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Gt=b.forwardRef(zt(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=b.useContext(Wt),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=Je(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=b.useRef(!1),w=Jt(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Yt(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=Lt(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return b.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ut=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Xt(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Ut))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Xt())},[d,u]),b.useEffect(()=>{let e=zt(()=>m({}),`handleUpdate`);return document.addEventListener(Bt,e),()=>document.removeEventListener(Bt,e)},[]),(0,L.jsx)(Nt.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Kt(){let e=b.useContext(Wt),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}zt(Kt,`useDismissableLayerSurface`);var qt=zt(()=>!0,`IS_TRUE`);function Jt(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=qt}=t,s=Lt(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}zt(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}zt(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}zt(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}zt(p,`handleInteractionBubble`);let m=zt(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Zt(Vt,s,p,{discrete:!0})};if(zt(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:zt(()=>c.current=!0,`onPointerDownCapture`)}}zt(Jt,`usePointerDownOutside`);function Yt(e,t=globalThis?.document){let n=Lt(e),r=b.useRef(!1);return b.useEffect(()=>{let e=zt(e=>{e.target&&!r.current&&Zt(Ht,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:zt(()=>r.current=!0,`onFocusCapture`),onBlurCapture:zt(()=>r.current=!1,`onBlurCapture`)}}zt(Yt,`useFocusOutside`);function Xt(){let e=new CustomEvent(Bt);document.dispatchEvent(e)}zt(Xt,`dispatchUpdate`);function Zt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Pt(i,a):i.dispatchEvent(a)}zt(Zt,`handleAndDispatchCustomEvent`);var Qt=Object.defineProperty,$t=(e,t)=>Qt(e,`name`,{value:t,configurable:!0}),en=`focusScope.autoFocusOnMount`,tn=`focusScope.autoFocusOnUnmount`,nn={bubbles:!1,cancelable:!0},rn=b.forwardRef($t(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=Lt(i),u=Lt(a),d=b.useRef(null),f=Je(t,c),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:dn(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||dn(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&dn(s)};$t(e,`handleFocusIn`),$t(t,`handleFocusOut`),$t(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){fn.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(en,nn);s.addEventListener(en,l),s.dispatchEvent(t),t.defaultPrevented||(an(hn(sn(s)),{select:!0}),document.activeElement===e&&dn(s))}return()=>{s.removeEventListener(en,l),setTimeout(()=>{let t=new CustomEvent(tn,nn);s.addEventListener(tn,u),s.dispatchEvent(t),t.defaultPrevented||dn(e??document.body,{select:!0}),s.removeEventListener(tn,u),fn.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=on(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&dn(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&dn(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(Nt.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function an(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(dn(r,{select:t}),document.activeElement!==n)return}$t(an,`focusFirst`);function on(e){let t=sn(e);return[cn(t,e),cn(t.reverse(),e)]}$t(on,`getTabbableEdges`);function sn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:$t(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}$t(sn,`getTabbableCandidates`);function cn(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ln(r,{upTo:t})))return r}$t(cn,`findVisible`);function ln(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}$t(ln,`isHidden`);function un(e){return e instanceof HTMLInputElement&&`select`in e}$t(un,`isSelectableInput`);function dn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&un(e)&&t&&e.select()}}$t(dn,`focus`);var fn=pn();function pn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=mn(e,t),e.unshift(t)},remove(t){e=mn(e,t),e[0]?.resume()}}}$t(pn,`createFocusScopesStack`);function mn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}$t(mn,`arrayRemove`);function hn(e){return e.filter(e=>e.tagName!==`A`)}$t(hn,`removeLinks`);var gn=Object.defineProperty,_n=b.forwardRef(((e,t)=>gn(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);et(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?x.createPortal((0,L.jsx)(Nt.div,{...r,ref:t}),o):null},`Portal`)),vn=Object.defineProperty,yn=(e,t)=>vn(e,`name`,{value:t,configurable:!0});function bn(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}yn(bn,`useStateMachine`);var xn=yn(e=>{let{present:t,children:n}=e,r=Sn(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=wn(r.ref,En(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function Sn(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=bn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??Tn(r.current),o.current=void 0):a.current=`none`},[s]),et(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Tn(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),et(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=yn(a=>{let o=Tn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=yn(e=>{e.target===t&&(a.current=Tn(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Tn(t)}else r.current=null;n(e)},[])}}yn(Sn,`usePresence`);function Cn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}yn(Cn,`setRef`);function wn(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Cn(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Cn(n[e],null)}}},[])}yn(wn,`useStableComposedRefs`);function Tn(e){return e?.animationName||`none`}yn(Tn,`getAnimationName`);function En(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}yn(En,`getElementRef`);var Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0}),kn=0,An=null;function jn(e){return Mn(),e.children}On(jn,`FocusGuards`);function Mn(){b.useEffect(()=>{An||={start:Nn(),end:Nn()};let{start:e,end:t}=An;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),kn++,()=>{kn===1&&(An?.start.remove(),An?.end.remove(),An=null),kn=Math.max(0,kn-1)}},[])}On(Mn,`useFocusGuards`);function Nn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}On(Nn,`createFocusGuard`);var Pn=function(){return Pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pn.apply(this,arguments)};function Fn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function In(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ln=`right-scroll-bar-position`,Rn=`width-before-scroll-bar`,zn=`with-scroll-bars-hidden`,Bn=`--removed-body-scroll-bar-size`;function Vn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Hn(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Un=typeof window<`u`?b.useLayoutEffect:b.useEffect,Wn=new WeakMap;function Gn(e,t){var n=Hn(t||null,function(t){return e.forEach(function(e){return Vn(e,t)})});return Un(function(){var t=Wn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Vn(e,null)}),i.forEach(function(e){r.has(e)||Vn(e,a)})}Wn.set(n,e)},[e]),n}function Kn(e){return e}function qn(e,t){t===void 0&&(t=Kn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Jn(e){e===void 0&&(e={});var t=qn(null);return t.options=Pn({async:!0,ssr:!1},e),t}var Yn=function(e){var t=e.sideCar,n=Fn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,Pn({},n))};Yn.isSideCarExport=!0;function Xn(e,t){return e.useMedium(t),Yn}var Zn=Jn(),Qn=function(){},$n=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Qn,onWheelCapture:Qn,onTouchMoveCapture:Qn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=Fn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Gn([n,t]),w=Pn(Pn({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:Zn,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),Pn(Pn({},w),{ref:C})):b.createElement(v,Pn({},w,{className:c,ref:C}),s))});$n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$n.classNames={fullWidth:Rn,zeroRight:Ln};var er,tr=function(){if(er)return er;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tr();return t&&e.setAttribute(`nonce`,t),e}function rr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ir(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ar=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nr())&&(rr(t,n),ir(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},or=function(){var e=ar();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sr=function(){var e=or();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},cr={left:0,top:0,right:0,gap:0},lr=function(e){return parseInt(e||``,10)||0},ur=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[lr(n),lr(r),lr(i)]},dr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return cr;var t=ur(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fr=sr(),pr=`data-scroll-locked`,mr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
-
.${zn} {
|
|
11
|
-
overflow: hidden ${r};
|
|
12
|
-
padding-right: ${s}px ${r};
|
|
13
|
-
}
|
|
14
|
-
body[${pr}] {
|
|
15
|
-
overflow: hidden ${r};
|
|
16
|
-
overscroll-behavior: contain;
|
|
17
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
-
padding-left: ${i}px;
|
|
19
|
-
padding-top: ${a}px;
|
|
20
|
-
padding-right: ${o}px;
|
|
21
|
-
margin-left:0;
|
|
22
|
-
margin-top:0;
|
|
23
|
-
margin-right: ${s}px ${r};
|
|
24
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${Ln} {
|
|
28
|
-
right: ${s}px ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${Rn} {
|
|
32
|
-
margin-right: ${s}px ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.${Ln} .${Ln} {
|
|
36
|
-
right: 0 ${r};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.${Rn} .${Rn} {
|
|
40
|
-
margin-right: 0 ${r};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
body[${pr}] {
|
|
44
|
-
${Bn}: ${s}px;
|
|
45
|
-
}
|
|
46
|
-
`},hr=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},gr=function(){b.useEffect(function(){return document.body.setAttribute(pr,(hr()+1).toString()),function(){var e=hr()-1;e<=0?document.body.removeAttribute(pr):document.body.setAttribute(pr,e.toString())}},[])},_r=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;gr();var a=b.useMemo(function(){return dr(i)},[i]);return b.createElement(fr,{styles:mr(a,!t,i,n?``:`!important`)})},vr=!1;if(typeof window<`u`)try{var yr=Object.defineProperty({},"passive",{get:function(){return vr=!0,!0}});window.addEventListener(`test`,yr,yr),window.removeEventListener(`test`,yr,yr)}catch{vr=!1}var br=vr?{passive:!1}:!1,xr=function(e){return e.tagName===`TEXTAREA`},Sr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!xr(e)&&n[t]===`visible`)},Cr=function(e){return Sr(e,`overflowY`)},wr=function(e){return Sr(e,`overflowX`)},Tr=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Or(e,r)){var i=kr(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Er=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Dr=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Or=function(e,t){return e===`v`?Cr(t):wr(t)},kr=function(e,t){return e===`v`?Er(t):Dr(t)},Ar=function(e,t){return e===`h`&&t===`rtl`?-1:1},jr=function(e,t,n,r,i){var a=Ar(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=kr(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Or(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Mr=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nr=function(e){return[e.deltaX,e.deltaY]},Pr=function(e){return e&&`current`in e?e.current:e},Fr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ir=function(e){return`
|
|
47
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
-
`},Lr=0,Rr=[];function zr(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(Lr++)[0],a=b.useState(sr)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=In([e.lockRef.current],(e.shards||[]).map(Pr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Mr(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Tr(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Tr(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return jr(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!Rr.length||Rr[Rr.length-1]!==a)){var r=`deltaY`in n?Nr(n):Mr(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Fr(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Pr).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=b.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Br(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=b.useCallback(function(e){n.current=Mr(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,Nr(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,Mr(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return Rr.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,br),document.addEventListener(`touchmove`,c,br),document.addEventListener(`touchstart`,u,br),function(){Rr=Rr.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,br),document.removeEventListener(`touchmove`,c,br),document.removeEventListener(`touchstart`,u,br)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:Ir(i)}):null,p?b.createElement(_r,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Br(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Vr=Xn(Zn,zr),Hr=b.forwardRef(function(e,t){return b.createElement($n,Pn({},e,{ref:t,sideCar:Vr}))});Hr.classNames=$n.classNames;var Ur=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Wr=new WeakMap,Gr=new WeakMap,Kr={},qr=0,Jr=function(e){return e&&(e.host||Jr(e.parentNode))},Yr=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Jr(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Xr=function(e,t,n,r){var i=Yr(t,Array.isArray(e)?e:[e]);Kr[n]||(Kr[n]=new WeakMap);var a=Kr[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Wr.get(e)||0)+1,l=(a.get(e)||0)+1;Wr.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Gr.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),qr++,function(){o.forEach(function(e){var t=Wr.get(e)-1,i=a.get(e)-1;Wr.set(e,t),a.set(e,i),t||(Gr.has(e)||e.removeAttribute(r),Gr.delete(e)),i||e.removeAttribute(n)}),qr--,qr||(Wr=new WeakMap,Wr=new WeakMap,Gr=new WeakMap,Kr={})}},Zr=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ur(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Xr(r,i,n,`aria-hidden`)):function(){return null}},Qr=Object.defineProperty,$r=(e,t)=>Qr(e,`name`,{value:t,configurable:!0}),ei=`Dialog`,[ti,ni]=Qe(ei),[ri,ii]=ti(ei),ai=$r(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=ut({prop:r,defaultProp:i??!1,onChange:a,caller:ei}),[d,f]=b.useState(0),[p,m]=b.useState(0);return(0,L.jsx)(ri,{scope:t,triggerRef:s,contentRef:c,contentId:H(),titleId:H(),descriptionId:H(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),oi=`DialogPortal`,[si,ci]=ti(oi,{forceMount:void 0}),li=$r(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=ii(oi,t);return(0,L.jsx)(si,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,L.jsx)(xn,{present:n||a.open,children:(0,L.jsx)(_n,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ui=`DialogOverlay`,di=b.forwardRef($r(function(e,t){let n=ci(ui,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ii(ui,e.__scopeDialog);return a.modal?(0,L.jsx)(xn,{present:r||a.open,children:(0,L.jsx)(pi,{...i,ref:t})}):null},`DialogOverlay`)),fi=_t(`DialogOverlay.RemoveScroll`),pi=b.forwardRef($r(function(e,t){let{__scopeDialog:n,...r}=e,i=ii(ui,n),a=Je(t,Kt());return(0,L.jsx)(Hr,{as:fi,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(Nt.div,{"data-state":Ti(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),mi=`DialogContent`,hi=b.forwardRef($r(function(e,t){let n=ci(mi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ii(mi,e.__scopeDialog);return(0,L.jsx)(xn,{present:r||a.open,children:a.modal?(0,L.jsx)(gi,{...i,ref:t}):(0,L.jsx)(_i,{...i,ref:t})})},`DialogContent`)),gi=b.forwardRef($r(function(e,t){let n=ii(mi,e.__scopeDialog),r=b.useRef(null),i=Je(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return Zr(e)},[]),(0,L.jsx)(vi,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:ze(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ze(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:ze(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),_i=b.forwardRef($r(function(e,t){let n=ii(mi,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,L.jsx)(vi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),vi=b.forwardRef($r(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ii(mi,n);return Mn(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Gt,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Ti(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),yi=`DialogTitle`,bi=b.forwardRef($r(function(e,t){let{__scopeDialog:n,...r}=e,i=ii(yi,n),{setTitleCount:a}=i;return et(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Nt.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),xi=`DialogDescription`,Si=b.forwardRef($r(function(e,t){let{__scopeDialog:n,...r}=e,i=ii(xi,n),{setDescriptionCount:a}=i;return et(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Nt.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Ci=`DialogClose`,wi=b.forwardRef($r(function(e,t){let{__scopeDialog:n,...r}=e,i=ii(Ci,n);return(0,L.jsx)(Nt.button,{type:`button`,...r,ref:t,onClick:ze(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Ti(e){return e?`open`:`closed`}$r(Ti,`getState`);function Ei(){let[e,t]=(0,b.useState)(),[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(()=>new Set),o=(0,b.useRef)(new Set);return{run:(0,b.useCallback)(async(e,n,i=`default`)=>{if(!o.current.has(i)){o.current.add(i),a(new Set(o.current)),t(void 0),r(void 0);try{await e(),n&&t(n)}catch(e){r(e instanceof Error?e.message:String(e))}finally{o.current.delete(i),a(new Set(o.current))}}},[]),pending:i.size>0,isPending:(e=`default`)=>i.has(e),message:e,error:n}}function Di(e,t){(0,b.useEffect)(()=>{if(e(),!t)return;let n=setInterval(()=>void e(),t);return()=>clearInterval(n)},[e,t])}var Oi=`(max-width: 600px)`,ki=`(max-width: 600px), (pointer: coarse) and (max-height: 600px)`;function Ai(e){return(0,b.useSyncExternalStore)((0,b.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),(0,b.useCallback)(()=>window.matchMedia(e).matches,[e]),()=>!1)}function ji(){return Ai(Oi)}function Mi(){return Ai(ki)}function Ni(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Pi=Ni(`https://base-ui.com/production-error`,`Base UI`),Fi=b.createContext(void 0);function Ii(e){let t=b.useContext(Fi);if(!e&&t===void 0)throw Error(Pi(27));return t}var Li={};function Ri(e,t){let n=b.useRef(Li);return n.current===Li&&(n.current=e(t)),n}function zi(e,t,n,r){let i=Ri(Vi).current;return Hi(i,e,t,n,r)&&Wi(i,[e,t,n,r]),i.callback}function Bi(e){let t=Ri(Vi).current;return Ui(t,e)&&Wi(t,e),t.callback}function Vi(){return{callback:null,cleanup:null,refs:[]}}function Hi(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Ui(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Wi(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var Gi=19;function Ki(e){return Gi>=e}function qi(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(Ki(19)?n?.ref:t.ref)??null}function Ji(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Yi(){}var Xi=Object.freeze([]),Zi=Object.freeze({});function Qi(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function $i(e,t){return typeof e==`function`?e(t):e}function ea(e,t){return typeof e==`function`?e(t):e}var ta={};function na(e,t,n,r,i){if(!n&&!r&&!i&&!e)return ia(t);let a=ia(e);return t&&(a=aa(a,t)),n&&(a=aa(a,n)),r&&(a=aa(a,r)),i&&(a=aa(a,i)),a}function ra(e){if(e.length===0)return ta;if(e.length===1)return ia(e[0]);let t=ia(e[0]);for(let n=1;n<e.length;n+=1)t=aa(t,e[n]);return t}function ia(e){return la(e)?{...ua(e,ta)}:oa(e)}function aa(e,t){return la(t)?ua(t,e):sa(e,t)}function oa(e){let t={...e};for(let e in t){let n=t[e];ca(e,n)&&(t[e]=fa(n))}return t}function sa(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Ji(e.style,r);break;case`className`:e[n]=ma(e.className,r);break;default:ca(n,r)?e[n]=da(e[n],r):e[n]=r}}return e}function ca(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function la(e){return typeof e==`function`}function ua(e,t){return la(e)?e(t):e??ta}function da(e,t){return t?e?(...n)=>{let r=n[0];if(ha(r)){let i=r;pa(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:fa(t):e}function fa(e){return e&&((...t)=>{let n=t[0];return ha(n)&&pa(n),e(...t)})}function pa(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ma(e,t){return t?e?t+` `+e:t:e}function ha(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function ga(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=ba(r));let i=_a(t,n,r);if(n.enabled===!1)return null;let a=n.state??Zi;return xa(e,r,i,a)}function _a(e,t,n){let{className:r,style:i}=e,{state:a=Zi,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?$i(r,a):void 0,d=l?ea(i,a):void 0,f=l?Qi(a,c):Zi,p=l&&s?va(s):void 0,m=l?Ji(f,p)??{}:Zi;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Bi([m.ref,qi(n),...o]):m.ref=zi(m.ref,qi(n),o):zi(null,null)),l?(u!==void 0&&(m.className=ma(m.className,u)),d!==void 0&&(m.style=Ji(m.style,d)),m):Zi}function va(e){return Array.isArray(e)?ra(e):na(void 0,e)}var ya=Symbol.for(`react.lazy`);function ba(e){if(e?.$$typeof!==ya)return e;let t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function xa(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=na(n,t.props);return e.ref=n.ref,b.cloneElement(t,e)}if(e&&typeof e==`string`)return Sa(e,n);throw Error(Pi(8))}function Sa(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var Ca=`data-starting-style`,wa=`data-ending-style`,Ta={[Ca]:``},Ea={[wa]:``},Da={transitionStatus(e){return e===`starting`?Ta:e===`ending`?Ea:null}},Oa=`data-open`,ka=`data-closed`,Aa=`data-anchor-hidden`,ja={[Oa]:``},Ma={[ka]:``},Na={[Aa]:``},Pa={open(e){return e?ja:Ma},anchorHidden(e){return e?Na:null}},Fa={...Pa,...Da},Ia=`--nested-drawers`,La=`--drawer-height`,Ra=`--drawer-frontmost-height`,za=`--drawer-swipe-movement-x`,Ba=`--drawer-swipe-movement-y`,Va=`--drawer-snap-point-offset`,Ha=`--drawer-swipe-strength`,Ua=`--drawer-swipe-progress`,Wa=b.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Ii(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return ga(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Fa,props:[{role:`presentation`,hidden:!u,style:{pointerEvents:c?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[Ua]:`0`,[Ha]:`1`}},o],enabled:a||!l})});function Ga(){return typeof window<`u`}function Ka(e){return Ya(e)?(e.nodeName||``).toLowerCase():`#document`}function qa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ja(e){return((Ya(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ya(e){return Ga()?e instanceof Node||e instanceof qa(e).Node:!1}function Xa(e){return Ga()?e instanceof Element||e instanceof qa(e).Element:!1}function Za(e){return Ga()?e instanceof HTMLElement||e instanceof qa(e).HTMLElement:!1}function Qa(e){return!Ga()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof qa(e).ShadowRoot}function $a(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function eo(e){return/^(table|td|th)$/.test(Ka(e))}function to(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var no=/transform|translate|scale|rotate|perspective|filter/,ro=/paint|layout|strict|content/,io=e=>!!e&&e!==`none`,ao;function oo(e){let t=Xa(e)?uo(e):e;return io(t.transform)||io(t.translate)||io(t.scale)||io(t.rotate)||io(t.perspective)||!co()&&(io(t.backdropFilter)||io(t.filter))||no.test(t.willChange||``)||ro.test(t.contain||``)}function so(e){let t=po(e);for(;Za(t)&&!lo(t);){if(oo(t))return t;if(to(t))return null;t=po(t)}return null}function co(){return ao??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ao}function lo(e){return/^(html|body|#document)$/.test(Ka(e))}function uo(e){return qa(e).getComputedStyle(e)}function fo(e){return Xa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function po(e){if(Ka(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Qa(e)&&e.host||Ja(e);return Qa(t)?t.host:t}function mo(e){let t=po(e);return lo(t)?(e.ownerDocument||e).body:Za(t)&&$a(t)?t:mo(t)}function ho(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=mo(e),i=r===e.ownerDocument?.body,a=qa(r);if(i){let e=go(a);return t.concat(a,a.visualViewport||[],$a(r)?r:[],e&&n?ho(e):[])}else return t.concat(r,ho(r,[],n))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var _o={...b},vo=_o.useInsertionEffect,yo=vo&&vo!==_o.useLayoutEffect?vo:e=>e();function bo(e){let t=Ri(xo).current;return t.next=e,yo(t.effect),t.trampoline}function xo(){let e={next:void 0,callback:So,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function So(){}var Co=typeof document<`u`?b.useLayoutEffect:()=>{},wo=b.createContext(void 0);function To(e=!1){let t=b.useContext(wo);if(t===void 0&&!e)throw Error(Pi(16));return t}function Eo(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Do(e){return e?.ownerDocument||document}function Oo(e,t,{detail:n=0}={}){e.dispatchEvent(new(qa(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function ko(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=To(!0),c=a??s!==void 0,{props:l}=Eo({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;Ao(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Co(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return na({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(pa(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Ao(r),s=!i&&jo(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Oo(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Oo(r,e)))},onKeyUp(e){if(!t){if(pa(e),a?.(e),e.target===e.currentTarget&&i&&c&&Ao(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),Oo(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:bo(e=>{o.current=e,u()})}}function Ao(e){return Za(e)&&e.tagName===`BUTTON`}function jo(e){return Za(e)&&e.tagName===`A`&&!!e.href}var Mo=`none`,No=`trigger-press`,Po=`outside-press`,Fo=`close-press`,Io=`focus-out`,Lo=`escape-key`,Ro=`close-watcher`,zo=`imperative-action`,Bo=`swipe`;function Vo(e,t,n,r){let i=!1,a=!1,o=r??Zi;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Ho=b.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Ii(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=ko({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Vo(Fo,e.nativeEvent))}return ga(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Uo=`data-drawer-content`,Wo=b.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Ii(),ga(`div`,e,{ref:t,props:[{[Uo]:``},a]})}),Go=0;function Ko(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(Go+=1,r(`${t}-${Go}`))},[n,t]),i}var qo=_o.useId;function Jo(e,t){if(qo!==void 0){let n=qo();return e??(t?`${t}-${n}`:n)}return Ko(e,t)}function Yo(e){return Jo(e,`base-ui`)}var Xo=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Ii(),c=Yo(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),ga(`p`,e,{ref:t,props:[{id:c},o]})}),Zo=b.createContext(void 0);function Qo(){return b.useContext(Zo)}function $o(e){b.useEffect(e,Xi)}var es=0,ts=class e{static create(){return new e}currentId=es;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=es,t()},e)}isStarted(){return this.currentId!==es}clear=()=>{this.currentId!==es&&(clearTimeout(this.currentId),this.currentId=es)};disposeEffect=()=>this.clear};function ns(){let e=Ri(ts.create).current;return $o(e.disposeEffect),e}function rs(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:is,platform:as,maxTouchPoints:os}=rs(),ss=is.toLowerCase(),cs=as.toLowerCase(),ls=/^i(os$|p)/.test(cs)||cs===`macintel`&&os>1,us=`android`,ds=cs===us||ss.includes(us),fs=!ls&&cs.startsWith(`mac`);cs.startsWith(`win`),!ds&&/^(linux|chrome os)/.test(cs);var ps=fs||ls,ms=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!ms&&ss.includes(`firefox`),!ms&&ss.includes(`chrom`);var hs=ps,gs=/jsdom|happydom/.test(ss);function _s(e){e.preventDefault(),e.stopPropagation()}function vs(e){return`nativeEvent`in e}function ys(e){return e.pointerType===``&&e.isTrusted?!0:ds&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function bs(e){return gs?!1:!ds&&e.width===0&&e.height===0||ds&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function xs(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Ss(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Cs(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Qa(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ws(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Ts=`data-base-ui-focusable`;function Es(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ds(e){return e.matches(`html,body`)}function Os(e){return Za(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function ks(e){return e?e.getAttribute(`role`)===`combobox`&&Os(e):!1}function As(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function js(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ms(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Ns(e){let t=Ri(Ps,e).current;return t.next=e,Co(t.effect),t}function Ps(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Fs=null;globalThis.requestAnimationFrame;var Is=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Ls=class e{static create(){return new e}static request(e){return Is.request(e)}static cancel(e){return Is.cancel(e)}currentId=Fs;request(e){this.cancel(),this.currentId=Is.request(()=>{this.currentId=Fs,e()})}cancel=()=>{this.currentId!==Fs&&(Is.cancel(this.currentId),this.currentId=Fs)};disposeEffect=()=>this.cancel};function Rs(){let e=Ri(Ls.create).current;return $o(e.disposeEffect),e}var zs={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Bs={...zs,position:`fixed`,top:0,left:0};({...zs});var Vs=b.forwardRef(function(e,t){let[n,r]=b.useState();Co(()=>{hs&&ms&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,L.jsx)(`span`,{...e,ref:t,style:Bs,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})}),Hs=[`top`,`right`,`bottom`,`left`],Us=Math.min,Ws=Math.max,Gs=Math.round,Ks=Math.floor,qs=e=>({x:e,y:e}),Js={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ys(e,t,n){return Ws(e,Us(t,n))}function Xs(e,t){return typeof e==`function`?e(t):e}function Zs(e){return e.split(`-`)[0]}function Qs(e){return e.split(`-`)[1]}function $s(e){return e===`x`?`y`:`x`}function ec(e){return e===`y`?`height`:`width`}function tc(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function nc(e){return $s(tc(e))}function rc(e,t,n){n===void 0&&(n=!1);let r=Qs(e),i=nc(e),a=ec(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=fc(o)),[o,fc(o)]}function ic(e){let t=fc(e);return[ac(e),t,ac(t)]}function ac(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var oc=[`left`,`right`],sc=[`right`,`left`],cc=[`top`,`bottom`],lc=[`bottom`,`top`];function uc(e,t,n){switch(e){case`top`:case`bottom`:return n?t?sc:oc:t?oc:sc;case`left`:case`right`:return t?cc:lc;default:return[]}}function dc(e,t,n,r){let i=Qs(e),a=uc(Zs(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ac)))),a}function fc(e){let t=Zs(e);return Js[t]+e.slice(t.length)}function pc(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function mc(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:pc(e)}function hc(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function gc(e){return e.visibility===`hidden`||e.visibility===`collapse`}function _c(e,t=e?uo(e):null){return!e||!e.isConnected||!t||gc(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var vc=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function yc(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Qa(n)?n.host:null}function bc(e){for(let t of Array.from(e.children))if(Ka(t)===`summary`)return t;return null}function xc(e,t){let n=bc(t);return!!n&&(e===n||Cs(n,e))}function Sc(e){let t=e?Ka(e):``;return e!=null&&e.matches(vc)&&(t!==`summary`||e.parentElement!=null&&Ka(e.parentElement)===`details`&&bc(e.parentElement)===e)&&(t!==`details`||bc(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Cc(e){if(!Sc(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=yc(t)){let n=t!==e,r=Ka(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Ka(t)===`details`&&!t.open&&!xc(e,t)||t.hasAttribute(`hidden`)||!r&&!wc(t,n))return!1}return!0}function wc(e,t){let n=uo(e);return t?n.display!==`none`:_c(e,n)}function Tc(e){let t=e.tabIndex;if(t<0){let t=Ka(e);if(t===`details`||t===`audio`||t===`video`||Za(e)&&e.isContentEditable)return 0}return t}function Ec(e){if(Ka(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Dc(e,t){let n=Ec(e);if(!n)return!0;let r=t.find(e=>{let t=Ec(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Ec(e);return t?.name===n.name&&t.form===n.form})===n}function Oc(e){if(Za(e)&&Ka(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Za(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function kc(e,t){Oc(e).forEach(e=>{Sc(e)&&t.push(e),kc(e,t)})}function Ac(e,t,n){Oc(e).forEach(e=>{Za(e)&&e.matches(t)&&n.push(e),Ac(e,t,n)})}function jc(e){return Cc(e)&&Tc(e)>=0}function Mc(e){let t=[];return kc(e,t),t.filter(Cc)}function Nc(e){let t=Mc(e);return t.filter(e=>Tc(e)>=0&&Dc(e,t))}function Pc(e,t){let n=Nc(e),r=n.length;if(r===0)return;let i=Ss(Do(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Fc(e){return Pc(Do(e).body,1)||e}function Ic(e){return Pc(Do(e).body,-1)||e}function Lc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Cs(n,r)}function Rc(e){Nc(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function zc(e){let t=[];Ac(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Bc(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Bc(e,t.id,n)])}function Vc(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Hc(e){return`data-base-ui-${e}`}var Uc=0;function Wc(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Uc);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Yi;let o=requestAnimationFrame(a);return Uc=o,()=>{Uc===o&&(cancelAnimationFrame(o),Uc=0)}}var Gc={inert:new WeakMap,"aria-hidden":new WeakMap},Kc=`data-base-ui-inert`,qc={inert:new WeakSet,"aria-hidden":new WeakSet},Jc=new WeakMap,Yc=0;function Xc(e){return qc[e]}function Zc(e){return e?Qa(e)?e.host:Zc(e.parentNode):null}var Qc=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Zc(t);return e.contains(n)?n:null}).filter(e=>e!=null),$c=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},el=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Ka(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function tl(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Qc(t,e),l=i?el(t,$c(c),new Set(c)):[],u=[],d=[];if(a){let e=Gc[a],n=Xc(a);s=n,o=e;let r=Qc(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);el(t,$c(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Jc.get(e)||0)+1;Jc.set(e,t),d.push(e),t===1&&e.setAttribute(Kc,``)}),Yc+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Jc.get(e)||0)-1;Jc.set(e,t),t||e.removeAttribute(Kc)}),--Yc,Yc||(Gc.inert=new WeakMap,Gc[`aria-hidden`]=new WeakMap,qc.inert=new WeakSet,qc[`aria-hidden`]=new WeakSet,Jc=new WeakMap)}}function nl(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=Do(e[0]).body;return tl(e,a,n,r,{mark:i})}var rl=`data-base-ui-swipe-ignore`,il=`data-swipe-ignore`,al=`[${rl}]`;`${il}`;var ol={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},sl=b.createContext(null),cl=()=>b.useContext(sl),ll=Hc(`portal`);function ul(e={}){let{ref:t,container:n,componentProps:r=Zi,elementProps:i}=e,a=Jo(),o=cl()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=bo(e=>{e!==null&&u(e)}),f=b.useRef(null);Co(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Ya(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=ga(`div`,r,{ref:[t,d],props:[{id:a,[ll]:``},i]}),m=s&&p?x.createPortal(p,s):null;return{node:l,nodeId:b.isValidElement(p)?p.props.id:void 0,subtree:m}}var dl=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=ul({container:o,ref:t,componentProps:e,elementProps:c}),f=b.useRef(null),p=b.useRef(null),m=b.useRef(null),h=b.useRef(null),[g,_]=b.useState(null),v=b.useRef(!1),y=g?.modal,S=g?.open,C=!!g&&!g.modal&&g.open&&!!l;b.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Lc(e)&&(e.type===`focusin`?v.current&&=(zc(l),!1):(Rc(l),v.current=!0))}return Ms(js(l,`focusin`,e,!0),js(l,`focusout`,e,!0))},[l,y]),Co(()=>{!l||S!==!0||!v.current||(zc(l),v.current=!1)},[S,l]);let w=b.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,L.jsxs)(b.Fragment,{children:[d,(0,L.jsxs)(sl.Provider,{value:w,children:[C&&l&&(0,L.jsx)(Vs,{"data-type":`outside`,ref:f,onFocus:e=>{Lc(e,l)?m.current?.focus():Ic(g?g.domReference:null)?.focus()}}),C&&l&&(0,L.jsx)(`span`,{role:s,"aria-owns":u,style:ol}),l&&x.createPortal(a,l),C&&l&&(0,L.jsx)(Vs,{"data-type":`outside`,ref:p,onFocus:e=>{Lc(e,l)?h.current?.focus():(Fc(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Vo(`focus-out`,e.nativeEvent)))}})]})]})});function fl(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var pl=b.createContext(null),ml=b.createContext(null),hl=()=>b.useContext(pl)?.id||null,gl=e=>{let t=b.useContext(ml);return e??t};function _l(e){return e==null?e:`current`in e?e.current:e}function vl(e,t){let n=qa(ws(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var yl=20,bl=[];function xl(){bl=bl.filter(e=>e.deref()?.isConnected)}function Sl(e){xl(),e&&Ka(e)!==`body`&&(bl.push(new WeakRef(e)),bl.length>yl&&(bl=bl.slice(-20)))}function Cl(){return xl(),bl[bl.length-1]?.deref()}function wl(e){return e?jc(e)?e:Nc(e)[0]||e:null}function Tl(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Mc(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return jc(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function El(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=bo(()=>x.current.floatingContext?.nodeId),C=i===!1,w=ks(_)&&C,T=Ns(i),E=Ns(a),D=Ns(l),O=Ns(g),k=gl(p),A=cl(),j=b.useRef(!1),M=b.useRef(!1),N=b.useRef(!1),ee=b.useRef(null),te=b.useRef(``),P=b.useRef(``),F=b.useRef(null),ne=b.useRef(null),re=zi(F,f,A?.beforeInsideRef),ie=zi(ne,A?.afterInsideRef),ae=ns(),oe=ns(),I=Rs(),se=A!=null,ce=As(v),le=bo((e=ce)=>e?Nc(e):[]),ue=bo(()=>m?.().filter(e=>e!=null)??[]);b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&Cs(ce,Ss(Do(ce)))&&le().length===0&&!w&&_s(e)}return js(Do(ce),`keydown`,e)},[r,ce,s,w,le]),b.useEffect(()=>{if(r||!g)return;let e=Do(ce);function t(){N.current=!1}function n(e){let t=ws(e),n=ue();N.current=!(Cs(v,t)||Cs(_,t)||Cs(A?.portalNode,t)||n.some(e=>e===t||Cs(e,t))),P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0,oe.start(0,()=>{M.current=!1}))}function i(){P.current=`keyboard`}return Ms(js(e,`pointerdown`,n,!0),js(e,`pointerup`,t,!0),js(e,`pointercancel`,t,!0),js(e,`keydown`,i,!0),t)},[r,v,_,ce,g,A,oe,ue]),b.useEffect(()=>{if(r||!c)return;let e=Do(ce);function t(){M.current=!0,oe.start(0,()=>{M.current=!1})}function n(e){let t=ws(e);jc(t)&&(ee.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=ws(t);s&&n==null&&i!=null&&Cs(v,i)&&Sl(i),queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=ue(),f=n?.hasAttribute(Hc(`focus-guard`))&&[F.current,ne.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,_l(d),_l(u)].includes(n),p=!(Cs(_,n)||Cs(v,n)||Cs(n,v)||Cs(A?.portalNode,n)||l.some(e=>e===n||Cs(e,n))||c.hasMatchingElement(e=>Cs(e,n))||f||k&&(Bc(k.nodesRef.current,a).find(e=>Cs(e.context?.elements.floating,n)||Cs(e.context?.elements.domReference,n))||Vc(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,As(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&ce&&Tl(ce),o&&r!==_&&!_c(i)&&Ss(e)===e.body){if(Za(ce)&&(ce.focus(),o===`popup`)){I.request(()=>{ce.focus()});return}let e=le(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||ce;Za(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==Cl())&&(j.current=!0,h.setOpen(!1,Vo(Io,t)))})}function a(){N.current||(x.current.insideReactTree=!0,ae.start(0,()=>{x.current.insideReactTree=!1}))}let l=Za(_)?_:null;if(!(!v&&!l))return Ms(l&&js(l,`focusout`,i),l&&js(l,`pointerdown`,t),v&&js(v,`focusin`,n),v&&js(v,`focusout`,i),v&&A&&js(v,`focusout`,a,!0))},[r,_,v,ce,s,k,A,h,c,o,le,w,S,x,ae,oe,I,u,d,ue]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Hc(`portal`)}]`)||[]),t=(k?Vc(k.nodesRef.current,S()):[]).find(e=>ks(e.context?.elements.domReference||null))?.context?.elements.domReference,n=nl([v,...e,F.current,ne.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ue(),t,_l(d),_l(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=nl([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,A,w,k,S,u,d,ue]),Co(()=>{if(!g||r||!Za(ce))return;te.current=``,P.current=``;let e=Do(ce),t=Ss(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Cs(ce,t))return;let i=null,a=()=>(i??=le(ce),i[0]||ce),o;o=r===!0||r===null?a():_l(r),o||=a();let s=Cs(ce,Ss(e));Wc(o,{preventScroll:o===ce,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Ss(e);return!(t!==o&&Cs(ce,t))}})})},[r,g,ce,le,T,D,O]),Co(()=>{if(r||!ce)return;let e=Do(ce),t=Ss(e),n=D.current==null;Sl(t);function i(e){if(e.open||(te.current=vl(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(ys(e.nativeEvent)||bs(e.nativeEvent))j.current=!1;else{let e=!1;Do(ce).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&Ka(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Cl()||null,typeof i==`boolean`?s:_l(i)||s||null}return()=>{y.off(`openchange`,i);let t=Ss(e),n=ue(),r=Cs(v,t)||n.some(e=>e===t||Cs(e,t))||k&&Bc(k.nodesRef.current,S(),!1).some(e=>Cs(e.context?.elements.floating,t)),o=E.current,s=te.current,c=a(s);queueMicrotask(()=>{let n=wl(c),i=typeof o!=`boolean`;if(o&&!j.current&&Za(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,ce,E,D,y,k,_,S,ue]),Co(()=>{if(!ms||g||!v)return;let e=Ss(Do(v));!Za(e)||!Os(e)||Cs(v,e)&&e.blur()},[g,v]),Co(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),Co(()=>{if(!(r||!ce))return Tl(ce),()=>{queueMicrotask(xl)}},[r,ce]);let de=!r&&(s?!w:!0)&&(se||s);return(0,L.jsxs)(b.Fragment,{children:[de&&(0,L.jsx)(Vs,{"data-type":`inside`,ref:re,onFocus:e=>{if(s){let e=le();Wc(e[e.length-1])}else A?.portalNode&&(j.current=!1,Lc(e,A.portalNode)?Fc(_)?.focus():_l(d??A.beforeOutsideRef)?.focus())}}),n,de&&(0,L.jsx)(Vs,{"data-type":`inside`,ref:ie,onFocus:e=>{s?Wc(le()[0]):A?.portalNode&&(c&&(j.current=!0),Lc(e,A.portalNode)?Ic(_)?.focus():_l(u??A.afterOutsideRef)?.focus())}})]})}function Dl(){return!1}function Ol(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function kl(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Dl,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f,events:p}=l.context,m=gl(c),h=bo(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=bo(()=>a),{escapeKey:y,outsidePress:x}=Ol(s),S=b.useRef(!1),C=b.useRef(!1),w=b.useRef(!1),T=b.useRef(!1),E=b.useRef(!1),D=b.useRef(``),O=b.useRef(null),k=ns(),A=ns(),j=bo(()=>{A.clear(),f.current.insideReactTree=!1}),M=bo(e=>{let t=f.current.floatingContext?.nodeId;return(m?Bc(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=bo(e=>Es(e,l.select(`floatingElement`))||Es(e,l.select(`domReferenceElement`))),ee=bo(e=>{o()&&l.setOpen(!1,Vo(No,e.nativeEvent))}),te=bo(e=>{if(!u||!n||!r||e.key!==`Escape`||E.current||!y&&M(`__escapeKeyBubbles`))return;let t=Vo(Lo,vs(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),P=bo(()=>{f.current.insideReactTree=!0,A.start(0,j)}),F=bo(e=>{if(!u||!n||e.button!==0)return;let t=ws(e.nativeEvent);Cs(l.select(`floatingElement`),t)&&(S.current||(S.current=!0,C.current=!1))}),ne=bo(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&S.current&&(C.current=!0)});b.useEffect(()=>{function e(e){e.open||(T.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),b.useEffect(()=>{if(!u||!n)return u||(T.current=!1),j;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=x;let e=new ts,t=new ts,i=Do(d);function a(){e.clear(),E.current=!0}function o(){e.start(ms?5:0,()=>{E.current=!1})}function s(){w.current=!0,t.start(0,()=>{w.current=!1})}function c(){S.current=!1,C.current=!1}function p(){let e=D.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=p();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function b(e){let t=f.current.floatingContext?.nodeId,n=m&&Bc(m.nodesRef.current,t).some(t=>Es(e,t.context?.elements.floating));return N(e)||n}function A(e){if(h(e)){e.type!==`click`&&!N(e)&&(t.clear(),w.current=!1),j();return}if(f.current.insideReactTree){j();return}let n=ws(e),r=`[${Hc(`inert`)}]`,i=Xa(n)?n.getRootNode():null,a=Array.from((Qa(i)?i:Do(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>Cs(e,n))))return;let s=Xa(n)?n:null;for(;s&&!lo(s);){let e=po(s);if(lo(e)||!Xa(e))break;s=e}if(!(a.length&&Xa(n)&&!Ds(n)&&!Cs(n,l.select(`floatingElement`))&&a.every(e=>!Cs(s,e)))){if(Za(n)&&!(`touches`in e)){let t=lo(n),r=uo(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!b(e)){if(p()===`intentional`){if(e.detail!==0&&!ys(e)&&!T.current)return;if(w.current){t.clear(),w.current=!1;return}}typeof g==`function`&&!g(e)||M(`__outsidePressBubbles`)||(l.setOpen(!1,Vo(Po,e)),j())}}}function ee(e){p()!==`sloppy`||e.pointerType===`touch`||!l.select(`open`)||!n||N(e)||A(e)}function P(e){if(p()!==`sloppy`||!l.select(`open`)||!n||N(e))return;let t=e.touches[0];t&&(O.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function F(e,t){let n=ws(e);if(!n)return;let r=js(n,e.type,()=>{t(e),r()})}function ne(e){D.current=`touch`,F(e,P)}function re(e){k.clear(),e.type===`pointerdown`&&(e.button===0&&(T.current=!0),D.current=e.pointerType),!(e.type===`mousedown`&&O.current&&!O.current.dismissOnMouseDown)&&F(e,e=>{e.type===`pointerdown`?ee(e):A(e)})}function ie(e){if(e.type===`pointercancel`&&(T.current=!1),!S.current)return;let n=C.current;if(c(),p()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!b(e)){if(n){s();return}typeof g==`function`&&!g(e)||(t.clear(),w.current=!0,j())}}}function ae(e){if(p()!==`sloppy`||!O.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-O.current.startX),r=Math.abs(t.clientY-O.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(O.current.dismissOnTouchEnd=!0),i>10&&(A(e),k.clear(),O.current=null)}function oe(e){F(e,ae)}function I(e){p()!==`sloppy`||!O.current||N(e)||(O.current.dismissOnTouchEnd&&A(e),k.clear(),O.current=null)}function se(e){F(e,I)}let ce=Ms(r&&Ms(js(i,`keydown`,te),js(i,`compositionstart`,a),js(i,`compositionend`,o)),_&&Ms(js(i,`click`,re,!0),js(i,`pointerdown`,re,!0),js(i,`pointerup`,ie,!0),js(i,`pointercancel`,ie,!0),js(i,`mousedown`,re,!0),js(i,`mouseup`,ie,!0),js(i,`touchstart`,ne,{capture:!0,passive:!0}),js(i,`touchmove`,oe,{capture:!0,passive:!0}),js(i,`touchend`,se,{capture:!0,passive:!0})));return()=>{ce(),e.clear(),t.clear(),c(),w.current=!1,j()}},[f,d,r,_,g,u,n,y,x,te,j,v,M,N,m,l,k]);let re=b.useMemo(()=>({onKeyDown:te,onPointerDown:ee,onClick:ee}),[te,ee]),ie=b.useMemo(()=>({onKeyDown:te,onPointerDown:ne,onMouseDown:ne,onClickCapture:P,onMouseDownCapture(e){P(),F(e)},onPointerDownCapture(e){P(),F(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[te,P,F,ne]);return b.useMemo(()=>n?{reference:re,floating:ie,trigger:re}:{},[n,re,ie])}function Al(e,t,n){let{reference:r,floating:i}=e,a=tc(t),o=nc(t),s=ec(o),c=Zs(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Qs(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function jl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Xs(t,e),p=mc(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=hc(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=hc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ml=50,Nl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:jl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Al(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ml&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Al(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Xs(e,t)||{};if(l==null)return{};let d=mc(u),f={x:n,y:r},p=nc(i),m=ec(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Us(d[_],T),D=Us(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ys(E,k,O),j=!c.arrow&&Qs(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Fl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Xs(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Zs(r),_=tc(o),v=Zs(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[fc(o)]:ic(o)),x=p!==`none`;!d&&x&&b.push(...dc(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=rc(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==tc(t))||T.every(e=>tc(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=tc(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Il(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ll(e){return Hs.some(t=>e[t]>=0)}var Rl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Xs(e,t);switch(i){case`referenceHidden`:{let e=Il(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ll(e)}}}case`escaped`:{let e=Il(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ll(e)}}}default:return{}}}}},zl=new Set([`left`,`top`]);async function Bl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Zs(n),s=Qs(n),c=tc(n)===`y`,l=zl.has(o)?-1:1,u=a&&c?-1:1,d=Xs(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Vl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Bl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Hl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Xs(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=tc(i),p=$s(f),m=u[p],h=u[f],g=(e,t)=>Ys(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ul=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Xs(e,t),u={x:n,y:r},d=tc(i),f=$s(d),p=u[f],m=u[d],h=Xs(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=zl.has(Zs(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Xs(e,t),c=await i.detectOverflow(t,s),l=Zs(n),u=Qs(n),d=tc(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Us(p-c[m],g),y=Us(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ws(c.left,c.right):S=p-2*Ws(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Gl(e){let t=uo(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Za(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Gs(n)!==a||Gs(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Kl(e){return Xa(e)?e:e.contextElement}function ql(e){let t=Kl(e);if(!Za(t))return qs(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gl(t),o=(a?Gs(n.width):n.width)/r,s=(a?Gs(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Jl=qs(0);function Yl(e){let t=qa(e);return!co()||!t.visualViewport?Jl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xl(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===qa(e)}function Zl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Kl(e),o=qs(1);t&&(r?Xa(r)&&(o=ql(r)):o=ql(e));let s=Xl(a,n,r)?Yl(a):qs(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=qa(a),t=Xa(r)?qa(r):r,n=e,i=go(n);for(;i&&t!==n;){let e=ql(i),t=i.getBoundingClientRect(),r=uo(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qa(i),i=go(n)}}return hc({width:u,height:d,x:c,y:l})}function Ql(e,t){let n=fo(e).scrollLeft;return t?t.left+n:Zl(Ja(e)).left+n}function $l(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ql(e,n),y:n.top+t.scrollTop}}function eu(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ja(r),s=t?to(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qs(1),u=qs(0),d=Za(r);if((d||!a)&&((Ka(r)!==`body`||$a(o))&&(c=fo(r)),d)){let e=Zl(r);l=ql(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$l(o,c):qs(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function tu(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function nu(e){let t=fo(e),n=e.ownerDocument.body,r=Ws(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ws(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ql(e),o=-t.scrollTop;return uo(n).direction===`rtl`&&(a+=Ws(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ru=25;function iu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=qa(e),a=Ja(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!co()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ql(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ru&&(s-=o)}return{width:s,height:c,x:l,y:u}}function au(e,t){let n=Zl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ql(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ou(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=iu(e,n,t);else if(t===`document`)r=nu(Ja(e));else if(Xa(t))r=au(t,n);else{let n=Yl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return hc(r)}function su(e,t){let n=t.get(e);if(n)return n;let r=ho(e,[],!1).filter(e=>Xa(e)&&Ka(e)!==`body`),i=null,a=uo(e).position===`fixed`,o=a?po(e):e;for(;Xa(o)&&!lo(o);){let e=uo(o),t=oo(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=po(o)}return t.set(e,r),r}function cu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?to(t)?[]:su(t,this._c):[].concat(n),r],o=ou(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ou(t,a[e],i);s=Ws(n.top,s),c=Us(n.right,c),l=Us(n.bottom,l),u=Ws(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function lu(e){let{width:t,height:n}=Gl(e);return{width:t,height:n}}function uu(e,t,n){let r=Za(t),i=Ja(t),a=n===`fixed`,o=Zl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=qs(0);if((r||!a)&&((Ka(t)!==`body`||$a(i))&&(s=fo(t)),r)){let e=Zl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ql(i));let l=i&&!r&&!a?$l(i,s):qs(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function du(e){return uo(e).position===`static`}function fu(e,t){if(!Za(e)||uo(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ja(e)===n&&(n=n.ownerDocument.body),n}function pu(e,t){let n=qa(e);if(to(e))return n;if(!Za(e)){let t=po(e);for(;t&&!lo(t);){if(Xa(t)&&!du(t))return t;t=po(t)}return n}let r=fu(e,t);for(;r&&eo(r)&&du(r);)r=fu(r,t);return r&&lo(r)&&du(r)&&!oo(r)?n:r||so(e)||n}var mu=async function(e){let t=this.getOffsetParent||pu,n=this.getDimensions,r=await n(e.floating);return{reference:uu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hu(e){return uo(e).direction===`rtl`}var gu={convertOffsetParentRelativeRectToViewportRelativeRect:eu,getDocumentElement:Ja,getClippingRect:cu,getOffsetParent:pu,getElementRects:mu,getClientRects:tu,getDimensions:lu,getScale:ql,isElement:Xa,isRTL:hu};function _u(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vu(e,t,n){let r=null,i,a=Ja(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Ks(d),h=Ks(a.clientWidth-(u+f)),g=Ks(a.clientHeight-(d+p)),_=Ks(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ws(0,Us(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!_u(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=qa(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function yu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Kl(e),u=i||a?[...l?ho(l):[],...t?ho(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?vu(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zl(e):null;c&&g();function g(){let t=Zl(e);h&&!_u(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var bu=Vl,xu=Hl,Su=Fl,Cu=Wl,wu=Rl,Tu=Pl,Eu=Ul,Du=(e,t,n)=>{let r=new Map,i=n??{},a={...gu,...i.platform,_c:r};return Nl(e,t,{...i,platform:a})},Ou=typeof document<`u`?b.useLayoutEffect:function(){};function ku(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ku(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ku(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Au(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ju(e,t){let n=Au(e);return Math.round(t*n)/n}function Mu(e){let t=b.useRef(e);return Ou(()=>{t.current=e}),t}function Nu(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);ku(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==w.current&&(w.current=e,h(e))},[]),y=b.useCallback(e=>{e!==T.current&&(T.current=e,_(e))},[]),S=a||m,C=o||g,w=b.useRef(null),T=b.useRef(null),E=b.useRef(u),D=c!=null,O=Mu(c),k=Mu(i),A=Mu(l),j=b.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Du(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!ku(E.current,t)&&(E.current=t,x.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Ou(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=b.useRef(!1);Ou(()=>(M.current=!0,()=>{M.current=!1}),[]),Ou(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=b.useMemo(()=>({reference:w,floating:T,setReference:v,setFloating:y}),[v,y]),ee=b.useMemo(()=>({reference:S,floating:C}),[S,C]),te=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=ju(ee.floating,u.x),r=ju(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Au(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:j,refs:N,elements:ee,floatingStyles:te}),[u,j,N,ee,te])}var Pu=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Tu({element:r.current,padding:i}).fn(n):r?Tu({element:r,padding:i}).fn(n):{}}}},Fu=(e,t)=>{let n=bu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iu=(e,t)=>{let n=xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lu=(e,t)=>({fn:Eu(e).fn,options:[e,t]}),Ru=(e,t)=>{let n=Su(e);return{name:n.name,fn:n.fn,options:[e,t]}},zu=(e,t)=>{let n=Cu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bu=(e,t)=>{let n=wu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vu=(e,t)=>{let n=Pu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hu=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Uu=s(((e,t)=>{t.exports=Hu()})),Wu=s((e=>{var t=p(),n=Uu();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Gu=s(((e,t)=>{t.exports=Wu()})),Ku=[],qu=void 0;function Ju(){return qu}function Yu(e){Ku.push(e)}var Xu=Uu(),Zu=Gu(),Qu=Ki(19)?td:nd;function $u(e,t,n,r,i){return Qu(e,t,n,r,i)}function ed(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Xu.useSyncExternalStore)(e.subscribe,a,a)}Yu({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Xu.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function td(e,t,n,r,i){let a=Ju();if(!a)return ed(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function nd(e,t,n,r,i){return(0,Zu.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var rd=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return $u(this,e,t,n,r)}},id=class extends rd{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e);let n=this;Co(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;Co(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Co(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=this,r=t!==void 0;Co(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),$u(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=bo(t??Yi);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},ad={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},od=class extends id{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:fl(),nested:n,triggerElements:i},ad),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&xs(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function sd(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=b.useRef(null);r===void 0&&f.current===null&&(f.current=new od({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),Co(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Xa(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function cd(e,t=!1,n=!1,r=!1){let[i,a]=b.useState(e&&t?`idle`:void 0),[o,s]=b.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),Co(()=>{if(!e&&o&&i!==`ending`&&n){let e=Ls.request(()=>{a(`ending`)});return()=>{Ls.cancel(e)}}},[e,o,i,n]),Co(()=>{if(!e||t)return;let n=Ls.request(()=>{a(void 0)});return()=>{Ls.cancel(n)}},[t,e]),Co(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Ls.request(()=>{a(`idle`)});return()=>{Ls.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var ld=null;function ud(e){if(!ld){let e=[];ld=e,queueMicrotask(()=>{ld=null,x.flushSync(()=>{for(let t of e)t()})})}ld.push(e)}function dd(e,t=!1,n=!1){let r=Rs();return bo((i,a=null)=>{r.cancel();let o=_l(e);if(o==null)return;let s=o,c=()=>{if(!n){x.flushSync(i);return}ud(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(s.getAnimations().some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=Ca;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function fd(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=bo(a),s=dd(r,n,i);b.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var pd={tabIndex:-1,[Ts]:``};function md(e,t=!1){let n=Jo(),r=hl()!=null,i=Ri(()=>e(n,r)).current;return sd({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function hd({handle:e,store:t}){return Co(()=>e.attachStore(t),[e,t]),null}function gd(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s}}function _d(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=b.useRef(null),i=e.useState(`open`);Co(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Vo(Mo);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function vd(e,t,n,r){let{mounted:i,setMounted:a,transitionStatus:o}=cd(e,!1,!1,r),s=t.useState(`preventUnmountingOnClose`),c=e?!1:s;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:c});let l=bo(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return fd({enabled:i&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:o}}function yd(e,t){e.useSyncedValues(t),Co(()=>()=>{e.update({activeTriggerProps:Zi,inactiveTriggerProps:Zi,popupProps:Zi})},[e])}function bd(e,t){Co(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),Co(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var xd=class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function Sd(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new od({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Zi,inactiveTriggerProps:Zi,popupProps:Zi}}var Cd=e=>e.triggerIdProp??e.activeTriggerId,wd=e=>e.openProp??e.open,Td=e=>(e.popupElement?.id??e.floatingId)||void 0;function Ed(e,t){return t!==void 0&&wd(e)&&Cd(e)===t}function Dd(e,t){return Ed(e,t)?!0:t!==void 0&&wd(e)&&Cd(e)==null&&e.triggerCount===1}var Od={open:wd,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Cd,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Td,isTriggerActive:(e,t)=>t!==void 0&&Cd(e)===t,isOpenedByTrigger:(e,t)=>Ed(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Cd(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Dd(e,t)?Td(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},kd=`data-expanded`,Ad=`data-nested-drawer-open`,jd=`data-nested-drawer-swiping`,Md=`data-swipe-dismiss`,Nd=`data-swipe-direction`,Pd=`data-swiping`,Fd=b.createContext(void 0);function Id(){let e=b.useContext(Fd);if(e===void 0)throw Error(Pi(26));return e}var Ld=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),Rd=b.createContext(void 0);function zd(e){let t=b.useContext(Rd);if(e!==!0&&t===void 0)throw Error(Pi(90));return t}function Bd(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Vd(e,t){let n=e+t;return n>=0?t:-Math.sqrt(-n)-e}function Hd(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?Bd(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function Ud(e,t){let n=-1,r=1/0;for(let i=0;i<e.length;i+=1){let a=Math.abs(e[i]-t);a<r&&(r=a,n=i)}return n}function Wd(){let e=Ii(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i}=zd(),a=e.useState(`viewportElement`),[o,s]=b.useState(0),[c,l]=b.useState(16),u=bo(()=>{let e=Do(a).documentElement;s(a?a.offsetHeight:e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&l(t)});Co(()=>{if(u(),!a||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(u);return e.observe(a),()=>{e.disconnect()}},[u,a]);let d=b.useMemo(()=>{if(!t||t.length===0||o<=0||i<=0)return[];let e=Math.min(i,o),n=t.map(t=>{let n=Hd(t,o,c);if(n===null)return null;let r=Bd(n,0,e);return{value:t,height:r,offset:Math.max(0,i-r)}}).filter(e=>!!e);if(n.length<=1)return n;let r=[],a=[];for(let e=n.length-1;e>=0;--e){let t=n[e];a.some(e=>Math.abs(e-t.height)<=1)||(a.push(t.height),r.push(t))}return r.reverse(),r},[i,c,t,o]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i,viewportHeight:o,resolvedSnapPoints:d,activeSnapPointOffset:b.useMemo(()=>{if(n===null)return;let e=d.find(e=>Object.is(e.value,n));if(e)return e;let t=Math.min(i,o),r=Hd(n,o,c);if(r===null)return;let a=Bd(r,0,t);return d[Ud(d.map(e=>e.height),a)]},[n,i,d,c,o])?.offset??null}}var Gd=b.createContext(null);function Kd(){return b.useContext(Gd)}var qd=!1;function Jd(){qd||=(typeof CSS<`u`&&`registerProperty`in CSS&&([za,Ba,Va].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:Ua,initialValue:`0`},{name:Ha,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var Yd={...Fa,expanded(e){return e?{[kd]:``}:null},nestedDrawerOpen(e){return e?{[Ad]:``}:null},nestedDrawerSwiping(e){return e?{[jd]:``}:null},swipeDirection(e){return{[Nd]:e}},swiping(e){return e?{[Pd]:``}:null}},Xd=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Ii(),l=c.context.popupRef,{swipeDirection:u,frontmostHeight:d,hasNestedDrawer:f,nestedSwiping:p,nestedSwipeProgressStore:m,onPopupHeightChange:h,notifyParentFrontmostHeight:g,notifyParentHasNestedDrawer:_}=zd(),v=c.useState(`descriptionElementId`),y=c.useState(`disablePointerDismissal`),x=c.useState(`floatingRootContext`),S=c.useState(`popupProps`),C=c.useState(`modal`),w=c.useState(`mounted`),T=c.useState(`nested`),E=c.useState(`nestedOpenDrawerCount`),D=c.useState(`transitionStatus`),O=c.useState(`open`),k=c.useState(`openMethod`),A=c.useState(`titleElementId`),j=c.useState(`role`),M=x.useState(`floatingId`),N=s.id??M,ee=Kd();Id();let{snapPoints:te,activeSnapPoint:P,activeSnapPointOffset:F}=Wd(),ne=E>0,re=ee?.swiping??!1,ie=ee?.swipeStrength??null,[ae,oe]=b.useState(0),I=b.useRef(0),se=bo(()=>{let e=l.current;if(!e)return;let t=e.offsetHeight;if(I.current>0&&d>I.current&&t>I.current)return;if(I.current>0&&f){let e=I.current;oe(e),h(e);return}let n=t;n!==I.current&&(I.current=n,oe(n),h(n))});Co(()=>{if(!w){I.current=0,oe(0),h(0);return}let e=l.current;if(!e||(Jd(),se(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(se);return t.observe(e),()=>{t.disconnect()}},[se,w,ne,h,l]),Co(()=>{let e=()=>{let e=l.current;if(!e)return;let t=m.getSnapshot();t>0?e.style.setProperty(Ua,`${t}`):e.style.setProperty(Ua,`0`)};e();let t=m.subscribe(e),n=l.current;return()=>{t(),n&&n.style.setProperty(Ua,`0`)}},[m,l]),Co(()=>{if(O)return g?.(d),()=>{g?.(0)}},[d,O,g]),Co(()=>{if(_)return _(O||D===`ending`),()=>{_(!1)}},[_,O,D]),fd({open:O,ref:l,onComplete(){O&&c.context.onOpenChangeComplete?.(!0)}});let ce=o===void 0?l:o,le=c.useStateSetter(`popupElement`),ue={open:O,nested:T,transitionStatus:D,expanded:P===1,nestedDrawerOpen:ne,nestedDrawerSwiping:p,swipeDirection:u,swiping:re},de;ae&&!(!f&&D!==`ending`)&&(de=`${ae}px`);let fe=te&&te.length>0&&(u===`down`||u===`up`),pe=null;fe&&F!==null&&(pe=u===`up`?-F:F);let me=ee?ee.getDragStyles():Zi;if(fe&&u===`down`){let e=F??0,t=Number.parseFloat(String(me[Ba]));me=re&&Number.isFinite(t)?{...me,transform:void 0,[Ba]:`${Vd(e,t)}px`}:{...me,transform:void 0}}let he=ga(`div`,e,{state:ue,props:[S,{id:N,"aria-labelledby":A,"aria-describedby":v,role:j,...pd,hidden:!w,onKeyDown(e){Ld.has(e.key)&&e.stopPropagation()},style:{...me,[Ua]:`0`,[Ia]:E,[La]:de,[Va]:typeof pe==`number`?`${pe}px`:`0px`,[Ra]:d?`${d}px`:void 0,[Ha]:typeof ie==`number`&&Number.isFinite(ie)&&ie>0?`${ie}`:`1`}},s],ref:[t,l,le],stateAttributesMapping:Yd});return(0,L.jsx)(El,{context:x,openInteractionType:k,disabled:!w,closeOnFocusOut:!y,initialFocus:ce,returnFocus:a,modal:C!==!1,restoreFocus:`popup`,children:he})});function Zd(e){return Ki(19)?e:e?`true`:void 0}var Qd=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,L.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),$d=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Ii(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,L.jsx)(Fd.Provider,{value:n,children:(0,L.jsxs)(dl,{ref:t,...r,children:[a&&o===!0&&(0,L.jsx)(Qd,{ref:i.context.internalBackdropRef,inert:Zd(!s)}),e.children]})}):null});function ef({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i&&e!==void 0?e:a,b.useCallback(e=>{i||o(e)},[])]}var tf={},nf={},rf=``;function af(e,t){return $a(e)?e:t}function of(e,t,n){return/hidden|clip/.test(e.getComputedStyle(af(t,n)).overflowY)}function sf(e){if(typeof document>`u`)return!1;let t=Do(e);return qa(t).innerWidth-t.documentElement.clientWidth>0}function cf(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Do(e),n=t.documentElement,r=t.body,i=af(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function lf(e){let t=Do(e),n=t.documentElement,r=t.body,i=af(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function uf(e){let t=Do(e),n=t.documentElement,r=t.body,i=qa(n),a=0,o=0,s=!1,c=Ls.create();if(ms&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,tf={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},rf=n.style.scrollBehavior,nf={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=af(n,r);if(s=cf(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,tf),Object.assign(r.style,nf),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=rf)}function d(){u(),c.request(l)}l();let f=js(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var df=new class{lockCount=0;restore=null;timeoutLock=ts.create();timeoutUnlock=ts.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Do(e),n=t.documentElement,r=t.body,i=qa(n);if(of(i,n,r)){let t=new i.MutationObserver(()=>{of(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=ls||!sf(e);this.restore=a?lf(e):uf(e)}};function ff(e=!0,t=null){Co(()=>{if(e)return df.acquire(t)},[e,t])}function pf({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=b.useState(0),[u,d]=b.useState(0),f=c===0,p=kl(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=ws(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Cs(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return ff(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),Co(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),yd(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var mf={...Od,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},hf=class extends id{constructor(e,t,n){let r=new xd,i=gf(e,r,t,n);super(i,_f(r),mf)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(gd(this.state,e,t.trigger)))}};function gf(e,t,n,r=!1){return{...Sd(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function _f(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function vf(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Ii(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},x=md((e,t)=>new hf({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(y),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);bd(x,S),_d(x);let{forceUnmount:T}=vd(S,x);b.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,Vo(zo))}),[T,x]);let E=S||C;return(0,L.jsxs)(Fi.Provider,{value:x,children:[u&&(0,L.jsx)(hd,{handle:u,store:x}),E&&(0,L.jsx)(pf,{store:x,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}var yf,bf;function xf(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null,swipeDirection:f=`down`,snapToSequentialPoints:p=!1,snapPoints:m,snapPoint:h,defaultSnapPoint:g,onSnapPointChange:_}=e,v=zd(!0),y=v?.onNestedSwipeProgressChange,x=v?.onNestedFrontmostHeightChange,S=v?.onNestedSwipingChange,C=v?.onNestedDrawerPresenceChange,[w,T]=b.useState(0),[E,D]=b.useState(0),[O,k]=b.useState(!1),[A,j]=b.useState(!1),[M]=b.useState(Sf),N=g===void 0?m?.[0]??null:g,ee=h!==void 0,[te,P]=ef({controlled:h,default:N,name:`Drawer`,state:`snapPoint`}),F=b.useRef(!1),ne=b.useRef(!1),re=bo((e,t)=>{let n=t??Vo(`none`);_?.(e,n),!n.isCanceled&&P(e)}),ie=b.useMemo(()=>ee||!m||m.length===0?te:te===null||!m.some(e=>Object.is(e,te))?N:te,[te,ee,N,m]),ae=bo(e=>{T(e),!F.current&&e>0&&D(e)}),oe=bo(e=>{if(e>0){F.current=!0,D(e);return}F.current=!1,w>0&&D(w)}),I=bo(e=>{k(e)}),se=bo(e=>{M.set(e),y?.(e)}),ce=bo(e=>{j(e),S?.(e)}),le=bo((e,t)=>{i?.(e,t),!t.isCanceled&&!e&&m&&m.length>0&&re(N,Vo(t.reason,t.event,t.trigger))}),ue=b.useMemo(()=>({swipeDirection:f,swipeAreaActiveRef:ne,snapToSequentialPoints:p,snapPoints:m,activeSnapPoint:ie,setActiveSnapPoint:re,frontmostHeight:E,popupHeight:w,hasNestedDrawer:O,nestedSwiping:A,nestedSwipeProgressStore:M,onNestedDrawerPresenceChange:I,onPopupHeightChange:ae,onNestedFrontmostHeightChange:oe,onNestedSwipingChange:ce,onNestedSwipeProgressChange:se,notifyParentFrontmostHeight:x,notifyParentSwipingChange:S,notifyParentSwipeProgressChange:y,notifyParentHasNestedDrawer:C}),[ie,E,O,A,M,C,y,S,x,I,oe,se,ce,ae,w,re,m,p,ne,f]),de=vf(`drawer`,{open:n,defaultOpen:r,onOpenChange:le,onOpenChangeComplete:a,disablePointerDismissal:o,modal:s,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d,children:typeof t==`function`?e=>(0,L.jsxs)(b.Fragment,{children:[yf||=(0,L.jsx)(Cf,{}),t(e)]}):(0,L.jsxs)(b.Fragment,{children:[bf||=(0,L.jsx)(Cf,{}),t]})});return(0,L.jsx)(Rd.Provider,{value:ue,children:de})}function Sf(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Cf(){let e=Qo(),t=Ii(!1),n=e?.setDrawerOpen,r=e?.removeDrawer,i=t.useState(`open`),a=t.useState(`nestedOpenDialogCount`),o=t.useState(`popupElement`),s=a===0;return Co(()=>{if(r)return()=>{r(t)}},[r,t]),Co(()=>{n?.(t,i)},[i,n,t]),b.useEffect(()=>{if(!i||!s||!ds)return;let e=qa(o).CloseWatcher;if(!e)return;function n(e){t.select(`open`)&&t.setOpen(!1,Vo(Ro,e))}let r=new e,a=js(r,`close`,n);return()=>{a(),r.destroy()}},[t,s,i,o]),null}function wf(e,t=!1){let{overflowY:n}=uo(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}function Tf(e,t=!1){let{overflowX:n}=uo(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientWidth>0:e.scrollWidth>e.clientWidth}function Ef(e,t,n=!1){return t===`vertical`?wf(e,n):Tf(e,n)}function Df(e,t,n){let r=e;for(;Za(r)&&r!==t&&!lo(r);){for(let e of n)if(Ef(r,e))return!0;r=po(r)}return!1}function Of(e,t,n=`vertical`,r=!1){let i=Za(e)?e:null;for(;Za(i)&&i!==t&&!lo(i);){if(Ef(i,n,r))return i;i=po(i)}return Ef(t,n,r)?t:null}function kf(e,t,n){return typeof e?.elementFromPoint==`function`?e.elementFromPoint(t,n):null}function Af(e,t){let n=(t??qa(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var jf=40,Mf=10,Nf=1,Pf=50,Ff=16,If=80,Lf=`button,a,input,select,textarea,label,[role="button"]`;function Rf(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function zf(e){return Number.isFinite(e)&&e>0?e:null}function Bf(e,t){return`translate3d(${e.x}px,${e.y}px,0) scale(${t})`}function Vf(e){return e%2==1}function Hf(e,t,n){let r=e[n];if(typeof r==`function`)try{r.call(e,t)}catch(e){if(e&&typeof e==`object`&&`name`in e&&e.name===`NotFoundError`)return;throw e}}function Uf(e){let{enabled:t,directions:n,elementRef:r,movementCssVars:i,canStart:a,ignoreSelectorWhenTouch:o=!0,ignoreScrollableAncestors:s=!1,swipeThreshold:c,onDismiss:l,onProgress:u,onCancel:d,onSwipeStart:f,onRelease:p,onSwipingChange:m,trackDrag:h=!0}=e,g=Lf,_=n.length===1?n[0]:void 0,v=Math.max(0,typeof c==`number`?c:jf),y=n.includes(`left`),x=n.includes(`right`),S=n.includes(`up`),C=n.includes(`down`),w=y||x,T=S||C,E=b.useMemo(()=>{let e=[];return T&&e.push(`vertical`),w&&e.push(`horizontal`),e},[w,T]),[D,O]=b.useState(void 0),[k,A]=b.useState(!1),[j,M]=b.useState(!1),N=b.useRef({x:0,y:0}),ee=b.useRef({x:0,y:0}),te=b.useRef(null),P=b.useRef({x:0,y:0,scale:1}),F=b.useRef(void 0),ne=b.useRef(0),re=b.useRef(!1),ie=b.useRef({x:0,y:0}),ae=b.useRef(null),oe=b.useRef(!1),I=b.useRef(!1),se=b.useRef(null),ce=b.useRef(!1),le=b.useRef(!1),ue=b.useRef({width:0,height:0}),de=b.useRef(0),fe=b.useRef(v),pe=b.useRef(null),me=b.useRef(null),he=b.useRef(null),ge=b.useRef({x:0,y:0}),_e=b.useRef(null),ve=b.useRef(!1),ye=b.useRef(null),be=bo(e=>{ve.current!==e&&(ve.current=e,A(e),m?.(e))});function xe(e){if(!e)return;let t=r.current,n=pe.current;if(!t||!n)return;let i=n({element:t,direction:e});fe.current=Math.max(0,i)}let Se=bo((e,t)=>{let n=Number.isFinite(e)?Bd(e,0,1):0,r=n!==de.current,i=!1;if(t){let e=_e.current;i=!e||e.deltaX!==t.deltaX||e.deltaY!==t.deltaY||e.direction!==t.direction}!r&&!i||(de.current=n,t?_e.current=t:r&&(_e.current=null),u?.(n,t))}),Ce=bo(e=>{let t=r.current;if(!h||!t){e||(ye.current=null);return}let n=t.style,a=ye.current;e?(a||(ye.current=[n.transition,n.transform]),n.transition=`none`):a&&([n.transition,n.transform]=a,ye.current=null);let o=ee.current,s=P.current,c=o.x-s.x,l=o.y-s.y;e&&(n.transform=Bf(o,s.scale)),n.setProperty(i.x,`${c}px`),n.setProperty(i.y,`${l}px`)});function L(e,t){if(t===null)return;let n=he.current;if(n&&t>n.time){let r=Math.max(t-n.time,Ff);ge.current={x:(e.x-n.x)/r,y:(e.y-n.y)/r}}he.current={x:e.x,y:e.y,time:t}}let we=b.useCallback(()=>{O(void 0),be(!1),M(!1),Se(0),fe.current=v,pe.current=null,N.current={x:0,y:0},ee.current={x:0,y:0},P.current={x:0,y:0,scale:1},F.current=void 0,ne.current=0,re.current=!1,ie.current={x:0,y:0},ae.current=null,oe.current=!1,te.current=null,I.current=!1,se.current=null,ce.current=!1,le.current=!1,ue.current={width:0,height:0},me.current=null,he.current=null,ge.current={x:0,y:0},_e.current=null,Ce(!1)},[be,v,Ce,Se]);function Te(e){if(`touches`in e){let t=e.touches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Ee(e){return`touches`in e?!0:e.pointerType===`touch`}function De(e,t){let n=r.current?.getRootNode();return kf(n,e.x,e.y)??ws(t)}function Oe(e,t){let n=n=>{let r=Of(e,t,n),i=Do(r);return r===i.body||r===i.documentElement?null:r};return w&&!T?n(`horizontal`):T&&!w?n(`vertical`):n(`vertical`)??n(`horizontal`)}function R(e,t,n){ce.current=!1;let i=Ee(e),a=De(t,e.nativeEvent),l=Do(r.current).body,u=i&&l?Oe(a,l):null,d=n?.ignoreScrollableTarget??!1;if(u&&!d||(ce.current=!!(u&&d),a&&a.closest(g)&&(!i||o)))return!1;let p=r.current;if(s&&p&&a&&E.length>0&&!(n?.ignoreScrollableAncestors??!1)&&Df(a,p,E))return!1;if(re.current=!1,F.current=void 0,ne.current=0,N.current=t,me.current=zf(e.timeStamp),ie.current=t,te.current=t,fe.current=v,pe.current=typeof c==`function`?c:null,p){ue.current={width:p.offsetWidth,height:p.offsetHeight},xe(_);let t=Af(p);P.current=t,ee.current={x:t.x,y:t.y},L({x:t.x,y:t.y},me.current),`touches`in e||Hf(p,e.pointerId,`setPointerCapture`)}return f?.(e.nativeEvent),be(!0),ae.current=null,oe.current=!0,Se(0),Ce(!0),!0}function ke(){Ae(),ce.current=!1,te.current=null}function Ae(){I.current=!1,se.current=null}function z(e){if(ke(),!ve.current)return;be(!1),ae.current=null;let t=P.current;ee.current={x:t.x,y:t.y},O(void 0),le.current=!1,Ce(!1);let n=r.current;n&&Hf(n,e.pointerId,`releasePointerCapture`),Se(0,{deltaX:0,deltaY:0,direction:void 0}),d?.(e.nativeEvent)}function je(e,t){let n=e=>Math.sign(e)*Math.abs(e)**.5,r=(e,t,r)=>!t&&e<0||!r&&e>0?n(e):e;return{x:w?r(e,y,x):n(e),y:T?r(t,S,C):n(t)}}function Me(e,t,n){let r=(e,t,n,r,i)=>e>0&&t<=0&&r||e<0&&t>=Math.max(0,n)&&i,i=Math.abs(t),a=Math.abs(n);return T&&n!==0&&(!w||a>=i)?r(n,e.scrollTop,e.scrollHeight-e.clientHeight,C,S):w&&t!==0&&(!T||i>a)?r(t,e.scrollLeft,e.scrollWidth-e.clientWidth,x,y):null}let Ne=bo(e=>{if(!t||e.defaultPrevented||e.nativeEvent.defaultPrevented||!(`touches`in e)&&e.button!==0)return;let n=Te(e);n&&(I.current=!0,se.current=n,ce.current=!1,le.current=!(`touches`in e),(!a||a(n,{nativeEvent:e.nativeEvent,direction:_}))&&R(e,n)&&Ae())});function Pe(e,n,r){if(!t||!ve.current)return;let i=ws(e.nativeEvent);if(Ee(e)&&!ce.current){let t=e.currentTarget;if(Oe(i,t))return}if(`touches`in e||e.preventDefault(),oe.current&&(oe.current=!1,h)){N.current=n;let t=zf(e.timeStamp);t!==null&&(me.current=t)}let a=n.x,o=n.y,s=r.x,c=r.y;(c<0&&o>ie.current.y||c>0&&o<ie.current.y)&&(ie.current={x:ie.current.x,y:o}),(s<0&&a>ie.current.x||s>0&&a<ie.current.x)&&(ie.current={x:a,y:ie.current.y});let l=a-N.current.x,u=o-N.current.y,d=o-ie.current.y,f=a-ie.current.x,p=ae.current;p===null&&w&&T&&Math.sqrt(l*l+u*u)>=Nf&&(p=Math.abs(l)>Math.abs(u)?`horizontal`:`vertical`,ae.current=p);let m;if(!F.current)p===`vertical`?u>0?m=`down`:u<0&&(m=`up`):p===`horizontal`?l>0?m=`right`:l<0&&(m=`left`):m=Math.abs(l)>=Math.abs(u)?l>0?`right`:`left`:u>0?`down`:`up`,m&&(m===`left`&&y||m===`right`&&x||m===`up`&&S||m===`down`&&C)&&(F.current=m,ne.current=Rf(m,l,u),O(m),xe(m));else{let e=F.current,t=Rf(e,f,d);t>fe.current?(re.current=!1,O(e)):!(y&&x)&&!(S&&C)&&ne.current-t>=Mf&&(re.current=!0)}let g=je(l,u),v=P.current.x,b=P.current.y;p===`horizontal`?w&&(v+=g.x):(p===`vertical`||w&&(v+=g.x),T&&(b+=g.y));let E=ee.current,D=v!==E.x||b!==E.y;ee.current={x:v,y:b},D&&Ce(!0),L({x:v,y:b},zf(e.timeStamp));let k=v-P.current.x,A=b-P.current.y,j={deltaX:k,deltaY:A,direction:F.current},M=0,te=_??F.current;if(te){let e=te===`left`||te===`right`?ue.current.width:ue.current.height,t=P.current.scale||1,n=Rf(te,k,A);e>0&&t>0&&n>0&&(M=n/(e*t))}Se(M,j)}let Fe=bo(e=>{if(!t)return;let i=ee.current,a=P.current,o=i.x-a.x,s=i.y-a.y,c={deltaX:o,deltaY:s,direction:F.current};if(!ve.current){ke(),Se(0,c);return}be(!1),ae.current=null,ke(),le.current=!1;let u=r.current;u&&(`touches`in e||Hf(u,e.pointerId,`releasePointerCapture`));let d=o,f=s,m=me.current,h=zf(e.timeStamp),g=m!==null&&h!==null&&h>m?h-m:0,v=g>0?Math.max(g,Pf):0,y=v>0?d/v:0,b=v>0?f/v:0,x=ge.current.x,S=ge.current.y,C=he.current;if(C&&h!==null&&h>=C.time){let e=h-C.time;if(e<=If){let t=Math.max(e,Ff),n=i.x-C.x,r=i.y-C.y,a=n/t,o=r/t;a!==0&&(x=a),o!==0&&(S=o)}else x=0,S=0}let w=p?.({event:e.nativeEvent,direction:F.current,deltaX:d,deltaY:f,velocityX:y,velocityY:b,releaseVelocityX:x,releaseVelocityY:S}),T=typeof w==`boolean`;if(re.current&&!T){ee.current={x:a.x,y:a.y},O(void 0),Ce(!1),Se(0,c);return}let E=!1,D;if(T)E=w,D=F.current??_;else for(let e of n)if(Rf(e,d,f)>fe.current){E=!0,D=e;break}E&&D?(O(D),M(!0),Ce(!1),l?.(e.nativeEvent,{direction:D})):(ee.current={x:a.x,y:a.y},O(void 0),Ce(!1),Se(0,c))}),B=bo(e=>{let t=Te(e);if(!t)return;let n=!1;if(!(`touches`in e)){let t=Vf(e.buttons);if(t&&(le.current=!0),e.buttons!==0&&!t){z(e);return}if(e.buttons===0&&le.current){if(!ve.current){Fe(e);return}n=!0}}if(!k&&I.current){if(!Ee(e)&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)){ke();return}if(!a||a(t,{nativeEvent:e.nativeEvent,direction:_})){let n=se.current,i=!1;if(Ee(e)){let a=r.current;if(n&&a){let r=De(t,e.nativeEvent),o=Do(a).body,s=o?Oe(r,o):null;if(s&&(Cs(a,s)||Cs(s,a))){let e=Me(s,t.x-n.x,t.y-n.y);if(e===!1)return;e===!0&&(i=!0)}}}R(e,t,{ignoreScrollableTarget:i,ignoreScrollableAncestors:i})&&(n&&i?(Ae(),N.current=n,ie.current=n,te.current=n,oe.current=!1):(Ae(),ce.current=!1))}}let i=te.current,o=i===null?{x:0,y:0}:{x:t.x-i.x,y:t.y-i.y};te.current=t,Pe(e,t,o),n&&!(`touches`in e)&&Fe(e)}),Ie=bo((e,t)=>{B({touches:e.touches,currentTarget:t,nativeEvent:e,defaultPrevented:e.defaultPrevented,timeStamp:e.timeStamp})}),Le=b.useCallback(()=>{let e=ve.current,t=ee.current,n=P.current,r=t.x-n.x,a=t.y-n.y;return!e&&r===0&&a===0&&!j?{[i.x]:`0px`,[i.y]:`0px`}:{transition:e?`none`:void 0,transform:e?Bf(t,n.scale):void 0,[i.x]:`${r}px`,[i.y]:`${a}px`}},[j,i]);return{swiping:k,swipeDirection:D,dragDismissed:j,getPointerProps:b.useCallback(()=>t?{onPointerDown:Ne,onPointerMove:B,onPointerUp:Fe,onPointerCancel:Fe}:{},[t,Fe,B,Ne]),getTouchProps:b.useCallback(()=>t?{onTouchStart:Ne,onTouchMove:B,onTouchEnd:Fe,onTouchCancel:Fe}:{},[t,Fe,B,Ne]),moveNative:Ie,getDragStyles:Le,reset:we}}var Wf=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Ii(),c=Yo(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),ga(`h2`,e,{ref:t,props:[{id:c},o]})}),Gf=`data-nested-dialog-open`,Kf={...Pa,...Da,nestedDialogOpen(e){return e?{[Gf]:``}:null}},qf=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Id(),c=Ii(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return ga(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:Kf,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})}),Jf=`data-nested-dialog-open`,Yf=b.createContext(void 0);function Xf(){return b.useContext(Yf)}var Zf=10,Qf=.5,$f=.5,ep=300,tp=4,np=.2,rp=4,ip=80,ap=360,op=.1,sp=1,cp=6,lp=2,up=`[${Uo}]`,dp=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Ii(),c=s.context.popupRef,l=s.context.backdropRef,{swipeDirection:u,notifyParentSwipingChange:d,notifyParentSwipeProgressChange:f,frontmostHeight:p,snapToSequentialPoints:m,swipeAreaActiveRef:h}=zd(),g=Qo(),{snapPoints:_,resolvedSnapPoints:v,activeSnapPoint:y,activeSnapPointOffset:S,setActiveSnapPoint:C,popupHeight:w}=Wd(),T=s.useState(`open`),E=s.useState(`mounted`),D=s.useState(`nested`),O=s.useState(`nestedOpenDrawerCount`),k=s.useState(`viewportElement`),A=s.useState(`popupElement`),j=g?.visualStateStore,M=O>0,N=u===`left`||u===`right`?`horizontal`:`vertical`,ee=N===`vertical`,te=ee?`horizontal`:`vertical`,[P,F]=b.useState(null),ne=b.useRef(void 0),re=b.useRef(null),ie=Rs(),ae=b.useRef(!1),oe=b.useRef(!1),I=b.useRef(``),se=b.useRef(!1),ce=b.useRef(!1),le=b.useRef(null),ue=Xf(),de=b.useMemo(()=>{if(!_||_.length<2||v.length<2||u!==`down`&&u!==`up`)return null;let e=v.map(e=>e.offset).sort((e,t)=>e-t),t=e[0];return{minOffset:t,range:e[1]-t}},[v,_,u]),fe=b.useMemo(()=>!de||S===null?null:Bd((S-de.minOffset)/de.range,0,1),[S,de]),pe=b.useMemo(()=>_&&_.length>0&&(u===`down`||u===`up`)?u===`down`?[`down`,`up`]:[`up`,`down`]:[u],[_,u]),me=bo(e=>{c.current?.toggleAttribute(Md,e),l.current?.toggleAttribute(Md,e)}),he=bo(()=>{me(!1),c.current?.removeAttribute(wa),F(null)}),ge=bo(()=>{oe.current&&(oe.current=!1,d?.(!1))}),_e=bo((e,t,n)=>{let r=T&&!D&&t,i=r?e:0,a=T&&t?e:0;n&&f&&(f(a),a<=0&&ge()),j?.set({swipeProgress:i,frontmostHeight:i>0?p:0});let o=l.current;if(!o)return;let s=r&&i>0;o.style.setProperty(Ua,s?`${i}`:`0`),s&&p>0?o.style.setProperty(La,`${p}px`):o.style.removeProperty(La)});function ve(e,t,n,r,i,a,o,s){let c=hp(e,t);if(c<=0)return null;let l=((t===`down`||t===`up`)&&_&&_.length>0?S??0:0)+Rf(t,n,r),u=Math.max(0,c-l);if(u<=0)return null;let d=Rf(t,o,s),f=Math.abs(d)>0?d:Rf(t,i,a);return f<=np?null:op+(Bd(u/Bd(f,np,rp),ip,ap)-ip)/(ap-ip)*(sp-op)}function ye(e){if(oe.current||!e)return;let t=Rf(e.direction??u,e.deltaX,e.deltaY);Math.abs(t)<Zf||(oe.current=!0,d?.(!0))}let be=Uf({enabled:E&&!M,directions:pe,elementRef:s.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:za,y:Ba},onSwipeStart(e){if(`touches`in e||e.pointerType===`touch`)return;let t=c.current,n=Do(t).getSelection?.();if(!n||n.isCollapsed)return;let r=Xa(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=Xa(n.focusNode)?n.focusNode:n.focusNode?.parentElement;!Cs(t,r)&&!Cs(t,i)||n.removeAllRanges()},onSwipingChange(e){ae.current=e,fp(s.context.backdropRef.current,e),!e&&!f&&ge()},swipeThreshold({element:e,direction:t}){return gp(e,t)},canStart(e,t){let n=s.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=kf(n.getRootNode(),e.x,e.y);if(!i||!Cs(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||a.pointerType===`touch`)&&bp(r,n))},onProgress(e,t){let n=ae.current;n&&ye(t);let r=!!(_&&_.length>0);if(n&&u===`down`&&r&&t){let e=s.context.popupRef.current;e&&(e.style.removeProperty(`transform`),e.style.setProperty(Ba,`${Vd(S??0,t.deltaY)}px`))}let i=e;if(de&&w>0){let e=S??de.minOffset;n&&t&&Number.isFinite(t.deltaY)?i=(e=>Bd((e-de.minOffset)/de.range,0,1))(Bd(e+t.deltaY,0,w)):fe!==null&&(i=fe)}n||(f?.(0),ge()),_e(i,!0,n)},onRelease({event:e,deltaX:t,deltaY:n,direction:r,velocityX:i,velocityY:a,releaseVelocityX:o,releaseVelocityY:c}){let l=s.context.popupRef.current;if(!l){he();return}let d=l;function f(e){ge(),me(!0),d.style.removeProperty(`transition`),d.setAttribute(wa,``),x.flushSync(()=>{F(ve(d,e,t,n,i,a,o,c))})}if(!_||_.length===0){if(!r){he();return}let e=Rf(r,t,n);if(e<=0)return he(),!1;if(Rf(r,i,a)>=Qf)return f(r),!0;let o=e>gp(d,r);return o?f(r):he(),o}if(u!==`down`&&u!==`up`){he();return}if(!w)return he(),!1;if(v.length===0){he();return}let p=u===`down`?n:-n,h=Math.sign(p),g=u===`down`?c:-c,b=u===`down`?a:-a,T=g;if(h!==0&&Math.abs(p)>=Zf){let e=Math.sign(T);e!==0&&e!==h&&(T=b)}let E=S??0,D=Bd(E+p,0,w),O=Math.abs(T)>=$f?Bd(T,-4,tp)*ep:0,k=m?D:Bd(D+O,0,w),A=Vo(Bo,e),j=()=>(_e(0,!0,!0),he(),!1),M=e=>(C(e.value,A),j()),N=e=>r?(C(null,A),A.isCanceled?j():(ne.current=y,f(u),!0)):M(e);if(m){let e=[...v].sort((e,t)=>e.offset-t.offset),t=e.map(e=>e.offset),n=Ud(t,E),r=e[Ud(t,k)],i=Math.sign(T),a=h!==0&&i!==0&&i===h&&Math.abs(T)>=$f,o=k;if(a){let t=Bd(n+h,0,e.length-1);if(t!==n){let n=e[t];(h>0?k<n.offset:k>n.offset)&&(r=n,o=n.offset)}else if(h>0)return N(r)}return Math.abs(o-w)<Math.abs(o-r.offset)?N(r):M(r)}let ee=v[Ud(v.map(e=>e.offset),k)];return T>=Qf&&p>0||Math.abs(k-w)<Math.abs(k-ee.offset)?N(ee):M(ee)},onDismiss(e){j?.set({swipeProgress:0,frontmostHeight:0});let t=s.context.backdropRef.current;t&&(t.style.setProperty(Ua,`0`),t.style.removeProperty(La));let n=Vo(Bo,e);if(s.setOpen(!1,n),n.isCanceled){let t=ne.current;t!==void 0&&C(t,Vo(Bo,e)),ne.current=void 0,re.current?.(),he();return}if(s.select(`open`)){let t=e;ie.request(()=>{if(s.select(`open`)){let e=ne.current;e!==void 0&&C(e,Vo(Bo,t)),ne.current=void 0,he(),re.current?.()}else ne.current=void 0});return}ne.current=void 0,me(!0)}}),xe=be.getPointerProps(),Se=be.getTouchProps(),{moveNative:Ce,reset:we}=be;re.current=we,b.useEffect(()=>{let e=k??A;if(!e)return;let t=e,n=Do(t);function r(e,r,i){let a=ee?i.clientY-r.lastY:i.clientX-r.lastX;if(e.touches.length===2||bp(n,t)||!T||!E||M||wp(r,e,i,ee))return;let o=r.scrollTarget;if(!o||o===n.documentElement||o===n.body){e.cancelable&&e.preventDefault(),e.stopPropagation(),Ce(e,t);return}if(!Tp(o,N)){e.cancelable&&e.preventDefault(),e.stopPropagation();return}if(a!==0){let t=Op(o,N,u,a);r.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(r.allowSwipe=!0,e.preventDefault()):r.allowSwipe=!1}r.allowSwipe===!0&&(e.stopPropagation(),Ce(e,t))}function i(e){if(ue?.onTouchMove(e),ce.current)return;let t=le.current,n=e.touches[0];!n||!t||(r(e,t,n),Cp(t,n))}return js(n,`touchmove`,i,{passive:!1,capture:!0})},[E,M,T,A,ee,N,u,Ce,k,ue]),Co(()=>{!de||be.swiping||_e(!T||D?0:fe??0,!0,!1)},[_e,p,D,f,T,fe,de,be.swiping,s,j]),Co(()=>{if(f)return T||f(0),()=>{f(0)}},[f,T]),Co(()=>{T&&(h.current||we(),he())},[he,T,we,h]),Co(()=>{let e=l.current;return()=>{j?.set({swipeProgress:0,frontmostHeight:0}),fp(e,!1);let t=l.current;t!==e&&fp(t,!1),ge()}},[l,ge,j]);let Te=b.useMemo(()=>({swiping:be.swiping,getDragStyles:be.getDragStyles,swipeStrength:P??null,setSwipeDismissed:me}),[me,be.getDragStyles,be.swiping,P]);function Ee(e){ce.current=e,le.current=null}function De(){Ee(!1),I.current=``,se.current=!1}function Oe(e){return I.current=``,e.pointerType!==`touch`}return(0,L.jsx)(qf,{ref:t,className:r,style:i,render:n,...na(o,{onPointerDown(e){if(I.current=e.pointerType,se.current=e.pointerType===`pen`,!T||!E||M)return;let t=kf(e.currentTarget.getRootNode(),e.clientX,e.clientY);pp(t)||mp(t)||e.pointerType!==`touch`&&xe.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&xe.onPointerMove?.(e)},onPointerUp(e){Oe(e)&&xe.onPointerUp?.(e)},onPointerCancel(e){Oe(e)&&xe.onPointerCancel?.(e)},onTouchStart(e){if(I.current===`pen`&&se.current){se.current=!1,Ee(!1);return}if(!T||!E||M){Ee(!1);return}let t=e.touches[0];if(!t)return;if(Sp(e)){Ee(!1);return}let n=e.currentTarget,r=kf(n.getRootNode(),t.clientX,t.clientY),i=ws(e.nativeEvent),a=Xa(i)?i:n;if(!Cs(n,a)){Ee(!0);return}if(ue?.onTouchStart(e),pp(r)){Ee(!0);return}ce.current=!1;let o=Of(a,n,N),s=Of(a,n,te)!=null,c=null;o&&(c=Dp(o,N,u)?null:!1),le.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:o,hasCrossAxisScrollableContent:s,allowSwipe:c,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},Se.onTouchStart?.(e)},onTouchEnd(e){ue?.onTouchEnd(e),De(),Se.onTouchEnd?.(e)},onTouchCancel(e){ue?.onTouchCancel(),De(),Se.onTouchCancel?.(e)},[Jf]:void 0}),children:(0,L.jsx)(Gd.Provider,{value:Te,children:a})})});function fp(e,t){e?.toggleAttribute(Pd,t)}function pp(e){return!!e?.closest(al)}function mp(e){return!!e?.closest(up)}function hp(e,t){return t===`left`||t===`right`?e.offsetWidth:e.offsetHeight}function gp(e,t){return Math.max(hp(e,t)*.5,Zf)}function _p(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function vp(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function yp(e,t){let n=Xa(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=Xa(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||Cs(t,n)||Cs(t,r)}function bp(e,t){let n=Ss(e);if(n&&Cs(t,n)&&vp(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:yp(r,t)}function xp(e,t){return e.composedPath().some(e=>_p(e,t))}function Sp(e){return xp(e.nativeEvent,qa(e.currentTarget))}function Cp(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function wp(e,t,n,r){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let i=r?n.clientY-e.startY:n.clientX-e.startX,a=r?n.clientX-e.startX:n.clientY-e.startY,o=Math.abs(i),s=Math.abs(a);return s>=cp&&s>o+lp?(e.preserveNativeCrossAxisScroll=!0,!0):o>=cp?(e.drawerAxisAttributed=!0,!1):!0}function Tp(e,t){return Ep(e,t).max>0}function Ep(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function Dp(e,t,n){let r=kp(n,t),{offset:i,max:a}=Ep(e,t);return r?i<=0:i>=a}function Op(e,t,n,r){return(kp(n,t)?r>0:r<0)?Dp(e,t,n):!1}function kp(e,t){return t===`vertical`?e===`down`:e===`right`}var Ap=(0,b.createContext)(null);function jp({modal:e=!0,showSwipeHandle:t=!1,...n}){let r=(0,b.useMemo)(()=>({modal:e,showSwipeHandle:t}),[e,t]);return(0,L.jsx)(Ap.Provider,{value:r,children:(0,L.jsx)(xf,{modal:e,swipeDirection:`down`,...n})})}var Mp=Ho,Np=Wf,Pp=Xo;function Fp({className:e,children:t,overlayClassName:n,...r}){let i=(0,b.useContext)(Ap);if(!i)throw Error(`DrawerContent must be rendered inside Drawer`);return(0,L.jsxs)($d,{children:[i.modal===!0?(0,L.jsx)(Wa,{className:`drawer-overlay ${n??``}`}):null,(0,L.jsx)(dp,{className:`drawer-viewport`,"data-modal":i.modal,children:(0,L.jsxs)(Xd,{className:`drawer-popup ${e??``}`,...r,children:[i.showSwipeHandle?(0,L.jsx)(`div`,{className:`drawer-swipe-handle`,"aria-hidden":`true`}):null,(0,L.jsx)(Wo,{className:`drawer-content`,children:t})]})})]})}var Ip=(0,b.createContext)(!1);function Lp(e){let t=ji(),{open:n,onOpenChange:r,children:i,dismissible:a=!0}=e;return(0,L.jsx)(Ip.Provider,{value:t,children:t?(0,L.jsx)(jp,{open:n,onOpenChange:r,showSwipeHandle:!0,disablePointerDismissal:!a,children:i}):(0,L.jsx)(ai,{open:n,onOpenChange:r,children:i})})}function Rp(e){let t=(0,b.useContext)(Ip),{className:n,overlayClassName:r,children:i,ariaDescribedBy:a,preventEscapeKeyDown:o=!1,wide:s=!1}=e;return t?(0,L.jsx)(Fp,{className:n,overlayClassName:r,"aria-describedby":a,"data-wide":s||void 0,children:i}):(0,L.jsxs)(li,{children:[(0,L.jsx)(di,{className:r}),(0,L.jsx)(hi,{className:n,"aria-describedby":a,"data-wide":s||void 0,onEscapeKeyDown:o?e=>e.preventDefault():void 0,children:i})]})}function zp(e){return(0,b.useContext)(Ip)?(0,L.jsx)(Np,{...e}):(0,L.jsx)(bi,{...e})}function Bp(e){return(0,b.useContext)(Ip)?(0,L.jsx)(Pp,{...e}):(0,L.jsx)(Si,{...e})}function Vp(e){return(0,b.useContext)(Ip)?(0,L.jsx)(Mp,{render:e.children,children:e.children.props.children}):(0,L.jsx)(wi,{asChild:!0,children:e.children})}function Hp(e){let{open:t,onOpenChange:n,title:r,description:i,children:a,wide:o=!1}=e;return(0,L.jsx)(Lp,{open:t,onOpenChange:n,children:(0,L.jsxs)(Rp,{className:`sheet-content`,overlayClassName:`sheet-overlay`,wide:o,children:[(0,L.jsxs)(`header`,{className:`sheet-header`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Simplex operator`}),(0,L.jsx)(zp,{children:r}),i?(0,L.jsx)(Bp,{children:i}):null]}),(0,L.jsx)(Vp,{children:(0,L.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":`Close panel`,children:(0,L.jsx)(De,{"aria-hidden":`true`})})})]}),(0,L.jsx)(`div`,{className:`sheet-body`,children:a})]})})}function Up(e){let{open:t,onClose:n,title:r,description:i,children:a,wide:o=!1}=e;return(0,L.jsx)(Hp,{open:t,onOpenChange:e=>{e||n()},title:r,description:i,wide:o,children:a})}var Wp={desktop:{eyebrow:`Three simple steps`,title:`Save Simplex to your desktop`,description:`Install once, then launch Simplex like any other desktop app.`,steps:[{title:`Select the install icon`,description:`Look for the small screen with a downward arrow at the top of this window.`,visual:`toolbar`},{title:`Choose Install`,description:`A confirmation window will appear. Select Install to continue.`,visual:`confirm`},{title:`Open Simplex from your desktop`,description:`Simplex will appear with your other apps and open in its own window.`,visual:`desktop`}]},mobile:{eyebrow:`Install on mobile`,title:`Save Simplex to your home screen`,description:`Use your browser’s install or share menu to save Simplex for quicker access and offline startup.`,steps:[{title:`Open your browser menu`,description:`Look for the menu or Share control in the browser you use.`,visual:`browser-menu`},{title:`Choose Add to Home Screen or Install`,description:`Choose Add to Home Screen or Install app depending on the platform`,visual:`confirm`},{title:`Confirm, then open Simplex`,description:`Simplex is added to your home screen and opens as its own app.`,visual:`home-screen`}]}};function Gp(){let e=navigator.userAgent,t=/iPad/.test(e)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1;return/Android|iPhone|iPod|Mobile/.test(e)||t?`mobile`:`desktop`}function Kp(e){let t=Wp[e.platform];return(0,L.jsxs)(`section`,{className:`install-guide-panel`,"aria-labelledby":`install-guide-title`,children:[(0,L.jsxs)(`header`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:t.eyebrow}),(0,L.jsx)(`h2`,{id:`install-guide-title`,children:t.title}),(0,L.jsx)(`p`,{children:t.description})]}),(0,L.jsx)(`ol`,{className:`install-step-list`,children:t.steps.map((e,t)=>(0,L.jsxs)(`li`,{className:`install-step`,children:[(0,L.jsx)(`span`,{className:`install-step-number`,"aria-hidden":`true`,children:t+1}),(0,L.jsxs)(`div`,{className:`install-step-copy`,children:[(0,L.jsx)(`strong`,{children:e.title}),(0,L.jsx)(`p`,{children:e.description})]}),(0,L.jsx)(qp,{visual:e.visual})]},e.title))})]})}function qp(e){return e.visual===`toolbar`?(0,L.jsx)(Xp,{}):e.visual===`confirm`?(0,L.jsx)(Zp,{}):e.visual===`browser-menu`?(0,L.jsx)(Jp,{}):e.visual===`home-screen`?(0,L.jsx)(Yp,{}):(0,L.jsx)(Qp,{})}function Jp(){return(0,L.jsxs)(`div`,{className:`install-visual install-mobile-action-visual`,"aria-hidden":`true`,children:[(0,L.jsx)(`span`,{children:`Browser`}),(0,L.jsx)(`b`,{children:`⋮`}),(0,L.jsx)(`small`,{children:`Install or add`})]})}function Yp(){return(0,L.jsxs)(`div`,{className:`install-visual install-desktop-visual`,"aria-hidden":`true`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`img`,{src:`./icons/mobile-logo.svg`,alt:``}),(0,L.jsx)(`span`,{children:`Simplex`})]}),(0,L.jsx)(`small`,{children:`Home screen`})]})}function Xp(){return(0,L.jsxs)(`div`,{className:`install-visual install-toolbar-visual`,"aria-hidden":`true`,children:[(0,L.jsxs)(`div`,{className:`install-window-controls`,children:[(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{})]}),(0,L.jsx)(`div`,{className:`install-window-address`,children:`Simplex`}),(0,L.jsx)(`span`,{className:`install-target-icon`,children:(0,L.jsx)($p,{})}),(0,L.jsx)(`small`,{children:`Click this icon`})]})}function Zp(){return(0,L.jsxs)(`div`,{className:`install-visual install-confirm-visual`,"aria-hidden":`true`,children:[(0,L.jsx)(`img`,{src:`./icons/mobile-logo.svg`,alt:``}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Install Simplex?`}),(0,L.jsx)(`small`,{children:`Opens in its own window`})]}),(0,L.jsx)(`b`,{children:`Install`})]})}function Qp(){return(0,L.jsxs)(`div`,{className:`install-visual install-desktop-visual`,"aria-hidden":`true`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`img`,{src:`./icons/mobile-logo.svg`,alt:``}),(0,L.jsx)(`span`,{children:`Simplex`})]}),(0,L.jsx)(`small`,{children:`Desktop · Dock · App list`})]})}function $p(e){return(0,L.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,...e,children:[(0,L.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`13`,rx:`2`}),(0,L.jsx)(`path`,{d:`M12 7v6m0 0 2.5-2.5M12 13l-2.5-2.5M8 21h8M12 17v4`,strokeLinecap:`round`})]})}function em(){let e=navigator;return window.matchMedia(`(display-mode: standalone)`).matches||e.standalone===!0}var tm=(0,b.createContext)(null);function nm(e){let[t,n]=(0,b.useState)(),[r,i]=(0,b.useState)(em),[a,o]=(0,b.useState)(!1),s=Gp();(0,b.useEffect)(()=>{let e=e=>{e.preventDefault(),n(e)},t=()=>{n(void 0),i(!0),o(!1)};return window.addEventListener(`beforeinstallprompt`,e),window.addEventListener(`appinstalled`,t),()=>{window.removeEventListener(`beforeinstallprompt`,e),window.removeEventListener(`appinstalled`,t)}},[]);let c=r?`installed`:t?`prompt-ready`:`manual`,l=(0,b.useCallback)(()=>{o(!0)},[]),u=(0,b.useCallback)(async()=>{if(!t){P.info(`Use your browser’s install menu`,{description:`Open your browser’s menu or Share control, then choose Install or Add to Home Screen.`});return}try{await t.prompt(),(await t.userChoice).outcome===`accepted`?(i(!0),o(!1)):P.info(`Installation was cancelled`,{description:`Open this guide again when you’re ready to retry.`})}catch{P.error(`The install window could not open`,{description:`Select the icon shown in step 1 instead.`})}finally{n(void 0)}},[t]),d=(0,b.useMemo)(()=>({status:c,openGuide:l}),[c,l]);return(0,L.jsxs)(tm.Provider,{value:d,children:[e.children,(0,L.jsx)(tee,{open:a,onOpenChange:o,status:c,platform:s,onInstall:u})]})}function rm(e){let{status:t,openGuide:n}=eee(),r=t===`installed`,i=r?Te:Oe;return e.variant===`nav`?(0,L.jsxs)(`button`,{type:`button`,className:`operator-nav-item operator-install-nav`,onClick:n,"aria-haspopup":`dialog`,title:r?`Simplex is installed`:`Install Simplex app`,children:[(0,L.jsx)(i,{"aria-hidden":`true`}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:r?`App installed`:`Install app`}),(0,L.jsx)(`small`,{children:r?`Standalone mode`:`Install and use offline`})]})]}):(0,L.jsxs)(`button`,{type:`button`,className:`pwa-install-control`,"data-state":r?`installed`:void 0,onClick:n,"aria-haspopup":`dialog`,title:r?`Simplex is installed`:`Install Simplex app`,children:[(0,L.jsx)(i,{"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`pwa-install-label`,children:r?`Installed`:`Install app`})]})}function eee(){let e=(0,b.useContext)(tm);if(!e)throw Error(`InstallAppButton must be rendered inside InstallAppProvider`);return e}function tee(e){let t=e.status===`installed`,n=e.platform!==`desktop`;return(0,L.jsx)(Lp,{open:e.open,onOpenChange:e.onOpenChange,children:(0,L.jsxs)(Rp,{className:`install-dialog`,overlayClassName:`install-dialog-overlay`,ariaDescribedBy:`install-dialog-description`,children:[(0,L.jsxs)(`header`,{className:`install-dialog-header`,children:[(0,L.jsx)(`img`,{src:`./icons/mobile-logo.svg`,alt:``}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`span`,{className:`eyebrow`,children:[`Simplex `,n?`mobile`:`desktop`,` app`]}),(0,L.jsx)(zp,{children:t?`Simplex is installed`:`Install Simplex`}),(0,L.jsx)(Bp,{id:`install-dialog-description`,children:t?`You’re running Simplex as a standalone app.`:n?`Save Simplex to your home screen for quicker access and an app-like experience.`:`Save Simplex to your desktop for quicker access and a dedicated app window.`})]}),(0,L.jsx)(Vp,{children:(0,L.jsx)(`button`,{type:`button`,className:`install-dialog-close`,"aria-label":`Close install guide`,children:(0,L.jsx)(De,{"aria-hidden":`true`})})})]}),t?(0,L.jsxs)(`div`,{className:`install-success`,children:[(0,L.jsx)(`span`,{className:`install-success-icon`,children:(0,L.jsx)(Te,{"aria-hidden":`true`})}),(0,L.jsx)(`h2`,{children:`You’re all set`}),(0,L.jsx)(`p`,{children:n?`Open Simplex from your home screen.`:`Open Simplex from your desktop, Dock, taskbar, Start menu, or Applications folder.`}),(0,L.jsx)(Vp,{children:(0,L.jsx)(`button`,{type:`button`,className:`primary`,children:`Done`})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`install-guide-content`,children:(0,L.jsx)(Kp,{platform:e.platform})}),(0,L.jsxs)(`footer`,{className:`install-dialog-footer`,children:[(0,L.jsx)(`span`,{children:`Usually takes less than a minute.`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(Vp,{children:(0,L.jsx)(`button`,{type:`button`,className:`secondary`,children:`Maybe later`})}),(0,L.jsxs)(`button`,{type:`button`,className:`primary`,onClick:()=>void e.onInstall(),children:[(0,L.jsx)(Oe,{"aria-hidden":`true`}),`Install Simplex`]})]})]})]})]})})}function nee(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[...new Set([1,2,t-1,t,e-1,e,e+1])].filter(e=>e>=1&&e<=t).sort((e,t)=>e-t),r=[];for(let e of n){let t=r[r.length-1];typeof t==`number`&&e-t>1&&r.push(`…`),r.push(e)}return r}function im(e){let{page:t,pageSize:n,total:r,noun:i,onPage:a}=e,o=Math.max(1,Math.ceil(r/n)),s=r===0?0:(t-1)*n+1,c=Math.min(r,t*n),l=r===1?i.replace(/s$/,``):i;return(0,L.jsxs)(`nav`,{className:`history-pager`,"aria-label":`${i} pages`,children:[(0,L.jsx)(`small`,{children:r===0?`No ${i}`:`Showing ${s}–${c} of ${r.toLocaleString()} ${l}`}),(0,L.jsxs)(`div`,{className:`history-pager-pages`,children:[(0,L.jsx)(`button`,{type:`button`,disabled:t<=1,onClick:()=>a(t-1),"aria-label":`Previous page`,children:`‹`}),nee(t,o).map((e,n)=>e===`…`?(0,L.jsx)(`span`,{children:`…`},`gap-${n}`):(0,L.jsx)(`button`,{type:`button`,"data-active":e===t,"aria-current":e===t?`page`:void 0,onClick:()=>a(e),children:e},e)),(0,L.jsx)(`button`,{type:`button`,disabled:t>=o,onClick:()=>a(t+1),"aria-label":`Next page`,children:`›`})]})]})}var ree=``+new URL(`cngn-r3JbjSKP.png`,import.meta.url).href,iee=``+new URL(`dai-BSf06t6d.png`,import.meta.url).href,aee=``+new URL(`eurc-Cp-7NYeU.png`,import.meta.url).href,am=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%23F0B90B'/%3e%3cpath%20d='M10.5447%209.06112L16.0002%206L21.4558%209.06112L19.4557%2010.1945L16.0002%208.26112L12.5502%2010.1945L10.5447%209.06112ZM21.4558%2012.9278L19.4557%2011.7944L16.0002%2013.7278L12.5502%2011.7944L10.5447%2012.9278V15.1889L13.9891%2017.1222V20.9833L16.0002%2022.1167L18.0058%2020.9833V17.1222L21.4558%2015.1889V12.9278ZM21.4558%2019.0556V16.7889L19.4557%2017.9223V20.1834L21.4558%2019.0556ZM22.8835%2019.8556L19.4336%2021.7834V24.05L24.8892%2020.9833V14.8612L22.8835%2015.989V19.8556ZM20.878%2010.9945L22.878%2012.1278V14.3889L24.8892%2013.2611V10.9945L22.8835%209.86114L20.878%2011V10.9945ZM13.9891%2022.6055V24.8666L16.0002%2026L18.0058%2024.8666V22.6111L16.0002%2023.7389L13.9947%2022.6055H13.9891ZM10.5447%2019.05L12.5447%2020.1834V17.9223L10.5447%2016.7889V19.0556V19.05ZM13.9891%2010.9945L16.0002%2012.1278L18.0058%2010.9945L16.0002%209.86114L13.9947%2011L13.9891%2010.9945ZM9.11688%2012.1278L11.1224%2010.9945L9.12243%209.86114L7.11133%2011V13.2667L9.11688%2014.3945V12.1333V12.1278ZM9.11688%2015.989L7.11133%2014.8612V20.9833L12.5669%2024.05V21.7778L9.12243%2019.85V15.9834L9.11688%2015.989Z'%20fill='white'/%3e%3c/svg%3e`,om=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cg%20clip-path='url(%23clip0_1059_55505)'%3e%3cpath%20d='M16.1476%205L16%205.50135V20.0481L16.1476%2020.1953L22.8999%2016.204L16.1476%205Z'%20fill='%23343434'/%3e%3cpath%20d='M16.3667%204.99902L9.61426%2016.203L16.3667%2020.1944V13.1338V4.99902Z'%20fill='%238C8C8C'/%3e%3cpath%20d='M16.3664%2021.4727L16.2832%2021.5741V26.7559L16.3664%2026.9987L23.1228%2017.4834L16.3664%2021.4727Z'%20fill='%233C3C3B'/%3e%3cpath%20d='M16.3667%2026.9987V21.4727L9.61426%2017.4834L16.3667%2026.9987Z'%20fill='%238C8C8C'/%3e%3cpath%20d='M16.3662%2020.1944L23.1185%2016.203L16.3662%2013.1338V20.1944Z'%20fill='%23141414'/%3e%3cpath%20d='M9.61426%2016.203L16.3667%2020.1944V13.1338L9.61426%2016.203Z'%20fill='%23393939'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1059_55505'%3e%3crect%20width='13.5089'%20height='22'%20fill='white'%20transform='translate(9.61426%205)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,sm=`data:image/svg+xml,%3csvg%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_1344_1140'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='40'%20height='40'%3e%3crect%20width='40'%20height='40'%20rx='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1344_1140)'%3e%3crect%20width='40'%20height='40'%20fill='white'/%3e%3cpath%20d='M25.8337%2016.0383C25.4109%2015.7892%2024.8614%2015.7892%2024.3964%2016.0383L21.0991%2017.9484L18.8586%2019.1942L15.5613%2021.1043C15.1386%2021.3534%2014.589%2021.3534%2014.124%2021.1043L11.5031%2019.6094C11.0803%2019.3602%2010.7844%2018.9035%2010.7844%2018.4052V15.457C10.7844%2014.9587%2011.0381%2014.5019%2011.5031%2014.2528L14.0817%2012.7994C14.5045%2012.5503%2015.054%2012.5503%2015.519%2012.7994L18.0977%2014.2528C18.5204%2014.5019%2018.8163%2014.9587%2018.8163%2015.457V17.3671L21.0568%2016.0798V14.1697C21.0568%2013.6714%2020.8032%2013.2147%2020.3382%2012.9655L15.5613%2010.2249C15.1386%209.9758%2014.589%209.9758%2014.124%2010.2249L9.26259%2012.9655C8.79758%2013.2147%208.54395%2013.6714%208.54395%2014.1697V19.6925C8.54395%2020.1907%208.79758%2020.6475%209.26259%2020.8967L14.124%2023.6373C14.5467%2023.8864%2015.0963%2023.8864%2015.5613%2023.6373L18.8586%2021.7686L21.0991%2020.4814L24.3964%2018.6128C24.8191%2018.3637%2025.3687%2018.3637%2025.8337%2018.6128L28.4124%2020.0662C28.8351%2020.3153%2029.131%2020.7721%2029.131%2021.2704V24.2185C29.131%2024.7169%2028.8774%2025.1736%2028.4124%2025.4228L25.8337%2026.9177C25.4109%2027.1668%2024.8614%2027.1668%2024.3964%2026.9177L21.8178%2025.4643C21.395%2025.2152%2021.0991%2024.7584%2021.0991%2024.2601V22.35L18.8586%2023.6373V25.5473C18.8586%2026.0456%2019.1123%2026.5024%2019.5772%2026.7515L24.4387%2029.4921C24.8614%2029.7413%2025.4109%2029.7413%2025.876%2029.4921L30.7374%2026.7515C31.1601%2026.5024%2031.4561%2026.0456%2031.4561%2025.5473V20.0246C31.4561%2019.5263%2031.2024%2019.0696%2030.7374%2018.8205L25.8337%2016.0383Z'%20fill='%238247E5'/%3e%3c/g%3e%3c/svg%3e`,cm={CNGN:ree,DAI:iee,ETH:om,EURC:aee,BNB:am,MATIC:sm,USDC:``+new URL(`usdc-DIfx2x0l.png`,import.meta.url).href,USDT:``+new URL(`usdt-Bi9yaTSh.png`,import.meta.url).href,ZARP:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAA3NCSVQICAjb4U/gAAAAM1BMVEUAST2fqhf/5ADv2gSPoBtwjSIwZjJQeSrPxwsQUzkgXDWvtBOAlx9ggyZAcC7f0Qi/vQ9HYjv5AAAIE0lEQVR4nO3d61bjOgyGYUg5lTkw93+1ewOriyaWUgfLlize5/9MHb747CR3dwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDk7pcvJ+/CXJyuCnXvXZixrvNYHrxLc/Gw/NREHq+vfHnyLs7F06pYj97FGed5deEv3sX58rIq2LN3cUZ5Oq2uO9CduK65pzBVt6/z+j5cXr0L9OV1XbKXs3eBhvi1vupf3uW5FrlsvfxeX/Pyx7tA1/5sCvfbu0D9/d1c8hKqWThvS/fXu0S9nd82VxysVdi0WctbqPulg+0Fx2qxyjYr2g1jrbjeWC2W0GZFu2NsvZ62lxvuBiyq8CnQsNzcv/j3X1mH/3kXqZ/H4mIjzQo/vZZlDLSUYOtcNFiR1rEuXopCnoL1c2aK5jnkzSdU43AdnY1iSrgEWnn/8iQUM+f0cDsl/N+bd5kks5SzldAUxNkrvPYgFDRg09pK6NGDbgE9CwVN2K9vF3k/eBdKJpU03bKvMLwPO3oRRoMBJ0yN7qWLDNoyS71dtkMoYgWJOOh9Jw18s1URsYJUDib/Gqr7RWHgm6yKyBWk8hLFf/tNdb8o3j6pqoh8hZUrveMDKVd83yWqIuWuz4fKW258IHKFjraX1kCcg1SvR4wPRO5EEs1FpEl6fRPgEIjcxIY5pd9KbpKrNwsdAmkscXTlls+H2lGLQyBKJxJwO+075HlW/ZK2QyBKJxJ1JnuQ3CDXL2R5BCIuZ2UZ+cpdev1Clkcg4nJWkm5d6SDrq79HIEozm6JbV2p//V6IRyDajwbdMDhCmaUfOH7mEkh5pO/T/LN1rcWq3053CUTaWH83f5ultVj1V+YSiHYfTd9maS3WgSG9SyBarz59m6XdaQfON7gEov7q7G2WMis8cqTcJxCtV599bqjMCo8ckfMJROvVJ58bqk3xgZrvE4ja1s69niVvTS2Hji/7BCIdDf8w9zaV1hIfObPoE4j6s3M/UKVd1ZHj5EeO+SiLgt8JRFmBj3r+tY5a73vdZuoPHv9jqpV75odF1Bu2V0NsGIja/QU9AFtFWzfpdlE3AjkyZlVvpplXT9R2uFe13w/k0Auw1P9q4sep1IWsbscy1Sp5OA/toMMy83KWfr92+kFtoebTwSmd+v/M26ur/WKn8zT7eRxdFlROL808NVT/QH1GvbZ56OPeedcX1Uvq8vStcR7q8uLEc3X1r9Oj0lvnoTe48y74Wv55bjHPQ1/vnXbxRB9k2Y9T7PMYWvwxBl5RhzwSBqI2wuZ1fn+R97sNpPofzjruHRaI3tq35JEvEH0dw/Z3OuWhBzLr8qI6DbGdqPfKQ5+qzzoRUQMxvaD9PFpalzHlH0g7AmR6Qft5NK1yqIHMOjNU/0yGgXTMQw9k1plhp7/TtZ557ExubAo/nHo9ZsPGrnkMnEcN0j0Q9VykSR4EctSTOmowyYNADuqdR7pA9FMCJoF0zyNdIH1rSP88dgKZ9AR8z0AG5EENOWBEHgRSbz8Pq4UAAqm1n4fZ9zl/TiCNTUrx6b0+efygpZO2NmX7Ld1eeeRbXOyz/D4sj3zL7102eMblkW+DqscW7sA88m3hdjjkMDKPfIcc7IeNQ/PIdwzIPJCxeeQLxPos5uA88h0ltb6i3QcIzfNIGIjx4wi7B6o7fNM53+MI+szwO43wfh4ddigSPrBj+Ujb8DwyPtJm+NDn+DwyPvRp91i0Qx4ZH4s2e3GARx4ZXxxg9WoN0xc01Mr4ag2jl8/s59FrEJrx5TM2r2faP8DbLZCUr2eyeIHZrTx6BZLyBWYGr/i7mUevQFK+4s/gJZg381h6fA33LulLMA1eE3s7kGOaf3jeefq79hcpewWS9EXK7a8a9wok6avG21/G7xVI0pfxt3+uwiuQrJ+raP6gi1cg2r+f/YMuzZ88cgok7SePmj8K5hRI2o+CNX82zymQvJ/Na/2wpFMgeT8s2frpVadAlH89f4vV/HFin0Ayf5y48fPdPoFk/nx34wfufQJJ/YF7pfpXrsD7BKKsvU++jnWhnKepO+jgEohywKHTRx2GU7r1ug7SJZCmEk9A7tbrGmSXQORuL0eX/k7epqrrRFwCkbuQubemrimz9apOxCMQpQtJMEu/kJuAqibZIxC5C8kx5v0k33JVV+gRiHz/9PqynAvxEqs6kWOHfGyOAYldSKYKolWRoPMseSabqoIoVSTooUxxIStXBVGqSNDFbHEhK1kFUeYi3oWSSSXNMwe5OEvT9WfvUkmehYKeEs1BLqSWucsHJltJ2+lBe7s2wmAy5MNIs5SzmXR8OeDAVxr0Tv1IiE4YvQRsCoSmNehosJnQrwfc8im30zL26J+Emy/c8F6YMAWsxlbK42fhNuHKld65H5na91o0WuGa56Kj6/Dip0DK+y9Y+1zupYWrw7aKGzDY9RZ3TLgqbKx4b3uwC97eMG/BarC9YnoY6oqLFivplPDadtk3VJu1bbHyLfIKNq1CqDYrctm62b5+N9CwcjMrtH/1bEybD+QEmgivlxJ6vaounvUWUKD1rHXdDbl91sf6TgxzI65X3gPV3P5Wh1DC7Buu9gqzHTO54TqRMKfKTz83DwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGT0H6vbfodXGliCAAAAAElFTkSuQmCC`};function lm({symbol:e,size:t=`md`}){let n=e.trim().toUpperCase();return(0,L.jsx)(`img`,{className:`token-icon token-icon-${t}`,src:cm[n]??`data:image/svg+xml,%3csvg%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M36.7388%2018.1588L21.8412%203.26125C21.3337%202.75375%2020.6663%202.5%2020%202.5C19.3337%202.5%2018.6663%202.75375%2018.1588%203.26125L3.26125%2018.1588C2.75375%2018.6663%202.5%2019.3325%202.5%2020C2.5%2020.6675%202.75375%2021.3337%203.26125%2021.8412L18.1575%2036.7375C18.6663%2037.2463%2019.3337%2037.5%2020%2037.5C20.6663%2037.5%2021.3337%2037.2463%2021.8412%2036.7388L36.7375%2021.8425C37.2463%2021.3338%2037.5%2020.6675%2037.5%2020C37.5%2019.3325%2037.2463%2018.6663%2036.7388%2018.1588ZM20%2030C19.5027%2030%2019.0258%2029.8025%2018.6742%2029.4508C18.3225%2029.0992%2018.125%2028.6223%2018.125%2028.125C18.125%2027.6277%2018.3225%2027.1508%2018.6742%2026.7992C19.0258%2026.4475%2019.5027%2026.25%2020%2026.25C20.4973%2026.25%2020.9742%2026.4475%2021.3258%2026.7992C21.6775%2027.1508%2021.875%2027.6277%2021.875%2028.125C21.875%2028.6223%2021.6775%2029.0992%2021.3258%2029.4508C20.9742%2029.8025%2020.4973%2030%2020%2030ZM21.4062%2021.56V23.9062H18.5938V18.75H21.25C22.5425%2018.75%2023.5938%2017.6988%2023.5938%2016.4062C23.5938%2015.1137%2022.5425%2014.0625%2021.25%2014.0625H18.75C18.1286%2014.0632%2017.5328%2014.3103%2017.0934%2014.7497C16.6541%2015.1891%2016.4069%2015.7849%2016.4062%2016.4062V17.0312H13.5938V16.4062C13.5954%2015.0392%2014.1392%2013.7287%2015.1058%2012.7621C16.0724%2011.7954%2017.383%2011.2517%2018.75%2011.25H21.25C22.617%2011.2517%2023.9276%2011.7954%2024.8942%2012.7621C25.8608%2013.7287%2026.4046%2015.0392%2026.4062%2016.4062C26.4046%2017.7462%2025.8821%2019.0331%2024.949%2019.9948C24.016%2020.9566%2022.7456%2021.5178%2021.4062%2021.56Z'%20fill='white'/%3e%3c/svg%3e`,alt:``,"aria-hidden":`true`})}function um({tokenA:e,tokenB:t}){return(0,L.jsxs)(`span`,{className:`token-pair-icons`,"aria-hidden":`true`,children:[(0,L.jsx)(lm,{symbol:e,size:`lg`}),(0,L.jsx)(lm,{symbol:t,size:`lg`})]})}var dm={hyperfxApp:`https://app.hyperfx.finance`,hyperbridgeExplorers:{mainnet:`https://nexus.statescan.io`,testnet:`https://gargantua.statescan.io`},chainExplorers:{ethereum:`https://etherscan.io`,arbitrum:`https://arbiscan.io`,base:`https://basescan.org`,polygon:`https://polygonscan.com`,bnb:`https://bscscan.com`,sepolia:`https://sepolia.etherscan.io`,arbitrumSepolia:`https://sepolia.arbiscan.io`,baseSepolia:`https://sepolia.basescan.org`,polygonAmoy:`https://amoy.polygonscan.com`,bnbChapel:`https://testnet.bscscan.com`}},fm={1:`ETH`,56:`BNB`,97:`BNB`,100:`xDAI`,130:`ETH`,137:`MATIC`,250:`FTM`,43114:`AVAX`,42161:`ETH`,8453:`ETH`,10:`ETH`,80002:`MATIC`,84532:`ETH`,11155111:`ETH`,421614:`ETH`};function pm(e){return fm[e]??`ETH`}var mm=[{chainId:1,stateMachineId:`EVM-1`,label:`Ethereum`,network:`mainnet`,alchemySubdomain:`eth-mainnet`,explorerUrl:dm.chainExplorers.ethereum},{chainId:42161,stateMachineId:`EVM-42161`,label:`Arbitrum`,network:`mainnet`,alchemySubdomain:`arb-mainnet`,explorerUrl:dm.chainExplorers.arbitrum},{chainId:8453,stateMachineId:`EVM-8453`,label:`Base`,network:`mainnet`,alchemySubdomain:`base-mainnet`,explorerUrl:dm.chainExplorers.base},{chainId:137,stateMachineId:`EVM-137`,label:`Polygon`,network:`mainnet`,alchemySubdomain:`polygon-mainnet`,explorerUrl:dm.chainExplorers.polygon},{chainId:56,stateMachineId:`EVM-56`,label:`BNB Chain`,network:`mainnet`,alchemySubdomain:`bnb-mainnet`,explorerUrl:dm.chainExplorers.bnb},{chainId:11155111,stateMachineId:`EVM-11155111`,label:`Sepolia`,network:`testnet`,alchemySubdomain:`eth-sepolia`,explorerUrl:dm.chainExplorers.sepolia},{chainId:421614,stateMachineId:`EVM-421614`,label:`Arbitrum Sepolia`,network:`testnet`,alchemySubdomain:`arb-sepolia`,explorerUrl:dm.chainExplorers.arbitrumSepolia},{chainId:84532,stateMachineId:`EVM-84532`,label:`Base Sepolia`,network:`testnet`,alchemySubdomain:`base-sepolia`,explorerUrl:dm.chainExplorers.baseSepolia},{chainId:80002,stateMachineId:`EVM-80002`,label:`Polygon Amoy`,network:`testnet`,alchemySubdomain:`polygon-amoy`,explorerUrl:dm.chainExplorers.polygonAmoy},{chainId:97,stateMachineId:`EVM-97`,label:`BSC Chapel`,network:`testnet`,alchemySubdomain:`bnb-testnet`,explorerUrl:dm.chainExplorers.bnbChapel}];function hm(e){return mm.find(t=>t.chainId===e)}function gm(e){let t=e.replace(/^0+/,``).length;return t>=5?0:t>=3?2:4}function _m(e,t,n){if(!/^\d+$/.test(e))return e;if(t===null||t===0)return ym(e);let r=e.padStart(t+1,`0`),i=n??gm(r.slice(0,r.length-t)),a=Math.min(i,t),o=t-a,s=BigInt(e);if(o>0){let e=10n**BigInt(o);s=(s+e/2n)/e}let c=s.toString().padStart(a+1,`0`),l=c.slice(0,c.length-a),u=a>0?c.slice(c.length-a).replace(/0+$/,``):``;return u===``&&l===`0`&&e!==`0`?`<0.${`0`.repeat(Math.max(i-1,0))}1`:u?`${ym(l)}.${u}`:ym(l)}function vm(e,t){let n=/^(\d+)(?:\.(\d+))?$/.exec(e.trim());if(!n)return e;let r=n[2]??``;return _m(n[1]+r,r.length,t)}function ym(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,`,`)}function bm(e){return e.toLocaleString(void 0,{maximumFractionDigits:4})}function xm(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function Sm(e){return new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`})}function oee(e){let t=e.replace(/^0x/,``);if(t.length!==64)return wm(e);let n=t.replace(/(00)+$/,``);if(n.length>0&&n.length%2==0){let e=(n.match(/../g)??[]).map(e=>String.fromCharCode(Number.parseInt(e,16))).join(``);if(/^[\x20-\x7e]+$/.test(e))return e}return/^0{24}/.test(t)?wm(`0x${t.slice(24)}`):wm(e)}function Cm(e){return Date.parse(`${e.replace(` `,`T`)}Z`)}function wm(e,t=6,n=4){return e.length>t+n+2?`${e.slice(0,t)}…${e.slice(-n)}`:e}var Tm=Object.defineProperty,Em=(e,t)=>Tm(e,`name`,{value:t,configurable:!0});function Dm(e,[t,n]){return Math.min(n,Math.max(t,e))}Em(Dm,`clamp`);var Om=Object.defineProperty,km=(e,t)=>Om(e,`name`,{value:t,configurable:!0});function Am(e){let t=e+`CollectionProvider`,[n,r]=Qe(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=km(e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,L.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=_t(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,L.jsx)(c,{ref:Je(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=_t(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Je(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,L.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return km(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}km(Am,`createCollection`);var jm=new WeakMap,Mm=class e extends Map{static{km(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],jm.set(this,!0)}set(e,t){return jm.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Fm(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t===void 0?!1:this.delete(t)}at(e){let t=Nm(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Nm(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Nm(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Nm(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Pm(e,t);return n===-1?void 0:e[n]}km(Nm,`at`);function Pm(e,t){let n=e.length,r=Fm(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}km(Pm,`toSafeIndex`);function Fm(e){return e!==e||e===0?0:Math.trunc(e)}km(Fm,`toSafeInteger`);function Im(e){let t=e+`CollectionProvider`,[n,r]=Qe(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Mm,setItemMap:km(()=>void 0,`setItemMap`)}),o=km(({state:e,...t})=>e?(0,L.jsx)(c,{...t,state:e}):(0,L.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=km(e=>{let t=h();return(0,L.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=km(e=>{let{scope:t,children:n,state:r}=e,a=b.useRef(null),[o,s]=b.useState(null),c=Je(a,s),[l,u]=r;return b.useEffect(()=>{if(!o)return;let e=Bm(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,L.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=_t(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,L.jsx)(u,{ref:Je(t,a(l,n).collectionRef),children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=_t(f),m=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),[s,c]=b.useState(null),l=Je(t,o,c),{setItemMap:u}=a(f,n),d=b.useRef(i);Lm(d.current,i)||(d.current=i);let m=d.current;return b.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(zm):(t.set(s,{...e,element:s}),t.toSorted(zm)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Mm(e)))}},[s,m,u]),(0,L.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return b.useState(new Mm)}km(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return km(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}km(Im,`createCollection`);function Lm(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}km(Lm,`shallowEqual`);function Rm(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}km(Rm,`isElementPreceding`);function zm(e,t){return!e[1].element||!t[1].element?0:Rm(e[1].element,t[1].element)?-1:1}km(zm,`sortByDocumentPosition`);function Bm(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}km(Bm,`getChildListObserver`);var Vm=Object.defineProperty,Hm=(e,t)=>Vm(e,`name`,{value:t,configurable:!0}),Um=b.createContext(void 0);function Wm(e){let t=b.useContext(Um);return e||t||`ltr`}Hm(Wm,`useDirection`);var Gm=Object.defineProperty,Km=b.forwardRef(((e,t)=>Gm(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,L.jsx)(Nt.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,L.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),qm=Object.defineProperty,Jm=(e,t)=>qm(e,`name`,{value:t,configurable:!0});function Ym(e){let[t,n]=b.useState(void 0);return et(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}Jm(Ym,`useSize`);var Xm=Object.defineProperty,Zm=(e,t)=>Xm(e,`name`,{value:t,configurable:!0}),Qm=`Popper`,[$m,eh]=Qe(Qm),[th,nh]=$m(Qm),rh=Zm(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,L.jsx)(th,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),ih=`PopperAnchor`,ah=b.forwardRef(Zm(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=nh(ih,n),o=b.useRef(null),s=a.onAnchorChange,c=Je(t,b.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&hh(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,L.jsx)(Nt.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),oh=`PopperContent`,[sh,ch]=$m(oh),lh=b.forwardRef(Zm(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=nh(oh,n),[_,v]=b.useState(null),y=Je(t,v),[x,S]=b.useState(null),C=Ym(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(ph),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:ee,middlewareData:te}=Nu({strategy:`fixed`,placement:E,whileElementsMounted:Zm((...e)=>yu(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Fu({mainAxis:i+T,alignmentAxis:o}),c&&Iu({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Lu():void 0,...A}),c&&Ru({...A}),zu({...A,apply:Zm(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&Vu({element:x,padding:s}),mh({arrowWidth:w,arrowHeight:T}),f&&Bu({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),P=g.setPlacementState;et(()=>(P(N),()=>{P(void 0)}),[N,P]);let[F,ne]=hh(N),re=Lt(m);et(()=>{ee&&re?.()},[ee,re]);let ie=te.arrow?.x,ae=te.arrow?.y,oe=te.arrow?.centerOffset!==0,[I,se]=b.useState();return et(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),(0,L.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ee?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:I,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(` `),...te.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,L.jsx)(sh,{scope:n,placedSide:F,placedAlign:ne,onArrowChange:S,arrowX:ie,arrowY:ae,shouldHideArrow:oe,children:(0,L.jsx)(Nt.div,{"data-side":F,"data-align":ne,...h,ref:y,style:{...h.style,animation:ee?h.style?.animation:`none`}})})})},`PopperContent`)),uh=`PopperArrow`,dh={top:`bottom`,right:`left`,bottom:`top`,left:`right`},fh=b.forwardRef(Zm(function(e,t){let{__scopePopper:n,...r}=e,i=ch(uh,n),a=dh[i.placedSide];return(0,L.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,L.jsx)(Km,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function ph(e){return e!==null}Zm(ph,`isNotNull`);var mh=Zm(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=hh(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function hh(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Zm(hh,`getSideAndAlignFromPlacement`);var gh=rh,_h=ah,vh=lh,yh=fh,bh=Object.defineProperty,xh=(e,t)=>bh(e,`name`,{value:t,configurable:!0});function Sh(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}xh(Sh,`usePrevious`);var Ch=Object.defineProperty,wh=(e,t)=>Ch(e,`name`,{value:t,configurable:!0}),Th=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Eh=b.forwardRef(wh(function(e,t){return(0,L.jsx)(Nt.span,{...e,ref:t,style:{...Th,...e.style}})},`VisuallyHidden`)),Dh=Object.defineProperty,Oh=(e,t)=>Dh(e,`name`,{value:t,configurable:!0}),kh=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Ah=[` `,`Enter`],jh=`Select`,[Mh,Nh,Ph]=Am(jh),[Fh,see]=Qe(jh,[Ph,eh]),Ih=eh(),[Lh,Rh]=Fh(jh),[zh,cee]=Fh(jh);function Bh(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=Ih(t),[_,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(!1),w=Wm(l),[T,E]=ut({prop:r,defaultProp:i??!1,onChange:a,caller:jh}),[D,O]=ut({prop:o,defaultProp:s,onChange:c,caller:jh}),k=b.useRef(null),A=b.useRef(D);b.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=Oh(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=_?!!m||!!_.closest(`form`):!0,[M,N]=b.useState(new Set),ee=H(),te=Array.from(M).map(e=>e.props.value).join(`;`),P=b.useCallback(e=>{N(t=>new Set(t).add(e))},[]),F=b.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),ne={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ee,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:te,isFormControl:j};return(0,L.jsx)(gh,{...g,children:(0,L.jsx)(Lh,{scope:t,...ne,children:(0,L.jsx)(Mh.Provider,{scope:t,children:(0,L.jsx)(zh,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:F,children:sg(h)?h(ne):n})})})})}Oh(Bh,`SelectProvider`);var lee=Oh(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,L.jsx)(Bh,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,L.jsxs)(L.Fragment,{children:[n,e?(0,L.jsx)(og,{__scopeSelect:t}):null]})})},`Select`),uee=`SelectTrigger`,dee=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Ih(n),o=Rh(uee,n),s=o.disabled||r,c=Je(t,o.onTriggerChange),l=Nh(n),u=b.useRef(`touch`),[d,f,p]=lg(e=>{let t=l().filter(e=>!e.disabled),n=ug(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=Oh(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,L.jsx)(_h,{asChild:!0,...a,children:(0,L.jsx)(Nt.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":cg(o.value)?``:void 0,...i,ref:c,onClick:ze(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:ze(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:ze(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&kh.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),fee=`SelectValue`,pee=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Rh(fee,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Je(t,c.onValueNodeChange);et(()=>{l(u)},[l,u]);let f=cg(c.value);return(0,L.jsx)(Nt.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,L.jsx)(b.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),mee=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,L.jsx)(Nt.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[hee,gee]=Fh(`SelectPortal`,{forceMount:void 0}),_ee=Oh(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,L.jsx)(hee,{scope:e.__scopeSelect,forceMount:n,children:(0,L.jsx)(_n,{asChild:!0,...r})})},`SelectPortal`),Vh=`SelectContent`,vee=b.forwardRef(Oh(function(e,t){let n=gee(Vh,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Rh(Vh,e.__scopeSelect),[o,s]=b.useState();return et(()=>{s(new DocumentFragment)},[]),(0,L.jsx)(xn,{present:r||a.open,children:({present:e})=>e?(0,L.jsx)(xee,{...i,ref:t}):(0,L.jsx)(yee,{...i,fragment:o})})},`SelectContent`)),yee=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?x.createPortal((0,L.jsx)(Uh,{scope:n,children:(0,L.jsx)(Mh.Slot,{scope:n,children:(0,L.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Hh=10,[Uh,Wh]=Fh(Vh),bee=_t(`SelectContent.RemoveScroll`),xee=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=Rh(Vh,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=Je(t,x),[T,E]=b.useState(null),[D,O]=b.useState(null),k=Nh(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return Zr(y)},[y]),Mn();let N=b.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),ee=b.useCallback(()=>N([T,y]),[N,T,y]);b.useEffect(()=>{A&&ee()},[A,ee]);let{onOpenChange:te,triggerPointerDownPosRef:P}=v;b.useEffect(()=>{if(y){let e={x:0,y:0},t=Oh(t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},`handlePointerMove`),n=Oh(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||te(!1),document.removeEventListener(`pointermove`,t),P.current=null},`handlePointerUp`);return P.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,te,P]),b.useEffect(()=>{let e=Oh(()=>te(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[F,ne]=lg(e=>{let t=k().filter(e=>!e.disabled),n=ug(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),re=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),ie=b.useCallback(()=>y?.focus(),[y]),ae=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),oe=r===`popper`?Gh:See,I=oe===Gh?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,L.jsx)(Uh,{scope:n,content:y,viewport:S,onViewportChange:C,itemRefCallback:re,selectedItem:T,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:ee,selectedItemText:D,position:r,isPositioned:A,searchRef:F,children:(0,L.jsx)(Hr,{as:bee,allowPinchZoom:!0,children:(0,L.jsx)(rn,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ze(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,L.jsx)(Gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,L.jsx)(oe,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...I,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:ze(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),See=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Rh(Vh,n),o=Wh(Vh,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Je(t,u),f=Nh(n),p=b.useRef(!1),m=b.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=b.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Hh,d=Dm(a,[Hh,Math.max(Hh,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Hh,d=Dm(a,[Hh,Math.max(Hh,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Hh*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Hh,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Hh}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);et(()=>y(),[y]);let[x,S]=b.useState();return et(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,L.jsx)(Kh,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,L.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,L.jsx)(Nt.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Gh=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Hh,...a}=e,o=Ih(n);return(0,L.jsx)(vh,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Kh,qh]=Fh(Vh,{}),Jh=`SelectViewport`,Yh=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Wh(Jh,n),o=qh(Jh,n),s=Je(t,a.onViewportChange),c=b.useRef(0);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,L.jsx)(Mh.Slot,{scope:n,children:(0,L.jsx)(Nt.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:ze(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Hh*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Cee,wee]=Fh(`SelectGroup`),Xh=`SelectItem`,[Zh,Qh]=Fh(Xh),$h=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Rh(Xh,n),c=Wh(Xh,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Je(t,Lt(e=>c.itemRefCallback?.(e,r,i))),h=H(),g=b.useRef(`touch`),_=Oh(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,L.jsx)(Zh,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,L.jsx)(Mh.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,L.jsx)(Nt.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:ze(o.onFocus,()=>p(!0)),onBlur:ze(o.onBlur,()=>p(!1)),onClick:ze(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:ze(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:ze(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:ze(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ze(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ze(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(Ah.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),eg=`SelectItemText`,tg=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Rh(eg,n),s=Wh(eg,n),c=Qh(eg,n),l=cee(eg,n),[u,d]=b.useState(null),f=Lt(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Je(t,d,c.onItemTextChange,f),m=u?.textContent,h=b.useMemo(()=>(0,L.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return et(()=>(g(h),()=>_(h)),[g,_,h]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Nt.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!cg(o.value)?x.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),ng=`SelectItemIndicator`,rg=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,...r}=e;return Qh(ng,n).isSelected?(0,L.jsx)(Nt.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),ig=b.forwardRef(Oh(function(e,t){let{__scopeSelect:n,...r}=e;return(0,L.jsx)(Nt.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),ag=`SelectBubbleInput`,og=b.forwardRef(Oh(function({__scopeSelect:e,...t},n){let r=Rh(ag,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=b.useRef(null),m=Je(n,p),h=i??``,g=Sh(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return b.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,L.jsxs)(Nt.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Th,...t.style},ref:m,defaultValue:h,children:[cg(i)&&!_?(0,L.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function sg(e){return typeof e==`function`}Oh(sg,`isFunction`);function cg(e){return e===``||e===void 0}Oh(cg,`shouldShowPlaceholder`);function lg(e){let t=Lt(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),Oh((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=b.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Oh(lg,`useTypeaheadSearch`);function ug(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=dg(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Oh(ug,`findNextItem`);function dg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Oh(dg,`wrapArray`);var Tee=`simplex-select:`;function fg(e){return`${Tee}${e}`}function pg(e){return e.slice(15)}function mg(e){let{value:t,options:n,onValueChange:r,placeholder:i,ariaLabel:a,ariaLabelledBy:o,required:s,disabled:c,caption:l,header:u,contentClassName:d}=e,f=n.find(e=>e.value===t),p=(0,L.jsx)(pee,{className:`app-select-value`,placeholder:i,children:f?.label});return(0,L.jsxs)(lee,{value:fg(t),onValueChange:e=>r(pg(e)),disabled:c,children:[(0,L.jsxs)(dee,{className:`app-select-trigger`,"aria-label":a,"aria-labelledby":o,"aria-required":s,children:[(0,L.jsxs)(`span`,{className:`app-select-current`,children:[f?.leading,l===void 0?p:(0,L.jsxs)(`span`,{className:`app-select-current-text`,children:[p,(0,L.jsx)(`small`,{className:`app-select-caption`,children:l})]})]}),(0,L.jsx)(mee,{className:`app-select-chevron`,children:(0,L.jsx)(Ee,{"aria-hidden":`true`})})]}),(0,L.jsx)(_ee,{children:(0,L.jsxs)(vee,{className:d?`app-select-content ${d}`:`app-select-content`,position:`popper`,sideOffset:6,collisionPadding:12,children:[u?(0,L.jsx)(`div`,{className:`app-select-header`,children:u}):null,(0,L.jsx)(Yh,{className:`app-select-viewport`,children:n.map(e=>(0,L.jsxs)(b.Fragment,{children:[e.separatorBefore?(0,L.jsx)(ig,{className:`app-select-separator`}):null,(0,L.jsxs)($h,{className:`app-select-item`,"data-muted":e.muted||void 0,"data-rich":e.description||e.trailing?!0:void 0,value:fg(e.value),disabled:e.disabled,children:[e.leading,e.description===void 0?(0,L.jsx)(tg,{children:e.label}):(0,L.jsxs)(`span`,{className:`app-select-item-text`,children:[(0,L.jsx)(tg,{children:e.label}),(0,L.jsx)(`small`,{className:`app-select-item-description`,children:e.description})]}),e.trailing===void 0?null:(0,L.jsx)(`span`,{className:`app-select-item-trailing`,children:e.trailing}),(0,L.jsx)(rg,{className:`app-select-indicator`,children:(0,L.jsx)(Te,{"aria-hidden":`true`})})]})]},e.value))})]})})]})}function hg(e){let{label:t,className:n,style:r,...i}=e,a=(0,b.useId)();return(0,L.jsxs)(`div`,{className:n?`field ${n}`:`field`,style:r,children:[(0,L.jsx)(`span`,{id:a,children:t}),(0,L.jsx)(mg,{...i,ariaLabelledBy:a})]})}var gg=10n**18n;function _g(e,t=6){let n;try{n=BigInt(e)}catch{return e}let r=n/gg,i=(n%gg).toString().padStart(18,`0`).slice(0,t).replace(/0+$/,``),a=r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,`,`);return i?`${a}.${i}`:a}function vg(e){return e.side===`BID`?{input:e.base,output:e.quote}:{input:e.quote,output:e.base}}function yg(e){return`${_g(e.price)} ${e.quote} per ${e.base}`}function bg(e){try{let t=BigInt(e.remaining)-BigInt(e.reserved);return t>0n?t:0n}catch{return 0n}}function xg(e){return e.status===`cancelled`?{label:`Cancelled`,tone:``}:e.status===`expired`?{label:`Expired`,tone:``}:e.status===`filled`?{label:`Filled`,tone:`ok`}:e.status===`rejected`?{label:`Refused`,tone:`err`,detail:e.lastError??void 0}:e.status===`resizing`?{label:`Resizing`,tone:`warn`,detail:`a fill is being settled`}:e.lastError?{label:`On the book`,tone:`warn`,detail:e.lastError}:e.commitment?{label:`On the book`,tone:`ok`}:{label:`Posting`,tone:`warn`,detail:`not on the book yet`}}function Sg(e){return e===`BID`?`Buy`:`Sell`}var Cg=/^[0-9]*\.?[0-9]*$/;function wg(e){let t=e.trim();if(t===``||t===`.`||!Cg.test(t))return null;let[n,r=``]=t.split(`.`);return r.length>18?null:BigInt(n||`0`)*gg+BigInt((r+`0`.repeat(18)).slice(0,18))}function Tg(e){let t=e/gg,n=(e%gg).toString().padStart(18,`0`).replace(/0+$/,``);return n?`${t}.${n}`:t.toString()}function Eee(e,t,n){let r=e*t;return n===`down`?r/gg:(r+gg-1n)/gg}function Dee(e){let t=wg(e.amount),n=wg(e.rate);if(t===null||n===null||t<=0n||n<=0n||!e.fillChain||e.acceptedSources.length===0)return null;let{base:r,quote:i}=e.book,a=Eee(t,n,e.side===`BID`?`down`:`up`);return a<=0n?null:e.side===`BID`?{fillChain:e.fillChain,tokenIn:r,amountIn:Tg(t),tokenOut:i,amountOut:Tg(a),acceptedSources:e.acceptedSources}:{fillChain:e.fillChain,tokenIn:i,amountIn:Tg(a),tokenOut:r,amountOut:Tg(t),acceptedSources:e.acceptedSources}}function Eg(e){let{books:t,chains:n,chainLabel:r,onCreated:i,onCancel:a,create:o}=e,[s,c]=(0,b.useState)(()=>t[0]?.id??``),[l,u]=(0,b.useState)(`BID`),[d,f]=(0,b.useState)(``),[p,m]=(0,b.useState)(``),[h,g]=(0,b.useState)(()=>n[0]??``),[_,v]=(0,b.useState)(n),[y,x]=(0,b.useState)(!1),[S,C]=(0,b.useState)(),w=t.find(e=>e.id===s),T=w?{book:w,side:l,amount:d,rate:p,fillChain:h,acceptedSources:_}:null,E=(0,b.useMemo)(()=>T?Dee(T):null,[T]),D=wg(d)!==null&&wg(p)!==null,O=E!==null&&!y,k=async()=>{if(!(!E||y)){x(!0),C(void 0);try{await o(E),await i()}catch(e){C(e instanceof he?e.message:`Could not create the limit order`)}finally{x(!1)}}},A=e=>v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]);return t.length===0?(0,L.jsxs)(`section`,{className:`market-editor operator-market-editor`,children:[(0,L.jsx)(`p`,{className:`hint`,children:`The orderbook lists no books to trade against yet.`}),(0,L.jsx)(`footer`,{className:`market-dialog-footer`,children:(0,L.jsx)(`button`,{type:`button`,onClick:a,children:`Close`})})]}):(0,L.jsxs)(`section`,{className:`market-editor operator-market-editor`,children:[(0,L.jsx)(`div`,{className:`market-editor-heading`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`markets-kicker`,children:`What you are offering`}),(0,L.jsx)(`h3`,{children:`Pick a pair and a rate`}),(0,L.jsxs)(`p`,{className:`hint`,children:[`Amounts are whole tokens and the rate is `,w?`${w.quote} per ${w.base}`:`quote per base`,`. The order fills at that rate until it runs out.`]})]})}),(0,L.jsxs)(`div`,{className:`field`,children:[(0,L.jsx)(`span`,{className:`field-label`,children:`Pair`}),(0,L.jsx)(mg,{ariaLabel:`Pair`,value:s,options:t.map(e=>({value:e.id,label:`${e.base} / ${e.quote}`})),onValueChange:c})]}),(0,L.jsxs)(`div`,{className:`field`,children:[(0,L.jsx)(`span`,{className:`field-label`,children:`Side`}),(0,L.jsx)(`div`,{className:`limit-order-sides`,role:`tablist`,"aria-label":`Side`,children:[[`BID`,`Buy`,w?`Take ${w.base} in, pay ${w.quote} out`:``],[`ASK`,`Sell`,w?`Take ${w.quote} in, pay ${w.base} out`:``]].map(([e,t,n])=>(0,L.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":l===e,"data-side":e,className:`limit-order-side${l===e?` is-selected`:``}`,onClick:()=>u(e),title:n,children:[t,` `,w?.base]},e))}),(0,L.jsx)(`small`,{className:`hint`,children:l===`BID`?`You take ${w?.base} in and pay ${w?.quote} out.`:`You take ${w?.quote} in and pay ${w?.base} out.`})]}),(0,L.jsxs)(`div`,{className:`market-asset-grid`,children:[(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[`Amount (`,w?.base,`)`]}),(0,L.jsx)(`input`,{type:`text`,inputMode:`decimal`,placeholder:`10`,"aria-label":`Amount in ${w?.base}`,value:d,onChange:e=>Cg.test(e.target.value)&&f(e.target.value)})]}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[`Rate (`,w?.quote,` per `,w?.base,`)`]}),(0,L.jsx)(`input`,{type:`text`,inputMode:`decimal`,placeholder:`1590`,"aria-label":`Rate in ${w?.quote} per ${w?.base}`,value:p,onChange:e=>Cg.test(e.target.value)&&m(e.target.value)})]})]}),E?(0,L.jsxs)(`p`,{className:`hint limit-order-derived`,children:[`Takes in`,` `,(0,L.jsxs)(`strong`,{children:[E.amountIn,` `,E.tokenIn]}),`, pays out`,` `,(0,L.jsxs)(`strong`,{children:[E.amountOut,` `,E.tokenOut]}),`.`]}):null,!E&&D?(0,L.jsx)(`p`,{className:`error`,children:`State an amount and a rate above zero.`}):null,(0,L.jsxs)(`div`,{className:`field`,children:[(0,L.jsx)(`span`,{className:`field-label`,children:`Fills on`}),(0,L.jsx)(mg,{ariaLabel:`Chain the order is filled on`,value:h,options:n.map(e=>({value:e,label:r(e)})),onValueChange:g}),(0,L.jsx)(`small`,{className:`hint`,children:`Where you hold the token you are paying out.`})]}),(0,L.jsxs)(`div`,{className:`field`,children:[(0,L.jsx)(`span`,{className:`field-label`,children:`Accepts swaps from`}),(0,L.jsx)(`div`,{className:`limit-order-sources`,children:n.map(e=>(0,L.jsxs)(`label`,{className:`limit-order-source`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:_.includes(e),onChange:()=>A(e)}),(0,L.jsx)(`span`,{children:r(e)})]},e))}),_.length===0?(0,L.jsx)(`p`,{className:`error`,children:`Name at least one source chain, or the orderbook refuses the order.`}):null]}),S?(0,L.jsx)(`p`,{className:`error`,children:S}):null,(0,L.jsxs)(`footer`,{className:`market-dialog-footer`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:a,disabled:y,children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>void k(),disabled:!O,children:y?`Posting…`:`Post limit order`})]})]})}var Dg=1e4;function Og(e={}){let{status:t=``}=e,[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)(!0),[o,s]=(0,b.useState)(),c=(0,b.useRef)(!0),l=(0,b.useCallback)(async()=>{try{let e=t?`?status=${encodeURIComponent(t)}`:``,n=await ve.get(`/api/limit-orders${e}`);if(!c.current)return;r(n.orders),s(void 0)}catch(e){if(!c.current)return;s(e instanceof he?e.message:`Could not read the limit orders`)}finally{c.current&&a(!1)}},[t]);return(0,b.useEffect)(()=>{c.current=!0,l();let e=setInterval(()=>void l(),Dg);return()=>{c.current=!1,clearInterval(e)}},[l]),{orders:n,loading:i,error:o,reload:l,create:(0,b.useCallback)(async e=>{await ve.post(`/api/limit-orders`,e),await l()},[l]),cancel:(0,b.useCallback)(async e=>{await ve.del(`/api/limit-orders/${e}`),await l()},[l]),withFills:(0,b.useCallback)(e=>ve.get(`/api/limit-orders/${e}`),[])}}function kg(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)(!0),[i,a]=(0,b.useState)();return(0,b.useEffect)(()=>{let e=!0;return ve.get(`/api/orderbook/books`).then(n=>{e&&(t(n.books),a(void 0))}).catch(t=>{e&&a(t instanceof he?t.message:`Could not read the orderbook's pairs`)}).finally(()=>{e&&r(!1)}),()=>{e=!1}},[]),{books:e,loading:n,error:i}}var Ag=10;function jg({chains:e,chainLabels:t}){let{orders:n,loading:r,error:i,create:a,cancel:o,withFills:s,reload:c}=Og(),{books:l}=kg(),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(),[m,h]=(0,b.useState)(),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(),[x,S]=(0,b.useState)(1),[C,w]=(0,b.useState)(1),T=e.map(e=>({stateMachineId:`EVM-${e}`,label:t?.[String(e)]??`Chain ${e}`})),E=e=>T.find(t=>t.stateMachineId===e)?.label??e,D=async e=>{p(e),h(void 0),y(void 0);try{h(await s(e.id))}catch{h(void 0)}},O=async()=>{if(!(!f||g)){_(!0),y(void 0);try{await o(f.id),p(void 0)}catch(e){y(e instanceof Error?e.message:`Could not cancel the limit order`)}finally{_(!1)}}},k=n.filter(e=>e.status===`open`||e.status===`resizing`),A=n.filter(e=>e.status!==`open`&&e.status!==`resizing`),j=Math.min(x,Math.max(1,Math.ceil(k.length/Ag))),M=Math.min(C,Math.max(1,Math.ceil(A.length/Ag))),N=k.slice((j-1)*Ag,j*Ag),ee=A.slice((M-1)*Ag,M*Ag);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`section`,{className:`operator-section`,children:[(0,L.jsxs)(`div`,{className:`operator-section-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Pricing`}),(0,L.jsx)(`h2`,{children:`Limit orders`})]}),(0,L.jsxs)(`button`,{type:`button`,className:`primary limit-order-new-button`,onClick:()=>d(!0),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),`New limit order`]})]}),i?(0,L.jsx)(`p`,{className:`error`,children:i}):null,(0,L.jsxs)(`div`,{className:`operator-market-list`,children:[N.map(e=>(0,L.jsx)(Ng,{order:e,chainLabel:E,onOpen:()=>void D(e)},e.id)),k.length===0&&!r?(0,L.jsx)(`p`,{className:`operator-empty`,children:`Nothing is resting on the orderbook. Post a limit order to say what simplex will pay.`}):null]}),k.length>Ag?(0,L.jsx)(im,{page:j,pageSize:Ag,total:k.length,noun:`orders`,onPage:S}):null,A.length>0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`operator-section-heading`,children:(0,L.jsx)(`div`,{children:(0,L.jsx)(`span`,{className:`eyebrow`,children:`Closed`})})}),(0,L.jsx)(`div`,{className:`operator-market-list`,children:ee.map(e=>(0,L.jsx)(Ng,{order:e,chainLabel:E,onOpen:()=>void D(e)},e.id))}),A.length>Ag?(0,L.jsx)(im,{page:M,pageSize:Ag,total:A.length,noun:`orders`,onPage:w}):null]}):null]}),(0,L.jsx)(Up,{open:u,onClose:()=>d(!1),wide:!0,title:`New limit order`,description:`Pick a pair, a side, how much and at what rate. Simplex works out the two amounts.`,children:(0,L.jsx)(Eg,{books:l,chains:T.map(e=>e.stateMachineId),chainLabel:E,create:a,onCreated:()=>d(!1),onCancel:()=>d(!1)})}),(0,L.jsx)(Up,{open:f!==void 0,onClose:()=>p(void 0),title:f?`${f.base}/${f.quote}`:`Limit order`,description:f?yg(f):void 0,children:f?(0,L.jsx)(Pg,{order:m?.order??f,fills:m?.fills??[],chainLabel:E,busy:g,error:v,onCancel:()=>void O(),onRefresh:()=>void c()}):null})]})}var Mg=new Map(mm.map(e=>[e.stateMachineId,e.explorerUrl]));function Ng(e){let{order:t,chainLabel:n,onOpen:r}=e,i=xg(t),{input:a,output:o}=vg(t);return(0,L.jsxs)(`button`,{type:`button`,className:`operator-market-row`,onClick:r,children:[(0,L.jsx)(um,{tokenA:a,tokenB:o}),(0,L.jsx)(`span`,{className:`limit-order-side-tag`,"data-side":t.side,children:Sg(t.side)}),(0,L.jsxs)(`span`,{className:`operator-market-copy`,children:[(0,L.jsxs)(`strong`,{children:[_g(t.remaining),` `,o,` left at `,yg(t)]}),(0,L.jsxs)(`small`,{children:[`takes `,a,` on `,n(t.fillChain)]})]}),(0,L.jsx)(`span`,{className:`badge ${i.tone}`,children:i.label}),(0,L.jsx)(Fe,{"aria-hidden":`true`})]})}function Pg(e){let{order:t,fills:n,chainLabel:r,busy:i,error:a,onCancel:o,onRefresh:s}=e,c=xg(t),{input:l,output:u}=vg(t),d=t.status!==`open`&&t.status!==`resizing`;return(0,L.jsxs)(`section`,{className:`operator-panel-form`,children:[(0,L.jsxs)(`dl`,{className:`limit-order-facts`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Status`}),(0,L.jsxs)(`dd`,{children:[(0,L.jsx)(`span`,{className:`badge ${c.tone}`,children:c.label}),c.detail?(0,L.jsxs)(`small`,{children:[` `,c.detail]}):null]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Side`}),(0,L.jsxs)(`dd`,{children:[(0,L.jsx)(`span`,{className:`limit-order-side-tag`,"data-side":t.side,children:Sg(t.side)}),` `,(0,L.jsx)(`small`,{children:t.base})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Rate`}),(0,L.jsx)(`dd`,{children:yg(t)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Pays out`}),(0,L.jsxs)(`dd`,{children:[_g(t.remaining),` `,u,` left of `,_g(t.size)]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Held by live bids`}),(0,L.jsxs)(`dd`,{children:[_g(t.reserved),` `,u,`, leaving `,_g(bg(t).toString()),` to draw on`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Takes in`}),(0,L.jsxs)(`dd`,{children:[l,` on `,r(t.fillChain)]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Accepts swaps from`}),(0,L.jsx)(`dd`,{children:t.acceptedSources.map(r).join(`, `)})]})]}),t.lastError?(0,L.jsx)(`p`,{className:`error`,children:t.lastError}):null,a?(0,L.jsx)(`p`,{className:`error`,children:a}):null,(0,L.jsx)(`h3`,{children:`Fills`}),n.length===0?(0,L.jsx)(`p`,{className:`hint`,children:`Nothing has filled against this order yet.`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`table`,{className:`limit-order-fills`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`When`}),(0,L.jsx)(`th`,{scope:`col`,children:`Paid out`}),(0,L.jsx)(`th`,{scope:`col`,children:`Transaction`})]})}),(0,L.jsx)(`tbody`,{children:n.map(e=>{let n=Mg.get(t.fillChain),r=e.transactionHash;return(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{children:(0,L.jsx)(`time`,{children:Sm(Cm(e.filledAt))})}),(0,L.jsx)(`td`,{children:(0,L.jsxs)(`strong`,{children:[_g(e.amount),` `,(0,L.jsx)(`small`,{children:u})]})}),(0,L.jsx)(`td`,{children:r&&n?(0,L.jsxs)(`a`,{href:`${n}/tx/${r}`,target:`_blank`,rel:`noreferrer`,children:[r.slice(0,8),`…`,r.slice(-6)]}):(0,L.jsx)(`span`,{className:`limit-order-fills-none`,children:`—`})})]},e.id)})})]}),(0,L.jsxs)(`p`,{className:`limit-order-fills-total`,children:[_g(n.reduce((e,t)=>e+BigInt(t.amount),0n).toString()),` `,u,` paid out across `,n.length,` `,n.length===1?`fill`:`fills`]})]}),(0,L.jsxs)(`footer`,{className:`market-dialog-footer`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:s,disabled:i,children:`Refresh`}),d?null:(0,L.jsx)(`button`,{type:`button`,className:`market-delete-button`,onClick:o,disabled:i,children:i?`Cancelling…`:`Cancel order`})]})]})}var Fg=9e15,Ig=1e9,Lg=`0123456789abcdef`,Rg=`2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058`,zg=`3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789`,Bg={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Fg,maxE:Fg,crypto:!1},Vg,Hg,Ug=!0,Wg=`[DecimalError] `,Gg=Wg+`Invalid argument: `,Kg=Wg+`Precision limit exceeded`,qg=Wg+`crypto unavailable`,Jg=`[object Decimal]`,Yg=Math.floor,Xg=Math.pow,Zg=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Qg=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,$g=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,e_=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,t_=1e7,n_=7,r_=9007199254740991,i_=Rg.length-1,a_=zg.length-1,G={toStringTag:Jg};G.absoluteValue=G.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),d_(e)},G.ceil=function(){return d_(new this.constructor(this),this.e+1,2)},G.clampedTo=G.clamp=function(e,t){var n,r=this,i=r.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Gg+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new i(r)},G.comparedTo=G.cmp=function(e){var t,n,r,i,a=this,o=a.d,s=(e=new a.constructor(e)).d,c=a.s,l=e.s;if(!o||!s)return!c||!l?NaN:c===l?o===s?0:!o^c<0?1:-1:c;if(!o[0]||!s[0])return o[0]?c:s[0]?-l:0;if(c!==l)return c;if(a.e!==e.e)return a.e>e.e^c<0?1:-1;for(r=o.length,i=s.length,t=0,n=r<i?r:i;t<n;++t)if(o[t]!==s[t])return o[t]>s[t]^c<0?1:-1;return r===i?0:r>i^c<0?1:-1},G.cosine=G.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+n_,r.rounding=1,n=Oee(r,k_(r,n)),r.precision=e,r.rounding=t,d_(Hg==2||Hg==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},G.cubeRoot=G.cbrt=function(){var e,t,n,r,i,a,o,s,c,l,u=this,d=u.constructor;if(!u.isFinite()||u.isZero())return new d(u);for(Ug=!1,a=u.s*Xg(u.s*u,1/3),!a||Math.abs(a)==1/0?(n=o_(u.d),e=u.e,(a=(e-n.length+1)%3)&&(n+=a==1||a==-2?`0`:`00`),a=Xg(n,1/3),e=Yg((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?n=`5e`+e:(n=a.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+e),r=new d(n),r.s=u.s):r=new d(a.toString()),o=(e=d.precision)+3;;)if(s=r,c=s.times(s).times(s),l=c.plus(u),r=u_(l.plus(u).times(s),l.plus(c),o+2,1),o_(s.d).slice(0,o)===(n=o_(r.d)).slice(0,o))if(n=n.slice(o-3,o+1),n==`9999`||!i&&n==`4999`){if(!i&&(d_(s,e+1,0),s.times(s).times(s).eq(u))){r=s;break}o+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(d_(r,e+1,1),t=!r.times(r).times(r).eq(u));break}return Ug=!0,d_(r,e,d.rounding,t)},G.decimalPlaces=G.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-Yg(this.e/n_))*n_,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},G.dividedBy=G.div=function(e){return u_(this,new this.constructor(e))},G.dividedToIntegerBy=G.divToInt=function(e){var t=this,n=t.constructor;return d_(u_(t,new n(e),0,1,1),n.precision,n.rounding)},G.equals=G.eq=function(e){return this.cmp(e)===0},G.floor=function(){return d_(new this.constructor(this),this.e+1,3)},G.greaterThan=G.gt=function(e){return this.cmp(e)>0},G.greaterThanOrEqualTo=G.gte=function(e){var t=this.cmp(e);return t==1||t===0},G.hyperbolicCosine=G.cosh=function(){var e,t,n,r,i,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;n=o.precision,r=o.rounding,o.precision=n+Math.max(a.e,a.sd())+4,o.rounding=1,i=a.d.length,i<32?(e=Math.ceil(i/3),t=(1/O_(4,e)).toString()):(e=16,t=`2.3283064365386962890625e-10`),a=D_(o,1,a.times(t),new o(1),!0);for(var c,l=e,u=new o(8);l--;)c=a.times(a),a=s.minus(c.times(u.minus(c.times(u))));return d_(a,o.precision=n,o.rounding=r,!0)},G.hyperbolicSine=G.sinh=function(){var e,t,n,r,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,r=i.d.length,r<3)i=D_(a,2,i,i,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,i=i.times(1/O_(5,e)),i=D_(a,2,i,i,!0);for(var o,s=new a(5),c=new a(16),l=new a(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(c.times(o).plus(l))))}return a.precision=t,a.rounding=n,d_(i,t,n,!0)},G.hyperbolicTangent=G.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,u_(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},G.inverseCosine=G.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return n===-1?e.isZero()?h_(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2)):n===0?e.isNeg()?h_(t,r,i):new t(0):new t(NaN)},G.inverseHyperbolicCosine=G.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Ug=!1,n=n.times(n).minus(1).sqrt().plus(n),Ug=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},G.inverseHyperbolicSine=G.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Ug=!1,n=n.times(n).plus(1).sqrt().plus(n),Ug=!0,r.precision=e,r.rounding=t,n.ln())},G.inverseHyperbolicTangent=G.atanh=function(){var e,t,n,r,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,t=a.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?d_(new a(i),e,t,!0):(a.precision=n=r-i.e,i=u_(i.plus(1),new a(1).minus(i),n+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=t,i.times(.5))):new a(NaN)},G.inverseSine=G.asin=function(){var e,t,n,r,i=this,a=i.constructor;return i.isZero()?new a(i):(t=i.abs().cmp(1),n=a.precision,r=a.rounding,t===-1?(a.precision=n+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=n,a.rounding=r,i.times(2)):t===0?(e=h_(a,n+4,r).times(.5),e.s=i.s,e):new a(NaN))},G.inverseTangent=G.atan=function(){var e,t,n,r,i,a,o,s,c,l=this,u=l.constructor,d=u.precision,f=u.rounding;if(!l.isFinite()){if(!l.s)return new u(NaN);if(d+4<=a_)return o=h_(u,d+4,f).times(.5),o.s=l.s,o}else if(l.isZero())return new u(l);else if(l.abs().eq(1)&&d+4<=a_)return o=h_(u,d+4,f).times(.25),o.s=l.s,o;for(u.precision=s=d+10,u.rounding=1,n=Math.min(28,s/n_+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ug=!1,t=Math.ceil(s/n_),r=1,c=l.times(l),o=new u(l),i=l;e!==-1;)if(i=i.times(c),a=o.minus(i.div(r+=2)),i=i.times(c),o=a.plus(i.div(r+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===a.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),Ug=!0,d_(o,u.precision=d,u.rounding=f,!0)},G.isFinite=function(){return!!this.d},G.isInteger=G.isInt=function(){return!!this.d&&Yg(this.e/n_)>this.d.length-2},G.isNaN=function(){return!this.s},G.isNegative=G.isNeg=function(){return this.s<0},G.isPositive=G.isPos=function(){return this.s>0},G.isZero=function(){return!!this.d&&this.d[0]===0},G.lessThan=G.lt=function(e){return this.cmp(e)<0},G.lessThanOrEqualTo=G.lte=function(e){return this.cmp(e)<1},G.logarithm=G.log=function(e){var t,n,r,i,a,o,s,c,l=this,u=l.constructor,d=u.precision,f=u.rounding,p=5;if(e==null)e=new u(10),t=!0;else{if(e=new u(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new u(n&&!n[0]?-1/0:l.s==1?n?0:1/0:NaN);if(t)if(n.length>1)a=!0;else{for(i=n[0];i%10==0;)i/=10;a=i!==1}if(Ug=!1,s=d+p,o=S_(l,s),r=t?m_(u,s+10):S_(e,s),c=u_(o,r,s,1),c_(c.d,i=d,f))do if(s+=10,o=S_(l,s),r=t?m_(u,s+10):S_(e,s),c=u_(o,r,s,1),!a){+o_(c.d).slice(i+1,i+15)+1==0x5af3107a4000&&(c=d_(c,d+1,0));break}while(c_(c.d,i+=10,f));return Ug=!0,d_(c,d,f)},G.minus=G.sub=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return!p.s||!e.s?e=new m(NaN):p.d?e.s=-e.s:e=new m(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(l=p.d,f=e.d,s=m.precision,c=m.rounding,!l[0]||!f[0]){if(f[0])e.s=-e.s;else if(l[0])e=new m(p);else return new m(c===3?-0:0);return Ug?d_(e,s,c):e}if(n=Yg(e.e/n_),u=Yg(p.e/n_),l=l.slice(),a=u-n,a){for(d=a<0,d?(t=l,a=-a,o=f.length):(t=f,n=u,o=l.length),r=Math.max(Math.ceil(s/n_),o)+2,a>r&&(a=r,t.length=1),t.reverse(),r=a;r--;)t.push(0);t.reverse()}else{for(r=l.length,o=f.length,d=r<o,d&&(o=r),r=0;r<o;r++)if(l[r]!=f[r]){d=l[r]<f[r];break}a=0}for(d&&(t=l,l=f,f=t,e.s=-e.s),o=l.length,r=f.length-o;r>0;--r)l[o++]=0;for(r=f.length;r>a;){if(l[--r]<f[r]){for(i=r;i&&l[--i]===0;)l[i]=t_-1;--l[i],l[r]+=t_}l[r]-=f[r]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=p_(l,n),Ug?d_(e,s,c):e):new m(c===3?-0:0)},G.modulo=G.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?d_(new r(n),r.precision,r.rounding):(Ug=!1,r.modulo==9?(t=u_(n,e.abs(),0,3,1),t.s*=e.s):t=u_(n,e,0,r.modulo,1),t=t.times(e),Ug=!0,n.minus(t))},G.naturalExponential=G.exp=function(){return x_(this)},G.naturalLogarithm=G.ln=function(){return S_(this)},G.negated=G.neg=function(){var e=new this.constructor(this);return e.s=-e.s,d_(e)},G.plus=G.add=function(e){var t,n,r,i,a,o,s,c,l,u,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return!d.s||!e.s?e=new f(NaN):d.d||(e=new f(e.d||d.s===e.s?d:NaN)),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(l=d.d,u=e.d,s=f.precision,c=f.rounding,!l[0]||!u[0])return u[0]||(e=new f(d)),Ug?d_(e,s,c):e;if(a=Yg(d.e/n_),r=Yg(e.e/n_),l=l.slice(),i=a-r,i){for(i<0?(n=l,i=-i,o=u.length):(n=u,r=a,o=l.length),a=Math.ceil(s/n_),o=a>o?a+1:o+1,i>o&&(i=o,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(o=l.length,i=u.length,o-i<0&&(i=o,n=u,u=l,l=n),t=0;i;)t=(l[--i]=l[i]+u[i]+t)/t_|0,l[i]%=t_;for(t&&(l.unshift(t),++r),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=p_(l,r),Ug?d_(e,s,c):e},G.precision=G.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Gg+e);return n.d?(t=g_(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},G.round=function(){var e=this,t=e.constructor;return d_(new t(e),e.e+1,t.rounding)},G.sine=G.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+n_,r.rounding=1,n=E_(r,k_(r,n)),r.precision=e,r.rounding=t,d_(Hg>2?n.neg():n,e,t,!0)):new r(NaN)},G.squareRoot=G.sqrt=function(){var e,t,n,r,i,a,o=this,s=o.d,c=o.e,l=o.s,u=o.constructor;if(l!==1||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(Ug=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=o_(s),(t.length+c)%2==0&&(t+=`0`),l=Math.sqrt(t),c=Yg((c+1)/2)-(c<0||c%2),l==1/0?t=`5e`+c:(t=l.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+c),r=new u(t)):r=new u(l.toString()),n=(c=u.precision)+3;;)if(a=r,r=a.plus(u_(o,a,n+2,1)).times(.5),o_(a.d).slice(0,n)===(t=o_(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t==`9999`||!i&&t==`4999`){if(!i&&(d_(a,c+1,0),a.times(a).eq(o))){r=a;break}n+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)==`5`)&&(d_(r,c+1,1),e=!r.times(r).eq(o));break}return Ug=!0,d_(r,c,u.rounding,e)},G.tangent=G.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=u_(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,d_(Hg==2||Hg==4?n.neg():n,e,t,!0)):new r(NaN)},G.times=G.mul=function(e){var t,n,r,i,a,o,s,c,l,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(e.s*=u.s,!f||!f[0]||!p||!p[0])return new d(!e.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?e.s/0:e.s*0);for(n=Yg(u.e/n_)+Yg(e.e/n_),c=f.length,l=p.length,c<l&&(a=f,f=p,p=a,o=c,c=l,l=o),a=[],o=c+l,r=o;r--;)a.push(0);for(r=l;--r>=0;){for(t=0,i=c+r;i>r;)s=a[i]+p[r]*f[i-r-1]+t,a[i--]=s%t_|0,t=s/t_|0;a[i]=(a[i]+t)%t_|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=p_(a,n),Ug?d_(e,d.precision,d.rounding):e},G.toBinary=function(e,t){return A_(this,2,e,t)},G.toDecimalPlaces=G.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(s_(e,0,Ig),t===void 0?t=r.rounding:s_(t,0,8),d_(n,e+n.e+1,t))},G.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=f_(r,!0):(s_(e,0,Ig),t===void 0?t=i.rounding:s_(t,0,8),r=d_(new i(r),e+1,t),n=f_(r,!0,e+1)),r.isNeg()&&!r.isZero()?`-`+n:n},G.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?n=f_(i):(s_(e,0,Ig),t===void 0?t=a.rounding:s_(t,0,8),r=d_(new a(i),e+i.e+1,t),n=f_(r,!1,e+r.e+1)),i.isNeg()&&!i.isZero()?`-`+n:n},G.toFraction=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p=this,m=p.d,h=p.constructor;if(!m)return new h(p);if(l=n=new h(1),r=c=new h(0),t=new h(r),a=t.e=g_(m)-p.e-1,o=a%n_,t.d[0]=Xg(10,o<0?n_+o:o),e==null)e=a>0?t:l;else{if(s=new h(e),!s.isInt()||s.lt(l))throw Error(Gg+s);e=s.gt(t)?a>0?t:l:s}for(Ug=!1,s=new h(o_(m)),u=h.precision,h.precision=a=m.length*n_*2;d=u_(s,t,0,1,1),i=n.plus(d.times(r)),i.cmp(e)!=1;)n=r,r=i,i=l,l=c.plus(d.times(i)),c=i,i=t,t=s.minus(d.times(i)),s=i;return i=u_(e.minus(n),r,0,1,1),c=c.plus(i.times(l)),n=n.plus(i.times(r)),c.s=l.s=p.s,f=u_(l,r,a,1).minus(p).abs().cmp(u_(c,n,a,1).minus(p).abs())<1?[l,r]:[c,n],h.precision=u,Ug=!0,f},G.toHexadecimal=G.toHex=function(e,t){return A_(this,16,e,t)},G.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:s_(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&=n.s,e}return e.d[0]?(Ug=!1,n=u_(n,e,0,t,1).times(e),Ug=!0,d_(n)):(e.s=n.s,n=e),n},G.toNumber=function(){return+this},G.toOctal=function(e,t){return A_(this,8,e,t)},G.toPower=G.pow=function(e){var t,n,r,i,a,o,s=this,c=s.constructor,l=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(Xg(+s,l));if(s=new c(s),s.eq(1))return s;if(r=c.precision,a=c.rounding,e.eq(1))return d_(s,r,a);if(t=Yg(e.e/n_),t>=e.d.length-1&&(n=l<0?-l:l)<=r_)return i=v_(c,s,n,r),e.s<0?new c(1).div(i):d_(i,r,a);if(o=s.s,o<0){if(t<e.d.length-1)return new c(NaN);if(e.d[t]&1||(o=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=o,s}return n=Xg(+s,l),t=n==0||!isFinite(n)?Yg(l*(Math.log(`0.`+o_(s.d))/Math.LN10+s.e+1)):new c(n+``).e,t>c.maxE+1||t<c.minE-1?new c(t>0?o/0:0):(Ug=!1,c.rounding=s.s=1,n=Math.min(12,(t+``).length),i=x_(e.times(S_(s,r+n)),r),i.d&&(i=d_(i,r+5,1),c_(i.d,r,a)&&(t=r+10,i=d_(x_(e.times(S_(s,t+n)),t),t+5,1),+o_(i.d).slice(r+1,r+15)+1==0x5af3107a4000&&(i=d_(i,r+1,0)))),i.s=o,Ug=!0,c.rounding=a,d_(i,r,a))},G.toPrecision=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=f_(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(s_(e,1,Ig),t===void 0?t=i.rounding:s_(t,0,8),r=d_(new i(r),e,t),n=f_(r,e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?`-`+n:n},G.toSignificantDigits=G.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(s_(e,1,Ig),t===void 0?t=r.rounding:s_(t,0,8)),d_(new r(n),e,t)},G.toString=function(){var e=this,t=e.constructor,n=f_(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?`-`+n:n},G.truncated=G.trunc=function(){return d_(new this.constructor(this),this.e+1,1)},G.valueOf=G.toJSON=function(){var e=this,t=e.constructor,n=f_(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?`-`+n:n};function o_(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=n_-r.length,n&&(a+=__(n)),a+=r;o=e[t],r=o+``,n=n_-r.length,n&&(a+=__(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}function s_(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Gg+e)}function c_(e,t,n,r){var i,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=n_,i=0):(i=Math.ceil((t+1)/n_),t%=n_),a=Xg(10,n_-t),s=e[i]%a|0,r==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),o=n<4&&s==99999||n>3&&s==49999||s==5e4||s==0):o=(n<4&&s+1==a||n>3&&s+1==a/2)&&(e[i+1]/a/100|0)==Xg(10,t-2)-1||(s==a/2||s==0)&&(e[i+1]/a/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),o=(r||n<4)&&s==9999||!r&&n>3&&s==4999):o=((r||n<4)&&s+1==a||!r&&n>3&&s+1==a/2)&&(e[i+1]/a/1e3|0)==Xg(10,t-3)-1,o}function l_(e,t,n){for(var r,i=[0],a,o=0,s=e.length;o<s;){for(a=i.length;a--;)i[a]*=t;for(i[0]+=Lg.indexOf(e.charAt(o++)),r=0;r<i.length;r++)i[r]>n-1&&(i[r+1]===void 0&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function Oee(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),i=(1/O_(4,n)).toString()):(n=16,i=`2.3283064365386962890625e-10`),e.precision+=n,t=D_(e,1,t.times(i),new e(1));for(var a=n;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var u_=(function(){function e(e,t,n){var r,i=0,a=e.length;for(e=e.slice();a--;)r=e[a]*t+i,e[a]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k=r.constructor,A=r.s==i.s?1:-1,j=r.d,M=i.d;if(!j||!j[0]||!M||!M[0])return new k(!r.s||!i.s||(j?M&&j[0]==M[0]:!M)?NaN:j&&j[0]==0||!M?A*0:A/0);for(c?(p=1,u=r.e-i.e):(c=t_,p=n_,u=Yg(r.e/p)-Yg(i.e/p)),D=M.length,T=j.length,_=new k(A),v=_.d=[],d=0;M[d]==(j[d]||0);d++);if(M[d]>(j[d]||0)&&u--,a==null?(S=a=k.precision,o=k.rounding):S=s?a+(r.e-i.e)+1:a,S<0)v.push(1),m=!0;else{if(S=S/p+2|0,d=0,D==1){for(f=0,M=M[0],S++;(d<T||f)&&S--;d++)C=f*c+(j[d]||0),v[d]=C/M|0,f=C%M|0;m=f||d<T}else{for(f=c/(M[0]+1)|0,f>1&&(M=e(M,f,c),j=e(j,f,c),D=M.length,T=j.length),w=D,y=j.slice(0,D),b=y.length;b<D;)y[b++]=0;O=M.slice(),O.unshift(0),E=M[0],M[1]>=c/2&&++E;do f=0,l=t(M,y,D,b),l<0?(x=y[0],D!=b&&(x=x*c+(y[1]||0)),f=x/E|0,f>1?(f>=c&&(f=c-1),h=e(M,f,c),g=h.length,b=y.length,l=t(h,y,g,b),l==1&&(f--,n(h,D<g?O:M,g,c))):(f==0&&(l=f=1),h=M.slice()),g=h.length,g<b&&h.unshift(0),n(y,h,b,c),l==-1&&(b=y.length,l=t(M,y,D,b),l<1&&(f++,n(y,D<b?O:M,b,c))),b=y.length):l===0&&(f++,y=[0]),v[d++]=f,l&&y[0]?y[b++]=j[w]||0:(y=[j[w]],b=1);while((w++<T||y[0]!==void 0)&&S--);m=y[0]!==void 0}v[0]||v.shift()}if(p==1)_.e=u,Vg=m;else{for(d=1,f=v[0];f>=10;f/=10)d++;_.e=d+u*p-1,d_(_,s?a+_.e+1:a,o,m)}return _}})();function d_(e,t,n,r){var i,a,o,s,c,l,u,d,f,p=e.constructor;out:if(t!=null){if(d=e.d,!d)return e;for(i=1,s=d[0];s>=10;s/=10)i++;if(a=t-i,a<0)a+=n_,o=t,u=d[f=0],c=u/Xg(10,i-o-1)%10|0;else if(f=Math.ceil((a+1)/n_),s=d.length,f>=s)if(r){for(;s++<=f;)d.push(0);u=c=0,i=1,a%=n_,o=a-n_+1}else break out;else{for(u=s=d[f],i=1;s>=10;s/=10)i++;a%=n_,o=a-n_+i,c=o<0?0:u/Xg(10,i-o-1)%10|0}if(r=r||t<0||d[f+1]!==void 0||(o<0?u:u%Xg(10,i-o-1)),l=n<4?(c||r)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||r||n==6&&(a>0?o>0?u/Xg(10,i-o):0:d[f-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,l?(t-=e.e+1,d[0]=Xg(10,(n_-t%n_)%n_),e.e=-t||0):d[0]=e.e=0,e;if(a==0?(d.length=f,s=1,f--):(d.length=f+1,s=Xg(10,n_-a),d[f]=o>0?(u/Xg(10,i-o)%Xg(10,o)|0)*s:0),l)for(;;)if(f==0){for(a=1,o=d[0];o>=10;o/=10)a++;for(o=d[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,d[0]==t_&&(d[0]=1));break}else{if(d[f]+=s,d[f]!=t_)break;d[f--]=0,s=1}for(a=d.length;d[--a]===0;)d.pop()}return Ug&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function f_(e,t,n){if(!e.isFinite())return C_(e);var r,i=e.e,a=o_(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+__(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(e.e<0?`e`:`e+`)+e.e):i<0?(a=`0.`+__(-i-1)+a,n&&(r=n-o)>0&&(a+=__(r))):i>=o?(a+=__(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+__(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=__(r))),a}function p_(e,t){var n=e[0];for(t*=n_;n>=10;n/=10)t++;return t}function m_(e,t,n){if(t>i_)throw Ug=!0,n&&(e.precision=n),Error(Kg);return d_(new e(Rg),t,1,!0)}function h_(e,t,n){if(t>a_)throw Error(Kg);return d_(new e(zg),t,n,!0)}function g_(e){var t=e.length-1,n=t*n_+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function __(e){for(var t=``;e--;)t+=`0`;return t}function v_(e,t,n,r){var i,a=new e(1),o=Math.ceil(r/n_+4);for(Ug=!1;;){if(n%2&&(a=a.times(t),j_(a.d,o)&&(i=!0)),n=Yg(n/2),n===0){n=a.d.length-1,i&&a.d[n]===0&&++a.d[n];break}t=t.times(t),j_(t.d,o)}return Ug=!0,a}function y_(e){return e.d[e.d.length-1]&1}function b_(e,t,n){for(var r,i,a=new e(t[0]),o=0;++o<t.length;){if(i=new e(t[o]),!i.s){a=i;break}r=a.cmp(i),(r===n||r===0&&a.s===n)&&(a=i)}return a}function x_(e,t){var n,r,i,a,o,s,c,l=0,u=0,d=0,f=e.constructor,p=f.rounding,m=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(Ug=!1,c=m):c=t,s=new f(.03125);e.e>-2;)e=e.times(s),d+=5;for(r=Math.log(Xg(2,d))/Math.LN10*2+5|0,c+=r,n=a=o=new f(1),f.precision=c;;){if(a=d_(a.times(e),c,1),n=n.times(++u),s=o.plus(u_(a,n,c,1)),o_(s.d).slice(0,c)===o_(o.d).slice(0,c)){for(i=d;i--;)o=d_(o.times(o),c,1);if(t==null)if(l<3&&c_(o.d,c-r,p,l))f.precision=c+=10,n=a=s=new f(1),u=0,l++;else return d_(o,f.precision=m,p,Ug=!0);else return f.precision=m,o}o=s}}function S_(e,t){var n,r,i,a,o,s,c,l,u,d,f,p=1,m=10,h=e,g=h.d,_=h.constructor,v=_.rounding,y=_.precision;if(h.s<0||!g||!g[0]||!h.e&&g[0]==1&&g.length==1)return new _(g&&!g[0]?-1/0:h.s==1?g?0:h:NaN);if(t==null?(Ug=!1,u=y):u=t,_.precision=u+=m,n=o_(g),r=n.charAt(0),Math.abs(a=h.e)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=o_(h.d),r=n.charAt(0),p++;a=h.e,r>1?(h=new _(`0.`+n),a++):h=new _(r+`.`+n.slice(1))}else return l=m_(_,u+2,y).times(a+``),h=S_(new _(r+`.`+n.slice(1)),u-m).plus(l),_.precision=y,t==null?d_(h,y,v,Ug=!0):h;for(d=h,c=o=h=u_(h.minus(1),h.plus(1),u,1),f=d_(h.times(h),u,1),i=3;;){if(o=d_(o.times(f),u,1),l=c.plus(u_(o,new _(i),u,1)),o_(l.d).slice(0,u)===o_(c.d).slice(0,u))if(c=c.times(2),a!==0&&(c=c.plus(m_(_,u+2,y).times(a+``))),c=u_(c,new _(p),u,1),t==null)if(c_(c.d,u-m,v,s))_.precision=u+=m,l=o=h=u_(d.minus(1),d.plus(1),u,1),f=d_(h.times(h),u,1),i=s=1;else return d_(c,_.precision=y,v,Ug=!0);else return _.precision=y,c;c=l,i+=2}}function C_(e){return String(e.s*e.s/0)}function w_(e,t){var n,r,i;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(r,i),t){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%n_,n<0&&(r+=n_),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=n_;r<i;)e.d.push(+t.slice(r,r+=n_));t=t.slice(r),r=n_-t.length}else r-=i;for(;r--;)t+=`0`;e.d.push(+t),Ug&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function T_(e,t){var n,r,i,a,o,s,c,l,u;if(t.indexOf(`_`)>-1){if(t=t.replace(/(\d)_(?=\d)/g,`$1`),e_.test(t))return w_(e,t)}else if(t===`Infinity`||t===`NaN`)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Qg.test(t))n=16,t=t.toLowerCase();else if(Zg.test(t))n=2;else if($g.test(t))n=8;else throw Error(Gg+t);for(a=t.search(/p/i),a>0?(c=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),a=t.indexOf(`.`),o=a>=0,r=e.constructor,o&&(t=t.replace(`.`,``),s=t.length,a=s-a,i=v_(r,new r(n),a,a*2)),l=l_(t,n,t_),u=l.length-1,a=u;l[a]===0;--a)l.pop();return a<0?new r(e.s*0):(e.e=p_(l,u),e.d=l,Ug=!1,o&&(e=u_(e,i,s*4)),c&&(e=e.times(Math.abs(c)<54?Xg(2,c):yv.pow(2,c))),Ug=!0,e)}function E_(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:D_(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/O_(5,n)),t=D_(e,2,t,t);for(var i,a=new e(5),o=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(s))));return t}function D_(e,t,n,r,i){var a,o,s,c,l=1,u=e.precision,d=Math.ceil(u/n_);for(Ug=!1,c=n.times(n),s=new e(r);;){if(o=u_(s.times(c),new e(t++*t++),u,1),s=i?r.plus(o):r.minus(o),r=u_(o.times(c),new e(t++*t++),u,1),o=s.plus(r),o.d[d]!==void 0){for(a=d;o.d[a]===s.d[a]&&a--;);if(a==-1)break}a=s,s=r,r=o,o=a,l++}return Ug=!0,o.d.length=d+1,o}function O_(e,t){for(var n=e;--t;)n*=e;return n}function k_(e,t){var n,r=t.s<0,i=h_(e,e.precision,1),a=i.times(.5);if(t=t.abs(),t.lte(a))return Hg=r?4:1,t;if(n=t.divToInt(i),n.isZero())Hg=r?3:2;else{if(t=t.minus(n.times(i)),t.lte(a))return Hg=y_(n)?r?2:3:r?4:1,t;Hg=y_(n)?r?1:4:r?3:2}return t.minus(i).abs()}function A_(e,t,n,r){var i,a,o,s,c,l,u,d,f,p=e.constructor,m=n!==void 0;if(m?(s_(n,1,Ig),r===void 0?r=p.rounding:s_(r,0,8)):(n=p.precision,r=p.rounding),!e.isFinite())u=C_(e);else{for(u=f_(e),o=u.indexOf(`.`),m?(i=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):i=t,o>=0&&(u=u.replace(`.`,``),f=new p(1),f.e=u.length-o,f.d=l_(f_(f),10,i),f.e=f.d.length),d=l_(u,10,i),a=c=d.length;d[--c]==0;)d.pop();if(!d[0])u=m?`0p+0`:`0`;else{if(o<0?a--:(e=new p(e),e.d=d,e.e=a,e=u_(e,f,n,r,0,i),d=e.d,a=e.e,l=Vg),o=d[n],s=i/2,l||=d[n+1]!==void 0,l=r<4?(o!==void 0||l)&&(r===0||r===(e.s<0?3:2)):o>s||o===s&&(r===4||l||r===6&&d[n-1]&1||r===(e.s<0?8:7)),d.length=n,l)for(;++d[--n]>i-1;)d[n]=0,n||(++a,d.unshift(1));for(c=d.length;!d[c-1];--c);for(o=0,u=``;o<c;o++)u+=Lg.charAt(d[o]);if(m){if(c>1)if(t==16||t==8){for(o=t==16?4:3,--c;c%o;c++)u+=`0`;for(d=l_(u,i,t),c=d.length;!d[c-1];--c);for(o=1,u=`1.`;o<c;o++)u+=Lg.charAt(d[o])}else u=u.charAt(0)+`.`+u.slice(1);u=u+(a<0?`p`:`p+`)+a}else if(a<0){for(;++a;)u=`0`+u;u=`0.`+u}else if(++a>c)for(a-=c;a--;)u+=`0`;else a<c&&(u=u.slice(0,a)+`.`+u.slice(a))}u=(t==16?`0x`:t==2?`0b`:t==8?`0o`:``)+u}return e.s<0?`-`+u:u}function j_(e,t){if(e.length>t)return e.length=t,!0}function M_(e){return new this(e).abs()}function N_(e){return new this(e).acos()}function P_(e){return new this(e).acosh()}function F_(e,t){return new this(e).plus(t)}function I_(e){return new this(e).asin()}function L_(e){return new this(e).asinh()}function R_(e){return new this(e).atan()}function z_(e){return new this(e).atanh()}function B_(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,a=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=h_(this,a,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?h_(this,r,i):new this(0),n.s=e.s):!e.d||t.isZero()?(n=h_(this,a,1).times(.5),n.s=e.s):t.s<0?(this.precision=a,this.rounding=1,n=this.atan(u_(e,t,a,1)),t=h_(this,a,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(u_(e,t,a,1)),n}function V_(e){return new this(e).cbrt()}function H_(e){return d_(e=new this(e),e.e+1,2)}function U_(e,t,n){return new this(e).clamp(t,n)}function W_(e){if(!e||typeof e!=`object`)throw Error(Wg+`Object expected`);var t,n,r,i=e.defaults===!0,a=[`precision`,1,Ig,`rounding`,0,8,`toExpNeg`,-Fg,0,`toExpPos`,0,Fg,`maxE`,0,Fg,`minE`,-Fg,0,`modulo`,0,9];for(t=0;t<a.length;t+=3)if(n=a[t],i&&(this[n]=Bg[n]),(r=e[n])!==void 0)if(Yg(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Gg+n+`: `+r);if(n=`crypto`,i&&(this[n]=Bg[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(qg);else this[n]=!1;else throw Error(Gg+n+`: `+r);return this}function G_(e){return new this(e).cos()}function K_(e){return new this(e).cosh()}function q_(e){var t,n,r;function i(e){var t,n,r,a=this;if(!(a instanceof i))return new i(e);if(a.constructor=i,Q_(e)){a.s=e.s,Ug?!e.d||e.e>i.maxE?(a.e=NaN,a.d=null):e.e<i.minE?(a.e=0,a.d=[0]):(a.e=e.e,a.d=e.d.slice()):(a.e=e.e,a.d=e.d?e.d.slice():e.d);return}if(r=typeof e,r===`number`){if(e===0){a.s=1/e<0?-1:1,a.e=0,a.d=[0];return}if(e<0?(e=-e,a.s=-1):a.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;Ug?t>i.maxE?(a.e=NaN,a.d=null):t<i.minE?(a.e=0,a.d=[0]):(a.e=t,a.d=[e]):(a.e=t,a.d=[e]);return}if(e*0!=0){e||(a.s=NaN),a.e=NaN,a.d=null;return}return w_(a,e.toString())}if(r===`string`)return(n=e.charCodeAt(0))===45?(e=e.slice(1),a.s=-1):(n===43&&(e=e.slice(1)),a.s=1),e_.test(e)?w_(a,e):T_(a,e);if(r===`bigint`)return e<0?(e=-e,a.s=-1):a.s=1,w_(a,e.toString());throw Error(Gg+e)}if(i.prototype=G,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=W_,i.clone=q_,i.isDecimal=Q_,i.abs=M_,i.acos=N_,i.acosh=P_,i.add=F_,i.asin=I_,i.asinh=L_,i.atan=R_,i.atanh=z_,i.atan2=B_,i.cbrt=V_,i.ceil=H_,i.clamp=U_,i.cos=G_,i.cosh=K_,i.div=J_,i.exp=Y_,i.floor=X_,i.hypot=Z_,i.ln=$_,i.log=ev,i.log10=nv,i.log2=tv,i.max=rv,i.min=iv,i.mod=av,i.mul=ov,i.pow=sv,i.random=cv,i.round=lv,i.sign=uv,i.sin=dv,i.sinh=fv,i.sqrt=pv,i.sub=mv,i.sum=hv,i.tan=gv,i.tanh=_v,i.trunc=vv,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`maxE`,`minE`,`modulo`,`crypto`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function J_(e,t){return new this(e).div(t)}function Y_(e){return new this(e).exp()}function X_(e){return d_(e=new this(e),e.e+1,3)}function Z_(){var e,t,n=new this(0);for(Ug=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Ug=!0,new this(1/0);n=t}return Ug=!0,n.sqrt()}function Q_(e){return e instanceof yv||e&&e.toStringTag===Jg||!1}function $_(e){return new this(e).ln()}function ev(e,t){return new this(e).log(t)}function tv(e){return new this(e).log(2)}function nv(e){return new this(e).log(10)}function rv(){return b_(this,arguments,-1)}function iv(){return b_(this,arguments,1)}function av(e,t){return new this(e).mod(t)}function ov(e,t){return new this(e).mul(t)}function sv(e,t){return new this(e).pow(t)}function cv(e){var t,n,r,i,a=0,o=new this(1),s=[];if(e===void 0?e=this.precision:s_(e,1,Ig),r=Math.ceil(e/n_),!this.crypto)for(;a<r;)s[a++]=Math.random()*1e7|0;else if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));a<r;)i=t[a],i>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);a<r;)i=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((t[a+3]&127)<<24),i>=214e7?crypto.randomBytes(4).copy(t,a):(s.push(i%1e7),a+=4);a=r/4}else throw Error(qg);for(r=s[--a],e%=n_,r&&e&&(i=Xg(10,n_-e),s[a]=(r/i|0)*i);s[a]===0;a--)s.pop();if(a<0)n=0,s=[0];else{for(n=-1;s[0]===0;n-=n_)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<n_&&(n-=n_-r)}return o.e=n,o.d=s,o}function lv(e){return d_(e=new this(e),e.e+1,this.rounding)}function uv(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function dv(e){return new this(e).sin()}function fv(e){return new this(e).sinh()}function pv(e){return new this(e).sqrt()}function mv(e,t){return new this(e).sub(t)}function hv(){var e=0,t=arguments,n=new this(t[e]);for(Ug=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return Ug=!0,d_(n,this.precision,this.rounding)}function gv(e){return new this(e).tan()}function _v(e){return new this(e).tanh()}function vv(e){return d_(e=new this(e),e.e+1,1)}G[Symbol.for(`nodejs.util.inspect.custom`)]=G.toString,G[Symbol.toStringTag]=`Decimal`;var yv=G.constructor=q_(Bg);Rg=new yv(Rg),zg=new yv(zg);var bv=class{constructor(e,t=`Interpolated curve`){if(this.label=t,!e.points||e.points.length<2)throw Error(`${t}: must have at least 2 points to define a curve`);this.points=e.points.map(e=>({amount:Number.parseFloat(e.amount),value:e.value})).sort((e,t)=>e.amount-t.amount);for(let e of this.points){if(isNaN(e.amount)||e.amount<0)throw Error(`${t}: invalid amount`);if(!Number.isInteger(e.value)||e.value<0)throw Error(`${t}: value must be a non-negative integer`)}}getValue(e){let t=e instanceof yv?e.toNumber():e;if(t<=this.points[0].amount)return this.points[0].value;if(t>=this.points[this.points.length-1].amount)return this.points[this.points.length-1].value;let n=this.linearInterpolate(t);return Math.round(n)}linearInterpolate(e){for(let t=0;t<this.points.length-1;t++){let n=this.points[t],r=this.points[t+1];if(e>=n.amount&&e<=r.amount){let t=(e-n.amount)/(r.amount-n.amount);return n.value+t*(r.value-n.value)}}return this.points[this.points.length-1].value}};function xv(e){let t=e.trim().replace(/^EVM-/i,``);return/^\d+$/.test(t)?Number(t):null}function Sv(e){return`EVM-${e}`}var Cv=class{constructor(e){this.policies=new Map,Object.entries(e).forEach(([e,t])=>{let n=xv(e);if(n===null)throw Error(`Confirmation policy key '${e}' is not a chain id — write [confirmationPolicies."EVM-<id>"] or [confirmationPolicies."<id>"]`);let r=new bv(t,`Chain ${n} confirmation policy`);this.policies.set(n,r)})}getConfirmationBlocks(e,t){let n=this.policies.get(e);if(!n)throw Error(`No confirmation policy found for chainId ${e}`);return n.getValue(t)}add(e,t){let n=new bv(t,`Chain ${e} confirmation policy`);this.policies.set(e,n)}has(e){return this.policies.has(e)}remove(e){this.policies.delete(e)}adopt(e,t){let n=t.policies.get(e);n&&this.policies.set(e,n)}assertCovers(e){let t=e.filter(e=>!this.policies.has(e));if(t.length>0)throw Error(`No confirmation policy for chain(s) ${t.join(`, `)} — add [confirmationPolicies."<chainId>"] entries for them (built-in defaults cover Ethereum, BSC, Polygon, Base, Arbitrum and Unichain)`)}},wv=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%23213247'/%3e%3cpath%20d='M17.3778%2017.5214L16.4055%2020.1724C16.3753%2020.2473%2016.3753%2020.3309%2016.4055%2020.4057L18.0726%2024.9715L20.012%2023.8605L17.6889%2017.5214C17.6766%2017.4901%2017.6552%2017.4634%2017.6274%2017.4445C17.5997%2017.4257%2017.5669%2017.4156%2017.5333%2017.4156C17.4997%2017.4156%2017.4669%2017.4257%2017.4392%2017.4445C17.4115%2017.4634%2017.3901%2017.4901%2017.3778%2017.5214ZM19.3223%2013.0555C19.3105%2013.0237%2019.2892%2012.9963%2019.2615%2012.977C19.2336%2012.9576%2019.2006%2012.9473%2019.1667%2012.9473C19.1329%2012.9473%2019.0998%2012.9576%2019.072%2012.977C19.0442%2012.9963%2019.023%2013.0237%2019.0112%2013.0555L18.0389%2015.7052C18.0087%2015.7801%2018.0087%2015.8637%2018.0389%2015.9385L20.7781%2023.4159L22.7123%2022.3049L19.3223%2013.049V13.0555Z'%20fill='%2312AAFF'/%3e%3cpath%20d='M15.8891%207.11616C15.9384%207.11616%2015.9847%207.12912%2016.0278%207.15505L23.5285%2011.516C23.571%2011.5399%2023.6063%2011.5748%2023.6307%2011.6169C23.655%2011.6591%2023.6678%2011.7071%2023.6672%2011.7558V20.2391C23.6675%2020.2876%2023.6548%2020.3353%2023.6303%2020.3773C23.6059%2020.4192%2023.5708%2020.4539%2023.5285%2020.4777L16.0278%2024.8554C15.9854%2024.879%2015.9377%2024.8915%2015.8891%2024.8915C15.8406%2024.8915%2015.7928%2024.879%2015.7504%2024.8554L8.24968%2020.4854C8.20701%2020.4615%208.17162%2020.4263%208.14721%2020.3839C8.12278%2020.3415%208.11027%2020.2933%208.11097%2020.2443V11.7558C8.11097%2011.6547%208.16672%2011.5665%208.24968%2011.516L15.7504%207.15505C15.7915%207.12741%2015.8396%207.11213%2015.8891%207.11098V7.11616ZM15.8891%206C15.6221%206.00183%2015.3601%206.07238%2015.1282%206.20482L7.76096%2010.4439C7.53013%2010.5766%207.33829%2010.7676%207.20472%2010.9979C7.07114%2011.2282%207.00054%2011.4896%207%2011.7558V20.2391C7%2020.7784%207.28779%2021.284%207.76096%2021.5562L15.1282%2025.7953C15.3593%2025.9293%2015.6218%2026%2015.8891%2026C16.1564%2026%2016.4189%2025.9293%2016.6501%2025.7953L24.0172%2021.5562C24.2497%2021.4241%2024.4428%2021.2325%2024.5765%2021.001C24.7103%2020.7695%2024.7799%2020.5066%2024.7782%2020.2391V11.7558C24.7782%2011.2165%2024.4891%2010.711%2024.0172%2010.4439L16.6501%206.20482C16.4182%206.07238%2016.1562%206.00183%2015.8891%206Z'%20fill='%239DCCED'/%3e%3cpath%20d='M11.0166%2023.428L11.6946%2021.5781L13.0558%2022.706L11.784%2023.8727L11.0166%2023.428Z'%20fill='%23213147'/%3e%3cpath%20d='M15.2725%2010.999H13.4005C13.3317%2011.0005%2013.265%2011.0231%2013.2094%2011.0637C13.1538%2011.1042%2013.1119%2011.1608%2013.0894%2011.2259L9.08887%2022.2993L11.0165%2023.4272L15.4281%2011.2324C15.4375%2011.2063%2015.4408%2011.1784%2015.4373%2011.1508C15.4338%2011.1233%2015.4237%2011.097%2015.408%2011.0742C15.3923%2011.0513%2015.3713%2011.0326%2015.3468%2011.0195C15.3223%2011.0064%2015.2951%2010.9994%2015.2673%2010.999H15.2725ZM18.5393%2010.999H16.6726C16.6044%2011.0002%2016.5381%2011.0219%2016.4825%2011.0615C16.427%2011.1011%2016.3848%2011.1566%2016.3614%2011.2207L11.784%2023.8549L13.7168%2024.9828L18.6949%2011.2272C18.7095%2011.1889%2018.7097%2011.1466%2018.6954%2011.1081C18.681%2011.0697%2018.6533%2011.0378%2018.6171%2011.0185C18.5931%2011.0058%2018.5664%2010.9992%2018.5393%2010.999Z'%20fill='white'/%3e%3c/svg%3e`,Tv=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%230052FF'/%3e%3cpath%20d='M15.9842%2025C20.9635%2025%2025%2020.9706%2025%2016C25%2011.0294%2020.9635%207%2015.9842%207C11.2603%207%207.38488%2010.6269%207%2015.2435H18.9166V16.7565H7C7.38488%2021.3731%2011.2603%2025%2015.9842%2025Z'%20fill='white'/%3e%3c/svg%3e`;function Ev(e){if(e.startsWith(`Arbitrum`))return`arbitrum`;if(e.startsWith(`Base`))return`base`;if(e.startsWith(`Polygon`))return`polygon`;if(e.startsWith(`BNB`)||e.startsWith(`BSC`))return`bnb`;if(e.startsWith(`Ethereum`))return`ethereum`}var Dv={arbitrum:wv,base:Tv,bnb:am,ethereum:om,polygon:sm};function Ov({label:e}){let t=Ev(e);return t?(0,L.jsx)(`img`,{className:`chain-logo`,src:Dv[t],alt:`${e} logo`}):(0,L.jsx)(`span`,{className:`chain-logo chain-logo-fallback`,"aria-hidden":`true`,children:e.slice(0,2).toUpperCase()})}var kv=`${dm.hyperfxApp}/history/details/?id=`,Av=20,jv=new Map(mm.map(e=>[e.stateMachineId,e]));function Mv(e,t){let n=t=>e.find(e=>e.type===t);if(n(`filled`))return{label:`Filled`,tone:`ok`};let r=n(`lost`);if(r)return{label:`Outbid`,tone:``,detail:r.reason?`by ${wm(r.reason)}`:void 0,detailKind:`winner`};if(n(`bid`))return t[0]?.retracted?{label:`Bid retracted`,tone:``}:{label:`Bid placed`,tone:``};let i=n(`executed`);if(i)return i.success?{label:`Executed`,tone:`ok`,detail:i.strategy?`via ${i.strategy}`:void 0}:{label:`Failed`,tone:`err`,detail:i.reason??void 0};let a=n(`skipped`);return a?{label:`Skipped`,tone:`warn`,detail:a.reason??void 0}:{label:`Detected`,tone:``}}function Nv(e){return dm.hyperbridgeExplorers[e]}function Pv({direction:e}){return(0,L.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,"aria-hidden":`true`,children:e===`up`?(0,L.jsx)(`path`,{d:`M8 13.5v-11M3.5 7 8 2.5 12.5 7`}):(0,L.jsx)(`path`,{d:`M8 2.5v11M3.5 9 8 13.5 12.5 9`})})}function Fv(e){let t=Cm(e);return Number.isNaN(t)?e:xm(t)}function Iv(e){let{bid:t,explorer:n}=e;if(!t)return(0,L.jsx)(Rv,{});if(!t.success)return(0,L.jsx)(`span`,{className:`history-bids`,title:t.error??void 0,children:(0,L.jsx)(`strong`,{children:`Failed`})});let r=t.retracted&&t.retractExtrinsicHash?t.retractExtrinsicHash:null;return(0,L.jsxs)(`span`,{className:`history-links history-bid-links`,children:[t.extrinsicHash?(0,L.jsx)(`a`,{href:`${n}/#/extrinsics/${t.extrinsicHash}`,"data-kind":`bid`,target:`_blank`,rel:`noreferrer`,title:`Bid placed ${Fv(t.createdAt)} · ${wm(t.extrinsicHash,8,4)}`,"aria-label":`Bid extrinsic on the Hyperbridge explorer`,children:(0,L.jsx)(Pv,{direction:`up`})}):(0,L.jsx)(`span`,{className:`history-link-placeholder`,title:`Bid placed ${Fv(t.createdAt)}`,"aria-hidden":`true`,children:(0,L.jsx)(Pv,{direction:`up`})}),r?(0,L.jsx)(`a`,{href:`${n}/#/extrinsics/${r}`,"data-kind":`retraction`,target:`_blank`,rel:`noreferrer`,title:`Retracted ${Fv(t.retractedAt??t.createdAt)} · ${wm(r,8,4)}`,"aria-label":`Retraction extrinsic on the Hyperbridge explorer`,children:(0,L.jsx)(Pv,{direction:`down`})}):(0,L.jsx)(`span`,{className:`history-link-placeholder`,title:`Not retracted`,"aria-hidden":`true`,children:(0,L.jsx)(Pv,{direction:`down`})})]})}function Lv(e,t){let n=xv(e);return n!==null&&t?.[String(n)]?t[String(n)]:jv.get(e)?.label??e}function Rv(){return(0,L.jsx)(`span`,{className:`history-referrer`,"data-empty":`true`,children:`—`})}function zv(e){let{leg:t,chain:n,chainLabels:r}=e;if(!t||!n)return(0,L.jsx)(Rv,{});let i=Lv(n,r),a=t.symbol??(t.token===`0x0000000000000000000000000000000000000000`?`native`:wm(t.token));return(0,L.jsxs)(`span`,{className:`history-leg`,title:`${_m(t.amount,t.decimals,t.decimals??0)} ${a}`,children:[(0,L.jsxs)(`span`,{className:`history-leg-icon`,"aria-hidden":`true`,children:[(0,L.jsx)(lm,{symbol:t.symbol??``}),(0,L.jsx)(Ov,{label:i})]}),(0,L.jsxs)(`span`,{className:`history-leg-copy`,children:[(0,L.jsxs)(`strong`,{children:[(0,L.jsx)(`span`,{children:_m(t.amount,t.decimals)}),(0,L.jsx)(`span`,{children:a})]}),(0,L.jsx)(`small`,{children:i})]})]})}function kee(e){let{row:t,chainLabels:n,explorer:r}=e,i=Mv(t.events,t.bids),a=t.bids[0],o=t.events.find(e=>e.order)?.order??null,s=t.events.reduce((e,t)=>Math.min(e,t.ts),1/0);return(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{"data-label":`Referrer`,"data-field":`referrer`,children:o?.referrer?(0,L.jsx)(`span`,{className:`history-referrer`,title:o.referrer,children:oee(o.referrer)}):(0,L.jsx)(Rv,{})}),(0,L.jsx)(`td`,{"data-label":`Status`,"data-field":`status`,children:(0,L.jsxs)(`span`,{className:`history-status`,children:[(0,L.jsx)(`span`,{className:`badge ${i.tone}`,children:i.label}),i.detail&&(0,L.jsx)(`small`,{"data-kind":i.detailKind,title:i.detailKind===`winner`?t.events.find(e=>e.type===`lost`)?.reason??i.detail:i.detail,children:i.detail}),!o&&(0,L.jsxs)(`small`,{title:t.orderId,children:[`order `,wm(t.orderId,8,4)]})]})}),(0,L.jsx)(`td`,{"data-label":`Amount in`,"data-field":`amount-in`,children:(0,L.jsx)(zv,{leg:o?.inputs[0],chain:o?.source,chainLabels:n})}),(0,L.jsx)(`td`,{"data-label":`Amount out`,"data-field":`amount-out`,children:(0,L.jsx)(zv,{leg:o?.outputs[0],chain:o?.destination,chainLabels:n})}),(0,L.jsx)(`td`,{"data-label":`Bids`,"data-field":`bids`,children:(0,L.jsx)(Iv,{bid:a,explorer:r})}),(0,L.jsx)(`td`,{"data-label":`User`,"data-field":`user`,children:o?(0,L.jsx)(`span`,{className:`history-user`,children:(0,L.jsx)(B,{value:o.user,copyLabel:`Copy user address`,children:wm(o.user)})}):(0,L.jsx)(Rv,{})}),(0,L.jsx)(`td`,{"data-label":`Placed`,"data-field":`placed`,children:(0,L.jsxs)(`span`,{className:`history-time`,children:[(0,L.jsx)(`strong`,{children:xm(s)}),(0,L.jsx)(`small`,{children:Sm(s)})]})}),(0,L.jsx)(`td`,{"data-label":`Order`,"data-field":`links`,children:(0,L.jsx)(`span`,{className:`history-links`,children:(0,L.jsxs)(`a`,{href:`${kv}${t.orderId}`,target:`_blank`,rel:`noreferrer`,title:`Open order on HyperFX`,"aria-label":`Open order on HyperFX`,children:[(0,L.jsx)(ke,{"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`history-link-label`,children:`View order`})]})})})]})}function Aee(e){let[t,n]=(0,b.useState)(1),[r,i]=(0,b.useState)(),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(),d=(0,b.useRef)(void 0),f=(0,b.useCallback)(async e=>{try{let[t,n]=await Promise.all([ve.get(`/api/activity/history?page=${e}&pageSize=${Av}`),ve.get(`/api/activity/bids?limit=1`)]);i(t),o(n.stats),u(void 0)}catch(e){u(e instanceof Error?e.message:String(e))}},[]);(0,b.useEffect)(()=>{f(t)},[f,t]),(0,b.useEffect)(()=>{let e=new EventSource(`/api/events`);return e.onopen=()=>{c(!0),f(t)},e.onerror=()=>c(!1),e.onmessage=()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>void f(t),400)},()=>{e.close(),window.clearTimeout(d.current)}},[f,t]);let p=r?.orders??[],m=r?.other??[];return(0,L.jsxs)(`div`,{className:`operator-page-content`,children:[a?(0,L.jsxs)(`section`,{className:`operator-metrics`,"aria-label":`Bid summary`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`Total bids`}),(0,L.jsx)(`strong`,{children:a.total})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`Successful`}),(0,L.jsx)(`strong`,{children:a.successful})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`Failed`}),(0,L.jsx)(`strong`,{children:a.failed})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`Retracted`}),(0,L.jsx)(`strong`,{children:a.retracted})]})]}):null,(0,L.jsxs)(`section`,{className:`operator-section`,children:[(0,L.jsxs)(`div`,{className:`operator-section-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Orders`}),(0,L.jsx)(`h2`,{children:`Order history`})]}),(0,L.jsxs)(`span`,{className:`row`,style:{gap:`0.5rem`},children:[a?.pendingRetraction?(0,L.jsxs)(`span`,{className:`badge warn`,children:[a.pendingRetraction,` retractions pending`]}):null,(0,L.jsx)(`span`,{className:`badge ${s?`ok`:`warn`}`,children:s?`live`:`reconnecting…`})]})]}),r&&p.length===0&&(0,L.jsx)(`p`,{className:`operator-empty`,children:r.total===0?`No orders yet. Rows appear as orders are detected.`:`No orders on this page.`}),p.length>0&&(0,L.jsx)(`div`,{className:`history-table-scroll`,children:(0,L.jsxs)(`table`,{className:`history-table`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{children:`Referrer`}),(0,L.jsx)(`th`,{children:`Status`}),(0,L.jsx)(`th`,{children:`Amount in`}),(0,L.jsx)(`th`,{children:`Amount out`}),(0,L.jsx)(`th`,{children:`Bids`}),(0,L.jsx)(`th`,{children:`User`}),(0,L.jsx)(`th`,{children:`Placed`}),(0,L.jsx)(`th`,{"aria-label":`Links`})]})}),(0,L.jsx)(`tbody`,{children:p.map(t=>(0,L.jsx)(kee,{row:t,chainLabels:e.chainLabels,explorer:Nv(r?.network??`mainnet`)},t.orderId))})]})}),r&&r.total>0&&(0,L.jsx)(im,{page:r.page,pageSize:r.pageSize,total:r.total,noun:`orders`,onPage:n}),t===1&&m.length>0&&(0,L.jsx)(`div`,{className:`history-misc`,"aria-label":`Other events`,children:(0,L.jsx)(`ul`,{children:m.map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{className:`badge ${e.success===!1?`err`:``}`,children:e.type}),(0,L.jsx)(`span`,{children:e.reason??(e.success?`ok`:``)}),(0,L.jsx)(`span`,{children:xm(e.ts)})]},e.id))})})]}),l&&(0,L.jsx)(`p`,{className:`error`,children:l})]})}var jee=/^0x[0-9a-fA-F]{40}$/;function Bv(e){let{addresses:t,onChange:n}=e,[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(),s=()=>{let e=r.trim();if(!jee.test(e)){o(`Enter a valid EVM address (0x + 40 hex chars)`);return}if(t.some(t=>t.toLowerCase()===e.toLowerCase())){o(`Address is already in the list`);return}o(void 0),i(``),n([...t,e])};return(0,L.jsxs)(`div`,{children:[t.map(e=>(0,L.jsxs)(`div`,{className:`row`,style:{marginBottom:`0.35rem`},children:[(0,L.jsx)(`span`,{className:`mono`,style:{flex:1},children:e}),(0,L.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,onClick:()=>n(t.filter(t=>t!==e)),children:`✕`})]},e)),(0,L.jsxs)(`div`,{className:`row`,children:[(0,L.jsx)(`input`,{type:`text`,"aria-label":`EVM address`,style:{flex:1},placeholder:`0x…`,value:r,onChange:e=>{i(e.target.value),o(void 0)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),s())}}),(0,L.jsx)(`button`,{type:`button`,onClick:s,disabled:!r.trim(),children:`+ Add address`})]}),a&&(0,L.jsx)(`p`,{className:`error`,children:a})]})}function Vv(e){return(0,L.jsxs)(`button`,{type:`button`,className:`operator-tool-row`,onClick:e.onClick,children:[(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:e.title}),(0,L.jsx)(`small`,{children:e.description})]}),(0,L.jsx)(`em`,{children:e.meta}),(0,L.jsx)(Fe,{"aria-hidden":`true`})]})}var Mee=Object.defineProperty,Hv=(e,t)=>Mee(e,`name`,{value:t,configurable:!0}),Uv=`Collapsible`,[Nee,Pee]=Qe(Uv),[Fee,Wv]=Nee(Uv),Iee=b.forwardRef(Hv(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=ut({prop:r,defaultProp:i??!1,onChange:o,caller:Uv});return(0,L.jsx)(Fee,{scope:n,disabled:a,contentId:H(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,L.jsx)(Nt.div,{"data-state":Jv(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Lee=`CollapsibleTrigger`,Ree=b.forwardRef(Hv(function(e,t){let{__scopeCollapsible:n,...r}=e,i=Wv(Lee,n);return(0,L.jsx)(Nt.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Jv(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:ze(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),Gv=`CollapsibleContent`,Kv=b.forwardRef(Hv(function(e,t){let{forceMount:n,...r}=e,i=Wv(Gv,e.__scopeCollapsible);return(0,L.jsx)(xn,{present:n||i.open,children:({present:e})=>(0,L.jsx)(qv,{...r,ref:t,present:e})})},`CollapsibleContent`)),qv=b.forwardRef(Hv(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Wv(Gv,n),[s,c]=b.useState(r),l=b.useRef(null),u=Je(t,l),d=b.useRef(0),f=d.current,p=b.useRef(0),m=p.current,h=o.open||s,g=b.useRef(h),_=b.useRef(void 0);return b.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),et(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,L.jsx)(Nt.div,{"data-state":Jv(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function Jv(e){return e?`open`:`closed`}Hv(Jv,`getState`);var Yv=Iee,Xv=Ree,Zv=Kv;function Qv(e){let t=new Map(e.chains.map(e=>[e.chainId,e])),n=e.catalog.map(e=>{let n=t.get(e.chainId);return{meta:e,enabled:!!n,rpcUrls:n?[...n.rpcUrls]:[``],bundlerUrl:n?.bundlerUrl??``,viaAlchemy:!1,watchOnly:n?.watchOnly??!1,running:n?.running??!1}});for(let t of e.chains)e.catalog.some(e=>e.chainId===t.chainId)||n.push({meta:{chainId:t.chainId,stateMachineId:t.stateMachineId,label:t.label,network:e.network},enabled:!0,rpcUrls:[...t.rpcUrls],bundlerUrl:t.bundlerUrl,viaAlchemy:!1,watchOnly:t.watchOnly,running:t.running});return n}function $v(){let[e,t]=(0,b.useState)(),[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)({}),[c,l]=(0,b.useState)(!1),u=(0,b.useRef)(!1),d=(0,b.useRef)(new Set),{run:f,message:p,error:m}=Ei(),h=(0,b.useCallback)(async()=>{let e=await ve.get(`/api/chains`);t(e),r(t=>t??Qv(e))},[]);Di((0,b.useCallback)(()=>f(h,void 0,`poll`),[f,h]));let g=(e,t)=>r(n=>n?.map(n=>n.meta.chainId===e?{...n,...t}:n)),_=n??[];return{dto:e,chains:_,loaded:n!==void 0,patch:g,alchemyKey:i,updateAlchemyKey:e=>{a(e),s({})},alchemy:o,saved:c,message:p,error:m,applyAlchemyKey:async()=>{if(!(u.current||!i.trim()||!e)){u.current=!0,s({busy:!0});try{let t=await ve.post(`/api/setup/validate-alchemy-key`,{apiKey:i.trim(),network:e.network});if(s({status:t.valid?`ok`:`err`,error:t.error}),!t.valid){P.error(`Alchemy key could not be validated`,{description:t.error});return}r(e=>e?.map(e=>{let n=t.chains.find(t=>t.chainId===e.meta.chainId);return n?.rpcUrl?{...e,rpcUrls:[n.rpcUrl,...e.rpcUrls.slice(1)],bundlerUrl:n.bundlerUrl??e.bundlerUrl,viaAlchemy:!0,rpcStatus:void 0}:e})),P.success(`Provider endpoints added`,{description:`Supported chain endpoints were filled from your Alchemy key.`})}catch(e){let t=e instanceof Error?e.message:String(e);s({status:`err`,error:t}),P.error(`Alchemy key could not be validated`,{description:t})}finally{u.current=!1}}},verifyChain:async e=>{if(d.current.has(e.meta.chainId))return;d.current.add(e.meta.chainId);let t=P.loading(`Verifying ${e.meta.label}`,{description:`Checking the RPC and bundler endpoints.`});g(e.meta.chainId,{rpcStatus:`checking`,rpcError:void 0,bundlerWarning:void 0});try{let n=e.rpcUrls.map(e=>e.trim()).filter(Boolean);try{let r=await ve.post(`/api/setup/validate-rpc`,{urls:n,expectedChainId:e.meta.chainId});if(r.ok)g(e.meta.chainId,{rpcStatus:`ok`});else{let n=r.error??r.results.find(e=>e.error)?.error??`RPC check failed`;g(e.meta.chainId,{rpcStatus:`err`,rpcError:n}),P.error(`${e.meta.label} RPC could not be verified`,{description:n,id:t});return}}catch(n){let r=n instanceof Error?n.message:String(n);g(e.meta.chainId,{rpcStatus:`err`,rpcError:r}),P.error(`${e.meta.label} RPC could not be verified`,{description:r,id:t});return}if(e.bundlerUrl.trim())try{let n=await ve.post(`/api/setup/validate-bundler`,{url:e.bundlerUrl.trim(),chainId:e.meta.chainId});if(g(e.meta.chainId,{bundlerWarning:n.warning,bundlerOk:!n.warning}),n.warning){P.warning(`${e.meta.label} RPC verified`,{description:n.warning,id:t});return}}catch(n){let r=`Bundler check failed: ${n instanceof Error?n.message:n}`;g(e.meta.chainId,{bundlerWarning:r,bundlerOk:!1}),P.error(`${e.meta.label} bundler could not be verified`,{description:r,id:t});return}P.success(`${e.meta.label} endpoints verified`,{description:e.bundlerUrl.trim()?`RPC and bundler connections are ready.`:`RPC connection is ready.`,id:t})}finally{d.current.delete(e.meta.chainId)}},toggleChain:(e,t)=>{!t&&e.running&&!window.confirm(`Stop filling on ${e.meta.label}? It keeps trading until you restart the filler.`)||g(e.meta.chainId,{enabled:t})},save:()=>(l(!1),f(async()=>{await ve.put(`/api/chains`,{chains:_.filter(e=>e.enabled).map(e=>({chainId:e.meta.chainId,rpcUrls:e.rpcUrls.map(e=>e.trim()).filter(Boolean),bundlerUrl:e.bundlerUrl.trim(),watchOnly:e.watchOnly}))}),l(!0);let e=await ve.get(`/api/chains`);t(e),r(Qv(e))},`Chains saved`))}}function ey(){let{dto:e,chains:t,loaded:n,patch:r,alchemyKey:i,updateAlchemyKey:a,alchemy:o,saved:s,message:c,error:l,applyAlchemyKey:u,verifyChain:d,toggleChain:f,save:p}=$v();return(0,L.jsxs)(`div`,{className:`wizard-sections chains-step operator-chain-settings`,children:[(0,L.jsxs)(`div`,{className:`card`,children:[(0,L.jsx)(`h2`,{children:`Provider key`}),(0,L.jsx)(`p`,{className:`hint`,children:`Use one Alchemy key to fill supported RPC and bundler endpoints, or enter providers manually below. Premium endpoints with archive access are recommended for reliable event scanning.`}),(0,L.jsxs)(`div`,{className:`chain-provider-controls`,children:[(0,L.jsx)(`input`,{type:`password`,"aria-label":`Alchemy API key`,placeholder:`Alchemy API key (optional)`,value:i,onChange:e=>a(e.target.value)}),(0,L.jsx)(`button`,{type:`button`,onClick:u,disabled:o.busy||!i.trim(),children:o.busy?`Checking…`:`Validate & prefill`})]})]}),t.map(t=>(0,L.jsxs)(Yv,{className:`card chain-configuration`,"data-enabled":t.enabled,open:t.enabled,children:[(0,L.jsxs)(`div`,{className:`chain-configuration-header`,children:[(0,L.jsxs)(`div`,{className:`chain-identity`,children:[(0,L.jsx)(Ov,{label:t.meta.label}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{children:t.meta.label}),t.viaAlchemy?(0,L.jsx)(`span`,{className:`chain-source`,children:`Configured with Alchemy`}):null,t.enabled&&!t.running?(0,L.jsx)(`span`,{className:`chain-source`,children:`Applies after restart`}):null]})]}),(0,L.jsxs)(`label`,{className:`chain-enable-toggle`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:t.enabled,onChange:e=>f(t,e.target.checked)}),(0,L.jsx)(`span`,{className:`chain-enable-switch`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{children:`Enable fills`})]})]}),(0,L.jsx)(Zv,{className:`chain-collapsible-content`,children:(0,L.jsxs)(`div`,{className:`chain-configuration-fields`,children:[t.rpcUrls.map((e,n)=>(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[n===0?`RPC endpoint`:`Backup RPC endpoint`,n===0?(0,L.jsx)(`span`,{className:`field-required`,children:`Required`}):null]}),(0,L.jsx)(`small`,{children:n===0?`Used to read the chain and find orders.`:`A second provider protects against unavailable or incorrect data.`}),(0,L.jsxs)(`div`,{className:`row`,children:[(0,L.jsx)(`input`,{type:`text`,value:e,required:n===0,onChange:e=>r(t.meta.chainId,{rpcUrls:t.rpcUrls.map((t,r)=>r===n?e.target.value:t),rpcStatus:void 0,viaAlchemy:n===0?!1:t.viaAlchemy})}),n>0?(0,L.jsx)(`button`,{type:`button`,"aria-label":`Remove backup RPC`,onClick:()=>r(t.meta.chainId,{rpcUrls:t.rpcUrls.filter((e,t)=>t!==n)}),children:`✕`}):null]})]},n)),(0,L.jsxs)(`div`,{className:`chain-backup-rpc`,children:[(0,L.jsxs)(`button`,{className:`chain-add-backup-button`,type:`button`,onClick:()=>r(t.meta.chainId,{rpcUrls:[...t.rpcUrls,``]}),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),` Add backup RPC`]}),(0,L.jsxs)(`p`,{className:`chain-info-text`,children:[(0,L.jsx)(`span`,{className:`chain-info-icon`,"aria-hidden":`true`,children:`i`}),(0,L.jsx)(`span`,{children:`A backup lets Simplex compare providers before it acts on chain data.`})]})]}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[`Bundler endpoint `,(0,L.jsx)(`span`,{className:`field-required`,children:`Required`})]}),(0,L.jsx)(`small`,{children:`Used to submit sponsored fills on this chain.`}),(0,L.jsx)(`input`,{type:`text`,value:t.bundlerUrl,required:!0,onChange:e=>r(t.meta.chainId,{bundlerUrl:e.target.value,bundlerOk:!1}),placeholder:`https://api.pimlico.io/v2/<chainId>/rpc?apikey=…`})]}),(0,L.jsxs)(`div`,{className:`chain-configuration-actions`,children:[(0,L.jsx)(`button`,{type:`button`,disabled:!t.rpcUrls[0]?.trim()||t.rpcStatus===`checking`,onClick:()=>d(t),children:t.rpcStatus===`checking`?`Verifying…`:`Verify endpoints`}),(0,L.jsxs)(`label`,{className:`chain-watch-toggle`,title:e?.globalWatchOnly?`Observe-only mode is set globally in the config file.`:void 0,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:t.watchOnly,disabled:e?.globalWatchOnly,onChange:e=>r(t.meta.chainId,{watchOnly:e.target.checked})}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Observe only`}),(0,L.jsx)(`small`,{children:`Monitor orders without filling them.`})]})]})]})]})})]},t.meta.chainId)),(0,L.jsxs)(`div`,{className:`operator-chain-save`,children:[(0,L.jsxs)(`div`,{className:`row`,children:[(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:!n,onClick:p,children:`Save chain settings`}),s?(0,L.jsx)(`span`,{className:`badge warn`,children:`Restart Simplex to apply`}):null,c?(0,L.jsx)(`span`,{className:`badge ok`,children:c}):null,l?(0,L.jsx)(`span`,{className:`badge err`,children:l}):null]}),(0,L.jsx)(`p`,{className:`hint`,children:`Changes are validated and written to the local config. A newly enabled chain must be funded before it can fill.`})]})]})}var ty=s(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),ny=s((e=>{var t,n=[0,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];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),ry=s((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),iy=s(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ay=s(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),oy=s((e=>{var t=ny().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),sy=s((e=>{var t=ny().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),cy=s((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),ly=s((e=>{var t=ry(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),uy=s((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),dy=s((e=>{var t=uy();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),fy=s(((e,t)=>{var n=dy();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),py=s((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),my=s((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
|
50
|
-
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),hy=s((e=>{var t=py(),n=my();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),gy=s((e=>{var t=ny(),n=ly(),r=ry(),i=hy(),a=py(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),_y=s((e=>{var t=ny(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),vy=s(((e,t)=>{var n=hy();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),yy=s(((e,t)=>{var n=hy(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),by=s(((e,t)=>{var n=hy();function r(e){this.mode=n.BYTE,typeof e==`string`?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),xy=s(((e,t)=>{var n=hy(),r=ny();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
|
|
51
|
-
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),Sy=s(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),Cy=s((e=>{var t=hy(),n=vy(),r=yy(),i=by(),a=xy(),o=my(),s=ny(),c=Sy();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
|
|
52
|
-
Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),wy=s((e=>{var t=ny(),n=ry(),r=iy(),i=ay(),a=oy(),o=sy(),s=cy(),c=ly(),l=fy(),u=gy(),d=_y(),f=hy(),p=Cy();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
|
|
53
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
54
|
-
Minimum version required to store current data is: `+c+`.
|
|
55
|
-
`);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),Ty=s((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||={};let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),Ey=s((e=>{var t=Ty();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),Dy=s((e=>{var t=Ty();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
|
|
56
|
-
`;return typeof a==`function`&&a(null,p),p}})),Oy=u(s((e=>{var t=ty(),n=wy(),r=Ey(),i=Dy();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1);function ky(e){return(0,L.jsx)(`div`,{className:`steps${e.className?` ${e.className}`:``}`,role:`group`,"aria-label":e.ariaLabel,children:e.options.map(t=>(0,L.jsx)(`button`,{type:`button`,className:`step ${e.value===t.value?`active`:``}`,"aria-pressed":e.value===t.value,style:{cursor:`pointer`},onClick:()=>e.onChange(t.value),children:t.label},t.value))})}var Ay={disabled:`Off`,connecting:`Connecting`,connected:`Connected`,reconnecting:`Reconnecting`,disconnected:`Disconnected`,error:`Error`},jy={disabled:``,connecting:`warn`,connected:`ok`,reconnecting:`warn`,disconnected:`warn`,error:`err`};function My(e){let{connection:t,enabled:n}=e;return(0,L.jsxs)(`dl`,{className:`tunnel-facts`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Host`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(B,{value:t.host,chars:48,copyLabel:`Copy host`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Port`}),(0,L.jsx)(`dd`,{children:t.port?(0,L.jsx)(B,{value:String(t.port),chars:8,copyLabel:`Copy port`}):(0,L.jsx)(`span`,{className:`tunnel-facts-pending`,children:n?`Assigned once connected`:`Turn remote access on`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Username`}),(0,L.jsx)(`dd`,{className:`mono`,children:t.username})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Host key fingerprint`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(B,{value:t.hostFingerprint,chars:22,copyLabel:`Copy host key fingerprint`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Local port forward`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(B,{value:t.localForward,chars:32,copyLabel:`Copy local forward`})})]})]})}var Ny=[{value:`paste`,label:`Paste a public key`},{value:`generate`,label:`Generate a key pair`}];function Py(){let[e,t]=(0,b.useState)(),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(`paste`),[u,d]=(0,b.useState)(),[f,p]=(0,b.useState)(),{run:m,message:h,error:g,isPending:_}=Ei(),v=(0,b.useCallback)(async()=>{try{t(await ve.get(`/api/tunnel`))}catch(e){if(e.status===404)r(!0);else throw e}},[]),y=e?.state===`connecting`||e?.state===`reconnecting`;if(Di((0,b.useCallback)(()=>m(v,void 0,`poll`),[m,v]),y?1e3:3e3),n)return(0,L.jsx)(`p`,{className:`operator-empty`,children:`Remote access is not available for this filler.`});if(!e)return(0,L.jsx)(`p`,{className:`operator-empty`,children:`Loading…`});let x=e.readOnly===!0,S=u??e.enabled,C=u===void 0?e.state:u?`connecting`:`disabled`,w=!!i.trim()&&(c===`generate`||!!o.trim()),T=()=>m(async()=>{let e=c===`paste`?{label:i.trim(),publicKey:o.trim()}:{label:i.trim()};p(await ve.post(`/api/tunnel/devices`,e)),a(``),s(``)},void 0,`pair`);return(0,L.jsxs)(`div`,{className:`tunnel-panel`,children:[(0,L.jsxs)(`section`,{className:`card tunnel-card`,children:[(0,L.jsxs)(`div`,{className:`card-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Tunnel`}),(0,L.jsx)(`h2`,{children:`Relay connection`})]}),(0,L.jsx)(`span`,{className:`badge ${jy[C]}`,children:Ay[C]})]}),(0,L.jsx)(`p`,{className:`hint`,children:x?`You are viewing this through the tunnel. Remote access is managed from the machine running Simplex.`:`The relay only carries encrypted bytes; your device's session ends here, in Simplex.`}),(0,L.jsxs)(`label`,{className:`chain-enable-toggle tunnel-toggle`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:S,disabled:x||_(`toggle`),onChange:e=>{let n=e.target.checked;d(n),m(async()=>{try{let e=await ve.put(`/api/tunnel`,{enabled:n});if(t(e),e.persisted===!1)throw Error(`Remote access is ${n?`on`:`off`} for this run only: the config file could not be written, so it reverts on restart.`)}finally{d(void 0)}},n?`Remote access enabled`:`Remote access disabled`,`toggle`)}}),(0,L.jsx)(`span`,{className:`chain-enable-switch`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{children:S?`Remote access is on`:`Remote access is off`})]}),(0,L.jsx)(My,{connection:e.connection,enabled:S}),e.lastError?(0,L.jsx)(`div`,{className:`operator-alert tunnel-alert`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Tunnel problem`}),(0,L.jsx)(`p`,{children:e.lastError})]})}):null]}),(0,L.jsxs)(`section`,{className:`card tunnel-card`,children:[(0,L.jsxs)(`div`,{className:`card-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Devices`}),(0,L.jsx)(`h2`,{children:`Paired devices`})]}),(0,L.jsxs)(`small`,{className:`tunnel-count`,children:[e.devices.length,` paired`,e.activeConnections?` · ${e.activeConnections} connected`:``]})]}),e.devices.length===0?(0,L.jsx)(`p`,{className:`operator-empty`,children:x?`No devices yet.`:`No devices yet. Pair one below.`}):(0,L.jsx)(`ul`,{className:`tunnel-device-list`,children:e.devices.map(e=>(0,L.jsxs)(`li`,{className:`tunnel-device`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:e.label}),(0,L.jsx)(`small`,{className:`mono`,children:e.fingerprint}),e.addedAt?(0,L.jsxs)(`small`,{children:[`Paired `,new Date(e.addedAt).toLocaleDateString()]}):null]}),(0,L.jsx)(`button`,{type:`button`,className:`secondary`,"aria-label":`Revoke ${e.label}`,disabled:x,onClick:()=>{window.confirm(`Revoke "${e.label}"? It will no longer be able to open this UI.`)&&m(async()=>{await ve.post(`/api/tunnel/devices/revoke`,{fingerprint:e.fingerprint}),await v()},`Device revoked`)},children:`Revoke`})]},e.fingerprint))})]}),x?null:f?(0,L.jsx)(Fy,{device:f,onDone:()=>{p(void 0),v()}}):(0,L.jsxs)(`section`,{className:`card tunnel-card`,children:[(0,L.jsx)(`div`,{className:`card-heading`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Pairing`}),(0,L.jsx)(`h2`,{children:`Pair a device`})]})}),(0,L.jsx)(ky,{options:Ny,value:c,onChange:l,ariaLabel:`Pairing method`}),(0,L.jsx)(`p`,{className:`hint`,children:c===`paste`?`Create a key in the device's SSH app and paste its public key here. The private key never leaves the device.`:`Simplex generates the key pair and shows the private key once, for apps that cannot create their own.`}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsx)(`span`,{className:`field-label`,children:`Device name`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`e.g. Seun's iPhone`,value:i,maxLength:64,onChange:e=>a(e.target.value)})]}),c===`paste`?(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsx)(`span`,{className:`field-label`,children:`Public key`}),(0,L.jsx)(`textarea`,{className:`mono tunnel-key-input`,rows:3,placeholder:`ssh-ed25519 AAAA… (the .pub line from the device's SSH app)`,value:o,onChange:e=>s(e.target.value)})]}):null,(0,L.jsx)(`div`,{className:`tunnel-actions`,children:(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:!w||_(`pair`),onClick:()=>void T(),children:c===`paste`?`Pair device`:`Generate and pair`})})]}),h&&(0,L.jsxs)(`p`,{className:`hint`,children:[`✓ `,h]}),g&&(0,L.jsx)(`p`,{className:`error`,children:g})]})}function Fy(e){let{device:t}=e,[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(!1);(0,b.useEffect)(()=>{if(!t.privateKey)return;let e=!1;return Oy.toDataURL(t.privateKey,{errorCorrectionLevel:`M`,margin:1,width:220}).then(t=>{e||r(t)}).catch(()=>r(void 0)),()=>{e=!0}},[t.privateKey]);let{connection:o}=t,s=[`ssh`,`-i`,`<key file>`,`-N`,`-L`,o.localForward,`-p`,o.port?String(o.port):`<port>`,`${o.username}@${o.host}`].join(` `),c=o.localForward.split(`:`)[0];return(0,L.jsxs)(`section`,{className:`card tunnel-card`,role:`note`,children:[(0,L.jsxs)(`div`,{className:`card-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Paired`}),(0,L.jsx)(`h2`,{children:t.device.label})]}),(0,L.jsx)(`span`,{className:`badge ok`,children:`Ready`})]}),t.privateKey?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`operator-alert tunnel-alert`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`This private key is shown once and not stored.`}),(0,L.jsx)(`p`,{children:`Anyone holding it can open this dashboard, including Send and the treasury tools. Keep it on the device and avoid key stores that sync to a cloud.`})]})}),(0,L.jsxs)(`div`,{className:`tunnel-secret`,children:[n?(0,L.jsx)(`img`,{src:n,alt:`Private key as a QR code`,width:220,height:220}):null,(0,L.jsxs)(`div`,{className:`tunnel-secret-text`,children:[(0,L.jsx)(`textarea`,{readOnly:!0,rows:7,className:`mono tunnel-key-input`,value:t.privateKey}),(0,L.jsx)(B,{value:t.privateKey,copyLabel:`Copy private key`,children:`Copy private key`})]})]})]}):(0,L.jsx)(`p`,{className:`hint`,children:`The device keeps its private key. Anyone holding it can open this dashboard, including Send and the treasury tools, so revoke it here if the device is lost.`}),(0,L.jsxs)(`p`,{className:`hint`,children:[`In the SSH app: add the key, save a connection using the host, port, username and host key above, add the local port forward, connect, then open `,(0,L.jsxs)(`code`,{children:[`http://localhost:`,c]}),` in the device's browser. Equivalent command:`]}),(0,L.jsx)(`pre`,{className:`tunnel-command mono`,children:s}),(0,L.jsxs)(`div`,{className:`tunnel-actions`,children:[t.privateKey?(0,L.jsxs)(`label`,{className:`tunnel-ack`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),(0,L.jsx)(`span`,{children:`I have saved the key on the device`})]}):null,(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:!!t.privateKey&&!i,onClick:e.onDone,children:`Done`})]})]})}function Iy(e){let t=`=`.repeat((4-e.length%4)%4),n=atob((e+t).replace(/-/g,`+`).replace(/_/g,`/`)),r=new Uint8Array(new ArrayBuffer(n.length));for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}function Ly(e){let t=e.toJSON();if(!t.endpoint||!t.keys?.p256dh||!t.keys.auth)throw Error(`The browser returned an incomplete subscription`);return{endpoint:t.endpoint,expirationTime:t.expirationTime,keys:{p256dh:t.keys.p256dh,auth:t.keys.auth}}}function Ry(e,t){let n=e.options.applicationServerKey;if(!n)return!1;let r=new Uint8Array(n);return r.length===t.length&&r.every((e,n)=>e===t[n])}async function zy(){let e;try{return await Promise.race([navigator.serviceWorker.ready,new Promise((t,n)=>{e=window.setTimeout(()=>n(Error(`The notification service worker did not become ready`)),1e4)})])}finally{e!==void 0&&window.clearTimeout(e)}}async function By(e){return e??=await zy(),e.pushManager.getSubscription()}function Vy(){let[e,t]=(0,b.useState)(),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(`checking`),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(),[f,p]=(0,b.useState)(),m=window.location.protocol===`simplex:`,h=(0,b.useCallback)(async()=>{let e=await ve.get(`/api/notifications`);if(t(e),r(e.settings.lowLiquidityThresholdUsd?.toString()??``),a(e.settings.swaps),m)return s(`desktop`);if(!(`Notification`in window)||!(`serviceWorker`in navigator)||!(`PushManager`in window))return s(`unsupported`);if(Notification.permission===`denied`)return s(`denied`);let n=await By(await zy());if(!n)return s(`disabled`);if(!Ry(n,Iy(e.vapidPublicKey)))return await ve.del(`/api/notifications/subscription`,{endpoint:n.endpoint}),await n.unsubscribe(),s(`disabled`);t(await ve.post(`/api/notifications/subscription`,Ly(n))),s(`enabled`)},[m]);(0,b.useEffect)(()=>{h().catch(e=>{s(`unavailable`),p(e instanceof Error?e.message:String(e))})},[h]);let g=async(e,t)=>{l(!0),d(void 0),p(void 0);try{await e(),d(t)}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(!1)}},_=()=>g(async()=>{let e=n.trim()===``?null:Number(n);if(e!==null&&(!Number.isFinite(e)||e<=0))throw Error(`Enter a positive USD threshold or leave it blank`);let r={lowLiquidityThresholdUsd:e,swaps:i};t(await ve.put(`/api/notifications`,r))},`Alert rules saved`),v=()=>g(async()=>{let n=await Notification.requestPermission();if(n!==`granted`)throw s(n===`denied`?`denied`:`disabled`),Error(`Notification permission was not granted`);let r=await zy(),i=Iy(e.vapidPublicKey),a=await r.pushManager.getSubscription();a&&!Ry(a,i)&&(await ve.del(`/api/notifications/subscription`,{endpoint:a.endpoint}),await a.unsubscribe(),a=null),a??=await r.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:i}),t(await ve.post(`/api/notifications/subscription`,Ly(a))),s(`enabled`)},`Notifications enabled on this device`),y=()=>g(async()=>{let e=await By();e&&(t(await ve.del(`/api/notifications/subscription`,{endpoint:e.endpoint})),await e.unsubscribe()),s(`disabled`)},`Notifications disabled on this device`),x=()=>g(async()=>{let e=m?null:await By();if(!m&&!e)throw Error(`This browser is no longer subscribed`);await ve.post(`/api/notifications/test`,e?{endpoint:e.endpoint}:{native:!0})},`Test notification sent`);return(0,L.jsxs)(`div`,{className:`operator-panel-form notification-settings`,children:[(0,L.jsx)(`h2`,{children:`Alert rules`}),(0,L.jsx)(`p`,{className:`hint`,children:`Rules run in the Simplex solver, so alerts can arrive while this dashboard is closed. A low-liquidity alert fires once when available stablecoin liquidity crosses below the threshold and rearms after recovery.`}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsx)(`span`,{children:`Low-liquidity threshold (USD)`}),(0,L.jsx)(`input`,{type:`number`,min:`0.01`,step:`0.01`,placeholder:`Disabled`,value:n,onChange:e=>r(e.target.value)}),(0,L.jsx)(`small`,{children:`Leave blank to disable low-liquidity alerts.`})]}),(0,L.jsxs)(`label`,{className:`checkbox-row`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Completed swaps`}),(0,L.jsx)(`small`,{children:`Notify after this solver fills an order on-chain.`})]})]}),(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:c||!e,onClick:()=>void _(),children:`Save alert rules`}),(0,L.jsxs)(`div`,{className:`notification-device`,children:[(0,L.jsx)(`h2`,{children:`This device`}),o===`desktop`?(0,L.jsx)(`p`,{className:`hint`,children:`The installed Simplex desktop app delivers native alerts.`}):null,o===`unsupported`?(0,L.jsx)(`p`,{className:`error`,children:`This browser does not support Web Push notifications.`}):null,o===`unavailable`?(0,L.jsx)(`p`,{className:`error`,children:`Web Push is unavailable on this device.`}):null,o===`denied`?(0,L.jsx)(`p`,{className:`error`,children:`Notifications are blocked. Allow them in this site’s browser settings, then reopen this panel.`}):null,o===`disabled`?(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:c||!e,onClick:()=>void v(),children:`Enable on this device`}):null,o===`enabled`?(0,L.jsx)(`button`,{type:`button`,className:`secondary`,disabled:c,onClick:()=>void y(),children:`Disable on this device`}):null,o===`desktop`||o===`enabled`?(0,L.jsx)(`button`,{type:`button`,className:`secondary`,disabled:c,onClick:()=>void x(),children:`Send test notification`}):null,e?(0,L.jsxs)(`small`,{children:[e.subscriptionCount,` browser device`,e.subscriptionCount===1?``:`s`,` subscribed`]}):null]}),u?(0,L.jsxs)(`p`,{className:`text-ok`,children:[`✓ `,u]}):null,f?(0,L.jsx)(`p`,{className:`error`,children:f}):null]})}function Hy(e){let[t,n]=(0,b.useState)(),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(e.initialPanel),{run:s,message:c,error:l}=Ei(),{initialPanel:u,onInitialPanelShown:d}=e;(0,b.useEffect)(()=>{u&&(o(u),d?.())},[u,d]);let f=(0,b.useCallback)(async()=>{let e=await ve.get(`/api/config`);n(e),i(e.allowlistUsers)},[]);return Di((0,b.useCallback)(()=>s(f,void 0,`poll`),[s,f])),(0,L.jsxs)(`div`,{className:`operator-page-content`,children:[(0,L.jsxs)(`section`,{className:`operator-section operator-tools`,children:[(0,L.jsx)(`div`,{className:`operator-section-heading`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Workflows`}),(0,L.jsx)(`h2`,{children:`Choose an operation`})]})}),(0,L.jsxs)(`div`,{className:`operator-tool-list`,children:[(0,L.jsx)(Vv,{title:`Order allowlist`,description:`Restrict filling to orders submitted by approved addresses.`,meta:r.length?`${r.length} addresses`:`Open to all`,onClick:()=>o(`allowlist`)}),(0,L.jsx)(Vv,{title:`Chains & endpoints`,description:`Maintain RPC providers, bundlers, and watch-only behaviour.`,meta:`${e.chains.length} enabled`,onClick:()=>o(`chains`)}),(0,L.jsx)(Vv,{title:`Notifications`,description:`Alert devices when liquidity is low or a swap completes.`,meta:`Liquidity & swaps`,onClick:()=>o(`notifications`)}),(0,L.jsx)(Vv,{title:`Remote access`,description:`Reach this dashboard from another device through an SSH tunnel.`,meta:t?.tunnel?t.tunnel.enabled?`On · ${t.tunnel.devices} device${t.tunnel.devices===1?``:`s`}`:`Off`:`Unavailable`,onClick:()=>o(`remote`)})]})]}),t?.configPath?(0,L.jsxs)(`section`,{className:`operator-section operator-config-summary`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Local configuration`}),(0,L.jsx)(`h2`,{children:`Runtime source`}),(0,L.jsx)(`p`,{children:`Operator changes are persisted to this file.`})]}),(0,L.jsx)(`code`,{children:t.configPath})]}):null,(0,L.jsx)(Up,{open:a===`allowlist`,onClose:()=>o(void 0),title:`Order allowlist`,description:`Choose who Simplex is permitted to fill for.`,children:(0,L.jsxs)(`div`,{className:`operator-panel-form`,children:[(0,L.jsx)(`h2`,{children:`Allowlist`}),(0,L.jsx)(`p`,{className:`hint`,children:`Only fill orders placed by these addresses. Changes apply immediately and are saved to the config. An empty list accepts orders from everyone.`}),(0,L.jsx)(Bv,{addresses:r,onChange:e=>s(async()=>{await ve.put(`/api/allowlist`,{users:e}),i(e)},`Allowlist updated`)})]})}),(0,L.jsx)(Up,{open:a===`notifications`,onClose:()=>o(void 0),title:`Notifications`,description:`Choose alert rules and connect this device.`,children:(0,L.jsx)(Vy,{})}),(0,L.jsx)(Up,{open:a===`remote`,onClose:()=>o(void 0),wide:!0,title:`Remote access`,description:`Pair a device and open this dashboard from anywhere.`,children:(0,L.jsx)(Py,{})}),(0,L.jsx)(Up,{open:a===`chains`,onClose:()=>o(void 0),wide:!0,title:`Chains & endpoints`,description:`Manage the networks and providers used by this running filler.`,children:(0,L.jsx)(ey,{})}),c&&(0,L.jsxs)(`p`,{className:`hint`,children:[`✓ `,c]}),l&&(0,L.jsx)(`p`,{className:`error`,children:l})]})}var Uy=[`trace`,`debug`,`info`,`warn`,`error`],Wy={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Gy=2e3,Ky=250,qy=150,Jy=40,Yy=2e3,Xy=Uy.map(e=>({value:e,label:e.toUpperCase()}));function Zy(e){return e in Wy?e:`info`}function Qy(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function $y(e){let{text:t,term:n}=e,r=(0,b.useMemo)(()=>{if(!n)return[t];let e=n.toLowerCase(),r=t.toLowerCase(),i=[],a=0;for(let n=r.indexOf(e);n!==-1;n=r.indexOf(e,a))i.push(t.slice(a,n),t.slice(n,n+e.length)),a=n+e.length;return i.push(t.slice(a)),i},[t,n]);return r.length===1?(0,L.jsx)(L.Fragment,{children:r[0]}):(0,L.jsx)(L.Fragment,{children:r.map((e,t)=>t%2==1?(0,L.jsx)(`mark`,{children:e},t):(0,L.jsx)(`span`,{children:e},t))})}function eb(e,t,n){let r=(e,n)=>{t.push({text:e,kind:n})},i=n>=0,a=e=>i?`
|
|
57
|
-
`+` `.repeat(e):``;if(e===null)return r(`null`,`literal`);if(typeof e==`boolean`)return r(String(e),`literal`);if(typeof e==`number`)return r(String(e),`number`);if(typeof e==`string`)return r(JSON.stringify(e),`string`);if(Array.isArray(e))return e.length===0?r(`[]`,`punct`):(r(`[`,`punct`),e.forEach((e,o)=>{o&&r(`,`,`punct`),i?r(a(n+1),`punct`):o&&r(` `,`punct`),eb(e,t,i?n+1:-1)}),i&&r(a(n),`punct`),r(`]`,`punct`));let o=Object.entries(e);if(o.length===0)return r(`{}`,`punct`);r(`{`,`punct`),o.forEach(([e,o],s)=>{s&&r(`,`,`punct`),r(i?a(n+1):` `,`punct`),r(e,`key`),r(`: `,`punct`),eb(o,t,i?n+1:-1)}),i&&r(a(n),`punct`),r(i?`}`:` }`,`punct`)}function tb(e,t){let n;try{n=JSON.parse(e)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=[];return Object.entries(n).forEach(([e,n],i)=>{i&&r.push({text:t?`
|
|
58
|
-
`:`, `,kind:`punct`}),r.push({text:e,kind:`key`}),r.push({text:`: `,kind:`punct`}),eb(n,r,t?0:-1)}),r}function nb(e){let{detail:t,term:n,pretty:r}=e,i=(0,b.useMemo)(()=>tb(t,r),[t,r]),a=n.toLowerCase(),o=!!n&&i!==null&&t.toLowerCase().includes(a)&&!i.some(e=>e.text.toLowerCase().includes(a));return i===null||o?(0,L.jsx)($y,{text:t,term:n}):(0,L.jsx)(L.Fragment,{children:i.map((e,t)=>(0,L.jsx)(`span`,{className:`jt-${e.kind}`,children:(0,L.jsx)($y,{text:e.text,term:n})},t))})}var rb=(0,b.memo)(function(e){let{record:t,term:n}=e,[r,i]=(0,b.useState)(!1),a=!!n&&!!t.detail?.toLowerCase().includes(n.toLowerCase());return(0,L.jsxs)(`li`,{className:`log-row`,"data-level":t.level,children:[(0,L.jsx)(`time`,{dateTime:new Date(t.time).toISOString(),children:Qy(t.time)}),(0,L.jsx)(`span`,{className:`log-level`,children:t.level}),(0,L.jsx)(`span`,{className:`log-module`,children:t.module?(0,L.jsx)($y,{text:t.module,term:n}):null}),(0,L.jsxs)(`span`,{className:`log-body`,"data-expanded":r||a||void 0,children:[(0,L.jsx)(`span`,{className:`log-msg`,children:(0,L.jsx)($y,{text:t.msg,term:n})}),t.detail?` `:null,t.detail?(0,L.jsx)(`span`,{className:`log-detail`,role:`button`,tabIndex:0,onClick:()=>i(e=>!e),onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),i(e=>!e))},title:r?`Collapse this record`:`Show the whole record`,children:(0,L.jsx)(nb,{detail:t.detail,term:n,pretty:r})}):null]})]})});function ib(){let[e,t]=(0,b.useState)(`info`),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)(0),[u,d]=(0,b.useState)(),[f,p]=(0,b.useState)(),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(),[x,S]=(0,b.useState)(0),C=(0,b.useRef)(!0),w=(0,b.useRef)(null),T=(0,b.useRef)(!0),E=(0,b.useRef)([]),D=(0,b.useRef)(void 0);(0,b.useEffect)(()=>{let e=window.setTimeout(()=>a(n.trim()),Ky);return()=>window.clearTimeout(e)},[n]),(0,b.useEffect)(()=>{if(m)return;let n=!1,r,a,o=new URLSearchParams({level:e});i&&o.set(`q`,i),c&&o.set(`after`,String(c));let u=()=>{n||a!==void 0||(a=window.setTimeout(()=>S(e=>e+1),Yy))},f=()=>{D.current=void 0;let e=E.current;E.current=[],e.length>0&&s(t=>[...t,...e].slice(-2e3))};return(async()=>{try{let i=await ve.get(`/api/logs?${o}&limit=${Gy}`);if(n)return;if(d({captured:i.captured,persisted:i.persisted,path:i.path}),C.current){C.current=!1;let n=Zy(i.level);n!==e&&n!==`fatal`&&t(n)}c>i.captured&&l(0),s(i.records),T.current=!0,y(void 0),o.set(`after`,String(i.records[i.records.length-1]?.seq??c)),r=new EventSource(`/api/logs/stream?${o}`),r.onopen=()=>_(!0),r.addEventListener(`gap`,()=>S(e=>e+1)),r.onerror=()=>{_(!1),r?.close(),u()},r.onmessage=e=>{E.current.push(JSON.parse(e.data)),D.current===void 0&&(D.current=window.setTimeout(f,qy))}}catch(e){if(n)return;_(!1),y(e instanceof Error?e.message:String(e)),u()}})(),()=>{n=!0,r?.close(),window.clearTimeout(a),window.clearTimeout(D.current),D.current=void 0,E.current=[],_(!1)}},[e,i,c,m,x]),(0,b.useLayoutEffect)(()=>{if(!T.current)return;let e=w.current;e&&(e.scrollTop=e.scrollHeight)},[o]);let O=(0,b.useCallback)(()=>{let e=w.current;e&&(T.current=e.scrollHeight-e.scrollTop-e.clientHeight<=Jy)},[]),k=()=>{T.current=!0,l(o[o.length-1]?.seq??c),s([])},A=async n=>{if(n!==e){p(n);try{await ve.put(`/api/log-level`,{level:n}),t(n),y(void 0)}catch(e){y(e instanceof Error?e.message:String(e))}finally{p(void 0)}}},j=Math.max(u?.captured??0,o[o.length-1]?.seq??0);return(0,L.jsxs)(`div`,{className:`operator-page-content operator-logs`,children:[(0,L.jsxs)(`div`,{className:`log-toolbar`,children:[(0,L.jsx)(ky,{className:`log-levels`,options:Xy,value:f??e,onChange:A,ariaLabel:`Filler log level`}),(0,L.jsxs)(`div`,{className:`log-search`,children:[(0,L.jsx)(`input`,{type:`search`,value:n,placeholder:`Search messages, modules and fields`,"aria-label":`Search logs`,onChange:e=>r(e.target.value)}),n?(0,L.jsx)(`button`,{type:`button`,onClick:()=>r(``),"aria-label":`Clear search`,children:(0,L.jsx)(De,{"aria-hidden":`true`})}):null]}),(0,L.jsxs)(`div`,{className:`log-actions`,children:[(0,L.jsx)(`span`,{className:`badge ${m?`warn`:g?`ok`:`warn`}`,children:m?`paused`:g?`live`:`reconnecting…`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>h(e=>!e),children:m?`Resume`:`Pause`}),(0,L.jsx)(`button`,{type:`button`,onClick:k,disabled:o.length===0,children:`Clear`})]})]}),(0,L.jsx)(`div`,{className:`log-stream`,ref:w,onScroll:O,tabIndex:0,role:`log`,"aria-label":`Filler logs`,children:o.length===0?(0,L.jsx)(`p`,{className:`operator-empty`,children:v||(i?`Nothing matching “${i}” in the ${e} and above records kept since launch.`:`No log lines yet. New ones appear as the filler works.`)}):(0,L.jsx)(`ul`,{children:o.map(e=>(0,L.jsx)(rb,{record:e,term:i},e.seq))})}),(0,L.jsxs)(`p`,{className:`log-footer`,children:[(0,L.jsxs)(`span`,{children:[o.length,` line`,o.length===1?``:`s`,` shown`,u?` · ${j.toLocaleString()} captured since launch`:``,` · `,(0,L.jsxs)(`span`,{className:`log-capture`,title:`Saved to the filler's config, so it survives a restart`,children:[`recording `,(0,L.jsx)(`strong`,{children:e}),` and above`]})]}),u?.persisted?(0,L.jsx)(`span`,{className:`log-capture`,title:u.path,children:`full history on disk`}):u?.path?(0,L.jsx)(`span`,{className:`log-capture`,title:`Recording stopped; what was written is still searchable in ${u.path}`,children:`history to here on disk`}):u?(0,L.jsx)(`span`,{className:`log-capture`,title:`No writable data directory; only the in-memory tail is searchable`,children:`memory only`}):null,v&&o.length>0?(0,L.jsx)(`span`,{className:`error`,children:v}):null]})]})}function ab(e,{strict:t=!0}={}){return!e||typeof e!=`string`?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith(`0x`)}function ob(e){return ab(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var sb=`2.47.6`,cb={getDocsUrl:({docsBaseUrl:e,docsPath:t=``,docsSlug:n})=>t?`${e??`https://viem.sh`}${t}${n?`#${n}`:``}`:void 0,version:`viem@${sb}`},lb=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof e&&n.cause.docsPath||n.docsPath,a=cb.getDocsUrl?.({...n,docsPath:i}),o=[t||`An error occurred.`,``,...n.metaMessages?[...n.metaMessages,``]:[],...a?[`Docs: ${a}`]:[],...r?[`Details: ${r}`]:[],...cb.version?[`Version: ${cb.version}`]:[]].join(`
|
|
59
|
-
`);super(o,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=t,this.version=sb}walk(e){return ub(this,e)}};function ub(e,t){return t?.(e)?e:e&&typeof e==`object`&&`cause`in e&&e.cause!==void 0?ub(e.cause,t):t?null:e}var db=class extends lb{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:`SizeExceedsPaddingSizeError`})}};function fb(e,{dir:t,size:n=32}={}){return typeof e==`string`?pb(e,{dir:t,size:n}):mb(e,{dir:t,size:n})}function pb(e,{dir:t,size:n=32}={}){if(n===null)return e;let r=e.replace(`0x`,``);if(r.length>n*2)throw new db({size:Math.ceil(r.length/2),targetSize:n,type:`hex`});return`0x${r[t===`right`?`padEnd`:`padStart`](n*2,`0`)}`}function mb(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new db({size:e.length,targetSize:n,type:`bytes`});let r=new Uint8Array(n);for(let i=0;i<n;i++){let a=t===`right`;r[a?i:n-i-1]=e[a?i:e.length-i-1]}return r}var hb=class extends lb{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${r*8}-bit ${n?`signed`:`unsigned`} `:``}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:`IntegerOutOfRangeError`})}},gb=class extends lb{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:`SizeOverflowError`})}};function _b(e,{size:t}){if(ob(e)>t)throw new gb({givenSize:ob(e),maxSize:t})}var vb=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function yb(e,t={}){return typeof e==`number`||typeof e==`bigint`?Sb(e,t):typeof e==`string`?wb(e,t):typeof e==`boolean`?bb(e,t):xb(e,t)}function bb(e,t={}){let n=`0x${Number(e)}`;return typeof t.size==`number`?(_b(n,{size:t.size}),fb(n,{size:t.size})):n}function xb(e,t={}){let n=``;for(let t=0;t<e.length;t++)n+=vb[e[t]];let r=`0x${n}`;return typeof t.size==`number`?(_b(r,{size:t.size}),fb(r,{dir:`right`,size:t.size})):r}function Sb(e,t={}){let{signed:n,size:r}=t,i=BigInt(e),a;r?a=n?(1n<<BigInt(r)*8n-1n)-1n:2n**(BigInt(r)*8n)-1n:typeof e==`number`&&(a=BigInt(2**53-1));let o=typeof a==`bigint`&&n?-a-1n:0;if(a&&i>a||i<o){let t=typeof e==`bigint`?`n`:``;throw new hb({max:a?`${a}${t}`:void 0,min:`${o}${t}`,signed:n,size:r,value:`${e}${t}`})}let s=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?fb(s,{size:r}):s}var Cb=new TextEncoder;function wb(e,t={}){return xb(Cb.encode(e),t)}var Tb=new TextEncoder;function Eb(e,t={}){return typeof e==`number`||typeof e==`bigint`?jb(e,t):typeof e==`boolean`?Db(e,t):ab(e)?Ab(e,t):Mb(e,t)}function Db(e,t={}){let n=new Uint8Array(1);return n[0]=Number(e),typeof t.size==`number`?(_b(n,{size:t.size}),fb(n,{size:t.size})):n}var Ob={zero:48,nine:57,A:65,F:70,a:97,f:102};function kb(e){if(e>=Ob.zero&&e<=Ob.nine)return e-Ob.zero;if(e>=Ob.A&&e<=Ob.F)return e-(Ob.A-10);if(e>=Ob.a&&e<=Ob.f)return e-(Ob.a-10)}function Ab(e,t={}){let n=e;t.size&&(_b(n,{size:t.size}),n=fb(n,{dir:`right`,size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);let i=r.length/2,a=new Uint8Array(i);for(let e=0,t=0;e<i;e++){let n=kb(r.charCodeAt(t++)),i=kb(r.charCodeAt(t++));if(n===void 0||i===void 0)throw new lb(`Invalid byte sequence ("${r[t-2]}${r[t-1]}" in "${r}").`);a[e]=n*16+i}return a}function jb(e,t){return Ab(Sb(e,t))}function Mb(e,t={}){let n=Tb.encode(e);return typeof t.size==`number`?(_b(n,{size:t.size}),fb(n,{dir:`right`,size:t.size})):n}var Nb=BigInt(2**32-1),Pb=BigInt(32);function Fb(e,t=!1){return t?{h:Number(e&Nb),l:Number(e>>Pb&Nb)}:{h:Number(e>>Pb&Nb)|0,l:Number(e&Nb)|0}}function Ib(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=Fb(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}var Lb=(e,t,n)=>e<<n|t>>>32-n,Rb=(e,t,n)=>t<<n|e>>>32-n,zb=(e,t,n)=>t<<n-32|e>>>64-n,Bb=(e,t,n)=>e<<n-32|t>>>64-n;function Vb(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function Hb(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function Ub(e,...t){if(!Vb(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function Wb(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function Gb(e,t){Ub(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function Kb(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function qb(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Jb(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Yb(e,t){return e<<32-t|e>>>t}var Xb=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Zb(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qb(e){for(let t=0;t<e.length;t++)e[t]=Zb(e[t]);return e}var $b=Xb?e=>e:Qb;function ex(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function tx(e){return typeof e==`string`&&(e=ex(e)),Ub(e),e}var nx=class{};function rx(e){let t=t=>e().update(tx(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}var ix=BigInt(0),ax=BigInt(1),ox=BigInt(2),sx=BigInt(7),cx=BigInt(256),lx=BigInt(113),ux=[],dx=[],fx=[];for(let e=0,t=ax,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],ux.push(2*(5*r+n)),dx.push((e+1)*(e+2)/2%64);let i=ix;for(let e=0;e<7;e++)t=(t<<ax^(t>>sx)*lx)%cx,t&ox&&(i^=ax<<(ax<<BigInt(e))-ax);fx.push(i)}var px=Ib(fx,!0),mx=px[0],hx=px[1],gx=(e,t,n)=>n>32?zb(e,t,n):Lb(e,t,n),_x=(e,t,n)=>n>32?Bb(e,t,n):Rb(e,t,n);function vx(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],o=n[i+1],s=gx(a,o,1)^n[r],c=_x(a,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=dx[n],a=gx(t,i,r),o=_x(t,i,r),s=ux[n];t=e[s],i=e[s+1],e[s]=a,e[s+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=mx[r],e[1]^=hx[r]}qb(n)}var yx=class e extends nx{constructor(e,t,n,r=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,Hb(n),!(0<e&&e<200))throw Error(`only keccak-f1600 function is supported`);this.state=new Uint8Array(200),this.state32=Kb(this.state)}clone(){return this._cloneInto()}keccak(){$b(this.state32),vx(this.state32,this.rounds),$b(this.state32),this.posOut=0,this.pos=0}update(e){Wb(this),e=tx(e),Ub(e);let{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,t&128&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Wb(this,!1),Ub(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error(`XOF is not possible for this instance`);return this.writeInto(e)}xof(e){return Hb(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Gb(e,this),this.finished)throw Error(`digest() was already called`);return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,qb(this.state)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return t||=new e(n,r,i,o,a),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}},bx=((e,t,n)=>rx(()=>new yx(t,e,n)))(1,136,256/8);function xx(e,t){let n=t||`hex`,r=bx(ab(e,{strict:!1})?Eb(e):e);return n===`bytes`?r:yb(r)}var Sx=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,t)),t}set(e,t){if(super.has(e)&&super.delete(e),super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=super.keys().next().value;e!==void 0&&super.delete(e)}return this}},Cx=new Sx(8192);function wx(e,t){if(Cx.has(`${e}.${t}`))return Cx.get(`${e}.${t}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=xx(Mb(n),`bytes`),i=(t?n.substring(`${t}0x`.length):n).split(``);for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(r[e>>1]&15)>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let a=`0x${i.join(``)}`;return Cx.set(`${e}.${t}`,a),a}var Tx=/^0x[a-fA-F0-9]{40}$/,Ex=new Sx(8192);function Dx(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(Ex.has(r))return Ex.get(r);let i=Tx.test(e)?e.toLowerCase()===e?!0:n?wx(e)===e:!0:!1;return Ex.set(r,i),i}function Ox(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function kx(e,t,n){return e&t^~e&n}function Ax(e,t,n){return e&t^e&n^t&n}var jx=class extends nx{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Jb(this.buffer)}update(e){Wb(this),e=tx(e),Ub(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=Jb(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Wb(this),Gb(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,qb(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;Ox(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=Jb(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},Mx=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Nx=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,2756734187,3204031479,3329325298]),Px=new Uint32Array(64),Fx=class extends jx{constructor(e=32){super(64,e,8,!1),this.A=Mx[0]|0,this.B=Mx[1]|0,this.C=Mx[2]|0,this.D=Mx[3]|0,this.E=Mx[4]|0,this.F=Mx[5]|0,this.G=Mx[6]|0,this.H=Mx[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)Px[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=Px[e-15],n=Px[e-2],r=Yb(t,7)^Yb(t,18)^t>>>3;Px[e]=(Yb(n,17)^Yb(n,19)^n>>>10)+Px[e-7]+r+Px[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=Yb(o,6)^Yb(o,11)^Yb(o,25),u=l+t+kx(o,s,c)+Nx[e]+Px[e]|0,d=(Yb(n,2)^Yb(n,13)^Yb(n,22))+Ax(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){qb(Px)}destroy(){this.set(0,0,0,0,0,0,0,0),qb(this.buffer)}},Ix=rx(()=>new Fx),Lx={USDC:{resolve:(e,t)=>e.getUsdcAsset(t)},USDT:{resolve:(e,t)=>e.getUsdtAsset(t)},DAI:{resolve:(e,t)=>e.getDaiAsset(t)},CNGN:{resolve:(e,t)=>e.getCNgnAsset(t)},USDR:{resolve:(e,t)=>e.getAssetBySymbol(t,`USDR`)},ZARP:{resolve:(e,t)=>e.getAssetBySymbol(t,`ZARP`)},EURC:{resolve:(e,t)=>e.getAssetBySymbol(t,`EURC`)},XSGD:{resolve:(e,t)=>e.getAssetBySymbol(t,`XSGD`)},TRYB:{resolve:(e,t)=>e.getAssetBySymbol(t,`TRYB`)}},Rx=new Set([`USDC`,`USDT`,`DAI`]);function zx(e){return e.trim().toUpperCase()}var Bx=`0x0000000000000000000000000000000000000000`;function Vx(){return Object.keys(Lx)}function Hx(e){return zx(e)in Lx}function Ux(e){let t=new Set;for(let[n,r]of Object.entries(e)){let e=zx(n);if(e.length===0)throw Error(`assets: symbol must be a non-empty string`);if(t.has(e))throw Error(`assets: symbol '${e}' is defined twice (symbols are case-insensitive)`);t.add(e);let i=Object.entries(r??{});if(i.length===0)throw Error(`assets.${n}: entry must map at least one chain to a token address`);for(let[e,t]of i){if(!/^EVM-\d+$/.test(e))throw Error(`assets.${n}: chain key '${e}' must be "EVM-<chainId>" (e.g. "EVM-137")`);if(!Dx(t)||t.toLowerCase()===Bx)throw Error(`assets.${n}: invalid address '${t}' for chain '${e}'`)}}}function Wx(e){let t=e.filter(e=>Rx.has(zx(e.symbol)));return t.length===0?0:t.some(e=>e.available===null)?null:t.reduce((e,t)=>e+(t.available??0),0)}function Gx(e){return!e||e.status!==`fresh`?null:Wx(e.chains.flatMap(e=>e.assets))}var Kx=4;function qx(e){let{status:t,balances:n}=e,r=n?.chains??[],i=n?.status??`loading`,[a,o]=(0,b.useState)(null),s=r.find(e=>e.chainId===a)??r[0],c=s?tS(t,s.chainId):``,l=s?eS(r,s.chainId):[],u=l.slice(0,Kx),d=l.slice(Kx);return(0,L.jsxs)(`section`,{className:`operator-section`,children:[(0,L.jsxs)(`div`,{className:`operator-section-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Liquidity`}),(0,L.jsx)(`h2`,{children:`Balances`})]}),(0,L.jsxs)(`div`,{className:`operator-balance-heading-aside`,children:[s?(0,L.jsx)(`div`,{className:`operator-network-switcher`,children:(0,L.jsx)(mg,{value:String(s.chainId),onValueChange:e=>o(Number(e)),ariaLabel:`Network to show balances for`,caption:`${r.length} ${r.length===1?`network`:`networks`}`,contentClassName:`operator-network-menu`,header:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{children:`Network`}),(0,L.jsx)(`span`,{children:`Stables available`})]}),options:r.map(e=>Jx(e,t,i))})}):null,(0,L.jsx)(`small`,{children:n?.updatedAt?`Updated ${new Date(n.updatedAt).toLocaleTimeString()}`:`Awaiting first refresh`})]})]}),s?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`operator-balance-totals-heading`,children:[(0,L.jsx)(`span`,{children:`Available to fill, across every network`}),d.length>0?(0,L.jsx)(`small`,{children:`+${d.length} more ${d.map(e=>e.symbol).join(`, `)}`}):null]}),(0,L.jsxs)(`div`,{className:`operator-balance-totals`,style:{"--balance-total-columns":Math.max(u.length,1)},children:[u.map(e=>(0,L.jsx)(Xx,{cell:e,network:c},e.symbol)),u.length===0?(0,L.jsx)(`span`,{className:`operator-balance-missing`,children:`No tracked tokens on any network`}):null]}),(0,L.jsxs)(`div`,{className:`operator-balance-focus`,children:[(0,L.jsxs)(`span`,{className:`operator-balance-focus-network`,children:[`Showing `,(0,L.jsx)(`strong`,{children:c}),` only ·`,` `,t.watchOnly[s.chainId]?`Observe only`:`Filling enabled`]}),(0,L.jsx)(Zx,{label:`Network gas`,value:s.native?`${s.native.amount.toFixed(4)} ${s.native.symbol}`:`Unavailable`})]}),n&&n.status!==`fresh`&&n.issues.length>0?(0,L.jsxs)(`div`,{className:`operator-balance-notice`,role:`status`,children:[(0,L.jsx)(`strong`,{children:`Some balances are unavailable`}),(0,L.jsxs)(`span`,{children:[`Simplex did not estimate missing values. The next refresh will retry`,` `,n.issues.length,` failed `,n.issues.length===1?`read`:`reads`,`.`]})]}):null,(0,L.jsxs)(`div`,{className:`operator-asset-balances`,"aria-label":`${c} token balances`,children:[s.assets.map(e=>(0,L.jsx)(Qx,{asset:e},e.address)),s.assets.length===0?(0,L.jsx)(`span`,{className:`operator-balance-missing`,children:`No tracked tokens`}):null]})]}):(0,L.jsx)(`p`,{className:`operator-empty`,children:`Balances will appear after the first refresh.`})]})}function Jx(e,t,n){let r=tS(t,e.chainId),i=nS(e.assets,n);return{value:String(e.chainId),label:r,leading:(0,L.jsx)(Ov,{label:r}),description:t.watchOnly[e.chainId]?`Observe only`:`Filling enabled`,trailing:i===null?`Unavailable`:Yx(i)}}function Yx(e){return`$${e.toLocaleString(void 0,{maximumFractionDigits:e>=1e3?0:2})}`}function Xx(e){let{cell:t,network:n}=e,r=t.total!==null&&t.total>0?(t.onSelected??0)/t.total*100:0,i=t.onSelected!==null&&t.onSelected>0;return(0,L.jsxs)(`div`,{className:`operator-balance-total`,"data-token":t.symbol.trim().toLowerCase(),children:[(0,L.jsxs)(`span`,{className:`operator-balance-total-token`,children:[(0,L.jsx)(lm,{symbol:t.symbol,size:`sm`}),t.symbol]}),(0,L.jsx)(`strong`,{"data-unavailable":t.total===null?!0:void 0,children:t.total===null?`Unavailable`:bm(t.total)}),(0,L.jsx)(`span`,{className:`operator-balance-share`,"data-unavailable":t.total===null?!0:void 0,children:(0,L.jsx)(`i`,{style:{width:t.total===null?`100%`:i?`${Math.max(Math.round(r),2)}%`:`0%`}})}),(0,L.jsx)(`small`,{"data-muted":i?void 0:!0,children:t.total===null?`a read failed — not estimated`:i?r<1?`<1% of it on ${n}`:`${Math.round(r)}% of it on ${n}`:`none on ${n}`})]})}function Zx(e){return(0,L.jsxs)(`div`,{className:`operator-balance-value`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`strong`,{children:e.value})]})}function Qx({asset:e}){let t=e.symbol.trim().toLowerCase(),n=e.status===`fresh`?`Live balance`:e.status===`partial`?`Partial data`:`Unavailable`;return(0,L.jsxs)(`article`,{className:`operator-asset-balance`,"data-token":t,"data-status":e.status,"aria-label":`${e.symbol} balance`,children:[(0,L.jsxs)(`header`,{className:`operator-asset-header`,children:[(0,L.jsxs)(`div`,{className:`operator-token-identity`,children:[(0,L.jsx)(`span`,{className:`operator-token-icon`,children:(0,L.jsx)(lm,{symbol:e.symbol,size:`lg`})}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:e.symbol}),(0,L.jsx)(`small`,{children:n})]})]}),(0,L.jsxs)(`div`,{className:`operator-asset-total`,children:[(0,L.jsx)(`span`,{children:`Total balance`}),(0,L.jsx)(`strong`,{children:e.total===null?`—`:bm(e.total)})]})]}),(0,L.jsxs)(`dl`,{className:`operator-asset-breakdown`,children:[(0,L.jsx)($x,{label:`In wallet`,value:e.wallet}),(0,L.jsx)($x,{label:`In vault`,value:e.vaultPosition,note:e.vaults.some(e=>!e.acceptsDeposits)?`Deposits closed`:void 0})]}),(0,L.jsxs)(`div`,{className:`operator-asset-available`,children:[(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`i`,{"aria-hidden":`true`}),`Available to fill`]}),(0,L.jsx)(`strong`,{children:e.available===null?`Unavailable`:`${bm(e.available)} ${e.symbol}`})]})]})}function $x(e){return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:e.label}),(0,L.jsxs)(`dd`,{children:[e.value===null?`Unavailable`:bm(e.value),e.note&&(0,L.jsx)(`small`,{className:`operator-balance-note`,children:e.note})]})]})}function eS(e,t){let n=new Map;for(let r of e)for(let e of r.assets){let i=e.symbol.trim().toUpperCase(),a=n.get(i)??{symbol:e.symbol.trim(),total:0,onSelected:0};if(n.set(i,a),e.available===null){a.total=null,a.onSelected=null;continue}a.total!==null&&(a.total+=e.available,r.chainId===t&&(a.onSelected=(a.onSelected??0)+e.available))}return[...n.values()]}function tS(e,t){return e.chainLabels?.[String(t)]??`Chain ${t}`}function nS(e,t){return t===`loading`?null:Wx(e)}function rS(e){return Gx(e)}function iS(e){let{status:t,balances:n,onResetHalt:r,runtime:i}=e,a=rS(n);return(0,L.jsxs)(`div`,{className:`operator-overview`,children:[t.halted.length>0?(0,L.jsxs)(`div`,{className:`operator-alert`,"data-tone":`error`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Overfill protection needs attention`}),(0,L.jsxs)(`p`,{children:[`Strategy `,t.halted.map(e=>`#${e}`).join(`, `),` is halted. Inspect its venue before resuming.`]})]}),(0,L.jsx)(`button`,{type:`button`,onClick:r,children:`Reset halt`})]}):null,(0,L.jsxs)(`section`,{className:`operator-metrics`,"aria-label":`Runtime summary`,children:[(0,L.jsx)(aS,{label:`Enabled networks`,value:String(t.chains.length)}),(0,L.jsx)(aS,{label:`Available liquidity`,value:a===null?`—`:`$${bm(a)}`}),(0,L.jsx)(aS,{label:`BRIDGE available`,value:n?.hyperbridge?.free.toLocaleString()??`—`})]}),(0,L.jsxs)(`section`,{className:`operator-section operator-runtime`,"aria-label":`Runtime controls`,children:[(0,L.jsxs)(`div`,{className:`operator-runtime-state`,children:[(0,L.jsx)(`span`,{className:`operator-status-dot ${t.paused?`warn`:``}`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:t.paused?`New fills are paused`:`Filling is active`}),(0,L.jsx)(`p`,{children:t.paused?`Order monitoring continues, but new fills are not analysed. The pause persists across restarts.`:`Simplex is monitoring and filling eligible orders. Pausing lets in-flight fills complete.`})]})]}),(0,L.jsxs)(`div`,{className:`operator-runtime-actions`,children:[(0,L.jsx)(`button`,{type:`button`,className:`primary`,onClick:i.onTogglePause,disabled:i.pending,children:t.paused?`Resume filling`:`Pause new fills`}),(0,L.jsx)(`button`,{type:`button`,className:`operator-runtime-stop`,onClick:i.onStop,disabled:i.pending,title:`Drain in-flight fills, unwind eligible vault positions, and exit the process`,children:`Stop filler`})]})]}),(0,L.jsx)(qx,{status:t,balances:n})]})}function aS(e){return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`strong`,{children:e.value})]})}function oS(e){let{open:t,onClose:n,title:r,description:i,children:a}=e;return(0,L.jsx)(Lp,{open:t,onOpenChange:e=>{e||n()},children:(0,L.jsxs)(Rp,{className:`market-dialog`,overlayClassName:`dialog-overlay`,children:[(0,L.jsxs)(`header`,{className:`market-dialog-header`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(zp,{children:r}),(0,L.jsx)(Bp,{children:i})]}),(0,L.jsx)(Vp,{children:(0,L.jsx)(`button`,{type:`button`,className:`icon-button market-dialog-close`,"aria-label":`Close`,children:(0,L.jsx)(De,{"aria-hidden":`true`})})})]}),(0,L.jsx)(`div`,{className:`market-dialog-body`,children:a})]})})}function sS(e){return e===null?`—`:e.toLocaleString(void 0,{maximumFractionDigits:4})}function cS(e){let{summary:t,sending:n,onConfirm:r,onCancel:i}=e,a=t.fromVault??0,o=a>0&&a>t.largestVault;return(0,L.jsx)(oS,{open:e.open,onClose:i,title:`Review transfer`,description:`Check the destination and the amount. Transfers cannot be undone.`,children:(0,L.jsxs)(`div`,{className:`send-review`,children:[(0,L.jsxs)(`div`,{className:`send-review-headline`,children:[(0,L.jsxs)(`span`,{className:`send-review-asset`,children:[(0,L.jsx)(lm,{symbol:t.symbol,size:`lg`}),(0,L.jsx)(`span`,{className:`send-review-chain-badge`,children:(0,L.jsx)(Ov,{label:t.chainLabel})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`strong`,{children:[t.amount,` `,t.symbol,t.native&&` (native)`]}),(0,L.jsxs)(`span`,{className:`send-review-network`,children:[`on `,t.chainLabel]})]})]}),(0,L.jsxs)(`dl`,{className:`send-review-facts`,children:[(0,L.jsxs)(`div`,{className:`send-review-wide`,children:[(0,L.jsx)(`dt`,{children:`Recipient`}),(0,L.jsx)(`dd`,{className:`mono send-review-address`,children:t.to})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`From wallet`}),(0,L.jsxs)(`dd`,{children:[sS(t.fromWallet),` `,t.symbol]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`From vault`}),(0,L.jsx)(`dd`,{children:a>0?(0,L.jsxs)(L.Fragment,{children:[sS(a),` `,t.symbol]}):(0,L.jsx)(`span`,{className:`ledger-quiet`,children:`Not needed`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Wallet balance`}),(0,L.jsxs)(`dd`,{children:[sS(t.wallet),` `,t.symbol]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Available to send`}),(0,L.jsxs)(`dd`,{children:[sS(t.available),` `,t.symbol]})]})]}),a>0&&!o&&(0,L.jsx)(`p`,{className:`hint`,children:`The wallet is short, so the difference is withdrawn from the vault in the same transaction.`}),o&&(0,L.jsx)(`div`,{className:`operator-alert send-review-alert`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`No single vault covers the shortfall.`}),(0,L.jsxs)(`p`,{children:[`The transfer needs `,sS(a),` `,t.symbol,` from a vault, and the largest one can release `,sS(t.largestVault),`. Withdrawals come from one vault, so this will fail. Send less, or redeem from the vaults first.`]})]})}),(0,L.jsxs)(`div`,{className:`send-review-actions`,children:[(0,L.jsx)(`button`,{type:`button`,className:`secondary`,onClick:i,disabled:n,children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,className:`primary`,onClick:r,disabled:n,children:n?`Sending…`:`Send ${t.amount} ${t.symbol}`})]})]})})}var lS=Object.defineProperty,uS=Object.defineProperties,dS=Object.getOwnPropertyDescriptors,fS=Object.getOwnPropertySymbols,pS=Object.prototype.hasOwnProperty,mS=Object.prototype.propertyIsEnumerable,hS=(e,t,n)=>t in e?lS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})pS.call(t,n)&&hS(e,n,t[n]);if(fS)for(var n of fS(t))mS.call(t,n)&&hS(e,n,t[n]);return e},q=(e,t)=>uS(e,dS(t)),gS=(e,t)=>{var n={};for(var r in e)pS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fS)for(var r of fS(e))t.indexOf(r)<0&&mS.call(e,r)&&(n[r]=e[r]);return n};(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.818 1.63a1.375 1.375 0 0 1 2.364 0l3.742 6.293A1.375 1.375 0 0 1 9.742 10H2.258a1.375 1.375 0 0 1-1.182-2.077l3.742-6.294ZM6 4c.207 0 .375.168.375.375v2a.375.375 0 0 1-.75 0v-2C5.625 4.168 5.793 4 6 4Zm.5 3.75a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z`,fill:`currentColor`})})));var _S=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M9.092 2.041a1.167 1.167 0 0 1 1.65 0l1.92 1.921a.583.583 0 1 1-.825.825L10.5 3.45v8.216a.583.583 0 0 1-1.167 0V3.45L7.996 4.787a.583.583 0 0 1-.825-.825l1.92-1.92ZM4.083 1.75c.322 0 .583.261.583.583v8.217l1.338-1.338a.583.583 0 1 1 .824.825l-1.92 1.921a1.167 1.167 0 0 1-1.65 0l-1.921-1.92a.583.583 0 0 1 .825-.825l1.337 1.337V2.333c0-.322.262-.583.584-.583Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14.667 8A6.667 6.667 0 1 1 1.334 8a6.667 6.667 0 0 1 13.333 0Zm-4 2.167a.5.5 0 0 1-.5.5H6.5a.5.5 0 1 1 0-1h2.46l-3.48-3.48a.5.5 0 0 1 .707-.707l3.48 3.48V6.5a.5.5 0 1 1 1 0v3.667Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14.667 8A6.667 6.667 0 1 0 1.334 8a6.667 6.667 0 0 0 13.333 0Zm-4-2.167a.5.5 0 0 0-.5-.5H6.5a.5.5 0 1 0 0 1h2.46l-3.48 3.48a.5.5 0 0 0 .707.707l3.48-3.48V9.5a.5.5 0 1 0 1 0V5.833Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`m6.91 3 2.84 3-2.84 3m2.5-3H2.25`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})})));var vS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M5.25 1.662a.671.671 0 0 1 0 1.342H3.953L7 6.05l3.047-3.047H8.75a.67.67 0 0 1 0-1.342h2.917c.37 0 .67.3.67.671V5.25a.671.671 0 0 1-1.34 0V3.953L7.67 7.278v4.389a.671.671 0 0 1-1.342 0V7.278L3.004 3.953V5.25a.67.67 0 0 1-1.342 0V2.333c0-.37.3-.67.671-.67H5.25Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:.175})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M9.092 2.041a1.167 1.167 0 0 1 1.65 0l1.92 1.921a.583.583 0 1 1-.825.825L10.5 3.45v8.216a.583.583 0 0 1-1.167 0V3.45L7.996 4.787a.583.583 0 0 1-.825-.825l1.92-1.92ZM4.083 1.75c.322 0 .583.261.583.583v8.217l1.338-1.338a.583.583 0 1 1 .824.825l-1.92 1.921a1.167 1.167 0 0 1-1.65 0l-1.921-1.92a.583.583 0 0 1 .825-.825l1.337 1.337V2.333c0-.322.262-.583.584-.583Z`,fill:`#929DAA`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M2.146 3.987A1.373 1.373 0 0 1 3.374 2h5.252a1.373 1.373 0 0 1 1.228 1.987L7.228 9.241c-.506 1.012-1.95 1.012-2.456 0L2.146 3.987Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M13.138 10.684a1.83 1.83 0 0 1-1.637 2.65H4.5a1.83 1.83 0 0 1-1.637-2.65l3.5-7.005c.675-1.35 2.6-1.35 3.275 0l3.501 7.005Z`,fill:`currentColor`})})));var yS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4 3a.5.5 0 0 1 .5-.5H9a.5.5 0 0 1 .5.5v4.5a.5.5 0 0 1-1 0V4.208L3.479 9.229a.5.5 0 1 1-.708-.707L7.793 3.5H4.5A.5.5 0 0 1 4 3Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M22.002 10.625h-7.618l3.814-6.593-2.38-1.376-2.442 4.22V2h-2.75v7.617L4.031 5.804l-1.376 2.38 4.221 2.441H2v2.75h7.617l-3.813 6.593 2.381 1.378 2.44-4.221V22h2.751v-7.616l6.594 3.814 1.376-2.382-4.221-2.441h4.877v-2.75Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.17 2.666c-1.013 0-1.834.82-1.834 1.833v1.834h13.333V4.499c0-1.012-.82-1.833-1.833-1.833H3.169Zm0 1.333a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm1.166.5a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0ZM6.503 4a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`M1.336 11.5V7.332h13.333v4.166c0 1.013-.82 1.834-1.833 1.834H3.169a1.833 1.833 0 0 1-1.833-1.834Z`,fill:`currentColor`})]})));var bS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M6 .75a5.25 5.25 0 1 1 0 10.5A5.25 5.25 0 0 1 6 .75Zm2.966 3.884a.672.672 0 0 0-.895-.093l-.054.043L5.48 6.867l-1.043-.939-.053-.043a.672.672 0 0 0-.895.993l.049.05L5.03 8.27c.256.23.643.23.899 0l2.986-2.688.049-.048a.672.672 0 0 0 .001-.901Z`,fill:`currentColor`})}))),xS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`m5 7 3.25 3.25L11.5 7`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M5 9.25 8.25 6l3.25 3.25`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.195 4.862c.26-.26.683-.26.943 0l2.195 2.195c.521.52.521 1.365 0 1.886l-2.195 2.195a.667.667 0 0 1-.943-.943L6.391 8 4.195 5.805a.667.667 0 0 1 0-.943Zm4.667 0c.26-.26.682-.26.943 0L12 7.057c.52.52.52 1.365 0 1.886l-2.195 2.195a.667.667 0 0 1-.943-.943L11.057 8 8.862 5.805a.667.667 0 0 1 0-.943Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.057 9.333c.521.521 1.365.521 1.886 0l2.195-2.195a.667.667 0 1 0-.943-.943L8 8.391 5.805 6.195a.667.667 0 0 0-.943.943l2.195 2.195Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M10.67 11.39 8.473 9.196a.667.667 0 0 0-.943 0l-2.195 2.196M5.336 4.61 7.53 6.804c.26.26.683.26.943 0l2.195-2.196`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M5.333 6 7.53 3.805c.26-.26.682-.26.943 0L10.667 6m0 4-2.195 2.195a.667.667 0 0 1-.943 0L5.333 10`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})})));var SS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 13 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.5 1a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm-1 4.5A.5.5 0 0 1 6 5h.5a.5.5 0 0 1 .5.5V8a.5.5 0 1 1-1 0V6a.5.5 0 0 1-.5-.5Zm1-2a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z`,fill:`currentColor`})}))),CS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M14.165 8A6.167 6.167 0 1 1 1.832 8a6.167 6.167 0 0 1 12.333 0Z`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,strokeDasharray:`2 2.67`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M14.167 8A6.167 6.167 0 1 1 1.834 8a6.167 6.167 0 0 1 12.333 0Z`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`circle`,{cx:8,cy:8,r:6,fill:`currentColor`})})));var wS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.997 12.833a5.833 5.833 0 1 0 0-11.667 5.833 5.833 0 0 0 0 11.667Zm.438-8.313a.438.438 0 0 0-.875 0V7c0 .115.046.227.128.309l1.604 1.604a.438.438 0 0 0 .619-.619L7.435 6.818V4.52Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`path`,{d:`M22 14a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`M14.38 5.522A8.5 8.5 0 0 0 6.936 16.69 7 7 0 1 1 14.38 5.522Z`,fill:`currentColor`})]})));var TS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M4.667 4.666V4.2c0-.654 0-.98.127-1.23.112-.22.29-.398.51-.51.25-.127.577-.127 1.23-.127h3.267c.653 0 .98 0 1.23.127.219.112.397.29.51.51.126.25.126.576.126 1.23v3.266c0 .654 0 .98-.127 1.23-.112.22-.29.398-.51.51-.25.127-.576.127-1.23.127h-.466m0-2.8V9.8c0 .653 0 .98-.127 1.23-.112.219-.29.397-.51.51-.25.126-.576.126-1.23.126H4.201c-.654 0-.98 0-1.23-.127a1.167 1.167 0 0 1-.51-.51c-.127-.25-.127-.576-.127-1.23V6.534c0-.653 0-.98.127-1.23.112-.22.29-.398.51-.51.25-.127.576-.127 1.23-.127h3.266c.654 0 .98 0 1.23.127.22.112.398.29.51.51.127.25.127.577.127 1.23Z`,stroke:`currentColor`,strokeWidth:1.313,strokeLinecap:`round`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M1 4.692C1 4.31 1.313 4 1.7 4h12.6c.387 0 .7.31.7.692a.696.696 0 0 1-.7.693H1.7c-.387 0-.7-.31-.7-.693ZM3.1 8.5c0-.382.313-.692.7-.692h8.4c.387 0 .7.31.7.692a.696.696 0 0 1-.7.692H3.8c-.387 0-.7-.31-.7-.692Zm2.1 3.808c0-.383.313-.693.7-.693h4.2c.387 0 .7.31.7.693a.696.696 0 0 1-.7.692H5.9c-.387 0-.7-.31-.7-.692Z`,fill:`currentColor`})})));var ES=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M1.75 3.938c0-1.209.979-2.188 2.187-2.188h2.625c1.208 0 2.187.98 2.187 2.188v1.317a2.188 2.188 0 0 1 2.042 2.183v1.604a.583.583 0 0 0 1.167 0V5.446c0-.372-.158-.727-.435-.976l-.879-.79a.437.437 0 1 1 .585-.651l.88.791c.46.415.724 1.006.724 1.626v3.596a1.458 1.458 0 0 1-2.917 0V7.438c0-.676-.51-1.232-1.167-1.305v5.242h.146a.438.438 0 0 1 0 .875H1.604a.438.438 0 0 1 0-.875h.145V3.937Zm1.75 1.75c0-.242.195-.438.437-.438h2.625a.438.438 0 0 1 0 .875H3.937a.437.437 0 0 1-.438-.438Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.666 4v-.667a.667.667 0 0 0-1.333 0V6c0 .368.298.667.667.667h2.666a.667.667 0 0 0 0-1.333H3.38a5.333 5.333 0 1 1-.41 4.445.667.667 0 1 0-1.257.443A6.669 6.669 0 0 0 14.666 8a6.667 6.667 0 0 0-12-4ZM8 4.667c.368 0 .666.298.666.667v2.39l1.805 1.805a.667.667 0 0 1-.943.943l-2-2A.667.667 0 0 1 7.333 8V5.333c0-.368.298-.666.667-.666Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`foreignObject`,{x:-33.75,y:-33.75,width:83.5,height:83.5,children:(0,L.jsx)(`div`,{style:{height:`100%`,width:`100%`}})}),(0,L.jsxs)(`g`,{filter:`url(#loader_svg__a)`,"data-figma-bg-blur-radius":34,children:[(0,L.jsx)(`mask`,{id:`loader_svg__c`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:16,height:16,fill:`#000`,children:(0,L.jsx)(`path`,{fill:`white`,d:`M0 0h16v16H0z`})}),(0,L.jsx)(`g`,{clipPath:`url(#loader_svg__b)`,"data-figma-skip-parse":`true`,mask:`url(#loader_svg__c)`,children:(0,L.jsx)(`foreignObject`,{x:-1214.29,y:-1214.29,width:2428.57,height:2428.57,transform:`matrix(.007 0 0 .007 8 8)`,children:(0,L.jsx)(`div`,{style:{background:`conic-gradient(from 90deg,#ff6af0 0deg,#ff35ea 31.7015deg,#5ae0ff 75.2993deg,#fff 184.914deg,#fff 273.052deg,#ff6af0 360deg)`,height:`100%`,width:`100%`,opacity:1}})})}),(0,L.jsx)(`path`,{d:`M1.75 8a.75.75 0 0 0-1.5 0h1.5ZM8 .25a.75.75 0 0 0 0 1.5V.25ZM15 8h-.75A6.25 6.25 0 0 1 8 14.25v1.5A7.75 7.75 0 0 0 15.75 8H15Zm-7 7v-.75A6.25 6.25 0 0 1 1.75 8H.25A7.75 7.75 0 0 0 8 15.75V15ZM8 1v.75A6.25 6.25 0 0 1 14.25 8h1.5A7.75 7.75 0 0 0 8 .25V1Z`,"data-figma-gradient-fill":`{"type":"GRADIENT_ANGULAR","stops":[{"color":{"r":1.0,"g":0.20784313976764679,"b":0.92078429460525513,"a":1.0},"position":0.088059790432453156},{"color":{"r":0.35333490371704102,"g":0.88144475221633911,"b":1.0,"a":1.0},"position":0.20916469395160675},{"color":{"r":1.0,"g":1.0,"b":1.0,"a":1.0},"position":0.51365131139755249},{"color":{"r":1.0,"g":1.0,"b":1.0,"a":1.0},"position":0.75847864151000977}],"stopsVar":[{"color":{"r":1.0,"g":0.20784313976764679,"b":0.92078429460525513,"a":1.0},"position":0.088059790432453156},{"color":{"r":0.35333490371704102,"g":0.88144475221633911,"b":1.0,"a":1.0},"position":0.20916469395160675},{"color":{"r":1.0,"g":1.0,"b":1.0,"a":1.0},"position":0.51365131139755249},{"color":{"r":1.0,"g":1.0,"b":1.0,"a":1.0},"position":0.75847864151000977}],"transform":{"m00":14.0,"m01":0.0,"m02":1.0,"m10":0.0,"m11":14.0,"m12":1.0},"opacity":1.0,"blendMode":"NORMAL","visible":true}`,mask:`url(#loader_svg__c)`})]}),(0,L.jsxs)(`defs`,{children:[(0,L.jsx)(`clipPath`,{id:`loader_svg__b`,children:(0,L.jsx)(`path`,{d:`M1.75 8a.75.75 0 0 0-1.5 0h1.5ZM8 .25a.75.75 0 0 0 0 1.5V.25ZM15 8h-.75A6.25 6.25 0 0 1 8 14.25v1.5A7.75 7.75 0 0 0 15.75 8H15Zm-7 7v-.75A6.25 6.25 0 0 1 1.75 8H.25A7.75 7.75 0 0 0 8 15.75V15ZM8 1v.75A6.25 6.25 0 0 1 14.25 8h1.5A7.75 7.75 0 0 0 8 .25V1Z`,mask:`url(#loader_svg__c)`})}),(0,L.jsxs)(`filter`,{id:`loader_svg__a`,x:-33.75,y:-33.75,width:83.5,height:83.5,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,L.jsx)(`feFlood`,{floodOpacity:0,result:`BackgroundImageFix`}),(0,L.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`BackgroundImageFix`,result:`shape`}),(0,L.jsx)(`feColorMatrix`,{in:`SourceAlpha`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,L.jsx)(`feOffset`,{dy:4}),(0,L.jsx)(`feGaussianBlur`,{stdDeviation:12}),(0,L.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`arithmetic`,k2:-1,k3:1}),(0,L.jsx)(`feColorMatrix`,{values:`0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0`}),(0,L.jsx)(`feBlend`,{in2:`shape`,result:`effect1_innerShadow_1171_15455`})]})]})]}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M15 4.5a3.5 3.5 0 1 0-7 0A3.5 3.5 0 1 0 4.5 8 3.5 3.5 0 1 0 8 11.5 3.5 3.5 0 1 0 11.501 8 3.5 3.5 0 0 0 15 4.5Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M1.833 10.167h12.334M1.834 6h12.333`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`m9.486 3.951 2.563 2.563-6.14 6.134a4.82 4.82 0 0 1-2.001 1.202l-2.097.64a.244.244 0 0 1-.3-.301l.64-2.097a4.822 4.822 0 0 1 1.201-2.002l6.134-6.139Zm3.672-2.134 1.025 1.025c.396.397.421 1.024.074 1.45l-1.168 1.173-2.554-2.554 1.09-1.094a1.084 1.084 0 0 1 1.533 0Z`,fill:`currentColor`})})));var DS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 1.167a5.833 5.833 0 1 0 0 11.666A5.833 5.833 0 0 0 7 1.166Zm2.453 3.379a.583.583 0 0 1 0 .825L5.37 9.454a.583.583 0 0 1-.825-.825L8.63 4.546a.583.583 0 0 1 .824 0ZM5.98 5.25a.73.73 0 1 1-1.459 0 .73.73 0 0 1 1.459 0Zm3.5 3.5a.73.73 0 1 1-1.459 0 .73.73 0 0 1 1.459 0Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8 2c.368 0 .667.298.667.667v4.666h4.666a.667.667 0 1 1 0 1.334H8.667v4.666a.667.667 0 1 1-1.334 0V8.667H2.667a.667.667 0 1 1 0-1.334h4.666V2.667C7.333 2.298 7.632 2 8 2Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M7.999 2v6m3.816-3.216a5.4 5.4 0 1 1-7.639 0`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M5.334 8c-1.307 0-2.368.522-3.144 1.39-.766.856-1.237 2.028-1.436 3.321-.11.713.465 1.289 1.13 1.289h6.9c.665 0 1.24-.576 1.13-1.289-.199-1.293-.67-2.465-1.435-3.32C7.703 8.521 6.642 8 5.334 8ZM2.668 4.667a2.667 2.667 0 1 1 5.333 0 2.667 2.667 0 0 1-5.333 0ZM9.001 5a2.333 2.333 0 1 1 4.667 0A2.333 2.333 0 0 1 9 5ZM9.473 8.501c.984 1.1 1.533 2.536 1.76 4.007.042.277.039.542-.003.792h3.017c.681 0 1.284-.593 1.154-1.335-.193-1.098-.618-2.093-1.3-2.82-.691-.738-1.626-1.178-2.767-1.178-.72 0-1.356.175-1.902.489l.04.045Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M2.827 9.833A5.502 5.502 0 0 0 13.514 8a5.5 5.5 0 0 0-5.5-5.5c-1.878 0-3.133.803-4.347 2.173m-.5-2.006v2.166a.5.5 0 0 0 .5.5h2.166`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`m14 14-2.9-2.9m1.567-3.767A5.333 5.333 0 1 1 2 7.333a5.333 5.333 0 0 1 10.667 0Z`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M11.665 3.208c0-.44-.25-.78-.527-1.013-.28-.236-.65-.422-1.056-.567-.817-.292-1.907-.461-3.083-.461-1.177 0-2.267.169-3.084.46-.406.146-.776.332-1.055.568-.277.234-.528.574-.528 1.013v2.625c0 .44.251.78.528 1.014.28.235.65.422 1.055.567.817.292 1.907.46 3.084.46 1.176 0 2.266-.168 3.083-.46.406-.145.776-.332 1.055-.567.277-.234.528-.574.528-1.014V3.208Zm-8.052-.122a.437.437 0 0 0-.11.122c.01.02.037.06.11.122.133.113.362.241.695.36.66.236 1.612.393 2.69.393 1.08 0 2.03-.157 2.692-.393.333-.119.561-.247.695-.36a.436.436 0 0 0 .11-.122.436.436 0 0 0-.11-.122c-.134-.113-.362-.24-.695-.36-.661-.236-1.612-.393-2.691-.393-1.08 0-2.03.157-2.691.393-.333.12-.562.247-.695.36ZM10.475 8.512a4.906 4.906 0 0 0 1.19-.6v2.88c0 .44-.25.78-.527 1.013-.28.236-.65.422-1.056.567-.817.292-1.907.461-3.083.461-1.177 0-2.267-.17-3.084-.46-.406-.146-.776-.332-1.055-.568-.277-.234-.528-.574-.528-1.013v-2.88c.374.266.794.459 1.19.6.974.348 2.203.53 3.477.53s2.503-.182 3.476-.53Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.154 2.654a2.218 2.218 0 0 1 3.691 0l.463.695c.188.281.53.417.86.341l.572-.132a2.252 2.252 0 0 1 2.7 2.701l-.132.572c-.076.33.06.672.342.86l.695.463a2.218 2.218 0 0 1 0 3.691l-.695.463a.813.813 0 0 0-.341.86l.131.572a2.252 2.252 0 0 1-2.7 2.7l-.572-.132a.813.813 0 0 0-.86.342l-.463.695a2.218 2.218 0 0 1-3.691 0l-.464-.695a.813.813 0 0 0-.86-.341l-.57.131a2.252 2.252 0 0 1-2.702-2.7l.132-.572a.813.813 0 0 0-.341-.86l-.695-.463a2.218 2.218 0 0 1 0-3.691l.695-.464a.813.813 0 0 0 .341-.86l-.132-.57A2.252 2.252 0 0 1 6.26 3.557l.572.132c.33.076.672-.06.86-.341l.463-.695ZM7.083 9.999a2.917 2.917 0 1 1 5.833 0 2.917 2.917 0 0 1-5.833 0Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2 5.78a2 2 0 0 1 1.02-1.743l4-2.25a2 2 0 0 1 1.96 0l4 2.25A2 2 0 0 1 14 5.78v4.44a2 2 0 0 1-1.02 1.743l-4 2.25a2 2 0 0 1-1.96 0l-4-2.25A2 2 0 0 1 2 10.22V5.78ZM5.667 8a2.333 2.333 0 1 1 4.666 0 2.333 2.333 0 0 1-4.666 0Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`path`,{d:`M10.98 3.646a.5.5 0 0 0 0 .708l.48.48H8.918c-.447 0-.855.255-1.05.657l-.14.29a.267.267 0 0 0 0 .232l.379.783c.049.1.191.1.24 0l.421-.869a.167.167 0 0 1 .15-.094h2.542l-.48.48a.5.5 0 0 0 .707.707l1.333-1.333a.5.5 0 0 0 0-.707l-1.333-1.334a.5.5 0 0 0-.707 0ZM6.69 10.219a.267.267 0 0 0 0-.232l-.38-.783a.133.133 0 0 0-.24 0l-.421.869a.167.167 0 0 1-.15.094H3.334a.5.5 0 1 0 0 1h2.165c.447 0 .855-.256 1.05-.658l.14-.29Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`M10.98 12.354a.5.5 0 0 1 0-.708l.48-.48H8.918c-.447 0-.855-.255-1.05-.657L5.649 5.927a.167.167 0 0 0-.15-.094H3.334a.5.5 0 1 1 0-1h2.165c.447 0 .855.256 1.05.658l2.219 4.582a.167.167 0 0 0 .15.094h2.542l-.48-.48a.5.5 0 0 1 .707-.707l1.333 1.333a.5.5 0 0 1 0 .707l-1.333 1.334a.5.5 0 0 1-.707 0Z`,fill:`currentColor`})]}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.333 3.333a.667.667 0 1 1 0-1.333h4c.368 0 .667.298.667.667v4a.667.667 0 0 1-1.333 0v-2.39L7.805 9.137a.667.667 0 0 1-.943-.943l4.862-4.862h-2.39Zm-4.559 0H6a.667.667 0 0 1 0 1.334H4.8c-.384 0-.633 0-.821.016-.182.014-.249.04-.282.056a.667.667 0 0 0-.291.292c-.017.033-.042.1-.057.28a11.33 11.33 0 0 0-.016.822V11.2c0 .384 0 .633.016.822.015.18.04.248.057.28a.667.667 0 0 0 .291.292c.033.017.1.042.282.057.188.015.437.016.821.016h5.067c.384 0 .632 0 .821-.016.181-.015.248-.04.281-.057a.667.667 0 0 0 .292-.291c.017-.033.042-.1.056-.282.016-.189.016-.437.016-.821V10a.667.667 0 0 1 1.334 0v1.226c0 .351 0 .654-.02.904-.022.264-.07.526-.198.778a2 2 0 0 1-.874.874 2.036 2.036 0 0 1-.778.198c-.25.02-.553.02-.905.02H4.774c-.351 0-.654 0-.904-.02a2.036 2.036 0 0 1-.778-.198 2 2 0 0 1-.874-.874 2.036 2.036 0 0 1-.198-.778C2 11.88 2 11.577 2 11.226V6.108c0-.352 0-.655.02-.905.022-.263.07-.525.198-.778a2 2 0 0 1 .874-.874c.252-.128.514-.176.778-.197.25-.02.553-.02.904-.02Z`,fill:`currentColor`})})));var OS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M7.927 1.503a.889.889 0 0 0-1.601 0L4.948 4.371l-3.174.416C1.038 4.883.732 5.793 1.28 6.31l2.319 2.187-.582 3.122c-.138.742.646 1.291 1.295.942l2.814-1.518 2.815 1.518c.648.35 1.433-.2 1.294-.942l-.582-3.122 2.32-2.187c.548-.516.241-1.426-.495-1.522l-3.173-.416-1.378-2.868Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5.456 2.174a.593.593 0 0 1 0 .838l-.766.766H8.89a4.444 4.444 0 1 1 0 8.888H4.445a.593.593 0 1 1 0-1.185h4.444a3.259 3.259 0 1 0 0-6.518H4.69l.766.766a.593.593 0 0 1-.838.838L2.841 4.789a.593.593 0 0 1 0-.838l1.777-1.777a.593.593 0 0 1 .838 0Z`,fill:`currentColor`})}))),(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`path`,{d:`M11.12 3.12a3.12 3.12 0 1 1-6.24 0 3.12 3.12 0 0 1 6.24 0ZM11.12 12.88a3.12 3.12 0 1 1-6.24 0 3.12 3.12 0 0 1 6.24 0ZM12.88 11.12a3.12 3.12 0 1 1 0-6.24 3.12 3.12 0 0 1 0 6.24Z`,fill:`#929DAA`}),(0,L.jsx)(`path`,{d:`M3.12 11.12a3.12 3.12 0 1 1 0-6.24 3.12 3.12 0 0 1 0 6.24Z`,fill:`currentColor`})]}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M3 6.538 5.96 4v8.459M12.23 9.923l-2.96 2.538V4.002`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`m3.333 4.333.582 8.426c.048.699.629 1.241 1.33 1.241h5.51c.701 0 1.283-.542 1.33-1.241l.582-8.426M2.333 4h11.334M5.38 3.83a2.668 2.668 0 0 1 5.24 0`,stroke:`currentColor`,strokeWidth:1.333,strokeLinecap:`round`,strokeLinejoin:`round`})}))),(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 11 13`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`title`,{children:`User`}),(0,L.jsx)(`path`,{d:`M5.401 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6ZM5.401 7C2.62 7 .583 8.862.028 11.334c-.167.74.44 1.333 1.106 1.333h8.535c.666 0 1.272-.592 1.106-1.333C10.219 8.862 8.184 7 5.4 7Z`,fill:`currentColor`})]})));var kS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.333 2.667a2 2 0 0 0-2 2v6.666a2 2 0 0 0 2 2h9.333a2 2 0 0 0 2-2V4.666a2 2 0 0 0-2-2H3.333Zm0 2.666c0-.368.298-.667.667-.667h8c.368 0 .666.299.666.667v1.333H11.61a2 2 0 0 0-1.414.586l-.162.162A2 2 0 0 1 8.62 8H7.38a2 2 0 0 1-1.414-.586l-.162-.162a2 2 0 0 0-1.414-.585H3.333V5.332Z`,fill:`currentColor`})}))),AS=(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm2.948 4.054a.673.673 0 0 0-.95-.001L8.001 7.05 6.003 5.052l-.105-.086a.674.674 0 0 0-.931.931l.087.106L7.05 8 5.054 9.997a.672.672 0 0 0 .95.95L8 8.95l1.996 1.996.105.086a.672.672 0 0 0 .931-.93l-.086-.106L8.951 8l1.996-1.996a.673.673 0 0 0 .001-.95Z`,fill:`currentColor`})})));(0,b.memo)(e=>(0,L.jsx)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:(0,L.jsx)(`path`,{d:`m3.334 3.334 9.333 9.333m0-9.333-9.333 9.333`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`})}))),(0,b.memo)(e=>(0,L.jsxs)(`svg`,q(K({width:`1em`,height:`1em`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e),{children:[(0,L.jsx)(`title`,{children:`Zap`}),(0,L.jsx)(`path`,{d:`M9.333 1.57c0-.817-1.055-1.146-1.52-.473L2.116 9.36a.833.833 0 0 0 .686 1.307h3.865v3.763c0 .817 1.055 1.146 1.52.473l5.698-8.263a.833.833 0 0 0-.686-1.307H9.333V1.57Z`,fill:`currentColor`,opacity:.5})]})));function jS(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jS(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function MS(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jS(e))&&(r&&(r+=` `),r+=t);return r}var NS=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,PS=MS,FS=(e,t)=>n=>{if(t?.variants==null)return PS(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=NS(t)||NS(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return PS(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},IS=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},LS=(e,t)=>({classGroupId:e,validator:t}),RS=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zS=`-`,BS=[],VS=`arbitrary..`,HS=e=>{let t=GS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return WS(e);let n=e.split(zS);return US(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?IS(i,t):t:i||BS}return n[e]||BS}}},US=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=US(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(zS):e.slice(t).join(zS),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},WS=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?VS+r:void 0})(),GS=e=>{let{theme:t,classGroups:n}=e;return KS(n,t)},KS=(e,t)=>{let n=RS();for(let r in e){let i=e[r];qS(i,n,r,t)}return n},qS=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];JS(i,t,n,r)}},JS=(e,t,n,r)=>{if(typeof e==`string`){YS(e,t,n);return}if(typeof e==`function`){XS(e,t,n,r);return}ZS(e,t,n,r)},YS=(e,t,n)=>{let r=e===``?t:QS(t,e);r.classGroupId=n},XS=(e,t,n,r)=>{if($S(e)){qS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(LS(n,e))},ZS=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];qS(o,QS(t,a),n,r)}},QS=(e,t)=>{let n=e,r=t.split(zS),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=RS(),n.nextPart.set(t,i)),n=i}return n},$S=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,eC=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},tC=`!`,nC=`:`,rC=[],iC=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),aC=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===nC){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(tC)?(c=s.slice(0,-1),l=!0):s.startsWith(tC)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return iC(t,l,c,u)};if(t){let e=t+nC,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):iC(rC,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},oC=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},sC=e=>({cache:eC(e.cacheSize),parseClassName:aC(e),sortModifiers:oC(e),postfixLookupClassGroupIds:cC(e),...HS(e)}),cC=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},lC=/\s+/,uC=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(lC),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+tC:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},dC=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=fC(n))&&(i&&(i+=` `),i+=r);return i},fC=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=fC(e[r]))&&(n&&(n+=` `),n+=t);return n},pC=(e,...t)=>{let n,r,i,a,o=o=>(n=sC(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=uC(e,n);return i(e,a),a};return a=o,(...e)=>a(dC(...e))},mC=[],hC=e=>{let t=t=>t[e]||mC;return t.isThemeGetter=!0,t},gC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_C=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wC=e=>vC.test(e),TC=e=>!!e&&!Number.isNaN(Number(e)),EC=e=>!!e&&Number.isInteger(Number(e)),DC=e=>e.endsWith(`%`)&&TC(e.slice(0,-1)),OC=e=>yC.test(e),kC=()=>!0,AC=e=>bC.test(e)&&!xC.test(e),jC=()=>!1,MC=e=>SC.test(e),NC=e=>CC.test(e),PC=e=>!LC(e)&&!GC(e),FC=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),IC=e=>$C(e,rw,jC),LC=e=>gC.test(e),RC=e=>$C(e,iw,AC),zC=e=>$C(e,aw,TC),BC=e=>$C(e,sw,kC),VC=e=>$C(e,ow,jC),HC=e=>$C(e,tw,jC),UC=e=>$C(e,nw,NC),WC=e=>$C(e,cw,MC),GC=e=>_C.test(e),KC=e=>ew(e,iw),qC=e=>ew(e,ow),JC=e=>ew(e,tw),YC=e=>ew(e,rw),XC=e=>ew(e,nw),ZC=e=>ew(e,cw,!0),QC=e=>ew(e,sw,!0),$C=(e,t,n)=>{let r=gC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ew=(e,t,n=!1)=>{let r=_C.exec(e);return r?r[1]?t(r[1]):n:!1},tw=e=>e===`position`||e===`percentage`,nw=e=>e===`image`||e===`url`,rw=e=>e===`length`||e===`size`||e===`bg-size`,iw=e=>e===`length`,aw=e=>e===`number`,ow=e=>e===`family-name`,sw=e=>e===`number`||e===`weight`,cw=e=>e===`shadow`,lw=pC(()=>{let e=hC(`color`),t=hC(`font`),n=hC(`text`),r=hC(`font-weight`),i=hC(`tracking`),a=hC(`leading`),o=hC(`breakpoint`),s=hC(`container`),c=hC(`spacing`),l=hC(`radius`),u=hC(`shadow`),d=hC(`inset-shadow`),f=hC(`text-shadow`),p=hC(`drop-shadow`),m=hC(`blur`),h=hC(`perspective`),g=hC(`aspect`),_=hC(`ease`),v=hC(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),GC,LC],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[GC,LC,c],T=()=>[wC,`full`,`auto`,...w()],E=()=>[EC,`none`,`subgrid`,GC,LC],D=()=>[`auto`,{span:[`full`,EC,GC,LC]},EC,GC,LC],O=()=>[EC,`auto`,GC,LC],k=()=>[`auto`,`min`,`max`,`fr`,GC,LC],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[wC,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[wC,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[wC,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,GC,LC],F=()=>[...b(),JC,HC,{position:[GC,LC]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,YC,IC,{size:[GC,LC]}],ie=()=>[DC,KC,RC],ae=()=>[``,`none`,`full`,l,GC,LC],oe=()=>[``,TC,KC,RC],I=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[TC,DC,JC,HC],le=()=>[``,`none`,m,GC,LC],ue=()=>[`none`,TC,GC,LC],de=()=>[`none`,TC,GC,LC],fe=()=>[TC,GC,LC],pe=()=>[wC,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[OC],breakpoint:[OC],color:[kC],container:[OC],"drop-shadow":[OC],ease:[`in`,`out`,`in-out`],font:[PC],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[OC],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[OC],shadow:[OC],spacing:[`px`,TC],text:[OC],"text-shadow":[OC],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,wC,LC,GC,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,GC,LC]}],"container-named":[FC],columns:[{columns:[TC,LC,GC,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[EC,`auto`,GC,LC]}],basis:[{basis:[wC,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[TC,wC,`auto`,`initial`,`none`,LC]}],grow:[{grow:[``,TC,GC,LC]}],shrink:[{shrink:[``,TC,GC,LC]}],order:[{order:[EC,`first`,`last`,`none`,GC,LC]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,KC,RC]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,QC,BC]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,DC,LC]}],"font-family":[{font:[qC,VC,t]}],"font-features":[{"font-features":[LC]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,GC,LC]}],"line-clamp":[{"line-clamp":[TC,`none`,GC,zC]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,GC,LC]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,GC,LC]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...I(),`wavy`]}],"text-decoration-thickness":[{decoration:[TC,`from-font`,`auto`,GC,RC]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[TC,`auto`,GC,LC]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[EC,GC,LC]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,GC,LC]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,GC,LC]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},EC,GC,LC],radial:[``,GC,LC],conic:[EC,GC,LC]},XC,UC]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...I(),`hidden`,`none`]}],"divide-style":[{divide:[...I(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...I(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[TC,GC,LC]}],"outline-w":[{outline:[``,TC,KC,RC]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,ZC,WC]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,ZC,WC]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[TC,RC]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,ZC,WC]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[TC,GC,LC]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[TC]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[GC,LC]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[TC]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,GC,LC]}],filter:[{filter:[``,`none`,GC,LC]}],blur:[{blur:le()}],brightness:[{brightness:[TC,GC,LC]}],contrast:[{contrast:[TC,GC,LC]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ZC,WC]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,TC,GC,LC]}],"hue-rotate":[{"hue-rotate":[TC,GC,LC]}],invert:[{invert:[``,TC,GC,LC]}],saturate:[{saturate:[TC,GC,LC]}],sepia:[{sepia:[``,TC,GC,LC]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,GC,LC]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[TC,GC,LC]}],"backdrop-contrast":[{"backdrop-contrast":[TC,GC,LC]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,TC,GC,LC]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[TC,GC,LC]}],"backdrop-invert":[{"backdrop-invert":[``,TC,GC,LC]}],"backdrop-opacity":[{"backdrop-opacity":[TC,GC,LC]}],"backdrop-saturate":[{"backdrop-saturate":[TC,GC,LC]}],"backdrop-sepia":[{"backdrop-sepia":[``,TC,GC,LC]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,GC,LC]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[TC,`initial`,GC,LC]}],ease:[{ease:[`linear`,`initial`,_,GC,LC]}],delay:[{delay:[TC,GC,LC]}],animate:[{animate:[`none`,v,GC,LC]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,GC,LC]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[GC,LC,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[EC,GC,LC]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,GC,LC]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,GC,LC]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[TC,KC,RC,zC]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),uw=new Set([`style`]),dw={srcset:`srcSet`,fetchpriority:`use`in b?`fetchPriority`:`fetchpriority`},fw=e=>e.startsWith(`data-`)||e.startsWith(`aria-`)?e:dw[e]||e.replace(/-./g,e=>e[1].toUpperCase());function pw(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[fw(e),uw.has(e)&&t&&typeof t!=`string`?pw(t):t]))}var mw=(e,t)=>{if(!(!e||!t))switch(t){case`constrained`:return`(min-width: ${e}px) ${e}px, 100vw`;case`fixed`:return`${e}px`;case`fullWidth`:return`100vw`;default:return}},hw=e=>e||e===0?`${e}px`:void 0,gw=({width:e,height:t,aspectRatio:n,layout:r,objectFit:i=`cover`,background:a})=>{let o=[[`object-fit`,i]];return a?.startsWith(`https:`)||a?.startsWith(`http:`)||a?.startsWith(`data:`)||a?.startsWith(`/`)?(o.push([`background-image`,`url(${a})`]),o.push([`background-size`,`cover`]),o.push([`background-repeat`,`no-repeat`])):o.push([`background`,a]),r===`fixed`&&(o.push([`width`,hw(e)]),o.push([`height`,hw(t)])),r===`constrained`&&(o.push([`max-width`,hw(e)]),o.push([`max-height`,hw(t)]),o.push([`aspect-ratio`,n?`${n}`:void 0]),o.push([`width`,`100%`])),r===`fullWidth`&&(o.push([`width`,`100%`]),o.push([`aspect-ratio`,n?`${n}`:void 0]),o.push([`height`,hw(t)])),Object.fromEntries(o.filter(([,e])=>e))},_w=[6016,5120,4480,3840,3200,2560,2048,1920,1668,1280,1080,960,828,750,640],vw=24,yw=({width:e,layout:t,resolutions:n=_w})=>{if(t===`fullWidth`)return n;if(!e)return[];let r=e*2;return t===`fixed`?[e,r]:t===`constrained`?[e,r,...n.filter(e=>e<r)]:[]},bw=({src:e,width:t,layout:n=`constrained`,height:r,aspectRatio:i,breakpoints:a,format:o})=>(a||=yw({width:t,layout:n}),a.sort((e,t)=>e-t).map(t=>{let n;return r&&i&&(n=Math.round(t/i)),{url:e,width:t,height:n,format:o}})),xw=e=>{let{src:t,transformer:n,operations:r}=e;return n?bw(e).map(({url:i,...a})=>`${n(t,{...r,...a},e.options)?.toString()} ${a.width}w`).join(`,
|
|
60
|
-
`):``};function Sw({width:e,height:t,priority:n,layout:r=`constrained`,aspectRatio:i,...a}){return e=e&&Number(e)||void 0,t=t&&Number(t)||void 0,n?(a.loading||=`eager`,a.fetchpriority||=`high`):(a.loading||=`lazy`,a.decoding||=`async`),a.alt===``&&(a.role||=`presentation`),i?e?t||=Math.round(e/i):t&&(e=Math.round(t*i)):e&&t&&(i=e/t),{width:e,height:t,aspectRatio:i,layout:r,...a}}function Cw(e){let{src:t,transformer:n,background:r,layout:i,objectFit:a,breakpoints:o,width:s,height:c,aspectRatio:l,unstyled:u,operations:d,options:f,...p}=Sw(e);if(n&&r===`auto`){let e=l?Math.round(vw/l):void 0,i=n(t,{width:vw,height:e},f);i&&(r=i.toString())}let m={width:s,height:c,aspectRatio:l,layout:i,objectFit:a,background:r};if(p.sizes||=mw(s,i),u||(p.style={...gw(m),...p.style}),n){p.srcset=xw({src:t,width:s,height:c,aspectRatio:l,layout:i,breakpoints:o,transformer:n,operations:d,options:f});let e=n(t,{...d,width:s,height:c},f);e&&(t=e),(i===`fullWidth`||i===`constrained`)&&(s=void 0,c=void 0)}return{...p,src:t?.toString(),width:s,height:c}}function ww(e){return e?e.startsWith(`image/`)?{format:e.slice(6),mimeType:e}:{format:e,mimeType:`image/${e===`jpg`?`jpeg`:e}`}:{}}function Tw({media:e,type:t,...n}){let{src:r,transformer:i,layout:a,breakpoints:o,width:s,height:c,aspectRatio:l,sizes:u,loading:d,decoding:f,operations:p,options:m,...h}=Sw(n);if(!i)return{};let{format:g,mimeType:_}=ww(t);u||=mw(s,a);let v=xw({src:r,width:s,height:c,aspectRatio:l,layout:a,breakpoints:o,transformer:i,format:g,operations:p,options:m}),y=i(r,{...p,width:s,height:c},m);y&&(r=y);let b={...h,sizes:u,srcset:v};return e&&(b.media=e),_&&(b.type=_),b}var Ew={"images.ctfassets.net":`contentful`,"cdn.builder.io":`builder.io`,"images.prismic.io":`imgix`,"www.datocms-assets.com":`imgix`,"cdn.sanity.io":`imgix`,"images.unsplash.com":`imgix`,"cdn.shopify.com":`shopify`,"s7d1.scene7.com":`scene7`,"ip.keycdn.com":`keycdn`,"assets.caisy.io":`bunny`,"images.contentstack.io":`contentstack`,"ucarecdn.com":`uploadcare`,"imagedelivery.net":`cloudflare_images`,"wsrv.nl":`wsrv`},Dw={"imgix.net":`imgix`,"wp.com":`wordpress`,"files.wordpress.com":`wordpress`,"b-cdn.net":`bunny`,"storyblok.com":`storyblok`,"kc-usercontent.com":`kontent.ai`,"cloudinary.com":`cloudinary`,"kxcdn.com":`keycdn`,"imgeng.in":`imageengine`,"imagekit.io":`imagekit`,"cloudimg.io":`cloudimage`,"ucarecdn.com":`uploadcare`,"supabase.co":`supabase`,"graphassets.com":`hygraph`},Ow={"/cdn-cgi/image/":`cloudflare`,"/cdn-cgi/imagedelivery/":`cloudflare_images`,"/_next/image":`nextjs`,"/_vercel/image":`vercel`,"/is/image":`scene7`,"/_ipx/":`ipx`,"/_image":`astro`,"/.netlify/images":`netlify`,"/storage/v1/object/public/":`supabase`,"/storage/v1/render/image/public/":`supabase`,"/v1/storage/buckets/":`appwrite`};function kw(e){if(!e)return e;let t=Number(e);return isNaN(t)?e:Math.round(t)}var Aw=e=>{let{pathname:t,search:n}=e;return`${t}${n}`},jw=e=>e.hostname===`n`?Aw(e):e.toString(),Mw=(e,t)=>typeof e==`string`?new URL(e,t??`http://n/`):e,Nw=e=>e===` `?`+`:`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`),Pw=e=>e?.startsWith(`/`)?e.slice(1):e,Fw=e=>e?.endsWith(`/`)?e.slice(0,-1):e,Iw=e=>e?.endsWith(`/`)?e:`${e}/`,Lw=(e,t)=>{let n=Nw(e),r=Nw(t);function i(i){return encodeURIComponent(i).replaceAll(e,n).replaceAll(t,r)}function a(t,n){return`${i(t)}${e}${i(String(n))}`}return e=>(Array.isArray(e)?e:Object.entries(e)).flatMap(([e,t])=>t==null?[]:Array.isArray(t)?t.map(t=>a(e,t)):a(e,t)).join(t)},Rw=(e,t)=>e===`=`&&t===`&`?Ww:n=>{let r=n.toString();return Object.fromEntries(r.split(t).map(t=>{let[n,r]=t.split(e);return[decodeURI(n),decodeURI(r)]}))};function zw(e,t=4e3,n=4e3){let{width:r,height:i}=e;return r=Number(r)||void 0,i=Number(i)||void 0,r&&r>t&&(i&&=Math.round(i*t/r),r=t),i&&i>n&&(r&&=Math.round(r*n/i),i=n),{width:r,height:i}}function Bw(e){let t=Mw(e),n=Object.fromEntries(t.searchParams.entries());for(let e in[`width`,`height`,`quality`]){let t=n[e];if(t){let r=Number(t);isNaN(r)||(n[e]=r)}}return t.search=``,{operations:n,src:jw(t)}}function Vw({keyMap:e={},formatMap:t={},defaults:n={}},r){r.format&&r.format in t&&(r.format=t[r.format]),r.width&&=kw(r.width),r.height&&=kw(r.height);for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t))continue;let n=t;if(e[n]===!1){delete r[n];continue}e[n]&&r[n]&&(r[e[n]]=r[n],delete r[n])}for(let t in n){if(!Object.prototype.hasOwnProperty.call(n,t))continue;let i=t,a=n[i];if(!r[i]&&a!==void 0){if(e[i]===!1)continue;let t=e[i]??i;if(t in r)continue;r[t]=a}}return r}var Hw=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e]));function Uw({keyMap:e={},formatMap:t={},defaults:n={}},r){let i=Vw({keyMap:Hw(e),formatMap:Hw(t),defaults:n},r);i.width&&=kw(i.width),i.height&&=kw(i.height);let a=Number(i.quality);return isNaN(a)||(i.quality=a),i}var Ww=e=>{let t=Mw(e);return Object.fromEntries(t.searchParams.entries())};function Gw({kvSeparator:e=`=`,paramSeparator:t=`&`,...n}={}){let r=Lw(e,t);return e=>r(Vw(n,e))}function Kw({kvSeparator:e=`=`,paramSeparator:t=`&`,defaults:n,...r}={}){let i=Rw(e,t);return e=>Uw(r,e?i(e):{})}function qw(e){return{operationsGenerator:Gw(e),operationsParser:Kw(e)}}function Jw(e){if(e!=null)try{return!!JSON.parse(e?.toString())}catch{return!!e}}var Yw=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));function Xw(e,t){return((n,r,i)=>{let a=e(n,i);return a?t(a.src,{...a.operations,...Yw(r)},{...a.options,...i}):t(n,r,i)})}var Zw=new Map(Object.entries(Ew)),Qw=Object.entries(Dw),$w=Object.entries(Ow);function eT(e){return tT(e)||nT(e)}function tT(e){if(typeof e==`string`&&!e.startsWith(`https://`))return!1;let{hostname:t}=Mw(e);return Zw.get(t)||Qw.find(([e])=>t.endsWith(e))?.[1]||!1}function nT(e){let{pathname:t}=Mw(e);return $w.find(([e])=>t.startsWith(e))?.[1]||!1}var rT=`/view?`,iT=`/preview?`,{operationsGenerator:aT,operationsParser:oT}=qw({keyMap:{format:`output`},kvSeparator:`=`,paramSeparator:`&`}),sT=Xw(e=>{if(nT(e)!==`appwrite`)return null;let t=Mw(e),n=oT(t);delete n.project;let r=t.searchParams.get(`project`)??``;return t.search=``,t.searchParams.append(`project`,r),{src:t.href,operations:n}},(e,t)=>{let n=Mw(e.toString().replace(rT,iT)),r=n.searchParams.get(`project`)??``;return n.search=aT(t),n.searchParams.append(`project`,r),jw(n)}),cT=`/_image`,{operationsParser:lT,operationsGenerator:uT}=qw({keyMap:{format:`f`,width:`w`,height:`h`,quality:`q`},defaults:{fit:`cover`}}),dT=(e,t,n)=>{let r=Mw(`${Fw(n?.baseUrl??``)}${n?.endpoint??cT}`);return r.search=uT(t),r.searchParams.set(`href`,e.toString()),jw(r)},fT=e=>{let t=Mw(e),n=t.searchParams.get(`href`);return n?(t.searchParams.delete(`href`),{src:n,operations:lT(t),options:{baseUrl:t.origin}}):null},pT=(e,t,n={})=>{if(Mw(e).pathname!==(n?.endpoint??cT))return dT(e,t,n);let r=fT(e);return r?(n.baseUrl??=r.options.baseUrl,dT(r.src,{...r.operations,...t},n)):dT(e,t,n)},mT=Gw({defaults:{fit:`cover`,format:`webp`,sharp:!0}}),hT=Xw(Bw,(e,t)=>{let n=mT(t),r=Mw(e);return r.search=n,jw(r)}),gT=Gw({keyMap:{format:`output`}}),_T=Xw(Bw,(e,t)=>{let n=gT(t),r=Mw(e);return r.search=n,jw(r)}),vT=(e,t)=>{let{width:n,height:r}=t;return n&&r&&(t.aspect_ratio??=`${Math.round(Number(n))}:${Math.round(Number(r))}`),_T(e,t)},{operationsGenerator:yT,operationsParser:bT}=qw({keyMap:{format:`f`},defaults:{format:`auto`,fit:`cover`},formatMap:{jpg:`jpeg`},kvSeparator:`=`,paramSeparator:`,`}),xT=Xw((e,t)=>{if(nT(e)!==`cloudflare`)return null;let n=Mw(e),[,,,r,...i]=n.pathname.split(`/`),a=bT(r);return{src:jw(Mw(i.join(`/`))),operations:a,options:{domain:t?.domain??(n.hostname===`n`?void 0:n.hostname)}}},(e,t,n)=>{let r=yT(t),i=Mw(n?.domain?`https://${n.domain}`:`/`);return i.pathname=`/cdn-cgi/image/${r}/${Pw(e.toString())}`,jw(i)}),ST=/https?:\/\/(?<host>[^\/]+)\/cdn-cgi\/imagedelivery\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g,CT=/https?:\/\/(?<host>imagedelivery.net)\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g,{operationsGenerator:wT,operationsParser:zee}=qw({keyMap:{width:`w`,height:`h`,format:`f`},defaults:{fit:`cover`},kvSeparator:`=`,paramSeparator:`,`});function TT(e,t){let{host:n,accountHash:r,imageId:i}=e;if(!n||!r||!i)throw Error(`Missing required Cloudflare Images options`);return[`https:/`,...n===`imagedelivery.net`?[n]:[n,`cdn-cgi`,`imagedelivery`],r,i,t].filter(Boolean).join(`/`)}var Bee=(e,t,n={})=>jw(Mw(TT(n,wT(t)))),Vee=e=>{let t=Mw(e),n=[...t.toString().matchAll(ST),...t.toString().matchAll(CT)];if(!n[0]?.groups)return null;let{host:r,accountHash:i,imageId:a,transformations:o}=n[0].groups,s=zee(o||``),c={host:r,accountHash:i,imageId:a};return{src:TT(c),operations:s,options:c}},Hee=(e,t,n={})=>{let r=Vee(e);if(!r)throw Error(`Invalid Cloudflare Images URL`);let i={...r.operations,...t};return Bee(r.src,i,{...r.options,...n})},{operationsGenerator:Uee,operationsParser:Wee}=qw({keyMap:{format:`force_format`,width:`w`,height:`h`,quality:`q`},defaults:{org_if_sml:1}}),Gee=Xw((e,t={})=>{let n=Mw(e);if(eT(n)!==`cloudimage`)return null;let r=Wee(n),i=n.pathname;return r.ci_url_encoded&&(i=decodeURIComponent(i),delete r.ci_url_encoded),t.token??=n.hostname.replace(`.cloudimg.io`,``),{src:`${n.protocol}/${i}`,operations:r,options:t}},(e,t={},{token:n}={})=>{if(!n)throw Error(`Token is required for Cloudimage URLs`+e);let r=e.toString();r=r.replace(/^https?:\/\//,``),r.includes(`?`)&&(t.ci_url_encoded=1,r=encodeURIComponent(r));let i=Uee(t),a=new URL(`https://${n}.cloudimg.io/`);return a.pathname=r,a.search=i,a.toString()}),Kee=/https?:\/\/(?<host>res\.cloudinary\.com)\/(?<cloudName>[a-zA-Z0-9-]+)\/(?<assetType>image|video|raw)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?)*)?\/(?:(?<version>v\d+)\/)?(?<id>(?:[^\s\/]+\/)*[^\s\/]+(?:\.[a-zA-Z0-9]+)?)$/,qee=/https?:\/\/(?<host>(?<cloudName>[a-zA-Z0-9-]+)-res\.cloudinary\.com|[a-zA-Z0-9.-]+)\/(?<assetType>image|video|raw)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?)*)?\/(?:(?<version>v\d+)\/)?(?<id>(?:[^\s\/]+\/)*[^\s\/]+(?:\.[a-zA-Z0-9]+)?)$/,{operationsGenerator:Jee,operationsParser:Yee}=qw({keyMap:{width:`w`,height:`h`,format:`f`,quality:`q`},defaults:{format:`auto`,c:`lfill`},kvSeparator:`_`,paramSeparator:`,`});function Xee({host:e,cloudName:t,assetType:n,deliveryType:r,signature:i,transformations:a,version:o,id:s}){return[`https:/`,e,e===`res.cloudinary.com`?t:void 0,n,r,i,a,o,s].filter(Boolean).join(`/`)}function Zee(e){let t=e.toString().match(Kee);return t?.length||(t=e.toString().match(qee)),t?.length?t.groups||{}:null}var Qee=(e,t)=>{let n=Zee(e.toString());return n?(n.transformations=Jee({...Yee(n.transformations||``),...t}),Xee(n)):e.toString()},$ee=Gw({keyMap:{format:`fm`,width:`w`,height:`h`,quality:`q`},defaults:{fit:`fill`}}),ete=Xw(Bw,(e,t)=>{let n=$ee(t),r=new URL(e);return r.search=n,jw(r)}),tte=(e,t)=>{let{width:n,height:r}=zw(t,4e3,4e3);return ete(e,{...t,width:n,height:r})},nte=Gw({defaults:{auto:`webp`,disable:`upscale`}}),rte=Xw(e=>{let{src:t,operations:n}=Bw(e)??{};if(!n||!t)return null;let{origin:r}=Mw(e);return{src:t,operations:n,options:{baseURL:r}}},(e,t,{baseURL:n=`https://images.contentstack.io/`}={})=>{t.width&&t.height&&(t.fit??=`crop`);let r=nte(t),i=Mw(e);return i.hostname===`n`&&(i.protocol=`https:`,i.hostname=new URL(n).hostname),i.search=r,jw(i)}),ite=Gw({defaults:{withoutEnlargement:!0,fit:`cover`}}),ate=Xw(e=>{let t=Bw(e);if(t?.operations?.transforms&&typeof t.operations.transforms==`string`)try{t.operations.transforms=JSON.parse(t.operations.transforms)}catch{return null}return t},(e,t)=>{Array.isArray(t.transforms)&&(t.transforms=JSON.stringify(t.transforms));let n=ite(t),r=Mw(e);return r.search=n,jw(r)}),ote=/https:\/\/(?<region>[a-z0-9-]+)\.graphassets\.com\/(?<envId>[a-zA-Z0-9]+)(?:\/(?<transformations>.*?))?\/(?<handle>[a-zA-Z0-9]+)$/,{operationsGenerator:ste,operationsParser:cte}=qw({keyMap:{width:`width`,height:`height`,format:`format`},defaults:{format:`auto`,fit:`crop`}}),ET=e=>{let t=Mw(e).toString().match(ote);if(!t?.groups)return null;let{region:n,envId:r,handle:i,transformations:a}=t.groups,o={};return a&&a.split(`/`).forEach(e=>{let[t,n]=e.split(`=`);t===`resize`&&n?n.split(`,`).forEach(e=>{let[t,n]=e.split(`:`);t===`width`||t===`height`?o[t]=Number(n):t===`fit`&&(o.fit=n)}):t===`output`&&n?n.split(`,`).forEach(e=>{let[t,n]=e.split(`:`);t===`format`&&(o.format=n)}):t===`auto_image`&&(o.format=`auto`)}),{src:`https://${n}.graphassets.com/${r}/${i}`,operations:o,options:{region:n,envId:r,handle:i}}},lte=Xw(ET,(e,t,n={})=>{let r=ET(e);if(!r)throw Error(`Invalid Hygraph URL`);let{region:i,envId:a,handle:o}={...r.options,...n},s=[];if(t.width||t.height){let e=[];t.width&&t.height?e.push(`fit:crop`):t.fit&&e.push(`fit:${t.fit}`),t.width&&e.push(`width:${t.width}`),t.height&&e.push(`height:${t.height}`),e.length&&s.push(`resize=${e.join(`,`)}`)}return t.format===`auto`||!t.format&&!r.operations.format?s.push(`auto_image`):t.format&&s.push(`output=format:${t.format}`),jw(Mw(`${`https://${i}.graphassets.com/${a}`}${s.length>0?`/`+s.join(`/`):``}/${o}`))}),{operationsGenerator:ute,operationsParser:dte}=qw({keyMap:{width:`w`,height:`h`,format:`f`},defaults:{m:`cropbox`},kvSeparator:`_`,paramSeparator:`/`}),fte=Xw(e=>{let t=Mw(e),n=t.searchParams.get(`imgeng`);if(!n)return null;let r=dte(n);return t.searchParams.delete(`imgeng`),{src:jw(t),operations:r}},(e,t)=>{let n=ute(t),r=Mw(e);return r.searchParams.set(`imgeng`,n),jw(r)}),{operationsGenerator:pte,operationsParser:mte}=qw({keyMap:{width:`w`,height:`h`,format:`f`,quality:`q`},defaults:{c:`maintain_ratio`,fo:`auto`},kvSeparator:`-`,paramSeparator:`,`}),hte=Xw(e=>{let t=Mw(e),n=null,r=t.pathname;if(t.searchParams.has(`tr`))n=t.searchParams.get(`tr`),t.searchParams.delete(`tr`);else{let e=t.pathname.split(`/`),i=e.findIndex(e=>e.startsWith(`tr:`));i!==-1&&(n=e[i].slice(3),r=e.slice(0,i).concat(e.slice(i+1)).join(`/`))}if(!n)return null;t.pathname=r;let i=mte(n);return{src:jw(t),operations:i}},(e,t)=>{let n=pte(t),r=Mw(e);return r.searchParams.set(`tr`,n),jw(r)}),{operationsGenerator:gte,operationsParser:_te}=qw({keyMap:{format:`fm`,width:`w`,height:`h`,quality:`q`},defaults:{fit:`min`,auto:`format`}}),vte=Xw(e=>{let t=Mw(e),n=_te(e);return t.search=``,{src:jw(t),operations:n}},(e,t)=>{let n=gte(t),r=Mw(e);return r.search=n,r.searchParams.has(`fm`)&&r.searchParams.get(`auto`)===`format`&&r.searchParams.delete(`auto`),jw(r)}),{operationsGenerator:yte,operationsParser:bte}=qw({keyMap:{width:`w`,height:`h`,quality:`q`,format:`f`},defaults:{f:`auto`},kvSeparator:`_`,paramSeparator:`,`}),DT=(e,t,n)=>{t.width&&t.height&&(t.s=`${t.width}x${t.height}`,delete t.width,delete t.height);let r=yte(t),i=Mw(n?.baseURL??`/_ipx`);return i.pathname=`${Fw(i.pathname)}/${r}/${Pw(e.toString())}`,jw(i)},xte=e=>{let t=Mw(e),[,n,r,...i]=t.pathname.split(`/`);if(!r||!i.length)return null;let a=bte(r);if(a.s){let[e,t]=a.s.split(`x`).map(Number);a.width=e,a.height=t,delete a.s}return{src:`/`+i.join(`/`),operations:a,options:{baseURL:`${t.origin}/${n}`}}},Ste=(e,t,n)=>{let r=Mw(e),i=n?.baseURL;if(i&&r.toString().startsWith(i)||r.pathname.startsWith(`/_ipx`)){let n=xte(e);if(n)return DT(n.src,{...n.operations,...t},{baseURL:n.options.baseURL})}return DT(e,t,{baseURL:i})},OT=[`enlarge`,`flip`,`flop`,`negate`,`normalize`,`grayscale`,`removealpha`,`olrepeat`,`progressive`,`adaptive`,`lossless`,`nearlossless`,`metadata`],{operationsGenerator:Cte,operationsParser:wte}=qw({defaults:{fit:`cover`},formatMap:{jpg:`jpeg`}}),Tte=Xw(e=>{let t=Mw(e),n=wte(t);for(let e of OT)n[e]!==void 0&&(n[e]=Jw(n[e]));return t.search=``,{src:jw(t),operations:n}},(e,t)=>{let n=Mw(e);for(let e of OT)t[e]!==void 0&&(t[e]=+!!t[e]);return n.search=Cte(t),jw(n)}),{operationsGenerator:Ete,operationsParser:Dte}=qw({formatMap:{jpg:`jpeg`},keyMap:{format:`fm`,width:`w`,height:`h`,quality:`q`}}),Ote=Xw(e=>{let t=Mw(e),n=Dte(t);return n.lossless!==void 0&&(n.lossless=Jw(n.lossless)),t.search=``,{src:jw(t),operations:n}},(e,t)=>{let n=Mw(e);return t.lossless!==void 0&&(t.lossless=+!!t.lossless),t.width&&t.height&&(t.fit=`crop`),n.search=Ete(t),jw(n)}),{operationsGenerator:kte,operationsParser:Ate}=qw({defaults:{fit:`cover`},keyMap:{format:`fm`,width:`w`,height:`h`,quality:`q`}}),jte=Xw(e=>{if(nT(e)!==`netlify`)return null;let t=Mw(e),n=Ate(t);delete n.url;let r=t.searchParams.get(`url`)||``;return t.search=``,{src:r,operations:n,options:{baseUrl:t.hostname===`n`?void 0:t.origin}}},(e,t,n={})=>{let r=Mw(`${n.baseUrl||``}/.netlify/images`);return r.search=kte(t),r.searchParams.set(`url`,e.toString()),jw(r)}),{operationsGenerator:Mte,operationsParser:Nte}=qw({keyMap:{width:`w`,quality:`q`,height:!1,format:!1},defaults:{q:75}}),kT=(e,t,n={})=>{let r=Mw(`${n.baseUrl||``}/${n.prefix||`_vercel`}/image`);return r.search=Mte(t),r.searchParams.append(`url`,e.toString()),jw(r)},AT=(e,t={})=>{if(![`vercel`,`nextjs`].includes(nT(e)||``))return null;let n=Mw(e),r=n.searchParams.get(`url`)||``;n.searchParams.delete(`url`);let i=Nte(n);return n.search=``,{src:r,operations:i,options:{baseUrl:t.baseUrl??n.origin}}},Pte=Xw(AT,kT),Fte=Xw((e,t)=>AT(e,t),(e,t,n={})=>kT(e,t,{...n,prefix:`_next`})),{operationsGenerator:Ite,operationsParser:Lte}=qw({keyMap:{width:`wid`,height:`hei`,quality:`qlt`,format:`fmt`},defaults:{fit:`crop,0`}}),jT=`https://s7d1.scene7.com/is/image/`,Rte=Xw(e=>{if(eT(e)!==`scene7`)return null;let t=new URL(e,jT),n=Lte(t);return t.search=``,{src:t.toString(),operations:n}},(e,t)=>{let n=new URL(e,jT);return n.search=Ite(t),jw(n)}),MT=/(.+?)(?:_(?:(pico|icon|thumb|small|compact|medium|large|grande|original|master)|(\d*)x(\d*)))?(?:_crop_([a-z]+))?(\.[a-zA-Z]+)(\.png|\.jpg|\.webp|\.avif)?$/,{operationsGenerator:zte,operationsParser:Bte}=qw({keyMap:{format:!1}}),Vte=Xw(e=>{let t=Mw(e),n=MT.exec(t.pathname),r=Bte(t);if(n){let[,,,e,t,i]=n;e&&t&&!r.width&&!r.height&&(r.width=parseInt(e,10),r.height=parseInt(t,10)),i&&(r.crop??=i)}t.pathname=t.pathname.replace(MT,`$1$6`);for(let e of[`width`,`height`,`crop`,`pad_color`,`format`])t.searchParams.delete(e);return{src:t.toString(),operations:r}},(e,t)=>{let n=Mw(e);return n.pathname=n.pathname.replace(MT,`$1$6`),n.search=zte(t),jw(n)}),Hte=/(?<id>\/f\/\d+\/\d+x\d+\/\w+\/[^\/]+)\/?(?<modifiers>m\/?(?<crop>\d+x\d+:\d+x\d+)?\/?(?<resize>(?<flipx>\-)?(?<width>\d+)x(?<flipy>\-)?(?<height>\d+))?\/?(filters\:(?<filters>[^\/]+))?)?$/,Ute=/^(?<modifiers>\/(?<crop>\d+x\d+:\d+x\d+)?\/?(?<resize>(?<flipx>\-)?(?<width>\d+)x(?<flipy>\-)?(?<height>\d+))?\/?(filters\:(?<filters>[^\/]+))?\/?)?(?<id>\/f\/.+)$/,Wte=/:(?![^(]*\))/,Gte=e=>e?Object.fromEntries(e.split(Wte).map(e=>{if(!e)return[];let[t,n]=e.split(`(`);return[t,n.replace(`)`,``)]})):{},Kte=e=>{if(!e)return;let t=Object.entries(e).map(([e,t])=>`${e}(${t??``})`);if(t.length!==0)return`filters:${t.join(`:`)}`},qte=Xw(e=>{let t=Mw(e),n=(t.hostname===`img2.storyblok.com`?Ute:Hte).exec(t.pathname);if(!n||!n.groups)return null;let{id:r,crop:i,width:a,height:o,filters:s,flipx:c,flipy:l}=n.groups,{format:u,...d}=Gte(s??``);t.hostname===`img2.storyblok.com`&&(t.hostname=`a.storyblok.com`);let f=Object.fromEntries([[`width`,Number(a)||void 0],[`height`,Number(o)||void 0],[`format`,u],[`crop`,i],[`filters`,d],[`flipx`,c],[`flipy`,l]].filter(([e,t])=>t!==void 0));return{src:`${t.origin}${r}`,operations:f}},(e,t)=>{let n=Mw(e),{width:r=0,height:i=0,format:a,crop:o,filters:s={},flipx:c=``,flipy:l=``}=t,u=`${c}${r}x${l}${i}`;return a&&(s.format=a),n.pathname=[n.pathname,`m`,o,u,Kte(s)].filter(Boolean).join(`/`),jw(n)}),NT=`/storage/v1/object/public/`,PT=`/storage/v1/render/image/public/`,Jte=e=>e.pathname.startsWith(PT),{operationsGenerator:Yte,operationsParser:Xte}=qw({}),Zte=Xw(e=>{let t=Mw(e),n=Xte(t),r=Jte(t),i=t.pathname.replace(PT,``).replace(NT,``);return r?{src:`${t.origin}${NT}${i}`,operations:n}:{src:jw(t),operations:n}},(e,t)=>{let n=Mw(e);return n.pathname=n.pathname.replace(PT,NT),t.format&&t.format!==`origin`&&delete t.format,n.search=Yte(t),jw(n).replace(NT,PT)}),FT=/^https?:\/\/(?<host>[^\/]+)\/(?<uuid>[^\/]+)(?:\/(?<filename>[^\/]+)?)?/,{operationsGenerator:Qte,operationsParser:$te}=qw({keyMap:{width:!1,height:!1},defaults:{format:`auto`},kvSeparator:`/`,paramSeparator:`/-/`}),ene=Xw(e=>{let t=Mw(e),n=FT.exec(t.toString());if(!n||!n.groups)return null;let{host:r,uuid:i}=n.groups,[,...a]=t.pathname.split(`/-/`),o=$te(a.join(`/-/`)||``);if(o.resize){let[e,t]=o.resize.split(`x`);e&&(o.width=parseInt(e)),t&&(o.height=parseInt(t)),delete o.resize}return{src:`https://${r}/${i}/`,operations:o,options:{host:r}}},(e,t,n={})=>{let r=Mw(e),i=n.host||r.hostname,a=FT.exec(r.toString());a?.groups&&(r.pathname=`/${a.groups.uuid}/`),t.resize=t.resize||`${t.width??``}x${t.height??``}`,delete t.width,delete t.height;let o=Iw(Qte(t));return r.hostname=i,r.pathname=Fw(r.pathname)+(o?`/-/${o}`:``)+(a?.groups?.filename??``),jw(r)}),{operationsGenerator:tne,operationsParser:nne}=qw({keyMap:{width:`w`,height:`h`},defaults:{crop:`1`}}),rne=Xw(e=>{let t=Mw(e),n=nne(t);return n.crop!==void 0&&(n.crop=n.crop===`1`),t.search=``,{src:jw(t),operations:n}},(e,t)=>{let n=Mw(e),{crop:r}=t;return r!==void 0&&r!==`0`&&(t.crop=r?`1`:`0`),n.search=tne(t),jw(n)}),{operationsGenerator:ine,operationsParser:ane}=qw({keyMap:{width:`w`,height:`h`,format:`output`,quality:`q`},defaults:{fit:`cover`}}),one={appwrite:sT,astro:pT,"builder.io":hT,bunny:vT,cloudflare:xT,cloudflare_images:Hee,cloudimage:Gee,cloudinary:Qee,contentful:tte,contentstack:rte,directus:ate,hygraph:lte,imageengine:fte,imagekit:hte,imgix:vte,ipx:Ste,keycdn:Tte,"kontent.ai":Ote,netlify:jte,nextjs:Fte,scene7:Rte,shopify:Vte,storyblok:qte,supabase:Zte,uploadcare:ene,vercel:Pte,wordpress:rne,wsrv:Xw(e=>{let t=Mw(e),n=t.searchParams.get(`url`);if(!n)return null;let r=n;!r.startsWith(`http://`)&&!r.startsWith(`https://`)&&(r=`https://`+r),t.searchParams.delete(`url`);let i=ane(t);return{src:r,operations:i}},(e,t)=>{let n=new URL(`https://wsrv.nl/`),r=(typeof e==`string`?e:e.toString()).replace(/^https?:\/\//,``);n.searchParams.set(`url`,r);let i=ine(t),a=new URLSearchParams(i);for(let[e,t]of a)e!==`url`&&n.searchParams.set(e,t);return jw(n)})};function IT(e){if(e)return one[e]}function sne({cdn:e,fallback:t,operations:n={},options:r,...i}){if(e??=eT(i.src)||t,!e)return i;let a=IT(e);return a?Cw({...i,operations:n?.[e],options:r?.[e],transformer:a}):i}function cne({cdn:e,fallback:t,operations:n,options:r,...i}){if(e??=eT(i.src)||t,!e)return i;let a=IT(e);return a?Tw({...i,operations:n?.[e],options:r?.[e],transformer:a}):i}var LT=b.forwardRef(function(e,t){return(0,L.jsx)(`img`,{...pw(sne(e)),ref:t})});b.forwardRef(function(e,t){return(0,L.jsx)(`source`,{...pw(cne(e)),ref:t})});var RT=(0,b.createContext)({});function zT(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var BT=typeof window<`u`?b.useLayoutEffect:b.useEffect,VT=(0,b.createContext)(null);function HT(e,t){e.indexOf(t)===-1&&e.push(t)}function UT(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var WT=(e,t,n)=>n>t?t:n<e?e:n,GT={},KT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qT=e=>typeof e==`object`&&!!e,JT=e=>/^0[^.\s]+$/u.test(e);function YT(e){let t;return()=>(t===void 0&&(t=e()),t)}var XT=e=>e,ZT=(...e)=>e.reduce((e,t)=>n=>t(e(n))),QT=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},$T=class{constructor(){this.subscriptions=[]}add(e){return HT(this.subscriptions,e),()=>UT(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},eE=e=>e*1e3,tE=e=>e/1e3,nE=(e,t)=>t?1e3/t*e:0,rE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lne=1e-7,une=12;function dne(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=rE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>lne&&++s<une);return o}function iE(e,t,n,r){if(e===t&&n===r)return XT;let i=t=>dne(t,0,1,e,n);return e=>e===0||e===1?e:rE(i(e),t,r)}var aE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oE=e=>t=>1-e(1-t),sE=iE(.33,1.53,.69,.99),cE=oE(sE),lE=aE(cE),uE=e=>e>=1?1:(e*=2)<1?.5*cE(e):.5*(2-2**(-10*(e-1))),dE=e=>1-Math.sin(Math.acos(e)),fE=oE(dE),pE=aE(dE),fne=iE(.42,0,1,1),pne=iE(0,0,.58,1),mE=iE(.42,0,.58,1),hE=e=>Array.isArray(e)&&typeof e[0]!=`number`,gE=e=>Array.isArray(e)&&typeof e[0]==`number`,_E={linear:XT,easeIn:fne,easeInOut:mE,easeOut:pne,circIn:dE,circInOut:pE,circOut:fE,backIn:cE,backInOut:lE,backOut:sE,anticipate:uE},vE=e=>typeof e==`string`,yE=e=>{if(gE(e)){e.length;let[t,n,r,i]=e;return iE(t,n,r,i)}else if(vE(e))return _E[e],`${e}`,_E[e];return e},bE=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function xE(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var SE=40;function CE(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=bE.reduce((e,t)=>(e[t]=xE(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=GT.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,SE),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:bE.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<bE.length;t++)o[bE[t]].cancel(e)},state:i,steps:o}}var{schedule:wE,cancel:TE,state:EE,steps:DE}=CE(typeof requestAnimationFrame<`u`?requestAnimationFrame:XT,!0),OE;function kE(){OE=void 0}var AE={now:()=>(OE===void 0&&AE.set(EE.isProcessing||GT.useManualTiming?EE.timestamp:performance.now()),OE),set:e=>{OE=e,queueMicrotask(kE)}},jE=e=>t=>typeof t==`string`&&t.startsWith(e),ME=jE(`--`),NE=jE(`var(--`),PE=e=>NE(e)?FE.test(e.split(`/*`)[0].trim()):!1,FE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function IE(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var LE={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},RE={...LE,transform:e=>WT(0,1,e)},zE={...LE,default:1},BE=e=>Math.round(e*1e5)/1e5,VE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function HE(e){return e==null}var UE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,WE=(e,t)=>n=>!!(typeof n==`string`&&UE.test(n)&&n.startsWith(e)||t&&!HE(n)&&Object.prototype.hasOwnProperty.call(n,t)),GE=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(VE);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},KE=e=>WT(0,255,e),qE={...LE,transform:e=>Math.round(KE(e))},JE={test:WE(`rgb`,`red`),parse:GE(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+qE.transform(e)+`, `+qE.transform(t)+`, `+qE.transform(n)+`, `+BE(RE.transform(r))+`)`};function YE(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var XE={test:WE(`#`),parse:YE,transform:JE.transform},ZE=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),QE=ZE(`deg`),$E=ZE(`%`),eD=ZE(`px`),tD=ZE(`vh`),nD=ZE(`vw`),rD={...$E,parse:e=>$E.parse(e)/100,transform:e=>$E.transform(e*100)},iD={test:WE(`hsl`,`hue`),parse:GE(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+$E.transform(BE(t))+`, `+$E.transform(BE(n))+`, `+BE(RE.transform(r))+`)`},aD={test:e=>JE.test(e)||XE.test(e)||iD.test(e),parse:e=>JE.test(e)?JE.parse(e):iD.test(e)?iD.parse(e):XE.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?JE.transform(e):iD.transform(e),getAnimatableNone:e=>{let t=aD.parse(e);return t.alpha=0,aD.transform(t)}},mne=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oD(e){return isNaN(e)&&typeof e==`string`&&(e.match(VE)?.length||0)+(e.match(mne)?.length||0)>0}var sD=`number`,cD=`color`,lD=`var`,uD=`var(`,dD="${}",fD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pD(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(fD,e=>(aD.test(e)?(r.color.push(a),i.push(cD),n.push(aD.parse(e))):e.startsWith(uD)?(r.var.push(a),i.push(lD),n.push(e)):(r.number.push(a),i.push(sD),n.push(parseFloat(e))),++a,dD)).split(dD),indexes:r,types:i}}function mD(e){return pD(e).values}function hD({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===sD?i+=BE(r[a]):e===cD?i+=aD.transform(r[a]):i+=r[a]}return i}}function gD(e){return hD(pD(e))}var _D=e=>typeof e==`number`?0:aD.test(e)?aD.getAnimatableNone(e):e,vD=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:_D(e);function yD(e){let t=pD(e);return hD(t)(t.values.map((e,n)=>vD(e,t.split[n])))}var bD={test:oD,parse:mD,createTransformer:gD,getAnimatableNone:yD};function xD(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=xD(s,r,e+1/3),a=xD(s,r,e),o=xD(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function CD(e,t){return n=>n>0?t:e}var wD=(e,t,n)=>e+(t-e)*n,TD=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ED=[XE,JE,iD],DD=e=>ED.find(t=>t.test(e));function OD(e){let t=DD(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===iD&&(n=SD(n)),n}var kD=(e,t)=>{let n=OD(e),r=OD(t);if(!n||!r)return CD(e,t);let i={...n};return e=>(i.red=TD(n.red,r.red,e),i.green=TD(n.green,r.green,e),i.blue=TD(n.blue,r.blue,e),i.alpha=wD(n.alpha,r.alpha,e),JE.transform(i))},AD=new Set([`none`,`hidden`]);function jD(e,t){return AD.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function MD(e,t){return n=>wD(e,t,n)}function ND(e){return typeof e==`number`?MD:typeof e==`string`?PE(e)?CD:aD.test(e)?kD:LD:Array.isArray(e)?PD:typeof e==`object`?aD.test(e)?kD:FD:CD}function PD(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>ND(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function FD(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ND(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ID(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var LD=(e,t)=>{let n=bD.createTransformer(t),r=pD(e),i=pD(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?AD.has(e)&&!i.values.length||AD.has(t)&&!r.values.length?jD(e,t):ZT(PD(ID(r,i),i.values),n):(`${e}${t}`,CD(e,t))};function RD(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?wD(e,t,n):ND(e)(e,t)}var zD=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>wE.update(t,e),stop:()=>TE(t),now:()=>EE.isProcessing?EE.timestamp:AE.now()}},BD=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},VD=2e4;function HD(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function UD(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(HD(r),VD);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:tE(i)}}var WD={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function GD(e,t){return e*Math.sqrt(1-t*t)}var KD=12;function qD(e,t,n){let r=n;for(let n=1;n<KD;n++)r-=e(r)/t(r);return r}var JD=.001;function YD({duration:e=WD.duration,bounce:t=WD.bounce,velocity:n=WD.velocity,mass:r=WD.mass}){let i,a;WD.maxDuration;let o=1-t;o=WT(WD.minDamping,WD.maxDamping,o),e=WT(WD.minDuration,WD.maxDuration,tE(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=GD(t,o),c=Math.exp(-i);return JD-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=GD(t**2,o);return(-i(t)+JD>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=qD(i,a,s);if(e=eE(e),isNaN(c))return{stiffness:WD.stiffness,damping:WD.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var XD=[`duration`,`bounce`],ZD=[`stiffness`,`damping`,`mass`];function QD(e,t){return t.some(t=>e[t]!==void 0)}function $D(e){let t={velocity:WD.velocity,stiffness:WD.stiffness,damping:WD.damping,mass:WD.mass,isResolvedFromDuration:!1,...e};if(!QD(e,ZD)&&QD(e,XD))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*WT(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:WD.mass,stiffness:i,damping:a}}else{let n=YD({...e,velocity:0});t={...t,...n,mass:WD.mass},t.isResolvedFromDuration=!0}return t}function eO(e=WD.visualDuration,t=WD.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=$D({...n,velocity:-tE(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=tE(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?WD.restSpeed.granular:WD.restSpeed.default,i||=v?WD.restDelta.granular:WD.restDelta.default;let y,b,x,S,C,w;if(h<1)x=GD(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>eE(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=eE(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=eE(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(HD(T),VD),t=BD(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}eO.applyToOptions=e=>{let t=UD(e,100,eO);return e.ease=t.ease,e.duration=eE(t.duration),e.type=`keyframes`,e};var tO=5;function nO(e,t,n){let r=Math.max(t-tO,0);return nE(n-e(r),t-r)}function rO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=eO({keyframes:[f.value,m(f.value)],velocity:nO(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function iO(e,t,n){let r=[],i=n||GT.mix||RD,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ZT(Array.isArray(t)?t[n]||XT:t,a)),r.push(a)}return r}function hne(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=iO(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=QT(e[r],e[r+1],n);return s[r](i)};return n?t=>l(WT(e[0],e[a-1],t)):l}function gne(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=QT(0,t,r);e.push(wD(n,1,i))}}function _ne(e){let t=[0];return gne(t,e.length-1),t}function vne(e,t){return e.map(e=>e*t)}function yne(e,t){return e.map(()=>t||mE).splice(0,e.length-1)}function aO({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=hE(r)?r.map(yE):yE(r),a={done:!1,value:t[0]},o=hne(vne(n&&n.length===t.length?n:_ne(t),e),t,{ease:Array.isArray(i)?i:yne(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var bne=e=>e!==null;function oO(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(bne),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var xne={decay:rO,inertia:rO,tween:aO,keyframes:aO,spring:eO};function sO(e){typeof e.type==`string`&&(e.type=xne[e.type])}var cO=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},lO=e=>e/100,uO=class extends cO{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==AE.now()&&this.tick(AE.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;sO(e);let{type:t=aO,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||aO;s!==aO&&typeof o[0]!=`number`&&(this.mixKeyframes=ZT(lO,RD(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=HD(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=WT(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==rO&&(b.value=oO(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return tE(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+tE(e)}get time(){return tE(this.currentTime)}set time(e){e=eE(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return nO(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(AE.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=tE(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=zD,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(AE.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function dO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var fO=e=>e*180/Math.PI,pO=e=>hO(fO(Math.atan2(e[1],e[0]))),mO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:pO,rotateZ:pO,skewX:e=>fO(Math.atan(e[1])),skewY:e=>fO(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},hO=e=>(e%=360,e<0&&(e+=360),e),gO=pO,_O=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vO=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_O,scaleY:vO,scale:e=>(_O(e)+vO(e))/2,rotateX:e=>hO(fO(Math.atan2(e[6],e[5]))),rotateY:e=>hO(fO(Math.atan2(-e[2],e[0]))),rotateZ:gO,rotate:gO,skewX:e=>fO(Math.atan(e[4])),skewY:e=>fO(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bO(e){return+!!e.includes(`scale`)}function xO(e,t){if(!e||e===`none`)return bO(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=yO,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=mO,i=t}if(!i)return bO(t);let a=r[t],o=i[1].split(`,`).map(CO);return typeof a==`function`?a(o):o[a]}var SO=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return xO(n,t)};function CO(e){return parseFloat(e.trim())}var wO=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],TO=new Set([...wO,`pathRotation`]),EO=e=>e===LE||e===eD,DO=new Set([`x`,`y`,`z`]),OO=wO.filter(e=>!DO.has(e));function kO(e){let t=[];return OO.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var AO={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xO(t,`x`),y:(e,{transform:t})=>xO(t,`y`)};AO.translateX=AO.x,AO.translateY=AO.y;var jO=new Set,MO=!1,NO=!1,PO=!1;function FO(){if(NO){let e=Array.from(jO).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=kO(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}NO=!1,MO=!1,jO.forEach(e=>e.complete(PO)),jO.clear()}function IO(){jO.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(NO=!0)})}function LO(){PO=!0,IO(),FO(),PO=!1}var RO=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(jO.add(this),MO||(MO=!0,wE.read(IO),wE.resolveKeyframes(FO))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}dO(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),jO.delete(this)}cancel(){this.state===`scheduled`&&(jO.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},zO=e=>e.startsWith(`--`);function BO(e,t,n){zO(t)?e.style.setProperty(t,n):e.style[t]=n}var VO={};function HO(e,t){let n=YT(e);return()=>VO[t]??n()}var UO=HO(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),WO=HO(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),GO=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,KO={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:GO([0,.65,.55,1]),circOut:GO([.55,0,1,.45]),backIn:GO([.31,.01,.66,-.59]),backOut:GO([.33,1.53,.69,.99])};function qO(e,t){if(e)return typeof e==`function`?WO()?BD(e,t):`ease-out`:gE(e)?GO(e):Array.isArray(e)?e.map(e=>qO(e,t)||KO.easeOut):KO[e]}function JO(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=qO(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function YO(e){return typeof e==`function`&&`applyToOptions`in e}function XO({type:e,...t}){return YO(e)&&WO()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var ZO=class extends cO{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=XO(e);this.animation=JO(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=oO(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),BO(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return tE(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+tE(e)}get time(){return tE(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eE(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&UO()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),XT):r(this)}},QO={anticipate:uE,backInOut:lE,circInOut:pE};function $O(e){return e in QO}function ek(e){typeof e.ease==`string`&&$O(e.ease)&&(e.ease=QO[e.ease])}var tk=10,nk=class extends ZO{constructor(e){ek(e),sO(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new uO({...a,autoplay:!1}),s=Math.max(tk,AE.now()-this.startTime),c=WT(0,tk,s-tk),l=o.sample(s).value,{name:u}=this.options;i&&u&&BO(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},rk=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(bD.test(e)||e===`0`)&&!e.startsWith(`url(`));function ik(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ak(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=rk(i,t),s=rk(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ik(e)||(n===`spring`||YO(n))&&r}function ok(e){e.duration=0,e.type=`keyframes`}var sk=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),ck=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function lk(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&ck.test(e[t]))return!0;return!1}var uk=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),dk=YT(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function fk(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return dk()&&n&&(sk.has(n)||uk.has(n)&&lk(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var pk=40,mk=class extends cO{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=AE.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||RO;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=AE.now();let u=!0;ak(e,i,a,o)||(u=!1,(GT.instantAnimations||!s)&&l?.(oO(e,n,t)),e[0]=e[e.length-1],ok(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>pk?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&fk(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new nk({...d,element:p})}catch{m=new uO(d)}else m=new uO(d);m.finished.then(()=>{this.notifyFinished()}).catch(XT),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),LO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function hk(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var gk=30,_k=e=>!isNaN(parseFloat(e)),vk={current:void 0},yk=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=AE.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=AE.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=_k(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new $T);let n=this.events[e].add(t);return e===`change`?()=>{n(),wE.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return vk.current&&vk.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=AE.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>gk)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,gk);return nE(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function bk(e,t){return new yk(e,t)}function xk(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Sk(e,t){let n=e?.[t]??e?.default??e;return n===e?n:xk(n,e)}var Ck={type:`spring`,stiffness:500,damping:25,restSpeed:10},wk=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Tk={type:`keyframes`,duration:.8},Ek={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Dk=(e,{keyframes:t})=>t.length>2?Tk:TO.has(e)?e.startsWith(`scale`)?wk(t[1]):Ck:Ek,Ok=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function kk(e){for(let t in e)if(!Ok.has(t))return!0;return!1}var Ak=(e,t,n,r={},i,a)=>o=>{let s=Sk(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=eE(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};kk(s)||Object.assign(u,Dk(e,u)),u.duration&&=eE(u.duration),u.repeatDelay&&=eE(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ok(u),u.delay===0&&(d=!0)),(GT.instantAnimations||GT.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,ok(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=oO(u.keyframes,s);if(e!==void 0){wE.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new uO(u):new mk(u)},jk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Mk(e){let t=jk.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Nk(e,t,n=1){`${e}`;let[r,i]=Mk(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return KT(e)?parseFloat(e):e}return PE(i)?Nk(i,t,n+1):i}function Pk(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Fk(e,t,n,r){if(typeof t==`function`){let[i,a]=Pk(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Pk(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Ik(e,t,n){let r=e.getProps();return Fk(r,t,n===void 0?r.custom:n,e)}var Lk=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...wO]),Rk=e=>Array.isArray(e);function zk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bk(n))}function Bk(e){return Rk(e)?e[e.length-1]||0:e}function Vk(e,t){let{transitionEnd:n={},transition:r={},...i}=Ik(e,t)||{};i={...i,...n};for(let t in i)zk(e,t,Bk(i[t]))}var Hk=e=>!!(e&&e.getVelocity);function Uk(e){return!!(Hk(e)&&e.add)}function Wk(e,t){let n=e.getValue(`willChange`);if(Uk(n))return n.add(t);if(!n&>.WillChange){let n=new GT.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Gk(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Kk=`data-`+Gk(`framerAppearId`);function qk(e){return e.props[Kk]}function Jk({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Yk(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?xk(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Jk(f,t))continue;let o={delay:n,...Sk(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){wE.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=qk(e);if(n){let e=window.MotionHandoffAnimation(n,t,wE);e!==null&&(o.startTime=e,p=!0)}}Wk(e,t);let m=l??e.shouldReduceMotion;r.start(Ak(t,r,i,m&&Lk.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>wE.update(()=>{o&&Vk(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Xk(e,t,n={}){let r=Ik(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Yk(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Zk(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Zk(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Xk(c,t,{...o,delay:n+(typeof r==`function`?0:r)+hk(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Qk(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Xk(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Xk(e,t,n);else{let i=typeof t==`function`?Ik(e,t,n.custom):t;r=Promise.all(Yk(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var $k={test:e=>e===`auto`,parse:e=>e},eA=e=>t=>t.test(e),tA=[LE,eD,$E,QE,nD,tD,$k],nA=e=>tA.find(eA(e));function rA(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||JT(e)}var iA=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function aA(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(VE)||[];if(!r)return e;let i=n.replace(r,``),a=+!!iA.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var oA=/\b([a-z-]*)\(.*?\)/gu,sA={...bD,getAnimatableNone:e=>{let t=e.match(oA);return t?t.map(aA).join(` `):e}},cA={...bD,getAnimatableNone:e=>{let t=bD.parse(e);return bD.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},lA={...LE,transform:Math.round},uA={borderWidth:eD,borderTopWidth:eD,borderRightWidth:eD,borderBottomWidth:eD,borderLeftWidth:eD,borderRadius:eD,borderTopLeftRadius:eD,borderTopRightRadius:eD,borderBottomRightRadius:eD,borderBottomLeftRadius:eD,width:eD,maxWidth:eD,height:eD,maxHeight:eD,top:eD,right:eD,bottom:eD,left:eD,inset:eD,insetBlock:eD,insetBlockStart:eD,insetBlockEnd:eD,insetInline:eD,insetInlineStart:eD,insetInlineEnd:eD,padding:eD,paddingTop:eD,paddingRight:eD,paddingBottom:eD,paddingLeft:eD,paddingBlock:eD,paddingBlockStart:eD,paddingBlockEnd:eD,paddingInline:eD,paddingInlineStart:eD,paddingInlineEnd:eD,margin:eD,marginTop:eD,marginRight:eD,marginBottom:eD,marginLeft:eD,marginBlock:eD,marginBlockStart:eD,marginBlockEnd:eD,marginInline:eD,marginInlineStart:eD,marginInlineEnd:eD,fontSize:eD,backgroundPositionX:eD,backgroundPositionY:eD,rotate:QE,pathRotation:QE,rotateX:QE,rotateY:QE,rotateZ:QE,scale:zE,scaleX:zE,scaleY:zE,scaleZ:zE,skew:QE,skewX:QE,skewY:QE,distance:eD,translateX:eD,translateY:eD,translateZ:eD,x:eD,y:eD,z:eD,perspective:eD,transformPerspective:eD,opacity:RE,originX:rD,originY:rD,originZ:eD,zIndex:lA,fillOpacity:RE,strokeOpacity:RE,numOctaves:lA},dA={...uA,color:aD,backgroundColor:aD,outlineColor:aD,fill:aD,stroke:aD,borderColor:aD,borderTopColor:aD,borderRightColor:aD,borderBottomColor:aD,borderLeftColor:aD,filter:sA,WebkitFilter:sA,mask:cA,WebkitMask:cA},fA=e=>dA[e],pA=new Set([sA,cA]);function mA(e,t){let n=fA(e);return pA.has(n)||(n=bD),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var hA=new Set([`auto`,`none`,`0`]);function gA(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!hA.has(t)&&pD(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=mA(n,i)}var _A=class extends RO{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),PE(r))){let i=Nk(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Lk.has(n)||e.length!==2)return;let[r,i]=e,a=nA(r),o=nA(i);if(IE(r)!==IE(i)&&AO[n]){this.needsMeasurement=!0;return}if(a!==o)if(EO(a)&&EO(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else AO[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||rA(e[t]))&&n.push(t);n.length&&gA(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=AO[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=AO[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},vA=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function yA(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var bA=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function xA(e){return qT(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:SA,cancel:Sne}=CE(queueMicrotask,!1),CA={x:!1,y:!1};function wA(){return CA.x||CA.y}function TA(e){return e===`x`||e===`y`?CA[e]?null:(CA[e]=!0,()=>{CA[e]=!1}):CA.x||CA.y?null:(CA.x=CA.y=!0,()=>{CA.x=CA.y=!1})}function EA(e,t){let n=yA(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function DA(e){return!(e.pointerType===`touch`||wA())}function OA(e,t,n={}){let[r,i,a]=EA(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!DA(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var kA=(e,t)=>t?e===t?!0:kA(e,t.parentElement):!1,AA=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,jA=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Cne(e){return jA.has(e.tagName)||e.isContentEditable===!0}var wne=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Tne(e){return wne.has(e.tagName)||e.isContentEditable===!0}var MA=new WeakSet;function NA(e){return t=>{t.key===`Enter`&&e(t)}}function PA(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ene=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=NA(()=>{if(MA.has(n))return;PA(n,`down`);let e=NA(()=>{PA(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>PA(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function FA(e){return AA(e)&&!wA()}var IA=new WeakSet;function Dne(e,t,n={}){let[r,i,a]=EA(e,n),o=e=>{let r=e.currentTarget;if(!FA(e)||IA.has(e))return;MA.add(r),n.stopPropagation&&IA.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),MA.has(r)&&MA.delete(r),FA(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||kA(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),xA(e)&&(e.addEventListener(`focus`,e=>Ene(e,i)),!Cne(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function LA(e){return qT(e)&&`ownerSVGElement`in e}var RA=new WeakMap,zA,BA=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:LA(r)&&`getBBox`in r?r.getBBox()[t]:r[n],One=BA(`inline`,`width`,`offsetWidth`),kne=BA(`block`,`height`,`offsetHeight`);function Ane({target:e,borderBoxSize:t}){RA.get(e)?.forEach(n=>{n(e,{get width(){return One(e,t)},get height(){return kne(e,t)}})})}function jne(e){e.forEach(Ane)}function Mne(){typeof ResizeObserver>`u`||(zA=new ResizeObserver(jne))}function Nne(e,t){zA||Mne();let n=yA(e);return n.forEach(e=>{let n=RA.get(e);n||(n=new Set,RA.set(e,n)),n.add(t),zA?.observe(e)}),()=>{n.forEach(e=>{let n=RA.get(e);n?.delete(t),n?.size||zA?.unobserve(e)})}}var VA=new Set,HA;function Pne(){HA=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};VA.forEach(t=>t(e))},window.addEventListener(`resize`,HA)}function Fne(e){return VA.add(e),HA||Pne(),()=>{VA.delete(e),!VA.size&&typeof HA==`function`&&(window.removeEventListener(`resize`,HA),HA=void 0)}}function UA(e,t){return typeof e==`function`?Fne(e):Nne(e,t)}var WA={value:null,addProjectionMetrics:null};function Ine(e){return LA(e)&&e.tagName===`svg`}var Lne=[...tA,aD,bD],Rne=e=>Lne.find(eA(e)),GA=()=>({translate:0,scale:1,origin:0,originPoint:0}),KA=()=>({x:GA(),y:GA()}),qA=()=>({min:0,max:0}),JA=()=>({x:qA(),y:qA()}),zne=new WeakMap;function YA(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function XA(e){return typeof e==`string`||Array.isArray(e)}var ZA=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],QA=[`initial`,...ZA];function $A(e){return YA(e.animate)||QA.some(t=>XA(e[t]))}function ej(e){return!!($A(e)||e.variants)}function tj(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Hk(i))e.addValue(r,i);else if(Hk(a))e.addValue(r,bk(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,bk(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var nj={current:null},rj={current:!1},ij=typeof window<`u`;function aj(){if(rj.current=!0,ij)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>nj.current=e.matches;e.addEventListener(`change`,t),t()}else nj.current=!1}var oj=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],sj={};function cj(e){sj=e}function lj(){return sj}var uj=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=RO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=AE.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,wE.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=$A(t),this.isVariantNode=ej(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Hk(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,zne.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(rj.current||aj(),this.shouldReduceMotion=nj.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),TE(this.notifyUpdate),TE(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&sk.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new ZO({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:eE(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=TO.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&wE.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in sj){let t=sj[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):JA()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<oj.length;t++){let n=oj[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=tj(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=bk(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(KT(n)||JT(n))?n=parseFloat(n):!Rne(n)&&bD.test(t)&&(n=mA(e,t)),this.setBaseTarget(e,Hk(n)?n.get():n)),Hk(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Fk(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Hk(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new $T),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){SA.render(this.render)}},dj=class extends uj{constructor(){super(...arguments),this.KeyframeResolver=_A}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Hk(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},fj=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function pj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hj(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gj(e){return e===void 0||e===1}function _j({scale:e,scaleX:t,scaleY:n}){return!gj(e)||!gj(t)||!gj(n)}function vj(e){return _j(e)||yj(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yj(e){return bj(e.x)||bj(e.y)}function bj(e){return e&&e!==`0%`}function xj(e,t,n){return n+t*(e-n)}function Sj(e,t,n,r,i){return i!==void 0&&(e=xj(e,i,r)),xj(e,n,r)+t}function Cj(e,t=0,n=1,r,i){e.min=Sj(e.min,t,n,r,i),e.max=Sj(e.max,t,n,r,i)}function wj(e,{x:t,y:n}){Cj(e.x,t.translate,t.scale,t.originPoint),Cj(e.y,n.translate,n.scale,n.originPoint)}var Tj=.999999999999,Ej=1.0000000000001;function Dj(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Oj(e.x,-a.scroll.offset.x),Oj(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,wj(e,o)),r&&vj(a.latestValues)&&jj(e,a.latestValues,a.layout?.layoutBox))}t.x<Ej&&t.x>Tj&&(t.x=1),t.y<Ej&&t.y>Tj&&(t.y=1)}function Oj(e,t){e.min+=t,e.max+=t}function kj(e,t,n,r,i=.5){Cj(e,t,n,wD(e.min,e.max,i),r)}function Aj(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function jj(e,t,n){let r=n??e;kj(e.x,Aj(t.x,r.x),t.scaleX,t.scale,t.originX),kj(e.y,Aj(t.y,r.y),t.scaleY,t.scale,t.originY)}function Mj(e,t){return pj(hj(e.getBoundingClientRect(),t))}function Nj(e,t,n){let r=Mj(e,n),{scroll:i}=t;return i&&(Oj(r.x,i.offset.x),Oj(r.y,i.offset.y)),r}var Pj={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Fj=wO.length;function Ij(e,t,n){let r=``,i=!0;for(let a=0;a<Fj;a++){let o=wO[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=bA(s,uA[o]);if(!c){i=!1;let t=Pj[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${bA(a,uA.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Lj(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(TO.has(e)){o=!0;continue}else if(ME(e)){i[e]=n;continue}else{let t=bA(n,uA[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ij(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Rj(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function zj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Bj={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(eD.test(e))e=parseFloat(e);else return e;return`${zj(e,t.target.x)}% ${zj(e,t.target.y)}%`}},Vj={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=bD.parse(e);if(i.length>5)return r;let a=bD.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=wD(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Hj={borderRadius:{...Bj,applyTo:[...vA]},borderTopLeftRadius:Bj,borderTopRightRadius:Bj,borderBottomLeftRadius:Bj,borderBottomRightRadius:Bj,boxShadow:Vj};function Uj(e,{layout:t,layoutId:n}){return TO.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Hj[e]||e===`opacity`)}function Wj(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Hk(r[t])||i&&Hk(i[t])||Uj(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Gj(e){return window.getComputedStyle(e)}var Kj=class extends dj{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Rj}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(TO.has(t))return this.projection?.isProjecting?bO(t):SO(e,t);{let n=Gj(e),r=(ME(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Mj(e,t)}build(e,t,n){Lj(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Wj(e,t,n)}},qj={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Jj={offset:`strokeDashoffset`,array:`strokeDasharray`};function Yj(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?qj:Jj;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Xj=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Zj(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Lj(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Xj)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Yj(d,i,a,o,!1)}var Qj=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),$j=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function eM(e,t,n,r){Rj(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Qj.has(n)?n:Gk(n),t.attrs[n])}function tM(e,t,n){let r=Wj(e,t,n);for(let n in e)if(Hk(e[n])||Hk(t[n])){let t=wO.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var nM=class extends dj{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=JA}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(TO.has(t)){let e=fA(t);return e&&e.default||0}return t=Qj.has(t)?t:Gk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tM(e,t,n)}build(e,t,n){Zj(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){eM(e,t,n,r)}mount(e){this.isSVGTag=$j(e.tagName),super.mount(e)}},rM=QA.length;function iM(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&iM(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<rM;n++){let r=QA[n],i=e.props[r];(XA(i)||i===!1)&&(t[r]=i)}return t}function aM(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var oM=[...ZA].reverse(),sM=ZA.length;function cM(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Qk(e,t,n)))}function lM(e){let t=cM(e),n=fM(),r=!0,i=!1,a=t=>(n,r)=>{let i=Ik(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=iM(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<sM;t++){let p=oM[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=XA(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||YA(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=uM(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Rk(t)&&Rk(n)?!aM(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Ik(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=hk(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Ik(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fM(),i=!0}}}function uM(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!aM(t,e):!1}function dM(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fM(){return{animate:dM(!0),whileInView:dM(),whileHover:dM(),whileTap:dM(),whileDrag:dM(),whileFocus:dM(),exit:dM()}}function pM(e,t){e.min=t.min,e.max=t.max}function mM(e,t){pM(e.x,t.x),pM(e.y,t.y)}function hM(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var gM=.9999,_M=1.0001,vM=-.01,yM=.01;function bM(e){return e.max-e.min}function xM(e,t,n){return Math.abs(e-t)<=n}function SM(e,t,n,r=.5){e.origin=r,e.originPoint=wD(t.min,t.max,e.origin),e.scale=bM(n)/bM(t),e.translate=wD(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gM&&e.scale<=_M||isNaN(e.scale))&&(e.scale=1),(e.translate>=vM&&e.translate<=yM||isNaN(e.translate))&&(e.translate=0)}function CM(e,t,n,r){SM(e.x,t.x,n.x,r?r.originX:void 0),SM(e.y,t.y,n.y,r?r.originY:void 0)}function wM(e,t,n,r=0){e.min=(r?wD(n.min,n.max,r):n.min)+t.min,e.max=e.min+bM(t)}function TM(e,t,n,r){wM(e.x,t.x,n.x,r?.x),wM(e.y,t.y,n.y,r?.y)}function EM(e,t,n,r=0){let i=r?wD(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+bM(t)}function DM(e,t,n,r){EM(e.x,t.x,n.x,r?.x),EM(e.y,t.y,n.y,r?.y)}function OM(e,t,n,r,i){return e-=t,e=xj(e,1/n,r),i!==void 0&&(e=xj(e,1/i,r)),e}function kM(e,t=0,n=1,r=.5,i,a=e,o=e){if($E.test(t)&&(t=parseFloat(t),t=wD(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=wD(a.min,a.max,r);e===a&&(s-=t),e.min=OM(e.min,t,n,s,i),e.max=OM(e.max,t,n,s,i)}function AM(e,t,[n,r,i],a,o){kM(e,t[n],t[r],t[i],t.scale,a,o)}var jM=[`x`,`scaleX`,`originX`],MM=[`y`,`scaleY`,`originY`];function NM(e,t,n,r){AM(e.x,t,jM,n?n.x:void 0,r?r.x:void 0),AM(e.y,t,MM,n?n.y:void 0,r?r.y:void 0)}function PM(e){return e.translate===0&&e.scale===1}function FM(e){return PM(e.x)&&PM(e.y)}function IM(e,t){return e.min===t.min&&e.max===t.max}function LM(e,t){return IM(e.x,t.x)&&IM(e.y,t.y)}function RM(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zM(e,t){return RM(e.x,t.x)&&RM(e.y,t.y)}function BM(e){return bM(e.x)/bM(e.y)}function VM(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function HM(e){return[e(`x`),e(`y`)]}function UM(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var WM=vA.length,GM=e=>typeof e==`string`?parseFloat(e):e,KM=e=>typeof e==`number`||eD.test(e);function qM(e,t,n,r,i,a){i?(e.opacity=wD(0,n.opacity??1,YM(r)),e.opacityExit=wD(t.opacity??1,0,XM(r))):a&&(e.opacity=wD(t.opacity??1,n.opacity??1,r));for(let i=0;i<WM;i++){let a=vA[i],o=JM(t,a),s=JM(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||KM(o)===KM(s)?(e[a]=Math.max(wD(GM(o),GM(s),r),0),($E.test(s)||$E.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=wD(t.rotate||0,n.rotate||0,r))}function JM(e,t){return e[t]===void 0?e.borderRadius:e[t]}var YM=ZM(0,.5,fE),XM=ZM(.5,.95,XT);function ZM(e,t,n){return r=>r<e?0:r>t?1:n(QT(e,t,r))}function QM(e,t,n){let r=Hk(e)?e:bk(e);return r.start(Ak(``,r,t,n)),r.animation}function $M(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var eN=(e,t)=>e.depth-t.depth,tN=class{constructor(){this.children=[],this.isDirty=!1}add(e){HT(this.children,e),this.isDirty=!0}remove(e){UT(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(eN),this.isDirty=!1,this.children.forEach(e)}};function nN(e,t){let n=AE.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(TE(r),e(a-t))};return wE.setup(r,!0),()=>TE(r)}function rN(e){return Hk(e)?e.get():e}var iN=class{constructor(){this.members=[]}add(e){HT(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(UT(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(UT(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},aN={hasAnimatedSinceResize:!0,hasEverUpdated:!1},oN={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},sN=[``,`X`,`Y`,`Z`],cN=1e3,lN=0;function uN(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=qk(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,wE,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dN(r)}function fN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=lN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,WA.value&&(oN.nodes=oN.calculatedTargetDeltas=oN.calculatedProjections=0),this.nodes.forEach(hN),this.nodes.forEach(wN),this.nodes.forEach(TN),this.nodes.forEach(gN),WA.addProjectionMetrics&&WA.addProjectionMetrics(oN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new tN)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new $T),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=LA(t)&&!Ine(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;wE.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=nN(i,250),aN.hasAnimatedSinceResize&&(aN.hasAnimatedSinceResize=!1,this.nodes.forEach(CN)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||MN,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!zM(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Sk(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||CN(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),TE(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(EN),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dN(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(yN),this.nodes.forEach(vN);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bN);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xN),this.nodes.forEach(SN),this.nodes.forEach(pN),this.nodes.forEach(mN)):this.nodes.forEach(bN),this.clearAllSnapshots();let e=AE.now();EE.delta=WT(0,1e3/60,e-EE.timestamp),EE.timestamp=e,EE.isProcessing=!0,DE.update.process(EE),DE.preRender.process(EE),DE.render.process(EE),EE.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,SA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_N),this.sharedNodes.forEach(DN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,wE.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){wE.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bM(this.snapshot.measuredBox.x)&&!bM(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=JA(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!FM(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||vj(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),IN(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return JA();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(RN))){let{scroll:e}=this.root;e&&(Oj(t.x,e.offset.x),Oj(t.y,e.offset.y))}return t}removeElementScroll(e){let t=JA();if(mM(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&mM(t,e),Oj(t.x,i.offset.x),Oj(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||JA();mM(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Oj(r.x,-n.scroll.offset.x),Oj(r.y,-n.scroll.offset.y)),vj(n.latestValues)&&jj(r,n.latestValues,n.layout?.layoutBox)}return vj(this.latestValues)&&jj(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=JA();mM(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!vj(n.latestValues))continue;let r;n.instance&&(_j(n.latestValues)&&n.updateSnapshot(),r=JA(),mM(r,n.measurePageBox())),NM(t,n.latestValues,n.snapshot?.layoutBox,r)}return vj(this.latestValues)&&NM(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==EE.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=EE.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=JA(),this.targetWithTransforms=JA()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),TM(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):mM(this.target,this.layout.layoutBox),wj(this.target,this.targetDelta)):mM(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),WA.value&&oN.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||_j(this.parent.latestValues)||yj(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=JA(),this.relativeTargetOrigin=JA(),DM(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),mM(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===EE.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;mM(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Dj(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=JA());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hM(this.prevProjectionDelta.x,this.projectionDelta.x),hM(this.prevProjectionDelta.y,this.projectionDelta.y)),CM(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!VM(this.projectionDelta.x,this.prevProjectionDelta.x)||!VM(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),WA.value&&oN.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=KA(),this.projectionDelta=KA(),this.projectionDeltaWithTransform=KA()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=KA();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=JA(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(jN));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=wD(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=wD(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(ON(o.x,e.x,n),ON(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(DM(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),AN(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&LM(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=JA(),mM(f,this.relativeTarget)),c&&(this.animationValues=a,qM(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(TE(this.pendingAnimation),void 0),this.pendingAnimation=wE.update(()=>{aN.hasAnimatedSinceResize=!0,this.motionValue||=bk(0),this.motionValue.jump(0,!1),this.currentAnimation=QM(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&LN(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||JA();let t=bM(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=bM(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mM(t,n),jj(t,i),CM(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iN),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&uN(`z`,e,r,this.animationValues);for(let t=0;t<sN.length;t++)uN(`rotate${sN[t]}`,e,r,this.animationValues),uN(`skew${sN[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=rN(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=rN(t?.pointerEvents)||``),this.hasProjected&&!vj(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=UM(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Hj){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Hj[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?rN(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(vN),this.root.sharedNodes.clear()}}}function pN(e){e.updateLayout()}function mN(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)HM(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=bM(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;pM(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else LN(i,t.layoutBox,n)&&HM(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=bM(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=KA();CM(o,n,t.layoutBox);let s=KA();a?CM(s,e.applyTransform(r,!0),t.measuredBox):CM(s,n,t.layoutBox);let c=!FM(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=JA();DM(s,t.layoutBox,i.layoutBox,o);let c=JA();DM(c,n,a.layoutBox,o),zM(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function hN(e){WA.value&&oN.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function gN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _N(e){e.clearSnapshot()}function vN(e){e.clearMeasurements()}function yN(e){e.isLayoutDirty=!0,e.updateLayout()}function bN(e){e.isLayoutDirty=!1}function xN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function SN(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function CN(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wN(e){e.resolveTargetDelta()}function TN(e){e.calcProjection()}function EN(e){e.resetSkewAndRotation()}function DN(e){e.removeLeadSnapshot()}function ON(e,t,n){e.translate=wD(t.translate,0,n),e.scale=wD(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kN(e,t,n,r){e.min=wD(t.min,n.min,r),e.max=wD(t.max,n.max,r)}function AN(e,t,n,r){kN(e.x,t.x,n.x,r),kN(e.y,t.y,n.y,r)}function jN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var MN={duration:.45,ease:[.4,0,.1,1]},NN=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),PN=NN(`applewebkit/`)&&!NN(`chrome/`)?Math.round:XT;function FN(e){e.min=PN(e.min),e.max=PN(e.max)}function IN(e){FN(e.x),FN(e.y)}function LN(e,t,n){return e===`position`||e===`preserve-aspect`&&!xM(BM(t),BM(n),.2)}function RN(e){return e!==e.root&&e.scroll?.wasRoot}var zN=fN({attachResizeListener:(e,t)=>$M(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),BN={current:void 0},VN=fN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!BN.current){let e=new zN({});e.mount(window),e.setOptions({layoutScroll:!0}),BN.current=e}return BN.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),HN=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function UN(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function WN(...e){return t=>{let n=!1,r=e.map(e=>{let r=UN(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():UN(e[t],null)}}}}function GN(...e){return b.useCallback(WN(...e),e)}var KN=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(xA(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=xA(e)&&e.offsetWidth||0,r=xA(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function qN({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,b.useContext)(HN),u=GN(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
61
|
-
[data-motion-pop-id="${o}"] {
|
|
62
|
-
position: absolute !important;
|
|
63
|
-
width: ${e}px !important;
|
|
64
|
-
height: ${u}px !important;
|
|
65
|
-
${_}px !important;
|
|
66
|
-
${v}px !important;
|
|
67
|
-
}
|
|
68
|
-
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,L.jsx)(KN,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var JN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=zT(YN),d=(0,b.useId)(),f=(0,b.useRef)(n),p=(0,b.useRef)(r);BT(()=>{f.current=n,p.current=r});let m=!0,h=(0,b.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,L.jsx)(qN,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,L.jsx)(VT.Provider,{value:h,children:e})};function YN(){return new Map}function XN(e=!0){let t=(0,b.useContext)(VT);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var ZN=e=>e.key||``;function QN(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var $N=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=XN(o),f=(0,b.useMemo)(()=>QN(e),[e]),p=o&&!u?[]:f.map(ZN),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=zT(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);BT(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=ZN(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=ZN(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(QN(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(RT);return(0,L.jsx)(L.Fragment,{children:x.map(e=>{let v=ZN(e),y=o&&!u?!1:f===x||p.includes(v);return(0,L.jsx)(JN,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},eP=(0,b.createContext)({strict:!1}),tP={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},nP=!1;function rP(){if(nP)return;let e={};for(let t in tP)e[t]={isEnabled:e=>tP[t].some(t=>!!e[t])};cj(e),nP=!0}function iP(){return rP(),lj()}function aP(e){let t=iP();for(let n in e)t[n]={...t[n],...e[n]};cj(t)}var oP=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function sP(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||oP.has(e)}var cP=c({default:()=>lP}),lP,uP=o((()=>{throw lP={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),dP=e=>!sP(e);function fP(e){typeof e==`function`&&(dP=t=>t.startsWith(`on`)?!sP(t):e(t))}try{fP((uP(),d(cP)).default)}catch{}function pP(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Hk(e[i])||(dP(i)||n===!0&&sP(i)||!t&&!sP(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var mP=(0,b.createContext)({});function hP(e,t){if($A(e)){let{initial:t,animate:n}=e;return{initial:t===!1||XA(t)?t:void 0,animate:XA(n)?n:void 0}}return e.inherit===!1?{}:t}function gP(e){let{initial:t,animate:n}=hP(e,(0,b.useContext)(mP));return(0,b.useMemo)(()=>({initial:t,animate:n}),[_P(t),_P(n)])}function _P(e){return Array.isArray(e)?e.join(` `):e}var vP=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yP(e,t,n){for(let r in t)!Hk(t[r])&&!Uj(r,n)&&(e[r]=t[r])}function bP({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=vP();return Lj(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xP(e,t){let n=e.style||{},r={};return yP(r,n,e),Object.assign(r,bP(e,t)),r}function SP(e,t){let n={},r=xP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var CP=()=>({...vP(),attrs:{}});function wP(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=CP();return Zj(n,t,$j(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};yP(t,e.style,e),i.style={...t,...i.style}}return i}var TP=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function EP(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(TP.indexOf(e)>-1||/[A-Z]/u.test(e))}function DP(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??EP(e)?wP:SP)(t,r,i,e),c=pP(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>Hk(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function OP({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:kP(n,r,i,e),renderState:t()}}function kP(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=rN(a[e]);let{initial:o,animate:s}=e,c=$A(e),l=ej(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!YA(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Fk(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var AP=e=>(t,n)=>{let r=(0,b.useContext)(mP),i=(0,b.useContext)(VT),a=()=>OP(e,t,r,i);return n?a():zT(a)},jP=AP({scrapeMotionValuesFromProps:Wj,createRenderState:vP}),MP=AP({scrapeMotionValuesFromProps:tM,createRenderState:CP}),NP=Symbol.for(`motionComponentSymbol`);function PP(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var FP=(0,b.createContext)({});function IP(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function LP(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(mP),s=(0,b.useContext)(eP),c=(0,b.useContext)(VT),l=(0,b.useContext)(HN),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(FP);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&RP(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Kk],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return BT(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function RP(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:zP(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&IP(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function zP(e){if(e)return e.options.allowProjection===!1?zP(e.parent):e.projection}function BP(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&aP(r);let a=n?n===`svg`:EP(e),o=a?MP:jP;function s(n,s){let c,l={...(0,b.useContext)(HN),...n,layoutId:VP(n)},{isStatic:u}=l,d=gP(n),f=o(n,u);if(!u&&typeof window<`u`){HP(l,r);let t=UP(l);c=t.MeasureLayout,d.visualElement=LP(e,f,l,i,t.ProjectionNode,a)}return(0,L.jsxs)(mP.Provider,{value:d,children:[c&&d.visualElement?(0,L.jsx)(c,{visualElement:d.visualElement,...l}):null,DP(e,n,PP(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[NP]=e,c}function VP({layoutId:e}){let t=(0,b.useContext)(RT).id;return t&&e!==void 0?t+`-`+e:e}function HP(e,t){(0,b.useContext)(eP).strict}function UP(e){let{drag:t,layout:n}=iP();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function WP(e,t){if(typeof Proxy>`u`)return BP;let n=new Map,r=(n,r)=>BP(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,BP(a,void 0,e,t)),n.get(a))})}var GP=(e,t)=>t.isSVG??EP(e)?new nM(t):new Kj(t,{allowProjection:e!==b.Fragment}),KP=class extends fj{constructor(e){super(e),e.animationState||=lM(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();YA(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},qP=0,JP={animation:{Feature:KP},exit:{Feature:class extends fj{constructor(){super(...arguments),this.id=qP++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=Ik(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function YP(e){return{point:{x:e.pageX,y:e.pageY}}}var XP=e=>t=>AA(t)&&e(t,YP(t));function ZP(e,t,n,r){return $M(e,t,XP(n),r)}var QP=({current:e})=>e?e.ownerDocument.defaultView:null,$P=(e,t)=>Math.abs(e-t);function eF(e,t){let n=$P(e.x,t.x),r=$P(e.y,t.y);return Math.sqrt(n**2+r**2)}var tF=new Set([`auto`,`scroll`]),nF=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=rF(this.lastRawMoveEventInfo,this.transformPagePoint));let e=aF(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=eF(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=EE;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=rF(t,this.transformPagePoint),wE.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=aF(e.type===`pointercancel`?this.lastMoveEventInfo:rF(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!AA(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=rF(YP(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=EE;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,aF(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=ZT(ZP(this.contextWindow,`pointermove`,this.handlePointerMove,d),ZP(this.contextWindow,`pointerup`,this.handlePointerUp,d),ZP(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(tF.has(e.overflowX)||tF.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),wE.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),TE(this.updatePoint)}};function rF(e,t){return t?{point:t(e.point)}:e}function iF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function aF({point:e},t){return{point:e,delta:iF(e,sF(t)),offset:iF(e,oF(t)),velocity:cF(t,.1)}}function oF(e){return e[0]}function sF(e){return e[e.length-1]}function cF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=sF(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>eE(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>eE(t)*2&&(r=e[1]);let a=tE(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function lF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?wD(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?wD(n,e,r.max):Math.min(e,n)),e}function uF(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function dF(e,{top:t,left:n,bottom:r,right:i}){return{x:uF(e.x,n,i),y:uF(e.y,t,r)}}function fF(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function pF(e,t){return{x:fF(e.x,t.x),y:fF(e.y,t.y)}}function mF(e,t){let n=.5,r=bM(e),i=bM(t);return i>r?n=QT(t.min,t.max-r,e.min):r>i&&(n=QT(e.min,e.max-i,t.min)),WT(0,1,n)}function hF(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var gF=.35;function _F(e=gF){return e===!1?e=0:e===!0&&(e=gF),{x:vF(e,`left`,`right`),y:vF(e,`top`,`bottom`)}}function vF(e,t,n){return{min:yF(e,t),max:yF(e,n)}}function yF(e,t){return typeof e==`number`?e:e[t]||0}var bF=new WeakMap,xF=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=JA(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(YP(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TA(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),HM(e=>{let t=this.getAxisMotionValue(e).get()||0;if($E.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=bM(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&wE.update(()=>i(e,t),!1,!0),Wk(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=TF(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&wE.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new nF(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:QP(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&wE.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!wF(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=lF(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&IP(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=dF(n.layoutBox,e):this.constraints=!1,this.elastic=_F(t),r!==this.constraints&&!IP(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&HM(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=hF(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!IP(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Nj(n,r.root,this.visualElement.getTransformPagePoint()),a=pF(r.layout.layoutBox,i);if(t){let e=t(mj(a));this.hasMutatedConstraints=!!e,e&&(a=pj(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=HM(o=>{if(!wF(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Wk(this.visualElement,e),n.start(Ak(e,n,0,t,this.visualElement,!1))}stopAnimation(){HM(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){HM(t=>{let{drag:n}=this.getProps();if(!wF(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-wD(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!IP(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};HM(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=mF({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),HM(t=>{if(!wF(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(wD(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bF.set(this.visualElement,this);let e=this.visualElement.current,t=ZP(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Tne(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();IP(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=CF(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),wE.read(r);let o=$M(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(HM(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=gF,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function SF(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function CF(e,t,n){let r=UA(e,SF(n)),i=UA(t,SF(n));return()=>{r(),i()}}function wF(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function TF(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var EF=class extends fj{constructor(e){super(e),this.removeGroupControls=XT,this.removeListeners=XT,this.controls=new xF(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||XT}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},DF=e=>(t,n)=>{e&&wE.update(()=>e(t,n),!1,!0)},OF=class extends fj{constructor(){super(...arguments),this.removePointerDownListener=XT}onPointerDown(e){this.session=new nF(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:QP(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:DF(e),onStart:DF(t),onMove:DF(n),onEnd:(e,t)=>{delete this.session,r&&wE.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ZP(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},kF=!1,AF=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),kF&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),aN.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),kF=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||wE.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),SA.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;kF=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function jF(e){let[t,n]=XN(),r=(0,b.useContext)(RT);return(0,L.jsx)(AF,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(FP),isPresent:t,safeToRemove:n})}var MF={pan:{Feature:OF},drag:{Feature:EF,ProjectionNode:VN,MeasureLayout:jF}};function NF(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&wE.postRender(()=>i(t,YP(t)))}var PF=class extends fj{mount(){let{current:e}=this.node;e&&(this.unmount=OA(e,(e,t)=>(NF(this.node,t,`Start`),e=>NF(this.node,e,`End`))))}unmount(){}},FF=class extends fj{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=ZT($M(this.node.current,`focus`,()=>this.onFocus()),$M(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function IF(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&wE.postRender(()=>i(t,YP(t)))}var LF=class extends fj{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Dne(e,(e,t)=>(IF(this.node,t,`Start`),(e,{success:t})=>IF(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},RF=new WeakMap,zF=new WeakMap,BF=e=>{let t=RF.get(e.target);t&&t(e)},VF=e=>{e.forEach(BF)};function HF({root:e,...t}){let n=e||document;zF.has(n)||zF.set(n,{});let r=zF.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(VF,{root:e,...t})),r[i]}function UF(e,t,n){let r=HF(t);return RF.set(e,n),r.observe(e),()=>{RF.delete(e),r.unobserve(e)}}var WF={some:0,all:1},GF=class extends fj{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:WF[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=UF(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(KF(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function KF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var qF={inView:{Feature:GF},tap:{Feature:LF},focus:{Feature:FF},hover:{Feature:PF}},JF={layout:{ProjectionNode:VN,MeasureLayout:jF}},YF=WP({...JP,...qF,...MF,...JF},GP);function XF(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ZF=b.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),QF=()=>{let e=b.useContext(ZF);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};XF(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
69
|
-
[data-state=closed]
|
|
70
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`),typeof window<`u`?b.useLayoutEffect:b.useEffect,typeof document<`u`&&window.visualViewport,new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function $F(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function eI(...e){return t=>e.forEach(e=>$F(e,t))}function tI(...e){return b.useCallback(eI(...e),e)}var nI=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function rI(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var iI={DURATION:.5,EASE:[.32,.72,0,1]},aI=8,oI=26;function sI(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=QF(),a=b.useRef(null),o=(0,b.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-oI)/window.innerWidth}b.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&rI(document.body,{background:`black`}),rI(t,{transformOrigin:nI(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${iI.DURATION}s`,transitionTimingFunction:`cubic-bezier(${iI.EASE.join(`,`)})`});let n=rI(t,{borderRadius:`${aI}px`,overflow:`hidden`,...nI(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},iI.DURATION*1e3)}}},[t,n,o])}var cI=b.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=QF(),l=tI(t,n),u=r&&r.length>0;if(!s)return null;let d=b.useCallback(e=>i(e),[i]);return b.createElement(di,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});cI.displayName=`Drawer.Overlay`;var lI=b.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=QF(),[x,S]=b.useState(!1),C=tI(i,a),w=b.useRef(null),T=b.useRef(null),E=b.useRef(!1),D=h&&h.length>0;sI();let O=(e,t,n=0)=>{if(E.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return E.current=!0,!0};b.useEffect(()=>{D&&window.requestAnimationFrame(()=>{S(!0)})},[]);function k(e){w.current=null,E.current=!1,s(e)}return b.createElement(hi,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":x?`true`:`false`,"data-vaul-snap-points":p&&D?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:C,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),w.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(T.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!w.current))return;let t=e.pageY-w.current.y,n=e.pageX-w.current.x,i=e.pointerType===`touch`?10:2;O({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(w.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),w.current=null,E.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),k(T.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),T.current&&k(T.current)}})});lI.displayName=`Drawer.Content`;var uI=250,dI=120,fI=b.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=QF(),m=b.useRef(null),h=b.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},dI)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},uI)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return b.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},b.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});fI.displayName=`Drawer.Handle`;var pI=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),mI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),hI=e=>{let t=mI(e);return t.charAt(0).toUpperCase()+t.slice(1)},gI=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_I=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},vI={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`},yI=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...vI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gI(`lucide`,i),...!a&&!_I(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),bI=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(yI,{ref:i,iconNode:t,className:gI(`lucide-${pI(hI(e))}`,`lucide-${e}`,n),...r}));return n.displayName=hI(e),n},xI=bI(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),SI=bI(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),CI=Object.defineProperty,wI=(e,t)=>CI(e,`name`,{value:t,configurable:!0}),[TI,Bne]=Qe(`Tooltip`,[eh]),EI=eh(),DI=`TooltipProvider`,OI=700,kI=`tooltip.open`,[AI,jI]=TI(DI),MI=wI(e=>{let{__scopeTooltip:t,delayDuration:n=OI,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,L.jsx)(AI,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),NI=`Tooltip`,[PI,FI]=TI(NI),II=wI(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=jI(NI,e.__scopeTooltip),l=EI(t),[u,d]=b.useState(null),[f,p]=b.useState(void 0),m=H(),h=b.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,x]=ut({prop:r,defaultProp:i??!1,onChange:wI(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(kI))):c.onClose(),a?.(e)},`onChange`),caller:NI}),S=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),C=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),w=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},_)},[_,x]);b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,L.jsx)(gh,{...l,children:(0,L.jsx)(PI,{scope:t,contentId:E,setContentId:p,open:y,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:b.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:n})})},`Tooltip`),LI=`TooltipTrigger`,RI=b.forwardRef(wI(function(e,t){let{__scopeTooltip:n,...r}=e,i=FI(LI,n),a=jI(LI,n),o=EI(n),s=Je(t,b.useRef(null),i.onTriggerChange),c=b.useRef(!1),l=b.useRef(!1),u=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,L.jsx)(_h,{asChild:!0,...o,children:(0,L.jsx)(Nt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:ze(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:ze(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:ze(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:ze(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:ze(e.onBlur,i.onClose),onClick:ze(e.onClick,i.onClose)})})},`TooltipTrigger`)),zI=`TooltipPortal`,[BI,VI]=TI(zI,{forceMount:void 0}),HI=wI(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=FI(zI,t);return(0,L.jsx)(BI,{scope:t,forceMount:n,children:(0,L.jsx)(xn,{present:n||a.open,children:(0,L.jsx)(_n,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),UI=`TooltipContent`,WI=b.forwardRef(wI(function(e,t){let n=VI(UI,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=FI(UI,e.__scopeTooltip);return(0,L.jsx)(xn,{present:r||o.open,children:o.disableHoverableContent?(0,L.jsx)(qI,{side:i,...a,ref:t}):(0,L.jsx)(GI,{side:i,...a,ref:t})})},`TooltipContent`)),GI=b.forwardRef(wI(function(e,t){let n=FI(UI,e.__scopeTooltip),r=jI(UI,e.__scopeTooltip),i=b.useRef(null),a=Je(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=XI(r,YI(r,n.getBoundingClientRect())),a=ZI(t.getBoundingClientRect());s($I([...i,...a])),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=wI(e=>p(e,u),`handleTriggerLeave`),t=wI(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=wI(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!QI(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,L.jsx)(qI,{...e,ref:a})},`TooltipContentHoverable`)),KI=bt(`TooltipContent`),qI=b.forwardRef(wI(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=FI(UI,n),u=EI(n),{onClose:d}=l;b.useEffect(()=>(document.addEventListener(kI,d),()=>document.removeEventListener(kI,d)),[d]),b.useEffect(()=>{if(l.trigger){let e=wI(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return et(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,L.jsx)(Gt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,L.jsxs)(vh,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,L.jsx)(KI,{children:r}),i?(0,L.jsx)(Eh,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),JI=b.forwardRef(wI(function(e,t){let{__scopeTooltip:n,...r}=e,i=EI(n);return(0,L.jsx)(yh,{...i,...r,ref:t})},`TooltipArrow`));function YI(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}wI(YI,`getExitSideFromRect`);function XI(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}wI(XI,`getPaddedExitPoints`);function ZI(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}wI(ZI,`getPointsFromRect`);function QI(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}wI(QI,`isPointInPolygon`);function $I(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),eL(t)}wI($I,`getHull`);function eL(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}wI(eL,`getHullPresorted`);var tL=MI,nL=II,rL=RI,iL=HI,aL=WI,oL=JI,sL=Object.defineProperty,cL=(e,t)=>sL(e,`name`,{value:t,configurable:!0}),lL=!1;function uL(){let[e,t]=b.useState(lL);return b.useEffect(()=>{lL||(lL=!0,t(!0))},[]),e}cL(uL,`useIsHydrated`);var dL=b.useSyncExternalStore;function fL(){return()=>{}}cL(fL,`subscribe`);function pL(){return dL(fL,()=>!0,()=>!1)}cL(pL,`useIsHydratedModern`);var mL=typeof dL==`function`?pL:uL,hL=Object.defineProperty,gL=(e,t)=>hL(e,`name`,{value:t,configurable:!0}),_L=`rovingFocusGroup.onEntryFocus`,vL={bubbles:!1,cancelable:!0},yL=`RovingFocusGroup`,[bL,xL,SL]=Am(yL),[CL,wL]=Qe(yL,[SL]),[TL,EL]=CL(yL),DL=b.forwardRef(gL(function(e,t){return(0,L.jsx)(bL.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(bL.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(OL,{...e,ref:t})})})},`RovingFocusGroup`)),OL=b.forwardRef(gL(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=Je(t,f),m=Wm(a),[h,g]=ut({prop:o,defaultProp:s??null,onChange:c,caller:yL}),[_,v]=b.useState(!1),y=Lt(l),x=xL(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(_L,y),()=>e.removeEventListener(_L,y)},[y]),(0,L.jsx)(TL,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,L.jsx)(Nt.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:ze(e.onMouseDown,()=>{S.current=!0}),onFocus:ze(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(_L,vL);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);PL([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:ze(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),kL=`RovingFocusGroupItem`,AL=b.forwardRef(gL(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=H(),l=a||c,u=EL(kL,n),d=u.currentTabStopId===l,f=xL(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=mL();return et(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),b.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,L.jsx)(bL.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,L.jsx)(Nt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:ze(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:ze(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ze(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=NL(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?FL(n,r+1):n.slice(r+1)}setTimeout(()=>PL(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),jL={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ML(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}gL(ML,`getDirectionAwareKey`);function NL(e,t,n){let r=ML(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return jL[r]}gL(NL,`getFocusIntent`);function PL(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}gL(PL,`focusFirst`);function FL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}gL(FL,`wrapArray`);var Vne=DL,IL=AL,LL=Object.defineProperty,RL=(e,t)=>LL(e,`name`,{value:t,configurable:!0}),zL=`Tabs`,[BL,Hne]=Qe(zL,[wL]),VL=wL(),[HL,UL]=BL(zL),WL=b.forwardRef(RL(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Wm(s),[d,f]=ut({prop:r,onChange:i,defaultProp:a??``,caller:zL});return(0,L.jsx)(HL,{scope:n,baseId:H(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,L.jsx)(Nt.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),GL=`TabsList`,KL=b.forwardRef(RL(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=UL(GL,n),o=VL(n);return(0,L.jsx)(Vne,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,L.jsx)(Nt.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),qL=`TabsTrigger`,JL=b.forwardRef(RL(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=UL(qL,n),s=VL(n),c=ZL(o.baseId,r),l=QL(o.baseId,r),u=r===o.value;return(0,L.jsx)(IL,{asChild:!0,...s,focusable:!i,active:u,children:(0,L.jsx)(Nt.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:ze(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:ze(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:ze(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),YL=`TabsContent`,XL=b.forwardRef(RL(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=UL(YL,n),c=ZL(s.baseId,r),l=QL(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,L.jsx)(xn,{present:i||u,children:({present:n})=>(0,L.jsx)(Nt.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function ZL(e,t){return`${e}-trigger-${t}`}RL(ZL,`makeTriggerId`);function QL(e,t){return`${e}-content-${t}`}RL(QL,`makeContentId`);var $L=WL,eR=XL;function tR(...e){return lw(MS(e))}function nR(){return typeof window>`u`}function rR(e,t=6){return`${e.substring(0,t)}...${e.substring(e.length-t)}`}var iR=FS(``,{variants:{variant:{display:`text-display font-bold`,h1:`text-h1 font-bold`,h2:`text-h2 font-medium`,h3:`text-h3 font-bold`,h4:`text-h4 font-bold`,h5:`text-h5 font-bold`,h6:`text-h6 font-bold`,h7:`text-[1.25rem] font-medium`,title:`text-title`,body1:`text-body-2 font-medium`,body2:`text-body font-medium`,p:`text-base font-normal`,caption:`text-caption font-medium`,caption2:`text-caption-2 font-medium`}},defaultVariants:{variant:`body1`}});function aR(e){var t=e,{variant:n}=t,r=gS(t,[`variant`]);let i=r,{asChild:a,className:o}=i,s=gS(i,[`asChild`,`className`]);return(0,L.jsx)(a?vt:`p`,q(K({},s),{className:iR({variant:n,className:o}),children:r.children}))}var oR=(e,t)=>{let n=Number.parseFloat(String(e));return Number.isNaN(n)?t:`${n}rem`};function sR(e){let{src:t=``,className:n,alt:r=`--`,badgeSrc:i=``,badgeAlt:a=``,outline:o=!1}=e,s=oR(e.size,`2rem`);return(0,L.jsxs)(`div`,{"data-chain":`true`,"data-token":`BNC`,className:tR(`relative rounded-full w-[var(--badge-size)] h-[var(--badge-size)] shrink-0`,e.className),style:{fontSize:s,"--badge-size":s},children:[(0,L.jsx)(LT,{src:t,layout:`constrained`,width:400,aspectRatio:1,alt:r,draggable:!1,objectFit:`cover`,className:tR(`absolute inset-0 aspect-square h-full w-full rounded-full bg-transparent shrink-0`,n,{"border border-brand-black-600":o})}),(0,L.jsx)(`div`,{className:tR(`w-[0.4375em] h-[0.4375em] right-0 bottom-0 absolute bg-brand-black-300 rounded-[0.15625em] overflow-hidden outline outline-offset-[-1px] outline-neutral-900`,{"outline-brand-black-600":o}),children:(0,L.jsx)(LT,{src:i,layout:`constrained`,width:24,aspectRatio:1,draggable:!1,objectFit:`cover`,className:`w-full h-full`,alt:a})})]})}var cR={normalize:`inline-flex items-center justify-center select-none gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,default:`bg-white text-brand-black-600 hover:bg-brand-white-400 focus-visible:ring-brand-neutral-200 disabled:opacity-100 disabled:text-brand-neutral-200`,secondary:`bg-brand-black-500 text-white focus-visible:ring-brand-black-200 disabled:text-brand-black-100 hover:bg-brand-black-300 disabled:opacity-100`,level_1:`bg-brand-black-350 text-white focus-visible:ring-brand-black-200 disabled:text-brand-black-100 hover:bg-brand-black-300 disabled:opacity-100`,level_2:`bg-brand-black-300 text-white focus-visible:ring-brand-black-200 disabled:text-brand-black-100 hover:bg-brand-black-200 disabled:opacity-100`,primary:`bg-white text-brand-black-600 hover:bg-brand-white-400 focus-visible:ring-brand-neutral-200 disabled:opacity-100 disabled:bg-brand-black-500 disabled:text-brand-black-100`,destructive:`bg-brand-danger-200 text-brand-danger-500 focus-visible:ring-brand-danger-200 disabled:opacity-100`,unstyled:``},lR=FS(`inline-flex items-center justify-center select-none gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer`,{variants:{variant:{default:cR.default,primary:cR.primary,secondary:cR.secondary,level_1:cR.level_1,level_2:cR.level_2,unset:cR.unstyled,message:`bg-brand-black-300 text-white hover:brightness-110`,destructive:cR.destructive,outline:`border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{sm:`h-[30px] px-2 py-1.5 text-xs rounded-[0.625rem] gap-1.5 has-[>svg]:px-2.5`,xs:`h-[24px] px-1.5 py-1 text-xs rounded-lg gap-1 has-[>svg]:px-2.5`,default:`h-[46px] px-4 text-base py-2 rounded-2xl gap-2 has-[>svg]:px-3`,lg:`h-[48px] px-4 py-3.5 rounded-2xl text-base gap-2 has-[>svg]:px-4`,xl:`h-[52px] px-4 py-3.5 text-lg rounded-2xl gap-3 has-[>svg]:px-4`,unset:``}},defaultVariants:{variant:`default`,size:`default`}}),uR=FS(`aspect-square inline-flex items-center justify-center select-none gap-2 transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:cR.default,secondary:cR.secondary,level_1:cR.level_1,level_2:cR.level_2,primary:cR.primary,destructive:cR.destructive,message:`bg-brand-black-300 text-white hover:brightness-110`,unset:``},size:{xs:`w-[20px]`,smx:`w-[30px]`,sm:`w-[32px]`,default:`w-[40px]`,lg:`w-[48px]`,xl:`w-[52px]`,unset:``},rounded:{xs:`rounded-[8px]`,smx:`rounded-[10px]`,sm:`rounded-[10px]`,lg:`rounded-[16px]`,xl:`rounded-[16px]`,default:`rounded-[16px]`,full:`rounded-full`,unset:``}},defaultVariants:{variant:`default`,size:`default`}});function dR(e){let t=e,{variant:n,asChild:r=!1,size:i=`default`,rounded:a=`default`,className:o}=t,s=gS(t,[`variant`,`asChild`,`size`,`rounded`,`className`]);return(0,L.jsx)(r?vt:`button`,q(K({type:`button`},s),{className:uR({variant:n,size:i,rounded:a==="default"?i:`full`,className:tR(`inline-flex items-center justify-center`,o)}),children:e.children}))}b.forwardRef((e,t)=>{let n=e,{asChild:r,variant:i,size:a,className:o}=n,s=gS(n,[`asChild`,`variant`,`size`,`className`]);return(0,L.jsx)(`div`,{className:`relative p-[1.5px] rounded-2xl animated-gradient-border`,children:(0,L.jsx)(r?vt:`button`,q(K({ref:t,"data-slot":`button`},s),{className:tR(`w-full`,lR({variant:i,size:a,className:o}))}))})});function fR(e){var t=e,{className:n,type:r}=t,i=gS(t,[`className`,`type`]);return(0,L.jsx)(`input`,K({type:r,"data-slot":`input`,className:tR(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,n)},i))}function Une(e){return(0,L.jsx)(LT,{src:e.src,alt:e.alt,layout:`constrained`,className:tR(`shrink-0 object-cover rounded-full`,e.className),width:20,aspectRatio:1})}var pR={isEmpty:!0},Wne=nR()?{}:b.createContext(pR);function Gne(){let e=b.useContext(Wne);return nR()?pR:e}b.forwardRef(function(e,t){let{isEmpty:n}=Gne();return n?(0,L.jsx)(`div`,q(K({},e),{ref:t,className:tR(`flex flex-col items-center gap-4`,e.className)})):null}),b.forwardRef(function(e,t){return(0,L.jsx)(`h6`,q(K({ref:t},e),{className:tR(`font-500 text-center font-semibold`,e.className)}))}),b.forwardRef(function(e,t){return(0,L.jsx)(`div`,q(K({ref:t},e),{className:tR(`text-xs text-muted-foreground`,e.className)}))});var Kne=b.forwardRef((e,t)=>{var n=e,{className:r,label:i,error:a,helperText:o,id:s}=n,c=gS(n,[`className`,`label`,`error`,`helperText`,`id`]);let l=s||b.useId();return(0,L.jsxs)(`div`,{className:`space-y-2`,children:[i&&(0,L.jsx)(`label`,{htmlFor:l,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,children:i}),(0,L.jsx)(fR,K({ref:t,id:l,className:tR(a&&`border-destructive focus-visible:border-destructive`,r)},c)),(a||o)&&(0,L.jsx)(`p`,{className:tR(`text-sm`,a?`text-destructive`:`text-muted-foreground`),children:a||o})]})});Kne.displayName=`Input`,(0,b.forwardRef)((e,t)=>{let n=(0,b.useId)(),r=e,{network:i,validity:a}=r,o=gS(r,[`network`,`validity`]),s=`address${n}`;return(0,L.jsxs)(`div`,{className:`flex flex-col gap-[calc(6rem/16)] w-full select-none`,children:[(0,L.jsx)(aR,{variant:`caption`,className:`text-muted-foreground`,asChild:!0,children:(0,L.jsx)(`label`,{htmlFor:s,children:`To address`})}),(0,L.jsxs)(`div`,{className:`bg-brand-black-350 w-full h-[calc(50rem/16)] justify-start gap-2 flex py-[calc(13rem/16)] px-[calc(12rem/16)] rounded-[1rem]`,children:[e.validity.status===`error`?(0,L.jsx)(dR,{variant:`level_2`,rounded:`full`,size:`xs`,asChild:!0,children:(0,L.jsx)(`span`,{className:`w-[calc(24rem/16)]`,children:(0,L.jsx)(CS,{width:`1em`})})}):(0,L.jsx)(Une,{className:`w-[calc(24rem/16)]`,src:e.network.imageUrl,alt:e.network.name}),(0,L.jsx)(`input`,q(K({ref:t,id:s,type:`text`,placeholder:`Paste wallet address`},o),{className:`!outline-none placeholder:text-brand-black-100 text-foreground bg-transparent appearance-none w-full`}))]}),(0,L.jsx)(aR,{variant:`caption`,asChild:!0,children:(0,L.jsxs)(YF.p,{initial:{opacity:0,marginTop:-10},animate:e.value?{opacity:1,marginTop:0}:{opacity:0,marginTop:-10},className:tR(`inline-flex select-none gap-1 items-center`,{"text-brand-success-400":e.validity.status===`ok`,"text-brand-danger-500":e.validity.status===`error`}),children:[e.validity.status===`ok`?(0,L.jsx)(bS,{width:`1em`}):(0,L.jsx)(AS,{width:`1em`}),(0,L.jsx)(`span`,{children:e.validity.message})]})})]})}),b.forwardRef((e,t)=>{let n=e,{address:r,tag:i}=n,a=gS(n,[`address`,`tag`]);return(0,L.jsx)(`span`,q(K({ref:t},a),{className:tR(`rounded-full px-[6px] py-[3px] text-[calc(14rem/16)] inline-flex items-center gap-[calc(4rem/16)] bg-brand-black-300`,e.className),children:(0,L.jsx)(`span`,{className:`text-[calc(12rem/16)] not-sr-only leading-[1rem] text-brand-white-500`,children:r})}))});var qne=b.forwardRef((e,t)=>{let n=e,{address:r,tag:i}=n;return(0,L.jsxs)(`button`,q(K({},gS(n,[`address`,`tag`])),{ref:t,type:`button`,className:tR(`rounded-full px-[6px] py-[3px] text-[calc(14rem/16)] inline-flex items-center gap-[calc(4rem/16)] bg-brand-black-300`,e.className),children:[(0,L.jsxs)(`span`,{className:`sr-only`,children:[`Copy `,i,` address`]}),(0,L.jsx)(`span`,{className:`text-[calc(12rem/16)] not-sr-only leading-[1rem] text-brand-white-500`,children:r}),(0,L.jsx)(TS,{className:`size-4`})]}))});b.forwardRef(function(e,t){return(0,L.jsx)(qne,K({ref:t,className:`bg-brand-black-500`},e))}),b.forwardRef((e,t)=>{let n=e,{address:r,tag:i}=n,a=gS(n,[`address`,`tag`]);return(0,L.jsx)(`span`,q(K({ref:t},a),{className:tR(`rounded-full px-[6px] py-[3px] text-[calc(14rem/16)] inline-flex items-center gap-[calc(4rem/16)] bg-brand-black-300`,e.className),children:(0,L.jsx)(`span`,{className:`text-[calc(12rem/16)] not-sr-only leading-[1rem] text-brand-white-500`,children:r})}))}),b.createContext({show:!1,setShow:b.default.Dispatch});function Jne(e){var t=e,{delayDuration:n=0}=t,r=gS(t,[`delayDuration`]);return(0,L.jsx)(tL,K({"data-slot":`tooltip-provider`,delayDuration:n},r))}function mR(e){var t=gS(e,[]);return(0,L.jsx)(Jne,{children:(0,L.jsx)(nL,K({"data-slot":`tooltip`},t))})}function hR(e){var t=gS(e,[]);return(0,L.jsx)(rL,K({"data-slot":`tooltip-trigger`},t))}function gR(e){var t=e,{className:n,sideOffset:r=0,children:i}=t,a=gS(t,[`className`,`sideOffset`,`children`]);return(0,L.jsx)(iL,{children:(0,L.jsxs)(aL,q(K({"data-slot":`tooltip-content`,sideOffset:r,className:tR(`bg-brand-black-600 text-brand-black-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,n)},a),{children:[i,(0,L.jsx)(oL,{className:`bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]}))})}function Yne(e){let t=e.icon,n=typeof e.tooltip==`string`?(0,L.jsxs)(mR,{children:[(0,L.jsx)(hR,{children:(0,L.jsx)(xI,{size:`1em`})}),(0,L.jsx)(gR,{children:e.tooltip})]}):e.tooltip??null;return(0,L.jsxs)(`div`,{className:`flex select-none items-center text-[calc(12rem/16)] font-medium`,children:[(0,L.jsxs)(`dt`,{className:`flex-1 gap-1 flex items-center`,children:[(0,L.jsx)(t,{size:`1.16em`}),(0,L.jsx)(`span`,{className:`text-[1em] leading-[1rem]`,children:e.name}),n]}),(0,L.jsx)(`dd`,{children:e.children})]})}function _R({name:e,icon:t,tooltip:n}){return function({children:r,tooltip:i}){return(0,L.jsx)(Yne,{icon:t,name:e,tooltip:i||n,children:r},e)}}_R({icon:({size:e})=>(0,L.jsx)(DS,{width:e}),name:`Bridge fee`}),_R({icon:({size:e})=>(0,L.jsx)(kS,{width:e}),name:`Recipient Address`}),_R({icon:({size:e})=>(0,L.jsx)(ES,{width:e}),name:`Gas costs`}),_R({icon:({size:e})=>(0,L.jsx)(_S,{width:e}),name:`Spillage tolerance`}),_R({icon:({size:e})=>(0,L.jsx)(vS,{width:e}),name:`Route`}),_R({icon:({size:e})=>(0,L.jsx)(_S,{width:e}),name:`Rate`}),_R({icon:({size:e})=>(0,L.jsx)(ES,{width:e}),name:`Fee`}),_R({icon:({size:e})=>(0,L.jsx)(wS,{width:e}),name:`Estimated time`}),_R({icon:({size:e})=>(0,L.jsx)(OS,{width:e}),name:`Points`});var Xne={processing:`Processing`,upcoming:`Upcoming`,error:`Failed`};b.forwardRef(function(e,t){let n=e,{processingStatus:r,caption:i,secondary:a,data:o,durationMode:s=`none`}=n,c=gS(n,[`processingStatus`,`caption`,`secondary`,`data`,`durationMode`]),l=r!==`upcoming`,u=`${b.useId()}/${i}/content-2`,d=s===`none`;return(0,L.jsx)(YF.li,q(K({ref:t},c),{"data-process-status":r,className:`block bg-brand-black-350 cursor-default select-none font-medium text-brand-white-500`,children:(0,L.jsxs)(YF.div,{initial:{opacity:.5},animate:{opacity:l?1:.5},className:`flex h-[3.5rem] items-center gap-[0.86rem] py-[0.5625rem] px-[0.75rem] `,children:[e.level===0?(0,L.jsx)(sR,K({},e.badge)):(0,L.jsx)(dR,{variant:`level_2`,size:`sm`,rounded:`full`,className:`pointer-events-none !bg-transparent backdrop-blur-[34px]`,style:{boxShadow:`0 4px 24px 0 rgba(255, 255, 255, 0.05) inset`},children:(0,L.jsx)(`span`,{className:tR(`w-[0.5rem] inline-block aspect-square rounded-lg bg-brand-white-500`,{"bg-brand-success-400":r===`completed`,"bg-brand-danger-500":r===`error`})})}),(0,L.jsxs)(`div`,{className:`flex flex-col flex-1 gap-[calc(4/16rem)]`,children:[(0,L.jsx)(`div`,{className:`text-brand-white-500 text-xs md:!text-base h-auto md:h-[1.25rem] truncate max-w-[150px] md:max-w-full`,children:i}),(0,L.jsx)(`div`,{className:`text-xs h-[1rem] text-brand-black-100`,children:r===`completed`?e.data?.transactionUrl?(0,L.jsxs)(`a`,{href:e.data.transactionUrl,className:`flex cursor-pointer gap-[calc(2rem/16)] items-center`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,L.jsx)(`span`,{children:`View in explorer `}),(0,L.jsx)(yS,{width:`0.75rem`,height:`0.75rem`})]}):(0,L.jsx)(`span`,{children:e.secondary}):(0,L.jsx)(`span`,{children:e?.secondary??Xne[r]})})]}),(0,L.jsxs)($N,{children:[r===`completed`?(0,L.jsxs)(YF.div,{layoutId:u,initial:{x:10,opacity:0},animate:{x:0,opacity:1},exit:{x:10,opacity:0},className:`flex gap-[calc(8rem/16)] items-center`,children:[!d&&(0,L.jsx)(`span`,{className:`text-[calc(13rem/16)] text-brand-black-100`,children:e?.data?.completedIn}),(0,L.jsx)(bS,{height:`1rem`,width:`1rem`,className:`text-brand-success-400`})]}):null,r===`processing`?(0,L.jsxs)(YF.div,{initial:{x:10,opacity:0},animate:{x:0,opacity:1},exit:{x:10,opacity:0},layoutId:u,className:`flex gap-[calc(10rem/16)] items-center`,children:[!d&&(0,L.jsx)(`span`,{className:`text-[calc(13rem/16)]`,children:e?.data?.eta}),(0,L.jsx)(SI,{size:`1rem`,className:`animate text-brand-black-100 animate-spin`})]}):null]})]})}))});var Zne=b.forwardRef((e,t)=>(0,L.jsx)(`ul`,q(K({ref:t},e),{className:tR(`flex flex-col gap-y-[calc(2rem/16)] *:first:rounded-t-[1rem] *:last:rounded-b-[1rem]`,e.className),children:e.children})));Zne.displayName=`TimelineRoot`;var Qne={processing:`Processing`,upcoming:`Upcoming`,error:`Failed`};b.forwardRef(function(e,t){let n=e,{processingStatus:r,caption:i,secondary:a,data:o,durationMode:s=`none`}=n,c=gS(n,[`processingStatus`,`caption`,`secondary`,`data`,`durationMode`]),l=`${b.useId()}/${i}/content-2`,u=s===`none`;return(0,L.jsx)(YF.li,q(K({ref:t},c),{"data-process-status":r,className:`block group-[.group-list]/list:border-x group-[.group-list]/list:border-y-0 border border-(--timeline-alt-list-outline) group-[.group-list-group]/listgroup:border-x group-[.group-list-group]/listgroup:border-y-0 cursor-default select-none font-medium text-brand-white-500`,style:{"--timeline-alt-list-outline":`var(--timeline-alt-outline, #222429)`},children:(0,L.jsxs)(YF.div,{className:`flex items-center bordergap-[0.86rem] py-[0.75rem] px-[0.875rem] `,children:[(0,L.jsxs)(`div`,{className:`flex flex-col flex-1 gap-[calc(4/16rem)]`,children:[(0,L.jsx)(`div`,{className:tR(`text-brand-white-500 text-xs md:!text-base truncate max-w-[150px] md:max-w-full`,{"text-brand-black-100":r!==`completed`,"text-brand-white-500":r===`completed`,"text-brand-danger-500":r===`error`}),children:i}),(0,L.jsx)(`div`,{className:`text-xs h-[1rem] text-brand-black-100`,children:r===`completed`?e.data?.transactionUrl?(0,L.jsxs)(`a`,{href:e.data.transactionUrl,className:`flex cursor-pointer transition-default hover:text-brand-white-500 gap-[calc(2rem/16)] items-center`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,L.jsx)(`span`,{children:`View in explorer `}),(0,L.jsx)(yS,{width:`0.75rem`,height:`0.75rem`})]}):(0,L.jsx)(`span`,{children:e.secondary}):(0,L.jsx)(`span`,{children:e?.secondary??Qne[r]})})]}),(0,L.jsxs)($N,{children:[r===`completed`?(0,L.jsxs)(YF.div,{layoutId:l,initial:{x:10,opacity:0},animate:{x:0,opacity:1},exit:{x:10,opacity:0},className:`flex gap-[calc(8rem/16)] items-center`,children:[!u&&(0,L.jsx)(`span`,{className:tR(`text-[calc(13rem/16)] text-brand-black-100`,{"text-brand-white-500":r===`completed`}),children:e?.data?.completedIn}),(0,L.jsx)(bS,{height:`1rem`,width:`1rem`,className:`text-brand-success-400`})]}):null,r===`processing`?(0,L.jsxs)(YF.div,{initial:{x:10,opacity:0},animate:{x:0,opacity:1},exit:{x:10,opacity:0},layoutId:l,className:`flex gap-[calc(10rem/16)] items-center`,children:[!u&&(0,L.jsx)(`span`,{className:`text-[calc(13rem/16)]`,children:e?.data?.eta}),(0,L.jsx)(SI,{size:`1rem`,className:`animate text-brand-black-100 animate-spin`})]}):null]})]})}))});var $ne=b.forwardRef((e,t)=>(0,L.jsx)(`ul`,q(K({ref:t},e),{className:tR(`flex flex-col gap-y-0 overflow-hidden *:first:rounded-t-[1rem] *:last:rounded-b-[1rem]`,e.className),style:{"--timeline-alt-outline":`#222429`},children:e.children})));$ne.displayName=`TimelineAltRoot`;function ere(e){var t=e,{className:n}=t,r=gS(t,[`className`]);return(0,L.jsx)($L,K({"data-slot":`tabs`,className:tR(`flex flex-col gap-2`,n)},r))}function tre(e){var t=e,{className:n}=t,r=gS(t,[`className`]);return(0,L.jsx)(eR,K({"data-slot":`tabs-content`,className:tR(`flex-1 outline-none`,n)},r))}function nre(e){return(0,L.jsx)(`nav`,{className:`flex flex-col`,children:(0,L.jsx)(KL,{asChild:!0,children:(0,L.jsx)(`ul`,{className:`flex p-0 bg-transparent gap-3`,children:e.children})})})}function rre(e){return(0,L.jsx)(JL,{value:e.value,className:`apperance-none !text-brand-white-500 cursor-pointer text-[0.875rem] font-medium data-[state=inactive]:!text-brand-black-100 data-[state=active]:!text-brand-white-500 !p-[0rem] whitespace-nowrap`,children:e.children})}new Intl.NumberFormat(`en-US`,{currency:`USD`});var vR=b.createContext(null);function yR(){let e=b.useContext(vR);if(!e)throw Error(`useWalletHeader must be used within a WalletHeader`);return e}var ire=FS(`bg-brand-black-550 z-50 relative rounded-t-[1rem] overflow-hidden`,{variants:{variant:{default:`-mx-[1rem]`,contained:`mx-0`}},defaultVariants:{variant:`default`}}),bR=null,are=b.forwardRef((e,t)=>{var n=e,{className:r,variant:i,asChild:a=!1,defaultOpen:o=!1,persistOpen:s=!0,children:c}=n,l=gS(n,[`className`,`variant`,`asChild`,`defaultOpen`,`persistOpen`,`children`]);let u=a?vt:`div`,[d,f]=b.useState(()=>s&&bR!==null?bR:o);return b.useEffect(()=>{s&&(bR=d)},[d,s]),(0,L.jsx)(vR.Provider,{value:{show:d,setShow:f},children:(0,L.jsx)(u,q(K({ref:t,className:tR(ire({variant:i}),r),style:{"--container-height":`auto`}},l),{children:c}))})});are.displayName=`WalletHeader`;var ore=b.forwardRef((e,t)=>{var n=e,{className:r,accounts:i,children:a}=n,o=gS(n,[`className`,`accounts`,`children`]);let{show:s,setShow:c}=yR();return(0,L.jsx)(`button`,q(K({ref:t,type:`button`,className:tR(`p-[1rem] w-full cursor-pointer text-start appearance-none z-20 relative bg-gradient-to-b from-brand-black-550 to-transparent rounded-t-[1rem] border-b border-brand-black-350`,{"hover:bg-brand-black-500 border-transparent":!s},r),onClick:()=>c(e=>!e)},o),{children:(0,L.jsxs)(`div`,{className:`flex w-full gap-2 justify-between items-center`,children:[a||(0,L.jsx)(xR,{accounts:i}),(0,L.jsx)(dR,{variant:`level_1`,"data-open":s,className:`data-[open=false]:rotate-180 shrink-0 transform transition-all`,rounded:`full`,size:`sm`,asChild:!0,children:(0,L.jsx)(`span`,{children:(0,L.jsx)(xS,{})})})]})}))});ore.displayName=`WalletConnectedHeader`;var sre=b.forwardRef((e,t)=>{var n=e,{className:r,children:i}=n,a=gS(n,[`className`,`children`]);let{show:o}=yR(),s=b.useRef(null),c=b.useRef(null),l={show:{opacity:[0,.8,1]},hide:{opacity:[1,.25,0]}};b.useEffect(()=>{let e=()=>{if(s.current&&c.current){let e=s.current.offsetHeight;c.current.style.setProperty(`--container-height`,`${e}px`)}};e();let t=new ResizeObserver(e);return s.current&&t.observe(s.current),()=>{t.disconnect()}},[]);let u=a,{onDrag:d,onDragEnd:f,onDragStart:p,onDragEnter:m,onDragExit:h,onDragLeave:g,onDragOver:_,onDrop:v,onAnimationStart:y,onAnimationEnd:x,onAnimationIteration:S,onTransitionEnd:C,onTransitionStart:w,onTransitionRun:T,onTransitionCancel:E}=u,D=gS(u,[`onDrag`,`onDragEnd`,`onDragStart`,`onDragEnter`,`onDragExit`,`onDragLeave`,`onDragOver`,`onDrop`,`onAnimationStart`,`onAnimationEnd`,`onAnimationIteration`,`onTransitionEnd`,`onTransitionStart`,`onTransitionRun`,`onTransitionCancel`]);return(0,L.jsx)(YF.div,{ref:c,initial:{height:0},animate:{height:o?`var(--container-height)`:0},className:tR(`z-10 relative`,{"pointer-events-none":!o}),children:(0,L.jsx)(YF.div,q(K({ref:s,initial:{opacity:0},variants:l,transition:{duration:.4},animate:o?`show`:`hide`,className:tR(`border-brand-black-350 px-[1rem] border-b pb-[1rem]`,r)},D),{children:i}))})});sre.displayName=`WalletHeaderContent`;var xR=b.forwardRef(({accounts:e=[]},t)=>(0,L.jsx)(`div`,{ref:t,className:`flex gap-[0.625rem] items-center`,children:e.length>0?(0,L.jsxs)(b.Fragment,{children:[(0,L.jsx)(`div`,{className:`inline-flex -space-x-[0.3125rem]`,children:e.map((t,n)=>(0,L.jsx)(`div`,{style:{zIndex:e.length-n,position:`relative`},children:(0,L.jsx)(sR,{outline:!0,src:t.wallet.image,alt:t.wallet.name,badgeSrc:t.network.image,badgeAlt:t.network.name,className:`bg-white`})},t.address))}),(0,L.jsxs)(`span`,{className:`flex flex-col whitespace-nowrap`,children:[(0,L.jsx)(`span`,{className:`text-base font-medium h-[1.25rem] text-brand-white-500`,children:e.length>1?(0,L.jsxs)(L.Fragment,{children:[e.length,` wallets`]}):(0,L.jsx)(L.Fragment,{children:rR(e[0]?.address??``)||`--`})}),(0,L.jsx)(`span`,{className:`text-xs text-start h-[1rem] font-medium inline-flex items-center gap-[0.125rem] text-brand-black-100`,children:`Connected`})]})]}):(0,L.jsxs)(`div`,{className:`flex items-center gap-[0.625rem] select-none`,children:[(0,L.jsx)(dR,{disabled:!0,className:`pointer-events-none !text-brand-white-500`,variant:`level_2`,rounded:`full`,size:`sm`,children:(0,L.jsx)(kS,{className:`size-5`})}),(0,L.jsx)(`p`,{className:`text-base font-medium text-brand-white-100`,children:`Select an account`})]})}));xR.displayName=`AccountStack`;var cre=b.forwardRef((e,t)=>{var n=e,{className:r,children:i}=n,a=gS(n,[`className`,`children`]);return(0,L.jsx)(ere,q(K({ref:t,className:tR(`gap-0 pt-3`,r)},a),{children:i}))});cre.displayName=`WalletHeaderTabs`;var lre=b.forwardRef((e,t)=>{var n=e,{className:r,children:i}=n,a=gS(n,[`className`,`children`]);return(0,L.jsx)(nre,q(K({ref:t,className:tR(`flex p-0 bg-transparent gap-[0.5rem] h-auto`,r)},a),{children:i}))});lre.displayName=`WalletHeaderTabsList`;var ure=b.forwardRef((e,t)=>{var n=e,{className:r,children:i}=n,a=gS(n,[`className`,`children`]);return(0,L.jsx)(rre,q(K({ref:t,className:tR(`appearance-none !text-brand-white-500 cursor-pointer text-[0.875rem] font-medium data-[state=inactive]:!text-brand-black-100 data-[state=active]:!text-brand-white-500 !p-[0rem] whitespace-nowrap h-auto bg-transparent border-0 shadow-none`,r)},a),{children:i}))});ure.displayName=`WalletHeaderTabItem`;var dre=b.forwardRef((e,t)=>{var n=e,{className:r,children:i}=n,a=gS(n,[`className`,`children`]);return(0,L.jsx)(tre,q(K({ref:t,className:tR(`gap-[1.5rem] flex flex-col mt-[6px]`,r)},a),{children:i}))});dre.displayName=`WalletHeaderTabsContent`;var fre=b.forwardRef((e,t)=>{var n=e,{className:r,children:i,asChild:a=!1}=n,o=gS(n,[`className`,`children`,`asChild`]);let{show:s,setShow:c}=yR(),l=a?vt:`div`,u=e=>{e?.stopPropagation(),c(!1)};return(0,L.jsxs)(l,q(K({ref:t,className:tR(`relative pt-[1rem] transition-all`,s&&`opacity-15 blur-[2px]`,r)},o),{children:[s&&(0,L.jsx)(`div`,{className:`absolute inset-0 z-10`,onClick:u,onKeyDown:e=>{[`Enter`,` `].includes(e.key)&&u(e)},tabIndex:0,role:`button`,"aria-label":`Close wallet header`}),i]}))});fre.displayName=`WalletHeaderContentBlur`;var pre=new Map(mm.map(e=>[e.stateMachineId,e.explorerUrl])),SR={threshold:`5000`,minBalance:`3000`,redeemOnShutdown:!1},mre=new Map([[`Aave stataUSDC`,{threshold:`20`,minBalance:`10`,redeemOnShutdown:!1}],[`Yield Bearing cNGN`,{threshold:`1000`,minBalance:`1`,redeemOnShutdown:!1}]]);function CR(e,t){return`${e===`threshold`?`Sweep threshold`:`Minimum wallet balance`} (${t})`}function wR(e,t){return e===`threshold`?`When the wallet balance reaches this ${t} amount, Simplex sweeps the funds above the minimum wallet balance into this vault.`:`Simplex never sweeps below this amount. It stays in the wallet as ${t} you can spend at any time; everything above it goes into the vault.${[`USDC`,`USDT`].includes(t)?` ${t} also pays for gas through the paymaster, so keep enough here to cover that.`:``}`}function hre(e,t,n){let r=new Set(e.map(e=>e.key)),i=mm.flatMap(e=>{if(r.has(e.stateMachineId)||n&&e.network!==n)return[];let i=t[e.stateMachineId]??[];return i.length===0?[]:[{key:e.stateMachineId,label:e.label,enabled:!1,vaults:i}]});return[...e.map(e=>({...e,enabled:!0,vaults:t[e.key]??[]})),...i]}function TR(e,t,n){return e.filter(e=>!(e.chain===t&&e.vault.toLowerCase()===n.toLowerCase()))}function gre({address:e}){let[t,n]=(0,b.useState)(!1);return(0,L.jsx)(`button`,{type:`button`,className:`vault-icon-action`,"aria-label":t?`Vault address copied`:`Copy vault address`,title:t?`Copied`:`Copy vault address`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)}).catch(()=>n(!1))},children:t?(0,L.jsx)(Te,{"aria-hidden":`true`}):(0,L.jsx)(R,{"aria-hidden":`true`})})}function ER(e){return mre.get(e.label)??SR}function DR(e){let{label:t,help:n,value:r,onChange:i}=e,a=(0,b.useId)();return(0,L.jsxs)(`div`,{className:`field vault-amount-field`,children:[(0,L.jsxs)(`div`,{className:`field-label vault-field-label`,children:[(0,L.jsx)(`label`,{htmlFor:a,children:t}),(0,L.jsxs)(mR,{children:[(0,L.jsx)(hR,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,className:`vault-info-trigger`,"aria-label":`About ${t}`,children:(0,L.jsx)(SS,{"aria-hidden":`true`})})}),(0,L.jsx)(gR,{className:`simplex-tooltip-content`,sideOffset:7,children:(0,L.jsx)(`p`,{children:n})})]})]}),(0,L.jsx)(`input`,{id:a,type:`text`,inputMode:`decimal`,value:r,onChange:e=>i(e.target.value)})]})}function _re(e){let{row:t,asset:n,onChange:r}=e;return(0,L.jsxs)(`div`,{className:`vault-settings-grid`,children:[(0,L.jsx)(DR,{label:CR(`threshold`,n),help:wR(`threshold`,n),value:t.threshold,onChange:e=>r({threshold:e})}),(0,L.jsx)(DR,{label:CR(`minBalance`,n),help:wR(`minBalance`,n),value:t.minBalance,onChange:e=>r({minBalance:e})}),(0,L.jsxs)(`label`,{className:`vault-redeem-toggle`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:t.redeemOnShutdown,onChange:e=>r({redeemOnShutdown:e.target.checked})}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Redeem on shutdown`}),(0,L.jsx)(`small`,{children:`Return this position to the wallet before Simplex stops.`})]})]})]})}function vre(e){let{chain:t,known:n,row:r,enabled:i,onToggle:a,onChange:o}=e,s=r!==void 0,c=!i&&!s,l=pre.get(t.key);return(0,L.jsxs)(Yv,{className:`vault-item`,"data-selected":s,"data-disabled":c,open:s,children:[(0,L.jsxs)(`div`,{className:`vault-row`,children:[(0,L.jsxs)(`label`,{className:`vault-selection`,title:c?`Enable ${t.label} first`:void 0,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:s,disabled:c,onChange:e=>a(e.target.checked)}),(0,L.jsx)(`span`,{className:`vault-selection-indicator`,"aria-hidden":`true`,children:(0,L.jsx)(Te,{})}),(0,L.jsx)(`span`,{className:`vault-logo-token`,"aria-hidden":`true`,children:(0,L.jsx)(lm,{symbol:n.asset})}),(0,L.jsxs)(`span`,{className:`vault-row-copy`,children:[(0,L.jsx)(`strong`,{children:n.label}),(0,L.jsx)(`small`,{children:n.asset})]})]}),(0,L.jsxs)(`div`,{className:`vault-row-actions`,children:[(0,L.jsx)(gre,{address:n.address}),l&&(0,L.jsx)(`a`,{className:`vault-icon-action`,href:`${l}/address/${n.address}`,target:`_blank`,rel:`noreferrer`,"aria-label":`Open ${n.label} on the block explorer`,title:`Open on block explorer`,children:(0,L.jsx)(ke,{"aria-hidden":`true`})})]})]}),(0,L.jsx)(Zv,{className:`vault-settings-collapsible`,children:r&&(0,L.jsx)(_re,{row:r,asset:n.asset,onChange:o})})]},`${t.key}-${n.address}`)}function yre(e){let{row:t,onConfigure:n,onRemove:r}=e;return(0,L.jsx)(`div`,{className:`vault-item vault-custom-row`,"data-selected":`true`,children:(0,L.jsxs)(`div`,{className:`vault-row`,children:[(0,L.jsxs)(`div`,{className:`vault-selection vault-custom-identity`,children:[(0,L.jsx)(`span`,{className:`vault-logo-token`,"aria-hidden":`true`,children:(0,L.jsx)(lm,{symbol:``})}),(0,L.jsxs)(`span`,{className:`vault-row-copy`,children:[(0,L.jsx)(`strong`,{children:`Custom ERC-4626 vault`}),(0,L.jsxs)(`small`,{children:[t.vault.slice(0,10),`…`]})]})]}),(0,L.jsxs)(`div`,{className:`vault-row-actions vault-custom-actions`,children:[(0,L.jsx)(`button`,{type:`button`,className:`market-configure-button`,onClick:n,children:`Configure`}),(0,L.jsx)(`button`,{type:`button`,className:`vault-icon-action`,"aria-label":`Remove custom vault`,onClick:r,children:(0,L.jsx)(De,{"aria-hidden":`true`})})]})]})})}function bre(e){let{group:t,rows:n,customRows:r,onEnableChain:i,onToggle:a,onChange:o,onConfigureCustom:s,onRemoveCustom:c}=e,l=e=>n.findIndex(n=>n.chain===t.key&&n.vault.toLowerCase()===e.toLowerCase()),u=t.vaults.length+r.length;return(0,L.jsxs)(`section`,{className:`vault-group`,"data-locked":!t.enabled,"aria-label":t.label,children:[(0,L.jsxs)(`header`,{className:`vault-group-head`,children:[(0,L.jsxs)(`div`,{className:`vault-group-identity`,children:[(0,L.jsx)(Ov,{label:t.label}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:t.label}),(0,L.jsxs)(`small`,{children:[u,` `,u===1?`vault`:`vaults`,r.length>0&&` · ${r.length} custom`]})]})]}),(0,L.jsx)(`div`,{className:`vault-group-status`,children:t.enabled?(0,L.jsxs)(`span`,{className:`vault-status-pill`,"data-tone":`ok`,children:[(0,L.jsx)(`span`,{className:`vault-status-dot`,"aria-hidden":`true`}),`Enabled`]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`vault-status-pill`,children:`Not enabled`}),i&&(0,L.jsxs)(`button`,{type:`button`,className:`vault-enable-link`,onClick:()=>i(t),children:[`Enable chain`,(0,L.jsx)(Fe,{"aria-hidden":`true`})]})]})})]}),t.vaults.map(e=>{let r=l(e.address);return(0,L.jsx)(vre,{chain:t,known:e,row:r>=0?n[r]:void 0,enabled:t.enabled,onToggle:t=>a(e,t),onChange:e=>o(r,e)},`${t.key}-${e.address}`)}),r.map(({row:e,index:t})=>(0,L.jsx)(yre,{row:e,onConfigure:()=>s(e,t),onRemove:()=>c(t)},`${e.chain}-${e.vault}-${t}`))]})}function xre(e){let{groups:t,children:n}=e,[r,i]=(0,b.useState)(!1),a=t.reduce((e,t)=>e+t.vaults.length,0);return(0,L.jsxs)(Yv,{className:`vault-others`,open:r,onOpenChange:i,children:[(0,L.jsx)(Xv,{asChild:!0,children:(0,L.jsxs)(`button`,{type:`button`,className:`vault-others-trigger`,children:[(0,L.jsxs)(`span`,{className:`vault-group-identity`,children:[(0,L.jsx)(`span`,{className:`vault-others-logos`,"aria-hidden":`true`,children:t.map(e=>(0,L.jsx)(Ov,{label:e.label},e.key))}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Other networks`}),(0,L.jsxs)(`small`,{children:[t.map(e=>e.label).join(`, `),` · `,a,` curated`,` `,a===1?`vault`:`vaults`]})]})]}),(0,L.jsxs)(`span`,{className:`vault-group-status`,children:[(0,L.jsx)(`span`,{className:`vault-status-pill`,children:`Not enabled`}),(0,L.jsx)(`span`,{className:`vault-others-chevron`,"aria-hidden":`true`,children:(0,L.jsx)(Ee,{})})]})]})}),(0,L.jsx)(Zv,{className:`vault-others-content`,children:n})]})}function Sre(e){let{draft:t,chains:n,onChange:r,onClose:i,onSave:a}=e;return(0,L.jsx)(oS,{open:t!==void 0,onClose:i,title:t?.index===null?`Add a custom vault`:`Configure custom vault`,description:`Connect one ERC-4626 vault for an asset on this chain.`,children:t&&(0,L.jsxs)(`div`,{className:`vault-custom-modal`,children:[(0,L.jsxs)(`div`,{className:`vault-custom-primary-fields`,children:[(0,L.jsx)(hg,{label:`Chain`,value:t.chain,options:n.map(e=>({value:e.key,label:e.label})),onValueChange:e=>r({...t,chain:e})}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label field-label-required-mark`,children:[`Vault address`,` `,(0,L.jsx)(`span`,{className:`field-required-mark`,"aria-hidden":`true`,children:`*`})]}),(0,L.jsx)(`input`,{type:`text`,required:!0,placeholder:`0x…`,value:t.vault,onChange:e=>r({...t,vault:e.target.value})})]})]}),(0,L.jsxs)(`div`,{className:`vault-custom-balance-fields`,children:[(0,L.jsx)(DR,{label:CR(`threshold`,`underlying token`),help:wR(`threshold`,`underlying token`),value:t.threshold,onChange:e=>r({...t,threshold:e})}),(0,L.jsx)(DR,{label:CR(`minBalance`,`underlying token`),help:wR(`minBalance`,`underlying token`),value:t.minBalance,onChange:e=>r({...t,minBalance:e})})]}),(0,L.jsxs)(`label`,{className:`vault-redeem-toggle vault-custom-redeem`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:t.redeemOnShutdown,onChange:e=>r({...t,redeemOnShutdown:e.target.checked})}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Redeem on shutdown`}),(0,L.jsx)(`small`,{children:`Return the position to the wallet before Simplex stops.`})]})]}),(0,L.jsx)(`footer`,{className:`market-dialog-footer market-dialog-footer-end`,children:(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:!t.chain||!t.vault.trim(),onClick:a,children:`Save vault`})})]})})}function OR(e){let{chains:t,knownVaults:n,network:r,onEnableChain:i,rows:a,onChange:o}=e,[s,c]=(0,b.useState)(),l=hre(t,n,r),u=l.filter(e=>e.enabled),d=l.filter(e=>!e.enabled),f=u.flatMap(e=>e.vaults.map(t=>({group:e,known:t}))),p=(e,t)=>a.findIndex(n=>n.chain===e&&n.vault.toLowerCase()===t.toLowerCase()),m=e=>(n[e.chain]??[]).find(t=>t.address.toLowerCase()===e.vault.trim().toLowerCase()),h=(e,t)=>o(a.map((n,r)=>r===e?{...n,...t}:n)),g=f.length>0&&f.every(({group:e,known:t})=>p(e.key,t.address)>=0),_=a.reduce((e,t,n)=>(m(t)||e.push({row:t,index:n}),e),[]),v=new Map;for(let e of _){let t=v.get(e.row.chain)??[];t.push(e),v.set(e.row.chain,t)}let y=[...v.keys()].filter(e=>!l.some(t=>t.key===e)),x=f.reduce((e,{group:t,known:n})=>(p(t.key,n.address)<0&&e.push({chain:t.key,vault:n.address,...ER(n)}),e),[]),S=()=>o(g?f.reduce((e,{group:t,known:n})=>TR(e,t.key,n.address),a):[...a,...x]),C=()=>c({index:null,chain:t[0]?.key??``,vault:``,...SR}),w=()=>{if(!s?.chain||!s.vault.trim())return;let{index:e,...t}={...s,vault:s.vault.trim()};o(e===null?[...a,t]:a.map((n,r)=>r===e?t:n)),c(void 0)},T=e=>(0,L.jsx)(bre,{group:e,rows:a,customRows:v.get(e.key)??[],onEnableChain:i,onToggle:(t,n)=>o(n?[...a,{chain:e.key,vault:t.address,...ER(t)}]:TR(a,e.key,t.address)),onChange:h,onConfigureCustom:(e,t)=>c({...e,index:t}),onRemoveCustom:e=>o(a.filter((t,n)=>n!==e))},e.key);return(0,L.jsxs)(`div`,{className:`vault-editor`,children:[(0,L.jsxs)(`div`,{className:`vault-editor-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{children:`Curated vaults`}),(0,L.jsx)(`p`,{children:`Select a vault on an enabled chain, then set how much stays in the wallet.`})]}),(0,L.jsxs)(`div`,{className:`vault-editor-actions`,children:[f.length>1&&(0,L.jsx)(`button`,{type:`button`,className:`market-text-action`,onClick:S,children:g?`Clear curated vaults`:`Select all`}),(0,L.jsxs)(`button`,{type:`button`,className:`market-create-button`,onClick:C,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),` Custom vault`]})]})]}),(0,L.jsxs)(`div`,{className:`vault-groups`,children:[u.map(T),y.map(e=>T({key:e,label:e,enabled:!1,vaults:[]})),d.length>0&&(0,L.jsx)(xre,{groups:d,children:d.map(T)}),l.length===0&&_.length===0&&(0,L.jsxs)(`div`,{className:`vault-empty-state`,children:[(0,L.jsx)(`strong`,{children:`No curated vaults are available on this network.`}),(0,L.jsx)(`p`,{children:`Add a custom ERC-4626 address if you still want treasury automation.`})]})]}),(0,L.jsx)(Sre,{draft:s,chains:t,onChange:c,onClose:()=>c(void 0),onSave:w})]})}function kR(e){return e.filter(e=>e.vault.trim()).map(e=>({chain:e.chain,vault:e.vault.trim(),...e.threshold.trim()?{threshold:e.threshold.trim()}:{},...e.minBalance.trim()?{minBalance:e.minBalance.trim()}:{},...e.redeemOnShutdown?{redeemOnShutdown:!0}:{}}))}function Cre(e,t){let n=pm(t??0);return(e??[{symbol:n,address:`native`}]).map(e=>e.address===`native`&&e.symbol!==n?{...e,symbol:n}:e)}function wre(e){return e.address===`native`?`${e.symbol} (native)`:e.symbol}function Tre(e,t){if(e.length===0)return`No vaults connected`;let n=[...new Set(e.map(e=>e.chain))].map(e=>{let n=xv(e);return n===null?e:t(n)});return`${e.length} ${e.length===1?`vault`:`vaults`} connected · ${n.join(`, `)}`}function Ere(e){let[t,n]=(0,b.useState)(),[r,i]=(0,b.useState)(),[a,o]=(0,b.useState)(),[s,c]=(0,b.useState)(),{run:l,message:u,error:d}=Ei(),f=(0,b.useRef)(void 0),p=(0,b.useRef)(!1),m=(0,b.useRef)(!1);(0,b.useLayoutEffect)(()=>{f.current=r},[r]);let h=t=>e.chainLabels?.[String(t)]??`chain ${t}`,g=(0,b.useCallback)(async()=>{let e=await ve.get(`/api/config`);n(e),i(t=>t??e.vaults.map(e=>({chain:e.chain,vault:e.vault,threshold:e.threshold??``,minBalance:e.minBalance??``,redeemOnShutdown:e.redeemOnShutdown??!1})))},[]);return Di((0,b.useCallback)(()=>l(g,void 0,`poll`),[l,g])),(0,L.jsxs)(`section`,{className:`operator-section operator-tools`,children:[(0,L.jsxs)(`div`,{className:`operator-section-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Funds`}),(0,L.jsx)(`h2`,{children:`Move and grow liquidity`})]}),(0,L.jsx)(`small`,{children:`Each tool opens in a focused side panel.`})]}),(0,L.jsxs)(`div`,{className:`operator-tool-list`,children:[(0,L.jsx)(Vv,{title:`Send funds`,description:`Transfer native gas tokens or ERC-20 assets from the filler wallet.`,meta:`${e.chains.length} ${e.chains.length===1?`network`:`networks`}`,onClick:()=>o(`send`)}),(0,L.jsx)(Vv,{title:`Vault treasury`,description:`Set sweep thresholds, wallet reserves, and redemption behaviour.`,meta:t?Dre(t):`Optional`,onClick:()=>o(`vaults`)})]}),(0,L.jsx)(Up,{open:a===`send`,onClose:()=>o(void 0),title:`Send funds`,description:`Transfer assets from the filler wallet. Confirm the recipient and network carefully.`,children:(0,L.jsx)(kre,{chains:e.chains,chainLabel:h,sendTokens:t?.sendTokens,balances:e.balances,onSent:e.onBalancesChanged})}),(0,L.jsx)(Up,{open:a===`vaults`,onClose:()=>o(void 0),wide:!0,title:`Vault treasury`,description:`Keep idle liquidity productive while preserving enough wallet balance for fills and gas.`,children:(0,L.jsxs)(`div`,{className:`operator-panel-form vault-panel`,children:[t&&!t.vaultConfigured&&(0,L.jsx)(`p`,{className:`hint`,children:`The filler started without a vault treasury. Vaults saved here are written to the config and activate after a restart.`}),(0,L.jsxs)(`div`,{className:`vault-panel-summary`,children:[(0,L.jsx)(`span`,{className:`vault-panel-stat`,children:Tre(t?.vaults??[],h)}),t?.vaultConfigured&&(0,L.jsxs)(`div`,{className:`vault-editor-actions`,children:[(0,L.jsx)(`button`,{type:`button`,className:`vault-panel-action`,onClick:()=>l(async()=>{c(void 0),c(Ore(await ve.post(`/api/vault/sweep`),h)),await e.onBalancesChanged()},void 0,`vault-sweep`),children:`Sweep now`}),(0,L.jsx)(`button`,{type:`button`,className:`vault-panel-action`,onClick:()=>l(()=>ve.post(`/api/vault/redeem`),`Positions redeemed`),children:`Redeem all`})]})]}),(0,L.jsx)(OR,{chains:e.chains.map(e=>({key:Sv(e),label:h(e)})),knownVaults:t?.knownVaults??{},onEnableChain:()=>{o(void 0),e.onOpenChains()},rows:r??[],onChange:i}),(0,L.jsx)(`div`,{className:`row`,style:{marginTop:`1.25rem`},children:(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:r===void 0,onClick:()=>{if(m.current=!0,!p.current)return p.current=!0,l(async()=>{c(void 0);try{let e,t=!1,n;do{m.current=!1,t=!1;try{e=await ve.put(`/api/vault`,{vaults:kR(f.current??[])}),await g()}catch(e){t=!0,n=e}}while(m.current);if(t)throw n;if(!e)throw Error(`Vault save did not return a result`);if(!e.persisted)throw Error(`Vault changes were applied for this session but could not be saved to the config file`);e.restartNeeded?(c({tone:`warn`,text:`Saved to config — restart the filler to activate the vault treasury`}),P.warning(`Vault settings saved`,{description:`Restart the filler to activate the vault treasury.`})):P.success(`Vault settings saved`)}finally{p.current=!1,m.current=!1}},`Vault treasury updated`,`vault-save`)},children:`Save vaults`})}),s&&(0,L.jsxs)(`p`,{className:s.tone===`warn`?`warning`:`hint`,children:[s.tone===`ok`&&`✓ `,s.text]}),u&&(0,L.jsxs)(`p`,{className:`hint`,children:[`✓ `,u]}),d&&(0,L.jsx)(`p`,{className:`error`,children:d})]})})]})}function Dre(e){return e.vaults.length===0?`Optional`:`${e.vaults.length} ${e.vaults.length===1?`vault`:`vaults`}`}function Ore(e,t){let n=e=>t(xv(e)??e);if(e.submitted.length>0)return{tone:`ok`,text:`Sweep submitted: ${e.submitted.map(e=>`${e.deposits.map(e=>`${e.amount} ${e.symbol}`).join(`, `)} on ${n(e.chain)}`).join(`; `)}`};let r=e.skipped.filter(e=>e.reason===`deposits-closed`);if(r.length>0)return{tone:`warn`,text:`Nothing swept — ${r.map(e=>`the ${e.symbol} vault on ${n(e.chain)} is not accepting deposits right now (wallet ${e.walletBalance} ${e.symbol} is above its ${e.threshold} threshold)`).join(`; `)}. The periodic sweep keeps retrying and deposits as soon as the vault reopens.`};let i=e.skipped.filter(e=>e.reason===`below-threshold`);return i.length>0?{tone:`ok`,text:`Nothing to sweep — ${i.map(e=>`${e.symbol} on ${n(e.chain)} is at ${e.walletBalance} of its ${e.threshold} threshold`).join(`; `)}`}:{tone:`ok`,text:`Nothing to sweep — no vault has a sweep threshold configured`}}function kre(e){let[t,n]=(0,b.useState)(),[r,i]=(0,b.useState)(`native`),[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(``),[l,u]=(0,b.useState)(``),[d,f]=(0,b.useState)(),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(),{run:_,message:v,error:y}=Ei(),x=t??Sv(e.chains[0]??``),S=xv(x),C=Cre(e.sendTokens?.[x],S),w=r===`custom`?a.trim():r,T=C.find(e=>e.address===r)?.symbol??(r===`custom`?`tokens`:r),E=Are(e.balances,x,w),D=!!s.trim()&&/^0x[0-9a-fA-F]{40}$/.test(l.trim())&&w!==``,O=e.chainLabel(S??x),k=()=>{let e=Number.parseFloat(s.trim()),t=E.wallet,n=t===null||!Number.isFinite(e)?null:Math.min(e,t);g({amount:s.trim(),symbol:T,native:w===`native`,chainLabel:O,to:l.trim(),wallet:t,available:E.available,fromWallet:n,fromVault:n===null?null:Math.max(0,e-n),largestVault:E.largestVault})},A=()=>{let t=xv(x),n=t===null?void 0:hm(t)?.explorerUrl;return g(void 0),f(void 0),m(!0),_(async()=>{try{f({...await ve.post(`/api/send`,{chain:x,token:w,amount:s.trim(),to:l.trim()}),explorerUrl:n}),c(``),await e.onSent()}finally{m(!1)}},`Sent`)};return(0,L.jsxs)(`div`,{className:`operator-panel-form`,children:[(0,L.jsx)(`h2`,{children:`Send`}),(0,L.jsx)(`p`,{className:`hint`,children:`Send tokens out of the filler wallet. When the wallet balance falls short, vault holdings of the asset are redeemed to cover the difference. Native gas is required on networks without a paymaster.`}),(0,L.jsxs)(`div`,{className:`operator-send-grid`,children:[(0,L.jsx)(hg,{label:`Network`,value:x,options:e.chains.map(t=>({value:Sv(t),label:e.chainLabel(t)})),onValueChange:e=>{n(e),i(`native`)}}),(0,L.jsx)(hg,{label:`Asset`,value:r,options:[...C.map(e=>({value:e.address,label:wre(e)})),{value:`custom`,label:`Custom address…`,separatorBefore:!0,muted:!0}],onValueChange:i}),r===`custom`&&(0,L.jsxs)(`label`,{className:`field operator-send-wide`,children:[(0,L.jsx)(`span`,{children:`Token contract`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`0x…`,value:a,onChange:e=>o(e.target.value)})]}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[(0,L.jsx)(`span`,{children:`Amount`}),(0,L.jsxs)(`small`,{className:`operator-send-balance`,"data-status":E.status,"aria-live":`polite`,children:[`Available `,(0,L.jsx)(`strong`,{children:E.label})]})]}),(0,L.jsx)(`input`,{type:`text`,placeholder:`0.00`,value:s,onChange:e=>c(e.target.value)})]}),(0,L.jsxs)(`label`,{className:`field operator-send-wide`,children:[(0,L.jsx)(`span`,{children:`Recipient`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`0x…`,value:l,onChange:e=>u(e.target.value)})]}),(0,L.jsx)(`div`,{className:`operator-send-actions operator-send-wide`,children:(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:!D||p,onClick:k,children:p?`Sending…`:`Review transfer`})})]}),d&&(0,L.jsxs)(`p`,{className:`hint`,children:[`✓ Sent`,d.redeemed&&` (topped up from the vault)`,` — tx`,` `,d.explorerUrl?(0,L.jsxs)(`a`,{className:`operator-send-tx-link`,href:`${d.explorerUrl}/tx/${d.txHash}`,target:`_blank`,rel:`noreferrer`,title:d.txHash,"aria-label":`Open transaction ${d.txHash} on the block explorer in a new tab`,children:[(0,L.jsxs)(`span`,{className:`mono`,children:[d.txHash.slice(0,18),`…`]}),(0,L.jsx)(ke,{"aria-hidden":`true`})]}):(0,L.jsxs)(`span`,{className:`mono`,title:d.txHash,children:[d.txHash.slice(0,18),`…`]})]}),v&&!d&&(0,L.jsxs)(`p`,{className:`hint`,children:[`✓ `,v]}),y&&(0,L.jsx)(`p`,{className:`error`,children:y}),h&&(0,L.jsx)(cS,{open:!0,summary:h,sending:p,onConfirm:()=>void A(),onCancel:()=>g(void 0)})]})}var AR={wallet:null,available:null,largestVault:0};function Are(e,t,n){if(!e||e.status===`loading`)return{label:`Loading…`,status:`loading`,...AR};let r=xv(t),i=e.chains.find(e=>e.chainId===r);if(!i)return{label:`Unavailable`,status:`unavailable`,...AR};if(n===`native`)return i.native?{label:`${jR(i.native.amount)} ${i.native.symbol}`,status:`available`,wallet:i.native.amount,available:i.native.amount,largestVault:0}:{label:`Unavailable`,status:`unavailable`,...AR};if(!n)return{label:`—`,status:`loading`,...AR};let a=i.assets.find(e=>e.address.toLowerCase()===n.toLowerCase());return a?.available===null||a?.available===void 0?{label:`Unavailable`,status:`unavailable`,...AR}:{label:`${jR(a.available)} ${a.symbol}`,status:`available`,wallet:a.wallet,available:a.available,largestVault:a.vaults.reduce((e,t)=>Math.max(e,t.available),0)}}function jR(e){return e.toLocaleString(void 0,{maximumFractionDigits:4})}var jre={send:`Send`,sweep:`Vault sweep`,redeem:`Vault redeem`,fill:`Order fill`},MR=[{value:`all`,label:`All`},{value:`fill`,label:`Fills`},{value:`send`,label:`Sends`},{value:`sweep`,label:`Sweeps`},{value:`redeem`,label:`Redeems`}],NR=20;function Mre({kind:e}){return(0,L.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,L.jsx)(`path`,{d:{fill:`M4 2.5h8v11l-2-1.3-2 1.3-2-1.3-2 1.3v-11ZM6 6h4M6 8.5h4`,sweep:`M8 13.5v-8m0 0 3 3m-3-3-3 3M3 2.5h10`,redeem:`M8 2.5v8m0 0 3-3m-3 3-3-3M3 13.5h10`,send:`M3.5 12.5 12.5 3.5m0 0H6m6.5 0V10`}[e]})})}function Nre(e){let{leg:t,sign:n}=e,r=t.decimals===null?vm(t.amount):_m(t.amount,t.decimals);return(0,L.jsxs)(`span`,{className:`ledger-delta`,"data-sign":n,title:`${t.decimals===null?t.amount:_m(t.amount,t.decimals,t.decimals)} ${t.symbol}`,children:[(0,L.jsxs)(`span`,{className:`ledger-token`,"data-vault":t.vault||void 0,"aria-hidden":`true`,children:[(0,L.jsx)(lm,{symbol:t.icon,size:`sm`}),t.vault&&(0,L.jsx)(`svg`,{className:`ledger-vault-badge`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`path`,{d:`M2.5 6.5 8 3l5.5 3.5H2.5ZM4 6.5v5M8 6.5v5M12 6.5v5M2.5 13.5h11`})})]}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`span`,{className:`ledger-delta-sign`,children:n===`in`?`+`:`−`}),r,` `,t.symbol]})]})}function PR(e){let{leg:t,sign:n,note:r}=e;return t?(0,L.jsxs)(`span`,{className:`ledger-move`,children:[(0,L.jsx)(Nre,{leg:t,sign:n}),r&&(0,L.jsx)(`span`,{className:`ledger-counterparty`,children:r})]}):(0,L.jsx)(`span`,{className:`ledger-quiet`,children:r??`—`})}function FR(e){return e.kind!==`send`||!e.to?null:`to ${wm(e.to)}`}function Pre(e){let{tx:t}=e,n=t.chainId===null?void 0:hm(t.chainId)?.explorerUrl;return n?(0,L.jsx)(`span`,{className:`history-links ledger-links`,children:(0,L.jsx)(`a`,{href:`${n}/tx/${t.txHash}`,target:`_blank`,rel:`noreferrer`,title:`View ${wm(t.txHash,8,4)} on the block explorer`,"aria-label":`View transaction on the block explorer`,children:(0,L.jsx)(ke,{"aria-hidden":`true`})})}):(0,L.jsx)(B,{value:t.txHash,chars:14})}function Fre(e){let[t,n]=(0,b.useState)(),[r,i]=(0,b.useState)(),[a,o]=(0,b.useState)(`all`),[s,c]=(0,b.useState)(1);Di((0,b.useCallback)(async()=>{try{n((await ve.get(`/api/wallet/history?limit=200`)).txs),i(void 0)}catch(e){i(e instanceof Error?e.message:String(e))}},[]),3e4);let l=t=>t===null?`—`:e.chainLabels?.[String(t)]??`chain ${t}`,u=(t??[]).filter(e=>a===`all`||e.kind===a),d=Math.max(1,Math.ceil(u.length/NR)),f=Math.min(s,d),p=u.slice((f-1)*NR,f*NR),m=(t?.length??0)>0;return(0,L.jsxs)(`div`,{className:`operator-page-content`,children:[(0,L.jsx)(Ere,{chains:e.chains,chainLabels:e.chainLabels,balances:e.balances,onBalancesChanged:e.onBalancesChanged,onOpenChains:e.onOpenChains}),(0,L.jsxs)(`section`,{className:`operator-section`,children:[(0,L.jsxs)(`div`,{className:`operator-section-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Ledger`}),(0,L.jsx)(`h2`,{children:`Transaction history`})]}),(0,L.jsx)(`small`,{children:t?a===`all`?`${t.length} recorded`:`${u.length} of ${t.length} recorded`:`Loading`})]}),m&&(0,L.jsx)(ky,{options:MR,value:a,ariaLabel:`Filter by action`,onChange:e=>{o(e),c(1)}}),t?.length===0&&(0,L.jsx)(`p`,{className:`operator-empty`,children:`No transactions recorded yet.`}),t&&t.length>0&&u.length===0&&(0,L.jsxs)(`p`,{className:`operator-empty`,children:[`No `,MR.find(e=>e.value===a)?.label.toLowerCase(),` recorded yet.`]}),u.length>0&&(0,L.jsx)(`div`,{className:`history-table-scroll`,children:(0,L.jsxs)(`table`,{className:`history-table ledger-table`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{children:`Action`}),(0,L.jsx)(`th`,{children:`Amount in`}),(0,L.jsx)(`th`,{children:`Amount out`}),(0,L.jsx)(`th`,{children:`Chain`}),(0,L.jsx)(`th`,{children:`Tx`}),(0,L.jsx)(`th`,{children:`Time`})]})}),(0,L.jsx)(`tbody`,{children:p.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{"data-label":`Action`,"data-field":`action`,children:(0,L.jsxs)(`span`,{className:`ledger-action`,"data-kind":e.kind,children:[(0,L.jsx)(`span`,{className:`ledger-icon`,"aria-hidden":`true`,children:(0,L.jsx)(Mre,{kind:e.kind})}),(0,L.jsx)(`span`,{className:`ledger-action-copy`,children:(0,L.jsx)(`strong`,{children:jre[e.kind]})})]})}),(0,L.jsx)(`td`,{"data-label":`Amount in`,"data-field":`amount-in`,children:(0,L.jsx)(PR,{leg:e.in,sign:`in`,note:e.kind===`redeem`?FR(e):null})}),(0,L.jsx)(`td`,{"data-label":`Amount out`,"data-field":`amount-out`,children:(0,L.jsx)(PR,{leg:e.out,sign:`out`,note:e.kind===`redeem`?null:FR(e)})}),(0,L.jsx)(`td`,{"data-label":`Chain`,"data-field":`chain`,children:e.chainId===null?(0,L.jsx)(`span`,{className:`ledger-quiet`,children:`—`}):(0,L.jsxs)(`span`,{className:`ledger-chain`,children:[(0,L.jsx)(Ov,{label:l(e.chainId)}),(0,L.jsx)(`span`,{children:l(e.chainId)})]})}),(0,L.jsx)(`td`,{"data-label":`Transaction`,"data-field":`tx`,children:(0,L.jsx)(Pre,{tx:e})}),(0,L.jsx)(`td`,{"data-label":`Time`,"data-field":`time`,children:(0,L.jsxs)(`span`,{className:`history-time`,children:[(0,L.jsx)(`strong`,{children:xm(e.ts)}),(0,L.jsx)(`small`,{children:Sm(e.ts)})]})})]},e.id))})]})}),u.length>0&&(0,L.jsx)(im,{page:f,pageSize:NR,total:u.length,noun:`transactions`,onPage:c})]}),r&&(0,L.jsx)(`p`,{className:`error`,children:r})]})}var Ire=[{value:`overview`,label:`Overview`,description:`Health and liquidity`,icon:Ae},{value:`limit-orders`,label:`Limit orders`,description:`What you are offering`,icon:we},{value:`orders`,label:`Orders`,description:`History and bids`,icon:z},{value:`wallet`,label:`Wallet`,description:`Funds and history`,icon:je},{value:`logs`,label:`Logs`,description:`Live filler output`,icon:Ne,desktopOnly:!0},{value:`operations`,label:`Operations`,description:`Live configuration`,icon:Me}],Lre={overview:{eyebrow:`Live workspace`,title:`Overview`,description:`Monitor liquidity, market coverage, and the health of your running filler.`},"limit-orders":{eyebrow:`Your book`,title:`Limit orders`,description:`Post what simplex will pay, and watch what is left of each order as fills draw it down.`},orders:{eyebrow:`Execution feed`,title:`Orders`,description:`Follow orders from detection through bidding and execution.`},wallet:{eyebrow:`Treasury`,title:`Wallet`,description:`Move funds, put idle liquidity to work, and review what the filler wallet has submitted.`},logs:{eyebrow:`Diagnostics`,title:`Logs`,description:`Everything the filler has logged since launch. The level sets what it records.`},operations:{eyebrow:`Operator tools`,title:`Operations`,description:`Maintain live configuration without crowding the dashboard.`}};function IR(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60);return t>0?`${t}h ${n}m`:`${n}m ${e%60}s`}function Rre(e){let{status:t,refresh:n}=e,[r,i]=xe(),a=Mi(),[o,s]=(0,b.useState)(),[c,l]=(0,b.useState)(),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(),[m,h]=(0,b.useState)(!1),{run:g,pending:_,error:v}=Ei(),y=Lre[r];(0,b.useEffect)(()=>{a&&r===`logs`&&i(`overview`,{replace:!0})},[a,r,i]);let x=(0,b.useCallback)(async()=>{try{let[e]=await Promise.all([ve.get(`/api/balances`),n()]);l(e),p(void 0)}catch(e){p(e instanceof Error?e.message:String(e))}},[n]);return Di(x,3e4),m?(0,L.jsxs)(`div`,{className:`card`,children:[(0,L.jsx)(`h2`,{children:`Filler stopping`}),(0,L.jsx)(`p`,{className:`hint`,children:"In-flight fills are draining and the process will exit. Restart it with `simplex run` — a persisted pause state is honored on the next boot."})]}):(0,L.jsxs)(`div`,{className:`operator-shell`,children:[(0,L.jsxs)(`header`,{className:`operator-brandbar`,children:[(0,L.jsxs)(`div`,{className:`operator-brand`,children:[(0,L.jsx)(`img`,{className:`hyperfx-logo`,src:Se,alt:`HyperFX`}),(0,L.jsx)(`span`,{children:`Simplex`})]}),(0,L.jsxs)(`button`,{type:`button`,className:`operator-environment-trigger`,onClick:()=>d(!0),children:[(0,L.jsx)(`span`,{className:`operator-status-dot ${t.paused?`warn`:``}`}),(0,L.jsx)(`span`,{children:t.paused?`Filling paused`:`Filler running`}),(0,L.jsx)(Pe,{"aria-hidden":`true`})]})]}),(0,L.jsxs)(`div`,{className:`operator-layout`,children:[(0,L.jsxs)(`aside`,{className:`operator-sidebar`,"aria-label":`Dashboard navigation`,children:[(0,L.jsxs)(`nav`,{children:[Ire.filter(e=>!(e.desktopOnly&&a)).map(e=>{let t=e.icon;return(0,L.jsxs)(`button`,{type:`button`,className:`operator-nav-item`,"data-active":r===e.value||void 0,onClick:()=>i(e.value),children:[(0,L.jsx)(t,{"aria-hidden":`true`}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:e.label}),(0,L.jsx)(`small`,{children:e.description})]})]},e.value)}),(0,L.jsx)(rm,{variant:`nav`})]}),(0,L.jsxs)(`div`,{className:`operator-sidebar-footer`,children:[(0,L.jsxs)(`span`,{children:[`Version `,t.version]}),(0,L.jsxs)(`span`,{children:[`Up `,IR(t.uptimeSec)]})]})]}),(0,L.jsxs)(`main`,{className:`operator-main`,"data-tab":r,children:[(0,L.jsx)(`header`,{className:`operator-page-header`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:y.eyebrow}),(0,L.jsx)(`h1`,{children:y.title}),(0,L.jsx)(`p`,{children:y.description})]})}),r===`overview`?(0,L.jsx)(iS,{status:t,balances:c,onResetHalt:()=>g(async()=>{await ve.post(`/api/reset-halt`),n()}),runtime:{pending:_,onTogglePause:()=>g(async()=>{await ve.post(t.paused?`/api/resume`:`/api/pause`),n()}),onStop:()=>{if(window.confirm(`Stop the filler? In-flight fills drain, vault positions may unwind, and the process exits.`))return g(async()=>{await ve.post(`/api/stop`),h(!0)})}}}):null,r===`limit-orders`?(0,L.jsx)(jg,{chains:t.chains,chainLabels:t.chainLabels}):null,r===`orders`?(0,L.jsx)(Aee,{chainLabels:t.chainLabels}):null,r===`logs`&&!a?(0,L.jsx)(ib,{}):null,r===`wallet`?(0,L.jsx)(Fre,{chains:t.chains,chainLabels:t.chainLabels,balances:c,onBalancesChanged:x,onOpenChains:()=>{s(`chains`),i(`operations`)}}):null,r===`operations`?(0,L.jsx)(Hy,{chains:t.chains,initialPanel:o,onInitialPanelShown:()=>s(void 0)}):null,v??f?(0,L.jsx)(`p`,{className:`error`,children:v??f}):null]})]}),(0,L.jsxs)(Up,{open:u,onClose:()=>d(!1),title:`Environment`,description:`Runtime identity and the local configuration used by this filler.`,children:[(0,L.jsxs)(`div`,{className:`operator-detail-list`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`Status`}),(0,L.jsx)(`strong`,{className:t.paused?`text-warn`:`text-ok`,children:t.paused?`Filling paused`:`Running normally`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`Uptime`}),(0,L.jsx)(`strong`,{children:IR(t.uptimeSec)})]})]}),t.addresses?(0,L.jsxs)(`div`,{className:`operator-identity-list`,children:[(0,L.jsx)(LR,{label:`Filler wallet`,value:t.addresses.evm}),t.addresses.substrate?(0,L.jsx)(LR,{label:`Hyperbridge account`,value:t.addresses.substrate}):null]}):null,t.configPath?(0,L.jsxs)(`div`,{className:`operator-config-block`,children:[(0,L.jsx)(`span`,{children:`Configuration file`}),(0,L.jsx)(`code`,{children:t.configPath})]}):null]})]})}function LR(e){return(0,L.jsxs)(`div`,{className:`operator-identity-row`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`code`,{children:(0,L.jsx)(B,{value:e.value,chars:64})})]})}function zre(e,t){let n=zx(e);return Hx(n)?!0:Object.keys(t??{}).some(e=>zx(e)===n)}function Bre(e,t){if(!Array.isArray(e)||e.length===0)throw Error(`pairs: at least one [[pairs]] entry is required`);let n=new Set;for(let r of e){if(!r.token0||!r.token1)throw Error(`pairs: each entry needs 'token0' and 'token1' symbols`);let e=zx(r.token0),i=zx(r.token1),a=`${e}/${i}`;if(n.has(a))throw Error(`pairs.${a}: pair is declared twice`);if(n.has(`${i}/${e}`))throw Error(`pairs.${a}: ${i}/${e} is already declared — a market has one orientation, and a limit order on either side trades it`);n.add(a);for(let n of[e,i])if(!zre(n,t))throw Error(`pairs.${a}: unknown symbol '${n}' — the registry ships ${Vx().join(`, `)}; anything else needs an [assets.${n}] entry`)}}var RR={silent:-1/0,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:1/0},zR={silent:{level:-1},fatal:{level:RR.fatal},error:{level:RR.error},warn:{level:RR.warn},log:{level:RR.log},info:{level:RR.info},success:{level:RR.success},fail:{level:RR.fail},ready:{level:RR.info},start:{level:RR.info},box:{level:RR.info},debug:{level:RR.debug},trace:{level:RR.trace},verbose:{level:RR.verbose}};function BR(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function VR(e,t,n=`.`,r){if(!BR(t))return VR(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:BR(a)&&BR(i[t])?i[t]=VR(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Vre(e){return(...t)=>t.reduce((t,n)=>VR(t,n,``,e),{})}var Hre=Vre();function Ure(e){return Object.prototype.toString.call(e)===`[object Object]`}function Wre(e){return!(!Ure(e)||!e.message&&!e.args||e.stack)}var HR=!1,UR=[],WR=class e{options;_lastLog;_mockFn;constructor(e={}){let t=e.types||zR;this.options=Hre({...e,defaults:{...e.defaults},level:GR(e.level,t),reporters:[...e.reporters||[]]},{types:zR,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let e in t){let n={type:e,...this.options.defaults,...t[e]};this[e]=this._wrapLogFn(n),this[e].raw=this._wrapLogFn(n,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=GR(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw Error(`prompt is not supported!`);return this.options.prompt(e,t)}create(t){let n=new e({...this.options,...t});return this._mockFn&&n.mockTypes(this._mockFn),n}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+`:`+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){let t=this.options.reporters.indexOf(e);if(t!==-1)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let e in this.options.types)console[`__`+e]||(console[`__`+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(let e in this.options.types)console[`__`+e]&&(console[e]=console[`__`+e],delete console[`__`+e])}wrapStd(){this._wrapStream(this.options.stdout,`log`),this._wrapStream(this.options.stderr,`log`)}_wrapStream(e,t){e&&(e.__write||=e.write,e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){HR=!0}resumeLogs(){HR=!1;let e=UR.splice(0);for(let t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){let t=e||this.options.mockFn;if(this._mockFn=t,typeof t==`function`)for(let e in this.options.types)this[e]=t(e,this.options.types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...n)=>{if(HR){UR.push([this,e,n,t]);return}return this._logFn(e,n,t)}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;let r={date:new Date,args:[],...e,level:GR(e.level,this.options.types)};!n&&t.length===1&&Wre(t[0])?Object.assign(r,t[0]):r.args=[...t],r.message&&(r.args.unshift(r.message),delete r.message),r.additional&&(Array.isArray(r.additional)||(r.additional=r.additional.split(`
|
|
71
|
-
`)),r.args.push(`
|
|
72
|
-
`+r.additional.join(`
|
|
73
|
-
`)),delete r.additional),r.type=typeof r.type==`string`?r.type.toLowerCase():`log`,r.tag=typeof r.tag==`string`?r.tag:``;let i=(e=!1)=>{let t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){let e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);let a=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,a<this.options.throttle)try{let e=JSON.stringify([r.type,r.tag,r.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(i,this.options.throttle);return}}catch{}i(!0)}_log(e){for(let t of this.options.reporters)t.log(e,{options:this.options})}};function GR(e,t={},n=3){return e===void 0?n:typeof e==`number`?e:t[e]&&t[e].level!==void 0?t[e].level:n}WR.prototype.add=WR.prototype.addReporter,WR.prototype.remove=WR.prototype.removeReporter,WR.prototype.clear=WR.prototype.removeReporter,WR.prototype.withScope=WR.prototype.withTag,WR.prototype.mock=WR.prototype.mockTypes,WR.prototype.pause=WR.prototype.pauseLogs,WR.prototype.resume=WR.prototype.resumeLogs;function Gre(e={}){return new WR(e)}var Kre=class{options;defaultColor;levelColorMap;typeColorMap;constructor(e){this.options={...e},this.defaultColor=`#7f8c8d`,this.levelColorMap={0:`#c0392b`,1:`#f39c12`,3:`#00BCD4`},this.typeColorMap={success:`#2ecc71`}}_getLogFn(e){return e<1?console.__error||console.error:e===1?console.__warn||console.warn:console.__log||console.log}log(e){let t=this._getLogFn(e.level),n=e.type===`log`?``:e.type,r=e.tag||``,i=`
|
|
74
|
-
background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};
|
|
75
|
-
border-radius: 0.5em;
|
|
76
|
-
color: white;
|
|
77
|
-
font-weight: bold;
|
|
78
|
-
padding: 2px 0.5em;
|
|
79
|
-
`,a=`%c${[r,n].filter(Boolean).join(`:`)}`;typeof e.args[0]==`string`?t(`${a}%c ${e.args[0]}`,i,``,...e.args.slice(1)):t(a,i,...e.args)}};function KR(e={}){return Gre({reporters:e.reporters||[new Kre({})],prompt(e,t={}){return t.type===`confirm`?Promise.resolve(confirm(e)):Promise.resolve(prompt(e))},...e})}KR();var qre=`1.2.3`,qR=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof e&&n.cause.docsPath||n.docsPath,a=[t||`An error occurred.`,``,...n.metaMessages?[...n.metaMessages,``]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${qre}`].join(`
|
|
80
|
-
`);super(a),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=t}};function JR(e,t){return e.exec(t)?.groups}var YR=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,XR=/^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)?$/,ZR=/^\(.+?\).*?$/,QR=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Jre(e){return QR.test(e)}function Yre(e){return JR(QR,e)}var $R=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Xre(e){return $R.test(e)}function Zre(e){return JR($R,e)}var ez=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function Qre(e){return ez.test(e)}function $re(e){return JR(ez,e)}var tz=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function nz(e){return tz.test(e)}function eie(e){return JR(tz,e)}var rz=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function tie(e){return rz.test(e)}function nie(e){return JR(rz,e)}var iz=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function rie(e){return iz.test(e)}function iie(e){return JR(iz,e)}var aie=/^receive\(\) external payable$/;function oie(e){return aie.test(e)}var sie=new Set([`indexed`]),az=new Set([`calldata`,`memory`,`storage`]),oz=class extends qR{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`})}},sz=class extends qR{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`})}},cz=class extends qR{constructor({param:e}){super(`Invalid ABI parameter.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`InvalidParameterError`})}},lz=class extends qR{constructor({param:e,name:t}){super(`Invalid ABI parameter.`,{details:e,metaMessages:[`"${t}" 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`})}},uz=class extends qR{constructor({param:e,type:t,modifier:n}){super(`Invalid ABI parameter.`,{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:``}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`InvalidModifierError`})}},dz=class extends qR{constructor({param:e,type:t,modifier:n}){super(`Invalid ABI parameter.`,{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:``}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`InvalidFunctionModifierError`})}},fz=class extends qR{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`})}},pz=class extends qR{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`InvalidSignatureError`})}},mz=class extends qR{constructor({signature:e}){super(`Unknown signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`UnknownSignatureError`})}},hz=class extends qR{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`})}},gz=class extends qR{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`})}},_z=class extends qR{constructor({current:e,depth:t}){super(`Unbalanced parentheses.`,{metaMessages:[`"${e.trim()}" has too many ${t>0?`opening`:`closing`} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`InvalidParenthesisError`})}};function vz(e,t,n){let r=``;if(n)for(let e of Object.entries(n)){if(!e)continue;let t=``;for(let n of e[1])t+=`[${n.type}${n.name?`:${n.name}`:``}]`;r+=`(${e[0]}{${t}})`}return t?`${t}:${e}${r}`:`${e}${r}`}var yz=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 bz(e,t={}){if(Qre(e))return xz(e,t);if(Xre(e))return Sz(e,t);if(Jre(e))return Cz(e,t);if(tie(e))return wz(e,t);if(rie(e))return Tz(e);if(oie(e))return{type:`receive`,stateMutability:`payable`};throw new mz({signature:e})}function xz(e,t={}){let n=$re(e);if(!n)throw new pz({signature:e,type:`function`});let r=Az(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(kz(r[e],{modifiers:az,structs:t,type:`function`}));let o=[];if(n.returns){let e=Az(n.returns),r=e.length;for(let n=0;n<r;n++)o.push(kz(e[n],{modifiers:az,structs:t,type:`function`}))}return{name:n.name,type:`function`,stateMutability:n.stateMutability??`nonpayable`,inputs:i,outputs:o}}function Sz(e,t={}){let n=Zre(e);if(!n)throw new pz({signature:e,type:`event`});let r=Az(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(kz(r[e],{modifiers:sie,structs:t,type:`event`}));return{name:n.name,type:`event`,inputs:i}}function Cz(e,t={}){let n=Yre(e);if(!n)throw new pz({signature:e,type:`error`});let r=Az(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(kz(r[e],{structs:t,type:`error`}));return{name:n.name,type:`error`,inputs:i}}function wz(e,t={}){let n=nie(e);if(!n)throw new pz({signature:e,type:`constructor`});let r=Az(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(kz(r[e],{structs:t,type:`constructor`}));return{type:`constructor`,stateMutability:n.stateMutability??`nonpayable`,inputs:i}}function Tz(e){let t=iie(e);if(!t)throw new pz({signature:e,type:`fallback`});return{type:`fallback`,stateMutability:t.stateMutability??`nonpayable`}}var Ez=/^(?<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$_]*))?$/,Dz=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Oz=/^u?int$/;function kz(e,t){let n=vz(e,t?.type,t?.structs);if(yz.has(n))return yz.get(n);let r=ZR.test(e),i=JR(r?Dz:Ez,e);if(!i)throw new cz({param:e});if(i.name&&Nz(i.name))throw new lz({param:e,name:i.name});let a=i.name?{name:i.name}:{},o=i.modifier===`indexed`?{indexed:!0}:{},s=t?.structs??{},c,l={};if(r){c=`tuple`;let e=Az(i.type),t=[],n=e.length;for(let r=0;r<n;r++)t.push(kz(e[r],{structs:s}));l={components:t}}else if(i.type in s)c=`tuple`,l={components:s[i.type]};else if(Oz.test(i.type))c=`${i.type}256`;else if(i.type===`address payable`)c=`address`;else if(c=i.type,t?.type!==`struct`&&!jz(c))throw new sz({type:c});if(i.modifier){if(!t?.modifiers?.has?.(i.modifier))throw new uz({param:e,type:t?.type,modifier:i.modifier});if(az.has(i.modifier)&&!Pz(c,!!i.array))throw new dz({param:e,type:t?.type,modifier:i.modifier})}let u={type:`${c}${i.array??``}`,...a,...o,...l};return yz.set(n,u),u}function Az(e,t=[],n=``,r=0){let i=e.trim().length;for(let a=0;a<i;a++){let i=e[a],o=e.slice(a+1);switch(i){case`,`:return r===0?Az(o,[...t,n.trim()]):Az(o,t,`${n}${i}`,r);case`(`:return Az(o,t,`${n}${i}`,r+1);case`)`:return Az(o,t,`${n}${i}`,r-1);default:return Az(o,t,`${n}${i}`,r)}}if(n===``)return t;if(r!==0)throw new _z({current:n,depth:r});return t.push(n.trim()),t}function jz(e){return e===`address`||e===`bool`||e===`function`||e===`string`||YR.test(e)||XR.test(e)}var Mz=/^(?: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 Nz(e){return e===`address`||e===`bool`||e===`function`||e===`string`||e===`tuple`||YR.test(e)||XR.test(e)||Mz.test(e)}function Pz(e,t){return t||e===`bytes`||e===`string`||e===`tuple`}function Fz(e){let t={},n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!nz(n))continue;let i=eie(n);if(!i)throw new pz({signature:n,type:`struct`});let a=i.properties.split(`;`),o=[],s=a.length;for(let e=0;e<s;e++){let t=a[e].trim();if(!t)continue;let n=kz(t,{type:`struct`});o.push(n)}if(!o.length)throw new hz({signature:n});t[i.name]=o}let r={},i=Object.entries(t),a=i.length;for(let e=0;e<a;e++){let[n,a]=i[e];r[n]=Lz(a,t)}return r}var Iz=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Lz(e=[],t={},n=new Set){let r=[],i=e.length;for(let a=0;a<i;a++){let i=e[a];if(ZR.test(i.type))r.push(i);else{let e=JR(Iz,i.type);if(!e?.type)throw new fz({abiParameter:i});let{array:a,type:o}=e;if(o in t){if(n.has(o))throw new gz({type:o});r.push({...i,type:`tuple${a??``}`,components:Lz(t[o],t,new Set([...n,o]))})}else if(jz(o))r.push(i);else throw new oz({type:o})}}return r}function Rz(e){let t=Fz(e),n=[],r=e.length;for(let i=0;i<r;i++){let r=e[i];nz(r)||n.push(bz(r,t))}return n}function zz(e,{strict:t=!0}={}){return!e||typeof e!=`string`?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith(`0x`)}function Bz(e){return zz(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var Vz=`2.47.6`,Hz={getDocsUrl:({docsBaseUrl:e,docsPath:t=``,docsSlug:n})=>t?`${e??`https://viem.sh`}${t}${n?`#${n}`:``}`:void 0,version:`viem@${Vz}`},Uz=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof e&&n.cause.docsPath||n.docsPath,a=Hz.getDocsUrl?.({...n,docsPath:i}),o=[t||`An error occurred.`,``,...n.metaMessages?[...n.metaMessages,``]:[],...a?[`Docs: ${a}`]:[],...r?[`Details: ${r}`]:[],...Hz.version?[`Version: ${Hz.version}`]:[]].join(`
|
|
81
|
-
`);super(o,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=t,this.version=Vz}walk(e){return Wz(this,e)}};function Wz(e,t){return t?.(e)?e:e&&typeof e==`object`&&`cause`in e&&e.cause!==void 0?Wz(e.cause,t):t?null:e}var Gz=class extends Uz{constructor({offset:e,position:t,size:n}){super(`Slice ${t===`start`?`starting`:`ending`} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:`SliceOffsetOutOfBoundsError`})}},Kz=class extends Uz{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:`SizeExceedsPaddingSizeError`})}};function qz(e,{dir:t,size:n=32}={}){return typeof e==`string`?Jz(e,{dir:t,size:n}):Yz(e,{dir:t,size:n})}function Jz(e,{dir:t,size:n=32}={}){if(n===null)return e;let r=e.replace(`0x`,``);if(r.length>n*2)throw new Kz({size:Math.ceil(r.length/2),targetSize:n,type:`hex`});return`0x${r[t===`right`?`padEnd`:`padStart`](n*2,`0`)}`}function Yz(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Kz({size:e.length,targetSize:n,type:`bytes`});let r=new Uint8Array(n);for(let i=0;i<n;i++){let a=t===`right`;r[a?i:n-i-1]=e[a?i:e.length-i-1]}return r}var Xz=class extends Uz{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${r*8}-bit ${n?`signed`:`unsigned`} `:``}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:`IntegerOutOfRangeError`})}},Zz=class extends Uz{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:`SizeOverflowError`})}};function Qz(e,{dir:t=`left`}={}){let n=typeof e==`string`?e.replace(`0x`,``):e,r=0;for(let e=0;e<n.length-1&&n[t===`left`?e:n.length-e-1].toString()===`0`;e++)r++;return n=t===`left`?n.slice(r):n.slice(0,n.length-r),typeof e==`string`?(n.length===1&&t===`right`&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function $z(e,{size:t}){if(Bz(e)>t)throw new Zz({givenSize:Bz(e),maxSize:t})}function eB(e,t={}){let{signed:n}=t;t.size&&$z(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2;return r<=(1n<<BigInt(i)*8n-1n)-1n?r:r-BigInt(`0x${`f`.padStart(i*2,`f`)}`)-1n}function tB(e,t={}){let n=eB(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Xz({max:`${2**53-1}`,min:`${-(2**53-1)}`,signed:t.signed,size:t.size,value:`${n}n`});return r}var nB=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function rB(e,t={}){return typeof e==`number`||typeof e==`bigint`?oB(e,t):typeof e==`string`?cB(e,t):typeof e==`boolean`?iB(e,t):aB(e,t)}function iB(e,t={}){let n=`0x${Number(e)}`;return typeof t.size==`number`?($z(n,{size:t.size}),qz(n,{size:t.size})):n}function aB(e,t={}){let n=``;for(let t=0;t<e.length;t++)n+=nB[e[t]];let r=`0x${n}`;return typeof t.size==`number`?($z(r,{size:t.size}),qz(r,{dir:`right`,size:t.size})):r}function oB(e,t={}){let{signed:n,size:r}=t,i=BigInt(e),a;r?a=n?(1n<<BigInt(r)*8n-1n)-1n:2n**(BigInt(r)*8n)-1n:typeof e==`number`&&(a=BigInt(2**53-1));let o=typeof a==`bigint`&&n?-a-1n:0;if(a&&i>a||i<o){let t=typeof e==`bigint`?`n`:``;throw new Xz({max:a?`${a}${t}`:void 0,min:`${o}${t}`,signed:n,size:r,value:`${e}${t}`})}let s=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?qz(s,{size:r}):s}var sB=new TextEncoder;function cB(e,t={}){return aB(sB.encode(e),t)}var lB=new TextEncoder;function uB(e,t={}){return typeof e==`number`||typeof e==`bigint`?hB(e,t):typeof e==`boolean`?dB(e,t):zz(e)?mB(e,t):gB(e,t)}function dB(e,t={}){let n=new Uint8Array(1);return n[0]=Number(e),typeof t.size==`number`?($z(n,{size:t.size}),qz(n,{size:t.size})):n}var fB={zero:48,nine:57,A:65,F:70,a:97,f:102};function pB(e){if(e>=fB.zero&&e<=fB.nine)return e-fB.zero;if(e>=fB.A&&e<=fB.F)return e-(fB.A-10);if(e>=fB.a&&e<=fB.f)return e-(fB.a-10)}function mB(e,t={}){let n=e;t.size&&($z(n,{size:t.size}),n=qz(n,{dir:`right`,size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);let i=r.length/2,a=new Uint8Array(i);for(let e=0,t=0;e<i;e++){let n=pB(r.charCodeAt(t++)),i=pB(r.charCodeAt(t++));if(n===void 0||i===void 0)throw new Uz(`Invalid byte sequence ("${r[t-2]}${r[t-1]}" in "${r}").`);a[e]=n*16+i}return a}function hB(e,t){return mB(oB(e,t))}function gB(e,t={}){let n=lB.encode(e);return typeof t.size==`number`?($z(n,{size:t.size}),qz(n,{dir:`right`,size:t.size})):n}function _B(e,t){let n=t||`hex`,r=bx(zz(e,{strict:!1})?uB(e):e);return n===`bytes`?r:rB(r)}var vB=class extends Uz{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:[`- Address must be a hex value of 20 bytes (40 hex characters).`,`- Address must match its checksum counterpart.`],name:`InvalidAddressError`})}},yB=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,t)),t}set(e,t){if(super.has(e)&&super.delete(e),super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=super.keys().next().value;e!==void 0&&super.delete(e)}return this}},bB=new yB(8192);function xB(e,t){if(bB.has(`${e}.${t}`))return bB.get(`${e}.${t}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=_B(gB(n),`bytes`),i=(t?n.substring(`${t}0x`.length):n).split(``);for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(r[e>>1]&15)>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let a=`0x${i.join(``)}`;return bB.set(`${e}.${t}`,a),a}var SB=/^0x[a-fA-F0-9]{40}$/,CB=new yB(8192);function wB(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(CB.has(r))return CB.get(r);let i=SB.test(e)?e.toLowerCase()===e?!0:n?xB(e)===e:!0:!1;return CB.set(r,i),i}function TB(e){return`0x${e.reduce((e,t)=>e+t.replace(`0x`,``),``)}`}function EB(e,t,n,{strict:r}={}){return zz(e,{strict:!1})?AB(e,t,n,{strict:r}):kB(e,t,n,{strict:r})}function DB(e,t){if(typeof t==`number`&&t>0&&t>Bz(e)-1)throw new Gz({offset:t,position:`start`,size:Bz(e)})}function OB(e,t,n){if(typeof t==`number`&&typeof n==`number`&&Bz(e)!==n-t)throw new Gz({offset:n,position:`end`,size:Bz(e)})}function kB(e,t,n,{strict:r}={}){DB(e,t);let i=e.slice(t,n);return r&&OB(i,t,n),i}function AB(e,t,n,{strict:r}={}){DB(e,t);let i=`0x${e.replace(`0x`,``).slice((t??0)*2,(n??e.length)*2)}`;return r&&OB(i,t,n),i}var jB=class extends Uz{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:`NegativeOffsetError`})}},MB=class extends Uz{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:`PositionOutOfBoundsError`})}},NB=class extends Uz{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:`RecursiveReadLimitExceededError`})}},PB={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:1/0,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new NB({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new MB({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new jB({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new jB({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===1/0)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function FB(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(PB);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}var IB={ether:-9,wei:9};function LB(e,t){let n=e.toString(),r=n.startsWith(`-`);r&&(n=n.slice(1)),n=n.padStart(t,`0`);let[i,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,``),`${r?`-`:``}${i||`0`}${a?`.${a}`:``}`}function RB(e,t=`wei`){return LB(e,IB[t])}function zB(e){let t=Object.entries(e).map(([e,t])=>t===void 0||t===!1?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join(`
|
|
82
|
-
`)}var BB=class extends Uz{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:`InvalidLegacyVError`})}},VB=class extends Uz{constructor({transaction:e}){super(`Cannot infer a transaction type from provided transaction.`,{metaMessages:[`Provided Transaction:`,`{`,zB(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`})}},HB=class extends Uz{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:`InvalidStorageKeySizeError`})}};function UB(e,t=`hex`){let n=WB(e),r=FB(new Uint8Array(n.length));return n.encode(r),t===`hex`?aB(r.bytes):r.bytes}function WB(e){return Array.isArray(e)?GB(e.map(e=>WB(e))):KB(e)}function GB(e){let t=e.reduce((e,t)=>e+t.length,0),n=qB(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),n===1?r.pushUint8(t):n===2?r.pushUint16(t):n===3?r.pushUint24(t):r.pushUint32(t));for(let{encode:t}of e)t(r)}}}function KB(e){let t=typeof e==`string`?mB(e):e,n=qB(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){t.length===1&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),n===1?e.pushUint8(t.length):n===2?e.pushUint16(t.length):n===3?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}function qB(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new Uz(`Length is too large.`)}var JB=class extends Uz{constructor({cause:e,message:t}={}){let n=t?.replace(`execution reverted: `,``)?.replace(`execution reverted`,``);super(`Execution reverted ${n?`with reason: ${n}`:`for an unknown reason`}.`,{cause:e,name:`ExecutionRevertedError`})}};Object.defineProperty(JB,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(JB,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});var YB=class extends Uz{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${RB(t)} gwei`:``}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:`FeeCapTooHighError`})}};Object.defineProperty(YB,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),Object.defineProperty(class extends Uz{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${RB(t)}`:``} gwei) cannot be lower than the block base fee.`,{cause:e,name:`FeeCapTooLowError`})}},"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/}),Object.defineProperty(class extends Uz{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:``}is higher than the next one expected.`,{cause:e,name:`NonceTooHighError`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),Object.defineProperty(class extends Uz{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:``}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
83
|
-
`),{cause:e,name:`NonceTooLowError`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),Object.defineProperty(class extends Uz{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:``}exceeds the maximum allowed nonce.`,{cause:e,name:`NonceMaxValueError`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),Object.defineProperty(class extends Uz{constructor({cause:e}={}){super([`The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.`].join(`
|
|
84
|
-
`),{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`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/}),Object.defineProperty(class extends Uz{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:``}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:`IntrinsicGasTooHighError`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),Object.defineProperty(class extends Uz{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:``}provided for the transaction is too low.`,{cause:e,name:`IntrinsicGasTooLowError`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),Object.defineProperty(class extends Uz{constructor({cause:e}){super(`The transaction type is not supported for this chain.`,{cause:e,name:`TransactionTypeNotSupportedError`})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});var XB=class extends Uz{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${RB(t)} gwei`:``}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${RB(n)} gwei`:``}).`].join(`
|
|
85
|
-
`),{cause:e,name:`TipAboveFeeCapError`})}};Object.defineProperty(XB,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});function ZB(e,t){return({exclude:n,format:r})=>({exclude:n,format:(e,i)=>{let a=t(e,i);if(n)for(let e of n)delete a[e];return{...a,...r(e,i)}},type:e})}2n**(8n-1n)-1n,2n**(16n-1n)-1n,2n**(24n-1n)-1n,2n**(32n-1n)-1n,2n**(40n-1n)-1n,2n**(48n-1n)-1n,2n**(56n-1n)-1n,2n**(64n-1n)-1n,2n**(72n-1n)-1n,2n**(80n-1n)-1n,2n**(88n-1n)-1n,2n**(96n-1n)-1n,2n**(104n-1n)-1n,2n**(112n-1n)-1n,2n**(120n-1n)-1n,2n**(128n-1n)-1n,2n**(136n-1n)-1n,2n**(144n-1n)-1n,2n**(152n-1n)-1n,2n**(160n-1n)-1n,2n**(168n-1n)-1n,2n**(176n-1n)-1n,2n**(184n-1n)-1n,2n**(192n-1n)-1n,2n**(200n-1n)-1n,2n**(208n-1n)-1n,2n**(216n-1n)-1n,2n**(224n-1n)-1n,2n**(232n-1n)-1n,2n**(240n-1n)-1n,2n**(248n-1n)-1n,2n**(256n-1n)-1n,-(2n**(8n-1n)),-(2n**(16n-1n)),-(2n**(24n-1n)),-(2n**(32n-1n)),-(2n**(40n-1n)),-(2n**(48n-1n)),-(2n**(56n-1n)),-(2n**(64n-1n)),-(2n**(72n-1n)),-(2n**(80n-1n)),-(2n**(88n-1n)),-(2n**(96n-1n)),-(2n**(104n-1n)),-(2n**(112n-1n)),-(2n**(120n-1n)),-(2n**(128n-1n)),-(2n**(136n-1n)),-(2n**(144n-1n)),-(2n**(152n-1n)),-(2n**(160n-1n)),-(2n**(168n-1n)),-(2n**(176n-1n)),-(2n**(184n-1n)),-(2n**(192n-1n)),-(2n**(200n-1n)),-(2n**(208n-1n)),-(2n**(216n-1n)),-(2n**(224n-1n)),-(2n**(232n-1n)),-(2n**(240n-1n)),-(2n**(248n-1n)),-(2n**(256n-1n));var QB=2n**256n-1n,$B={"0x0":`legacy`,"0x1":`eip2930`,"0x2":`eip1559`,"0x3":`eip4844`,"0x4":`eip7702`};function eV(e,t){let n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?tB(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?tB(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?$B[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=nV(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v==`bigint`){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return+(n.v%2n==0n)}})(),n.type===`legacy`&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type===`eip2930`&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type===`eip1559`&&delete n.maxFeePerBlobGas,n}var tV=ZB(`transaction`,eV);function nV(e){return e.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}function rV(e,t){let n=(e.transactions??[]).map(e=>typeof e==`string`?e:eV(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var iV=ZB(`block`,rV);function aV(e){let{kzg:t}=e,n=e.to??(typeof e.blobs[0]==`string`?`hex`:`bytes`),r=typeof e.blobs[0]==`string`?e.blobs.map(e=>mB(e)):e.blobs,i=[];for(let e of r)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return n===`bytes`?i:i.map(e=>aB(e))}function oV(e){let{kzg:t}=e,n=e.to??(typeof e.blobs[0]==`string`?`hex`:`bytes`),r=typeof e.blobs[0]==`string`?e.blobs.map(e=>mB(e)):e.blobs,i=typeof e.commitments[0]==`string`?e.commitments.map(e=>mB(e)):e.commitments,a=[];for(let e=0;e<r.length;e++){let n=r[e],o=i[e];a.push(Uint8Array.from(t.computeBlobKzgProof(n,o)))}return n===`bytes`?a:a.map(e=>aB(e))}function sV(e,t){let n=t||`hex`,r=Ix(zz(e,{strict:!1})?uB(e):e);return n===`bytes`?r:rB(r)}function cV(e){let{commitment:t,version:n=1}=e,r=e.to??(typeof t==`string`?`hex`:`bytes`),i=sV(t,`bytes`);return i.set([n],0),r===`bytes`?i:aB(i)}function lV(e){let{commitments:t,version:n}=e,r=e.to??(typeof t[0]==`string`?`hex`:`bytes`),i=[];for(let e of t)i.push(cV({commitment:e,to:r,version:n}));return i}var uV=6,dV=4096,fV=32*dV,pV=fV*uV-1-1*dV*uV,mV=class extends Uz{constructor({maxSize:e,size:t}){super(`Blob size is too large.`,{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:`BlobSizeTooLargeError`})}},hV=class extends Uz{constructor(){super(`Blob data must not be empty.`,{name:`EmptyBlobError`})}},gV=class extends Uz{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:[`Expected: 32`,`Received: ${t}`],name:`InvalidVersionedHashSizeError`})}},_V=class extends Uz{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: 1`,`Received: ${t}`],name:`InvalidVersionedHashVersionError`})}};function vV(e){let t=e.to??(typeof e.data==`string`?`hex`:`bytes`),n=typeof e.data==`string`?mB(e.data):e.data,r=Bz(n);if(!r)throw new hV;if(r>761855)throw new mV({maxSize:pV,size:r});let i=[],a=!0,o=0;for(;a;){let e=FB(new Uint8Array(fV)),t=0;for(;t<dV;){let r=n.slice(o,o+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),a=!1;break}t++,o+=31}i.push(e)}return t===`bytes`?i.map(e=>e.bytes):i.map(e=>aB(e.bytes))}function yV(e){let{data:t,kzg:n,to:r}=e,i=e.blobs??vV({data:t,to:r}),a=e.commitments??aV({blobs:i,kzg:n,to:r}),o=e.proofs??oV({blobs:i,commitments:a,kzg:n,to:r}),s=[];for(let e=0;e<i.length;e++)s.push({blob:i[e],commitment:a[e],proof:o[e]});return s}function bV(e){if(e.type)return e.type;if(e.authorizationList!==void 0)return`eip7702`;if(e.blobs!==void 0||e.blobVersionedHashes!==void 0||e.maxFeePerBlobGas!==void 0||e.sidecars!==void 0)return`eip4844`;if(e.maxFeePerGas!==void 0||e.maxPriorityFeePerGas!==void 0)return`eip1559`;if(e.gasPrice!==void 0)return e.accessList===void 0?`legacy`:`eip2930`;throw new VB({transaction:e})}function xV(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}var SV=class extends Uz{constructor({chainId:e}){super(typeof e==`number`?`Chain ID "${e}" is invalid.`:`Chain ID is invalid.`,{name:`InvalidChainIdError`})}},CV={"0x0":`reverted`,"0x1":`success`};function wV(e,t){let n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>xV(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?tB(e.transactionIndex):null,status:e.status?CV[e.status]:null,type:e.type?$B[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}var TV=ZB(`transactionReceipt`,wV);function EV(e){let{authorizationList:t}=e;if(t)for(let e of t){let{chainId:t}=e,n=e.address;if(!wB(n))throw new vB({address:n});if(t<0)throw new SV({chainId:t})}OV(e)}function DV(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new hV;for(let e of t){let t=Bz(e),n=tB(EB(e,0,1));if(t!==32)throw new gV({hash:e,size:t});if(n!==1)throw new _V({hash:e,version:n})}}OV(e)}function OV(e){let{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new SV({chainId:t});if(i&&!wB(i))throw new vB({address:i});if(r&&r>QB)throw new YB({maxFeePerGas:r});if(n&&r&&n>r)throw new XB({maxFeePerGas:r,maxPriorityFeePerGas:n})}function kV(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(t<=0)throw new SV({chainId:t});if(a&&!wB(a))throw new vB({address:a});if(n||i)throw new Uz("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>QB)throw new YB({maxFeePerGas:r})}function AV(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(a&&!wB(a))throw new vB({address:a});if(t!==void 0&&t<=0)throw new SV({chainId:t});if(n||i)throw new Uz("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>QB)throw new YB({maxFeePerGas:r})}function jV(e){if(!e||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new HB({storageKey:i[e]});if(!wB(r,{strict:!1}))throw new vB({address:r});t.push([r,i])}return t}function MV(e,t){let n=bV(e);return n===`eip1559`?FV(e,t):n===`eip2930`?IV(e,t):n===`eip4844`?PV(e,t):n===`eip7702`?NV(e,t):LV(e,t)}function NV(e,t){let{authorizationList:n,chainId:r,gas:i,nonce:a,to:o,value:s,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;EV(e);let f=jV(u),p=zV(n);return TB([`0x04`,UB([oB(r),a?oB(a):`0x`,l?oB(l):`0x`,c?oB(c):`0x`,i?oB(i):`0x`,o??`0x`,s?oB(s):`0x`,d??`0x`,f,p,...RV(e,t)])])}function PV(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;DV(e);let f=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(f===void 0||p===void 0)){let t=typeof e.blobs[0]==`string`?e.blobs:e.blobs.map(e=>aB(e)),n=e.kzg,r=aV({blobs:t,kzg:n});f===void 0&&(f=lV({commitments:r})),p===void 0&&(p=yV({blobs:t,commitments:r,proofs:oV({blobs:t,commitments:r,kzg:n})}))}let m=jV(u),h=[oB(n),i?oB(i):`0x`,l?oB(l):`0x`,c?oB(c):`0x`,r?oB(r):`0x`,a??`0x`,o?oB(o):`0x`,d??`0x`,m,s?oB(s):`0x`,f??[],...RV(e,t)],g=[],_=[],v=[];if(p)for(let e=0;e<p.length;e++){let{blob:t,commitment:n,proof:r}=p[e];g.push(t),_.push(n),v.push(r)}return TB([`0x03`,UB(p?[h,g,_,v]:h)])}function FV(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:l,data:u}=e;OV(e);let d=jV(l);return TB([`0x02`,UB([oB(n),i?oB(i):`0x`,c?oB(c):`0x`,s?oB(s):`0x`,r?oB(r):`0x`,a??`0x`,o?oB(o):`0x`,u??`0x`,d,...RV(e,t)])])}function IV(e,t){let{chainId:n,gas:r,data:i,nonce:a,to:o,value:s,accessList:c,gasPrice:l}=e;kV(e);let u=jV(c);return TB([`0x01`,UB([oB(n),a?oB(a):`0x`,l?oB(l):`0x`,r?oB(r):`0x`,o??`0x`,s?oB(s):`0x`,i??`0x`,u,...RV(e,t)])])}function LV(e,t){let{chainId:n=0,gas:r,data:i,nonce:a,to:o,value:s,gasPrice:c}=e;AV(e);let l=[a?oB(a):`0x`,c?oB(c):`0x`,r?oB(r):`0x`,o??`0x`,s?oB(s):`0x`,i??`0x`];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);let e=27n+(t.v===27n?0n:1n);if(t.v!==e)throw new BB({v:t.v});return e})(),r=Qz(t.r),i=Qz(t.s);l=[...l,oB(e),r===`0x00`?`0x`:r,i===`0x00`?`0x`:i]}else n>0&&(l=[...l,oB(n),`0x`,`0x`]);return UB(l)}function RV(e,t){let n=t??e,{v:r,yParity:i}=n;if(n.r===void 0||n.s===void 0||r===void 0&&i===void 0)return[];let a=Qz(n.r),o=Qz(n.s);return[typeof i==`number`?i?oB(1):`0x`:r===0n?`0x`:r===1n?oB(1):r===27n?`0x`:oB(1),a===`0x00`?`0x`:a,o===`0x00`?`0x`:o]}function zV(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let{chainId:e,nonce:r,...i}=n,a=n.address;t.push([e?rB(e):`0x`,a,r?rB(r):`0x`,...RV({},i)])}return t}function BV(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(e){return t=>{let r=typeof t==`function`?t(e):t,i={...e,...r};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}var VV={gasPriceOracle:{address:`0x420000000000000000000000000000000000000F`},l1Block:{address:`0x4200000000000000000000000000000000000015`},l2CrossDomainMessenger:{address:`0x4200000000000000000000000000000000000007`},l2Erc721Bridge:{address:`0x4200000000000000000000000000000000000014`},l2StandardBridge:{address:`0x4200000000000000000000000000000000000010`},l2ToL1MessagePasser:{address:`0x4200000000000000000000000000000000000016`}},HV={block:iV({format(e){return{transactions:e.transactions?.map(e=>{if(typeof e==`string`)return e;let t=eV(e);return t.typeHex===`0x7e`&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?eB(e.mint):void 0,t.sourceHash=e.sourceHash,t.type=`deposit`),t}),stateRoot:e.stateRoot}}}),transaction:tV({format(e){let t={};return e.type===`0x7e`&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?eB(e.mint):void 0,t.sourceHash=e.sourceHash,t.type=`deposit`),t}}),transactionReceipt:TV({format(e){return{l1GasPrice:e.l1GasPrice?eB(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?eB(e.l1GasUsed):null,l1Fee:e.l1Fee?eB(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function UV(e,t){return KV(e)?GV(e):MV(e,t)}var WV={transaction:UV};function GV(e){qV(e);let{sourceHash:t,data:n,from:r,gas:i,isSystemTx:a,mint:o,to:s,value:c}=e;return TB([`0x7e`,UB([t,r,s??`0x`,o?rB(o):`0x`,c?rB(c):`0x`,i?rB(i):`0x`,a?`0x1`:`0x`,n??`0x`])])}function KV(e){return e.type===`deposit`||e.sourceHash!==void 0}function qV(e){let{from:t,to:n}=e;if(t&&!wB(t))throw new vB({address:t});if(n&&!wB(n))throw new vB({address:n})}var JV={blockTime:2e3,contracts:VV,formatters:HV,serializers:WV},YV=BV({id:42161,name:`Arbitrum One`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:250,rpcUrls:{default:{http:[`https://arb1.arbitrum.io/rpc`]}},blockExplorers:{default:{name:`Arbiscan`,url:`https://arbiscan.io`,apiUrl:`https://api.arbiscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:7654707}}}),XV=BV({id:421614,name:`Arbitrum Sepolia`,blockTime:250,nativeCurrency:{name:`Arbitrum Sepolia Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://sepolia-rollup.arbitrum.io/rpc`]}},blockExplorers:{default:{name:`Arbiscan`,url:`https://sepolia.arbiscan.io`,apiUrl:`https://api-sepolia.arbiscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:81930}},testnet:!0}),ZV=1,QV=BV({...JV,id:8453,name:`Base`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://mainnet.base.org`]}},blockExplorers:{default:{name:`Basescan`,url:`https://basescan.org`,apiUrl:`https://api.basescan.org/api`}},contracts:{...JV.contracts,disputeGameFactory:{[ZV]:{address:`0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e`}},l2OutputOracle:{[ZV]:{address:`0x56315b90c40730925ec5485cf004d835058518A0`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:5022},portal:{[ZV]:{address:`0x49048044D57e1C92A77f79988d21Fa8fAF74E97e`,blockCreated:17482143}},l1StandardBridge:{[ZV]:{address:`0x3154Cf16ccdb4C6d922629664174b904d80F2C35`,blockCreated:17482143}}},sourceId:ZV});({...QV});var $V=11155111,eH=BV({...JV,id:84532,network:`base-sepolia`,name:`Base Sepolia`,nativeCurrency:{name:`Sepolia Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://sepolia.base.org`]}},blockExplorers:{default:{name:`Basescan`,url:`https://sepolia.basescan.org`,apiUrl:`https://api-sepolia.basescan.org/api`}},contracts:{...JV.contracts,disputeGameFactory:{[$V]:{address:`0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1`}},l2OutputOracle:{[$V]:{address:`0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254`}},portal:{[$V]:{address:`0x49f53e41452c74589e85ca1677426ba426459e85`,blockCreated:4446677}},l1StandardBridge:{[$V]:{address:`0xfd0Bf71F60660E2f608ed56e1659C450eB113120`,blockCreated:4446677}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:1059647}},testnet:!0,sourceId:$V});({...eH});var tH=BV({id:56,name:`BNB Smart Chain`,blockTime:750,nativeCurrency:{decimals:18,name:`BNB`,symbol:`BNB`},rpcUrls:{default:{http:[`https://56.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`BscScan`,url:`https://bscscan.com`,apiUrl:`https://api.bscscan.com/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:15921452}}}),nH=BV({id:97,name:`BNB Smart Chain Testnet`,nativeCurrency:{decimals:18,name:`BNB`,symbol:`tBNB`},rpcUrls:{default:{http:[`https://data-seed-prebsc-1-s1.bnbchain.org:8545`]}},blockExplorers:{default:{name:`BscScan`,url:`https://testnet.bscscan.com`,apiUrl:`https://api-testnet.bscscan.com/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:17422483}},testnet:!0}),rH=BV({id:100,name:`Gnosis`,nativeCurrency:{decimals:18,name:`xDAI`,symbol:`XDAI`},blockTime:5e3,rpcUrls:{default:{http:[`https://rpc.gnosischain.com`],webSocket:[`wss://rpc.gnosischain.com/wss`]}},blockExplorers:{default:{name:`Gnosisscan`,url:`https://gnosisscan.io`,apiUrl:`https://api.gnosisscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:21022491}}}),iH=BV({id:10200,name:`Gnosis Chiado`,nativeCurrency:{decimals:18,name:`Gnosis`,symbol:`xDAI`},blockTime:5e3,rpcUrls:{default:{http:[`https://rpc.chiadochain.net`],webSocket:[`wss://rpc.chiadochain.net/wss`]}},blockExplorers:{default:{name:`Blockscout`,url:`https://blockscout.chiadochain.net`,apiUrl:`https://blockscout.chiadochain.net/api`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:4967313}},testnet:!0}),aH=BV({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}}}),oH=1,sH=BV({...JV,id:10,name:`OP Mainnet`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://mainnet.optimism.io`]}},blockExplorers:{default:{name:`Optimism Explorer`,url:`https://optimistic.etherscan.io`,apiUrl:`https://api-optimistic.etherscan.io/api`}},contracts:{...JV.contracts,disputeGameFactory:{[oH]:{address:`0xe5965Ab5962eDc7477C8520243A95517CD252fA9`}},l2OutputOracle:{[oH]:{address:`0xdfe97868233d1aa22e815a266982f2cf17685a27`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:4286263},portal:{[oH]:{address:`0xbEb5Fc579115071764c7423A4f12eDde41f106Ed`}},l1StandardBridge:{[oH]:{address:`0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1`}}},sourceId:oH}),cH=11155111,lH=BV({...JV,id:11155420,name:`OP Sepolia`,nativeCurrency:{name:`Sepolia Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://sepolia.optimism.io`]}},blockExplorers:{default:{name:`Blockscout`,url:`https://optimism-sepolia.blockscout.com`,apiUrl:`https://optimism-sepolia.blockscout.com/api`}},contracts:{...JV.contracts,disputeGameFactory:{[cH]:{address:`0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1`}},l2OutputOracle:{[cH]:{address:`0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:1620204},portal:{[cH]:{address:`0x16Fc5058F25648194471939df75CF27A2fdC48BC`}},l1StandardBridge:{[cH]:{address:`0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1`}}},testnet:!0,sourceId:cH}),uH=BV({id:137,name:`Polygon`,blockTime:2e3,nativeCurrency:{name:`POL`,symbol:`POL`,decimals:18},rpcUrls:{default:{http:[`https://polygon.drpc.org`]}},blockExplorers:{default:{name:`PolygonScan`,url:`https://polygonscan.com`,apiUrl:`https://api.etherscan.io/v2/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:25770160}}}),dH=BV({id:80002,name:`Polygon Amoy`,nativeCurrency:{name:`POL`,symbol:`POL`,decimals:18},rpcUrls:{default:{http:[`https://rpc-amoy.polygon.technology`]}},blockExplorers:{default:{name:`PolygonScan`,url:`https://amoy.polygonscan.com`,apiUrl:`https://api.etherscan.io/v2/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:3127388}},testnet:!0}),fH=BV({id:11155111,name:`Sepolia`,nativeCurrency:{name:`Sepolia Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://11155111.rpc.thirdweb.com`]}},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}),pH=1,mH=BV({...JV,id:1868,name:`Soneium Mainnet`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.soneium.org`]}},blockExplorers:{default:{name:`Blockscout`,url:`https://soneium.blockscout.com`,apiUrl:`https://soneium.blockscout.com/api`}},contracts:{...JV.contracts,disputeGameFactory:{[pH]:{address:`0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0`}},l2OutputOracle:{[pH]:{address:`0x0000000000000000000000000000000000000000`}},portal:{[pH]:{address:`0x88e529a6ccd302c948689cd5156c83d4614fae92`,blockCreated:7061266}},l1StandardBridge:{[pH]:{address:`0xeb9bf100225c214efc3e7c651ebbadcf85177607`,blockCreated:7061266}},multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:1}},sourceId:pH}),hH=BV({id:728126428,name:`Tron`,nativeCurrency:{name:`TRON`,symbol:`TRX`,decimals:6},rpcUrls:{default:{http:[`https://api.trongrid.io/jsonrpc`]}},blockExplorers:{default:{name:`Tronscan`,url:`https://tronscan.org`,apiUrl:`https://apilist.tronscanapi.com/api`}}}),gH=1,_H=BV({...JV,id:130,name:`Unichain`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:1e3,rpcUrls:{default:{http:[`https://mainnet.unichain.org/`]}},blockExplorers:{default:{name:`Uniscan`,url:`https://uniscan.xyz`,apiUrl:`https://api.uniscan.xyz/api`}},contracts:{...JV.contracts,multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:0},disputeGameFactory:{[gH]:{address:`0x2F12d621a16e2d3285929C9996f478508951dFe4`}},portal:{[gH]:{address:`0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2`}},l1StandardBridge:{[gH]:{address:`0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA`}}},sourceId:gH});function vH(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function yH(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(e=>typeof e==`string`):t.every(e=>Number.isSafeInteger(e)):!1}function bH(e){if(typeof e!=`function`)throw Error(`function expected`);return!0}function xH(e,t){if(typeof t!=`string`)throw Error(`${e}: string expected`);return!0}function SH(e){if(!Number.isSafeInteger(e))throw Error(`invalid integer: ${e}`)}function CH(e){if(!Array.isArray(e))throw Error(`array expected`)}function wH(e,t){if(!yH(!0,t))throw Error(`${e}: array of strings expected`)}function TH(e,t){if(!yH(!1,t))throw Error(`${e}: array of numbers expected`)}function EH(...e){let t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map(e=>e.encode).reduceRight(n,t),decode:e.map(e=>e.decode).reduce(n,t)}}function DH(e){let t=typeof e==`string`?e.split(``):e,n=t.length;wH(`alphabet`,t);let r=new Map(t.map((e,t)=>[e,t]));return{encode:r=>(CH(r),r.map(r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw Error(`alphabet.encode: digit index outside alphabet "${r}". Allowed: ${e}`);return t[r]})),decode:t=>(CH(t),t.map(t=>{xH(`alphabet.decode`,t);let n=r.get(t);if(n===void 0)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}function OH(e=``){return xH(`join`,e),{encode:t=>(wH(`join.decode`,t),t.join(e)),decode:t=>(xH(`join.decode`,t),t.split(e))}}function kH(e,t=`=`){return SH(e),xH(`padding`,t),{encode(n){for(wH(`padding.encode`,n);n.length*e%8;)n.push(t);return n},decode(n){wH(`padding.decode`,n);let r=n.length;if(r*e%8)throw Error(`padding: invalid, string should have whole number of bytes`);for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw Error(`padding: invalid, string has too much padding`);return n.slice(0,r)}}}function AH(e){return bH(e),{encode:e=>e,decode:t=>e(t)}}function jH(e,t,n){if(t<2)throw Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(n<2)throw Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(CH(e),!e.length)return[];let r=0,i=[],a=Array.from(e,e=>{if(SH(e),e<0||e>=t)throw Error(`invalid integer: ${e}`);return e}),o=a.length;for(;;){let e=0,s=!0;for(let i=r;i<o;i++){let o=a[i],c=t*e,l=c+o;if(!Number.isSafeInteger(l)||c/t!==e||l-o!==c)throw Error(`convertRadix: carry overflow`);let u=l/n;e=l%n;let d=Math.floor(u);if(a[i]=d,!Number.isSafeInteger(d)||d*n+e!==l)throw Error(`convertRadix: carry overflow`);if(s)d?s=!1:r=i;else continue}if(i.push(e),s)break}for(let t=0;t<e.length-1&&e[t]===0;t++)i.push(0);return i.reverse()}var MH=(e,t)=>t===0?e:MH(t,e%t),NH=(e,t)=>e+(t-MH(e,t)),PH=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function FH(e,t,n,r){if(CH(e),t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw Error(`convertRadix2: wrong to=${n}`);if(NH(t,n)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${NH(t,n)}`);let i=0,a=0,o=PH[t],s=PH[n]-1,c=[];for(let r of e){if(SH(r),r>=o)throw Error(`convertRadix2: invalid data word=${r} from=${t}`);if(i=i<<t|r,a+t>32)throw Error(`convertRadix2: carry overflow pos=${a} from=${t}`);for(a+=t;a>=n;a-=n)c.push((i>>a-n&s)>>>0);let e=PH[a];if(e===void 0)throw Error(`invalid carry`);i&=e-1}if(i=i<<n-a&s,!r&&a>=t)throw Error(`Excess padding`);if(!r&&i>0)throw Error(`Non-zero padding: ${i}`);return r&&a>0&&c.push(i>>>0),c}function IH(e){return SH(e),{encode:t=>{if(!vH(t))throw Error(`radix.encode input should be Uint8Array`);return jH(Array.from(t),256,e)},decode:t=>(TH(`radix.decode`,t),Uint8Array.from(jH(t,e,256)))}}function LH(e,t=!1){if(SH(e),e<=0||e>32)throw Error(`radix2: bits should be in (0..32]`);if(NH(8,e)>32||NH(e,8)>32)throw Error(`radix2: carry overflow`);return{encode:n=>{if(!vH(n))throw Error(`radix2.encode input should be Uint8Array`);return FH(Array.from(n),8,e,!t)},decode:n=>(TH(`radix2.decode`,n),Uint8Array.from(FH(n,e,8,t)))}}function RH(e){return bH(e),function(...t){try{return e.apply(null,t)}catch{}}}EH(LH(4),DH(`0123456789ABCDEF`),OH(``)),EH(LH(5),DH(`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`),kH(5),OH(``)),EH(LH(5),DH(`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`),OH(``)),EH(LH(5),DH(`0123456789ABCDEFGHIJKLMNOPQRSTUV`),kH(5),OH(``)),EH(LH(5),DH(`0123456789ABCDEFGHIJKLMNOPQRSTUV`),OH(``)),EH(LH(5),DH(`0123456789ABCDEFGHJKMNPQRSTVWXYZ`),OH(``),AH(e=>e.toUpperCase().replace(/O/g,`0`).replace(/[IL]/g,`1`)));var zH=typeof Uint8Array.from([]).toBase64==`function`&&typeof Uint8Array.fromBase64==`function`;zH||EH(LH(6),DH(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`),kH(6),OH(``)),EH(LH(6),DH(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`),OH(``)),zH||EH(LH(6),DH(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`),kH(6),OH(``)),EH(LH(6),DH(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`),OH(``));var BH=(e=>EH(IH(58),DH(e),OH(``)))(`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`),VH=EH(DH(`qpzry9x8gf2tvdw0s3jn54khce6mua7l`),OH(``)),HH=[996825010,642813549,513874426,1027748829,705979059];function UH(e){let t=e>>25,n=(e&33554431)<<5;for(let e=0;e<HH.length;e++)(t>>e&1)==1&&(n^=HH[e]);return n}function WH(e,t,n=1){let r=e.length,i=1;for(let t=0;t<r;t++){let n=e.charCodeAt(t);if(n<33||n>126)throw Error(`Invalid prefix (${e})`);i=UH(i)^n>>5}i=UH(i);for(let t=0;t<r;t++)i=UH(i)^e.charCodeAt(t)&31;for(let e of t)i=UH(i)^e;for(let e=0;e<6;e++)i=UH(i);return i^=n,VH.encode(FH([i%PH[30]],30,5,!1))}function GH(e){let t=e===`bech32`?1:734539939,n=LH(5),r=n.decode,i=n.encode,a=RH(r);function o(e,n,r=90){xH(`bech32.encode prefix`,e),vH(n)&&(n=Array.from(n)),TH(`bech32.encode`,n);let i=e.length;if(i===0)throw TypeError(`Invalid prefix length ${i}`);let a=i+7+n.length;if(r!==!1&&a>r)throw TypeError(`Length ${a} exceeds limit ${r}`);let o=e.toLowerCase(),s=WH(o,n,t);return`${o}1${VH.encode(n)}${s}`}function s(e,n=90){xH(`bech32.decode input`,e);let r=e.length;if(r<8||n!==!1&&r>n)throw TypeError(`invalid string length: ${r} (${e}). Expected (8..${n})`);let i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw Error(`String must be lowercase or uppercase`);let a=i.lastIndexOf(`1`);if(a===0||a===-1)throw Error(`Letter "1" must be present between prefix and data only`);let o=i.slice(0,a),s=i.slice(a+1);if(s.length<6)throw Error(`Data must be at least 6 characters long`);let c=VH.decode(s).slice(0,-6),l=WH(o,c,t);if(!s.endsWith(l))throw Error(`Invalid checksum in ${e}: expected "${l}"`);return{prefix:o,words:c}}let c=RH(s);function l(e){let{prefix:t,words:n}=s(e,!1);return{prefix:t,words:n,bytes:r(n)}}function u(e,t){return o(e,i(t))}return{encode:o,decode:s,encodeFromBytes:u,decodeToBytes:l,decodeUnsafe:c,fromWords:r,fromWordsUnsafe:a,toWords:i}}GH(`bech32`),GH(`bech32m`),typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`||EH(LH(4),DH(`0123456789abcdef`),OH(``),AH(e=>{if(typeof e!=`string`||e.length%2!=0)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));function KH({coder:e,ipfs:t},n){return(r,i)=>(n(r,i),e.decode(t&&i?r.substring(1):r))}function qH({chars:e,ipfs:t,type:n,withPadding:r}){return(i,a)=>{if(typeof i!=`string`)throw Error(`Expected ${n} string input`);if(t&&a&&!i.startsWith(t))throw Error(`Expected ipfs-compatible ${n} to start with '${t}'`);for(let t=+!!a,o=i.length;t<o;t++)if(!e.includes(i[t]))if(r&&i[t]===`=`){if(t!==o-1&&i[t+1]!==`=`)throw Error(`Invalid ${n} padding sequence "${i[t]}${i[t+1]}" at index ${t}`)}else throw Error(`Invalid ${n} character "${i[t]}" (0x${i.charCodeAt(t).toString(16)}) at index ${t}`);return!0}}var JH={chars:`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,coder:BH,ipfs:`z`,type:`base58`},YH=KH(JH,qH(JH)),XH=Object.defineProperty,ZH=(e,t,n)=>t in e?XH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QH=(e,t,n)=>(ZH(e,typeof t==`symbol`?t:t+``,n),n),$H={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,A:10,B:11,C:12,D:13,E:14,F:15};function eU(e){let t=e.length%2,n=(e[1]===`x`?2:0)+t,r=(e.length-n)/2+t,i=new Uint8Array(r);t&&(i[0]=0|$H[e[2]]);for(let a=0;a<r;){let r=n+a*2,o=$H[e[r]],s=$H[e[r+1]];i[t+ a++]=o<<4|s}return i}var tU=class extends Uint8Array{constructor(e){super(e),QH(this,`i`,0),QH(this,`v`),this.v=new DataView(e)}},nU=e=>t=>e(t instanceof tU?t:new tU(t instanceof Uint8Array?t.buffer:typeof t==`string`?eU(t).buffer:t)),rU=e=>{let t=e.length,n=0;for(let r=0;r<t;r++)n+=e[r].length;let r=new Uint8Array(n);for(let n=0,i=0;n<t;n++){let t=e[n];r.set(t,i),i+=t.byteLength}return r};function iU(e,t){let n=Object.keys(e),r=n.length,i={};for(let a=0;a<r;a++){let r=n[a];i[r]=t(e[r],r)}return i}var aU=(e,t)=>{let n=[e,t];return n.enc=e,n.dec=t,n},oU=(e,t)=>n=>e(t(n)),sU=(e,t)=>n=>t(e(n)),cU=([e,t],n,r)=>aU(oU(e,n),sU(t,r));function lU(e,t){return nU(n=>{let r=n.v[t](n.i,!0);return n.i+=e,r})}function uU(e,t){return n=>{let r=new Uint8Array(e);return new DataView(r.buffer)[t](0,n,!0),r}}function dU(e,t,n){return aU(uU(e,n),lU(e,t))}var fU=dU(1,`getUint8`,`setUint8`),pU=dU(2,`getUint16`,`setUint16`),mU=dU(4,`getUint32`,`setUint32`),hU=dU(8,`getBigUint64`,`setBigUint64`);dU(1,`getInt8`,`setInt8`),dU(2,`getInt16`,`setInt16`),dU(4,`getInt32`,`setInt32`),dU(8,`getBigInt64`,`setBigInt64`);var gU=e=>{let t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigInt64(0,e,!0),n.setBigInt64(8,e>>64n,!0),t},_U=e=>nU(t=>{let{v:n,i:r}=t,i=n.getBigUint64(r,!0),a=n[e](r+8,!0);return t.i+=16,a<<64n|i}),vU=aU(gU,_U(`getBigUint64`));aU(gU,_U(`getBigInt64`));var yU=e=>{let t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigInt64(0,e,!0),n.setBigInt64(8,e>>64n,!0),n.setBigInt64(16,e>>128n,!0),n.setBigInt64(24,e>>192n,!0),t},bU=e=>nU(t=>{let n=t.v.getBigUint64(t.i,!0);return t.i+=8,n|=t.v.getBigUint64(t.i,!0)<<64n,t.i+=8,n|=t.v.getBigUint64(t.i,!0)<<128n,t.i+=8,n|=t.v[e](t.i,!0)<<192n,t.i+=8,n});aU(yU,bU(`getBigUint64`)),aU(yU,bU(`getBigInt64`));var xU=cU(fU,e=>+!!e,Boolean),SU=[fU[1],pU[1],mU[1]],CU=nU(e=>{let t=e[e.i],n=t&3;if(n<3)return SU[n](e)>>>2;let r=(t>>>2)+4;e.i++;let i=0n,a=r/8|0,o=0n;for(let t=0;t<a;t++)i=hU[1](e)<<o|i,o+=64n;let s=r%8;return s>3&&(i=BigInt(mU[1](e))<<o|i,o+=32n,s-=4),s>1&&(i=BigInt(pU[1](e))<<o|i,o+=16n,s-=2),s&&(i=BigInt(fU[1](e))<<o|i),i}),wU=1n<<56n,TU=1<<24,EU=256,DU=4294967295n,OU=64,kU=16384,AU=1<<30,jU=aU(e=>{if(e<0)throw Error(`Wrong compact input (${e})`);let t=Number(e)<<2;if(e<OU)return fU[0](t);if(e<kU)return pU[0](t|1);if(e<AU)return mU[0](t|2);let n=[new Uint8Array(1)],r=BigInt(e);for(;r>=wU;)n.push(hU[0](r)),r>>=64n;r>=TU&&(n.push(mU[0](Number(r&DU))),r>>=32n);let i=Number(r);i>=EU&&(n.push(pU[0](i)),i>>=16),i&&n.push(fU[0](i));let a=rU(n);return a[0]=a.length-5<<2|3,a},CU),MU=new TextEncoder,NU=e=>{let t=MU.encode(e);return rU([jU.enc(t.length),t])},PU=new TextDecoder;aU(NU,nU(e=>{let t=jU.dec(e),n=new DataView(e.buffer,e.i,t);return e.i+=t,PU.decode(n)}));var FU=()=>{},IU=new Uint8Array,LU=aU(()=>IU,FU),RU=e=>e===void 0?e=>rU([jU.enc(e.length),e]):t=>t.length===e?t:t.slice(0,e),zU=e=>nU(t=>{let n=e===void 0?jU.dec(t):e===1/0?t.byteLength-t.i:e,r=new Uint8Array(t.buffer.slice(t.i,t.i+n));return t.i+=n,r}),BU=e=>aU(RU(e),zU(e));BU.enc=RU,BU.dec=zU;var VU=(e,t)=>{let n=Object.keys(e),r=new Map(t?.map((e,t)=>[n[t],e])??n.map((e,t)=>[e,t])),i=e=>r.get(e);return({tag:t,value:n})=>rU([fU.enc(i(t)),e[t](n)])},HU=(e,t)=>{let n=Object.keys(e),r=new Map(t?.map((e,t)=>[e,n[t]])??n.map((e,t)=>[t,e]));return nU(t=>{let n=fU.dec(t),i=r.get(n),a=e[i];return{tag:i,value:a(t)}})},UU=(e,...t)=>aU(VU(iU(e,([e])=>e),...t),HU(iU(e,([,e])=>e),...t));UU.enc=VU,UU.dec=HU;var WU=e=>nU(t=>fU[1](t)>0?e(t):void 0),GU=e=>t=>{let n=new Uint8Array(1);return t===void 0?n:(n[0]=1,rU([n,e(t)]))},KU=e=>aU(GU(e[0]),WU(e[1]));KU.enc=GU,KU.dec=WU;var qU=(e,t)=>nU(n=>{let r=fU[1](n)===0;return{success:r,value:(r?e:t)(n)}}),JU=(e,t)=>({success:n,value:r})=>rU([fU[0](+!n),(n?e:t)(r)]),YU=(e,t)=>aU(JU(e[0],t[0]),qU(e[1],t[1]));YU.dec=qU,YU.enc=JU;var XU=(...e)=>nU(t=>e.map(e=>e(t))),ZU=(...e)=>t=>rU(e.map((e,n)=>e(t[n]))),QU=(...e)=>aU(ZU(...e.map(([e])=>e)),XU(...e.map(([,e])=>e)));QU.enc=ZU,QU.dec=XU;var $U=e=>{let t=Object.keys(e);return oU(QU.enc(...Object.values(e)),e=>t.map(t=>e[t]))},eW=e=>{let t=Object.keys(e);return sU(QU.dec(...Object.values(e)),e=>Object.fromEntries(e.map((e,n)=>[t[n],e])))},tW=e=>aU($U(iU(e,e=>e[0])),eW(iU(e,e=>e[1])));tW.enc=$U,tW.dec=eW;var nW=(e,t)=>t>=0?t=>rU(t.map(e)):t=>rU([jU.enc(t.length),rU(t.map(e))]),rW=(e,t)=>nU(n=>{let r=t>=0?t:jU.dec(n),i=Array(r);for(let t=0;t<r;t++)i[t]=e(n);return i}),iW=(e,t)=>aU(nW(e[0],t),rW(e[1],t));iW.enc=nW,iW.dec=rW;var aW=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,oW=class{encode(e){let t=``,n,r,i,a,o,s,c,l=0;for(;l<e.length;)n=e.charCodeAt(l++),r=e.charCodeAt(l++),i=e.charCodeAt(l++),a=n>>2,o=(n&3)<<4|r>>4,s=(r&15)<<2|i>>6,c=i&63,isNaN(r)?s=c=64:isNaN(i)&&(c=64),t=t+aW.charAt(a)+aW.charAt(o)+aW.charAt(s)+aW.charAt(c);return t}encodeIgnoreUtf8(e){let t=``,n,r,i,a,o,s,c,l=0;for(;l<e.length;)n=e[l++],r=e[l++],i=e[l++],a=n>>2,o=(n&3)<<4|r>>4,s=(r&15)<<2|i>>6,c=i&63,isNaN(r)?s=c=64:isNaN(i)&&(c=64),t=t+aW.charAt(a)+aW.charAt(o)+aW.charAt(s)+aW.charAt(c);return t}decode(e){let t=``,n,r,i,a,o,s,c,l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,``);l<e.length;)a=aW.indexOf(e.charAt(l++)),o=aW.indexOf(e.charAt(l++)),s=aW.indexOf(e.charAt(l++)),c=aW.indexOf(e.charAt(l++)),n=a<<2|o>>4,r=(o&15)<<4|s>>2,i=(s&3)<<6|c,t+=String.fromCharCode(n),s!=64&&(t+=String.fromCharCode(r)),c!=64&&(t+=String.fromCharCode(i));return this._utf8_decode(t)}decodeToByteArray(e){let t=``,n,r,i,a,o,s,c,l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,``);l<e.length;)a=aW.indexOf(e.charAt(l++)),o=aW.indexOf(e.charAt(l++)),s=aW.indexOf(e.charAt(l++)),c=aW.indexOf(e.charAt(l++)),n=a<<2|o>>4,r=(o&15)<<4|s>>2,i=(s&3)<<6|c,t+=String.fromCharCode(n),s!=64&&(t+=String.fromCharCode(r)),c!=64&&(t+=String.fromCharCode(i));return this._out2ByteArray(t)}_out2ByteArray(e){let t=Array(e.length),n=0,r=0;for(;n<e.length;)r=e.charCodeAt(n),t[n]=r,n++;return t}_utf8_encode(e){e=e.replace(/\r\n/g,`
|
|
86
|
-
`);let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t}_utf8_decode(e){let t=``,n=0,r=0,i=0,a=0;for(;n<e.length;)r=e.charCodeAt(n),r<128?(t+=String.fromCharCode(r),n++):r>191&&r<224?(i=e.charCodeAt(n+1),t+=String.fromCharCode((r&31)<<6|i&63),n+=2):(i=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t+=String.fromCharCode((r&15)<<12|(i&63)<<6|a&63),n+=3);return t}},sW=c({base64DecodeFromString:()=>fW,base64EncodeToString:()=>pW,byte2hexStr:()=>cW,byteArray2hexStr:()=>dW,bytesToString:()=>lW,hextoString:()=>uW});function cW(e){if(e<0||e>255)throw Error(`Input must be a byte`);let t=`0123456789ABCDEF`,n=``;return n+=t.charAt(e>>4),n+=t.charAt(e&15),n}function lW(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n].toString(2),i=r.match(/^1+?(?=0)/);if(i&&r.length===8){let r=i[0].length,a=e[n].toString(2).slice(7-r);for(let t=1;t<r;t++)a+=e[t+n].toString(2).slice(2);t+=String.fromCharCode(parseInt(a,2)),n+=r-1}else t+=String.fromCharCode(e[n])}return t}function uW(e){let t=e.replace(/^0x/,``).split(``),n=``;for(let e=0;e<t.length/2;e++){let r=`0x${t[e*2]}${t[e*2+1]}`;n+=String.fromCharCode(parseInt(r))}return n}function dW(e){let t=``;for(let n=0;n<e.length;n++)t+=cW(e[n]);return t}function fW(e){return new oW().decodeToByteArray(e)}function pW(e){return new oW().encodeIgnoreUtf8(e)}var mW=c({ADDRESS_PREFIX:()=>`41`,ADDRESS_PREFIX_BYTE:()=>65,ADDRESS_PREFIX_REGEX:()=>hW,ADDRESS_SIZE:()=>34,TRON_BIP39_PATH_INDEX_0:()=>_W,TRON_BIP39_PATH_PREFIX:()=>gW}),hW=/^(41)/,gW=`m/44'/195'`,_W=`m/44'/195'/0'/0/0`,vW=c({arrayEquals:()=>bW,base64DecodeFromString:()=>fW,base64EncodeToString:()=>pW,bin2String:()=>yW,byte2hexStr:()=>cW,byteArray2hexStr:()=>dW,bytesToString:()=>lW,getStringType:()=>DW,hexChar2byte:()=>SW,hexStr2byteArray:()=>wW,hextoString:()=>uW,isHexChar:()=>CW,isNumber:()=>EW,strToDate:()=>TW,stringToBytes:()=>xW});function yW(e){return lW(e)}function bW(e,t,n=!1){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(n){if(e[r]!=t[r])return!1}else if(JSON.stringify(e[r])!=JSON.stringify(t[r]))return!1;return!0}function xW(e){let t=[],n=e.length,r;for(let i=0;i<n;i++)r=e.charCodeAt(i),r>=65536&&r<=1114111?(t.push(r>>18&7|240),t.push(r>>12&63|128),t.push(r>>6&63|128),t.push(r&63|128)):r>=2048&&r<=65535?(t.push(r>>12&15|224),t.push(r>>6&63|128),t.push(r&63|128)):r>=128&&r<=2047?(t.push(r>>6&31|192),t.push(r&63|128)):t.push(r&255);return t}function SW(e){let t;if(e>=`A`&&e<=`F`?t=e.charCodeAt(0)-65+10:e>=`a`&&e<=`f`?t=e.charCodeAt(0)-97+10:e>=`0`&&e<=`9`&&(t=e.charCodeAt(0)-48),typeof t==`number`)return t;throw Error(`The passed hex char is not a valid hex char`)}function CW(e){return+(e>=`A`&&e<=`F`||e>=`a`&&e<=`f`||e>=`0`&&e<=`9`)}function wW(e,t=!1){let n=e.length;t&&n%2&&(e=`0${e}`,n++);let r=[],i=0,a=0,o=0;for(let t=0;t<n;t++){let n=e.charAt(t);if(CW(n))i<<=4,i+=SW(n),a++,a%2==0&&(r[o++]=i,i=0);else throw Error(`The passed hex char is not a valid hex string`)}return r}function TW(e){if(!/^\d{4}-\d{2}-\d{2}( \d{2}-\d{2}-\d{2}|)/.test(e))throw Error(`The passed date string is not valid`);let t=e.split(` `),n=t[0].split(`-`),r=parseInt(n[0],10),i=parseInt(n[1],10)-1,a=parseInt(n[2],10);if(t.length>1){let e=t[1].split(`-`),n=parseInt(e[0],10),o=parseInt(e[1],10),s=parseInt(e[2],10);return new Date(r,i,a,n,o,s)}return new Date(r,i,a)}function EW(e){return+(e>=`0`&&e<=`9`)}function DW(e){if(e==null||e.length==0||e==``)return-1;let t=0;if(e.length==40)for(;t<40&&CW(e.charAt(t));t++);if(t==40)return 1;for(t=0;t<e.length&&EW(e.charAt(t));t++);if(t==e.length)return 2;for(t=0;t<e.length;t++)if(e.charAt(t)>` `)return 3;return-1}var OW=c({decode58:()=>NW,encode58:()=>MW}),kW=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,AW={};for(let e=0;e<58;e++)AW[kW.charAt(e)]=e;var jW=58;function MW(e){if(e.length===0)return``;let t,n,r=[0];for(t=0;t<e.length;t++){for(n=0;n<r.length;n++)r[n]<<=8;r[0]+=e[t];let i=0;for(n=0;n<r.length;++n)r[n]+=i,i=r[n]/jW|0,r[n]%=jW;for(;i;)r.push(i%jW),i=i/jW|0}for(t=0;e[t]===0&&t<e.length-1;t++)r.push(0);return r.reverse().map(e=>kW[e]).join(``)}function NW(e){if(e.length===0)return[];let t,n,r=[0];for(t=0;t<e.length;t++){let i=e[t];if(!(i in AW))throw Error(`Non-base58 character`);for(n=0;n<r.length;n++)r[n]*=jW;r[0]+=AW[i];let a=0;for(n=0;n<r.length;++n)r[n]+=a,a=r[n]>>8,r[n]&=255;for(;a;)r.push(a&255),a>>=8}for(t=0;e[t]===`1`&&t<e.length-1;t++)r.push(0);return r.reverse()}var PW=`6.13.5`;function FW(e,t,n){let r=t.split(`|`).map(e=>e.trim());for(let n=0;n<r.length;n++)switch(t){case`any`:return;case`bigint`:case`boolean`:case`number`:case`string`:if(typeof e===t)return}let i=Error(`invalid value for type ${t}`);throw i.code=`INVALID_ARGUMENT`,i.argument=`value.${n}`,i.value=e,i}async function IW(e){let t=Object.keys(e);return(await Promise.all(t.map(t=>Promise.resolve(e[t])))).reduce((e,n,r)=>(e[t[r]]=n,e),{})}function LW(e,t,n){for(let r in t){let i=t[r],a=n?n[r]:null;a&&FW(i,a,r),Object.defineProperty(e,r,{enumerable:!0,value:i,writable:!1})}}function RW(e){if(e==null)return`null`;if(Array.isArray(e))return`[ `+e.map(RW).join(`, `)+` ]`;if(e instanceof Uint8Array){let t=`0123456789abcdef`,n=`0x`;for(let r=0;r<e.length;r++)n+=t[e[r]>>4],n+=t[e[r]&15];return n}if(typeof e==`object`&&typeof e.toJSON==`function`)return RW(e.toJSON());switch(typeof e){case`boolean`:case`symbol`:return e.toString();case`bigint`:return BigInt(e).toString();case`number`:return e.toString();case`string`:return JSON.stringify(e);case`object`:{let t=Object.keys(e);return t.sort(),`{ `+t.map(t=>`${RW(t)}: ${RW(e[t])}`).join(`, `)+` }`}}return`[ COULD NOT SERIALIZE ]`}function zW(e,t){return e&&e.code===t}function BW(e,t,n){let r=e;{let r=[];if(n){if(`message`in n||`code`in n||`name`in n)throw Error(`value will overwrite populated values: ${RW(n)}`);for(let e in n){if(e===`shortMessage`)continue;let t=n[e];r.push(e+`=`+RW(t))}}r.push(`code=${t}`),r.push(`version=${PW}`),r.length&&(e+=` (`+r.join(`, `)+`)`)}let i;switch(t){case`INVALID_ARGUMENT`:i=TypeError(e);break;case`NUMERIC_FAULT`:case`BUFFER_OVERRUN`:i=RangeError(e);break;default:i=Error(e)}return LW(i,{code:t}),n&&Object.assign(i,n),i.shortMessage??LW(i,{shortMessage:r}),i}function VW(e,t,n,r){if(!e)throw BW(t,n,r)}function J(e,t,n,r){VW(e,t,`INVALID_ARGUMENT`,{argument:n,value:r})}function HW(e,t,n){n??=``,n&&=`: `+n,VW(e>=t,`missing argument`+n,`MISSING_ARGUMENT`,{count:e,expectedCount:t}),VW(e<=t,`too many arguments`+n,`UNEXPECTED_ARGUMENT`,{count:e,expectedCount:t})}var UW=[`NFD`,`NFC`,`NFKD`,`NFKC`].reduce((e,t)=>{try{if(`test`.normalize(t)!==`test`)throw Error(`bad`);if(t===`NFD`&&`é`.normalize(`NFD`)!==`é`)throw Error(`broken`);e.push(t)}catch{}return e},[]);function WW(e){VW(UW.indexOf(e)>=0,`platform missing String.prototype.normalize`,`UNSUPPORTED_OPERATION`,{operation:`String.prototype.normalize`,info:{form:e}})}function GW(e,t,n){if(n??=``,e!==t){let e=n,t=`new`;n&&(e+=`.`,t+=` `+n),VW(!1,`private constructor; use ${e}from* methods`,`UNSUPPORTED_OPERATION`,{operation:t})}}function KW(e,t,n){if(e instanceof Uint8Array)return n?new Uint8Array(e):e;if(typeof e==`string`&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){let t=new Uint8Array((e.length-2)/2),n=2;for(let r=0;r<t.length;r++)t[r]=parseInt(e.substring(n,n+2),16),n+=2;return t}J(!1,`invalid BytesLike value`,t||`value`,e)}function qW(e,t){return KW(e,t,!1)}function JW(e,t){return KW(e,t,!0)}function YW(e,t){return!(typeof e!=`string`||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t==`number`&&e.length!==2+2*t||t===!0&&e.length%2!=0)}function XW(e){return YW(e,!0)||e instanceof Uint8Array}var ZW=`0123456789abcdef`;function Y(e){let t=qW(e),n=`0x`;for(let e=0;e<t.length;e++){let r=t[e];n+=ZW[(r&240)>>4]+ZW[r&15]}return n}function QW(e){return`0x`+e.map(e=>Y(e).substring(2)).join(``)}function $W(e){return YW(e,!0)?(e.length-2)/2:qW(e).length}function eG(e,t,n){let r=qW(e);return n!=null&&n>r.length&&VW(!1,`cannot slice beyond data bounds`,`BUFFER_OVERRUN`,{buffer:r,length:r.length,offset:n}),Y(r.slice(t??0,n??r.length))}function tG(e,t,n){let r=qW(e);VW(t>=r.length,`padding exceeds data length`,`BUFFER_OVERRUN`,{buffer:new Uint8Array(r),length:t,offset:t+1});let i=new Uint8Array(t);return i.fill(0),n?i.set(r,t-r.length):i.set(r,0),Y(i)}function nG(e,t){return tG(e,t,!0)}var rG=BigInt(0),iG=BigInt(1),aG=9007199254740991;function oG(e,t){let n=uG(e,`value`),r=BigInt(pG(t,`width`));if(VW(n>>r===rG,`overflow`,`NUMERIC_FAULT`,{operation:`fromTwos`,fault:`overflow`,value:e}),n>>r-iG){let e=(iG<<r)-iG;return-((~n&e)+iG)}return n}function sG(e,t){let n=lG(e,`value`),r=BigInt(pG(t,`width`)),i=iG<<r-iG;if(n<rG){n=-n,VW(n<=i,`too low`,`NUMERIC_FAULT`,{operation:`toTwos`,fault:`overflow`,value:e});let t=(iG<<r)-iG;return(~n&t)+iG}else VW(n<i,`too high`,`NUMERIC_FAULT`,{operation:`toTwos`,fault:`overflow`,value:e});return n}function cG(e,t){return uG(e,`value`)&(iG<<BigInt(pG(t,`bits`)))-iG}function lG(e,t){switch(typeof e){case`bigint`:return e;case`number`:return J(Number.isInteger(e),`underflow`,t||`value`,e),J(e>=-9007199254740991&&e<=aG,`overflow`,t||`value`,e),BigInt(e);case`string`:try{if(e===``)throw Error(`empty string`);return e[0]===`-`&&e[1]!==`-`?-BigInt(e.substring(1)):BigInt(e)}catch(n){J(!1,`invalid BigNumberish string: ${n.message}`,t||`value`,e)}}J(!1,`invalid BigNumberish value`,t||`value`,e)}function uG(e,t){let n=lG(e,t);return VW(n>=rG,`unsigned value cannot be negative`,`NUMERIC_FAULT`,{fault:`overflow`,operation:`getUint`,value:e}),n}var dG=`0123456789abcdef`;function fG(e){if(e instanceof Uint8Array){let t=`0x0`;for(let n of e)t+=dG[n>>4],t+=dG[n&15];return BigInt(t)}return lG(e)}function pG(e,t){switch(typeof e){case`bigint`:return J(e>=-9007199254740991&&e<=aG,`overflow`,t||`value`,e),Number(e);case`number`:return J(Number.isInteger(e),`underflow`,t||`value`,e),J(e>=-9007199254740991&&e<=aG,`overflow`,t||`value`,e),e;case`string`:try{if(e===``)throw Error(`empty string`);return pG(BigInt(e),t)}catch(n){J(!1,`invalid numeric string: ${n.message}`,t||`value`,e)}}J(!1,`invalid numeric value`,t||`value`,e)}function mG(e){return pG(fG(e))}function hG(e,t){let n=uG(e,`value`).toString(16);if(t==null)n.length%2&&(n=`0`+n);else{let r=pG(t,`width`);for(VW(r*2>=n.length,`value exceeds width (${r} bytes)`,`NUMERIC_FAULT`,{operation:`toBeHex`,fault:`overflow`,value:e});n.length<r*2;)n=`0`+n}return`0x`+n}function gG(e){let t=uG(e,`value`);if(t===rG)return new Uint8Array([]);let n=t.toString(16);n.length%2&&(n=`0`+n);let r=new Uint8Array(n.length/2);for(let e=0;e<r.length;e++){let t=e*2;r[e]=parseInt(n.substring(t,t+2),16)}return r}function _G(e){let t=Y(XW(e)?e:gG(e)).substring(2);for(;t.startsWith(`0`);)t=t.substring(1);return t===``&&(t=`0`),`0x`+t}var vG=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`,yG=null;function bG(e){if(yG==null){yG={};for(let e=0;e<58;e++)yG[vG[e]]=BigInt(e)}let t=yG[e];return J(t!=null,`invalid base58 value`,`letter`,e),t}var xG=BigInt(0),SG=BigInt(58);function CG(e){let t=qW(e),n=fG(t),r=``;for(;n;)r=vG[Number(n%SG)]+r,n/=SG;for(let e=0;e<t.length&&!t[e];e++)r=vG[0]+r;return r}function wG(e){let t=xG;for(let n=0;n<e.length;n++)t*=SG,t+=bG(e[n]);return t}function TG(e,t,n,r,i){J(!1,`invalid codepoint at offset ${t}; ${e}`,`bytes`,n)}function EG(e,t,n,r,i){if(e===`BAD_PREFIX`||e===`UNEXPECTED_CONTINUE`){let e=0;for(let r=t+1;r<n.length&&n[r]>>6==2;r++)e++;return e}return e===`OVERRUN`?n.length-t-1:0}function DG(e,t,n,r,i){return e===`OVERLONG`?(J(typeof i==`number`,`invalid bad code point for replacement`,`badCodepoint`,i),r.push(i),0):(r.push(65533),EG(e,t,n,r,i))}var OG=Object.freeze({error:TG,ignore:EG,replace:DG});function kG(e,t){t??=OG.error;let n=qW(e,`bytes`),r=[],i=0;for(;i<n.length;){let e=n[i++];if(!(e>>7)){r.push(e);continue}let a=null,o=null;if((e&224)==192)a=1,o=127;else if((e&240)==224)a=2,o=2047;else if((e&248)==240)a=3,o=65535;else{(e&192)==128?i+=t(`UNEXPECTED_CONTINUE`,i-1,n,r):i+=t(`BAD_PREFIX`,i-1,n,r);continue}if(i-1+a>=n.length){i+=t(`OVERRUN`,i-1,n,r);continue}let s=e&(1<<8-a-1)-1;for(let e=0;e<a;e++){let e=n[i];if((e&192)!=128){i+=t(`MISSING_CONTINUE`,i,n,r),s=null;break}s=s<<6|e&63,i++}if(s!==null){if(s>1114111){i+=t(`OUT_OF_RANGE`,i-1-a,n,r,s);continue}if(s>=55296&&s<=57343){i+=t(`UTF16_SURROGATE`,i-1-a,n,r,s);continue}if(s<=o){i+=t(`OVERLONG`,i-1-a,n,r,s);continue}r.push(s)}}return r}function AG(e,t){J(typeof e==`string`,`invalid string value`,`str`,e),t!=null&&(WW(t),e=e.normalize(t));let n=[];for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<128)n.push(r);else if(r<2048)n.push(r>>6|192),n.push(r&63|128);else if((r&64512)==55296){t++;let i=e.charCodeAt(t);J(t<e.length&&(i&64512)==56320,`invalid surrogate pair`,`str`,e);let a=65536+((r&1023)<<10)+(i&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(r>>12|224),n.push(r>>6&63|128),n.push(r&63|128)}return new Uint8Array(n)}function jG(e){return e.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join(``)}function MG(e,t){return jG(kG(e,t))}function NG(e){let t=e.toString(16);for(;t.length<2;)t=`0`+t;return`0x`+t}function PG(e,t,n){let r=0;for(let i=0;i<n;i++)r=r*256+e[t+i];return r}function FG(e,t,n,r){let i=[];for(;n<t+1+r;){let a=IG(e,n);i.push(a.result),n+=a.consumed,VW(n<=t+1+r,`child data too short`,`BUFFER_OVERRUN`,{buffer:e,length:r,offset:t})}return{consumed:1+r,result:i}}function IG(e,t){VW(e.length!==0,`data too short`,`BUFFER_OVERRUN`,{buffer:e,length:0,offset:1});let n=t=>{VW(t<=e.length,`data short segment too short`,`BUFFER_OVERRUN`,{buffer:e,length:e.length,offset:t})};if(e[t]>=248){let r=e[t]-247;n(t+1+r);let i=PG(e,t+1,r);return n(t+1+r+i),FG(e,t,t+1+r,r+i)}else if(e[t]>=192){let r=e[t]-192;return n(t+1+r),FG(e,t,t+1,r)}else if(e[t]>=184){let r=e[t]-183;n(t+1+r);let i=PG(e,t+1,r);n(t+1+r+i);let a=Y(e.slice(t+1+r,t+1+r+i));return{consumed:1+r+i,result:a}}else if(e[t]>=128){let r=e[t]-128;n(t+1+r);let i=Y(e.slice(t+1,t+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:NG(e[t])}}function LG(e){let t=qW(e,`data`),n=IG(t,0);return J(n.consumed===t.length,`unexpected junk after rlp payload`,`data`,e),n.result}function RG(e){let t=[];for(;e;)t.unshift(e&255),e>>=8;return t}function zG(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(zG(e))}),t.length<=55)return t.unshift(192+t.length),t;let n=RG(t.length);return n.unshift(247+n.length),n.concat(t)}let t=Array.prototype.slice.call(qW(e,`object`));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;let n=RG(t.length);return n.unshift(183+n.length),n.concat(t)}var BG=`0123456789abcdef`;function VG(e){let t=`0x`;for(let n of zG(e))t+=BG[n>>4],t+=BG[n&15];return t}function HG(e){let t=qW(e,`randomBytes`);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Y(t);return[n.substring(2,10),n.substring(10,14),n.substring(14,18),n.substring(18,22),n.substring(22,34)].join(`-`)}var UG=new Uint8Array(32),WG=[`then`],GG={},KG=new WeakMap;function qG(e){return KG.get(e)}function JG(e,t){KG.set(e,t)}function YG(e,t){let n=Error(`deferred error during ABI decoding triggered accessing ${e}`);throw n.error=t,n}function XG(e,t,n){return e.indexOf(null)>=0?t.map((e,t)=>e instanceof ZG?XG(qG(e),e,n):e):e.reduce((e,r,i)=>{let a=t.getValue(r);return r in e||(n&&a instanceof ZG&&(a=XG(qG(a),a,n)),e[r]=a),e},{})}var ZG=class e extends Array{#e;constructor(...e){let t=e[0],n=e[1],r=(e[2]||[]).slice(),i=!0;t!==GG&&(n=e,r=[],i=!1),super(n.length),n.forEach((e,t)=>{this[t]=e});let a=r.reduce((e,t)=>(typeof t==`string`&&e.set(t,(e.get(t)||0)+1),e),new Map);if(JG(this,Object.freeze(n.map((e,t)=>{let n=r[t];return n!=null&&a.get(n)===1?n:null}))),this.#e=[],this.#e??this.#e,!i)return;Object.freeze(this);let o=new Proxy(this,{get:(e,t,n)=>{if(typeof t==`string`){if(t.match(/^[0-9]+$/)){let n=pG(t,`%index`);if(n<0||n>=this.length)throw RangeError(`out of result range`);let r=e[n];return r instanceof Error&&YG(`index ${n}`,r),r}if(WG.indexOf(t)>=0)return Reflect.get(e,t,n);let r=e[t];if(r instanceof Function)return function(...t){return r.apply(this===n?e:this,t)};if(!(t in e))return e.getValue.apply(this===n?e:this,[t])}return Reflect.get(e,t,n)}});return JG(o,qG(this)),o}toArray(t){let n=[];return this.forEach((r,i)=>{r instanceof Error&&YG(`index ${i}`,r),t&&r instanceof e&&(r=r.toArray(t)),n.push(r)}),n}toObject(e){let t=qG(this);return t.reduce((n,r,i)=>(VW(r!=null,`value at index ${i} unnamed`,`UNSUPPORTED_OPERATION`,{operation:`toObject()`}),XG(t,this,e)),{})}slice(t,n){t??=0,t<0&&(t+=this.length,t<0&&(t=0)),n??=this.length,n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);let r=qG(this),i=[],a=[];for(let e=t;e<n;e++)i.push(this[e]),a.push(r[e]);return new e(GG,i,a)}filter(t,n){let r=qG(this),i=[],a=[];for(let e=0;e<this.length;e++){let o=this[e];o instanceof Error&&YG(`index ${e}`,o),t.call(n,o,e,this)&&(i.push(o),a.push(r[e]))}return new e(GG,i,a)}map(e,t){let n=[];for(let r=0;r<this.length;r++){let i=this[r];i instanceof Error&&YG(`index ${r}`,i),n.push(e.call(t,i,r,this))}return n}getValue(e){let t=qG(this).indexOf(e);if(t===-1)return;let n=this[t];return n instanceof Error&&YG(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(t,n){return new e(GG,t,n)}};function QG(e){let t=gG(e);return VW(t.length<=32,`value out-of-bounds`,`BUFFER_OVERRUN`,{buffer:t,length:32,offset:t.length}),t.length!==32&&(t=JW(QW([UG.slice(t.length%32),t]))),t}var $G=class{name;type;localName;dynamic;constructor(e,t,n,r){LW(this,{name:e,type:t,localName:n,dynamic:r},{name:`string`,type:`string`,localName:`string`,dynamic:`boolean`})}_throwError(e,t){J(!1,e,this.localName,t)}},eK=class{#e;#t;constructor(){this.#e=[],this.#t=0}get data(){return QW(this.#e)}get length(){return this.#t}#n(e){return this.#e.push(e),this.#t+=e.length,e.length}appendWriter(e){return this.#n(JW(e.data))}writeBytes(e){let t=JW(e),n=t.length%32;return n&&(t=JW(QW([t,UG.slice(n)]))),this.#n(t)}writeValue(e){return this.#n(QG(e))}writeUpdatableValue(){let e=this.#e.length;return this.#e.push(UG),this.#t+=32,t=>{this.#e[e]=QG(t)}}},tK=class e{allowLoose;#e;#t;#n;#r;#i;constructor(e,t,n){LW(this,{allowLoose:!!t}),this.#e=JW(e),this.#n=0,this.#r=null,this.#i=n??1024,this.#t=0}get data(){return Y(this.#e)}get dataLength(){return this.#e.length}get consumed(){return this.#t}get bytes(){return new Uint8Array(this.#e)}#a(e){if(this.#r)return this.#r.#a(e);this.#n+=e,VW(this.#i<1||this.#n<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https:/\/github.com/ethers-io/ethers.js/issues/4537 )`,`BUFFER_OVERRUN`,{buffer:JW(this.#e),offset:this.#t,length:e,info:{bytesRead:this.#n,dataLength:this.dataLength}})}#o(e,t,n){let r=Math.ceil(t/32)*32;return this.#t+r>this.#e.length&&(this.allowLoose&&n&&this.#t+t<=this.#e.length?r=t:VW(!1,`data out-of-bounds`,`BUFFER_OVERRUN`,{buffer:JW(this.#e),length:this.#e.length,offset:this.#t+r})),this.#e.slice(this.#t,this.#t+r)}subReader(t){let n=new e(this.#e.slice(this.#t+t),this.allowLoose,this.#i);return n.#r=this,n}readBytes(e,t){let n=this.#o(0,e,!!t);return this.#a(e),this.#t+=n.length,n.slice(0,e)}readValue(){return fG(this.readBytes(32))}readIndex(){return mG(this.readBytes(32))}};function nK(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Wrong positive integer: ${e}`)}function rK(e,...t){if(!(e instanceof Uint8Array))throw Error(`Expected Uint8Array`);if(t.length>0&&!t.includes(e.length))throw Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function iK(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.wrapConstructor`);nK(e.outputLen),nK(e.blockLen)}function aK(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function oK(e,t){rK(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}var sK=typeof globalThis==`object`&&`crypto`in globalThis?globalThis.crypto:void 0,cK=e=>e instanceof Uint8Array,lK=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),uK=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),dK=(e,t)=>e<<32-t|e>>>t;if(new Uint8Array(new Uint32Array([287454020]).buffer)[0]!==68)throw Error(`Non little-endian hardware is not supported`);var fK=async()=>{};async function pK(e,t,n){let r=Date.now();for(let i=0;i<e;i++){n(i);let e=Date.now()-r;e>=0&&e<t||(await fK(),r+=e)}}function mK(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function hK(e){if(typeof e==`string`&&(e=mK(e)),!cK(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}function gK(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;return e.forEach(e=>{if(!cK(e))throw Error(`Uint8Array expected`);t.set(e,n),n+=e.length}),t}var _K=class{clone(){return this._cloneInto()}},vK={}.toString;function yK(e,t){if(t!==void 0&&vK.call(t)!==`[object Object]`)throw Error(`Options should be object or undefined`);return Object.assign(e,t)}function bK(e){let t=t=>e().update(hK(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function xK(e=32){if(sK&&typeof sK.getRandomValues==`function`)return sK.getRandomValues(new Uint8Array(e));throw Error(`crypto.getRandomValues must be defined`)}var SK=class extends _K{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,iK(e);let n=hK(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return aK(this),this.iHash.update(e),this}digestInto(e){aK(this),rK(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},CK=(e,t,n)=>new SK(e,t).update(n).digest();CK.create=(e,t)=>new SK(e,t);function wK(e,t,n,r){iK(e);let{c:i,dkLen:a,asyncTick:o}=yK({dkLen:32,asyncTick:10},r);if(nK(i),nK(a),nK(o),i<1)throw Error(`PBKDF2: iterations (c) should be >= 1`);let s=hK(t),c=hK(n),l=new Uint8Array(a),u=CK.create(e,s);return{c:i,dkLen:a,asyncTick:o,DK:l,PRF:u,PRFSalt:u._cloneInto().update(c)}}function TK(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}function EK(e,t,n,r){let{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=wK(e,t,n,r),l,u=new Uint8Array(4),d=uK(u),f=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){let n=o.subarray(t,t+s.outputLen);d.setInt32(0,e,!1),(l=c._cloneInto(l)).update(u).digestInto(f),n.set(f.subarray(0,n.length));for(let e=1;e<i;e++){s._cloneInto(l).update(f).digestInto(f);for(let e=0;e<n.length;e++)n[e]^=f[e]}}return TK(s,c,o,l,f)}function DK(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}var OK=class extends _K{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=uK(this.buffer)}update(e){aK(this);let{view:t,buffer:n,blockLen:r}=this;e=hK(e);let i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=uK(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){aK(this),oK(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;DK(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=uK(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}},kK=(e,t,n)=>e&t^~e&n,AK=(e,t,n)=>e&t^e&n^t&n,jK=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),MK=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),NK=new Uint32Array(64),PK=class extends OK{constructor(){super(64,32,8,!1),this.A=MK[0]|0,this.B=MK[1]|0,this.C=MK[2]|0,this.D=MK[3]|0,this.E=MK[4]|0,this.F=MK[5]|0,this.G=MK[6]|0,this.H=MK[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)NK[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=NK[e-15],n=NK[e-2],r=dK(t,7)^dK(t,18)^t>>>3;NK[e]=(dK(n,17)^dK(n,19)^n>>>10)+NK[e-7]+r+NK[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=dK(o,6)^dK(o,11)^dK(o,25),u=l+t+kK(o,s,c)+jK[e]+NK[e]|0,d=(dK(n,2)^dK(n,13)^dK(n,22))+AK(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){NK.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},FK=bK(()=>new PK),IK=BigInt(2**32-1),LK=BigInt(32);function RK(e,t=!1){return t?{h:Number(e&IK),l:Number(e>>LK&IK)}:{h:Number(e>>LK&IK)|0,l:Number(e&IK)|0}}function zK(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:a,l:o}=RK(e[i],t);[n[i],r[i]]=[a,o]}return[n,r]}var BK=(e,t)=>BigInt(e>>>0)<<LK|BigInt(t>>>0),VK=(e,t,n)=>e>>>n,HK=(e,t,n)=>e<<32-n|t>>>n,UK=(e,t,n)=>e>>>n|t<<32-n,WK=(e,t,n)=>e<<32-n|t>>>n,GK=(e,t,n)=>e<<64-n|t>>>n-32,KK=(e,t,n)=>e>>>n-32|t<<64-n,qK=(e,t)=>t,JK=(e,t)=>e,YK=(e,t,n)=>e<<n|t>>>32-n,XK=(e,t,n)=>t<<n|e>>>32-n,ZK=(e,t,n)=>t<<n-32|e>>>64-n,QK=(e,t,n)=>e<<n-32|t>>>64-n;function $K(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}var eq={fromBig:RK,split:zK,toBig:BK,shrSH:VK,shrSL:HK,rotrSH:UK,rotrSL:WK,rotrBH:GK,rotrBL:KK,rotr32H:qK,rotr32L:JK,rotlSH:YK,rotlSL:XK,rotlBH:ZK,rotlBL:QK,add:$K,add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,add5H:(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,add5L:(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)},[tq,nq]=eq.split(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),rq=new Uint32Array(80),iq=new Uint32Array(80),aq=class extends OK{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)rq[n]=e.getUint32(t),iq[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=rq[e-15]|0,n=iq[e-15]|0,r=eq.rotrSH(t,n,1)^eq.rotrSH(t,n,8)^eq.shrSH(t,n,7),i=eq.rotrSL(t,n,1)^eq.rotrSL(t,n,8)^eq.shrSL(t,n,7),a=rq[e-2]|0,o=iq[e-2]|0,s=eq.rotrSH(a,o,19)^eq.rotrBH(a,o,61)^eq.shrSH(a,o,6),c=eq.rotrSL(a,o,19)^eq.rotrBL(a,o,61)^eq.shrSL(a,o,6),l=eq.add4L(i,c,iq[e-7],iq[e-16]);rq[e]=eq.add4H(l,r,s,rq[e-7],rq[e-16])|0,iq[e]=l|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=eq.rotrSH(u,d,14)^eq.rotrSH(u,d,18)^eq.rotrBH(u,d,41),v=eq.rotrSL(u,d,14)^eq.rotrSL(u,d,18)^eq.rotrBL(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=eq.add5L(_,v,b,nq[e],iq[e]),S=eq.add5H(x,g,t,y,tq[e],rq[e]),C=x|0,w=eq.rotrSH(n,r,28)^eq.rotrBH(n,r,34)^eq.rotrBH(n,r,39),T=eq.rotrSL(n,r,28)^eq.rotrBL(n,r,34)^eq.rotrBL(n,r,39),E=n&i^n&o^i&o,D=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=eq.add(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let O=eq.add3L(C,T,D);n=eq.add3H(O,S,w,E),r=O|0}({h:n,l:r}=eq.add(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=eq.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=eq.add(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=eq.add(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=eq.add(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=eq.add(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=eq.add(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=eq.add(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){rq.fill(0),iq.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)}},oq=bK(()=>new aq);function sq(){if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)}var cq=sq(),lq=cq.crypto||cq.msCrypto;function uq(e){switch(e){case`sha256`:return FK.create();case`sha512`:return oq.create()}J(!1,`invalid hashing algorithm name`,`algorithm`,e)}function dq(e,t){let n={sha256:FK,sha512:oq}[e];return J(n!=null,`invalid hmac algorithm`,`algorithm`,e),CK.create(n,t)}function fq(e,t,n,r,i){let a={sha256:FK,sha512:oq}[i];return J(a!=null,`invalid pbkdf2 algorithm`,`algorithm`,i),EK(a,e,t,{c:n,dkLen:r})}function pq(e){VW(lq!=null,`platform does not support secure random numbers`,`UNSUPPORTED_OPERATION`,{operation:`randomBytes`}),J(Number.isInteger(e)&&e>0&&e<=1024,`invalid length`,`length`,e);let t=new Uint8Array(e);return lq.getRandomValues(t),t}var mq=!1,hq=function(e,t,n){return dq(e,t).update(n).digest()},gq=hq;function _q(e,t,n){let r=qW(t,`key`),i=qW(n,`data`);return Y(gq(e,r,i))}_q._=hq,_q.lock=function(){mq=!0},_q.register=function(e){if(mq)throw Error(`computeHmac is locked`);gq=e},Object.freeze(_q);var[vq,yq,bq]=[[],[],[]],xq=BigInt(0),Sq=BigInt(1),Cq=BigInt(2),wq=BigInt(7),Tq=BigInt(256),Eq=BigInt(113);for(let e=0,t=Sq,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],vq.push(2*(5*r+n)),yq.push((e+1)*(e+2)/2%64);let i=xq;for(let e=0;e<7;e++)t=(t<<Sq^(t>>wq)*Eq)%Tq,t&Cq&&(i^=Sq<<(Sq<<BigInt(e))-Sq);bq.push(i)}var[Dq,Oq]=zK(bq,!0),kq=(e,t,n)=>n>32?ZK(e,t,n):YK(e,t,n),Aq=(e,t,n)=>n>32?QK(e,t,n):XK(e,t,n);function jq(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],o=n[i+1],s=kq(a,o,1)^n[r],c=Aq(a,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=yq[n],a=kq(t,i,r),o=Aq(t,i,r),s=vq[n];t=e[s],i=e[s+1],e[s]=a,e[s+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=Dq[r],e[1]^=Oq[r]}n.fill(0)}var Mq=class e extends _K{constructor(e,t,n,r=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,nK(n),0>=this.blockLen||this.blockLen>=200)throw Error(`Sha3 supports only keccak-f1600 function`);this.state=new Uint8Array(200),this.state32=lK(this.state)}keccak(){jq(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){aK(this);let{blockLen:t,state:n}=this;e=hK(e);let r=e.length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,t&128&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){aK(this,!1),rK(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error(`XOF is not possible for this instance`);return this.writeInto(e)}xof(e){return nK(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(oK(e,this),this.finished)throw 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(t){let{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return t||=new e(n,r,i,o,a),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}},Nq=((e,t,n)=>bK(()=>new Mq(t,e,n)))(1,136,256/8),Pq=!1,Fq=function(e){return Nq(e)},Iq=Fq;function Lq(e){let t=qW(e,`data`);return Y(Iq(t))}Lq._=Fq,Lq.lock=function(){Pq=!0},Lq.register=function(e){if(Pq)throw TypeError(`keccak256 is locked`);Iq=e},Object.freeze(Lq);var Rq=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),zq=Uint8Array.from({length:16},(e,t)=>t),Bq=zq.map(e=>(9*e+5)%16),Vq=[zq],Hq=[Bq];for(let e=0;e<4;e++)for(let t of[Vq,Hq])t.push(t[e].map(e=>Rq[e]));var Uq=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),Wq=Vq.map((e,t)=>e.map(e=>Uq[t][e])),Gq=Hq.map((e,t)=>e.map(e=>Uq[t][e])),Kq=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),qq=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Jq=(e,t)=>e<<t|e>>>32-t;function Yq(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}var Xq=new Uint32Array(16),Zq=class extends OK{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:e,h1:t,h2:n,h3:r,h4:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.h0=e|0,this.h1=t|0,this.h2=n|0,this.h3=r|0,this.h4=i|0}process(e,t){for(let n=0;n<16;n++,t+=4)Xq[n]=e.getUint32(t,!0);let n=this.h0|0,r=n,i=this.h1|0,a=i,o=this.h2|0,s=o,c=this.h3|0,l=c,u=this.h4|0,d=u;for(let e=0;e<5;e++){let t=4-e,f=Kq[e],p=qq[e],m=Vq[e],h=Hq[e],g=Wq[e],_=Gq[e];for(let t=0;t<16;t++){let r=Jq(n+Yq(e,i,o,c)+Xq[m[t]]+f,g[t])+u|0;n=u,u=c,c=Jq(o,10)|0,o=i,i=r}for(let e=0;e<16;e++){let n=Jq(r+Yq(t,a,s,l)+Xq[h[e]]+p,_[e])+d|0;r=d,d=l,l=Jq(s,10)|0,s=a,a=n}}this.set(this.h1+o+l|0,this.h2+c+d|0,this.h3+u+r|0,this.h4+n+a|0,this.h0+i+s|0)}roundClean(){Xq.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}},Qq=bK(()=>new Zq),$q=!1,eJ=function(e){return Qq(e)},tJ=eJ;function nJ(e){let t=qW(e,`data`);return Y(tJ(t))}nJ._=eJ,nJ.lock=function(){$q=!0},nJ.register=function(e){if($q)throw TypeError(`ripemd160 is locked`);tJ=e},Object.freeze(nJ);var rJ=!1,iJ=function(e,t,n,r,i){return fq(e,t,n,r,i)},aJ=iJ;function oJ(e,t,n,r,i){let a=qW(e,`password`),o=qW(t,`salt`);return Y(aJ(a,o,n,r,i))}oJ._=iJ,oJ.lock=function(){rJ=!0},oJ.register=function(e){if(rJ)throw Error(`pbkdf2 is locked`);aJ=e},Object.freeze(oJ);var sJ=!1,cJ=function(e){return new Uint8Array(pq(e))},lJ=cJ;function uJ(e){return lJ(e)}uJ._=cJ,uJ.lock=function(){sJ=!0},uJ.register=function(e){if(sJ)throw Error(`randomBytes is locked`);lJ=e},Object.freeze(uJ);var dJ=(e,t)=>e<<t|e>>>32-t;function fJ(e,t,n,r,i,a){let o=e[t++]^n[r++],s=e[t++]^n[r++],c=e[t++]^n[r++],l=e[t++]^n[r++],u=e[t++]^n[r++],d=e[t++]^n[r++],f=e[t++]^n[r++],p=e[t++]^n[r++],m=e[t++]^n[r++],h=e[t++]^n[r++],g=e[t++]^n[r++],_=e[t++]^n[r++],v=e[t++]^n[r++],y=e[t++]^n[r++],b=e[t++]^n[r++],x=e[t++]^n[r++],S=o,C=s,w=c,T=l,E=u,D=d,O=f,k=p,A=m,j=h,M=g,N=_,ee=v,te=y,P=b,F=x;for(let e=0;e<8;e+=2)E^=dJ(S+ee|0,7),A^=dJ(E+S|0,9),ee^=dJ(A+E|0,13),S^=dJ(ee+A|0,18),j^=dJ(D+C|0,7),te^=dJ(j+D|0,9),C^=dJ(te+j|0,13),D^=dJ(C+te|0,18),P^=dJ(M+O|0,7),w^=dJ(P+M|0,9),O^=dJ(w+P|0,13),M^=dJ(O+w|0,18),T^=dJ(F+N|0,7),k^=dJ(T+F|0,9),N^=dJ(k+T|0,13),F^=dJ(N+k|0,18),C^=dJ(S+T|0,7),w^=dJ(C+S|0,9),T^=dJ(w+C|0,13),S^=dJ(T+w|0,18),O^=dJ(D+E|0,7),k^=dJ(O+D|0,9),E^=dJ(k+O|0,13),D^=dJ(E+k|0,18),N^=dJ(M+j|0,7),A^=dJ(N+M|0,9),j^=dJ(A+N|0,13),M^=dJ(j+A|0,18),ee^=dJ(F+P|0,7),te^=dJ(ee+F|0,9),P^=dJ(te+ee|0,13),F^=dJ(P+te|0,18);i[a++]=o+S|0,i[a++]=s+C|0,i[a++]=c+w|0,i[a++]=l+T|0,i[a++]=u+E|0,i[a++]=d+D|0,i[a++]=f+O|0,i[a++]=p+k|0,i[a++]=m+A|0,i[a++]=h+j|0,i[a++]=g+M|0,i[a++]=_+N|0,i[a++]=v+ee|0,i[a++]=y+te|0,i[a++]=b+P|0,i[a++]=x+F|0}function pJ(e,t,n,r,i){let a=r+0,o=r+16*i;for(let r=0;r<16;r++)n[o+r]=e[t+(2*i-1)*16+r];for(let r=0;r<i;r++,a+=16,t+=16)fJ(n,o,e,t,n,a),r>0&&(o+=16),fJ(n,a,e,t+=16,n,o)}function mJ(e,t,n){let{N:r,r:i,p:a,dkLen:o,asyncTick:s,maxmem:c,onProgress:l}=yK({dkLen:32,asyncTick:10,maxmem:1024**3+1024},n);if(nK(r),nK(i),nK(a),nK(o),nK(s),nK(c),l!==void 0&&typeof l!=`function`)throw Error(`progressCb should be function`);let u=128*i,d=u/4;if(r<=1||r&r-1||r>=2**(u/8)||r>2**32)throw Error(`Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32`);if(a<0||a>(2**32-1)*32/u)throw Error(`Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)`);if(o<0||o>(2**32-1)*32)throw Error(`Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32`);let f=u*(r+a);if(f>c)throw Error(`Scrypt: parameters too large, ${f} (128 * r * (N + p)) > ${c} (maxmem)`);let p=EK(FK,e,t,{c:1,dkLen:u*a}),m=lK(p),h=lK(new Uint8Array(u*r)),g=lK(new Uint8Array(u)),_=()=>{};if(l){let e=2*r*a,t=Math.max(Math.floor(e/1e4),1),n=0;_=()=>{n++,l&&(!(n%t)||n===e)&&l(n/e)}}return{N:r,r:i,p:a,dkLen:o,blockSize32:d,V:h,B32:m,B:p,tmp:g,blockMixCb:_,asyncTick:s}}function hJ(e,t,n,r,i){let a=EK(FK,e,n,{c:1,dkLen:t});return n.fill(0),r.fill(0),i.fill(0),a}function gJ(e,t,n){let{N:r,r:i,p:a,dkLen:o,blockSize32:s,V:c,B32:l,B:u,tmp:d,blockMixCb:f}=mJ(e,t,n);for(let e=0;e<a;e++){let t=s*e;for(let e=0;e<s;e++)c[e]=l[t+e];for(let e=0,t=0;e<r-1;e++)pJ(c,t,c,t+=s,i),f();pJ(c,(r-1)*s,l,t,i),f();for(let e=0;e<r;e++){let e=l[t+s-16]%r;for(let n=0;n<s;n++)d[n]=l[t+n]^c[e*s+n];pJ(d,0,l,t,i),f()}}return hJ(e,o,u,c,d)}async function _J(e,t,n){let{N:r,r:i,p:a,dkLen:o,blockSize32:s,V:c,B32:l,B:u,tmp:d,blockMixCb:f,asyncTick:p}=mJ(e,t,n);for(let e=0;e<a;e++){let t=s*e;for(let e=0;e<s;e++)c[e]=l[t+e];let n=0;await pK(r-1,p,()=>{pJ(c,n,c,n+=s,i),f()}),pJ(c,(r-1)*s,l,t,i),f(),await pK(r,p,()=>{let e=l[t+s-16]%r;for(let n=0;n<s;n++)d[n]=l[t+n]^c[e*s+n];pJ(d,0,l,t,i),f()})}return hJ(e,o,u,c,d)}var vJ=!1,yJ=!1,bJ=async function(e,t,n,r,i,a,o){return await _J(e,t,{N:n,r,p:i,dkLen:a,onProgress:o})},xJ=function(e,t,n,r,i,a){return gJ(e,t,{N:n,r,p:i,dkLen:a})},SJ=bJ,CJ=xJ;async function wJ(e,t,n,r,i,a,o){let s=qW(e,`passwd`),c=qW(t,`salt`);return Y(await SJ(s,c,n,r,i,a,o))}wJ._=bJ,wJ.lock=function(){yJ=!0},wJ.register=function(e){if(yJ)throw Error(`scrypt is locked`);SJ=e},Object.freeze(wJ);function TJ(e,t,n,r,i,a){let o=qW(e,`passwd`),s=qW(t,`salt`);return Y(CJ(o,s,n,r,i,a))}TJ._=xJ,TJ.lock=function(){vJ=!0},TJ.register=function(e){if(vJ)throw Error(`scryptSync is locked`);CJ=e},Object.freeze(TJ);var EJ=function(e){return uq(`sha256`).update(e).digest()},DJ=function(e){return uq(`sha512`).update(e).digest()},OJ=EJ,kJ=DJ,AJ=!1,jJ=!1;function MJ(e){let t=qW(e,`data`);return Y(OJ(t))}MJ._=EJ,MJ.lock=function(){AJ=!0},MJ.register=function(e){if(AJ)throw Error(`sha256 is locked`);OJ=e},Object.freeze(MJ);function NJ(e){let t=qW(e,`data`);return Y(kJ(t))}NJ._=DJ,NJ.lock=function(){jJ=!0},NJ.register=function(e){if(jJ)throw Error(`sha512 is locked`);kJ=e},Object.freeze(MJ);var PJ=c({bitGet:()=>eY,bitLen:()=>$J,bitMask:()=>nY,bitSet:()=>tY,bytesToHex:()=>BJ,bytesToNumberBE:()=>WJ,bytesToNumberLE:()=>GJ,concatBytes:()=>XJ,createHmacDrbg:()=>aY,ensureBytes:()=>YJ,equalBytes:()=>ZJ,hexToBytes:()=>UJ,hexToNumber:()=>HJ,numberToBytesBE:()=>KJ,numberToBytesLE:()=>qJ,numberToHexUnpadded:()=>VJ,numberToVarBytesBE:()=>JJ,utf8ToBytes:()=>QJ,validateObject:()=>sY}),FJ=BigInt(0),IJ=BigInt(1),LJ=BigInt(2),RJ=e=>e instanceof Uint8Array,zJ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function BJ(e){if(!RJ(e))throw Error(`Uint8Array expected`);let t=``;for(let n=0;n<e.length;n++)t+=zJ[e[n]];return t}function VJ(e){let t=e.toString(16);return t.length&1?`0${t}`:t}function HJ(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);return BigInt(e===``?`0`:`0x${e}`)}function UJ(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);let t=e.length;if(t%2)throw Error(`padded hex string expected, got unpadded hex of length `+t);let n=new Uint8Array(t/2);for(let t=0;t<n.length;t++){let r=t*2,i=e.slice(r,r+2),a=Number.parseInt(i,16);if(Number.isNaN(a)||a<0)throw Error(`Invalid byte sequence`);n[t]=a}return n}function WJ(e){return HJ(BJ(e))}function GJ(e){if(!RJ(e))throw Error(`Uint8Array expected`);return HJ(BJ(Uint8Array.from(e).reverse()))}function KJ(e,t){return UJ(e.toString(16).padStart(t*2,`0`))}function qJ(e,t){return KJ(e,t).reverse()}function JJ(e){return UJ(VJ(e))}function YJ(e,t,n){let r;if(typeof t==`string`)try{r=UJ(t)}catch(n){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${n}`)}else if(RJ(t))r=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=r.length;if(typeof n==`number`&&i!==n)throw Error(`${e} expected ${n} bytes, got ${i}`);return r}function XJ(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;return e.forEach(e=>{if(!RJ(e))throw Error(`Uint8Array expected`);t.set(e,n),n+=e.length}),t}function ZJ(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function QJ(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function $J(e){let t;for(t=0;e>FJ;e>>=IJ,t+=1);return t}function eY(e,t){return e>>BigInt(t)&IJ}var tY=(e,t,n)=>e|(n?IJ:FJ)<<BigInt(t),nY=e=>(LJ<<BigInt(e-1))-IJ,rY=e=>new Uint8Array(e),iY=e=>Uint8Array.from(e);function aY(e,t,n){if(typeof e!=`number`||e<2)throw Error(`hashLen must be a number`);if(typeof t!=`number`||t<2)throw Error(`qByteLen must be a number`);if(typeof n!=`function`)throw Error(`hmacFn must be a function`);let r=rY(e),i=rY(e),a=0,o=()=>{r.fill(1),i.fill(0),a=0},s=(...e)=>n(i,r,...e),c=(e=rY())=>{i=s(iY([0]),e),r=s(),e.length!==0&&(i=s(iY([1]),e),r=s())},l=()=>{if(a++>=1e3)throw Error(`drbg: tried 1000 values`);let e=0,n=[];for(;e<t;){r=s();let t=r.slice();n.push(t),e+=r.length}return XJ(...n)};return(e,t)=>{o(),c(e);let n;for(;!(n=t(l()));)c();return o(),n}}var oY={bigint:e=>typeof e==`bigint`,function:e=>typeof e==`function`,boolean:e=>typeof e==`boolean`,string:e=>typeof e==`string`,stringOrUint8Array:e=>typeof e==`string`||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e==`function`&&Number.isSafeInteger(e.outputLen)};function sY(e,t,n={}){let r=(t,n,r)=>{let i=oY[n];if(typeof i!=`function`)throw Error(`Invalid validator "${n}", expected function`);let a=e[t];if(!(r&&a===void 0)&&!i(a,e))throw Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}var cY=BigInt(0),lY=BigInt(1),uY=BigInt(2),dY=BigInt(3),fY=BigInt(4),pY=BigInt(5),mY=BigInt(8),hY=BigInt(16);function gY(e,t){let n=e%t;return n>=cY?n:t+n}function _Y(e,t,n){if(n<=cY||t<cY)throw Error(`Expected power/modulo > 0`);if(n===lY)return cY;let r=lY;for(;t>cY;)t&lY&&(r=r*e%n),e=e*e%n,t>>=lY;return r}function vY(e,t,n){let r=e;for(;t-- >cY;)r*=r,r%=n;return r}function yY(e,t){if(e===cY||t<=cY)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=gY(e,t),r=t,i=cY,a=lY,o=lY,s=cY;for(;n!==cY;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}if(r!==lY)throw Error(`invert: does not exist`);return gY(i,t)}function bY(e){let t=(e-lY)/uY,n,r,i;for(n=e-lY,r=0;n%uY===cY;n/=uY,r++);for(i=uY;i<e&&_Y(i,t,e)!==e-lY;i++);if(r===1){let t=(e+lY)/fY;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error(`Cannot find square root`);return r}}let a=(n+lY)/uY;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw Error(`Cannot find square root`);let s=r,c=e.pow(e.mul(e.ONE,i),n),l=e.pow(o,a),u=e.pow(o,n);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(u);t<s&&!e.eql(n,e.ONE);t++)n=e.sqr(n);let n=e.pow(c,lY<<BigInt(s-t-1));c=e.sqr(n),l=e.mul(l,n),u=e.mul(u,c),s=t}return l}}function xY(e){if(e%fY===dY){let t=(e+lY)/fY;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error(`Cannot find square root`);return r}}if(e%mY===pY){let t=(e-pY)/mY;return function(e,n){let r=e.mul(n,uY),i=e.pow(r,t),a=e.mul(n,i),o=e.mul(e.mul(a,uY),i),s=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(s),n))throw Error(`Cannot find square root`);return s}}return e%hY,bY(e)}var SY=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function CY(e){return sY(e,SY.reduce((e,t)=>(e[t]=`function`,e),{ORDER:`bigint`,MASK:`bigint`,BYTES:`isSafeInteger`,BITS:`isSafeInteger`}))}function wY(e,t,n){if(n<cY)throw Error(`Expected power > 0`);if(n===cY)return e.ONE;if(n===lY)return t;let r=e.ONE,i=t;for(;n>cY;)n&lY&&(r=e.mul(r,i)),i=e.sqr(i),n>>=lY;return r}function TY(e,t){let n=Array(t.length),r=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),i=e.inv(r);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),i),n}function EY(e,t){let n=t===void 0?e.toString(2).length:t;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function DY(e,t,n=!1,r={}){if(e<=cY)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:a}=EY(e,t);if(a>2048)throw Error(`Field lengths over 2048 bytes are not supported`);let o=xY(e),s=Object.freeze({ORDER:e,BITS:i,BYTES:a,MASK:nY(i),ZERO:cY,ONE:lY,create:t=>gY(t,e),isValid:t=>{if(typeof t!=`bigint`)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return cY<=t&&t<e},is0:e=>e===cY,isOdd:e=>(e&lY)===lY,neg:t=>gY(-t,e),eql:(e,t)=>e===t,sqr:t=>gY(t*t,e),add:(t,n)=>gY(t+n,e),sub:(t,n)=>gY(t-n,e),mul:(t,n)=>gY(t*n,e),pow:(e,t)=>wY(s,e,t),div:(t,n)=>gY(t*yY(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>yY(t,e),sqrt:r.sqrt||(e=>o(s,e)),invertBatch:e=>TY(s,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?qJ(e,a):KJ(e,a),fromBytes:e=>{if(e.length!==a)throw Error(`Fp.fromBytes: expected ${a}, got ${e.length}`);return n?GJ(e):WJ(e)}});return Object.freeze(s)}function OY(e){if(typeof e!=`bigint`)throw Error(`field order must be bigint`);let t=e.toString(2).length;return Math.ceil(t/8)}function kY(e){let t=OY(e);return t+Math.ceil(t/2)}function AY(e,t,n=!1){let r=e.length,i=OY(t),a=kY(t);if(r<16||r<a||r>1024)throw Error(`expected ${a}-1024 bytes of input, got ${r}`);let o=gY(n?WJ(e):GJ(e),t-lY)+lY;return n?qJ(o,i):KJ(o,i)}var jY=BigInt(0),MY=BigInt(1);function NY(e,t){let n=(e,t)=>{let n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>jY;)n&MY&&(r=r.add(i)),i=i.double(),n>>=MY;return r},precomputeWindow(e,t){let{windows:n,windowSize:i}=r(t),a=[],o=e,s=o;for(let e=0;e<n;e++){s=o,a.push(s);for(let e=1;e<i;e++)s=s.add(o),a.push(s);o=s.double()}return a},wNAF(t,i,a){let{windows:o,windowSize:s}=r(t),c=e.ZERO,l=e.BASE,u=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<o;e++){let t=e*s,r=Number(a&u);a>>=f,r>s&&(r-=d,a+=MY);let o=t,p=t+Math.abs(r)-1,m=e%2!=0,h=r<0;r===0?l=l.add(n(m,i[o])):c=c.add(n(h,i[p]))}return{p:c,f:l}},wNAFCached(e,t,n,r){let i=e._WINDOW_SIZE||1,a=t.get(e);return a||(a=this.precomputeWindow(e,i),i!==1&&t.set(e,r(a))),this.wNAF(i,a,n)}}}function PY(e){return CY(e.Fp),sY(e,{n:`bigint`,h:`bigint`,Gx:`field`,Gy:`field`},{nBitLength:`isSafeInteger`,nByteLength:`isSafeInteger`}),Object.freeze({...EY(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function FY(e){let t=PY(e);sY(t,{a:`field`,b:`field`},{allowedPrivateKeyLengths:`array`,wrapPrivateKey:`boolean`,isTorsionFree:`function`,clearCofactor:`function`,allowInfinityPoint:`boolean`,fromBytes:`function`,toBytes:`function`});let{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw 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 Error(`Expected endomorphism with beta: bigint and splitScalar: function`)}return Object.freeze({...t})}var{bytesToNumberBE:IY,hexToBytes:LY}=PJ,RY={Err:class extends Error{constructor(e=``){super(e)}},_parseInt(e){let{Err:t}=RY;if(e.length<2||e[0]!==2)throw new t(`Invalid signature integer tag`);let n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t(`Invalid signature integer: wrong length`);if(r[0]&128)throw new t(`Invalid signature integer: negative`);if(r[0]===0&&!(r[1]&128))throw new t(`Invalid signature integer: unnecessary leading zero`);return{d:IY(r),l:e.subarray(n+2)}},toSig(e){let{Err:t}=RY,n=typeof e==`string`?LY(e):e;if(!(n instanceof Uint8Array))throw Error(`ui8a expected`);let r=n.length;if(r<2||n[0]!=48)throw new t(`Invalid signature tag`);if(n[1]!==r-2)throw new t(`Invalid signature: incorrect length`);let{d:i,l:a}=RY._parseInt(n.subarray(2)),{d:o,l:s}=RY._parseInt(a);if(s.length)throw new t(`Invalid signature: left bytes after parsing`);return{r:i,s:o}},hexFromSig(e){let t=e=>Number.parseInt(e[0],16)&8?`00`+e:e,n=e=>{let t=e.toString(16);return t.length&1?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),a=r.length/2,o=i.length/2,s=n(a),c=n(o);return`30${n(o+a+4)}02${c}${i}02${s}${r}`}},zY=BigInt(0),BY=BigInt(1),VY=BigInt(3);function HY(e){let t=FY(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{let i=t.toAffine();return XJ(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),i=t.fromBytes||(e=>{let t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function a(e){let{a:r,b:i}=t,a=n.sqr(e),o=n.mul(a,e);return n.add(n.add(o,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),a(t.Gx)))throw Error(`bad generator point: equation left != right`);function o(e){return typeof e==`bigint`&&zY<e&&e<t.n}function s(e){if(!o(e))throw Error(`Expected valid bigint: 0 < bigint < curve.n`)}function c(e){let{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:i,n:a}=t;if(n&&typeof e!=`bigint`){if(e instanceof Uint8Array&&(e=BJ(e)),typeof e!=`string`||!n.includes(e.length))throw Error(`Invalid key`);e=e.padStart(r*2,`0`)}let o;try{o=typeof e==`bigint`?e:WJ(YJ(`private key`,e,r))}catch{throw Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return i&&(o=gY(o,a)),s(o),o}let l=new Map;function u(e){if(!(e instanceof d))throw Error(`ProjectivePoint expected`)}class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,e==null||!n.isValid(e))throw Error(`x required`);if(t==null||!n.isValid(t))throw Error(`y required`);if(r==null||!n.isValid(r))throw Error(`z required`)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error(`invalid affine point`);if(e instanceof d)throw Error(`projective point not allowed`);let i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(i(YJ(`pointHex`,e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw Error(`bad point: ZERO`)}let{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw Error(`bad point: x or y not FE`);let i=n.sqr(r),o=a(e);if(!n.eql(i,o))throw Error(`bad point: equation left != right`);if(!this.isTorsionFree())throw Error(`bad point: not in prime-order subgroup`)}hasEvenY(){let{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw Error(`Field doesn't support isOdd`)}equals(e){u(e);let{px:t,py:r,pz:i}=this,{px:a,py:o,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(a,i)),l=n.eql(n.mul(r,s),n.mul(o,i));return c&&l}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){let{a:e,b:r}=t,i=n.mul(r,VY),{px:a,py:o,pz:s}=this,c=n.ZERO,l=n.ZERO,u=n.ZERO,f=n.mul(a,a),p=n.mul(o,o),m=n.mul(s,s),h=n.mul(a,o);return h=n.add(h,h),u=n.mul(a,s),u=n.add(u,u),c=n.mul(e,u),l=n.mul(i,m),l=n.add(c,l),c=n.sub(p,l),l=n.add(p,l),l=n.mul(c,l),c=n.mul(h,c),u=n.mul(i,u),m=n.mul(e,m),h=n.sub(f,m),h=n.mul(e,h),h=n.add(h,u),u=n.add(f,f),f=n.add(u,f),f=n.add(f,m),f=n.mul(f,h),l=n.add(l,f),m=n.mul(o,s),m=n.add(m,m),f=n.mul(m,h),c=n.sub(c,f),u=n.mul(m,p),u=n.add(u,u),u=n.add(u,u),new d(c,l,u)}add(e){u(e);let{px:r,py:i,pz:a}=this,{px:o,py:s,pz:c}=e,l=n.ZERO,f=n.ZERO,p=n.ZERO,m=t.a,h=n.mul(t.b,VY),g=n.mul(r,o),_=n.mul(i,s),v=n.mul(a,c),y=n.add(r,i),b=n.add(o,s);y=n.mul(y,b),b=n.add(g,_),y=n.sub(y,b),b=n.add(r,a);let x=n.add(o,c);return b=n.mul(b,x),x=n.add(g,v),b=n.sub(b,x),x=n.add(i,a),l=n.add(s,c),x=n.mul(x,l),l=n.add(_,v),x=n.sub(x,l),p=n.mul(m,b),l=n.mul(h,v),p=n.add(l,p),l=n.sub(_,p),p=n.add(_,p),f=n.mul(l,p),_=n.add(g,g),_=n.add(_,g),v=n.mul(m,v),b=n.mul(h,b),_=n.add(_,v),v=n.sub(g,v),v=n.mul(m,v),b=n.add(b,v),g=n.mul(_,b),f=n.add(f,g),g=n.mul(x,b),l=n.mul(y,l),l=n.sub(l,g),g=n.mul(y,_),p=n.mul(x,p),p=n.add(p,g),new d(l,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,l,e,e=>{let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(d.fromAffine)})}multiplyUnsafe(e){let r=d.ZERO;if(e===zY)return r;if(s(e),e===BY)return this;let{endo:i}=t;if(!i)return p.unsafeLadder(this,e);let{k1neg:a,k1:o,k2neg:c,k2:l}=i.splitScalar(e),u=r,f=r,m=this;for(;o>zY||l>zY;)o&BY&&(u=u.add(m)),l&BY&&(f=f.add(m)),m=m.double(),o>>=BY,l>>=BY;return a&&(u=u.negate()),c&&(f=f.negate()),f=new d(n.mul(f.px,i.beta),f.py,f.pz),u.add(f)}multiply(e){s(e);let r=e,i,a,{endo:o}=t;if(o){let{k1neg:e,k1:t,k2neg:s,k2:c}=o.splitScalar(r),{p:l,f:u}=this.wNAF(t),{p:f,f:m}=this.wNAF(c);l=p.constTimeNegate(e,l),f=p.constTimeNegate(s,f),f=new d(n.mul(f.px,o.beta),f.py,f.pz),i=l.add(f),a=u.add(m)}else{let{p:e,f:t}=this.wNAF(r);i=e,a=t}return d.normalizeZ([i,a])[0]}multiplyAndAddUnsafe(e,t,n){let r=d.BASE,i=(e,t)=>t===zY||t===BY||!e.equals(r)?e.multiplyUnsafe(t):e.multiply(t),a=i(this,t).add(i(e,n));return a.is0()?void 0:a}toAffine(e){let{px:t,py:r,pz:i}=this,a=this.is0();e??=a?n.ONE:n.inv(i);let o=n.mul(t,e),s=n.mul(r,e),c=n.mul(i,e);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw Error(`invZ was invalid`);return{x:o,y:s}}isTorsionFree(){let{h:e,isTorsionFree:n}=t;if(e===BY)return!0;if(n)return n(d,this);throw Error(`isTorsionFree() has not been declared for the elliptic curve`)}clearCofactor(){let{h:e,clearCofactor:n}=t;return e===BY?this:n?n(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),r(d,this,e)}toHex(e=!0){return BJ(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);let f=t.nBitLength,p=NY(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:o}}function UY(e){let t=PY(e);return sY(t,{hash:`hash`,hmac:`function`,randomBytes:`function`},{bits2int:`function`,bits2int_modN:`function`,lowS:`boolean`}),Object.freeze({lowS:!0,...t})}function WY(e){let t=UY(e),{Fp:n,n:r}=t,i=n.BYTES+1,a=2*n.BYTES+1;function o(e){return zY<e&&e<n.ORDER}function s(e){return gY(e,r)}function c(e){return yY(e,r)}let{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:f}=HY({...t,toBytes(e,t,r){let i=t.toAffine(),a=n.toBytes(i.x),o=XJ;return r?o(Uint8Array.from([t.hasEvenY()?2:3]),a):o(Uint8Array.from([4]),a,n.toBytes(i.y))},fromBytes(e){let t=e.length,r=e[0],s=e.subarray(1);if(t===i&&(r===2||r===3)){let e=WJ(s);if(!o(e))throw Error(`Point is not on curve`);let t=d(e),i=n.sqrt(t),a=(i&BY)===BY;return(r&1)==1!==a&&(i=n.neg(i)),{x:e,y:i}}else if(t===a&&r===4)return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))};else throw Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),p=e=>BJ(KJ(e,t.nByteLength));function m(e){return e>r>>BY}function h(e){return m(e)?s(-e):e}let g=(e,t,n)=>WJ(e.slice(t,n));class _{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){let n=t.nByteLength;return e=YJ(`compactSignature`,e,n*2),new _(g(e,0,n),g(e,n,2*n))}static fromDER(e){let{r:t,s:n}=RY.toSig(YJ(`DER`,e));return new _(t,n)}assertValidity(){if(!f(this.r))throw Error(`r must be 0 < r < CURVE.n`);if(!f(this.s))throw Error(`s must be 0 < s < CURVE.n`)}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(e){let{r,s:i,recovery:a}=this,o=C(YJ(`msgHash`,e));if(a==null||![0,1,2,3].includes(a))throw Error(`recovery id invalid`);let u=a===2||a===3?r+t.n:r;if(u>=n.ORDER)throw Error(`recovery id 2 or 3 invalid`);let d=a&1?`03`:`02`,f=l.fromHex(d+p(u)),m=c(u),h=s(-o*m),g=s(i*m),_=l.BASE.multiplyAndAddUnsafe(f,h,g);if(!_)throw Error(`point at infinify`);return _.assertValidity(),_}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return UJ(this.toDERHex())}toDERHex(){return RY.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return UJ(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}let v={isValidPrivateKey(e){try{return u(e),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let e=kY(t.n);return AY(t.randomBytes(e),t.n)},precompute(e=8,t=l.BASE){return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function y(e,t=!0){return l.fromPrivateKey(e).toRawBytes(t)}function b(e){let t=e instanceof Uint8Array,n=typeof e==`string`,r=(t||n)&&e.length;return t?r===i||r===a:n?r===2*i||r===2*a:e instanceof l}function x(e,t,n=!0){if(b(e))throw Error(`first arg must be private key`);if(!b(t))throw Error(`second arg must be public key`);return l.fromHex(t).multiply(u(e)).toRawBytes(n)}let S=t.bits2int||function(e){let n=WJ(e),r=e.length*8-t.nBitLength;return r>0?n>>BigInt(r):n},C=t.bits2int_modN||function(e){return s(S(e))},w=nY(t.nBitLength);function T(e){if(typeof e!=`bigint`)throw Error(`bigint expected`);if(!(zY<=e&&e<w))throw Error(`bigint expected < 2^${t.nBitLength}`);return KJ(e,t.nByteLength)}function E(e,r,i=D){if([`recovered`,`canonical`].some(e=>e in i))throw Error(`sign() legacy options not supported`);let{hash:a,randomBytes:o}=t,{lowS:d,prehash:p,extraEntropy:g}=i;d??=!0,e=YJ(`msgHash`,e),p&&(e=YJ(`prehashed msgHash`,a(e)));let v=C(e),y=u(r),b=[T(y),T(v)];if(g!=null){let e=g===!0?o(n.BYTES):g;b.push(YJ(`extraEntropy`,e))}let x=XJ(...b),w=v;function E(e){let t=S(e);if(!f(t))return;let n=c(t),r=l.BASE.multiply(t).toAffine(),i=s(r.x);if(i===zY)return;let a=s(n*s(w+i*y));if(a===zY)return;let o=(r.x===i?0:2)|Number(r.y&BY),u=a;return d&&m(a)&&(u=h(a),o^=1),new _(i,u,o)}return{seed:x,k2sig:E}}let D={lowS:t.lowS,prehash:!1},O={lowS:t.lowS,prehash:!1};function k(e,n,r=D){let{seed:i,k2sig:a}=E(e,n,r),o=t;return aY(o.hash.outputLen,o.nByteLength,o.hmac)(i,a)}l.BASE._setWindowSize(8);function A(e,n,r,i=O){let a=e;if(n=YJ(`msgHash`,n),r=YJ(`publicKey`,r),`strict`in i)throw Error(`options.strict was renamed to lowS`);let{lowS:o,prehash:u}=i,d,f;try{if(typeof a==`string`||a instanceof Uint8Array)try{d=_.fromDER(a)}catch(e){if(!(e instanceof RY.Err))throw e;d=_.fromCompact(a)}else if(typeof a==`object`&&typeof a.r==`bigint`&&typeof a.s==`bigint`){let{r:e,s:t}=a;d=new _(e,t)}else throw Error(`PARSE`);f=l.fromHex(r)}catch(e){if(e.message===`PARSE`)throw Error(`signature must be Signature instance, Uint8Array or hex string`);return!1}if(o&&d.hasHighS())return!1;u&&(n=t.hash(n));let{r:p,s:m}=d,h=C(n),g=c(m),v=s(h*g),y=s(p*g),b=l.BASE.multiplyAndAddUnsafe(f,v,y)?.toAffine();return b?s(b.x)===p:!1}return{CURVE:t,getPublicKey:y,getSharedSecret:x,sign:k,verify:A,ProjectivePoint:l,Signature:_,utils:v}}function GY(e){return{hash:e,hmac:(t,...n)=>CK(e,t,gK(...n)),randomBytes:xK}}function KY(e,t){let n=t=>WY({...e,...GY(t)});return Object.freeze({...n(t),create:n})}var qY=BigInt(`0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f`),JY=BigInt(`0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`),YY=BigInt(1),XY=BigInt(2),ZY=(e,t)=>(e+t/XY)/t;function QY(e){let t=qY,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=vY(vY(vY(u,n,t)*u%t,n,t)*u%t,XY,t)*l%t,f=vY(d,i,t)*d%t,p=vY(f,a,t)*f%t,m=vY(p,s,t)*p%t,h=vY(vY(vY(vY(vY(vY(m,c,t)*m%t,s,t)*p%t,n,t)*u%t,o,t)*f%t,r,t)*l%t,XY,t);if(!$Y.eql($Y.sqr(h),e))throw Error(`Cannot find square root`);return h}var $Y=DY(qY,void 0,void 0,{sqrt:QY}),eX=KY({a:BigInt(0),b:BigInt(7),Fp:$Y,n:JY,Gx:BigInt(`55066263022277343669578718895168534326250603453777594175500187360389116729240`),Gy:BigInt(`32670510020758816978083085130507043184471273380659243275938904335757337482424`),h:BigInt(1),lowS:!0,endo:{beta:BigInt(`0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee`),splitScalar:e=>{let t=JY,n=BigInt(`0x3086d221a7d46bcde86c90e49284eb15`),r=-YY*BigInt(`0xe4437ed6010e88286f547fa90abfe4c3`),i=BigInt(`0x114ca50f7a8e2f3f657c1108d9d44cfd8`),a=n,o=BigInt(`0x100000000000000000000000000000000`),s=ZY(a*e,t),c=ZY(-r*e,t),l=gY(e-s*n-c*i,t),u=gY(-s*r-c*a,t),d=l>o,f=u>o;if(d&&(l=t-l),f&&(u=t-u),l>o||u>o)throw Error(`splitScalar: Endomorphism failed, k=`+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},FK);eX.ProjectivePoint;var tX=`0x0000000000000000000000000000000000000000`,nX=`0x0000000000000000000000000000000000000000000000000000000000000000`,rX=`Ethereum Signed Message:
|
|
87
|
-
`,iX=BigInt(0),aX=BigInt(1),oX=BigInt(2),sX=BigInt(27),cX=BigInt(28),lX=BigInt(35),uX={};function dX(e){return nG(gG(e),32)}var fX=class e{#e;#t;#n;#r;get r(){return this.#e}set r(e){J($W(e)===32,`invalid r`,`value`,e),this.#e=Y(e)}get s(){return this.#t}set s(e){J($W(e)===32,`invalid s`,`value`,e);let t=Y(e);J(parseInt(t.substring(0,3))<8,`non-canonical s`,`value`,t),this.#t=t}get v(){return this.#n}set v(e){let t=pG(e,`value`);J(t===27||t===28,`invalid v`,`v`,e),this.#n=t}get networkV(){return this.#r}get legacyChainId(){let t=this.networkV;return t==null?null:e.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){let e=qW(this.s);return this.yParity&&(e[0]|=128),Y(e)}get compactSerialized(){return QW([this.r,this.yParityAndS])}get serialized(){return QW([this.r,this.s,this.yParity?`0x1c`:`0x1b`])}constructor(e,t,n,r){GW(e,uX,`Signature`),this.#e=t,this.#t=n,this.#n=r,this.#r=null}[Symbol.for(`nodejs.util.inspect.custom`)](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){let t=new e(uX,this.r,this.s,this.v);return this.networkV&&(t.#r=this.networkV),t}toJSON(){let e=this.networkV;return{_type:`signature`,networkV:e==null?null:e.toString(),r:this.r,s:this.s,v:this.v}}static getChainId(e){let t=lG(e,`v`);return t==sX||t==cX?iX:(J(t>=lX,`invalid EIP-155 v`,`v`,e),(t-lX)/oX)}static getChainIdV(e,t){return lG(e)*oX+BigInt(35+t-27)}static getNormalizedV(e){let t=lG(e);return t===iX||t===sX?27:t===aX||t===cX?28:(J(t>=lX,`invalid v`,`v`,e),t&aX?27:28)}static from(t){function n(e,n){J(e,n,`signature`,t)}if(t==null)return new e(uX,nX,nX,27);if(typeof t==`string`){let r=qW(t,`signature`);if(r.length===64){let t=Y(r.slice(0,32)),n=r.slice(32,64),i=n[0]&128?28:27;return n[0]&=127,new e(uX,t,Y(n),i)}if(r.length===65){let t=Y(r.slice(0,32)),i=r.slice(32,64);n((i[0]&128)==0,`non-canonical s`);let a=e.getNormalizedV(r[64]);return new e(uX,t,Y(i),a)}n(!1,`invalid raw signature length`)}if(t instanceof e)return t.clone();let r=t.r;n(r!=null,`missing r`);let i=dX(r),a=(function(e,t){if(e!=null)return dX(e);if(t!=null){n(YW(t,32),`invalid yParityAndS`);let e=qW(t);return e[0]&=127,Y(e)}n(!1,`missing s`)})(t.s,t.yParityAndS);n((qW(a)[0]&128)==0,`non-canonical s`);let{networkV:o,v:s}=(function(t,r,i){if(t!=null){let n=lG(t);return{networkV:n>=lX?n:void 0,v:e.getNormalizedV(n)}}if(r!=null)return n(YW(r,32),`invalid yParityAndS`),{v:qW(r)[0]&128?28:27};if(i!=null){switch(pG(i,`sig.yParity`)){case 0:return{v:27};case 1:return{v:28}}n(!1,`invalid yParity`)}n(!1,`missing v`)})(t.v,t.yParityAndS,t.yParity),c=new e(uX,i,a,s);return o&&(c.#r=o),n(t.yParity==null||pG(t.yParity,`sig.yParity`)===c.yParity,`yParity mismatch`),n(t.yParityAndS==null||t.yParityAndS===c.yParityAndS,`yParityAndS mismatch`),c}},pX=class e{#e;constructor(e){J($W(e)===32,`invalid private key`,`privateKey`,`[REDACTED]`),this.#e=Y(e)}get privateKey(){return this.#e}get publicKey(){return e.computePublicKey(this.#e)}get compressedPublicKey(){return e.computePublicKey(this.#e,!0)}sign(e){J($W(e)===32,`invalid digest length`,`digest`,e);let t=eX.sign(JW(e),JW(this.#e),{lowS:!0});return fX.from({r:hG(t.r,32),s:hG(t.s,32),v:t.recovery?28:27})}computeSharedSecret(t){let n=e.computePublicKey(t);return Y(eX.getSharedSecret(JW(this.#e),qW(n),!1))}static computePublicKey(e,t){let n=qW(e,`key`);if(n.length===32)return Y(eX.getPublicKey(n,!!t));if(n.length===64){let e=new Uint8Array(65);e[0]=4,e.set(n,1),n=e}return Y(eX.ProjectivePoint.fromHex(n).toRawBytes(t))}static recoverPublicKey(e,t){J($W(e)===32,`invalid digest length`,`digest`,e);let n=fX.from(t),r=eX.Signature.fromCompact(JW(QW([n.r,n.s])));r=r.addRecoveryBit(n.yParity);let i=r.recoverPublicKey(JW(e));return J(i!=null,`invalid signautre for digest`,`signature`,t),`0x`+i.toHex(!1)}static addPoints(t,n,r){let i=eX.ProjectivePoint.fromHex(e.computePublicKey(t).substring(2)),a=eX.ProjectivePoint.fromHex(e.computePublicKey(n).substring(2));return`0x`+i.add(a).toHex(!!r)}},mX=BigInt(0),hX=BigInt(36);function gX(e){e=e.toLowerCase();let t=e.substring(2).split(``),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);let r=qW(Lq(n));for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(r[e>>1]&15)>=8&&(t[e+1]=t[e+1].toUpperCase());return`0x`+t.join(``)}var _X={};for(let e=0;e<10;e++)_X[String(e)]=String(e);for(let e=0;e<26;e++)_X[String.fromCharCode(65+e)]=String(10+e);var vX=15;function yX(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+`00`;let t=e.split(``).map(e=>_X[e]).join(``);for(;t.length>=vX;){let e=t.substring(0,vX);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n=`0`+n;return n}var bX=(function(){let e={};for(let t=0;t<36;t++){let n=`0123456789abcdefghijklmnopqrstuvwxyz`[t];e[n]=BigInt(t)}return e})();function xX(e){e=e.toLowerCase();let t=mX;for(let n=0;n<e.length;n++)t=t*hX+bX[e[n]];return t}function SX(e){if(J(typeof e==`string`,`invalid address`,`address`,e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith(`0x`)||(e=`0x`+e);let t=gX(e);return J(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,`bad address checksum`,`address`,e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){J(e.substring(2,4)===yX(e),`bad icap checksum`,`address`,e);let t=xX(e.substring(4)).toString(16);for(;t.length<40;)t=`0`+t;return gX(`0x`+t)}J(!1,`invalid address`,`address`,e)}function CX(e){return e&&typeof e.getAddress==`function`}async function wX(e,t){let n=await t;return(n==null||n===`0x0000000000000000000000000000000000000000`)&&(VW(typeof e!=`string`,`unconfigured name`,`UNCONFIGURED_NAME`,{value:e}),J(!1,`invalid AddressLike value; did not resolve to a value address`,`target`,e)),SX(n)}function TX(e,t){if(typeof e==`string`)return e.match(/^0x[0-9a-f]{40}$/i)?SX(e):(VW(t!=null,`ENS resolution requires a provider`,`UNSUPPORTED_OPERATION`,{operation:`resolveName`}),wX(e,t.resolveName(e)));if(CX(e))return wX(e,e.getAddress());if(e&&typeof e.then==`function`)return wX(e,e);J(!1,`unsupported addressable value`,`target`,e)}var EX={};function DX(e,t){let n=!1;return t<0&&(n=!0,t*=-1),new AX(EX,`${n?``:`u`}int${t}`,e,{signed:n,width:t})}function OX(e,t){return new AX(EX,`bytes${t||``}`,e,{size:t})}var kX=Symbol.for(`_ethers_typed`),AX=class e{type;value;#e;_typedSymbol;constructor(e,t,n,r){r??=null,GW(EX,e,`Typed`),LW(this,{_typedSymbol:kX,type:t,value:n}),this.#e=r,this.format()}format(){if(this.type===`array`||this.type===`dynamicArray`)throw Error(``);return this.type===`tuple`?`tuple(${this.value.map(e=>e.format()).join(`,`)})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith(`bytes`)}isString(){return this.type===`string`}get tupleName(){if(this.type!==`tuple`)throw TypeError(`not a tuple`);return this.#e}get arrayLength(){if(this.type!==`array`)throw TypeError(`not an array`);return this.#e===!0?-1:this.#e===!1?this.value.length:null}static from(t,n){return new e(EX,t,n)}static uint8(e){return DX(e,8)}static uint16(e){return DX(e,16)}static uint24(e){return DX(e,24)}static uint32(e){return DX(e,32)}static uint40(e){return DX(e,40)}static uint48(e){return DX(e,48)}static uint56(e){return DX(e,56)}static uint64(e){return DX(e,64)}static uint72(e){return DX(e,72)}static uint80(e){return DX(e,80)}static uint88(e){return DX(e,88)}static uint96(e){return DX(e,96)}static uint104(e){return DX(e,104)}static uint112(e){return DX(e,112)}static uint120(e){return DX(e,120)}static uint128(e){return DX(e,128)}static uint136(e){return DX(e,136)}static uint144(e){return DX(e,144)}static uint152(e){return DX(e,152)}static uint160(e){return DX(e,160)}static uint168(e){return DX(e,168)}static uint176(e){return DX(e,176)}static uint184(e){return DX(e,184)}static uint192(e){return DX(e,192)}static uint200(e){return DX(e,200)}static uint208(e){return DX(e,208)}static uint216(e){return DX(e,216)}static uint224(e){return DX(e,224)}static uint232(e){return DX(e,232)}static uint240(e){return DX(e,240)}static uint248(e){return DX(e,248)}static uint256(e){return DX(e,256)}static uint(e){return DX(e,256)}static int8(e){return DX(e,-8)}static int16(e){return DX(e,-16)}static int24(e){return DX(e,-24)}static int32(e){return DX(e,-32)}static int40(e){return DX(e,-40)}static int48(e){return DX(e,-48)}static int56(e){return DX(e,-56)}static int64(e){return DX(e,-64)}static int72(e){return DX(e,-72)}static int80(e){return DX(e,-80)}static int88(e){return DX(e,-88)}static int96(e){return DX(e,-96)}static int104(e){return DX(e,-104)}static int112(e){return DX(e,-112)}static int120(e){return DX(e,-120)}static int128(e){return DX(e,-128)}static int136(e){return DX(e,-136)}static int144(e){return DX(e,-144)}static int152(e){return DX(e,-152)}static int160(e){return DX(e,-160)}static int168(e){return DX(e,-168)}static int176(e){return DX(e,-176)}static int184(e){return DX(e,-184)}static int192(e){return DX(e,-192)}static int200(e){return DX(e,-200)}static int208(e){return DX(e,-208)}static int216(e){return DX(e,-216)}static int224(e){return DX(e,-224)}static int232(e){return DX(e,-232)}static int240(e){return DX(e,-240)}static int248(e){return DX(e,-248)}static int256(e){return DX(e,-256)}static int(e){return DX(e,-256)}static bytes1(e){return OX(e,1)}static bytes2(e){return OX(e,2)}static bytes3(e){return OX(e,3)}static bytes4(e){return OX(e,4)}static bytes5(e){return OX(e,5)}static bytes6(e){return OX(e,6)}static bytes7(e){return OX(e,7)}static bytes8(e){return OX(e,8)}static bytes9(e){return OX(e,9)}static bytes10(e){return OX(e,10)}static bytes11(e){return OX(e,11)}static bytes12(e){return OX(e,12)}static bytes13(e){return OX(e,13)}static bytes14(e){return OX(e,14)}static bytes15(e){return OX(e,15)}static bytes16(e){return OX(e,16)}static bytes17(e){return OX(e,17)}static bytes18(e){return OX(e,18)}static bytes19(e){return OX(e,19)}static bytes20(e){return OX(e,20)}static bytes21(e){return OX(e,21)}static bytes22(e){return OX(e,22)}static bytes23(e){return OX(e,23)}static bytes24(e){return OX(e,24)}static bytes25(e){return OX(e,25)}static bytes26(e){return OX(e,26)}static bytes27(e){return OX(e,27)}static bytes28(e){return OX(e,28)}static bytes29(e){return OX(e,29)}static bytes30(e){return OX(e,30)}static bytes31(e){return OX(e,31)}static bytes32(e){return OX(e,32)}static address(t){return new e(EX,`address`,t)}static bool(t){return new e(EX,`bool`,!!t)}static bytes(t){return new e(EX,`bytes`,t)}static string(t){return new e(EX,`string`,t)}static array(e,t){throw Error(`not implemented yet`)}static tuple(e,t){throw Error(`not implemented yet`)}static overrides(t){return new e(EX,`overrides`,Object.assign({},t))}static isTyped(e){return e&&typeof e==`object`&&`_typedSymbol`in e&&e._typedSymbol===kX}static dereference(t,n){if(e.isTyped(t)){if(t.type!==n)throw Error(`invalid type: expecetd ${n}, got ${t.type}`);return t.value}return t}},jX=class extends $G{constructor(e){super(`address`,`address`,e,!1)}defaultValue(){return`0x0000000000000000000000000000000000000000`}encode(e,t){let n=AX.dereference(t,`string`);try{n=SX(n)}catch(e){return this._throwError(e.message,t)}return e.writeValue(n)}decode(e){return SX(hG(e.readValue(),20))}},MX=class extends $G{coder;constructor(e){super(e.name,e.type,`_`,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};function NX(e,t,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n==`object`){let e={};r=t.map(t=>{let r=t.localName;return VW(r,`cannot encode object for signature with missing names`,`INVALID_ARGUMENT`,{argument:`values`,info:{coder:t},value:n}),VW(!e[r],`cannot encode object for signature with duplicate names`,`INVALID_ARGUMENT`,{argument:`values`,info:{coder:t},value:n}),e[r]=!0,n[r]})}else J(!1,`invalid tuple value`,`tuple`,n);J(t.length===r.length,`types/value length mismatch`,`tuple`,n);let i=new eK,a=new eK,o=[];t.forEach((e,t)=>{let n=r[t];if(e.dynamic){let t=a.length;e.encode(a,n);let r=i.writeUpdatableValue();o.push(e=>{r(e+t)})}else e.encode(i,n)}),o.forEach(e=>{e(i.length)});let s=e.appendWriter(i);return s+=e.appendWriter(a),s}function PX(e,t){let n=[],r=[],i=e.subReader(0);return t.forEach(t=>{let a=null;if(t.dynamic){let n=e.readIndex(),r=i.subReader(n);try{a=t.decode(r)}catch(e){if(zW(e,`BUFFER_OVERRUN`))throw e;a=e,a.baseType=t.name,a.name=t.localName,a.type=t.type}}else try{a=t.decode(e)}catch(e){if(zW(e,`BUFFER_OVERRUN`))throw e;a=e,a.baseType=t.name,a.name=t.localName,a.type=t.type}if(a==null)throw Error(`investigate`);n.push(a),r.push(t.localName||null)}),ZG.fromItems(n,r)}var FX=class extends $G{coder;length;constructor(e,t,n){let r=e.type+`[`+(t>=0?t:``)+`]`,i=t===-1||e.dynamic;super(`array`,r,n,i),LW(this,{coder:e,length:t})}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;n<this.length;n++)t.push(e);return t}encode(e,t){let n=AX.dereference(t,`array`);Array.isArray(n)||this._throwError(`expected array value`,n);let r=this.length;r===-1&&(r=n.length,e.writeValue(n.length)),HW(n.length,r,`coder array`+(this.localName?` `+this.localName:``));let i=[];for(let e=0;e<n.length;e++)i.push(this.coder);return NX(e,i,n)}decode(e){let t=this.length;t===-1&&(t=e.readIndex(),VW(t*32<=e.dataLength,`insufficient data length`,`BUFFER_OVERRUN`,{buffer:e.bytes,offset:t*32,length:e.dataLength}));let n=[];for(let e=0;e<t;e++)n.push(new MX(this.coder));return PX(e,n)}},IX=class extends $G{constructor(e){super(`bool`,`bool`,e,!1)}defaultValue(){return!1}encode(e,t){let n=AX.dereference(t,`bool`);return e.writeValue(+!!n)}decode(e){return!!e.readValue()}},LX=class extends $G{constructor(e,t){super(e,e,t,!0)}defaultValue(){return`0x`}encode(e,t){t=JW(t);let n=e.writeValue(t.length);return n+=e.writeBytes(t),n}decode(e){return e.readBytes(e.readIndex(),!0)}},RX=class extends LX{constructor(e){super(`bytes`,e)}decode(e){return Y(super.decode(e))}},zX=class extends $G{size;constructor(e,t){let n=`bytes`+String(e);super(n,n,t,!1),LW(this,{size:e},{size:`number`})}defaultValue(){return`0x0000000000000000000000000000000000000000000000000000000000000000`.substring(0,2+this.size*2)}encode(e,t){let n=JW(AX.dereference(t,this.type));return n.length!==this.size&&this._throwError(`incorrect data length`,t),e.writeBytes(n)}decode(e){return Y(e.readBytes(this.size))}},BX=new Uint8Array([]),VX=class extends $G{constructor(e){super(`null`,``,e,!1)}defaultValue(){return null}encode(e,t){return t!=null&&this._throwError(`not null`,t),e.writeBytes(BX)}decode(e){return e.readBytes(0),null}},HX=BigInt(0),UX=BigInt(1),WX=BigInt(`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`),GX=class extends $G{size;signed;constructor(e,t,n){let r=(t?`int`:`uint`)+e*8;super(r,r,n,!1),LW(this,{size:e,signed:t},{size:`number`,signed:`boolean`})}defaultValue(){return 0}encode(e,t){let n=lG(AX.dereference(t,this.type)),r=cG(WX,256);if(this.signed){let e=cG(r,this.size*8-1);(n>e||n<-(e+UX))&&this._throwError(`value out-of-bounds`,t),n=sG(n,256)}else (n<HX||n>cG(r,this.size*8))&&this._throwError(`value out-of-bounds`,t);return e.writeValue(n)}decode(e){let t=cG(e.readValue(),this.size*8);return this.signed&&(t=oG(t,this.size*8)),t}},KX=class extends LX{constructor(e){super(`string`,e)}defaultValue(){return``}encode(e,t){return super.encode(e,AG(AX.dereference(t,`string`)))}decode(e){return MG(super.decode(e))}},qX=class extends $G{coders;constructor(e,t){let n=!1,r=[];e.forEach(e=>{e.dynamic&&(n=!0),r.push(e.type)});let i=`tuple(`+r.join(`,`)+`)`;super(`tuple`,i,t,n),LW(this,{coders:Object.freeze(e.slice())})}defaultValue(){let e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});let t=this.coders.reduce((e,t)=>{let n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e},{});return this.coders.forEach((n,r)=>{let i=n.localName;!i||t[i]!==1||(i===`length`&&(i=`_length`),e[i]??(e[i]=e[r]))}),Object.freeze(e)}encode(e,t){let n=AX.dereference(t,`tuple`);return NX(e,this.coders,n)}decode(e){return PX(e,this.coders)}};function JX(e){return Lq(AG(e))}function YX(e,t){return{address:SX(e),storageKeys:t.map((e,t)=>(J(YW(e,32),`invalid slot`,`storageKeys[${t}]`,e),e.toLowerCase()))}}function XX(e){if(Array.isArray(e))return e.map((t,n)=>Array.isArray(t)?(J(t.length===2,`invalid slot set`,`value[${n}]`,t),YX(t[0],t[1])):(J(typeof t==`object`&&!!t,`invalid address-slot set`,`value`,e),YX(t.address,t.storageKeys)));J(typeof e==`object`&&!!e,`invalid access list`,`value`,e);let t=Object.keys(e).map(t=>{let n=e[t].reduce((e,t)=>(e[t]=!0,e),{});return YX(t,Object.keys(n).sort())});return t.sort((e,t)=>e.address.localeCompare(t.address)),t}function ZX(e){let t;return t=typeof e==`string`?pX.computePublicKey(e,!1):e.publicKey,SX(Lq(`0x`+t.substring(4)).substring(26))}function QX(e,t){return ZX(pX.recoverPublicKey(e,t))}var $X=BigInt(0),eZ=BigInt(2),tZ=BigInt(27),nZ=BigInt(28),rZ=BigInt(35),iZ=BigInt(`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`),aZ=4096*32;function oZ(e,t){let n=e.toString(16);for(;n.length<2;)n=`0`+n;return n+=MJ(t).substring(4),`0x`+n}function sZ(e){return e===`0x`?null:SX(e)}function cZ(e,t){try{return XX(e)}catch(n){J(!1,n.message,t,e)}}function lZ(e,t){return e===`0x`?0:pG(e,t)}function uZ(e,t){if(e===`0x`)return $X;let n=lG(e,t);return J(n<=iZ,`value exceeds uint size`,t,n),n}function dZ(e,t){let n=lG(e,`value`),r=gG(n);return J(r.length<=32,`value too large`,`tx.${t}`,n),r}function fZ(e){return XX(e).map(e=>[e.address,e.storageKeys])}function pZ(e,t){J(Array.isArray(e),`invalid ${t}`,`value`,e);for(let t=0;t<e.length;t++)J(YW(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}function mZ(e){let t=LG(e);J(Array.isArray(t)&&(t.length===9||t.length===6),`invalid field count for legacy transaction`,`data`,e);let n={type:0,nonce:lZ(t[0],`nonce`),gasPrice:uZ(t[1],`gasPrice`),gasLimit:uZ(t[2],`gasLimit`),to:sZ(t[3]),value:uZ(t[4],`value`),data:Y(t[5]),chainId:$X};if(t.length===6)return n;let r=uZ(t[6],`v`),i=uZ(t[7],`r`),a=uZ(t[8],`s`);if(i===$X&&a===$X)n.chainId=r;else{let e=(r-rZ)/eZ;e<$X&&(e=$X),n.chainId=e,J(e!==$X||r===tZ||r===nZ,`non-canonical legacy v`,`v`,t[6]),n.signature=fX.from({r:nG(t[7],32),s:nG(t[8],32),v:r})}return n}function hZ(e,t){let n=[dZ(e.nonce,`nonce`),dZ(e.gasPrice||0,`gasPrice`),dZ(e.gasLimit,`gasLimit`),e.to||`0x`,dZ(e.value,`value`),e.data],r=$X;if(e.chainId!=$X)r=lG(e.chainId,`tx.chainId`),J(!t||t.networkV==null||t.legacyChainId===r,`tx.chainId/sig.v mismatch`,`sig`,t);else if(e.signature){let t=e.signature.legacyChainId;t!=null&&(r=t)}if(!t)return r!==$X&&(n.push(gG(r)),n.push(`0x`),n.push(`0x`)),VG(n);let i=BigInt(27+t.yParity);return r===$X?BigInt(t.v)!==i&&J(!1,`tx.chainId/sig.v mismatch`,`sig`,t):i=fX.getChainIdV(r,t.v),n.push(gG(i)),n.push(gG(t.r)),n.push(gG(t.s)),VG(n)}function gZ(e,t){let n;try{if(n=lZ(t[0],`yParity`),n!==0&&n!==1)throw Error(`bad yParity`)}catch{J(!1,`invalid yParity`,`yParity`,t[0])}let r=nG(t[1],32),i=nG(t[2],32);e.signature=fX.from({r,s:i,yParity:n})}function _Z(e){let t=LG(qW(e).slice(1));J(Array.isArray(t)&&(t.length===9||t.length===12),`invalid field count for transaction type: 2`,`data`,Y(e));let n={type:2,chainId:uZ(t[0],`chainId`),nonce:lZ(t[1],`nonce`),maxPriorityFeePerGas:uZ(t[2],`maxPriorityFeePerGas`),maxFeePerGas:uZ(t[3],`maxFeePerGas`),gasPrice:null,gasLimit:uZ(t[4],`gasLimit`),to:sZ(t[5]),value:uZ(t[6],`value`),data:Y(t[7]),accessList:cZ(t[8],`accessList`)};return t.length===9||gZ(n,t.slice(9)),n}function vZ(e,t){let n=[dZ(e.chainId,`chainId`),dZ(e.nonce,`nonce`),dZ(e.maxPriorityFeePerGas||0,`maxPriorityFeePerGas`),dZ(e.maxFeePerGas||0,`maxFeePerGas`),dZ(e.gasLimit,`gasLimit`),e.to||`0x`,dZ(e.value,`value`),e.data,fZ(e.accessList||[])];return t&&(n.push(dZ(t.yParity,`yParity`)),n.push(gG(t.r)),n.push(gG(t.s))),QW([`0x02`,VG(n)])}function yZ(e){let t=LG(qW(e).slice(1));J(Array.isArray(t)&&(t.length===8||t.length===11),`invalid field count for transaction type: 1`,`data`,Y(e));let n={type:1,chainId:uZ(t[0],`chainId`),nonce:lZ(t[1],`nonce`),gasPrice:uZ(t[2],`gasPrice`),gasLimit:uZ(t[3],`gasLimit`),to:sZ(t[4]),value:uZ(t[5],`value`),data:Y(t[6]),accessList:cZ(t[7],`accessList`)};return t.length===8||gZ(n,t.slice(8)),n}function bZ(e,t){let n=[dZ(e.chainId,`chainId`),dZ(e.nonce,`nonce`),dZ(e.gasPrice||0,`gasPrice`),dZ(e.gasLimit,`gasLimit`),e.to||`0x`,dZ(e.value,`value`),e.data,fZ(e.accessList||[])];return t&&(n.push(dZ(t.yParity,`recoveryParam`)),n.push(gG(t.r)),n.push(gG(t.s))),QW([`0x01`,VG(n)])}function xZ(e){let t=LG(qW(e).slice(1)),n=`3`,r=null;if(t.length===4&&Array.isArray(t[0])){n=`3 (network format)`;let e=t[1],i=t[2],a=t[3];J(Array.isArray(e),`invalid network format: blobs not an array`,`fields[1]`,e),J(Array.isArray(i),`invalid network format: commitments not an array`,`fields[2]`,i),J(Array.isArray(a),`invalid network format: proofs not an array`,`fields[3]`,a),J(e.length===i.length,`invalid network format: blobs/commitments length mismatch`,`fields`,t),J(e.length===a.length,`invalid network format: blobs/proofs length mismatch`,`fields`,t),r=[];for(let n=0;n<t[1].length;n++)r.push({data:e[n],commitment:i[n],proof:a[n]});t=t[0]}J(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${n}`,`data`,Y(e));let i={type:3,chainId:uZ(t[0],`chainId`),nonce:lZ(t[1],`nonce`),maxPriorityFeePerGas:uZ(t[2],`maxPriorityFeePerGas`),maxFeePerGas:uZ(t[3],`maxFeePerGas`),gasPrice:null,gasLimit:uZ(t[4],`gasLimit`),to:sZ(t[5]),value:uZ(t[6],`value`),data:Y(t[7]),accessList:cZ(t[8],`accessList`),maxFeePerBlobGas:uZ(t[9],`maxFeePerBlobGas`),blobVersionedHashes:t[10]};r&&(i.blobs=r),J(i.to!=null,`invalid address for transaction type: ${n}`,`data`,e),J(Array.isArray(i.blobVersionedHashes),`invalid blobVersionedHashes: must be an array`,`data`,e);for(let t=0;t<i.blobVersionedHashes.length;t++)J(YW(i.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,`data`,e);return t.length===11||gZ(i,t.slice(11)),i}function SZ(e,t,n){let r=[dZ(e.chainId,`chainId`),dZ(e.nonce,`nonce`),dZ(e.maxPriorityFeePerGas||0,`maxPriorityFeePerGas`),dZ(e.maxFeePerGas||0,`maxFeePerGas`),dZ(e.gasLimit,`gasLimit`),e.to||`0x0000000000000000000000000000000000000000`,dZ(e.value,`value`),e.data,fZ(e.accessList||[]),dZ(e.maxFeePerBlobGas||0,`maxFeePerBlobGas`),pZ(e.blobVersionedHashes||[],`blobVersionedHashes`)];return t&&(r.push(dZ(t.yParity,`yParity`)),r.push(gG(t.r)),r.push(gG(t.s)),n)?QW([`0x03`,VG([r,n.map(e=>e.data),n.map(e=>e.commitment),n.map(e=>e.proof)])]):QW([`0x03`,VG(r)])}var CZ=class e{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;get type(){return this.#e}set type(e){switch(e){case null:this.#e=null;break;case 0:case`legacy`:this.#e=0;break;case 1:case`berlin`:case`eip-2930`:this.#e=1;break;case 2:case`london`:case`eip-1559`:this.#e=2;break;case 3:case`cancun`:case`eip-4844`:this.#e=3;break;default:J(!1,`unsupported transaction type`,`type`,e)}}get typeName(){switch(this.type){case 0:return`legacy`;case 1:return`eip-2930`;case 2:return`eip-1559`;case 3:return`eip-4844`}return null}get to(){let e=this.#t;return e==null&&this.type===3?tX:e}set to(e){this.#t=e==null?null:SX(e)}get nonce(){return this.#r}set nonce(e){this.#r=pG(e,`value`)}get gasLimit(){return this.#i}set gasLimit(e){this.#i=lG(e)}get gasPrice(){let e=this.#a;return e==null&&(this.type===0||this.type===1)?$X:e}set gasPrice(e){this.#a=e==null?null:lG(e,`gasPrice`)}get maxPriorityFeePerGas(){return this.#o??(this.type===2||this.type===3?$X:null)}set maxPriorityFeePerGas(e){this.#o=e==null?null:lG(e,`maxPriorityFeePerGas`)}get maxFeePerGas(){return this.#s??(this.type===2||this.type===3?$X:null)}set maxFeePerGas(e){this.#s=e==null?null:lG(e,`maxFeePerGas`)}get data(){return this.#n}set data(e){this.#n=Y(e)}get value(){return this.#c}set value(e){this.#c=lG(e,`value`)}get chainId(){return this.#l}set chainId(e){this.#l=lG(e)}get signature(){return this.#u||null}set signature(e){this.#u=e==null?null:fX.from(e)}get accessList(){return(this.#d||null)??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){this.#d=e==null?null:XX(e)}get maxFeePerBlobGas(){let e=this.#f;return e==null&&this.type===3?$X:e}set maxFeePerBlobGas(e){this.#f=e==null?null:lG(e,`maxFeePerBlobGas`)}get blobVersionedHashes(){let e=this.#p;return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){J(Array.isArray(e),`blobVersionedHashes must be an Array`,`value`,e),e=e.slice();for(let t=0;t<e.length;t++)J(YW(e[t],32),`invalid blobVersionedHash`,`value[${t}]`,e[t])}this.#p=e}get blobs(){return this.#h==null?null:this.#h.map(e=>Object.assign({},e))}set blobs(e){if(e==null){this.#h=null;return}let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if(XW(i)){VW(this.#m,`adding a raw blob requires a KZG library`,`UNSUPPORTED_OPERATION`,{operation:`set blobs()`});let e=qW(i);if(J(e.length<=aZ,`blob is too large`,`blobs[${r}]`,i),e.length!==aZ){let t=new Uint8Array(aZ);t.set(e),e=t}let a=this.#m.blobToKzgCommitment(e),o=Y(this.#m.computeBlobKzgProof(e,a));t.push({data:Y(e),commitment:Y(a),proof:o}),n.push(oZ(1,a))}else{let e=Y(i.commitment);t.push({data:Y(i.data),commitment:e,proof:Y(i.proof)}),n.push(oZ(1,e))}}this.#h=t,this.#p=n}get kzg(){return this.#m}set kzg(e){this.#m=e}constructor(){this.#e=null,this.#t=null,this.#r=0,this.#i=$X,this.#a=null,this.#o=null,this.#s=null,this.#n=`0x`,this.#c=$X,this.#l=$X,this.#u=null,this.#d=null,this.#f=null,this.#p=null,this.#h=null,this.#m=null}get hash(){return this.signature==null?null:Lq(this.#g(!0,!1))}get unsignedHash(){return Lq(this.unsignedSerialized)}get from(){return this.signature==null?null:QX(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:pX.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}#g(e,t){VW(!e||this.signature!=null,`cannot serialize unsigned transaction; maybe you meant .unsignedSerialized`,`UNSUPPORTED_OPERATION`,{operation:`.serialized`});let n=e?this.signature:null;switch(this.inferType()){case 0:return hZ(this,n);case 1:return bZ(this,n);case 2:return vZ(this,n);case 3:return SZ(this,n,t?this.blobs:null)}VW(!1,`unsupported transaction type`,`UNSUPPORTED_OPERATION`,{operation:`.serialized`})}get serialized(){return this.#g(!0,!0)}get unsignedSerialized(){return this.#g(!1,!1)}inferType(){let e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){let e=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,r=this.#f!=null||this.#p;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&VW(this.maxFeePerGas>=this.maxPriorityFeePerGas,`priorityFee cannot be more than maxFee`,`BAD_DATA`,{value:this}),VW(!t||this.type!==0&&this.type!==1,`transaction type cannot have maxFeePerGas or maxPriorityFeePerGas`,`BAD_DATA`,{value:this}),VW(this.type!==0||!n,`legacy transaction cannot have accessList`,`BAD_DATA`,{value:this});let i=[];return this.type==null?t?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):r&&this.to?i.push(3):(i.push(0),i.push(1),i.push(2),i.push(3)):i.push(this.type),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return e.from(this)}toJSON(){let e=e=>e==null?null:e.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(t){if(t==null)return new e;if(typeof t==`string`){let n=qW(t);if(n[0]>=127)return e.from(mZ(n));switch(n[0]){case 1:return e.from(yZ(n));case 2:return e.from(_Z(n));case 3:return e.from(xZ(n))}VW(!1,`unsupported transaction type`,`UNSUPPORTED_OPERATION`,{operation:`from`})}let n=new e;return t.type!=null&&(n.type=t.type),t.to!=null&&(n.to=t.to),t.nonce!=null&&(n.nonce=t.nonce),t.gasLimit!=null&&(n.gasLimit=t.gasLimit),t.gasPrice!=null&&(n.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(n.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(n.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(n.data=t.data),t.value!=null&&(n.value=t.value),t.chainId!=null&&(n.chainId=t.chainId),t.signature!=null&&(n.signature=fX.from(t.signature)),t.accessList!=null&&(n.accessList=t.accessList),t.blobVersionedHashes!=null&&(n.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(n.kzg=t.kzg),t.blobs!=null&&(n.blobs=t.blobs),t.hash!=null&&(J(n.isSigned(),`unsigned transaction cannot define '.hash'`,`tx`,t),J(n.hash===t.hash,`hash mismatch`,`tx`,t)),t.from!=null&&(J(n.isSigned(),`unsigned transaction cannot define '.from'`,`tx`,t),J(n.from.toLowerCase()===(t.from||``).toLowerCase(),`from mismatch`,`tx`,t)),n}};function wZ(e){return typeof e==`string`&&(e=AG(e)),Lq(QW([AG(rX),AG(String(e.length)),e]))}var TZ=new Uint8Array(32);TZ.fill(0);var EZ=BigInt(-1),DZ=BigInt(0),OZ=BigInt(1),kZ=BigInt(`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`);function AZ(e){let t=qW(e),n=t.length%32;return n?QW([t,TZ.slice(n)]):Y(t)}var jZ=hG(OZ,32),MZ=hG(DZ,32),NZ={name:`string`,version:`string`,chainId:`uint256`,verifyingContract:`address`,salt:`bytes32`},PZ=[`name`,`version`,`chainId`,`verifyingContract`,`salt`];function FZ(e){return function(t){return J(typeof t==`string`,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}var IZ={name:FZ(`name`),version:FZ(`version`),chainId:function(e){let t=lG(e,`domain.chainId`);return J(t>=0,`invalid chain ID`,`domain.chainId`,e),Number.isSafeInteger(t)?Number(t):_G(t)},verifyingContract:function(e){try{return SX(e).toLowerCase()}catch{}J(!1,`invalid domain value "verifyingContract"`,`domain.verifyingContract`,e)},salt:function(e){let t=qW(e,`domain.salt`);return J(t.length===32,`invalid domain value "salt"`,`domain.salt`,e),Y(t)}};function LZ(e){{let t=e.match(/^(u?)int(\d+)$/);if(t){let n=t[1]===``,r=parseInt(t[2]);J(r%8==0&&r!==0&&r<=256&&t[2]===String(r),`invalid numeric width`,`type`,e);let i=cG(kZ,n?r-1:r),a=n?(i+OZ)*EZ:DZ;return function(t){let r=lG(t,`value`);return J(r>=a&&r<=i,`value out-of-bounds for ${e}`,`value`,r),hG(n?sG(r,256):r,32)}}}{let t=e.match(/^bytes(\d+)$/);if(t){let n=parseInt(t[1]);return J(n!==0&&n<=32&&t[1]===String(n),`invalid bytes width`,`type`,e),function(t){return J(qW(t).length===n,`invalid length for ${e}`,`value`,t),AZ(t)}}}switch(e){case`address`:return function(e){return nG(SX(e),32)};case`bool`:return function(e){return e?jZ:MZ};case`bytes`:return function(e){return Lq(e)};case`string`:return function(e){return JX(e)}}return null}function RZ(e,t){return`${e}(${t.map(({name:e,type:t})=>t+` `+e).join(`,`)})`}function zZ(e){let t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}var BZ=class e{primaryType;#e;get types(){return JSON.parse(this.#e)}#t;#n;constructor(e){this.#t=new Map,this.#n=new Map;let t=new Map,n=new Map,r=new Map,i={};Object.keys(e).forEach(a=>{i[a]=e[a].map(({name:t,type:n})=>{let{base:r,index:i}=zZ(n);return r===`int`&&!e.int&&(r=`int256`),r===`uint`&&!e.uint&&(r=`uint256`),{name:t,type:r+(i||``)}}),t.set(a,new Set),n.set(a,[]),r.set(a,new Set)}),this.#e=JSON.stringify(i);for(let r in i){let a=new Set;for(let o of i[r]){J(!a.has(o.name),`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(r)}`,`types`,e),a.add(o.name);let i=zZ(o.type).base;J(i!==r,`circular type reference to ${JSON.stringify(i)}`,`types`,e),!LZ(i)&&(J(n.has(i),`unknown type ${JSON.stringify(i)}`,`types`,e),n.get(i).push(r),t.get(r).add(i))}}let a=Array.from(n.keys()).filter(e=>n.get(e).length===0);J(a.length!==0,`missing primary type`,`types`,e),J(a.length===1,`ambiguous primary types or unused types: ${a.map(e=>JSON.stringify(e)).join(`, `)}`,`types`,e),LW(this,{primaryType:a[0]});function o(i,a){J(!a.has(i),`circular type reference to ${JSON.stringify(i)}`,`types`,e),a.add(i);for(let e of t.get(i))if(n.has(e)){o(e,a);for(let t of a)r.get(t).add(e)}a.delete(i)}o(this.primaryType,new Set);for(let[e,t]of r){let n=Array.from(t);n.sort(),this.#t.set(e,RZ(e,i[e])+n.map(e=>RZ(e,i[e])).join(``))}}getEncoder(e){let t=this.#n.get(e);return t||(t=this.#r(e),this.#n.set(e,t)),t}#r(e){{let t=LZ(e);if(t)return t}let t=zZ(e).array;if(t){let e=t.prefix,n=this.getEncoder(e);return r=>{J(t.count===-1||t.count===r.length,`array length mismatch; expected length ${t.count}`,`value`,r);let i=r.map(n);return this.#t.has(e)&&(i=i.map(Lq)),Lq(QW(i))}}let n=this.types[e];if(n){let t=JX(this.#t.get(e));return e=>{let r=n.map(({name:t,type:n})=>{let r=this.getEncoder(n)(e[t]);return this.#t.has(n)?Lq(r):r});return r.unshift(t),QW(r)}}J(!1,`unknown type: ${e}`,`type`,e)}encodeType(e){let t=this.#t.get(e);return J(t,`unknown type: ${JSON.stringify(e)}`,`name`,e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Lq(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(LZ(e))return n(e,t);let r=zZ(e).array;if(r)return J(r.count===-1||r.count===t.length,`array length mismatch; expected length ${r.count}`,`value`,t),t.map(e=>this._visit(r.prefix,e,n));let i=this.types[e];if(i)return i.reduce((e,{name:r,type:i})=>(e[r]=this._visit(i,t[r],n),e),{});J(!1,`unknown type: ${e}`,`type`,e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(t){return new e(t)}static getPrimaryType(t){return e.from(t).primaryType}static hashStruct(t,n,r){return e.from(n).hashStruct(t,r)}static hashDomain(t){let n=[];for(let e in t){if(t[e]==null)continue;let r=NZ[e];J(r,`invalid typed-data domain key: ${JSON.stringify(e)}`,`domain`,t),n.push({name:e,type:r})}return n.sort((e,t)=>PZ.indexOf(e.name)-PZ.indexOf(t.name)),e.hashStruct(`EIP712Domain`,{EIP712Domain:n},t)}static encode(t,n,r){return QW([`0x1901`,e.hashDomain(t),e.from(n).hash(r)])}static hash(t,n,r){return Lq(e.encode(t,n,r))}static async resolveNames(t,n,r,i){t=Object.assign({},t);for(let e in t)t[e]??delete t[e];let a={};t.verifyingContract&&!YW(t.verifyingContract,20)&&(a[t.verifyingContract]=`0x`);let o=e.from(n);o.visit(r,(e,t)=>(e===`address`&&!YW(t,20)&&(a[t]=`0x`),t));for(let e in a)a[e]=await i(e);return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),r=o.visit(r,(e,t)=>e===`address`&&a[t]?a[t]:t),{domain:t,value:r}}static getPayload(t,n,r){e.hashDomain(t);let i={},a=[];PZ.forEach(e=>{let n=t[e];n!=null&&(i[e]=IZ[e](n),a.push({name:e,type:NZ[e]}))});let o=e.from(n);n=o.types;let s=Object.assign({},n);return J(s.EIP712Domain==null,`types must not contain EIP712Domain type`,`types.EIP712Domain`,n),s.EIP712Domain=a,o.encode(r),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return Y(qW(t));if(e.match(/^u?int/))return lG(t).toString();switch(e){case`address`:return t.toLowerCase();case`bool`:return!!t;case`string`:return J(typeof t==`string`,`invalid string`,`value`,t),t}J(!1,`unsupported type`,`type`,e)})}}};function VZ(e){let t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}VZ(`external public payable override`.split(` `));var HZ=`constant external internal payable private public pure view override`;VZ(HZ.split(` `));var UZ=`constructor error event fallback function receive struct`;VZ(UZ.split(` `));var WZ=`calldata memory storage payable indexed`,GZ=VZ(WZ.split(` `)),KZ=VZ([UZ,WZ,`tuple returns`,HZ].join(` `).split(` `)),qZ={"(":`OPEN_PAREN`,")":`CLOSE_PAREN`,"[":`OPEN_BRACKET`,"]":`CLOSE_BRACKET`,",":`COMMA`,"@":`AT`},JZ=RegExp(`^(\\s*)`),YZ=RegExp(`^([0-9]+)`),XZ=RegExp(`^([a-zA-Z$_][a-zA-Z0-9$_]*)`),ZZ=RegExp(`^([a-zA-Z$_][a-zA-Z0-9$_]*)$`),QZ=RegExp(`^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$`),$Z=class e{#e;#t;get offset(){return this.#e}get length(){return this.#t.length-this.#e}constructor(e){this.#e=0,this.#t=e.slice()}clone(){return new e(this.#t)}reset(){this.#e=0}#n(t=0,n=0){return new e(this.#t.slice(t,n).map(e=>Object.freeze(Object.assign({},e,{match:e.match-t,linkBack:e.linkBack-t,linkNext:e.linkNext-t}))))}popKeyword(e){let t=this.peek();if(t.type!==`KEYWORD`||!e.has(t.text))throw Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){let t=this.peek();throw Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){let e=this.peek();if(e.type!==`OPEN_PAREN`)throw Error(`bad start`);let t=this.#n(this.#e+1,e.match+1);return this.#e=e.match+1,t}popParams(){let e=this.peek();if(e.type!==`OPEN_PAREN`)throw Error(`bad start`);let t=[];for(;this.#e<e.match-1;){let e=this.peek().linkNext;t.push(this.#n(this.#e+1,e)),this.#e=e}return this.#e=e.match+1,t}peek(){if(this.#e>=this.#t.length)throw Error(`out-of-bounds`);return this.#t[this.#e]}peekKeyword(e){let t=this.peekType(`KEYWORD`);return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;let t=this.peek();return t.type===e?t.text:null}pop(){let e=this.peek();return this.#e++,e}toString(){let e=[];for(let t=this.#e;t<this.#t.length;t++){let n=this.#t[t];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(` `)}>`}};function eQ(e){let t=[],n=t=>{let n=a<e.length?JSON.stringify(e[a]):`$EOI`;throw Error(`invalid token ${n} at ${a}: ${t}`)},r=[],i=[],a=0;for(;a<e.length;){let o=e.substring(a),s=o.match(JZ);s&&(a+=s[1].length,o=e.substring(a));let c={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:``,text:``,offset:a,value:-1};t.push(c);let l=qZ[o[0]]||``;if(l){if(c.type=l,c.text=o[0],a++,l===`OPEN_PAREN`)r.push(t.length-1),i.push(t.length-1);else if(l==`CLOSE_PAREN`)r.length===0&&n(`no matching open bracket`),c.match=r.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=i.pop(),t[c.linkBack].linkNext=t.length-1;else if(l===`COMMA`)c.linkBack=i.pop(),t[c.linkBack].linkNext=t.length-1,i.push(t.length-1);else if(l===`OPEN_BRACKET`)c.type=`BRACKET`;else if(l===`CLOSE_BRACKET`){let e=t.pop().text;if(t.length>0&&t[t.length-1].type===`NUMBER`){let n=t.pop().text;e=n+e,t[t.length-1].value=pG(n)}if(t.length===0||t[t.length-1].type!==`BRACKET`)throw Error(`missing opening bracket`);t[t.length-1].text+=e}continue}if(s=o.match(XZ),s){if(c.text=s[1],a+=c.text.length,KZ.has(c.text)){c.type=`KEYWORD`;continue}if(c.text.match(QZ)){c.type=`TYPE`;continue}c.type=`ID`;continue}if(s=o.match(YZ),s){c.text=s[1],c.type=`NUMBER`,a+=c.text.length;continue}throw Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new $Z(t.map(e=>Object.freeze(e)))}function tQ(e,t){let n=new Set;for(;;){let r=e.peekType(`KEYWORD`);if(r==null||t&&!t.has(r))break;if(e.pop(),n.has(r))throw Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}var nQ=new RegExp(/^(.*)\[([0-9]*)\]$/);function rQ(e){let t=e.match(QZ);if(J(t,`invalid type`,`type`,e),e===`uint`)return`uint256`;if(e===`int`)return`int256`;if(t[2]){let n=parseInt(t[2]);J(n!==0&&n<=32,`invalid bytes length`,`type`,e)}else if(t[3]){let n=parseInt(t[3]);J(n!==0&&n<=256&&n%8==0,`invalid numeric width`,`type`,e)}return e}var iQ={},aQ=Symbol.for(`_ethers_internal`),oQ=`_ParamTypeInternal`,sQ=class e{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,n,r,i,a,o,s){if(GW(e,iQ,`ParamType`),Object.defineProperty(this,aQ,{value:oQ}),a&&=Object.freeze(a.slice()),r===`array`){if(o==null||s==null)throw Error(``)}else if(o!=null||s!=null)throw Error(``);if(r===`tuple`){if(a==null)throw Error(``)}else if(a!=null)throw Error(``);LW(this,{name:t,type:n,baseType:r,indexed:i,components:a,arrayLength:o,arrayChildren:s})}format(e){if(e??=`sighash`,e===`json`){let t=this.name||``;if(this.isArray()){let e=JSON.parse(this.arrayChildren.format(`json`));return e.name=t,e.type+=`[${this.arrayLength<0?``:String(this.arrayLength)}]`,JSON.stringify(e)}let n={type:this.baseType===`tuple`?`tuple`:this.type,name:t};return typeof this.indexed==`boolean`&&(n.indexed=this.indexed),this.isTuple()&&(n.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(n)}let t=``;return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?``:String(this.arrayLength)}]`):this.isTuple()?t+=`(`+this.components.map(t=>t.format(e)).join(e===`full`?`, `:`,`)+`)`:t+=this.type,e!==`sighash`&&(this.indexed===!0&&(t+=` indexed`),e===`full`&&this.name&&(t+=` `+this.name)),t}isArray(){return this.baseType===`array`}isTuple(){return this.baseType===`tuple`}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw Error(`invalid array value`);if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw Error(`array is wrong length`);let n=this;return e.map(e=>n.arrayChildren.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw Error(`invalid tuple value`);if(e.length!==this.components.length)throw Error(`array is wrong length`);let n=this;return e.map((e,r)=>n.components[r].walk(e,t))}return t(this.type,e)}#e(e,t,n,r){if(this.isArray()){if(!Array.isArray(t))throw Error(`invalid array value`);if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw Error(`array is wrong length`);let i=this.arrayChildren,a=t.slice();a.forEach((t,r)=>{i.#e(e,t,n,e=>{a[r]=e})}),r(a);return}if(this.isTuple()){let i=this.components,a;if(Array.isArray(t))a=t.slice();else{if(typeof t!=`object`||!t)throw Error(`invalid tuple value`);a=i.map(e=>{if(!e.name)throw Error(`cannot use object value with unnamed components`);if(!(e.name in t))throw Error(`missing value for component ${e.name}`);return t[e.name]})}if(a.length!==this.components.length)throw Error(`array is wrong length`);a.forEach((t,r)=>{i[r].#e(e,t,n,e=>{a[r]=e})}),r(a);return}let i=n(this.type,t);i.then?e.push((async function(){r(await i)})()):r(i)}async walkAsync(e,t){let n=[],r=[e];return this.#e(n,e,t,e=>{r[0]=e}),n.length&&await Promise.all(n),r[0]}static from(t,n){if(e.isParamType(t))return t;if(typeof t==`string`)try{return e.from(eQ(t),n)}catch{J(!1,`invalid param type`,`obj`,t)}else if(t instanceof $Z){let r=``,i=``,a=null;tQ(t,VZ([`tuple`])).has(`tuple`)||t.peekType(`OPEN_PAREN`)?(i=`tuple`,a=t.popParams().map(t=>e.from(t)),r=`tuple(${a.map(e=>e.format()).join(`,`)})`):(r=rQ(t.popType(`TYPE`)),i=r);let o=null,s=null;for(;t.length&&t.peekType(`BRACKET`);){let n=t.pop();o=new e(iQ,``,r,i,null,a,s,o),s=n.value,r+=n.text,i=`array`,a=null}let c=null;if(tQ(t,GZ).has(`indexed`)){if(!n)throw Error(``);c=!0}let l=t.peekType(`ID`)?t.pop().text:``;if(t.length)throw Error(`leftover tokens`);return new e(iQ,l,r,i,c,a,s,o)}let r=t.name;J(!r||typeof r==`string`&&r.match(ZZ),`invalid name`,`obj.name`,r);let i=t.indexed;i!=null&&(J(n,`parameter cannot be indexed`,`obj.indexed`,t.indexed),i=!!i);let a=t.type,o=a.match(nQ);if(o){let n=parseInt(o[2]||`-1`),s=e.from({type:o[1],components:t.components});return new e(iQ,r||``,a,`array`,i,null,n,s)}if(a===`tuple`||a.startsWith(`tuple(`)||a.startsWith(`(`)){let n=t.components==null?null:t.components.map(t=>e.from(t));return new e(iQ,r||``,a,`tuple`,i,n,null,null)}return a=rQ(t.type),new e(iQ,r||``,a,a,i,null,null,null)}static isParamType(e){return e&&e[aQ]===oQ}},cQ=new Map;cQ.set(0,`GENERIC_PANIC`),cQ.set(1,`ASSERT_FALSE`),cQ.set(17,`OVERFLOW`),cQ.set(18,`DIVIDE_BY_ZERO`),cQ.set(33,`ENUM_RANGE_ERROR`),cQ.set(34,`BAD_STORAGE_DATA`),cQ.set(49,`STACK_UNDERFLOW`),cQ.set(50,`ARRAY_RANGE_ERROR`),cQ.set(65,`OUT_OF_MEMORY`),cQ.set(81,`UNINITIALIZED_FUNCTION_CALL`);var lQ=new RegExp(/^bytes([0-9]*)$/),uQ=new RegExp(/^(u?int)([0-9]*)$/),dQ=null,fQ=1024;function pQ(e,t,n,r){let i=`missing revert data`,a=null,o=null;if(n){i=`execution reverted`;let e=qW(n);if(n=Y(n),e.length===0)i+=` (no data present; likely require(false) occurred`,a=`require(false)`;else if(e.length%32!=4)i+=` (could not decode reason; invalid data length)`;else if(Y(e.slice(0,4))===`0x08c379a0`)try{a=r.decode([`string`],e.slice(4))[0],o={signature:`Error(string)`,name:`Error`,args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=` (could not decode reason; invalid string data)`}else if(Y(e.slice(0,4))===`0x4e487b71`)try{let t=Number(r.decode([`uint256`],e.slice(4))[0]);o={signature:`Panic(uint256)`,name:`Panic`,args:[t]},a=`Panic due to ${cQ.get(t)||`UNKNOWN`}(${t})`,i+=`: ${a}`}catch{i+=` (could not decode panic code)`}else i+=` (unknown custom error)`}let s={to:t.to?SX(t.to):null,data:t.data||`0x`};return t.from&&(s.from=SX(t.from)),BW(i,`CALL_EXCEPTION`,{action:e,data:n,reason:a,transaction:s,invocation:null,revert:o})}var mQ=class e{#e(e){if(e.isArray())return new FX(this.#e(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new qX(e.components.map(e=>this.#e(e)),e.name);switch(e.baseType){case`address`:return new jX(e.name);case`bool`:return new IX(e.name);case`string`:return new KX(e.name);case`bytes`:return new RX(e.name);case``:return new VX(e.name)}let t=e.type.match(uQ);if(t){let n=parseInt(t[2]||`256`);return J(n!==0&&n<=256&&n%8==0,`invalid `+t[1]+` bit length`,`param`,e),new GX(n/8,t[1]===`int`,e.name)}if(t=e.type.match(lQ),t){let n=parseInt(t[1]);return J(n!==0&&n<=32,`invalid bytes length`,`param`,e),new zX(n,e.name)}J(!1,`invalid type`,`type`,e.type)}getDefaultValue(e){return new qX(e.map(e=>this.#e(sQ.from(e))),`_`).defaultValue()}encode(e,t){HW(t.length,e.length,`types/values length mismatch`);let n=new qX(e.map(e=>this.#e(sQ.from(e))),`_`),r=new eK;return n.encode(r,t),r.data}decode(e,t,n){return new qX(e.map(e=>this.#e(sQ.from(e))),`_`).decode(new tK(t,n,fQ))}static _setDefaultMaxInflation(e){J(typeof e==`number`&&Number.isInteger(e),`invalid defaultMaxInflation factor`,`value`,e),fQ=e}static defaultAbiCoder(){return dQ??=new e,dQ}static getBuiltinCallException(t,n,r){return pQ(t,n,r,e.defaultAbiCoder())}};function hQ(e){let t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=Y(e.data));let n=`chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value`.split(/,/);for(let r of n)!(r in e)||e[r]==null||(t[r]=lG(e[r],`request.${r}`));let r=`type,nonce`.split(/,/);for(let n of r)!(n in e)||e[n]==null||(t[n]=pG(e[n],`request.${n}`));return e.accessList&&(t.accessList=XX(e.accessList)),`blockTag`in e&&(t.blockTag=e.blockTag),`enableCcipRead`in e&&(t.enableCcipRead=!!e.enableCcipRead),`customData`in e&&(t.customData=e.customData),`blobVersionedHashes`in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),`kzg`in e&&(t.kzg=e.kzg),`blobs`in e&&e.blobs&&(t.blobs=e.blobs.map(e=>XW(e)?Y(e):Object.assign({},e))),t}function gQ(e,t){if(e.provider)return e.provider;VW(!1,`missing provider`,`UNSUPPORTED_OPERATION`,{operation:t})}async function _Q(e,t){let n=hQ(t);if(n.to!=null&&(n.to=TX(n.to,e)),n.from!=null){let t=n.from;n.from=Promise.all([e.getAddress(),TX(t,e)]).then(([e,t])=>(J(e.toLowerCase()===t.toLowerCase(),`transaction from mismatch`,`tx.from`,t),e))}else n.from=e.getAddress();return await IW(n)}var vQ=class{provider;constructor(e){LW(this,{provider:e||null})}async getNonce(e){return gQ(this,`getTransactionCount`).getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await _Q(this,e)}async populateTransaction(e){let t=gQ(this,`populateTransaction`),n=await _Q(this,e);n.nonce??=await this.getNonce(`pending`),n.gasLimit??=await this.estimateGas(n);let r=await this.provider.getNetwork();n.chainId==null?n.chainId=r.chainId:J(lG(n.chainId)===r.chainId,`transaction chainId mismatch`,`tx.chainId`,e.chainId);let i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?J(!1,`eip-1559 transaction do not support gasPrice`,`tx`,e):(n.type===0||n.type===1)&&i&&J(!1,`pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas`,`tx`,e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){let e=await t.getFeeData();VW(e.gasPrice!=null,`network does not support gasPrice`,`UNSUPPORTED_OPERATION`,{operation:`getGasPrice`}),n.gasPrice??=e.gasPrice}else{let e=await t.getFeeData();if(n.type==null)if(e.maxFeePerGas!=null&&e.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){let e=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=e,n.maxPriorityFeePerGas=e}else n.maxFeePerGas??=e.maxFeePerGas,n.maxPriorityFeePerGas??=e.maxPriorityFeePerGas;else e.gasPrice==null?VW(!1,`failed to get consistent fee data`,`UNSUPPORTED_OPERATION`,{operation:`signer.getFeeData`}):(VW(!i,`network does not support EIP-1559`,`UNSUPPORTED_OPERATION`,{operation:`populateTransaction`}),n.gasPrice??=e.gasPrice,n.type=0);else (n.type===2||n.type===3)&&(n.maxFeePerGas??=e.maxFeePerGas,n.maxPriorityFeePerGas??=e.maxPriorityFeePerGas)}return await IW(n)}async estimateGas(e){return gQ(this,`estimateGas`).estimateGas(await this.populateCall(e))}async call(e){return gQ(this,`call`).call(await this.populateCall(e))}async resolveName(e){return await gQ(this,`resolveName`).resolveName(e)}async sendTransaction(e){let t=gQ(this,`sendTransaction`),n=await this.populateTransaction(e);delete n.from;let r=CZ.from(n);return await t.broadcastTransaction(await this.signTransaction(r))}},yQ=class e extends vQ{address;constructor(e,t){super(t),LW(this,{address:e})}async getAddress(){return this.address}connect(t){return new e(this.address,t)}#e(e,t){VW(!1,`VoidSigner cannot sign ${e}`,`UNSUPPORTED_OPERATION`,{operation:t})}async signTransaction(e){this.#e(`transactions`,`signTransaction`)}async signMessage(e){this.#e(`messages`,`signMessage`)}async signTypedData(e,t,n){this.#e(`typed-data`,`signTypedData`)}},bQ=class e extends vQ{address;#e;constructor(e,t){super(t),J(e&&typeof e.sign==`function`,`invalid private key`,`privateKey`,`[ REDACTED ]`),this.#e=e;let n=ZX(this.signingKey.publicKey);LW(this,{address:n})}get signingKey(){return this.#e}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(t){return new e(this.#e,t)}async signTransaction(e){e=hQ(e);let{to:t,from:n}=await IW({to:e.to?TX(e.to,this.provider):void 0,from:e.from?TX(e.from,this.provider):void 0});t!=null&&(e.to=t),n!=null&&(e.from=n),e.from!=null&&(J(SX(e.from)===this.address,`transaction from address mismatch`,`tx.from`,e.from),delete e.from);let r=CZ.from(e);return r.signature=this.signingKey.sign(r.unsignedHash),r.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(wZ(e)).serialized}async signTypedData(e,t,n){let r=await BZ.resolveNames(e,t,n,async e=>{VW(this.provider!=null,`cannot resolve ENS names without a provider`,`UNSUPPORTED_OPERATION`,{operation:`resolveName`,info:{name:e}});let t=await this.provider.resolveName(e);return VW(t!=null,`unconfigured ENS name`,`UNCONFIGURED_NAME`,{value:e}),t});return this.signingKey.sign(BZ.hash(r.domain,t,r.value)).serialized}},xQ=" !#$%&'()*+,-./<=>?@[]^_`{|}~",SQ=/^[a-z]*$/i;function CQ(e,t){let n=97;return e.reduce((e,r)=>(r===t?n++:r.match(SQ)?e.push(String.fromCharCode(n)+r):(n=97,e.push(r)),e),[])}function wQ(e,t){for(let n=28;n>=0;n--)e=e.split(xQ[n]).join(t.substring(2*n,2*n+2));let n=[],r=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(e,t,r,i)=>{if(r)for(let e=parseInt(r);e>=0;e--)n.push(`;`);else n.push(t.toLowerCase());return``});if(r)throw Error(`leftovers: ${JSON.stringify(r)}`);return CQ(CQ(n,`;`),`:`)}function TQ(e){return J(e[0]===`0`,`unsupported auwl data`,`data`,e),wQ(e.substring(59),e.substring(1,59))}var EQ=class{locale;constructor(e){LW(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(` `)}},DQ=class extends EQ{#e;#t;constructor(e,t,n){super(e),this.#e=t,this.#t=n,this.#n=null}get _data(){return this.#e}_decodeWords(){return TQ(this.#e)}#n;#r(){if(this.#n==null){let e=this._decodeWords();if(JX(e.join(`
|
|
88
|
-
`)+`
|
|
89
|
-
`)!==this.#t)throw Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#n=e}return this.#n}getWord(e){let t=this.#r();return J(e>=0&&e<t.length,`invalid word index: ${e}`,`index`,e),t[e]}getWordIndex(e){return this.#r().indexOf(e)}},OQ="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO",kQ=`0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60`,AQ=null,jQ=class e extends DQ{constructor(){super(`en`,OQ,kQ)}static wordlist(){return AQ??=new e,AQ}};function MQ(e){return(1<<e)-1<<8-e&255}function NQ(e){return(1<<e)-1&255}function PQ(e,t){WW(`NFKD`),t??=jQ.wordlist();let n=t.split(e);J(n.length%3==0&&n.length>=12&&n.length<=24,`invalid mnemonic length`,`mnemonic`,`[ REDACTED ]`);let r=new Uint8Array(Math.ceil(11*n.length/8)),i=0;for(let e=0;e<n.length;e++){let a=t.getWordIndex(n[e].normalize(`NFKD`));J(a>=0,`invalid mnemonic word at index ${e}`,`mnemonic`,`[ REDACTED ]`);for(let e=0;e<11;e++)a&1<<10-e&&(r[i>>3]|=1<<7-i%8),i++}let a=32*n.length/3,o=MQ(n.length/3);return J((qW(MJ(r.slice(0,a/8)))[0]&o)===(r[r.length-1]&o),`invalid mnemonic checksum`,`mnemonic`,`[ REDACTED ]`),Y(r.slice(0,a/8))}function FQ(e,t){J(e.length%4==0&&e.length>=16&&e.length<=32,`invalid entropy size`,`entropy`,`[ REDACTED ]`),t??=jQ.wordlist();let n=[0],r=11;for(let t=0;t<e.length;t++)r>8?(n[n.length-1]<<=8,n[n.length-1]|=e[t],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=e[t]>>8-r,n.push(e[t]&NQ(8-r)),r+=3);let i=e.length/4,a=parseInt(MJ(e).substring(2,4),16)&MQ(i);return n[n.length-1]<<=i,n[n.length-1]|=a>>8-i,t.join(n.map(e=>t.getWord(e)))}var IQ={},LQ=class e{phrase;password;wordlist;entropy;constructor(e,t,n,r,i){r??=``,i??=jQ.wordlist(),GW(e,IQ,`Mnemonic`),LW(this,{phrase:n,password:r,wordlist:i,entropy:t})}computeSeed(){let e=AG(`mnemonic`+this.password,`NFKD`);return oJ(AG(this.phrase,`NFKD`),e,2048,64,`sha512`)}static fromPhrase(t,n,r){let i=PQ(t,r);return t=FQ(qW(i),r),new e(IQ,i,t,n,r)}static fromEntropy(t,n,r){let i=qW(t,`entropy`),a=FQ(i,r);return new e(IQ,Y(i),a,n,r)}static entropyToPhrase(e,t){return FQ(qW(e,`entropy`),t)}static phraseToEntropy(e,t){return PQ(e,t)}static isValidMnemonic(e,t){try{return PQ(e,t),!0}catch{}return!1}},RQ=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},zQ=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},BQ,VQ,HQ,UQ={16:10,24:12,32:14},WQ=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],GQ=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],KQ=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],qQ=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],JQ=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],YQ=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],XQ=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],ZQ=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],QQ=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],$Q=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],e$=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],t$=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],n$=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],r$=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],i$=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function a$(e){let t=[];for(let n=0;n<e.length;n+=4)t.push(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]);return t}var o$=class e{get key(){return RQ(this,BQ,`f`).slice()}constructor(t){if(BQ.set(this,void 0),VQ.set(this,void 0),HQ.set(this,void 0),!(this instanceof e))throw Error("AES must be instanitated with `new`");zQ(this,BQ,new Uint8Array(t),`f`);let n=UQ[this.key.length];if(n==null)throw TypeError(`invalid key size (must be 16, 24 or 32 bytes)`);zQ(this,HQ,[],`f`),zQ(this,VQ,[],`f`);for(let e=0;e<=n;e++)RQ(this,HQ,`f`).push([0,0,0,0]),RQ(this,VQ,`f`).push([0,0,0,0]);let r=(n+1)*4,i=this.key.length/4,a=a$(this.key),o;for(let e=0;e<i;e++)o=e>>2,RQ(this,HQ,`f`)[o][e%4]=a[e],RQ(this,VQ,`f`)[n-o][e%4]=a[e];let s=0,c=i,l;for(;c<r;){if(l=a[i-1],a[0]^=GQ[l>>16&255]<<24^GQ[l>>8&255]<<16^GQ[l&255]<<8^GQ[l>>24&255]^WQ[s]<<24,s+=1,i!=8)for(let e=1;e<i;e++)a[e]^=a[e-1];else{for(let e=1;e<i/2;e++)a[e]^=a[e-1];l=a[i/2-1],a[i/2]^=GQ[l&255]^GQ[l>>8&255]<<8^GQ[l>>16&255]<<16^GQ[l>>24&255]<<24;for(let e=i/2+1;e<i;e++)a[e]^=a[e-1]}let e=0,t,o;for(;e<i&&c<r;)t=c>>2,o=c%4,RQ(this,HQ,`f`)[t][o]=a[e],RQ(this,VQ,`f`)[n-t][o]=a[e++],c++}for(let e=1;e<n;e++)for(let t=0;t<4;t++)l=RQ(this,VQ,`f`)[e][t],RQ(this,VQ,`f`)[e][t]=t$[l>>24&255]^n$[l>>16&255]^r$[l>>8&255]^i$[l&255]}encrypt(e){if(e.length!=16)throw TypeError(`invalid plaintext size (must be 16 bytes)`);let t=RQ(this,HQ,`f`).length-1,n=[0,0,0,0],r=a$(e);for(let e=0;e<4;e++)r[e]^=RQ(this,HQ,`f`)[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)n[t]=qQ[r[t]>>24&255]^JQ[r[(t+1)%4]>>16&255]^YQ[r[(t+2)%4]>>8&255]^XQ[r[(t+3)%4]&255]^RQ(this,HQ,`f`)[e][t];r=n.slice()}let i=new Uint8Array(16),a=0;for(let e=0;e<4;e++)a=RQ(this,HQ,`f`)[t][e],i[4*e]=(GQ[r[e]>>24&255]^a>>24)&255,i[4*e+1]=(GQ[r[(e+1)%4]>>16&255]^a>>16)&255,i[4*e+2]=(GQ[r[(e+2)%4]>>8&255]^a>>8)&255,i[4*e+3]=(GQ[r[(e+3)%4]&255]^a)&255;return i}decrypt(e){if(e.length!=16)throw TypeError(`invalid ciphertext size (must be 16 bytes)`);let t=RQ(this,VQ,`f`).length-1,n=[0,0,0,0],r=a$(e);for(let e=0;e<4;e++)r[e]^=RQ(this,VQ,`f`)[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)n[t]=ZQ[r[t]>>24&255]^QQ[r[(t+3)%4]>>16&255]^$Q[r[(t+2)%4]>>8&255]^e$[r[(t+1)%4]&255]^RQ(this,VQ,`f`)[e][t];r=n.slice()}let i=new Uint8Array(16),a=0;for(let e=0;e<4;e++)a=RQ(this,VQ,`f`)[t][e],i[4*e]=(KQ[r[e]>>24&255]^a>>24)&255,i[4*e+1]=(KQ[r[(e+3)%4]>>16&255]^a>>16)&255,i[4*e+2]=(KQ[r[(e+2)%4]>>8&255]^a>>8)&255,i[4*e+3]=(KQ[r[(e+1)%4]&255]^a)&255;return i}};BQ=new WeakMap,VQ=new WeakMap,HQ=new WeakMap;var s$=class{constructor(e,t,n){if(n&&!(this instanceof n))throw Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new o$(t)},name:{enumerable:!0,value:e}})}},c$=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},l$=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},u$,d$,f$,p$=class e extends s${constructor(t,n){super(`CTR`,t,e),u$.set(this,void 0),d$.set(this,void 0),f$.set(this,void 0),c$(this,f$,new Uint8Array(16),`f`),l$(this,f$,`f`).fill(0),c$(this,u$,l$(this,f$,`f`),`f`),c$(this,d$,16,`f`),n??=1,typeof n==`number`?this.setCounterValue(n):this.setCounterBytes(n)}get counter(){return new Uint8Array(l$(this,f$,`f`))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>2**53-1)throw TypeError(`invalid counter initial integer value`);for(let t=15;t>=0;--t)l$(this,f$,`f`)[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw TypeError(`invalid counter initial Uint8Array value length`);l$(this,f$,`f`).set(e)}increment(){for(let e=15;e>=0;e--)if(l$(this,f$,`f`)[e]===255)l$(this,f$,`f`)[e]=0;else{l$(this,f$,`f`)[e]++;break}}encrypt(e){var t,n;let r=new Uint8Array(e);for(let e=0;e<r.length;e++)l$(this,d$,`f`)===16&&(c$(this,u$,this.aes.encrypt(l$(this,f$,`f`)),`f`),c$(this,d$,0,`f`),this.increment()),r[e]^=l$(this,u$,`f`)[c$(this,d$,(n=l$(this,d$,`f`),t=n++,n),`f`),t];return r}decrypt(e){return this.encrypt(e)}};u$=new WeakMap,d$=new WeakMap,f$=new WeakMap;function m$(e,t){for(e=String(e);e.length<t;)e=`0`+e;return e}function h$(e){return typeof e==`string`?AG(e,`NFKC`):JW(e)}var g$=`m/44'/60'/0'/0/0`;function _$(e){let t=e.salt==null?uJ(32):qW(e.salt,`options.salt`),n=1<<17,r=8,i=1;return e.scrypt&&(e.scrypt.N&&(n=e.scrypt.N),e.scrypt.r&&(r=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),J(typeof n==`number`&&n>0&&Number.isSafeInteger(n)&&(BigInt(n)&BigInt(n-1))===BigInt(0),`invalid scrypt N parameter`,`options.N`,n),J(typeof r==`number`&&r>0&&Number.isSafeInteger(r),`invalid scrypt r parameter`,`options.r`,r),J(typeof i==`number`&&i>0&&Number.isSafeInteger(i),`invalid scrypt p parameter`,`options.p`,i),{name:`scrypt`,dkLen:32,salt:t,N:n,r,p:i}}function v$(e,t,n,r){let i=qW(n.privateKey,`privateKey`),a=r.iv==null?uJ(16):qW(r.iv,`options.iv`);J(a.length===16,`invalid options.iv length`,`options.iv`,r.iv);let o=r.uuid==null?uJ(16):qW(r.uuid,`options.uuid`);J(o.length===16,`invalid options.uuid length`,`options.uuid`,r.iv);let s=e.slice(0,16),c=e.slice(16,32),l=qW(new p$(s,a).encrypt(i)),u=Lq(QW([c,l])),d={address:n.address.substring(2).toLowerCase(),id:HG(o),version:3,Crypto:{cipher:`aes-128-ctr`,cipherparams:{iv:Y(a).substring(2)},ciphertext:Y(l).substring(2),kdf:`scrypt`,kdfparams:{salt:Y(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:u.substring(2)}};if(n.mnemonic){let t=r.client==null?`ethers/${PW}`:r.client,i=n.mnemonic.path||g$,a=n.mnemonic.locale||`en`,o=e.slice(32,64),s=qW(n.mnemonic.entropy,`account.mnemonic.entropy`),c=uJ(16),l=qW(new p$(o,c).encrypt(s)),u=new Date;d[`x-ethers`]={client:t,gethFilename:`UTC--`+(u.getUTCFullYear()+`-`+m$(u.getUTCMonth()+1,2)+`-`+m$(u.getUTCDate(),2)+`T`+m$(u.getUTCHours(),2)+`-`+m$(u.getUTCMinutes(),2)+`-`+m$(u.getUTCSeconds(),2)+`.0Z`)+`--`+d.address,path:i,locale:a,mnemonicCounter:Y(c).substring(2),mnemonicCiphertext:Y(l).substring(2),version:`0.1`}}return JSON.stringify(d)}function y$(e,t,n){n??={};let r=h$(t),i=_$(n);return v$(qW(TJ(r,i.salt,i.N,i.r,i.p,64)),i,e,n)}async function b$(e,t,n){n??={};let r=h$(t),i=_$(n);return v$(qW(await wJ(r,i.salt,i.N,i.r,i.p,64,n.progressCallback)),i,e,n)}var x$=`m/44'/60'/0'/0/0`,S$=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),C$=2147483648,w$=BigInt(`0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`),T$=`0123456789abcdef`;function E$(e,t){let n=``;for(;e;)n=T$[e%16]+n,e=Math.trunc(e/16);for(;n.length<t*2;)n=`0`+n;return`0x`+n}function D$(e){let t=qW(e);return CG(QW([t,eG(MJ(MJ(t)),0,4)]))}var O$={};function k$(e,t,n,r){let i=new Uint8Array(37);e&C$?(VW(r!=null,`cannot derive child of neutered node`,`UNSUPPORTED_OPERATION`,{operation:`deriveChild`}),i.set(qW(r),1)):i.set(qW(n));for(let t=24;t>=0;t-=8)i[33+(t>>3)]=e>>24-t&255;let a=qW(_q(`sha512`,t,i));return{IL:a.slice(0,32),IR:a.slice(32)}}function A$(e,t){let n=t.split(`/`);J(n.length>0,`invalid path`,`path`,t),n[0]===`m`&&(J(e.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,`path`,t),n.shift());let r=e;for(let e=0;e<n.length;e++){let t=n[e];if(t.match(/^[0-9]+'$/)){let n=parseInt(t.substring(0,t.length-1));J(n<C$,`invalid path index`,`path[${e}]`,t),r=r.deriveChild(C$+n)}else if(t.match(/^[0-9]+$/)){let n=parseInt(t);J(n<C$,`invalid path index`,`path[${e}]`,t),r=r.deriveChild(n)}else J(!1,`invalid path component`,`path[${e}]`,t)}return r}var j$=class e extends bQ{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,n,r,i,a,o,s,c){super(t,c),GW(e,O$,`HDNodeWallet`),LW(this,{publicKey:t.compressedPublicKey});let l=eG(nJ(MJ(this.publicKey)),0,4);LW(this,{parentFingerprint:n,fingerprint:l,chainCode:r,path:i,index:a,depth:o}),LW(this,{mnemonic:s})}connect(t){return new e(O$,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,t)}#e(){let e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&t.wordlist.locale===`en`&&t.password===``&&(e.mnemonic={path:this.path,locale:`en`,entropy:t.entropy}),e}async encrypt(e,t){return await b$(this.#e(),e,{progressCallback:t})}encryptSync(e){return y$(this.#e(),e)}get extendedKey(){return VW(this.depth<256,`Depth too deep`,`UNSUPPORTED_OPERATION`,{operation:`extendedKey`}),D$(QW([`0x0488ADE4`,E$(this.depth,1),this.parentFingerprint,E$(this.index,4),this.chainCode,QW([`0x00`,this.privateKey])]))}hasPath(){return this.path!=null}neuter(){return new M$(O$,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(t){let n=pG(t,`index`);J(n<=4294967295,`invalid index`,`index`,n);let r=this.path;r&&(r+=`/`+(n&2147483647),n&C$&&(r+=`'`));let{IR:i,IL:a}=k$(n,this.chainCode,this.publicKey,this.privateKey);return new e(O$,new pX(hG((fG(a)+BigInt(this.privateKey))%w$,32)),this.fingerprint,Y(i),r,n,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return A$(this,e)}static#t(t,n){J(XW(t),`invalid seed`,`seed`,`[REDACTED]`);let r=qW(t,`seed`);J(r.length>=16&&r.length<=64,`invalid seed`,`seed`,`[REDACTED]`);let i=qW(_q(`sha512`,S$,r));return new e(O$,new pX(Y(i.slice(0,32))),`0x00000000`,Y(i.slice(32)),`m`,0,0,n,null)}static fromExtendedKey(t){let n=gG(wG(t));J(n.length===82||D$(n.slice(0,78))===t,`invalid extended key`,`extendedKey`,`[ REDACTED ]`);let r=n[4],i=Y(n.slice(5,9)),a=parseInt(Y(n.slice(9,13)).substring(2),16),o=Y(n.slice(13,45)),s=n.slice(45,78);switch(Y(n.slice(0,4))){case`0x0488b21e`:case`0x043587cf`:{let e=Y(s);return new M$(O$,ZX(e),e,i,o,null,a,r,null)}case`0x0488ade4`:case`0x04358394 `:if(s[0]!==0)break;return new e(O$,new pX(s.slice(1)),i,o,null,a,r,null,null)}J(!1,`invalid extended key prefix`,`extendedKey`,`[ REDACTED ]`)}static createRandom(t,n,r){t??=``,n??=x$,r??=jQ.wordlist();let i=LQ.fromEntropy(uJ(16),t,r);return e.#t(i.computeSeed(),i).derivePath(n)}static fromMnemonic(t,n){return n||=x$,e.#t(t.computeSeed(),t).derivePath(n)}static fromPhrase(t,n,r,i){n??=``,r??=x$,i??=jQ.wordlist();let a=LQ.fromPhrase(t,n,i);return e.#t(a.computeSeed(),a).derivePath(r)}static fromSeed(t){return e.#t(t,null)}},M$=class e extends yQ{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,n,r,i,a,o,s,c){super(t,c),GW(e,O$,`HDNodeVoidWallet`),LW(this,{publicKey:n});let l=eG(nJ(MJ(n)),0,4);LW(this,{publicKey:n,fingerprint:l,parentFingerprint:r,chainCode:i,path:a,index:o,depth:s})}connect(t){return new e(O$,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,t)}get extendedKey(){return VW(this.depth<256,`Depth too deep`,`UNSUPPORTED_OPERATION`,{operation:`extendedKey`}),D$(QW([`0x0488B21E`,E$(this.depth,1),this.parentFingerprint,E$(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(t){let n=pG(t,`index`);J(n<=4294967295,`invalid index`,`index`,n);let r=this.path;r&&(r+=`/`+(n&2147483647),n&C$&&(r+=`'`));let{IR:i,IL:a}=k$(n,this.chainCode,this.publicKey,null),o=pX.addPoints(a,this.publicKey,!0);return new e(O$,ZX(o),o,this.fingerprint,Y(i),r,n,this.depth+1,this.provider)}derivePath(e){return A$(this,e)}},N$={en:jQ.wordlist()},P$;function F$(e){let t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}var I$=`constant external internal payable private public pure view`,L$=F$(I$.split(` `)),R$=`constructor error event fallback function receive struct`,z$=F$(R$.split(` `)),B$=`calldata memory storage payable indexed`,V$=F$(B$.split(` `)),H$=F$([R$,B$,`tuple returns`,I$].join(` `).split(` `)),U$={"(":`OPEN_PAREN`,")":`CLOSE_PAREN`,"[":`OPEN_BRACKET`,"]":`CLOSE_BRACKET`,",":`COMMA`,"@":`AT`},W$=RegExp(`^(\\s*)`),G$=RegExp(`^([0-9]+)`),K$=RegExp(`^([a-zA-Z$_][a-zA-Z0-9$_]*)`),q$=RegExp(`^([a-zA-Z$_][a-zA-Z0-9$_]*)$`),J$=RegExp(`^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$`),Y$=class{#e;#t;get offset(){return this.#e}get length(){return this.#t.length-this.#e}constructor(e){this.#e=0,this.#t=e.slice()}clone(){return new P$(this.#t)}reset(){this.#e=0}#n(e=0,t=0){return new P$(this.#t.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){let t=this.peek();if(t.type!==`KEYWORD`||!e.has(t.text))throw Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){let e=this.peek();if(e.type!==`OPEN_PAREN`)throw Error(`bad start`);let t=this.#n(this.#e+1,e.match+1);return this.#e=e.match+1,t}popParams(){let e=this.peek();if(e.type!==`OPEN_PAREN`)throw Error(`bad start`);let t=[];for(;this.#e<e.match-1;){let e=this.peek().linkNext;t.push(this.#n(this.#e+1,e)),this.#e=e}return this.#e=e.match+1,t}peek(){if(this.#e>=this.#t.length)throw Error(`out-of-bounds`);return this.#t[this.#e]}peekKeyword(e){let t=this.peekType(`KEYWORD`);return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;let t=this.peek();return t.type===e?t.text:null}pop(){let e=this.peek();return this.#e++,e}toString(){let e=[];for(let t=this.#e;t<this.#t.length;t++){let n=this.#t[t];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(` `)}>`}};P$=Y$;function X$(e){let t=[],n=t=>{let n=a<e.length?JSON.stringify(e[a]):`$EOI`;throw Error(`invalid token ${n} at ${a}: ${t}`)},r=[],i=[],a=0;for(;a<e.length;){let o=e.substring(a),s=o.match(W$);s&&(a+=s[1].length,o=e.substring(a));let c={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:``,text:``,offset:a,value:-1};t.push(c);let l=U$[o[0]]||``;if(l){if(c.type=l,c.text=o[0],a++,l===`OPEN_PAREN`)r.push(t.length-1),i.push(t.length-1);else if(l==`CLOSE_PAREN`)r.length===0&&n(`no matching open bracket`),c.match=r.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=i.pop(),t[c.linkBack].linkNext=t.length-1;else if(l===`COMMA`)c.linkBack=i.pop(),t[c.linkBack].linkNext=t.length-1,i.push(t.length-1);else if(l===`OPEN_BRACKET`)c.type=`BRACKET`;else if(l===`CLOSE_BRACKET`){let e=t.pop().text;if(t.length>0&&t[t.length-1].type===`NUMBER`){let n=t.pop().text;e=n+e,t[t.length-1].value=pG(n)}if(t.length===0||t[t.length-1].type!==`BRACKET`)throw Error(`missing opening bracket`);t[t.length-1].text+=e}continue}if(s=o.match(K$),s){if(c.text=s[1],a+=c.text.length,H$.has(c.text)){c.type=`KEYWORD`;continue}if(c.text.match(J$)){c.type=`TYPE`;continue}c.type=`ID`;continue}if(s=o.match(G$),s){c.text=s[1],c.type=`NUMBER`,a+=c.text.length;continue}throw Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new Y$(t.map(e=>Object.freeze(e)))}function Z$(e,t){let n=[];for(let r in t.keys())e.has(r)&&n.push(r);if(n.length>1)throw Error(`conflicting types: ${n.join(`, `)}`)}function Q$(e,t){if(t.peekKeyword(z$)){let n=t.pop().text;if(n!==e)throw Error(`expected ${e}, got ${n}`)}return t.popType(`ID`)}function $$(e,t){let n=new Set;for(;;){let r=e.peekType(`KEYWORD`);if(r==null||t&&!t.has(r))break;if(e.pop(),n.has(r))throw Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function e1(e){let t=$$(e,L$);return Z$(t,F$(`constant payable nonpayable`.split(` `))),Z$(t,F$(`pure view payable nonpayable`.split(` `))),t.has(`view`)?`view`:t.has(`pure`)?`pure`:t.has(`payable`)?`payable`:t.has(`nonpayable`)?`nonpayable`:t.has(`constant`)?`view`:`nonpayable`}function t1(e,t){return e.popParams().map(e=>h1.from(e,t))}function n1(e){if(e.peekType(`AT`)){if(e.pop(),e.peekType(`NUMBER`))return lG(e.pop().text);throw Error(`invalid gas`)}return null}function r1(e){if(e.length)throw Error(`unexpected tokens: ${e.toString()}`)}var i1=new RegExp(/^(.*)\[([0-9]*)\]$/);function a1(e){let t=e.match(J$);if(J(t,`invalid type`,`type`,e),e===`uint`)return`uint256`;if(e===`int`)return`int256`;if(t[2]){let n=parseInt(t[2]);J(n!==0&&n<=32,`invalid bytes length`,`type`,e)}else if(t[3]){let n=parseInt(t[3]);J(n!==0&&n<=256&&n%8==0,`invalid numeric width`,`type`,e)}return e}var o1={},s1=Symbol.for(`_ethers_internal`),c1=`_ParamTypeInternal`,l1=`_ErrorInternal`,u1=`_EventInternal`,d1=`_ConstructorInternal`,f1=`_FallbackInternal`,p1=`_FunctionInternal`,m1=`_StructInternal`,h1=class e{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,n,r,i,a,o,s){if(GW(e,o1,`ParamType`),Object.defineProperty(this,s1,{value:c1}),a&&=Object.freeze(a.slice()),r===`array`){if(o==null||s==null)throw Error(``)}else if(o!=null||s!=null)throw Error(``);if(r===`tuple`){if(a==null)throw Error(``)}else if(a!=null)throw Error(``);LW(this,{name:t,type:n,baseType:r,indexed:i,components:a,arrayLength:o,arrayChildren:s})}format(e){if(e??=`sighash`,e===`json`){let t={type:this.baseType===`tuple`?`tuple`:this.type,name:this.name||void 0};return typeof this.indexed==`boolean`&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t)}let t=``;return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?``:String(this.arrayLength)}]`):this.isTuple()?(e!==`sighash`&&(t+=this.type),t+=`(`+this.components.map(t=>t.format(e)).join(e===`full`?`, `:`,`)+`)`):t+=this.type,e!==`sighash`&&(this.indexed===!0&&(t+=` indexed`),e===`full`&&this.name&&(t+=` `+this.name)),t}isArray(){return this.baseType===`array`}isTuple(){return this.baseType===`tuple`}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw Error(`invalid array value`);if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw Error(`array is wrong length`);return e.map(e=>this.arrayChildren?.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw Error(`invalid tuple value`);if(e.length!==this.components.length)throw Error(`array is wrong length`);return e.map((e,n)=>this.components?.[n].walk(e,t))}return t(this.type,e)}#e(e,t,n,r){if(this.isArray()){if(!Array.isArray(t))throw Error(`invalid array value`);if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw Error(`array is wrong length`);let i=this.arrayChildren,a=t.slice();a.forEach((t,r)=>{i.#e(e,t,n,e=>{a[r]=e})}),r(a);return}if(this.isTuple()){let i=this.components,a;if(Array.isArray(t))a=t.slice();else{if(typeof t!=`object`||!t)throw Error(`invalid tuple value`);a=i.map(e=>{if(!e.name)throw Error(`cannot use object value with unnamed components`);if(!(e.name in t))throw Error(`missing value for component ${e.name}`);return t[e.name]})}if(a.length!==this.components.length)throw Error(`array is wrong length`);a.forEach((t,r)=>{i[r].#e(e,t,n,e=>{a[r]=e})}),r(a);return}let i=n(this.type,t);i.then?e.push((async function(){r(await i)})()):r(i)}async walkAsync(e,t){let n=[],r=[e];return this.#e(n,e,t,e=>{r[0]=e}),n.length&&await Promise.all(n),r[0]}static from(t,n){if(e.isParamType(t))return t;if(typeof t==`string`)return e.from(X$(t),n);if(t instanceof Y$){let r=``,i=``,a=null;$$(t,F$([`tuple`])).has(`tuple`)||t.peekType(`OPEN_PAREN`)?(i=`tuple`,a=t.popParams().map(t=>e.from(t)),r=`tuple(${a.map(e=>e.format()).join(`,`)})`):(r=a1(t.popType(`TYPE`)),i=r);let o=null,s=null;for(;t.length&&t.peekType(`BRACKET`);){let n=t.pop();o=new e(o1,``,r,i,null,a,s,o),s=n.value,r+=n.text,i=`array`,a=null}let c=null;if($$(t,V$).has(`indexed`)){if(!n)throw Error(``);c=!0}let l=t.peekType(`ID`)?t.pop().text:``;if(t.length)throw Error(`leftover tokens`);return new e(o1,l,r,i,c,a,s,o)}let r=t.name;J(!r||typeof r==`string`&&r.match(q$),`invalid name`,`obj.name`,r);let i=t.indexed;i!=null&&(J(n,`parameter cannot be indexed`,`obj.indexed`,t.indexed),i=!!i);let a=t.type,o=a.match(i1);if(o){let n=parseInt(o[2]||`-1`),s=e.from({type:o[1],components:t.components});return new e(o1,r||``,a,`array`,i,null,n,s)}if(a===`tuple`||a.startsWith(`tuple(`)||a.startsWith(`(`)){let n=t.components==null?null:t.components.map(t=>e.from(t));return new e(o1,r||``,a,`tuple`,i,n,null,null)}return a=a1(t.type),new e(o1,r||``,a,a,i,null,null,null)}static isParamType(e){return e&&e[s1]===c1}},g1=class e{type;inputs;constructor(e,t,n){GW(e,o1,`Fragment`),n=Object.freeze(n.slice()),LW(this,{type:t,inputs:n})}static from(t){if(typeof t==`string`){try{e.from(JSON.parse(t))}catch{}return e.from(X$(t))}if(t instanceof Y$)switch(t.peekKeyword(z$)){case`constructor`:return x1.from(t);case`error`:return y1.from(t);case`event`:return b1.from(t);case`fallback`:case`receive`:return S1.from(t);case`function`:return C1.from(t);case`struct`:return w1.from(t)}else if(typeof t==`object`){switch(t.type){case`constructor`:return x1.from(t);case`error`:return y1.from(t);case`event`:return b1.from(t);case`fallback`:case`receive`:return S1.from(t);case`function`:return C1.from(t);case`struct`:return w1.from(t)}VW(!1,`unsupported type: ${t.type}`,`UNSUPPORTED_OPERATION`,{operation:`Fragment.from`})}J(!1,`unsupported frgament object`,`obj`,t)}static isConstructor(e){return x1.isFragment(e)}static isError(e){return y1.isFragment(e)}static isEvent(e){return b1.isFragment(e)}static isFunction(e){return C1.isFragment(e)}static isStruct(e){return w1.isFragment(e)}},_1=class extends g1{name;constructor(e,t,n,r){super(e,t,r),J(typeof n==`string`&&n.match(q$),`invalid identifier`,`name`,n),r=Object.freeze(r.slice()),LW(this,{name:n})}};function v1(e,t){return`(`+t.map(t=>t.format(e)).join(e===`full`?`, `:`,`)+`)`}var y1=class e extends _1{constructor(e,t,n){super(e,`error`,t,n),Object.defineProperty(this,s1,{value:l1})}get selector(){return JX(this.format(`sighash`)).substring(0,10)}format(e){if(e??=`sighash`,e===`json`)return JSON.stringify({type:`error`,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[];return e!==`sighash`&&t.push(`error`),t.push(this.name+v1(e,this.inputs)),t.join(` `)}static from(t){if(e.isFragment(t))return t;if(typeof t==`string`)return e.from(X$(t));if(t instanceof Y$){let n=Q$(`error`,t),r=t1(t);return r1(t),new e(o1,n,r)}return new e(o1,t.name,t.inputs?t.inputs.map(h1.from):[])}static isFragment(e){return e&&e[s1]===l1}},b1=class e extends _1{anonymous;constructor(e,t,n,r){super(e,`event`,t,n),Object.defineProperty(this,s1,{value:u1}),LW(this,{anonymous:r})}get topicHash(){return JX(this.format(`sighash`))}format(e){if(e??=`sighash`,e===`json`)return JSON.stringify({type:`event`,anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[];return e!==`sighash`&&t.push(`event`),t.push(this.name+v1(e,this.inputs)),e!==`sighash`&&this.anonymous&&t.push(`anonymous`),t.join(` `)}static getTopicHash(t,n){return n=(n||[]).map(e=>h1.from(e)),new e(o1,t,n,!1).topicHash}static from(t){if(e.isFragment(t))return t;if(typeof t==`string`)return e.from(X$(t));if(t instanceof Y$){let n=Q$(`event`,t),r=t1(t,!0),i=!!$$(t,F$([`anonymous`])).has(`anonymous`);return r1(t),new e(o1,n,r,i)}return new e(o1,t.name,t.inputs?t.inputs.map(e=>h1.from(e,!0)):[],!!t.anonymous)}static isFragment(e){return e&&e[s1]===u1}},x1=class e extends g1{payable;gas;constructor(e,t,n,r,i){super(e,t,n),Object.defineProperty(this,s1,{value:d1}),LW(this,{payable:r,gas:i})}format(e){if(VW(e!=null&&e!==`sighash`,`cannot format a constructor for sighash`,`UNSUPPORTED_OPERATION`,{operation:`format(sighash)`}),e===`json`)return JSON.stringify({type:`constructor`,stateMutability:this.payable?`payable`:`undefined`,payable:this.payable,gas:this.gas==null?void 0:this.gas,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[`constructor${v1(e,this.inputs)}`];return t.push(this.payable?`payable`:`nonpayable`),this.gas!=null&&t.push(`@${this.gas.toString()}`),t.join(` `)}static from(t){if(e.isFragment(t))return t;if(typeof t==`string`)return e.from(X$(t));if(t instanceof Y$){$$(t,F$([`constructor`]));let n=t1(t),r=!!$$(t,F$([`payable`])).has(`payable`),i=n1(t);return r1(t),new e(o1,`constructor`,n,r,i)}return new e(o1,`constructor`,t.inputs?t.inputs.map(h1.from):[],!!t.payable,t.gas==null?null:t.gas)}static isFragment(e){return e&&e[s1]===d1}},S1=class e extends g1{payable;constructor(e,t,n){super(e,`fallback`,t),Object.defineProperty(this,s1,{value:f1}),LW(this,{payable:n})}format(e){let t=this.inputs.length===0?`receive`:`fallback`;if(e===`json`){let e=this.payable?`payable`:`nonpayable`;return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?` payable`:``}`}static from(t){if(e.isFragment(t))return t;if(typeof t==`string`)return e.from(X$(t));if(t instanceof Y$){let n=t.toString();if(J(t.peekKeyword(F$([`fallback`,`receive`])),`type must be fallback or receive`,`obj`,n),t.popKeyword(F$([`fallback`,`receive`]))===`receive`){let n=t1(t);return J(n.length===0,`receive cannot have arguments`,`obj.inputs`,n),$$(t,F$([`payable`])),r1(t),new e(o1,[],!0)}let r=t1(t);r.length?J(r.length===1&&r[0].type===`bytes`,`invalid fallback inputs`,`obj.inputs`,r.map(e=>e.format(`minimal`)).join(`, `)):r=[h1.from(`bytes`)];let i=e1(t);if(J(i===`nonpayable`||i===`payable`,`fallback cannot be constants`,`obj.stateMutability`,i),$$(t,F$([`returns`])).has(`returns`)){let e=t1(t);J(e.length===1&&e[0].type===`bytes`,`invalid fallback outputs`,`obj.outputs`,e.map(e=>e.format(`minimal`)).join(`, `))}return r1(t),new e(o1,r,i===`payable`)}if(t.type===`receive`)return new e(o1,[],!0);if(t.type===`fallback`)return new e(o1,[h1.from(`bytes`)],t.stateMutability===`payable`);J(!1,`invalid fallback description`,`obj`,t)}static isFragment(e){return e&&e[s1]===f1}},C1=class e extends _1{constant;outputs;stateMutability;payable;gas;constructor(e,t,n,r,i,a){super(e,`function`,t,r),Object.defineProperty(this,s1,{value:p1}),i=Object.freeze(i.slice());let o=n===`view`||n===`pure`,s=n===`payable`;LW(this,{constant:o,gas:a,outputs:i,payable:s,stateMutability:n})}get selector(){return JX(this.format(`sighash`)).substring(0,10)}format(e){if(e??=`sighash`,e===`json`)return JSON.stringify({type:`function`,name:this.name,constant:this.constant,stateMutability:this.stateMutability===`nonpayable`?void 0:this.stateMutability,payable:this.payable,gas:this.gas==null?void 0:this.gas,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});let t=[];return e!==`sighash`&&t.push(`function`),t.push(this.name+v1(e,this.inputs)),e!==`sighash`&&(this.stateMutability!==`nonpayable`&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push(`returns`),t.push(v1(e,this.outputs))),this.gas!=null&&t.push(`@${this.gas.toString()}`)),t.join(` `)}static getSelector(t,n){return n=(n||[]).map(e=>h1.from(e)),new e(o1,t,`view`,n,[],null).selector}static from(t){if(e.isFragment(t))return t;if(typeof t==`string`)return e.from(X$(t));if(t instanceof Y$){let n=Q$(`function`,t),r=t1(t),i=e1(t),a=[];$$(t,F$([`returns`])).has(`returns`)&&(a=t1(t));let o=n1(t);return r1(t),new e(o1,n,i,r,a,o)}let n=t.stateMutability;return n??(n=`payable`,typeof t.constant==`boolean`?(n=`view`,t.constant||(n=`payable`,typeof t.payable==`boolean`&&!t.payable&&(n=`nonpayable`))):typeof t.payable==`boolean`&&!t.payable&&(n=`nonpayable`)),new e(o1,t.name,n,t.inputs?t.inputs.map(h1.from):[],t.outputs?t.outputs.map(h1.from):[],t.gas==null?null:t.gas)}static isFragment(e){return e&&e[s1]===p1}},w1=class e extends _1{constructor(e,t,n){super(e,`struct`,t,n),Object.defineProperty(this,s1,{value:m1})}format(){throw Error(`@TODO`)}static from(t){if(typeof t==`string`)return e.from(X$(t));if(t instanceof Y$){let n=Q$(`struct`,t),r=t1(t);return r1(t),new e(o1,n,r)}return new e(o1,t.name,t.inputs?t.inputs.map(h1.from):[])}static isFragment(e){return e&&e[s1]===m1}},T1=class{fragment;name;signature;topic;args;constructor(e,t,n){let r=e.name,i=e.format();LW(this,{fragment:e,name:r,signature:i,topic:t,args:n})}},E1=class{fragment;name;args;signature;selector;value;constructor(e,t,n,r){let i=e.name,a=e.format();LW(this,{fragment:e,name:i,args:n,signature:a,selector:t,value:r})}},D1=class{fragment;name;args;signature;selector;constructor(e,t,n){let r=e.name,i=e.format();LW(this,{fragment:e,name:r,args:n,signature:i,selector:t})}},O1=class{hash;_isIndexed;static isIndexed(e){return!!(e&&e._isIndexed)}constructor(e){LW(this,{hash:e,_isIndexed:!0})}},k1={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`},A1={"0x08c379a0":{signature:`Error(string)`,name:`Error`,inputs:[`string`],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:`Panic(uint256)`,name:`Panic`,inputs:[`uint256`],reason:e=>{let t=`unknown panic code`;return e>=0&&e<=255&&k1[e.toString()]&&(t=k1[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}},j1=class e{fragments;deploy;fallback;receive;#e;#t;#n;#r;constructor(e){let t=[];t=typeof e==`string`?JSON.parse(e):e,this.#n=new Map,this.#e=new Map,this.#t=new Map;let n=[];for(let e of t)try{n.push(g1.from(e))}catch(e){console.log(`EE`,e)}LW(this,{fragments:Object.freeze(n)});let r=null,i=!1;this.#r=this.getAbiCoder(),this.fragments.forEach((e,t)=>{let n;switch(e.type){case`constructor`:if(this.deploy){console.log(`duplicate definition - constructor`);return}LW(this,{deploy:e});return;case`fallback`:e.inputs.length===0?i=!0:(J(!r||e.payable!==r.payable,`conflicting fallback fragments`,`fragments[${t}]`,e),r=e,i=r.payable);return;case`function`:n=this.#n;break;case`event`:n=this.#t;break;case`error`:n=this.#e;break;default:return}let a=e.format();n.has(a)||n.set(a,e)}),this.deploy||LW(this,{deploy:x1.from(`constructor()`)}),LW(this,{fallback:r,receive:i})}format(e){let t=e?`minimal`:`full`;return this.fragments.map(e=>e.format(t))}formatJson(){let e=this.fragments.map(e=>e.format(`json`));return JSON.stringify(e.map(e=>JSON.parse(e)))}getAbiCoder(){return mQ.defaultAbiCoder()}#i(e,t,n){if(YW(e)){let t=e.toLowerCase();for(let e of this.#n.values())if(t===e.selector)return e;return null}if(e.indexOf(`(`)===-1){let r=[];for(let[t,n]of this.#n)t.split(`(`)[0]===e&&r.push(n);if(t){let e=t.length>0?t[t.length-1]:null,n=t.length,i=!0;AX.isTyped(e)&&e.type===`overrides`&&(i=!1,n--);for(let e=r.length-1;e>=0;e--){let t=r[e].inputs.length;t!==n&&(!i||t!==n-1)&&r.splice(e,1)}for(let e=r.length-1;e>=0;e--){let n=r[e].inputs;for(let i=0;i<t.length;i++)if(AX.isTyped(t[i])){if(i>=n.length){if(t[i].type===`overrides`)continue;r.splice(e,1);break}if(t[i].type!==n[i].baseType){r.splice(e,1);break}}}}if(r.length===1&&t&&t.length!==r[0].inputs.length){let e=t[t.length-1];(e==null||Array.isArray(e)||typeof e!=`object`)&&r.splice(0,1)}return r.length===0?null:(r.length>1&&n&&J(!1,`ambiguous function description (i.e. matches ${r.map(e=>JSON.stringify(e.format())).join(`, `)})`,`key`,e),r[0])}return this.#n.get(C1.from(e).format())||null}getFunctionName(e){let t=this.#i(e,null,!1);return J(t,`no matching function`,`key`,e),t.name}hasFunction(e){return!!this.#i(e,null,!1)}getFunction(e,t){return this.#i(e,t||null,!0)}forEachFunction(e){let t=Array.from(this.#n.keys());t.sort((e,t)=>e.localeCompare(t));for(let n=0;n<t.length;n++){let r=t[n];e(this.#n.get(r),n)}}#a(e,t,n){if(YW(e)){let t=e.toLowerCase();for(let e of this.#t.values())if(t===e.topicHash)return e;return null}if(e.indexOf(`(`)===-1){let r=[];for(let[t,n]of this.#t)t.split(`(`)[0]===e&&r.push(n);if(t){for(let e=r.length-1;e>=0;e--)r[e].inputs.length<t.length&&r.splice(e,1);for(let e=r.length-1;e>=0;e--){let n=r[e].inputs;for(let i=0;i<t.length;i++)if(AX.isTyped(t[i])&&t[i].type!==n[i].baseType){r.splice(e,1);break}}}return r.length===0?null:(r.length>1&&n&&J(!1,`ambiguous event description (i.e. matches ${r.map(e=>JSON.stringify(e.format())).join(`, `)})`,`key`,e),r[0])}return this.#t.get(b1.from(e).format())||null}getEventName(e){let t=this.#a(e,null,!1);return J(t,`no matching event`,`key`,e),t.name}hasEvent(e){return!!this.#a(e,null,!1)}getEvent(e,t){return this.#a(e,t||null,!0)}forEachEvent(e){let t=Array.from(this.#t.keys());t.sort((e,t)=>e.localeCompare(t));for(let n=0;n<t.length;n++){let r=t[n];e(this.#t.get(r),n)}}getError(e,t){if(YW(e)){let t=e.toLowerCase();if(A1[t])return y1.from(A1[t].signature);for(let e of this.#e.values())if(t===e.selector)return e;return null}if(e.indexOf(`(`)===-1){let t=[];for(let[n,r]of this.#e)n.split(`(`)[0]===e&&t.push(r);return t.length===0?e===`Error`?y1.from(`error Error(string)`):e===`Panic`?y1.from(`error Panic(uint256)`):null:(t.length>1&&J(!1,`ambiguous error description (i.e. ${t.map(e=>JSON.stringify(e.format())).join(`, `)})`,`name`,e),t[0])}return e=y1.from(e).format(),e===`Error(string)`?y1.from(`error Error(string)`):e===`Panic(uint256)`?y1.from(`error Panic(uint256)`):this.#e.get(e)||null}forEachError(e){let t=Array.from(this.#e.keys());t.sort((e,t)=>e.localeCompare(t));for(let n=0;n<t.length;n++){let r=t[n];e(this.#e.get(r),n)}}_decodeParams(e,t){return this.#r.decode(e,t)}_encodeParams(e,t){return this.#r.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if(typeof e==`string`){let t=this.getError(e);J(t,`unknown error`,`fragment`,e),e=t}return J(eG(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,`data`,t),this._decodeParams(e.inputs,eG(t,4))}encodeErrorResult(e,t){if(typeof e==`string`){let t=this.getError(e);J(t,`unknown error`,`fragment`,e),e=t}return QW([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if(typeof e==`string`){let t=this.getFunction(e);J(t,`unknown function`,`fragment`,e),e=t}return J(eG(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,`data`,t),this._decodeParams(e.inputs,eG(t,4))}encodeFunctionData(e,t){if(typeof e==`string`){let t=this.getFunction(e);J(t,`unknown function`,`fragment`,e),e=t}return QW([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if(typeof e==`string`){let t=this.getFunction(e);J(t,`unknown function`,`fragment`,e),e=t}let n=`invalid length for result data`,r=JW(t);if(r.length%32==0)try{return this.#r.decode(e.outputs,r)}catch{n=`could not decode result data`}VW(!1,n,`BAD_DATA`,{value:Y(r),info:{method:e.name,signature:e.format()}})}makeError(e,t){let n=qW(e,`data`),r=mQ.getBuiltinCallException(`call`,t,n);if(r.message.startsWith(`execution reverted (unknown custom error)`)){let e=Y(n.slice(0,4)),t=this.getError(e);if(t)try{let e=this.#r.decode(t.inputs,n.slice(4));r.revert={name:t.name,signature:t.format(),args:e},r.reason=r.revert.signature,r.message=`execution reverted: ${r.reason}`}catch{r.message=`execution reverted (coult not decode custom error)`}}let i=this.parseTransaction(t);return i&&(r.invocation={method:i.name,signature:i.signature,args:i.args}),r}encodeFunctionResult(e,t){if(typeof e==`string`){let t=this.getFunction(e);J(t,`unknown function`,`fragment`,e),e=t}return Y(this.#r.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if(typeof e==`string`){let t=this.getEvent(e);J(t,`unknown event`,`eventFragment`,e),e=t}VW(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,`UNEXPECTED_ARGUMENT`,{count:t.length,expectedCount:e.inputs.length});let n=[];e.anonymous||n.push(e.topicHash);let r=(e,t)=>e.type===`string`?JX(t):e.type===`bytes`?Lq(Y(t)):(e.type===`bool`&&typeof t==`boolean`&&(t=t?`0x01`:`0x00`),e.type.match(/^u?int/)&&(t=hG(t)),e.type===`address`&&this.#r.encode([`address`],[t]),nG(Y(t),32));for(t.forEach((t,i)=>{let a=e.inputs[i];if(!a.indexed){J(t==null,`cannot filter non-indexed parameters; must be null`,`contract.`+a.name,t);return}t==null?n.push(null):a.baseType===`array`||a.baseType===`tuple`?J(!1,`filtering with tuples or arrays not supported`,`contract.`+a.name,t):Array.isArray(t)?n.push(t.map(e=>r(a,e))):n.push(r(a,t))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){if(typeof e==`string`){let t=this.getEvent(e);J(t,`unknown event`,`eventFragment`,e),e=t}let n=[],r=[],i=[];return e.anonymous||n.push(e.topicHash),J(t.length===e.inputs.length,`event arguments/values mismatch`,`values`,t),e.inputs.forEach((e,a)=>{let o=t[a];if(e.indexed)if(e.type===`string`)n.push(JX(o));else if(e.type===`bytes`)n.push(Lq(o));else if(e.baseType===`tuple`||e.baseType===`array`)throw Error(`not implemented`);else n.push(this.#r.encode([e.type],[o]));else r.push(e),i.push(o)}),{data:this.#r.encode(r,i),topics:n}}decodeEventLog(e,t,n){if(typeof e==`string`){let t=this.getEvent(e);J(t,`unknown event`,`eventFragment`,e),e=t}if(n!=null&&!e.anonymous){let t=e.topicHash;J(YW(n[0],32)&&n[0].toLowerCase()===t,`fragment/topic mismatch`,`topics[0]`,n[0]),n=n.slice(1)}let r=[],i=[],a=[];e.inputs.forEach((e,t)=>{e.indexed?e.type===`string`||e.type===`bytes`||e.baseType===`tuple`||e.baseType===`array`?(r.push(h1.from({type:`bytes32`,name:e.name})),a.push(!0)):(r.push(e),a.push(!1)):(i.push(e),a.push(!1))});let o=n==null?null:this.#r.decode(r,QW(n)),s=this.#r.decode(i,t,!0),c=[],l=[],u=0,d=0;return e.inputs.forEach((e,t)=>{let n=null;if(e.indexed)if(o==null)n=new O1(null);else if(a[t])n=new O1(o[d++]);else try{n=o[d++]}catch(e){n=e}else try{n=s[u++]}catch(e){n=e}c.push(n),l.push(e.name||null)}),ZG.fromItems(c,l)}parseTransaction(e){let t=qW(e.data,`tx.data`),n=lG(e.value==null?0:e.value,`tx.value`),r=this.getFunction(Y(t.slice(0,4)));if(!r)return null;let i=this.#r.decode(r.inputs,t.slice(4));return new E1(r,r.selector,i,n)}parseCallResult(e){throw Error(`@TODO`)}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new T1(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){let t=Y(e),n=this.getError(eG(t,0,4));if(!n)return null;let r=this.#r.decode(n.inputs,eG(t,4));return new D1(n,n.selector,r)}static from(t){return t instanceof e?t:typeof t==`string`?new e(JSON.parse(t)):typeof t.format==`function`?new e(t.format(`json`)):new e(t)}},M1=c({AbiCoder:()=>mQ,FormatTypes:()=>I1,Interface:()=>j1,Mnemonic:()=>LQ,Signature:()=>fX,SigningKey:()=>pX,Wordlist:()=>EQ,arrayify:()=>F1,concat:()=>QW,ethersHDNodeWallet:()=>j$,id:()=>JX,isValidMnemonic:()=>L1,joinSignature:()=>P1,keccak256:()=>Lq,pbkdf2:()=>oJ,recoverAddress:()=>QX,sha256:()=>MJ,sha512:()=>NJ,splitSignature:()=>N1,toUtf8Bytes:()=>AG,toUtf8String:()=>MG,wordlists:()=>N$}),N1=e=>fX.from(e),P1=e=>fX.from(e).serialized,F1=e=>qW(e),I1={sighash:`sighash`,minimal:`minimal`,full:`full`,json:`json`},L1=LQ.isValidMnemonic;_q.register((e,t,n)=>_q._(e,Buffer.from(t),Buffer.from(n)));function R1(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function z1(e){return e instanceof Uint8Array||typeof e==`object`&&!!e&&e.constructor.name===`Uint8Array`}function B1(e,...t){if(!z1(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function V1(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.wrapConstructor`);R1(e.outputLen),R1(e.blockLen)}function H1(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function U1(e,t){B1(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}var W1=typeof globalThis==`object`&&`crypto`in globalThis?globalThis.crypto:void 0,G1=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),K1=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function q1(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function J1(e){return typeof e==`string`&&(e=q1(e)),B1(e),e}function Y1(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];B1(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}var X1=class{clone(){return this._cloneInto()}};({}).toString;function Z1(e){let t=t=>e().update(J1(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Q1(e=32){if(W1&&typeof W1.getRandomValues==`function`)return W1.getRandomValues(new Uint8Array(e));throw Error(`crypto.getRandomValues must be defined`)}function $1(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}var e0=(e,t,n)=>e&t^~e&n,t0=(e,t,n)=>e&t^e&n^t&n,n0=class extends X1{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=G1(this.buffer)}update(e){H1(this);let{view:t,buffer:n,blockLen:r}=this;e=J1(e);let i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=G1(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){H1(this),U1(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;$1(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=G1(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}},r0=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i0=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a0=new Uint32Array(64),o0=class extends n0{constructor(){super(64,32,8,!1),this.A=i0[0]|0,this.B=i0[1]|0,this.C=i0[2]|0,this.D=i0[3]|0,this.E=i0[4]|0,this.F=i0[5]|0,this.G=i0[6]|0,this.H=i0[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)a0[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=a0[e-15],n=a0[e-2],r=K1(t,7)^K1(t,18)^t>>>3;a0[e]=(K1(n,17)^K1(n,19)^n>>>10)+a0[e-7]+r+a0[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=K1(o,6)^K1(o,11)^K1(o,25),u=l+t+e0(o,s,c)+r0[e]+a0[e]|0,d=(K1(n,2)^K1(n,13)^K1(n,22))+t0(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){a0.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},s0=Z1(()=>new o0),c0=class extends X1{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,V1(e);let n=J1(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return H1(this),this.iHash.update(e),this}digestInto(e){H1(this),B1(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},l0=(e,t,n)=>new c0(e,t).update(n).digest();l0.create=(e,t)=>new c0(e,t);var u0=c({abytes:()=>h0,bitGet:()=>N0,bitLen:()=>M0,bitMask:()=>F0,bitSet:()=>P0,bytesToHex:()=>_0,bytesToNumberBE:()=>C0,bytesToNumberLE:()=>w0,concatBytes:()=>k0,createHmacDrbg:()=>R0,ensureBytes:()=>O0,equalBytes:()=>A0,hexToBytes:()=>S0,hexToNumber:()=>y0,isBytes:()=>m0,numberToBytesBE:()=>T0,numberToBytesLE:()=>E0,numberToHexUnpadded:()=>v0,numberToVarBytesBE:()=>D0,utf8ToBytes:()=>j0,validateObject:()=>B0}),d0=BigInt(0),f0=BigInt(1),p0=BigInt(2);function m0(e){return e instanceof Uint8Array||typeof e==`object`&&!!e&&e.constructor.name===`Uint8Array`}function h0(e){if(!m0(e))throw Error(`Uint8Array expected`)}var g0=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function _0(e){h0(e);let t=``;for(let n=0;n<e.length;n++)t+=g0[e[n]];return t}function v0(e){let t=e.toString(16);return t.length&1?`0${t}`:t}function y0(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);return BigInt(e===``?`0`:`0x${e}`)}var b0={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function x0(e){if(e>=b0._0&&e<=b0._9)return e-b0._0;if(e>=b0._A&&e<=b0._F)return e-(b0._A-10);if(e>=b0._a&&e<=b0._f)return e-(b0._a-10)}function S0(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);let t=e.length,n=t/2;if(t%2)throw Error(`padded hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=x0(e.charCodeAt(i)),a=x0(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function C0(e){return y0(_0(e))}function w0(e){return h0(e),y0(_0(Uint8Array.from(e).reverse()))}function T0(e,t){return S0(e.toString(16).padStart(t*2,`0`))}function E0(e,t){return T0(e,t).reverse()}function D0(e){return S0(v0(e))}function O0(e,t,n){let r;if(typeof t==`string`)try{r=S0(t)}catch(n){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${n}`)}else if(m0(t))r=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=r.length;if(typeof n==`number`&&i!==n)throw Error(`${e} expected ${n} bytes, got ${i}`);return r}function k0(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];h0(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function A0(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function j0(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function M0(e){let t;for(t=0;e>d0;e>>=f0,t+=1);return t}function N0(e,t){return e>>BigInt(t)&f0}function P0(e,t,n){return e|(n?f0:d0)<<BigInt(t)}var F0=e=>(p0<<BigInt(e-1))-f0,I0=e=>new Uint8Array(e),L0=e=>Uint8Array.from(e);function R0(e,t,n){if(typeof e!=`number`||e<2)throw Error(`hashLen must be a number`);if(typeof t!=`number`||t<2)throw Error(`qByteLen must be a number`);if(typeof n!=`function`)throw Error(`hmacFn must be a function`);let r=I0(e),i=I0(e),a=0,o=()=>{r.fill(1),i.fill(0),a=0},s=(...e)=>n(i,r,...e),c=(e=I0())=>{i=s(L0([0]),e),r=s(),e.length!==0&&(i=s(L0([1]),e),r=s())},l=()=>{if(a++>=1e3)throw Error(`drbg: tried 1000 values`);let e=0,n=[];for(;e<t;){r=s();let t=r.slice();n.push(t),e+=r.length}return k0(...n)};return(e,t)=>{o(),c(e);let n;for(;!(n=t(l()));)c();return o(),n}}var z0={bigint:e=>typeof e==`bigint`,function:e=>typeof e==`function`,boolean:e=>typeof e==`boolean`,string:e=>typeof e==`string`,stringOrUint8Array:e=>typeof e==`string`||m0(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e==`function`&&Number.isSafeInteger(e.outputLen)};function B0(e,t,n={}){let r=(t,n,r)=>{let i=z0[n];if(typeof i!=`function`)throw Error(`Invalid validator "${n}", expected function`);let a=e[t];if(!(r&&a===void 0)&&!i(a,e))throw Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}var V0=BigInt(0),H0=BigInt(1),U0=BigInt(2),W0=BigInt(3),G0=BigInt(4),K0=BigInt(5),q0=BigInt(8),J0=BigInt(16);function Y0(e,t){let n=e%t;return n>=V0?n:t+n}function X0(e,t,n){if(n<=V0||t<V0)throw Error(`Expected power/modulo > 0`);if(n===H0)return V0;let r=H0;for(;t>V0;)t&H0&&(r=r*e%n),e=e*e%n,t>>=H0;return r}function Z0(e,t,n){let r=e;for(;t-- >V0;)r*=r,r%=n;return r}function Q0(e,t){if(e===V0||t<=V0)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Y0(e,t),r=t,i=V0,a=H0,o=H0,s=V0;for(;n!==V0;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}if(r!==H0)throw Error(`invert: does not exist`);return Y0(i,t)}function $0(e){let t=(e-H0)/U0,n,r,i;for(n=e-H0,r=0;n%U0===V0;n/=U0,r++);for(i=U0;i<e&&X0(i,t,e)!==e-H0;i++);if(r===1){let t=(e+H0)/G0;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error(`Cannot find square root`);return r}}let a=(n+H0)/U0;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw Error(`Cannot find square root`);let s=r,c=e.pow(e.mul(e.ONE,i),n),l=e.pow(o,a),u=e.pow(o,n);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(u);t<s&&!e.eql(n,e.ONE);t++)n=e.sqr(n);let n=e.pow(c,H0<<BigInt(s-t-1));c=e.sqr(n),l=e.mul(l,n),u=e.mul(u,c),s=t}return l}}function e2(e){if(e%G0===W0){let t=(e+H0)/G0;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error(`Cannot find square root`);return r}}if(e%q0===K0){let t=(e-K0)/q0;return function(e,n){let r=e.mul(n,U0),i=e.pow(r,t),a=e.mul(n,i),o=e.mul(e.mul(a,U0),i),s=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(s),n))throw Error(`Cannot find square root`);return s}}return e%J0,$0(e)}var t2=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function n2(e){return B0(e,t2.reduce((e,t)=>(e[t]=`function`,e),{ORDER:`bigint`,MASK:`bigint`,BYTES:`isSafeInteger`,BITS:`isSafeInteger`}))}function r2(e,t,n){if(n<V0)throw Error(`Expected power > 0`);if(n===V0)return e.ONE;if(n===H0)return t;let r=e.ONE,i=t;for(;n>V0;)n&H0&&(r=e.mul(r,i)),i=e.sqr(i),n>>=H0;return r}function i2(e,t){let n=Array(t.length),r=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),i=e.inv(r);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),i),n}function a2(e,t){let n=t===void 0?e.toString(2).length:t;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function o2(e,t,n=!1,r={}){if(e<=V0)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:a}=a2(e,t);if(a>2048)throw Error(`Field lengths over 2048 bytes are not supported`);let o=e2(e),s=Object.freeze({ORDER:e,BITS:i,BYTES:a,MASK:F0(i),ZERO:V0,ONE:H0,create:t=>Y0(t,e),isValid:t=>{if(typeof t!=`bigint`)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return V0<=t&&t<e},is0:e=>e===V0,isOdd:e=>(e&H0)===H0,neg:t=>Y0(-t,e),eql:(e,t)=>e===t,sqr:t=>Y0(t*t,e),add:(t,n)=>Y0(t+n,e),sub:(t,n)=>Y0(t-n,e),mul:(t,n)=>Y0(t*n,e),pow:(e,t)=>r2(s,e,t),div:(t,n)=>Y0(t*Q0(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Q0(t,e),sqrt:r.sqrt||(e=>o(s,e)),invertBatch:e=>i2(s,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?E0(e,a):T0(e,a),fromBytes:e=>{if(e.length!==a)throw Error(`Fp.fromBytes: expected ${a}, got ${e.length}`);return n?w0(e):C0(e)}});return Object.freeze(s)}function s2(e){if(typeof e!=`bigint`)throw Error(`field order must be bigint`);let t=e.toString(2).length;return Math.ceil(t/8)}function c2(e){let t=s2(e);return t+Math.ceil(t/2)}function l2(e,t,n=!1){let r=e.length,i=s2(t),a=c2(t);if(r<16||r<a||r>1024)throw Error(`expected ${a}-1024 bytes of input, got ${r}`);let o=Y0(n?C0(e):w0(e),t-H0)+H0;return n?E0(o,i):T0(o,i)}var u2=BigInt(0),d2=BigInt(1);function f2(e,t){let n=(e,t)=>{let n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>u2;)n&d2&&(r=r.add(i)),i=i.double(),n>>=d2;return r},precomputeWindow(e,t){let{windows:n,windowSize:i}=r(t),a=[],o=e,s=o;for(let e=0;e<n;e++){s=o,a.push(s);for(let e=1;e<i;e++)s=s.add(o),a.push(s);o=s.double()}return a},wNAF(t,i,a){let{windows:o,windowSize:s}=r(t),c=e.ZERO,l=e.BASE,u=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<o;e++){let t=e*s,r=Number(a&u);a>>=f,r>s&&(r-=d,a+=d2);let o=t,p=t+Math.abs(r)-1,m=e%2!=0,h=r<0;r===0?l=l.add(n(m,i[o])):c=c.add(n(h,i[p]))}return{p:c,f:l}},wNAFCached(e,t,n,r){let i=e._WINDOW_SIZE||1,a=t.get(e);return a||(a=this.precomputeWindow(e,i),i!==1&&t.set(e,r(a))),this.wNAF(i,a,n)}}}function p2(e){return n2(e.Fp),B0(e,{n:`bigint`,h:`bigint`,Gx:`field`,Gy:`field`},{nBitLength:`isSafeInteger`,nByteLength:`isSafeInteger`}),Object.freeze({...a2(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function m2(e){let t=p2(e);B0(t,{a:`field`,b:`field`},{allowedPrivateKeyLengths:`array`,wrapPrivateKey:`boolean`,isTorsionFree:`function`,clearCofactor:`function`,allowInfinityPoint:`boolean`,fromBytes:`function`,toBytes:`function`});let{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw 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 Error(`Expected endomorphism with beta: bigint and splitScalar: function`)}return Object.freeze({...t})}var{bytesToNumberBE:h2,hexToBytes:g2}=u0,_2={Err:class extends Error{constructor(e=``){super(e)}},_parseInt(e){let{Err:t}=_2;if(e.length<2||e[0]!==2)throw new t(`Invalid signature integer tag`);let n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t(`Invalid signature integer: wrong length`);if(r[0]&128)throw new t(`Invalid signature integer: negative`);if(r[0]===0&&!(r[1]&128))throw new t(`Invalid signature integer: unnecessary leading zero`);return{d:h2(r),l:e.subarray(n+2)}},toSig(e){let{Err:t}=_2,n=typeof e==`string`?g2(e):e;h0(n);let r=n.length;if(r<2||n[0]!=48)throw new t(`Invalid signature tag`);if(n[1]!==r-2)throw new t(`Invalid signature: incorrect length`);let{d:i,l:a}=_2._parseInt(n.subarray(2)),{d:o,l:s}=_2._parseInt(a);if(s.length)throw new t(`Invalid signature: left bytes after parsing`);return{r:i,s:o}},hexFromSig(e){let t=e=>Number.parseInt(e[0],16)&8?`00`+e:e,n=e=>{let t=e.toString(16);return t.length&1?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),a=r.length/2,o=i.length/2,s=n(a),c=n(o);return`30${n(o+a+4)}02${c}${i}02${s}${r}`}},v2=BigInt(0),y2=BigInt(1),b2=BigInt(3);function x2(e){let t=m2(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{let i=t.toAffine();return k0(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),i=t.fromBytes||(e=>{let t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function a(e){let{a:r,b:i}=t,a=n.sqr(e),o=n.mul(a,e);return n.add(n.add(o,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),a(t.Gx)))throw Error(`bad generator point: equation left != right`);function o(e){return typeof e==`bigint`&&v2<e&&e<t.n}function s(e){if(!o(e))throw Error(`Expected valid bigint: 0 < bigint < curve.n`)}function c(e){let{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:i,n:a}=t;if(n&&typeof e!=`bigint`){if(m0(e)&&(e=_0(e)),typeof e!=`string`||!n.includes(e.length))throw Error(`Invalid key`);e=e.padStart(r*2,`0`)}let o;try{o=typeof e==`bigint`?e:C0(O0(`private key`,e,r))}catch{throw Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return i&&(o=Y0(o,a)),s(o),o}let l=new Map;function u(e){if(!(e instanceof d))throw Error(`ProjectivePoint expected`)}class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,e==null||!n.isValid(e))throw Error(`x required`);if(t==null||!n.isValid(t))throw Error(`y required`);if(r==null||!n.isValid(r))throw Error(`z required`)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error(`invalid affine point`);if(e instanceof d)throw Error(`projective point not allowed`);let i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(i(O0(`pointHex`,e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw Error(`bad point: ZERO`)}let{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw Error(`bad point: x or y not FE`);let i=n.sqr(r),o=a(e);if(!n.eql(i,o))throw Error(`bad point: equation left != right`);if(!this.isTorsionFree())throw Error(`bad point: not in prime-order subgroup`)}hasEvenY(){let{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw Error(`Field doesn't support isOdd`)}equals(e){u(e);let{px:t,py:r,pz:i}=this,{px:a,py:o,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(a,i)),l=n.eql(n.mul(r,s),n.mul(o,i));return c&&l}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){let{a:e,b:r}=t,i=n.mul(r,b2),{px:a,py:o,pz:s}=this,c=n.ZERO,l=n.ZERO,u=n.ZERO,f=n.mul(a,a),p=n.mul(o,o),m=n.mul(s,s),h=n.mul(a,o);return h=n.add(h,h),u=n.mul(a,s),u=n.add(u,u),c=n.mul(e,u),l=n.mul(i,m),l=n.add(c,l),c=n.sub(p,l),l=n.add(p,l),l=n.mul(c,l),c=n.mul(h,c),u=n.mul(i,u),m=n.mul(e,m),h=n.sub(f,m),h=n.mul(e,h),h=n.add(h,u),u=n.add(f,f),f=n.add(u,f),f=n.add(f,m),f=n.mul(f,h),l=n.add(l,f),m=n.mul(o,s),m=n.add(m,m),f=n.mul(m,h),c=n.sub(c,f),u=n.mul(m,p),u=n.add(u,u),u=n.add(u,u),new d(c,l,u)}add(e){u(e);let{px:r,py:i,pz:a}=this,{px:o,py:s,pz:c}=e,l=n.ZERO,f=n.ZERO,p=n.ZERO,m=t.a,h=n.mul(t.b,b2),g=n.mul(r,o),_=n.mul(i,s),v=n.mul(a,c),y=n.add(r,i),b=n.add(o,s);y=n.mul(y,b),b=n.add(g,_),y=n.sub(y,b),b=n.add(r,a);let x=n.add(o,c);return b=n.mul(b,x),x=n.add(g,v),b=n.sub(b,x),x=n.add(i,a),l=n.add(s,c),x=n.mul(x,l),l=n.add(_,v),x=n.sub(x,l),p=n.mul(m,b),l=n.mul(h,v),p=n.add(l,p),l=n.sub(_,p),p=n.add(_,p),f=n.mul(l,p),_=n.add(g,g),_=n.add(_,g),v=n.mul(m,v),b=n.mul(h,b),_=n.add(_,v),v=n.sub(g,v),v=n.mul(m,v),b=n.add(b,v),g=n.mul(_,b),f=n.add(f,g),g=n.mul(x,b),l=n.mul(y,l),l=n.sub(l,g),g=n.mul(y,_),p=n.mul(x,p),p=n.add(p,g),new d(l,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,l,e,e=>{let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(d.fromAffine)})}multiplyUnsafe(e){let r=d.ZERO;if(e===v2)return r;if(s(e),e===y2)return this;let{endo:i}=t;if(!i)return p.unsafeLadder(this,e);let{k1neg:a,k1:o,k2neg:c,k2:l}=i.splitScalar(e),u=r,f=r,m=this;for(;o>v2||l>v2;)o&y2&&(u=u.add(m)),l&y2&&(f=f.add(m)),m=m.double(),o>>=y2,l>>=y2;return a&&(u=u.negate()),c&&(f=f.negate()),f=new d(n.mul(f.px,i.beta),f.py,f.pz),u.add(f)}multiply(e){s(e);let r=e,i,a,{endo:o}=t;if(o){let{k1neg:e,k1:t,k2neg:s,k2:c}=o.splitScalar(r),{p:l,f:u}=this.wNAF(t),{p:f,f:m}=this.wNAF(c);l=p.constTimeNegate(e,l),f=p.constTimeNegate(s,f),f=new d(n.mul(f.px,o.beta),f.py,f.pz),i=l.add(f),a=u.add(m)}else{let{p:e,f:t}=this.wNAF(r);i=e,a=t}return d.normalizeZ([i,a])[0]}multiplyAndAddUnsafe(e,t,n){let r=d.BASE,i=(e,t)=>t===v2||t===y2||!e.equals(r)?e.multiplyUnsafe(t):e.multiply(t),a=i(this,t).add(i(e,n));return a.is0()?void 0:a}toAffine(e){let{px:t,py:r,pz:i}=this,a=this.is0();e??=a?n.ONE:n.inv(i);let o=n.mul(t,e),s=n.mul(r,e),c=n.mul(i,e);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw Error(`invZ was invalid`);return{x:o,y:s}}isTorsionFree(){let{h:e,isTorsionFree:n}=t;if(e===y2)return!0;if(n)return n(d,this);throw Error(`isTorsionFree() has not been declared for the elliptic curve`)}clearCofactor(){let{h:e,clearCofactor:n}=t;return e===y2?this:n?n(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),r(d,this,e)}toHex(e=!0){return _0(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);let f=t.nBitLength,p=f2(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:o}}function S2(e){let t=p2(e);return B0(t,{hash:`hash`,hmac:`function`,randomBytes:`function`},{bits2int:`function`,bits2int_modN:`function`,lowS:`boolean`}),Object.freeze({lowS:!0,...t})}function C2(e){let t=S2(e),{Fp:n,n:r}=t,i=n.BYTES+1,a=2*n.BYTES+1;function o(e){return v2<e&&e<n.ORDER}function s(e){return Y0(e,r)}function c(e){return Q0(e,r)}let{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:f}=x2({...t,toBytes(e,t,r){let i=t.toAffine(),a=n.toBytes(i.x),o=k0;return r?o(Uint8Array.from([t.hasEvenY()?2:3]),a):o(Uint8Array.from([4]),a,n.toBytes(i.y))},fromBytes(e){let t=e.length,r=e[0],s=e.subarray(1);if(t===i&&(r===2||r===3)){let e=C0(s);if(!o(e))throw Error(`Point is not on curve`);let t=d(e),i;try{i=n.sqrt(t)}catch(e){let t=e instanceof Error?`: `+e.message:``;throw Error(`Point is not on curve`+t)}let a=(i&y2)===y2;return(r&1)==1!==a&&(i=n.neg(i)),{x:e,y:i}}else if(t===a&&r===4)return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))};else throw Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),p=e=>_0(T0(e,t.nByteLength));function m(e){return e>r>>y2}function h(e){return m(e)?s(-e):e}let g=(e,t,n)=>C0(e.slice(t,n));class _{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){let n=t.nByteLength;return e=O0(`compactSignature`,e,n*2),new _(g(e,0,n),g(e,n,2*n))}static fromDER(e){let{r:t,s:n}=_2.toSig(O0(`DER`,e));return new _(t,n)}assertValidity(){if(!f(this.r))throw Error(`r must be 0 < r < CURVE.n`);if(!f(this.s))throw Error(`s must be 0 < s < CURVE.n`)}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(e){let{r,s:i,recovery:a}=this,o=C(O0(`msgHash`,e));if(a==null||![0,1,2,3].includes(a))throw Error(`recovery id invalid`);let u=a===2||a===3?r+t.n:r;if(u>=n.ORDER)throw Error(`recovery id 2 or 3 invalid`);let d=a&1?`03`:`02`,f=l.fromHex(d+p(u)),m=c(u),h=s(-o*m),g=s(i*m),_=l.BASE.multiplyAndAddUnsafe(f,h,g);if(!_)throw Error(`point at infinify`);return _.assertValidity(),_}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return S0(this.toDERHex())}toDERHex(){return _2.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return S0(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}let v={isValidPrivateKey(e){try{return u(e),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let e=c2(t.n);return l2(t.randomBytes(e),t.n)},precompute(e=8,t=l.BASE){return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function y(e,t=!0){return l.fromPrivateKey(e).toRawBytes(t)}function b(e){let t=m0(e),n=typeof e==`string`,r=(t||n)&&e.length;return t?r===i||r===a:n?r===2*i||r===2*a:e instanceof l}function x(e,t,n=!0){if(b(e))throw Error(`first arg must be private key`);if(!b(t))throw Error(`second arg must be public key`);return l.fromHex(t).multiply(u(e)).toRawBytes(n)}let S=t.bits2int||function(e){let n=C0(e),r=e.length*8-t.nBitLength;return r>0?n>>BigInt(r):n},C=t.bits2int_modN||function(e){return s(S(e))},w=F0(t.nBitLength);function T(e){if(typeof e!=`bigint`)throw Error(`bigint expected`);if(!(v2<=e&&e<w))throw Error(`bigint expected < 2^${t.nBitLength}`);return T0(e,t.nByteLength)}function E(e,r,i=D){if([`recovered`,`canonical`].some(e=>e in i))throw Error(`sign() legacy options not supported`);let{hash:a,randomBytes:o}=t,{lowS:d,prehash:p,extraEntropy:g}=i;d??=!0,e=O0(`msgHash`,e),p&&(e=O0(`prehashed msgHash`,a(e)));let v=C(e),y=u(r),b=[T(y),T(v)];if(g!=null&&g!==!1){let e=g===!0?o(n.BYTES):g;b.push(O0(`extraEntropy`,e))}let x=k0(...b),w=v;function E(e){let t=S(e);if(!f(t))return;let n=c(t),r=l.BASE.multiply(t).toAffine(),i=s(r.x);if(i===v2)return;let a=s(n*s(w+i*y));if(a===v2)return;let o=(r.x===i?0:2)|Number(r.y&y2),u=a;return d&&m(a)&&(u=h(a),o^=1),new _(i,u,o)}return{seed:x,k2sig:E}}let D={lowS:t.lowS,prehash:!1},O={lowS:t.lowS,prehash:!1};function k(e,n,r=D){let{seed:i,k2sig:a}=E(e,n,r),o=t;return R0(o.hash.outputLen,o.nByteLength,o.hmac)(i,a)}l.BASE._setWindowSize(8);function A(e,n,r,i=O){let a=e;if(n=O0(`msgHash`,n),r=O0(`publicKey`,r),`strict`in i)throw Error(`options.strict was renamed to lowS`);let{lowS:o,prehash:u}=i,d,f;try{if(typeof a==`string`||m0(a))try{d=_.fromDER(a)}catch(e){if(!(e instanceof _2.Err))throw e;d=_.fromCompact(a)}else if(typeof a==`object`&&typeof a.r==`bigint`&&typeof a.s==`bigint`){let{r:e,s:t}=a;d=new _(e,t)}else throw Error(`PARSE`);f=l.fromHex(r)}catch(e){if(e.message===`PARSE`)throw Error(`signature must be Signature instance, Uint8Array or hex string`);return!1}if(o&&d.hasHighS())return!1;u&&(n=t.hash(n));let{r:p,s:m}=d,h=C(n),g=c(m),v=s(h*g),y=s(p*g),b=l.BASE.multiplyAndAddUnsafe(f,v,y)?.toAffine();return b?s(b.x)===p:!1}return{CURVE:t,getPublicKey:y,getSharedSecret:x,sign:k,verify:A,ProjectivePoint:l,Signature:_,utils:v}}function w2(e){return{hash:e,hmac:(t,...n)=>l0(e,t,Y1(...n)),randomBytes:Q1}}function T2(e,t){let n=t=>C2({...e,...w2(t)});return Object.freeze({...n(t),create:n})}var E2=BigInt(`0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f`),D2=BigInt(`0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`),O2=BigInt(1),k2=BigInt(2),A2=(e,t)=>(e+t/k2)/t;function j2(e){let t=E2,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=Z0(Z0(Z0(u,n,t)*u%t,n,t)*u%t,k2,t)*l%t,f=Z0(d,i,t)*d%t,p=Z0(f,a,t)*f%t,m=Z0(p,s,t)*p%t,h=Z0(Z0(Z0(Z0(Z0(Z0(m,c,t)*m%t,s,t)*p%t,n,t)*u%t,o,t)*f%t,r,t)*l%t,k2,t);if(!M2.eql(M2.sqr(h),e))throw Error(`Cannot find square root`);return h}var M2=o2(E2,void 0,void 0,{sqrt:j2}),N2=T2({a:BigInt(0),b:BigInt(7),Fp:M2,n:D2,Gx:BigInt(`55066263022277343669578718895168534326250603453777594175500187360389116729240`),Gy:BigInt(`32670510020758816978083085130507043184471273380659243275938904335757337482424`),h:BigInt(1),lowS:!0,endo:{beta:BigInt(`0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee`),splitScalar:e=>{let t=D2,n=BigInt(`0x3086d221a7d46bcde86c90e49284eb15`),r=-O2*BigInt(`0xe4437ed6010e88286f547fa90abfe4c3`),i=BigInt(`0x114ca50f7a8e2f3f657c1108d9d44cfd8`),a=n,o=BigInt(`0x100000000000000000000000000000000`),s=A2(a*e,t),c=A2(-r*e,t),l=Y0(e-s*n-c*i,t),u=Y0(-s*r-c*a,t),d=l>o,f=u>o;if(d&&(l=t-l),f&&(u=t-u),l>o||u>o)throw Error(`splitScalar: Endomorphism failed, k=`+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},s0);N2.ProjectivePoint;var P2=c({ECKeySign:()=>Q2,SHA256:()=>$2,arrayToBase64String:()=>B2,computeAddress:()=>W2,decode58Check:()=>K2,decodeBase58Address:()=>L2,ecRecover:()=>z2,genPriKey:()=>U2,getAddressFromPriKey:()=>G2,getAddressFromPriKeyBase64String:()=>X2,getBase58CheckAddress:()=>I2,getBase58CheckAddressFromPriKeyBase64String:()=>J2,getHexStrAddressFromPriKeyBase64String:()=>Y2,getPubKeyFromPriKey:()=>Z2,getRowBytesFromTransactionBase64:()=>H2,isAddressValid:()=>q2,passwordToAddress:()=>e4,pkToAddress:()=>t4,sha3:()=>n4,signBytes:()=>V2,signTransaction:()=>R2});function F2(e){return wW(dW(e).padStart(64,`0`))}function I2(e){let t=$2($2(e)).slice(0,4);return t=e.concat(t),MW(t)}function L2(e){if(typeof e!=`string`||e.length<=4)return!1;let t=NW(e);if(t.length<=4)return!1;let n=t.length-4,r=t.slice(n);t=t.slice(0,n);let i=$2($2(t)).slice(0,4);if(r[0]==i[0]&&r[1]==i[1]&&r[2]==i[2]&&r[3]==i[3])return t;throw Error(`Invalid address provided`)}function R2(e,t){typeof e==`string`&&(e=wW(e));let n=t.txID,r=Q2(wW(n),e);return Array.isArray(t.signature)?t.signature.includes(r)||t.signature.push(r):t.signature=[r],t}function z2(e,t){return e=`0x`+e.replace(/^0x/,``),t=`0x`+t.replace(/^0x/,``),`41`+QX(F1(e),fX.from(t)).substring(2)}function B2(e){return btoa(String.fromCharCode(...e))}function V2(e,t){return typeof e==`string`&&(e=wW(e)),Q2($2(t),e)}function H2(e){let t=fW(e);return globalThis.proto.protocol.Transaction.deserializeBinary(t).getRawData().serializeBinary()}function U2(){let e=dW(N2.utils.randomPrivateKey());return e=e.padStart(64,`0`),wW(e)}function W2(e){return e.length===65&&(e=e.slice(1)),wW(`41`+Lq(new Uint8Array(e)).toString().substring(2).substring(24))}function G2(e){return W2(Z2(e))}function K2(e){let t=NW(e);if(t.length<=4)return!1;let n=t.slice(0,t.length-4),r=$2($2(n));return r[0]===t[n.length]&&r[1]===t[n.length+1]&&r[2]===t[n.length+2]&&r[3]===t[n.length+3]?n:!1}function q2(e){if(typeof e!=`string`||e.length!==34)return!1;let t=NW(e);if(t.length!==25||t[0]!==65)return!1;let n=t.slice(21);t=t.slice(0,21);let r=$2($2(t)).slice(0,4);return n[0]==r[0]&&n[1]==r[1]&&n[2]==r[2]&&n[3]==r[3]}function J2(e){return I2(W2(Z2(fW(e))))}function Y2(e){return dW(W2(Z2(fW(e))))}function X2(e){return pW(W2(Z2(fW(e))))}function Z2(e){let t=N2.ProjectivePoint.fromPrivateKey(new Uint8Array(F2(e))),n=t.x,r=t.y;return wW(`04${n.toString(16).padStart(64,`0`)}${r.toString(16).padStart(64,`0`)}`)}function Q2(e,t){let n=N2.sign(dW(e),dW(t)),r=n.r.toString(16),i=n.s.toString(16),a=n.recovery+27;return r.padStart(64,`0`)+i.padStart(64,`0`)+cW(a)}function $2(e){return wW(MJ(`0x`+dW(e)).replace(/^0x/,``))}function e4(e){return I2(G2(fW(e)))}function t4(e,t=!1){return I2(G2(wW(e,t)))}function n4(e,t=!0){return(t?`0x`:``)+Lq(Buffer.from(e,`utf-8`)).toString().substring(2)}var r4=c({generateAccount:()=>a4,generateAccountWithMnemonic:()=>s4,generateRandom:()=>o4}),i4=`Invalid tron path provided`;function a4(){let e=U2(),t=Z2(e),n=G2(e);return{privateKey:dW(e),publicKey:dW(t),address:{base58:I2(n),hex:dW(n)}}}function o4(e=``,t=_W,n){let r=j$.createRandom(e,t,n);return{mnemonic:r.mnemonic,privateKey:r.privateKey,publicKey:r.signingKey.publicKey,address:t4(r.privateKey.replace(/^0x/,``)),path:r.path}}function s4(e,t=_W,n=``,r=null){if(!String(t).match(/^m\/44\'\/195\'/))throw Error(i4);let i=j$.fromMnemonic(LQ.fromPhrase(e,n,r),t);return{mnemonic:i.mnemonic,privateKey:i.privateKey,publicKey:i.signingKey.publicKey,address:t4(i.privateKey.replace(/^0x/,``))}}var c4=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,l4=Math.ceil,u4=Math.floor,d4=`[BigNumber Error] `,f4=d4+`Number primitive has more than 15 significant digits: `,p4=0x5af3107a4000,m4=14,h4=9007199254740991,g4=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],_4=1e7,v4=1e9;function y4(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!c4.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(C4(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(f4+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>h4||e!==u4(e)))throw Error(f4+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%m4,l<0&&(f+=m4),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=m4;f<m;)y.c.push(+h.slice(f,f+=m4));f=m4-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=y4,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],C4(n,0,v4,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],C4(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(C4(n[0],-v4,0,t),C4(n[1],0,v4,t),c=n[0],l=n[1]):(C4(n,-v4,v4,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)C4(n[0],-v4,-1,t),C4(n[1],1,v4,t),u=n[0],d=n[1];else if(C4(n,-v4,v4,t),n)u=-(d=n<0?-n:n);else throw Error(d4+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(d4+`crypto unavailable`);else f=n;else throw Error(d4+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],C4(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],C4(n,0,v4,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(d4+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(d4+t+` invalid: `+n)}else throw Error(d4+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-v4&&i<=v4&&i===u4(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%m4,t<1&&(t+=m4),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=p4||n!==u4(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(d4+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return u4(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:C4(e,0,v4),s=l4(e/m4),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(d4+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=m4,s&&e&&(c=g4[m4-e],u[l]=u4(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=m4);for(l=1,c=u[0];c>=10;c/=10,l++);l<m4&&(i-=m4-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(E4(x4(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?E4(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=E4(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%_4,u=t/_4|0;for(e=e.slice();c--;)a=e[c]%_4,o=e[c]/_4|0,r=u*a+o*l,i=l*a+r%_4*_4+s,s=(i/n|0)+(r/_4|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,w,T,E,D=r.s==i.s?1:-1,O=r.c,k=i.c;if(!O||!O[0]||!k||!k[0])return new v(!r.s||!i.s||(O?k&&O[0]==k[0]:!k)?NaN:O&&O[0]==0||!k?D*0:D/0);for(h=new v(D),g=h.c=[],l=r.e-i.e,D=a+l+1,s||(s=p4,l=b4(r.e/m4)-b4(i.e/m4),D=D/m4|0),u=0;k[u]==(O[u]||0);u++);if(k[u]>(O[u]||0)&&l--,D<0)g.push(1),d=!0;else{for(C=O.length,T=k.length,u=0,D+=2,f=u4(s/(k[0]+1)),f>1&&(k=e(k,f,s),O=e(O,f,s),T=k.length,C=O.length),x=T,_=O.slice(0,T),y=_.length;y<T;_[y++]=0);E=k.slice(),E=[0].concat(E),w=k[0],k[1]>=s/2&&w++;do{if(f=0,c=t(k,_,T,y),c<0){if(b=_[0],T!=y&&(b=b*s+(_[1]||0)),f=u4(b/w),f>1)for(f>=s&&(f=s-1),p=e(k,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,T<m?E:k,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=k.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(k,_,T,y)<1;)f++,n(_,T<y?E:k,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=O[x]||0:(_=[O[x]],y=1)}while((x++<C||_[0]!=null)&&D--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==p4){for(u=1,D=g[0];D>=10;D/=10,u++);S(h,a+(h.e=u+l*m4-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:C4(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=x4(e.c),d=r==1||r==2&&(o<=c||o>=l)?T4(d,o):E4(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=x4(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=T4(d,a)}else if(t-=o,d=E4(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=S4(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*m4-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(d4+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=g4;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=m4,o=t,c=p[l=0],f=u4(c/m[i-o-1]%10);else if(l=l4((a+1)/m4),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=m4,o=a-m4+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=m4,o=a-m4+i,f=o<0?0:u4(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(m4-t%m4)%m4],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[m4-a],p[l]=o>0?u4(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==p4&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=p4)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=x4(e.c),t=n<=c||n>=l?T4(t,n):E4(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return S4(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return C4(e,0,v4),t==null?t=s:C4(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-b4(this.e/m4))*m4,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(d4+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-w4(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&w4(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=l4(m/m4+2));for(l?(n=new v(.5),u&&(e.s=1),d=w4(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=u4(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=w4(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:C4(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return S4(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return S4(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=S4(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&b4(this.e/m4)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return S4(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=S4(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/m4,u=e.e/m4,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=b4(l),u=b4(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=p4-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=p4}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=b4(_.e/m4)+b4(e.e/m4),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=p4,g=_4,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/m4,o=e.e/m4,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=b4(a),o=b4(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/p4|0,s[t]=p4===s[t]?0:s[t]%p4;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return C4(e,1,v4),t==null?t=s:C4(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*m4+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return C4(e,-h4,h4),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=x4(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=b4((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),x4(a.c).slice(0,u)===(n=x4(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(C4(e,0,v4),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(C4(e,0,v4),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(d4+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(d4+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=x4(y),c=n.e=g.length-_.e-1,n.c[0]=g4[(l=c%m4)<0?m4+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&C4(e,1,v4),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?T4(x4(r.c),a):E4(x4(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=E4(x4(r.c),r.e,`0`)):(C4(e,2,g.length,`Base`),t=n(E4(x4(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function b4(e){var t=e|0;return e>0||e===t?t:t-1}function x4(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=m4-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function S4(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function C4(e,t,n,r){if(e<t||e>n||e!==u4(e))throw Error(d4+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function w4(e){var t=e.c.length-1;return b4(e.e/m4)==t&&e.c[t]%2!=0}function T4(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function E4(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var D4=y4(),X=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(e){if(e==null)throw TypeError(`Expected a string but received a ${e}`);if(e.constructor.name!==`String`)throw TypeError(`Expected a string but received a ${e.constructor.name}`)}t.exports=e.default,t.exports.default=e.default})),O4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)}t.exports=e.default,t.exports.default=e.default})),k4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(e){return e==null}t.exports=e.default,t.exports.default=e.default})),A4=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.farsiLocales=e.englishLocales=e.dotDecimal=e.decimal=e.commaDecimal=e.bengaliLocales=e.arabicLocales=e.alphanumeric=e.alpha=void 0;for(var t=e.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/,"ta-IN":/^[\u0B80-\u0BFF]+$/i,"te-IN":/^[\u0C00-\u0C7F]+$/i,"kn-IN":/^[\u0C80-\u0CFF]+$/i,"ml-IN":/^[\u0D00-\u0D7F]+$/i,"gu-IN":/^[\u0A80-\u0AFF]+$/i,"pa-IN":/^[\u0A00-\u0A7F]+$/i,"or-IN":/^[\u0B00-\u0B7F]+$/i},n=e.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/,"ta-IN":/^[0-9\u0B80-\u0BFF.]+$/i,"te-IN":/^[0-9\u0C00-\u0C7F.]+$/i,"kn-IN":/^[0-9\u0C80-\u0CFF.]+$/i,"ml-IN":/^[0-9\u0D00-\u0D7F.]+$/i,"gu-IN":/^[0-9\u0A80-\u0AFF.]+$/i,"pa-IN":/^[0-9\u0A00-\u0A7F.]+$/i,"or-IN":/^[0-9\u0B00-\u0B7F.]+$/i},r=e.decimal={"en-US":`.`,ar:`٫`},i=e.englishLocales=[`AU`,`GB`,`HK`,`IN`,`NZ`,`ZA`,`ZM`],a,o=0;o<i.length;o++)a=`en-${i[o]}`,t[a]=t[`en-US`],n[a]=n[`en-US`],r[a]=r[`en-US`];for(var s=e.arabicLocales=[`AE`,`BH`,`DZ`,`EG`,`IQ`,`JO`,`KW`,`LB`,`LY`,`MA`,`QM`,`QA`,`SA`,`SD`,`SY`,`TN`,`YE`],c,l=0;l<s.length;l++)c=`ar-${s[l]}`,t[c]=t.ar,n[c]=n.ar,r[c]=r.ar;for(var u=e.farsiLocales=[`IR`,`AF`],d,f=0;f<u.length;f++)d=`fa-${u[f]}`,n[d]=n.fa,r[d]=r.ar;for(var p=e.bengaliLocales=[`BD`,`IN`],m,h=0;h<p.length;h++)m=`bn-${p[h]}`,t[m]=t.bn,n[m]=n.bn,r[m]=r[`en-US`];for(var g=e.dotDecimal=[`ar-EG`,`ar-LB`,`ar-LY`],_=e.commaDecimal=`bg-BG.cs-CZ.da-DK.de-DE.el-GR.en-ZM.eo.es-ES.fr-CA.fr-FR.gu-IN.hi-IN.hu-HU.id-ID.it-IT.kk-KZ.kn-IN.ku-IQ.ml-IN.nb-NO.nl-NL.nn-NO.or-IN.pa-IN.pl-PL.pt-PT.ru-RU.si-LK.sl-SI.sr-RS.sr-RS@latin.sv-SE.ta-IN.te-IN.tr-TR.uk-UA.vi-VN`.split(`.`),v=0;v<g.length;v++)r[g[v]]=r[`en-US`];for(var y=0;y<_.length;y++)r[_[y]]=`,`;t[`fr-CA`]=t[`fr-FR`],n[`fr-CA`]=n[`fr-FR`],t[`pt-BR`]=t[`pt-PT`],n[`pt-BR`]=n[`pt-PT`],r[`pt-BR`]=r[`pt-PT`],t[`pl-Pl`]=t[`pl-PL`],n[`pl-Pl`]=n[`pl-PL`],r[`pl-Pl`]=r[`pl-PL`],t[`fa-AF`]=t.fa})),j4=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a,e.locales=void 0;var t=i(X()),n=i(k4()),r=A4();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,i){(0,t.default)(e),i||={};var a=RegExp(`^(?:[-+])?(?:[0-9]+)?(?:\\${i.locale?r.decimal[i.locale]:`.`}[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?\$`);if(e===``||e===`.`||e===`,`||e===`-`||e===`+`)return!1;var o=parseFloat(e.replace(`,`,`.`));return a.test(e)&&(!i.hasOwnProperty(`min`)||(0,n.default)(i.min)||o>=i.min)&&(!i.hasOwnProperty(`max`)||(0,n.default)(i.max)||o<=i.max)&&(!i.hasOwnProperty(`lt`)||(0,n.default)(i.lt)||o<i.lt)&&(!i.hasOwnProperty(`gt`)||(0,n.default)(i.gt)||o>i.gt)}e.locales=Object.keys(r.decimal)})),M4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(j4());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e)?parseFloat(e):NaN}t.exports=e.default,t.exports.default=e.default})),N4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(0,n.default)(e),parseInt(e,t||10)}t.exports=e.default,t.exports.default=e.default})),P4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(0,n.default)(e),t?e===`1`||/^true$/i.test(e):e!==`0`&&!/^false$/i.test(e)&&e!==``}t.exports=e.default,t.exports.default=e.default})),F4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(0,n.default)(e),e===t}t.exports=e.default,t.exports.default=e.default})),I4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e){return n(e)===`object`&&e!==null?e=typeof e.toString==`function`?e.toString():`[object Object]`:(e==null||isNaN(e)&&!e.length)&&(e=``),String(e)}t.exports=e.default,t.exports.default=e.default})),L4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}t.exports=e.default,t.exports.default=e.default})),R4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=a(X()),r=a(I4()),i=a(L4());function a(e){return e&&e.__esModule?e:{default:e}}var o={ignoreCase:!1,minOccurrences:1};function s(e,t,a){return(0,n.default)(e),a=(0,i.default)(a,o),a.ignoreCase?e.toLowerCase().split((0,r.default)(t).toLowerCase()).length>a.minOccurrences:e.split((0,r.default)(t)).length>a.minOccurrences}t.exports=e.default,t.exports.default=e.default})),z4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){return(0,n.default)(e),Object.prototype.toString.call(t)!==`[object RegExp]`&&(t=new RegExp(t,r)),!!e.match(t)}t.exports=e.default,t.exports.default=e.default})),B4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function n(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];if(e===i||n(i)&&i.test(e))return!0}return!1}t.exports=e.default,t.exports.default=e.default})),V4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){(0,n.default)(e);var r,a;i(t)===`object`?(r=t.min||0,a=t.max):(r=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&(a===void 0||o<=a)}t.exports=e.default,t.exports.default=e.default})),H4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=i(X()),r=i(L4());function i(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function o(e,t){(0,n.default)(e),t=(0,r.default)(t,a),t.allow_trailing_dot&&e[e.length-1]===`.`&&(e=e.substring(0,e.length-1)),t.allow_wildcard===!0&&e.indexOf(`*.`)===0&&(e=e.substring(2));var i=e.split(`.`),o=i[i.length-1];return t.require_tld&&(i.length<2||!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o)||/\s/.test(o))||!t.allow_numeric_tld&&/^\d+$/.test(o)?!1:i.every(function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))})}t.exports=e.default,t.exports.default=e.default})),U4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}var a=`(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])`,o=`(${a}[.]){3}${a}`,s=RegExp(`^${o}\$`),c=`(?:[0-9a-fA-F]{1,4})`,l=RegExp(`^((?:${c}:){7}(?:${c}|:)|(?:${c}:){6}(?:${o}|:${c}|:)|(?:${c}:){5}(?::${o}|(:${c}){1,2}|:)|(?:${c}:){4}(?:(:${c}){0,1}:${o}|(:${c}){1,3}|:)|(?:${c}:){3}(?:(:${c}){0,2}:${o}|(:${c}){1,4}|:)|(?:${c}:){2}(?:(:${c}){0,3}:${o}|(:${c}){1,5}|:)|(?:${c}:){1}(?:(:${c}){0,4}:${o}|(:${c}){1,6}|:)|(?::((?::${c}){0,5}:${o}|(?::${c}){1,7}|:)))(%[0-9a-zA-Z.]{1,})?\$`);function u(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(e);var r=(i(t)===`object`?t.version:arguments[1])||``;return r?r.toString()===`4`?s.test(e):r.toString()===`6`?l.test(e):!1:u(e,{version:4})||u(e,{version:6})}t.exports=e.default,t.exports.default=e.default})),W4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=v;var n=c(X()),r=c(B4()),i=c(V4()),a=c(H4()),o=c(U4()),s=c(L4());function c(e){return e&&e.__esModule?e:{default:e}}var l={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:``,ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},u=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,d=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,f=/^[a-z\d]+$/,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,m=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,h=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,g=254;function _(e){var t=e.replace(/^"(.+)"$/,`$1`);return!(!t.trim()||/[\.";<>]/.test(t)&&(t===e||t.split(`"`).length!==t.split(`\\"`).length))}function v(e,t){if((0,n.default)(e),t=(0,s.default)(t,l),t.require_display_name||t.allow_display_name){var c=e.match(u);if(c){var v=c[1];if(e=e.replace(v,``).replace(/(^<|>$)/g,``),v.endsWith(` `)&&(v=v.slice(0,-1)),!_(v))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>g)return!1;var y=e.split(`@`),b=y.pop(),x=b.toLowerCase();if(t.host_blacklist.length>0&&(0,r.default)(x,t.host_blacklist)||t.host_whitelist.length>0&&!(0,r.default)(x,t.host_whitelist))return!1;var S=y.join(`@`);if(t.domain_specific_validation&&(x===`gmail.com`||x===`googlemail.com`)){S=S.toLowerCase();var C=S.split(`+`)[0];if(!(0,i.default)(C.replace(/\./g,``),{min:6,max:30}))return!1;for(var w=C.split(`.`),T=0;T<w.length;T++)if(!f.test(w[T]))return!1}if(t.ignore_max_length===!1&&(!(0,i.default)(S,{max:64})||!(0,i.default)(b,{max:254})))return!1;if(!(0,a.default)(b,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,o.default)(b)){if(!b.startsWith(`[`)||!b.endsWith(`]`))return!1;var E=b.slice(1,-1);if(E.length===0||!(0,o.default)(E))return!1}}if(t.blacklisted_chars&&S.search(RegExp(`[${t.blacklisted_chars}]+`,`g`))!==-1)return!1;if(S[0]===`"`&&S[S.length-1]===`"`)return S=S.slice(1,S.length-1),t.allow_utf8_local_part?h.test(S):p.test(S);for(var D=t.allow_utf8_local_part?m:d,O=S.split(`.`),k=0;k<O.length;k++)if(!D.test(O[k]))return!1;return!0}t.exports=e.default,t.exports.default=e.default})),G4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e,t){return e.indexOf(t)!==-1},t.exports=e.default,t.exports.default=e.default})),K4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var n=c(X()),r=c(B4()),i=c(G4()),a=c(H4()),o=c(U4()),s=c(L4());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return m(e)||p(e,t)||d(e,t)||u()}function u(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
90
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(e,t){if(e){if(typeof e==`string`)return f(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function m(e){if(Array.isArray(e))return e}var h={protocols:[`http`,`https`,`ftp`],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},g=/^\[([^\]]+)\](?::([0-9]+))?$/;function _(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e)||e.indexOf(`mailto:`)===0||(t=(0,s.default)(t,h),t.validate_length&&e.length>t.max_allowed_length)||!t.allow_fragments&&(0,i.default)(e,`#`)||!t.allow_query_components&&((0,i.default)(e,`?`)||(0,i.default)(e,`&`)))return!1;var c,u,d,f,p,m,_=e.split(`#`),v;e=_.shift(),_=e.split(`?`),e=_.shift();var y=e.match(/^([a-z][a-z0-9+\-.]*):/i),b=!1,x=function(n){return b=!0,c=n.toLowerCase(),t.require_valid_protocol&&t.protocols.indexOf(c)===-1?!1:e.substring(y[0].length)};if(y){var S=y[1],C=e.substring(y[0].length);if(C.slice(0,2)!==`//`){var w=C.indexOf(`/`),T=w===-1?C:C.substring(0,w),E=T.indexOf(`@`);if(E!==-1){var D=T.substring(0,E);if(/^[a-zA-Z0-9\-_.%:]*$/.test(D)){if(t.require_protocol)return!1}else if(e=x(S),e===!1)return!1}else if(/^[0-9]/.test(C)){if(t.require_protocol)return!1}else if(e=x(S),e===!1)return!1}else if(e=x(S),e===!1)return!1}else if(t.require_protocol)return!1;if(e.slice(0,2)===`//`){if(!b&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(e===``)return!1;if(_=e.split(`/`),e=_.shift(),e===``&&!t.require_host)return!0;if(_=e.split(`@`),_.length>1){if(t.disallow_auth||_[0]===``||(u=_.shift(),u.indexOf(`:`)>=0&&u.split(`:`).length>2))return!1;var O=l(u.split(`:`),2),k=O[0],A=O[1];if(k===``&&A===``)return!1}f=_.join(`@`),m=null,v=null;var j=f.match(g);if(j?(d=``,v=j[1],m=j[2]||null):(_=f.split(`:`),d=_.shift(),_.length&&(m=_.join(`:`))),m!==null&&m.length>0){if(p=parseInt(m,10),!/^[0-9]+$/.test(m)||p<=0||p>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?(0,r.default)(d,t.host_whitelist):d===``&&!t.require_host?!0:!(!(0,o.default)(d)&&!(0,a.default)(d,t)&&(!v||!(0,o.default)(v,6))||(d||=v,t.host_blacklist&&(0,r.default)(d,t.host_blacklist)))}t.exports=e.default,t.exports.default=e.default})),q4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,a=/^([0-9a-fA-F]){12}$/,o=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/,s=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/,c=/^([0-9a-fA-F]){16}$/,l=/^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;function u(e,t){return(0,n.default)(e),t!=null&&t.eui&&(t.eui=String(t.eui)),t!=null&&t.no_colons||t!=null&&t.no_separators?t.eui===`48`?a.test(e):t.eui===`64`?c.test(e):a.test(e)||c.test(e):t?.eui===`48`?i.test(e)||o.test(e):t?.eui===`64`?s.test(e)||l.test(e):u(e,{eui:`48`})||u(e,{eui:`64`})}t.exports=e.default,t.exports.default=e.default})),J4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=i(X()),r=i(U4());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^\d{1,3}$/,o=32,s=128;function c(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``;(0,n.default)(e);var i=e.split(`/`);if(i.length!==2||!a.test(i[1])||i[1].length>1&&i[1].startsWith(`0`)||!(0,r.default)(i[0],t))return!1;var c=null;switch(String(t)){case`4`:c=o;break;case`6`:c=s;break;default:c=(0,r.default)(i[0],`6`)?s:o}return i[1]<=c&&i[1]>=0}t.exports=e.default,t.exports.default=e.default})),Y4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=m;var n=r(L4());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return s(e)||o(e,t)||l(e,t)||a()}function a(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
91
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function s(e){if(Array.isArray(e))return e}function c(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function l(e,t){if(e){if(typeof e==`string`)return u(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var d={format:`YYYY/MM/DD`,delimiters:[`/`,`-`],strictMode:!1};function f(e){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(e)}function p(e,t){for(var n=[],r=Math.max(e.length,t.length),i=0;i<r;i++)n.push([e[i],t[i]]);return n}function m(e,t){if(t=typeof t==`string`?(0,n.default)({format:t},d):(0,n.default)(t,d),typeof e==`string`&&f(t.format)){if(t.strictMode&&e.length!==t.format.length)return!1;var r=t.delimiters.find(function(e){return t.format.indexOf(e)!==-1}),a=t.strictMode?r:t.delimiters.find(function(t){return e.indexOf(t)!==-1}),o=p(e.split(a),t.format.toLowerCase().split(r)),s={},l=c(o),u;try{for(l.s();!(u=l.n()).done;){var m=i(u.value,2),h=m[0],g=m[1];if(!h||!g||h.length!==g.length)return!1;s[g.charAt(0)]=h}}catch(e){l.e(e)}finally{l.f()}var _=s.y;if(_.startsWith(`-`))return!1;if(s.y.length===2){var v=parseInt(s.y,10);if(isNaN(v))return!1;_=v<new Date().getFullYear()%100?`20${s.y}`:`19${s.y}`}var y=s.m;s.m.length===1&&(y=`0${s.m}`);var b=s.d;return s.d.length===1&&(b=`0${s.d}`),new Date(`${_}-${y}-${b}T00:00:00.000Z`).getUTCDate()===+s.d}return t.strictMode?!1:Object.prototype.toString.call(e)===`[object Date]`&&isFinite(e)}t.exports=e.default,t.exports.default=e.default})),X4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(L4());function r(e){return e&&e.__esModule?e:{default:e}}var i={hourFormat:`hour24`,mode:`default`},a={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/,withOptionalSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/,withOptionalSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/}};function o(e,t){return t=(0,n.default)(t,i),typeof e==`string`?a[t.hourFormat][t.mode].test(e):!1}t.exports=e.default,t.exports.default=e.default})),Z4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e,t){return e.some(function(e){return t===e})},t.exports=e.default,t.exports.default=e.default})),Q4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=i(X()),r=i(Z4());function i(e){return e&&e.__esModule?e:{default:e}}var a={loose:!1},o=[`true`,`false`,`1`,`0`],s=[].concat(o,[`yes`,`no`]);function c(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a;return(0,n.default)(e),t.loose?(0,r.default)(s,e.toLowerCase()):(0,r.default)(o,e)}t.exports=e.default,t.exports.default=e.default})),$4=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=m;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=`(([a-zA-Z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|([a-zA-Z]{5,8}))`,a=`([A-Za-z]{4})`,o=`([A-Za-z]{2}|\\d{3})`,s=`([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))`,c=`((\\d|[A-W]|[Y-Z]|[a-w]|[y-z])(-[A-Za-z0-9]{2,8})+)`,l=`(x(-[A-Za-z0-9]{1,8})+)`,u=`(((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))|((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang)))`,d=`(-|_)`,f=`${i}(${d}${a})?(${d}${o})?(${d}${s})*(${d}${c})*(${d}${l})?`,p=RegExp(`(^${l}\$)|(^${u}\$)|(^${f}\$)`);function m(e){return(0,n.default)(e),p.test(e)}t.exports=e.default,t.exports.default=e.default})),e3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;function a(e){if((0,n.default)(e),!i.test(e))return!1;for(var t=0,r=0;r<e.length;r++)r%3==0?t+=e[r]*3:r%3==1?t+=e[r]*7:t+=e[r]*1;return t%10==0}t.exports=e.default,t.exports.default=e.default})),t3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.locales=void 0;var t=r(X()),n=A4();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`en-US`,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,t.default)(e);var a=e,o=i.ignore;if(o)if(o instanceof RegExp)a=a.replace(o,``);else if(typeof o==`string`)a=a.replace(RegExp(`[${o.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,`\\$&`)}]`,`g`),``);else throw Error(`ignore should be instance of a String or RegExp`);if(r in n.alpha)return n.alpha[r].test(a);throw Error(`Invalid locale '${r}'`)}e.locales=Object.keys(n.alpha)})),n3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.locales=void 0;var t=r(X()),n=A4();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`en-US`,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,t.default)(e);var a=e,o=i.ignore;if(o)if(o instanceof RegExp)a=a.replace(o,``);else if(typeof o==`string`)a=a.replace(RegExp(`[${o.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,`\\$&`)}]`,`g`),``);else throw Error(`ignore should be instance of a String or RegExp`);if(r in n.alphanumeric)return n.alphanumeric[r].test(a);throw Error(`Invalid locale '${r}'`)}e.locales=Object.keys(n.alphanumeric)})),r3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=i(X()),r=A4();function i(e){return e&&e.__esModule?e:{default:e}}var a=/^[0-9]+$/;function o(e,t){return(0,n.default)(e),t&&t.no_symbols?a.test(e):RegExp(`^[+-]?([0-9]*[${(t||{}).locale?r.decimal[t.locale]:`.`}])?[0-9]+\$`).test(e)}t.exports=e.default,t.exports.default=e.default})),i3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.locales=void 0;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$|^[A-Z]\d{8}$/,ZA:/^[TAMD]\d{8}$/};e.locales=Object.keys(r);function i(e,n){(0,t.default)(e);var i=e.replace(/\s/g,``).toUpperCase();return n.toUpperCase()in r&&r[n].test(i)}})),a3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=i(X()),r=i(k4());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,o=/^[-+]?[0-9]+$/;function s(e,t){(0,n.default)(e),t||={};var i=t.allow_leading_zeroes===!1?a:o,s=!t.hasOwnProperty(`min`)||(0,r.default)(t.min)||e>=t.min,c=!t.hasOwnProperty(`max`)||(0,r.default)(t.max)||e<=t.max,l=!t.hasOwnProperty(`lt`)||(0,r.default)(t.lt)||e<t.lt,u=!t.hasOwnProperty(`gt`)||(0,r.default)(t.gt)||e>t.gt;return i.test(e)&&s&&c&&l&&u}t.exports=e.default,t.exports.default=e.default})),o3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(a3());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e,{allow_leading_zeroes:!1,min:0,max:65535})}t.exports=e.default,t.exports.default=e.default})),s3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),e===e.toLowerCase()}t.exports=e.default,t.exports.default=e.default})),c3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),e===e.toUpperCase()}t.exports=e.default,t.exports.default=e.default})),l3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[0-9]{15}$/,a=/^\d{2}-\d{6}-\d{6}-\d{1}$/;function o(e,t){(0,n.default)(e),t||={};var r=i;if(t.allow_hyphens&&(r=a),!r.test(e))return!1;e=e.replace(/-/g,``);for(var o=0,s=2,c=14,l=0;l<c;l++){var u=e.substring(c-l-1,c-l),d=parseInt(u,10)*s;d>=10?o+=d%10+1:o+=d,s===1?s+=1:--s}return(10-o%10)%10===parseInt(e.substring(14,15),10)}t.exports=e.default,t.exports.default=e.default})),u3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[\x00-\x7F]+$/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),d3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.fullWidth=void 0;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=e.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function i(e){return(0,t.default)(e),r.test(e)}})),f3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.halfWidth=void 0;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=e.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function i(e){return(0,t.default)(e),r.test(e)}})),p3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=a(X()),r=d3(),i=f3();function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,n.default)(e),r.fullWidth.test(e)&&i.halfWidth.test(e)}t.exports=e.default,t.exports.default=e.default})),m3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/[^\x00-\x7F]/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),h3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(e,t){var n=e.join(``);return new RegExp(n,t)}t.exports=e.default,t.exports.default=e.default})),g3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=i(X()),r=i(h3());function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)([`^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)`,`(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))`,`?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$`],`i`);function o(e){return(0,n.default)(e),a.test(e)}t.exports=e.default,t.exports.default=e.default})),_3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),v3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var n=o(L4()),r=o(X()),i=o(Z4()),a=A4();function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return RegExp(`^[-+]?([0-9]+)?(\\${a.decimal[e.locale]}[0-9]{${e.decimal_digits}})${e.force_decimal?``:`?`}\$`)}var c={force_decimal:!1,decimal_digits:`1,`,locale:`en-US`},l=[``,`-`,`+`];function u(e,t){if((0,r.default)(e),t=(0,n.default)(t,c),t.locale in a.decimal)return!(0,i.default)(l,e.replace(/ /g,``))&&s(t).test(e);throw Error(`Invalid locale '${t.locale}'`)}t.exports=e.default,t.exports.default=e.default})),y3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(0x|0h)?[0-9A-F]+$/i;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),b3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(0o)?[0-7]+$/i;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),x3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=i(X()),r=i(M4());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return(0,n.default)(e),(0,r.default)(e)%parseInt(t,10)===0}t.exports=e.default,t.exports.default=e.default})),S3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),C3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}var a=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,o=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/,s=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,c=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/,l=/^rgba?/;function u(e,t){(0,n.default)(e);var r=!1,u=!0;if(i(t)===`object`?(r=t.allowSpaces===void 0?r:t.allowSpaces,u=t.includePercentValues===void 0?u:t.includePercentValues):arguments.length>=2&&(u=arguments[1]),r){if(!l.test(e))return!1;e=e.replace(/\s/g,``)}return u?a.test(e)||o.test(e)||s.test(e)||c.test(e):a.test(e)||o.test(e)}t.exports=e.default,t.exports.default=e.default})),w3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,a=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;function o(e){(0,n.default)(e);var t=e.replace(/\s+/g,` `).replace(/\s?(hsla?\(|\)|,)\s?/gi,`$1`);return t.indexOf(`,`)===-1?a.test(t):i.test(t)}t.exports=e.default,t.exports.default=e.default})),T3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),E3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=c,e.locales=void 0;var t=r(X()),n=r(Z4());function r(e){return e&&e.__esModule?e:{default:e}}var i={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function a(e){return!(e.filter(function(e){return!(e in i)}).length>0)}function o(e,t){var r=e.replace(/[\s\-]+/gi,``).toUpperCase(),o=r.slice(0,2).toUpperCase(),s=o in i;return t.whitelist&&(!a(t.whitelist)||!(0,n.default)(t.whitelist,o))||t.blacklist&&(0,n.default)(t.blacklist,o)?!1:s&&i[o].test(r)}function s(e){var t=e.replace(/[^A-Z0-9]+/gi,``).toUpperCase();return(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,function(e){return e.charCodeAt(0)-55}).match(/\d{1,7}/g).reduce(function(e,t){return Number(e+t)%97},``)===1}function c(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,t.default)(e),o(e,n)&&s(e)}e.locales=Object.keys(i)})),D3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CountryCodes=void 0,e.default=i;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=new Set(`AD.AE.AF.AG.AI.AL.AM.AO.AQ.AR.AS.AT.AU.AW.AX.AZ.BA.BB.BD.BE.BF.BG.BH.BI.BJ.BL.BM.BN.BO.BQ.BR.BS.BT.BV.BW.BY.BZ.CA.CC.CD.CF.CG.CH.CI.CK.CL.CM.CN.CO.CR.CU.CV.CW.CX.CY.CZ.DE.DJ.DK.DM.DO.DZ.EC.EE.EG.EH.ER.ES.ET.FI.FJ.FK.FM.FO.FR.GA.GB.GD.GE.GF.GG.GH.GI.GL.GM.GN.GP.GQ.GR.GS.GT.GU.GW.GY.HK.HM.HN.HR.HT.HU.ID.IE.IL.IM.IN.IO.IQ.IR.IS.IT.JE.JM.JO.JP.KE.KG.KH.KI.KM.KN.KP.KR.KW.KY.KZ.LA.LB.LC.LI.LK.LR.LS.LT.LU.LV.LY.MA.MC.MD.ME.MF.MG.MH.MK.ML.MM.MN.MO.MP.MQ.MR.MS.MT.MU.MV.MW.MX.MY.MZ.NA.NC.NE.NF.NG.NI.NL.NO.NP.NR.NU.NZ.OM.PA.PE.PF.PG.PH.PK.PL.PM.PN.PR.PS.PT.PW.PY.QA.RE.RO.RS.RU.RW.SA.SB.SC.SD.SE.SG.SH.SI.SJ.SK.SL.SM.SN.SO.SR.SS.ST.SV.SX.SY.SZ.TC.TD.TF.TG.TH.TJ.TK.TL.TM.TN.TO.TR.TT.TV.TW.TZ.UA.UG.UM.US.UY.UZ.VA.VC.VE.VG.VI.VN.VU.WF.WS.YE.YT.ZA.ZM.ZW`.split(`.`));function i(e){return(0,t.default)(e),r.has(e.toUpperCase())}e.CountryCodes=r})),O3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=i(X()),r=D3();function i(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function o(e){(0,n.default)(e);var t=e.slice(4,6).toUpperCase();return!r.CountryCodes.has(t)&&t!==`XK`?!1:a.test(e)}t.exports=e.default,t.exports.default=e.default})),k3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[a-f0-9]{32}$/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),A3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};function a(e,t){return(0,n.default)(e),RegExp(`^[a-fA-F0-9]{${i[t]}}\$`).test(e)}t.exports=e.default,t.exports.default=e.default})),j3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=i(X()),r=i(L4());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Za-z0-9+/]+={0,2}$/,o=/^[A-Za-z0-9+/]+$/,s=/^[A-Za-z0-9_-]+={0,2}$/,c=/^[A-Za-z0-9_-]+$/;function l(e,t){var i;if((0,n.default)(e),t=(0,r.default)(t,{urlSafe:!1,padding:!((i=t)!=null&&i.urlSafe)}),e===``)return!0;if(t.padding&&e.length%4!=0)return!1;var l=t.urlSafe?t.padding?s:c:t.padding?a:o;return(!t.padding||e.length%4==0)&&l.test(e)}t.exports=e.default,t.exports.default=e.default})),M3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=i(X()),r=i(j3());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){(0,n.default)(e);var t=e.split(`.`);return t.length===3?t.reduce(function(e,t){return e&&(0,r.default)(t,{urlSafe:!0})},!0):!1}t.exports=e.default,t.exports.default=e.default})),N3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=a(X()),r=a(Z4()),i=a(L4());function a(e){return e&&e.__esModule?e:{default:e}}function o(e){"@babel/helpers - typeof";return o=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},o(e)}var s={allow_primitives:!1};function c(e,t){(0,n.default)(e);try{t=(0,i.default)(t,s);var a=[];t.allow_primitives&&(a=[null,!1,!0]);var c=JSON.parse(e);return(0,r.default)(a,c)||!!c&&o(c)===`object`}catch{}return!1}t.exports=e.default,t.exports.default=e.default})),P3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=i(X()),r=i(L4());function i(e){return e&&e.__esModule?e:{default:e}}var a={ignore_whitespace:!1};function o(e,t){return(0,n.default)(e),t=(0,r.default)(t,a),(t.ignore_whitespace?e.trim().length:e.length)===0}t.exports=e.default,t.exports.default=e.default})),F3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){(0,n.default)(e);var r,a;i(t)===`object`?(r=t.min||0,a=t.max):(r=arguments[1]||0,a=arguments[2]);var o=e.match(/[^\uFE0F\uFE0E][\uFE0F\uFE0E]/g)||[],s=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],c=e.length-o.length-s.length,l=c>=r&&(a===void 0||c<=a);return l&&Array.isArray(t?.discreteLengths)?t.discreteLengths.some(function(e){return e===c}):l}t.exports=e.default,t.exports.default=e.default})),I3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(e)}t.exports=e.default,t.exports.default=e.default})),L3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};function a(e,t){return(0,n.default)(e),t??=`all`,t in i?i[t].test(e):!1}t.exports=e.default,t.exports.default=e.default})),R3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=i(X()),r=i(y3());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.default)(e),(0,r.default)(e)&&e.length===24}t.exports=e.default,t.exports.default=e.default})),z3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(O4());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){var r=(i(t)===`object`?t.comparisonDate:t)||Date().toString(),a=(0,n.default)(r),o=(0,n.default)(e);return!!(o&&a&&o>a)}t.exports=e.default,t.exports.default=e.default})),B3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(O4());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){var r=(i(t)===`object`?t.comparisonDate:t)||Date().toString(),a=(0,n.default)(r),o=(0,n.default)(e);return!!(o&&a&&o<a)}t.exports=e.default,t.exports.default=e.default})),V3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=i(X()),r=i(I4());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){"@babel/helpers - typeof";return a=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},a(e)}function o(e,t){(0,n.default)(e);var i;if(Object.prototype.toString.call(t)===`[object Array]`){var o=[];for(i in t)({}).hasOwnProperty.call(t,i)&&(o[i]=(0,r.default)(t[i]));return o.indexOf(e)>=0}else if(a(t)===`object`)return t.hasOwnProperty(e);else if(t&&typeof t.indexOf==`function`)return t.indexOf(e)>=0;return!1}t.exports=e.default,t.exports.default=e.default})),H3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,n.default)(e);for(var t=e.replace(/[- ]+/g,``),r=0,i,a,o,s=t.length-1;s>=0;s--)i=t.substring(s,s+1),a=parseInt(i,10),o?(a*=2,a>=10?r+=a%10+1:r+=a):r+=a,o=!o;return!!(r%10==0&&t)}t.exports=e.default,t.exports.default=e.default})),U3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=i(X()),r=i(H3());function i(e){return e&&e.__esModule?e:{default:e}}var a={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},o=function(){var e=[];for(var t in a)a.hasOwnProperty(t)&&e.push(a[t]);return e}();function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(e);var i=t.provider,s=e.replace(/[- ]+/g,``);if(i&&i.toLowerCase()in a){if(!a[i.toLowerCase()].test(s))return!1}else if(i&&!(i.toLowerCase()in a))throw Error(`${i} is not a valid credit card provider.`);else if(!o.some(function(e){return e.test(s)}))return!1;return(0,r.default)(e)}t.exports=e.default,t.exports.default=e.default})),W3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=a(X()),r=a(Z4()),i=a(a3());function a(e){return e&&e.__esModule?e:{default:e}}var o={PL:function(e){(0,n.default)(e);var t={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(e!=null&&e.length===11&&(0,i.default)(e,{allow_leading_zeroes:!0})){var r=e.split(``).slice(0,-1).reduce(function(e,n,r){return e+Number(n)*t[r+1]},0)%10,a=Number(e.charAt(e.length-1));if(r===0&&a===0||a===10-r)return!0}return!1},ES:function(e){(0,n.default)(e);var t=/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/,r={X:0,Y:1,Z:2},i=[`T`,`R`,`W`,`A`,`G`,`M`,`Y`,`F`,`P`,`D`,`X`,`B`,`N`,`J`,`Z`,`S`,`Q`,`V`,`H`,`L`,`C`,`K`,`E`],a=e.trim().toUpperCase();if(!t.test(a))return!1;var o=a.slice(0,-1).replace(/[X,Y,Z]/g,function(e){return r[e]});return a.endsWith(i[o%23])},FI:function(e){return(0,n.default)(e),e.length!==11||!e.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)?!1:`0123456789ABCDEFHJKLMNPRSTUVWXY`[(parseInt(e.slice(0,6),10)*1e3+parseInt(e.slice(7,10),10))%31]===e.slice(10,11)},IN:function(e){var t=/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/,n=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],i=e.trim();if(!t.test(i))return!1;var a=0;return i.replace(/\s/g,``).split(``).map(Number).reverse().forEach(function(e,t){a=n[a][r[t%8][e]]}),a===0},IR:function(e){if(!e.match(/^\d{10}$/)||(e=`0000${e}`.slice(e.length-6),parseInt(e.slice(3,9),10)===0))return!1;for(var t=parseInt(e.slice(9,10),10),n=0,r=0;r<9;r++)n+=parseInt(e.slice(r,r+1),10)*(10-r);return n%=11,n<2&&t===n||n>=2&&t===11-n},IT:function(e){return e.length!==9||e===`CA00000AA`?!1:e.search(/C[A-Z]\d{5}[A-Z]{2}/i)>-1},NO:function(e){var t=e.trim();if(isNaN(Number(t))||t.length!==11||t===`00000000000`)return!1;var n=t.split(``).map(Number),r=(11-(3*n[0]+7*n[1]+6*n[2]+1*n[3]+8*n[4]+9*n[5]+4*n[6]+5*n[7]+2*n[8])%11)%11,i=(11-(5*n[0]+4*n[1]+3*n[2]+2*n[3]+7*n[4]+6*n[5]+5*n[6]+4*n[7]+3*n[8]+2*r)%11)%11;return!(r!==n[9]||i!==n[10])},TH:function(e){if(!e.match(/^[1-8]\d{12}$/))return!1;for(var t=0,n=0;n<12;n++)t+=parseInt(e[n],10)*(13-n);return e[12]===((11-t%11)%10).toString()},LK:function(e){return e.length===10&&/^[1-9]\d{8}[vx]$/i.test(e)?!0:!!(e.length===12&&/^[1-9]\d{11}$/i.test(e))},"he-IL":function(e){var t=/^\d{9}$/,n=e.trim();if(!t.test(n))return!1;for(var r=n,i=0,a,o=0;o<r.length;o++)a=Number(r[o])*(o%2+1),i+=a>9?a-9:a;return i%10==0},"ar-LY":function(e){var t=/^(1|2)\d{11}$/,n=e.trim();return!!t.test(n)},"ar-TN":function(e){var t=/^\d{8}$/,n=e.trim();return!!t.test(n)},"zh-CN":function(e){var t=`11.12.13.14.15.21.22.23.31.32.33.34.35.36.37.41.42.43.44.45.46.50.51.52.53.54.61.62.63.64.65.71.81.82.91`.split(`.`),n=[`7`,`9`,`10`,`5`,`8`,`4`,`2`,`1`,`6`,`3`,`7`,`9`,`10`,`5`,`8`,`4`,`2`],i=[`1`,`0`,`X`,`9`,`8`,`7`,`6`,`5`,`4`,`3`,`2`],a=function(e){return(0,r.default)(t,e)},o=function(e){var t=parseInt(e.substring(0,4),10),n=parseInt(e.substring(4,6),10),r=parseInt(e.substring(6),10),i=new Date(t,n-1,r);return i>new Date?!1:i.getFullYear()===t&&i.getMonth()===n-1&&i.getDate()===r},s=function(e){for(var t=e.substring(0,17),r=0,a=0;a<17;a++)r+=parseInt(t.charAt(a),10)*parseInt(n[a],10);return i[r%11]},c=function(e){return s(e)===e.charAt(17).toUpperCase()},l=function(e){var t=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(e);return!(!t||(t=a(e.substring(0,2)),!t)||(t=o(`19${e.substring(6,12)}`),!t))},u=function(e){var t=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(e);return!t||(t=a(e.substring(0,2)),!t)||(t=o(e.substring(6,14)),!t)?!1:c(e)};return function(e){return/^\d{15}|(\d{17}(\d|x|X))$/.test(e)?e.length===15?l(e):u(e):!1}(e)},"zh-HK":function(e){e=e.trim();var t=/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/,n=/^[0-9]$/;if(e=e.toUpperCase(),!t.test(e))return!1;e=e.replace(/\[|\]|\(|\)/g,``),e.length===8&&(e=`3${e}`);for(var r=0,i=0;i<=7;i++){var a=void 0;a=n.test(e[i])?e[i]:(e[i].charCodeAt(0)-55)%11,r+=a*(9-i)}return r%=11,(r===0?`0`:r===1?`A`:String(11-r))===e[e.length-1]},"zh-TW":function(e){var t={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},n=e.trim().toUpperCase();return/^[A-Z][0-9]{9}$/.test(n)?Array.from(n).reduce(function(e,n,r){if(r===0){var i=t[n];return i%10*9+Math.floor(i/10)}return r===9?(10-e%10-Number(n))%10==0:e+Number(n)*(9-r)},0):!1},PK:function(e){var t=/^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/,n=e.trim();return t.test(n)}};function s(e,t){if((0,n.default)(e),t in o)return o[t](e);if(t===`any`){for(var r in o)if(o.hasOwnProperty(r)){var i=o[r];if(i(e))return!0}return!1}throw Error(`Invalid locale '${t}'`)}t.exports=e.default,t.exports.default=e.default})),G3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=8,a=14,o=/^(\d{8}|\d{13}|\d{14})$/;function s(e,t){return e===i||e===a?t%2==0?3:1:t%2==0?1:3}function c(e){var t=10-e.slice(0,-1).split(``).map(function(t,n){return Number(t)*s(e.length,n)}).reduce(function(e,t){return e+t},0)%10;return t<10?t:0}function l(e){(0,n.default)(e);var t=Number(e.slice(-1));return o.test(e)&&t===c(e)}t.exports=e.default,t.exports.default=e.default})),K3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;function a(e){if((0,n.default)(e),!i.test(e))return!1;for(var t=!0,r=0,a=e.length-2;a>=0;a--)if(e[a]>=`A`&&e[a]<=`Z`)for(var o=e[a].charCodeAt(0)-55,s=o%10,c=Math.trunc(o/10),l=0,u=[s,c];l<u.length;l++){var d=u[l];t?d>=5?r+=1+(d-5)*2:r+=d*2:r+=d,t=!t}else{var f=e[a].charCodeAt(0)-48;t?f>=5?r+=1+(f-5)*2:r+=f*2:r+=f,t=!t}var p=Math.trunc((r+9)/10)*10-r;return+e[e.length-1]===p}t.exports=e.default,t.exports.default=e.default})),q3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(?:[0-9]{9}X|[0-9]{10})$/,a=/^(?:[0-9]{13})$/,o=[1,3];function s(e,t){(0,n.default)(e);var r=String(t?.version||t);if(!(t!=null&&t.version||t))return s(e,{version:10})||s(e,{version:13});var c=e.replace(/[\s-]+/g,``),l=0;if(r===`10`){if(!i.test(c))return!1;for(var u=0;u<r-1;u++)l+=(u+1)*c.charAt(u);if(c.charAt(9)===`X`?l+=100:l+=10*c.charAt(9),l%11==0)return!0}else if(r===`13`){if(!a.test(c))return!1;for(var d=0;d<12;d++)l+=o[d%2]*c.charAt(d);if(c.charAt(12)-(10-l%10)%10==0)return!0}return!1}t.exports=e.default,t.exports.default=e.default})),J3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=`^\\d{4}-?\\d{3}[\\dX]$`;function a(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(e);var r=i;if(r=t.require_hyphen?r.replace(`?`,``):r,r=t.case_sensitive?new RegExp(r):new RegExp(r,`i`),!r.test(e))return!1;for(var a=e.replace(`-`,``).toUpperCase(),o=0,s=0;s<a.length;s++){var c=a[s];o+=(c===`X`?10:+c)*(8-s)}return o%11==0}t.exports=e.default,t.exports.default=e.default})),Y3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.iso7064Check=t,e.luhnCheck=n,e.reverseMultiplyAndSum=r,e.verhoeffCheck=i;function t(e){for(var t=10,n=0;n<e.length-1;n++)t=(parseInt(e[n],10)+t)%10==0?20%11:(parseInt(e[n],10)+t)%10*2%11;return t=t===1?0:11-t,t===parseInt(e[10],10)}function n(e){for(var t=0,n=!1,r=e.length-1;r>=0;r--){if(n){var i=parseInt(e[r],10)*2;i>9?t+=i.toString().split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t){return e+t},0):t+=i}else t+=parseInt(e[r],10);n=!n}return t%10==0}function r(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r]*(t-r);return n}function i(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],n=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],r=e.split(``).reverse().join(``),i=0,a=0;a<r.length;a++)i=t[i][n[a%8][parseInt(r[a],10)]];return i===0}})),X3=s(((e,t)=>{function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=he;var r=s(X()),i=o(Y3()),a=s(Y4());function o(e,t){if(typeof WeakMap==`function`)var r=new WeakMap,i=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var a,o,s={__proto__:null,default:e};if(e===null||n(e)!=`object`&&typeof e!=`function`)return s;if(a=t?i:r){if(a.has(e))return a.get(e);a.set(e,s)}for(var c in e)c!=="default"&&{}.hasOwnProperty.call(e,c)&&((o=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(o.get||o.set)?a(s,c,o):s[c]=e[c]);return s})(e,t)}function s(e){return e&&e.__esModule?e:{default:e}}function c(e){return f(e)||d(e)||u(e)||l()}function l(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
93
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(e,t){if(e){if(typeof e==`string`)return p(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function d(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function f(e){if(Array.isArray(e))return p(e)}function p(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e){var t=e.slice(0,2),n=parseInt(e.slice(2,4),10);n>40?(n-=40,t=`20${t}`):n>20?(n-=20,t=`18${t}`):t=`19${t}`,n<10&&(n=`0${n}`);var r=`${t}/${n}/${e.slice(4,6)}`;if(!(0,a.default)(r,`YYYY/MM/DD`))return!1;for(var i=e.split(``).map(function(e){return parseInt(e,10)}),o=[2,4,8,5,10,9,7,3,6],s=0,c=0;c<o.length;c++)s+=i[c]*o[c];return s=s%11==10?0:s%11,s===i[9]}function h(e){var t=e.split(``),n=t.filter(function(e,t){return t%2}).map(function(e){return Number(e)*2}).join(``).split(``);return t.filter(function(e,t){return!(t%2)}).concat(n).map(function(e){return Number(e)}).reduce(function(e,t){return e+t})%10==0}function g(e){e=e.replace(/\W/,``);var t=parseInt(e.slice(0,2),10);if(e.length===10)t=t<54?`20${t}`:`19${t}`;else{if(e.slice(6)===`000`)return!1;if(t<54)t=`19${t}`;else return!1}t.length===3&&(t=[t.slice(0,2),`0`,t.slice(2)].join(``));var n=parseInt(e.slice(2,4),10);if(n>50&&(n-=50),n>20){if(parseInt(t,10)<2004)return!1;n-=20}n<10&&(n=`0${n}`);var r=`${t}/${n}/${e.slice(4,6)}`;if(!(0,a.default)(r,`YYYY/MM/DD`))return!1;if(e.length===10&&parseInt(e,10)%11!=0){var i=parseInt(e.slice(0,9),10)%11;if(parseInt(t,10)<1986&&i===10){if(parseInt(e.slice(9),10)!==0)return!1}else return!1}return!0}function _(e){return i.luhnCheck(e)}function v(e){for(var t=e.split(``).map(function(e){return parseInt(e,10)}),n=[],r=0;r<t.length-1;r++){n.push(``);for(var a=0;a<t.length-1;a++)t[r]===t[a]&&(n[r]+=a)}if(n=n.filter(function(e){return e.length>1}),n.length!==2&&n.length!==3)return!1;if(n[0].length===3){for(var o=n[0].split(``).map(function(e){return parseInt(e,10)}),s=0,c=0;c<o.length-1;c++)o[c]+1===o[c+1]&&(s+=1);if(s===2)return!1}return i.iso7064Check(e)}function y(e){e=e.replace(/\W/,``);var t=parseInt(e.slice(4,6),10);switch(e.slice(6,7)){case`0`:case`1`:case`2`:case`3`:t=`19${t}`;break;case`4`:case`9`:t=t<37?`20${t}`:`19${t}`;break;default:if(t<37)t=`20${t}`;else if(t>58)t=`18${t}`;else return!1;break}t.length===3&&(t=[t.slice(0,2),`0`,t.slice(2)].join(``));var n=`${t}/${e.slice(2,4)}/${e.slice(0,2)}`;if(!(0,a.default)(n,`YYYY/MM/DD`))return!1;for(var r=e.split(``).map(function(e){return parseInt(e,10)}),i=0,o=4,s=0;s<9;s++)i+=r[s]*o,--o,o===1&&(o=7);return i%=11,i===1?!1:i===0?r[9]===0:r[9]===11-i}function b(e){for(var t=e.slice(0,8).split(``).map(function(e){return parseInt(e,10)}),n=0,r=1;r<t.length;r+=2)n+=t[r];for(var i=0;i<t.length;i+=2)t[i]<2?n+=1-t[i]:(n+=2*(t[i]-2)+5,t[i]>4&&(n+=2));return String.fromCharCode(n%26+65)===e.charAt(8)}function x(e){for(var t=e.split(``).map(function(e){return parseInt(e,10)}),n=0,r=0;r<8;r++)n+=t[r]*2**(8-r);return n%11%10===t[8]}function S(e){var t=i.reverseMultiplyAndSum(e.split(``).slice(0,7).map(function(e){return parseInt(e,10)}),8);return e.length===9&&e[8]!==`W`&&(t+=(e[8].charCodeAt(0)-64)*9),t%=23,t===0?e[7].toUpperCase()===`W`:e[7].toUpperCase()===String.fromCharCode(64+t)}var C={andover:[`10`,`12`],atlanta:[`60`,`67`],austin:[`50`,`53`],brookhaven:[`01`,`02`,`03`,`04`,`05`,`06`,`11`,`13`,`14`,`16`,`21`,`22`,`23`,`25`,`34`,`51`,`52`,`54`,`55`,`56`,`57`,`58`,`59`,`65`],cincinnati:[`30`,`32`,`35`,`36`,`37`,`38`,`61`],fresno:[`15`,`24`],internet:[`20`,`26`,`27`,`45`,`46`,`47`],kansas:[`40`,`44`],memphis:[`94`,`95`],ogden:[`80`,`90`],philadelphia:`33.39.41.42.43.46.48.62.63.64.66.68.71.72.73.74.75.76.77.81.82.83.84.85.86.87.88.91.92.93.98.99`.split(`.`),sba:[`31`]};function w(){var e=[];for(var t in C)C.hasOwnProperty(t)&&e.push.apply(e,c(C[t]));return e}function T(e){return w().indexOf(e.slice(0,2))!==-1}function E(e){for(var t=0,n=e.split(``),r=parseInt(n.pop(),10),i=0;i<n.length;i++)t+=n[9-i]*(2+i%6);var a=11-t%11;return a===11?a=0:a===10&&(a=9),r===a}function D(e){var t=e.toUpperCase().split(``);if(isNaN(parseInt(t[0],10))&&t.length>1){var n=0;switch(t[0]){case`Y`:n=1;break;case`Z`:n=2;break;default:}t.splice(0,1,n)}else for(;t.length<9;)t.unshift(0);var r=[`T`,`R`,`W`,`A`,`G`,`M`,`Y`,`F`,`P`,`D`,`X`,`B`,`N`,`J`,`Z`,`S`,`Q`,`V`,`H`,`L`,`C`,`K`,`E`];t=t.join(``);var i=parseInt(t.slice(0,8),10)%23;return t[8]===r[i]}function O(e){var t=e.slice(1,3);switch(e.slice(0,1)){case`1`:case`2`:t=`18${t}`;break;case`3`:case`4`:t=`19${t}`;break;default:t=`20${t}`;break}var n=`${t}/${e.slice(3,5)}/${e.slice(5,7)}`;if(!(0,a.default)(n,`YYYY/MM/DD`))return!1;for(var r=e.split(``).map(function(e){return parseInt(e,10)}),i=0,o=1,s=0;s<10;s++)i+=r[s]*o,o+=1,o===10&&(o=1);if(i%11==10){i=0,o=3;for(var c=0;c<10;c++)i+=r[c]*o,o+=1,o===10&&(o=1);if(i%11==10)return r[10]===0}return i%11===r[10]}function k(e){var t=e.slice(4,6);switch(e.slice(6,7)){case`+`:t=`18${t}`;break;case`-`:t=`19${t}`;break;default:t=`20${t}`;break}var n=`${t}/${e.slice(2,4)}/${e.slice(0,2)}`;if(!(0,a.default)(n,`YYYY/MM/DD`))return!1;var r=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;return r<10?r===parseInt(e.slice(10),10):(r-=10,[`A`,`B`,`C`,`D`,`E`,`F`,`H`,`J`,`K`,`L`,`M`,`N`,`P`,`R`,`S`,`T`,`U`,`V`,`W`,`X`,`Y`][r]===e.slice(10))}function A(e){if(e.slice(2,4)!==`00`||e.slice(4,6)!==`00`){var t=`${e.slice(0,2)}/${e.slice(2,4)}/${e.slice(4,6)}`;if(!(0,a.default)(t,`YY/MM/DD`))return!1}var n=97-parseInt(e.slice(0,9),10)%97,r=parseInt(e.slice(9,11),10);return!(n!==r&&(n=97-parseInt(`2${e.slice(0,9)}`,10)%97,n!==r))}function j(e){return e=e.replace(/\s/g,``),parseInt(e.slice(0,10),10)%511===parseInt(e.slice(10,13),10)}function M(e){var t=`${e.slice(0,4)}/${e.slice(4,6)}/${e.slice(6,8)}`;return!(0,a.default)(t,`YYYY/MM/DD`)||!i.luhnCheck(e.slice(0,12))?!1:i.verhoeffCheck(`${e.slice(0,11)}${e[12]}`)}function N(e){return i.iso7064Check(e)}function ee(e){for(var t=e.split(``).map(function(e){return parseInt(e,10)}),n=8,r=1;r<9;r++)n+=t[r]*(r+1);return n%11===t[9]}function te(e){for(var t=!1,n=!1,r=0;r<3;r++)if(!t&&/[AEIOU]/.test(e[r]))t=!0;else if(!n&&t&&e[r]===`X`)n=!0;else if(r>0&&(t&&!n&&!/[AEIOU]/.test(e[r])||n&&!/X/.test(e[r])))return!1;return!0}function P(e){var t=e.toUpperCase().split(``);if(!te(t.slice(0,3))||!te(t.slice(3,6)))return!1;for(var n=[6,7,9,10,12,13,14],r={L:`0`,M:`1`,N:`2`,P:`3`,Q:`4`,R:`5`,S:`6`,T:`7`,U:`8`,V:`9`},i=0,o=n;i<o.length;i++){var s=o[i];t[s]in r&&t.splice(s,1,r[t[s]])}var c={A:`01`,B:`02`,C:`03`,D:`04`,E:`05`,H:`06`,L:`07`,M:`08`,P:`09`,R:`10`,S:`11`,T:`12`}[t[8]],l=parseInt(t[9]+t[10],10);l>40&&(l-=40),l<10&&(l=`0${l}`);var u=`${t[6]}${t[7]}/${c}/${l}`;if(!(0,a.default)(u,`YY/MM/DD`))return!1;for(var d=0,f=1;f<t.length-1;f+=2){var p=parseInt(t[f],10);isNaN(p)&&(p=t[f].charCodeAt(0)-65),d+=p}for(var m={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},h=0;h<t.length-1;h+=2){var g=0;if(t[h]in m)g=m[t[h]];else{var _=parseInt(t[h],10);g=2*_+1,_>4&&(g+=2)}d+=g}return String.fromCharCode(65+d%26)===t[15]}function F(e){e=e.replace(/\W/,``);var t=e.slice(0,2);if(t!==`32`){if(e.slice(2,4)!==`00`){var n=e.slice(4,6);switch(e[6]){case`0`:n=`18${n}`;break;case`1`:n=`19${n}`;break;default:n=`20${n}`;break}var r=`${n}/${e.slice(2,4)}/${t}`;if(!(0,a.default)(r,`YYYY/MM/DD`))return!1}for(var i=1101,o=[1,6,3,7,9,10,5,8,4,2],s=0;s<e.length-1;s++)i-=parseInt(e[s],10)*o[s];return parseInt(e[10],10)===i%11}return!0}function ne(e){if(e.length!==9){for(var t=e.toUpperCase().split(``);t.length<8;)t.unshift(0);switch(e[7]){case`A`:case`P`:if(parseInt(t[6],10)===0)return!1;break;default:var n=parseInt(t.join(``).slice(0,5),10);if(n>32e3||n===parseInt(t.join(``).slice(5,7),10))return!1}}return!0}function re(e){return i.reverseMultiplyAndSum(e.split(``).slice(0,8).map(function(e){return parseInt(e,10)}),9)%11===parseInt(e[8],10)}function ie(e){if(e.length===10){for(var t=[6,5,7,2,3,4,5,6,7],n=0,r=0;r<t.length;r++)n+=parseInt(e[r],10)*t[r];return n%=11,n===10?!1:n===parseInt(e[9],10)}var i=e.slice(0,2),o=parseInt(e.slice(2,4),10);o>80?(i=`18${i}`,o-=80):o>60?(i=`22${i}`,o-=60):o>40?(i=`21${i}`,o-=40):o>20?(i=`20${i}`,o-=20):i=`19${i}`,o<10&&(o=`0${o}`);var s=`${i}/${o}/${e.slice(4,6)}`;if(!(0,a.default)(s,`YYYY/MM/DD`))return!1;for(var c=0,l=1,u=0;u<e.length-1;u++)c+=parseInt(e[u],10)*l%10,l+=2,l>10?l=1:l===5&&(l+=2);return c=10-c%10,c===parseInt(e[10],10)}function ae(e){if(e.length===11){var t=0,n;if(e===`11111111111`||e===`22222222222`||e===`33333333333`||e===`44444444444`||e===`55555555555`||e===`66666666666`||e===`77777777777`||e===`88888888888`||e===`99999999999`||e===`00000000000`)return!1;for(var r=1;r<=9;r++)t+=parseInt(e.substring(r-1,r),10)*(11-r);if(n=t*10%11,n===10&&(n=0),n!==parseInt(e.substring(9,10),10))return!1;t=0;for(var i=1;i<=10;i++)t+=parseInt(e.substring(i-1,i),10)*(12-i);return n=t*10%11,n===10&&(n=0),n===parseInt(e.substring(10,11),10)}if(e===`00000000000000`||e===`11111111111111`||e===`22222222222222`||e===`33333333333333`||e===`44444444444444`||e===`55555555555555`||e===`66666666666666`||e===`77777777777777`||e===`88888888888888`||e===`99999999999999`)return!1;for(var a=e.length-2,o=e.substring(0,a),s=e.substring(a),c=0,l=a-7,u=a;u>=1;u--)c+=o.charAt(a-u)*l,--l,l<2&&(l=9);var d=c%11<2?0:11-c%11;if(d!==parseInt(s.charAt(0),10))return!1;a+=1,o=e.substring(0,a),c=0,l=a-7;for(var f=a;f>=1;f--)c+=o.charAt(a-f)*l,--l,l<2&&(l=9);return d=c%11<2?0:11-c%11,d===parseInt(s.charAt(1),10)}function oe(e){var t=11-i.reverseMultiplyAndSum(e.split(``).slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return t>9?parseInt(e[8],10)===0:t===parseInt(e[8],10)}function I(e){if(e.slice(0,4)!==`9000`){var t=e.slice(1,3);switch(e[0]){case`1`:case`2`:t=`19${t}`;break;case`3`:case`4`:t=`18${t}`;break;case`5`:case`6`:t=`20${t}`;break;default:}var n=`${t}/${e.slice(3,5)}/${e.slice(5,7)}`;if(n.length===8){if(!(0,a.default)(n,`YY/MM/DD`))return!1}else if(!(0,a.default)(n,`YYYY/MM/DD`))return!1;for(var r=e.split(``).map(function(e){return parseInt(e,10)}),i=[2,7,9,1,4,6,3,5,8,2,7,9],o=0,s=0;s<i.length;s++)o+=r[s]*i[s];return o%11==10?r[12]===1:r[12]===o%11}return!0}function se(e){if(e.length===9){if(e=e.replace(/\W/,``),e.slice(6)===`000`)return!1;var t=parseInt(e.slice(0,2),10);if(t>53)return!1;t=t<10?`190${t}`:`19${t}`;var n=parseInt(e.slice(2,4),10);n>50&&(n-=50),n<10&&(n=`0${n}`);var r=`${t}/${n}/${e.slice(4,6)}`;if(!(0,a.default)(r,`YYYY/MM/DD`))return!1}return!0}function ce(e){var t=11-i.reverseMultiplyAndSum(e.split(``).slice(0,7).map(function(e){return parseInt(e,10)}),8)%11;return t===10?parseInt(e[7],10)===0:t===parseInt(e[7],10)}function le(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var n=``,r=t.slice(2,4),o=parseInt(t.slice(4,6),10);if(e.length>11)n=e.slice(0,4);else if(n=e.slice(0,2),e.length===11&&o<60){var s=new Date().getFullYear().toString(),c=parseInt(s.slice(0,2),10);if(s=parseInt(s,10),e[6]===`-`)n=parseInt(`${c}${n}`,10)>s?`${c-1}${n}`:`${c}${n}`;else if(n=`${c-1}${n}`,s-parseInt(n,10)<100)return!1}o>60&&(o-=60),o<10&&(o=`0${o}`);var l=`${n}/${r}/${o}`;if(l.length===8){if(!(0,a.default)(l,`YY/MM/DD`))return!1}else if(!(0,a.default)(l,`YYYY/MM/DD`))return!1;return i.luhnCheck(e.replace(/\W/,``))}function ue(e){for(var t=e.split(``).map(function(e){return parseInt(e,10)}),n=[-1,5,7,9,4,6,10,5,7],r=0,i=0;i<n.length;i++)r+=t[i]*n[i];return r%11==10?t[9]===0:t[9]===r%11}var de={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-AR":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,"uk-UA":/^\d{10}$/};de[`lb-LU`]=de[`fr-LU`],de[`lt-LT`]=de[`et-EE`],de[`nl-BE`]=de[`fr-BE`],de[`fr-CA`]=de[`en-CA`];var fe={"bg-BG":m,"cs-CZ":g,"de-AT":_,"de-DE":v,"dk-DK":y,"el-CY":b,"el-GR":x,"en-CA":h,"en-IE":S,"en-US":T,"es-AR":E,"es-ES":D,"et-EE":O,"fi-FI":k,"fr-BE":A,"fr-FR":j,"fr-LU":M,"hr-HR":N,"hu-HU":ee,"it-IT":P,"lv-LV":F,"mt-MT":ne,"nl-NL":re,"pl-PL":ie,"pt-BR":ae,"pt-PT":oe,"ro-RO":I,"sk-SK":se,"sl-SI":ce,"sv-SE":le,"uk-UA":ue};fe[`lb-LU`]=fe[`fr-LU`],fe[`lt-LT`]=fe[`et-EE`],fe[`nl-BE`]=fe[`fr-BE`],fe[`fr-CA`]=fe[`en-CA`];var pe=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,me={"de-AT":pe,"de-DE":/[\/\\]/g,"fr-BE":pe};me[`nl-BE`]=me[`fr-BE`];function he(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`en-US`;(0,r.default)(e);var n=e.slice(0);if(t in de)return t in me&&(n=n.replace(me[t],``)),de[t].test(n)?t in fe?fe[t](n):!0:!1;throw Error(`Invalid locale '${t}'`)}t.exports=e.default,t.exports.default=e.default})),Z3=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.locales=void 0;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?([79][1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"ar-QA":/^(\+?974|0)?([3567]\d{7})$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|7|6|5|4)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7[1-9]\d{8}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?0[79][567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-GT":/^(\+?502)?[2|6|7]\d{7}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+?244)?9\d{8}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[2-9]\d{7}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/,"mk-MK":/^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/};r[`en-CA`]=r[`en-US`],r[`fr-CA`]=r[`en-CA`],r[`fr-BE`]=r[`nl-BE`],r[`zh-HK`]=r[`en-HK`],r[`zh-MO`]=r[`en-MO`],r[`ga-IE`]=r[`en-IE`],r[`fr-CH`]=r[`de-CH`],r[`it-CH`]=r[`fr-CH`];function i(e,n,i){if((0,t.default)(e),i&&i.strictMode&&!e.startsWith(`+`))return!1;if(Array.isArray(n))return n.some(function(t){return!!(r.hasOwnProperty(t)&&r[t].test(e))});if(n in r)return r[n].test(e);if(!n||n===`any`){for(var a in r)if(r.hasOwnProperty(a)&&r[a].test(e))return!0;return!1}throw Error(`Invalid locale '${n}'`)}e.locales=Object.keys(r)})),Q3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(0x)[0-9a-f]{40}$/i;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),$3=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=i(L4()),r=i(X());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=`\\d{${e.digits_after_decimal[0]}}`;e.digits_after_decimal.forEach(function(e,n){n!==0&&(t=`${t}|\\d{${e}}`)});var n=`(${e.symbol.replace(/\W/,function(e){return`\\${e}`})})${e.require_symbol?``:`?`}`,r=`-?`,i=`(${[`0`,`[1-9]\\d*`,`[1-9]\\d{0,2}(\\${e.thousands_separator}\\d{3})*`].join(`|`)})?`,a=`(\\${e.decimal_separator}(${t}))${e.require_decimal?``:`?`}`,o=i+(e.allow_decimal||e.require_decimal?a:``);return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?o+=r:e.negative_sign_before_digits&&(o=r+o)),e.allow_negative_sign_placeholder?o=`( (?!\\-))?${o}`:e.allow_space_after_symbol?o=` ?${o}`:e.allow_space_after_digits&&(o+=`( (?!$))?`),e.symbol_after_digits?o+=n:o=n+o,e.allow_negatives&&(e.parens_for_negatives?o=`(\\(${o}\\)|${o})`:e.negative_sign_before_digits||e.negative_sign_after_digits||(o=r+o)),RegExp(`^(?!-? )(?=.*\\d)${o}\$`)}var o={symbol:`$`,require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:`,`,decimal_separator:`.`,allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};function s(e,t){return(0,r.default)(e),t=(0,n.default)(t,o),a(t).test(e)}t.exports=e.default,t.exports.default=e.default})),e6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/,a=/^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/;function o(e){return(0,n.default)(e),i.test(e)||a.test(e)}t.exports=e.default,t.exports.default=e.default})),t6=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isFreightContainerID=void 0,e.isISO6346=a;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,i=/^[0-9]$/;function a(e){if((0,t.default)(e),e=e.toUpperCase(),!r.test(e))return!1;if(e.length===11){for(var n=0,a=0;a<e.length-1;a++)if(i.test(e[a]))n+=e[a]*2**a;else{var o=void 0,s=e.charCodeAt(a)-55;o=s<11?s:s>=11&&s<=20?12+s%11:s>=21&&s<=30?23+s%21:34+s%31,n+=o*2**a}var c=n%11;return c===10&&(c=0),Number(e[e.length-1])===c}return!0}e.isFreightContainerID=a})),n6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=new Set(`aa.ab.ae.af.ak.am.an.ar.as.av.ay.az.az.ba.be.bg.bh.bi.bm.bn.bo.br.bs.ca.ce.ch.co.cr.cs.cu.cv.cy.da.de.dv.dz.ee.el.en.eo.es.et.eu.fa.ff.fi.fj.fo.fr.fy.ga.gd.gl.gn.gu.gv.ha.he.hi.ho.hr.ht.hu.hy.hz.ia.id.ie.ig.ii.ik.io.is.it.iu.ja.jv.ka.kg.ki.kj.kk.kl.km.kn.ko.kr.ks.ku.kv.kw.ky.la.lb.lg.li.ln.lo.lt.lu.lv.mg.mh.mi.mk.ml.mn.mr.ms.mt.my.na.nb.nd.ne.ng.nl.nn.no.nr.nv.ny.oc.oj.om.or.os.pa.pi.pl.ps.pt.qu.rm.rn.ro.ru.rw.sa.sc.sd.se.sg.si.sk.sl.sm.sn.so.sq.sr.ss.st.su.sv.sw.ta.te.tg.th.ti.tk.tl.tn.to.tr.ts.tt.tw.ty.ug.uk.ur.uz.ve.vi.vo.wa.wo.xh.yi.yo.za.zh.zu`.split(`.`));function a(e){return(0,n.default)(e),i.has(e)}t.exports=e.default,t.exports.default=e.default})),r6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,a=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,o=function(e){var t=e.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(t){var n=Number(t[1]),r=Number(t[2]);return n%4==0&&n%100!=0||n%400==0?r<=366:r<=365}var i=e.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),a=i[1],o=i[2],s=i[3],c=o&&`0${o}`.slice(-2),l=s&&`0${s}`.slice(-2),u=new Date(`${a}-${c||`01`}-${l||`01`}`);return o&&s?u.getUTCFullYear()===a&&u.getUTCMonth()+1===o&&u.getUTCDate()===s:!0};function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(e);var r=t.strictSeparator?a.test(e):i.test(e);return r&&t.strict?o(e):r}t.exports=e.default,t.exports.default=e.default})),i6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/[0-9]{4}/,a=/(0[1-9]|1[0-2])/,o=/([12]\d|0[1-9]|3[01])/,s=/([01][0-9]|2[0-3])/,c=/[0-5][0-9]/,l=/([0-5][0-9]|60)/,u=/(\.[0-9]+)?/,d=RegExp(`[-+]${s.source}:${c.source}`),f=RegExp(`([zZ]|${d.source})`),p=RegExp(`${s.source}:${c.source}:${l.source}${u.source}`),m=RegExp(`${i.source}-${a.source}-${o.source}`),h=RegExp(`${p.source}${f.source}`),g=RegExp(`^${m.source}[ tT]${h.source}\$`);function _(e){return(0,n.default)(e),g.test(e)}t.exports=e.default,t.exports.default=e.default})),a6=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptCodes=void 0,e.default=i;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=new Set(`Adlm.Afak.Aghb.Ahom.Arab.Aran.Armi.Armn.Avst.Bali.Bamu.Bass.Batk.Beng.Bhks.Blis.Bopo.Brah.Brai.Bugi.Buhd.Cakm.Cans.Cari.Cham.Cher.Chis.Chrs.Cirt.Copt.Cpmn.Cprt.Cyrl.Cyrs.Deva.Diak.Dogr.Dsrt.Dupl.Egyd.Egyh.Egyp.Elba.Elym.Ethi.Gara.Geok.Geor.Glag.Gong.Gonm.Goth.Gran.Grek.Gujr.Gukh.Guru.Hanb.Hang.Hani.Hano.Hans.Hant.Hatr.Hebr.Hira.Hluw.Hmng.Hmnp.Hrkt.Hung.Inds.Ital.Jamo.Java.Jpan.Jurc.Kali.Kana.Kawi.Khar.Khmr.Khoj.Kitl.Kits.Knda.Kore.Kpel.Krai.Kthi.Lana.Laoo.Latf.Latg.Latn.Leke.Lepc.Limb.Lina.Linb.Lisu.Loma.Lyci.Lydi.Mahj.Maka.Mand.Mani.Marc.Maya.Medf.Mend.Merc.Mero.Mlym.Modi.Mong.Moon.Mroo.Mtei.Mult.Mymr.Nagm.Nand.Narb.Nbat.Newa.Nkdb.Nkgb.Nkoo.Nshu.Ogam.Olck.Onao.Orkh.Orya.Osge.Osma.Ougr.Palm.Pauc.Pcun.Pelm.Perm.Phag.Phli.Phlp.Phlv.Phnx.Plrd.Piqd.Prti.Psin.Qaaa.Qaab.Qaac.Qaad.Qaae.Qaaf.Qaag.Qaah.Qaai.Qaaj.Qaak.Qaal.Qaam.Qaan.Qaao.Qaap.Qaaq.Qaar.Qaas.Qaat.Qaau.Qaav.Qaaw.Qaax.Qaay.Qaaz.Qaba.Qabb.Qabc.Qabd.Qabe.Qabf.Qabg.Qabh.Qabi.Qabj.Qabk.Qabl.Qabm.Qabn.Qabo.Qabp.Qabq.Qabr.Qabs.Qabt.Qabu.Qabv.Qabw.Qabx.Ranj.Rjng.Rohg.Roro.Runr.Samr.Sara.Sarb.Saur.Sgnw.Shaw.Shrd.Shui.Sidd.Sidt.Sind.Sinh.Sogd.Sogo.Sora.Soyo.Sund.Sunu.Sylo.Syrc.Syre.Syrj.Syrn.Tagb.Takr.Tale.Talu.Taml.Tang.Tavt.Tayo.Telu.Teng.Tfng.Tglg.Thaa.Thai.Tibt.Tirh.Tnsa.Todr.Tols.Toto.Tutg.Ugar.Vaii.Visp.Vith.Wara.Wcho.Wole.Xpeo.Xsux.Yezi.Yiii.Zanb.Zinh.Zmth.Zsye.Zsym.Zxxx.Zyyy.Zzzz`.split(`.`));function i(e){return(0,t.default)(e),r.has(e)}e.ScriptCodes=r})),o6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=new Set(`AFG.ALA.ALB.DZA.ASM.AND.AGO.AIA.ATA.ATG.ARG.ARM.ABW.AUS.AUT.AZE.BHS.BHR.BGD.BRB.BLR.BEL.BLZ.BEN.BMU.BTN.BOL.BES.BIH.BWA.BVT.BRA.IOT.BRN.BGR.BFA.BDI.KHM.CMR.CAN.CPV.CYM.CAF.TCD.CHL.CHN.CXR.CCK.COL.COM.COG.COD.COK.CRI.CIV.HRV.CUB.CUW.CYP.CZE.DNK.DJI.DMA.DOM.ECU.EGY.SLV.GNQ.ERI.EST.ETH.FLK.FRO.FJI.FIN.FRA.GUF.PYF.ATF.GAB.GMB.GEO.DEU.GHA.GIB.GRC.GRL.GRD.GLP.GUM.GTM.GGY.GIN.GNB.GUY.HTI.HMD.VAT.HND.HKG.HUN.ISL.IND.IDN.IRN.IRQ.IRL.IMN.ISR.ITA.JAM.JPN.JEY.JOR.KAZ.KEN.KIR.PRK.KOR.KWT.KGZ.LAO.LVA.LBN.LSO.LBR.LBY.LIE.LTU.LUX.MAC.MKD.MDG.MWI.MYS.MDV.MLI.MLT.MHL.MTQ.MRT.MUS.MYT.MEX.FSM.MDA.MCO.MNG.MNE.MSR.MAR.MOZ.MMR.NAM.NRU.NPL.NLD.NCL.NZL.NIC.NER.NGA.NIU.NFK.MNP.NOR.OMN.PAK.PLW.PSE.PAN.PNG.PRY.PER.PHL.PCN.POL.PRT.PRI.QAT.REU.ROU.RUS.RWA.BLM.SHN.KNA.LCA.MAF.SPM.VCT.WSM.SMR.STP.SAU.SEN.SRB.SYC.SLE.SGP.SXM.SVK.SVN.SLB.SOM.ZAF.SGS.SSD.ESP.LKA.SDN.SUR.SJM.SWZ.SWE.CHE.SYR.TWN.TJK.TZA.THA.TLS.TGO.TKL.TON.TTO.TUN.TUR.TKM.TCA.TUV.UGA.UKR.ARE.GBR.USA.UMI.URY.UZB.VUT.VEN.VNM.VGB.VIR.WLF.ESH.YEM.ZMB.ZWE`.split(`.`));function a(e){return(0,n.default)(e),i.has(e.toUpperCase())}t.exports=e.default,t.exports.default=e.default})),s6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=new Set(`004.008.010.012.016.020.024.028.031.032.036.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.175.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.535.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.826.831.832.833.834.840.850.854.858.860.862.876.882.887.894`.split(`.`));function a(e){return(0,n.default)(e),i.has(e)}t.exports=e.default,t.exports.default=e.default})),c6=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CurrencyCodes=void 0,e.default=i;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=new Set(`AED.AFN.ALL.AMD.ANG.AOA.ARS.AUD.AWG.AZN.BAM.BBD.BDT.BGN.BHD.BIF.BMD.BND.BOB.BOV.BRL.BSD.BTN.BWP.BYN.BZD.CAD.CDF.CHE.CHF.CHW.CLF.CLP.CNY.COP.COU.CRC.CUP.CVE.CZK.DJF.DKK.DOP.DZD.EGP.ERN.ETB.EUR.FJD.FKP.GBP.GEL.GHS.GIP.GMD.GNF.GTQ.GYD.HKD.HNL.HTG.HUF.IDR.ILS.INR.IQD.IRR.ISK.JMD.JOD.JPY.KES.KGS.KHR.KMF.KPW.KRW.KWD.KYD.KZT.LAK.LBP.LKR.LRD.LSL.LYD.MAD.MDL.MGA.MKD.MMK.MNT.MOP.MRU.MUR.MVR.MWK.MXN.MXV.MYR.MZN.NAD.NGN.NIO.NOK.NPR.NZD.OMR.PAB.PEN.PGK.PHP.PKR.PLN.PYG.QAR.RON.RSD.RUB.RWF.SAR.SBD.SCR.SDG.SEK.SGD.SHP.SLE.SLL.SOS.SRD.SSP.STN.SVC.SYP.SZL.THB.TJS.TMT.TND.TOP.TRY.TTD.TWD.TZS.UAH.UGX.USD.USN.UYI.UYU.UYW.UZS.VED.VES.VND.VUV.WST.XAF.XAG.XAU.XBA.XBB.XBC.XBD.XCD.XDR.XOF.XPD.XPF.XPT.XSU.XTS.XUA.XXX.YER.ZAR.ZMW.ZWL`.split(`.`));function i(e){return(0,t.default)(e),r.has(e.toUpperCase())}e.CurrencyCodes=r})),l6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=i(X()),r=i(L4());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Z2-7]+=*$/,o=/^[A-HJKMNP-TV-Z0-9]+$/,s={crockford:!1};function c(e,t){return(0,n.default)(e),t=(0,r.default)(t,s),t.crockford?o.test(e):!!(e.length%8==0&&a.test(e))}t.exports=e.default,t.exports.default=e.default})),u6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-HJ-NP-Za-km-z1-9]*$/;function a(e){return(0,n.default)(e),!!i.test(e)}t.exports=e.default,t.exports.default=e.default})),d6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[a-z]+\/[a-z0-9\-\+\._]+$/i,a=/^[a-z\-]+=[a-z0-9\-]+$/i,o=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;function s(e){(0,n.default)(e);var t=e.split(`,`);if(t.length<2)return!1;var r=t.shift().trim().split(`;`),s=r.shift();if(s.slice(0,5)!==`data:`)return!1;var c=s.slice(5);if(c!==``&&!i.test(c))return!1;for(var l=0;l<r.length;l++)if(!(l===r.length-1&&r[l].toLowerCase()===`base64`)&&!a.test(r[l]))return!1;for(var u=0;u<t.length;u++)if(!o.test(t[u]))return!1;return!0}t.exports=e.default,t.exports.default=e.default})),f6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;function a(e){return(0,n.default)(e),e.indexOf(`magnet:?`)===0?i.test(e):!1}t.exports=e.default,t.exports.default=e.default})),p6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if((0,n.default)(e),t){var r=RegExp(`[${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}]+\$`,`g`);return e.replace(r,``)}for(var i=e.length-1;/\s/.test(e.charAt(i));)--i;return e.slice(0,i+1)}t.exports=e.default,t.exports.default=e.default})),m6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,n.default)(e);var r=t?RegExp(`^[${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}]+`,`g`):/^\s+/g;return e.replace(r,``)}t.exports=e.default,t.exports.default=e.default})),h6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=i(p6()),r=i(m6());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return(0,n.default)((0,r.default)(e,t),t)}t.exports=e.default,t.exports.default=e.default})),g6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=m;var n=a(h6()),r=a(W4()),i=a(X());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return l(e)||c(e,t)||d(e,t)||s()}function s(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function l(e){if(Array.isArray(e))return e}function u(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function d(e,t){if(e){if(typeof e==`string`)return f(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){var t=new Set([`subject`,`body`,`cc`,`bcc`]),n={cc:``,bcc:``},r=!1,i=e.split(`&`);if(i.length>4)return!1;var a=u(i),s;try{for(a.s();!(s=a.n()).done;){var c=o(s.value.split(`=`),2),l=c[0],d=c[1];if(l&&!t.has(l)){r=!0;break}d&&(l===`cc`||l===`bcc`)&&(n[l]=d),l&&t.delete(l)}}catch(e){a.e(e)}finally{a.f()}return r?!1:n}function m(e,t){if((0,i.default)(e),e.indexOf(`mailto:`)!==0)return!1;var a=o(e.replace(`mailto:`,``).split(`?`),2),s=a[0],c=a[1],l=c===void 0?``:c;if(!s&&!l)return!0;var u=p(l);return u?`${s},${u.cc},${u.bcc}`.split(`,`).every(function(e){return e=(0,n.default)(e,` `),e?(0,r.default)(e,t):!0}):!1}t.exports=e.default,t.exports.default=e.default})),_6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,a=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,o=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;function s(e){return(0,n.default)(e),i.test(e)||a.test(e)||o.test(e)}t.exports=e.default,t.exports.default=e.default})),v6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var n=a(X()),r=a(L4()),i=a(G4());function a(e){return e&&e.__esModule?e:{default:e}}var o=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,s=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,c=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,l=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,u={checkDMS:!1};function d(e,t){if((0,n.default)(e),t=(0,r.default)(t,u),!(0,i.default)(e,`,`))return!1;var a=e.split(`,`);return a[0].startsWith(`(`)&&!a[1].endsWith(`)`)||a[1].endsWith(`)`)&&!a[0].startsWith(`(`)?!1:t.checkDMS?c.test(a[0])&&l.test(a[1]):o.test(a[0])&&s.test(a[1])}t.exports=e.default,t.exports.default=e.default})),y6=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=c,e.locales=void 0;var t=n(X());function n(e){return e&&e.__esModule?e:{default:e}}var r=/^\d{3}$/,i=/^\d{4}$/,a=/^\d{5}$/,o=/^\d{6}$/,s={AD:/^AD\d{3}$/,AT:i,AU:i,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:i,BG:i,BR:/^\d{5}-?\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:i,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/,CZ:/^\d{3}\s?\d{2}$/,DE:a,DK:i,DO:a,DZ:a,EE:a,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:a,FR:/^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:i,ID:a,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:r,IT:a,JP:/^\d{3}\-\d{4}$/,KE:a,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:i,LV:/^LV\-\d{4}$/,LK:a,MG:r,MX:a,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:a,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:i,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:i,PK:a,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:o,RU:o,SA:a,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:o,SI:i,SK:/^\d{3}\s?\d{2}$/,TH:a,TN:i,TW:/^\d{3}(\d{2,3})?$/,UA:a,US:/^\d{5}(-\d{4})?$/,ZA:i,ZM:a};e.locales=Object.keys(s);function c(e,n){if((0,t.default)(e),n in s)return s[n].test(e);if(n===`any`){for(var r in s)if(s.hasOwnProperty(r)&&s[r].test(e))return!0;return!1}throw Error(`Invalid locale '${n}'`)}})),b6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`).replace(/\//g,`/`).replace(/\\/g,`\`).replace(/`/g,```)}t.exports=e.default,t.exports.default=e.default})),x6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),e.replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`).replace(///g,`/`).replace(/\/g,`\\`).replace(/`/g,"`").replace(/&/g,`&`)}t.exports=e.default,t.exports.default=e.default})),S6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(0,n.default)(e),e.replace(RegExp(`[${t}]+`,`g`),``)}t.exports=e.default,t.exports.default=e.default})),C6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=i(X()),r=i(S6());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){(0,n.default)(e);var i=t?`\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F`:`\\x00-\\x1F\\x7F`;return(0,r.default)(e,i)}t.exports=e.default,t.exports.default=e.default})),w6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(0,n.default)(e),e.replace(RegExp(`[^${t}]+`,`g`),``)}t.exports=e.default,t.exports.default=e.default})),T6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,n.default)(e);for(var r=e.length-1;r>=0;r--)if(t.indexOf(e[r])===-1)return!1;return!0}t.exports=e.default,t.exports.default=e.default})),E6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var n=r(L4());function r(e){return e&&e.__esModule?e:{default:e}}var i={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,yandex_convert_yandexru:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},a=[`icloud.com`,`me.com`],o=`hotmail.at,hotmail.be,hotmail.ca,hotmail.cl,hotmail.co.il,hotmail.co.nz,hotmail.co.th,hotmail.co.uk,hotmail.com,hotmail.com.ar,hotmail.com.au,hotmail.com.br,hotmail.com.gr,hotmail.com.mx,hotmail.com.pe,hotmail.com.tr,hotmail.com.vn,hotmail.cz,hotmail.de,hotmail.dk,hotmail.es,hotmail.fr,hotmail.hu,hotmail.id,hotmail.ie,hotmail.in,hotmail.it,hotmail.jp,hotmail.kr,hotmail.lv,hotmail.my,hotmail.ph,hotmail.pt,hotmail.sa,hotmail.sg,hotmail.sk,live.be,live.co.uk,live.com,live.com.ar,live.com.mx,live.de,live.es,live.eu,live.fr,live.it,live.nl,msn.com,outlook.at,outlook.be,outlook.cl,outlook.co.il,outlook.co.nz,outlook.co.th,outlook.com,outlook.com.ar,outlook.com.au,outlook.com.br,outlook.com.gr,outlook.com.pe,outlook.com.tr,outlook.com.vn,outlook.cz,outlook.de,outlook.dk,outlook.es,outlook.fr,outlook.hu,outlook.id,outlook.ie,outlook.in,outlook.it,outlook.jp,outlook.kr,outlook.lv,outlook.my,outlook.ph,outlook.pt,outlook.sa,outlook.sg,outlook.sk,passport.com`.split(`,`),s=[`rocketmail.com`,`yahoo.ca`,`yahoo.co.uk`,`yahoo.com`,`yahoo.de`,`yahoo.fr`,`yahoo.in`,`yahoo.it`,`ymail.com`],c=[`yandex.ru`,`yandex.ua`,`yandex.kz`,`yandex.com`,`yandex.by`,`ya.ru`];function l(e){return e.length>1?e:``}function u(e,t){t=(0,n.default)(t,i);var r=e.split(`@`),u=r.pop(),d=[r.join(`@`),u];if(d[1]=d[1].toLowerCase(),d[1]===`gmail.com`||d[1]===`googlemail.com`){if(t.gmail_remove_subaddress&&(d[0]=d[0].split(`+`)[0]),t.gmail_remove_dots&&(d[0]=d[0].replace(/\.+/g,l)),!d[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.gmail_convert_googlemaildotcom?`gmail.com`:d[1]}else if(a.indexOf(d[1])>=0){if(t.icloud_remove_subaddress&&(d[0]=d[0].split(`+`)[0]),!d[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(d[0]=d[0].toLowerCase())}else if(o.indexOf(d[1])>=0){if(t.outlookdotcom_remove_subaddress&&(d[0]=d[0].split(`+`)[0]),!d[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(d[0]=d[0].toLowerCase())}else if(s.indexOf(d[1])>=0){if(t.yahoo_remove_subaddress){var f=d[0].split(`-`);d[0]=f.length>1?f.slice(0,-1).join(`-`):f[0]}if(!d[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(d[0]=d[0].toLowerCase())}else c.indexOf(d[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.yandex_convert_yandexru?`yandex.ru`:d[1]):t.all_lowercase&&(d[0]=d[0].toLowerCase());return d.join(`@`)}t.exports=e.default,t.exports.default=e.default})),D6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),O6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=r(X());function r(e){return e&&e.__esModule?e:{default:e}}var i={"cs-CZ":function(e){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e)},"de-DE":function(e){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(e)},"de-LI":function(e){return/^FL[- ]?\d{1,5}[UZ]?$/.test(e)},"en-IN":function(e){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e)},"en-SG":function(e){return/^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(e)},"es-AR":function(e){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e)},"fi-FI":function(e){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e)},"hu-HU":function(e){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(e)},"pt-BR":function(e){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e)},"pt-PT":function(e){return/^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(e)},"sq-AL":function(e){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(e)},"sv-SE":function(e){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim())},"en-PK":function(e){return/(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(e.trim())}};function a(e,t){if((0,n.default)(e),t in i)return i[t](e);if(t===`any`){for(var r in i){var a=i[r];if(a(e))return!0}return!1}throw Error(`Invalid locale '${t}'`)}t.exports=e.default,t.exports.default=e.default})),k6=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=p;var n=i(L4()),r=i(X());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Z]$/,o=/^[a-z]$/,s=/^[0-9]$/,c=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/,l={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function u(e){var t={};return Array.from(e).forEach(function(e){t[e]?t[e]+=1:t[e]=1}),t}function d(e){var t=u(e),n={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach(function(e){a.test(e)?n.uppercaseCount+=t[e]:o.test(e)?n.lowercaseCount+=t[e]:s.test(e)?n.numberCount+=t[e]:c.test(e)&&(n.symbolCount+=t[e])}),n}function f(e,t){var n=0;return n+=e.uniqueChars*t.pointsPerUnique,n+=(e.length-e.uniqueChars)*t.pointsPerRepeat,e.lowercaseCount>0&&(n+=t.pointsForContainingLower),e.uppercaseCount>0&&(n+=t.pointsForContainingUpper),e.numberCount>0&&(n+=t.pointsForContainingNumber),e.symbolCount>0&&(n+=t.pointsForContainingSymbol),n}function p(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;(0,r.default)(e);var i=d(e);return t=(0,n.default)(t||{},l),t.returnScore?f(i,t):i.length>=t.minLength&&i.lowercaseCount>=t.minLowercase&&i.uppercaseCount>=t.minUppercase&&i.numberCount>=t.minNumbers&&i.symbolCount>=t.minSymbols}t.exports=e.default,t.exports.default=e.default})),A6=s((e=>{function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.vatMatchers=void 0;var n=a(X()),r=i(Y3());function i(e,n){if(typeof WeakMap==`function`)var r=new WeakMap,a=new WeakMap;return(i=function(e,n){if(!n&&e&&e.__esModule)return e;var i,o,s={__proto__:null,default:e};if(e===null||t(e)!=`object`&&typeof e!=`function`)return s;if(i=n?a:r){if(i.has(e))return i.get(e);i.set(e,s)}for(var c in e)c!=="default"&&{}.hasOwnProperty.call(e,c)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(o.get||o.set)?i(s,c,o):s[c]=e[c]);return s})(e,n)}function a(e){return e&&e.__esModule?e:{default:e}}var o=e.vatMatchers={AT:function(e){return/^(AT)?U\d{8}$/.test(e)},BE:function(e){return/^(BE)?\d{10}$/.test(e)},BG:function(e){return/^(BG)?\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\d{11}$/.test(e)},CY:function(e){return/^(CY)?\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\d{8}$/.test(e)},EE:function(e){return/^(EE)?\d{9}$/.test(e)},FI:function(e){return/^(FI)?\d{8}$/.test(e)},FR:function(e){return/^(FR)([A-Z0-9]{2}\d{9})$/.test(e)},DE:function(e){return/^(DE)?\d{9}$/.test(e)},EL:function(e){return/^(EL)?\d{9}$/.test(e)},HU:function(e){return/^(HU)?\d{8}$/.test(e)},IE:function(e){return/^(IE)?\d{7}\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\d{11}$/.test(e)},LV:function(e){return/^(LV)?\d{11}$/.test(e)},LT:function(e){return/^(LT)?\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\d{8}$/.test(e)},MT:function(e){return/^(MT)?\d{8}$/.test(e)},NL:function(e){return/^(NL)?\d{9}B\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\d{9})$/);if(!t)return!1;var n=t[2],i=11-r.reverseMultiplyAndSum(n.split(``).slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return i>9?parseInt(n[8],10)===0:i===parseInt(n[8],10)},RO:function(e){return/^(RO)?\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\d{10}$/.test(e)},SI:function(e){return/^(SI)?\d{8}$/.test(e)},ES:function(e){return/^(ES)?\w\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\d{12}$/.test(e)},AL:function(e){return/^(AL)?\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\d{13}$/.test(e)},AU:function(e){if(!e.match(/^(AU)?(\d{11})$/))return!1;var t=[10,1,3,5,7,9,11,13,15,17,19];e=e.replace(/^AU/,``);for(var n=(parseInt(e.slice(0,1),10)-1).toString()+e.slice(1),r=0,i=0;i<11;i++)r+=t[i]*n.charAt(i);return r!==0&&r%89==0},BY:function(e){return/^(УНП )?\d{9}$/.test(e)},CA:function(e){return/^(CA)?\d{9}$/.test(e)},IS:function(e){return/^(IS)?\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\d{12}$/.test(e)},NZ:function(e){return/^(NZ)?\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(e)},RU:function(e){return/^(RU)?(\d{10}|\d{12})$/.test(e)},SM:function(e){return/^(SM)?\d{5}$/.test(e)},SA:function(e){return/^(SA)?\d{15}$/.test(e)},RS:function(e){return/^(RS)?\d{9}$/.test(e)},CH:function(e){return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(e)&&function(e){var t=e.pop(),n=[5,4,3,2,7,6,5,4];return t===(11-e.reduce(function(e,t,r){return e+t*n[r]},0)%11)%11}(e.match(/\d/g).map(function(e){return+e}))},TR:function(e){return/^(TR)?\d{10}$/.test(e)},UA:function(e){return/^(UA)?\d{12}$/.test(e)},GB:function(e){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e)},UZ:function(e){return/^(UZ)?\d{9}$/.test(e)},AR:function(e){return/^(AR)?\d{11}$/.test(e)},BO:function(e){return/^(BO)?\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\d{8}-\d{1}$/.test(e)},CO:function(e){return/^(CO)?\d{10}$/.test(e)},CR:function(e){return/^(CR)?\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\d{13}$/.test(e)},SV:function(e){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(e)},GT:function(e){return/^(GT)?\d{7}-\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(e)},NI:function(e){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\d{6,8}-\d{1}$/.test(e)},PE:function(e){return/^(PE)?\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(e)},UY:function(e){return/^(UY)?\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(e)}};function s(e,t){if((0,n.default)(e),(0,n.default)(t),t in o)return o[t](e);throw Error(`Invalid country code: '${t}'`)}})),j6=s(((e,t)=>{function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=W(O4()),i=W(M4()),a=W(N4()),o=W(P4()),s=W(F4()),c=W(R4()),l=W(z4()),u=W(W4()),d=W(K4()),f=W(q4()),p=W(U4()),m=W(J4()),h=W(H4()),g=W(Y4()),_=W(X4()),v=W(Q4()),y=W($4()),b=W(e3()),x=U(t3()),S=U(n3()),C=W(r3()),w=U(i3()),T=W(o3()),E=W(s3()),D=W(c3()),O=W(l3()),k=W(u3()),A=W(d3()),j=W(f3()),M=W(p3()),N=W(m3()),ee=W(g3()),te=W(_3()),P=W(a3()),F=U(j4()),ne=W(v3()),re=W(y3()),ie=W(b3()),ae=W(x3()),oe=W(S3()),I=W(C3()),se=W(w3()),ce=W(T3()),le=U(E3()),ue=W(O3()),de=W(k3()),fe=W(A3()),pe=W(M3()),me=W(N3()),he=W(P3()),ge=W(F3()),_e=W(V4()),ve=W(I3()),ye=W(L3()),be=W(R3()),xe=W(z3()),Se=W(B3()),Ce=W(V3()),L=W(H3()),we=W(U3()),Te=W(W3()),Ee=W(G3()),De=W(K3()),Oe=W(q3()),R=W(J3()),ke=W(X3()),Ae=U(Z3()),z=W(Q3()),je=W($3()),Me=W(e6()),Ne=t6(),Pe=W(n6()),Fe=W(r6()),B=W(i6()),Ie=W(a6()),Le=W(D3()),Re=W(o6()),ze=W(s6()),Be=W(c6()),Ve=W(l6()),He=W(u6()),Ue=W(j3()),We=W(d6()),Ge=W(f6()),Ke=W(g6()),qe=W(_6()),Je=W(v6()),Ye=U(y6()),Xe=W(m6()),Ze=W(p6()),Qe=W(h6()),$e=W(b6()),et=W(x6()),tt=W(C6()),nt=W(w6()),rt=W(S6()),V=W(T6()),H=W(E6()),it=W(D6()),at=W(O6()),ot=W(k6()),st=W(A6());function U(e,t){if(typeof WeakMap==`function`)var r=new WeakMap,i=new WeakMap;return(U=function(e,t){if(!t&&e&&e.__esModule)return e;var a,o,s={__proto__:null,default:e};if(e===null||n(e)!=`object`&&typeof e!=`function`)return s;if(a=t?i:r){if(a.has(e))return a.get(e);a.set(e,s)}for(var c in e)c!=="default"&&{}.hasOwnProperty.call(e,c)&&((o=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(o.get||o.set)?a(s,c,o):s[c]=e[c]);return s})(e,t)}function W(e){return e&&e.__esModule?e:{default:e}}e.default={version:`13.15.23`,toDate:r.default,toFloat:i.default,toInt:a.default,toBoolean:o.default,equals:s.default,contains:c.default,matches:l.default,isEmail:u.default,isURL:d.default,isMACAddress:f.default,isIP:p.default,isIPRange:m.default,isFQDN:h.default,isBoolean:v.default,isIBAN:le.default,isBIC:ue.default,isAbaRouting:b.default,isAlpha:x.default,isAlphaLocales:x.locales,isAlphanumeric:S.default,isAlphanumericLocales:S.locales,isNumeric:C.default,isPassportNumber:w.default,passportNumberLocales:w.locales,isPort:T.default,isLowercase:E.default,isUppercase:D.default,isAscii:k.default,isFullWidth:A.default,isHalfWidth:j.default,isVariableWidth:M.default,isMultibyte:N.default,isSemVer:ee.default,isSurrogatePair:te.default,isInt:P.default,isIMEI:O.default,isFloat:F.default,isFloatLocales:F.locales,isDecimal:ne.default,isHexadecimal:re.default,isOctal:ie.default,isDivisibleBy:ae.default,isHexColor:oe.default,isRgbColor:I.default,isHSL:se.default,isISRC:ce.default,isMD5:de.default,isHash:fe.default,isJWT:pe.default,isJSON:me.default,isEmpty:he.default,isLength:ge.default,isLocale:y.default,isByteLength:_e.default,isULID:ve.default,isUUID:ye.default,isMongoId:be.default,isAfter:xe.default,isBefore:Se.default,isIn:Ce.default,isLuhnNumber:L.default,isCreditCard:we.default,isIdentityCard:Te.default,isEAN:Ee.default,isISIN:De.default,isISBN:Oe.default,isISSN:R.default,isMobilePhone:Ae.default,isMobilePhoneLocales:Ae.locales,isPostalCode:Ye.default,isPostalCodeLocales:Ye.locales,isEthereumAddress:z.default,isCurrency:je.default,isBtcAddress:Me.default,isISO6346:Ne.isISO6346,isFreightContainerID:Ne.isFreightContainerID,isISO6391:Pe.default,isISO8601:Fe.default,isISO15924:Ie.default,isRFC3339:B.default,isISO31661Alpha2:Le.default,isISO31661Alpha3:Re.default,isISO31661Numeric:ze.default,isISO4217:Be.default,isBase32:Ve.default,isBase58:He.default,isBase64:Ue.default,isDataURI:We.default,isMagnetURI:Ge.default,isMailtoURI:Ke.default,isMimeType:qe.default,isLatLong:Je.default,ltrim:Xe.default,rtrim:Ze.default,trim:Qe.default,escape:$e.default,unescape:et.default,stripLow:tt.default,whitelist:nt.default,blacklist:rt.default,isWhitelisted:V.default,normalizeEmail:H.default,toString,isSlug:it.default,isStrongPassword:ot.default,isTaxID:ke.default,isDate:g.default,isTime:_.default,isLicensePlate:at.default,isVAT:st.default,ibanLocales:le.locales},t.exports=e.default,t.exports.default=e.default})),M6=c({hasProperties:()=>G6,hasProperty:()=>W6,isArray:()=>I6,isBigNumber:()=>z6,isBoolean:()=>R6,isFunction:()=>V6,isHex:()=>H6,isInteger:()=>U6,isJson:()=>L6,isNotNullOrUndefined:()=>Y6,isObject:()=>F6,isString:()=>B6,isValidURL:()=>P6,mapEvent:()=>K6,padLeft:()=>J6,parseEvent:()=>q6,sleep:()=>X6}),N6=u(j6());function P6(e){return typeof e==`string`?N6.default.isURL(e.toString(),{protocols:[`http`,`https`],require_tld:!1}):!1}function F6(e){return e===Object(e)&&Object.prototype.toString.call(e)!==`[object Array]`}function I6(e){return Array.isArray(e)}function L6(e){try{return!!JSON.parse(e)}catch{return!1}}function R6(e){return typeof e==`boolean`}function z6(e){return!!e&&(e instanceof D4||e.constructor&&e.constructor.name===`BigNumber`)}function B6(e){return typeof e==`string`||!!e&&e.constructor&&e.constructor.name===`String`}function V6(e){return typeof e==`function`}function H6(e){return typeof e==`string`&&!isNaN(parseInt(e,16))&&/^(0x|)[a-fA-F0-9]+$/.test(e)}function U6(e){return e===null?!1:Number.isInteger(Number(e))}function W6(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function G6(e,...t){return t.length&&!t.map(t=>W6(e,t)).includes(!1)}function K6(e){let t={block:e.block_number,timestamp:e.block_timestamp,contract:e.contract_address,name:e.event_name,transaction:e.transaction_id,result:e.result,resourceNode:e.resource_Node||(e._unconfirmed?`fullNode`:`solidityNode`)};return e._unconfirmed&&(t.unconfirmed=e._unconfirmed),e._fingerprint&&(t.fingerprint=e._fingerprint),t}function q6(e,{inputs:t}){if(!e.result)return e;if(F6(e.result))for(let n=0;n<t.length;n++){let r=t[n];r.type==`address`&&r.name in e.result&&(e.result[r.name]=`41`+e.result[r.name].substr(2).toLowerCase())}else I6(e.result)&&(e.result=e.result.reduce((e,n,r)=>{let{name:i,type:a}=t[r];return a==`address`&&(n=`41`+n.substr(2).toLowerCase()),e[i]=n,e},Object.create(null)));return e}function J6(e,t,n){let r=e.toString();for(;r.length<n;)r=t+r;return r}function Y6(e){return e!=null}async function X6(e=1e3){return new Promise(t=>setTimeout(t,e))}var Z6=c({fromHex:()=>Q6,fromPrivateKey:()=>n8,getCreate2Address:()=>cie,isAddress:()=>r8,isChecksumAddress:()=>t8,toChecksumAddress:()=>e8,toHex:()=>Z});function Q6(e){return H6(e)?I2(wW(e.replace(/^0x/,`41`))):e}function Z(e){return H6(e)?e.toLowerCase().replace(/^0x/,`41`):dW(L2(e)).toLowerCase()}function $6(e){e=e.toLowerCase();let t=e.substring(2).split(``),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);let r=wW(Lq(n).slice(2));for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(r[e>>1]&15)>=8&&(t[e+1]=t[e+1].toUpperCase());return`41`+t.join(``)}function e8(e){if(!r8(e))throw Error(`'${e}' is not a valid address string`);return $6(Z(e))}function t8(e){if(!H6(e)||e.length!==42)return!1;try{return e8(e)===e}catch{return!1}}function n8(e,t=!1){try{return t4(e,t)}catch{return!1}}function r8(e){if(!e||!B6(e))return!1;if(e.length===42)try{return r8(I2(wW(e)))}catch{return!1}try{return q2(e)}catch{return!1}}function i8(e){return new Uint8Array(wW(e.replace(/^0x/,``)))}function a8(e){return typeof e==`string`?i8(e):e}function cie({from:e,salt:t,initCode:n,addressFormat:r=`base58`}){if(!r8(e))throw Error(`from(${e}) is not a valid address string`);let i=i8(Z(e)),a=a8(t),o=a8(n);if(a.length!==32)throw Error(`salt(${t}) must be 32 bytes`);let s=`41${Lq(QW([i,a,i8(Lq(o))])).slice(-40)}`;return r===`base58`?Q6(s):s}var lie=c({decodeParams:()=>uie,decodeParamsV2ByABI:()=>d8,encodeParams:()=>die,encodeParamsV2ByABI:()=>u8}),o8=new mQ;function s8(e){return Z(e).replace(hW,`0x`)}function uie(e,t,n,r=!1){if(r&&n.replace(/^0x/,``).length%64==8&&(n=`0x`+n.replace(/^0x/,``).substring(8)),n.replace(/^0x/,``).length%64)throw Error(`The encoded string is not valid. Its length must be a multiple of 64.`);return t=t.map(e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,`uint256`)),e)),o8.decode(t,n).reduce((n,r,i)=>(t[i]==`address`&&(r=`41`+r.substr(2).toLowerCase()),e.length?n[e[i]]=r:n.push(r),n),e.length?Object.create(null):[])}function die(e,t){for(let n=0;n<e.length;n++)e[n]===`address`&&(t[n]=s8(t[n]));return o8.encode(e,t)}function c8(e){let t=e.match(/([a-zA-Z0-9])(\[.*\])/);return t?t[2]:``}function l8(e){return(c8(e).match(/\]\[/g)||[]).length+1}function u8(e,t){let n=[],r=e=>e&&e.type.indexOf(`tuple`)===0&&e.components?`tuple(${e.components.map(e=>r(e)).join(`,`)})${c8(e.type)}`:/trcToken/.test(e.type)?e.type.replace(/trcToken/,`uint256`):e.type,i=e=>{for(let t=0;t<e.length;t++){let n=e[t];/trcToken/.test(n)&&(e[t]=n.replace(/trcToken/,`uint256`))}},a=e=>Array.isArray(e)?(e.forEach((t,n)=>{e[n]=a(t)}),e):s8(e),o=(e,t,n)=>{n>1?t.length&&t.forEach(t=>{o(e,t,n-1)}):t.length&&n&&t.forEach(t=>{s(e,t)})},s=(e=[],t)=>{e.length&&e.forEach((e,n)=>{let r=e.type;if(t[n]!==void 0&&t[n]!==null){if(r===`address`)t[n]=s8(t[n]);else if(r.match(/^([^\x5b]*)(\x5b|$)/)[0]===`address[`)a(t[n]);else if(r.indexOf(`tuple`)===0)if(c8(r)){let i=l8(r);o(e.components,t[n],i)}else s(e.components,t[n])}})};if(e.inputs&&e.inputs.length)for(let i=0;i<e.inputs.length;i++){let a=e.inputs[i].type;a===`bool`&&t[i]===`false`&&(t[i]=!1),n.push(a.indexOf(`tuple`)===0?r(e.inputs[i]):a),t.length<n.length&&t.push(``)}return s(e.inputs,t),i(n),o8.encode(n,t)}function d8(e,t){let n=e=>{for(let t=0;t<e.length;t++){let n=e[t];/^trcToken/.test(n)&&(e[t]=n.replace(/^trcToken/,`uint256`))}},r=e=>Array.isArray(e)?(e.forEach((t,n)=>{e[n]=r(t)}),e):Z(e),i=(e,t,n)=>{n>1?t.length&&t.forEach(t=>{i(e,t,n-1)}):t.length&&n&&t.forEach(t=>{s(e,t)})},a=e=>{let t=e.name?` ${e.name}`:``;return e&&e.type.indexOf(`tuple`)===0&&e.components?`tuple(${e.components.map(e=>a(e)).join(`,`)})${c8(e.type)}${t}`:/trcToken/.test(e.type)?e.type.replace(/trcToken/,`uint256`)+t:e.type+t},o=(e,t,n)=>{t&&![`length`].includes(t)&&(e[t]=n)},s=(e,t)=>{e.length&&e.forEach((e,n)=>{let{type:a,name:c}=e;if(t[n])if(a===`address`)t[n]=Z(t[n]),o(t,c,Z(t[n]));else if(a.match(/^([^\x5b]*)(\x5b|$)/)[0]===`address[`)r(t[n]),o(t,c,r(t[n]));else if(a.indexOf(`tuple`)===0){if(c8(a)){let r=l8(a);i(e.components,t[n],r)}else s(e.components,t[n]);o(t,c,t[n])}else o(t,c,t[n]);else o(t,c,t[n])})};if(`outputs`in e&&e.outputs&&e.outputs.length>0){let r=[];for(let t=0;t<e.outputs.length;t++){let n=e.outputs[t].type,i=e.outputs[t].name?` ${e.outputs[t].name}`:``;r.push(n.indexOf(`tuple`)===0?a(e.outputs[t]):n+i)}n(r),(!t||!t.length)&&(t=new Uint8Array(32*e.outputs.length));let i=o8.decode(r,t).toArray(!0);return s(e.outputs,i),i}return[]}var fie=c({TRON_MESSAGE_PREFIX:()=>f8,hashMessage:()=>p8,signMessage:()=>pie,verifyMessage:()=>mie}),f8=`TRON Signed Message:
|
|
96
|
-
`;function p8(e){return typeof e==`string`?e=AG(e):Array.isArray(e)&&(e=new Uint8Array(e)),Lq(QW([AG(f8),AG(String(e.length)),e]))}function pie(e,t){t.match(/^0x/)||(t=`0x`+t);let n=new pX(t),r=p8(e);return P1(n.sign(r))}function mie(e,t){return t.match(/^0x/)||(t=`0x`+t),I2(wW(QX(p8(e),t).replace(/^0x/,`41`)))}var hie=c({TypedDataEncoder:()=>S8,signTypedData:()=>wie,verifyTypedData:()=>Tie});function gie(e){return Z(e).replace(hW,`0x`)}function _ie(e){return Z(e)}var m8=new Uint8Array(32);m8.fill(0);var vie=BigInt(-1),h8=BigInt(0),g8=BigInt(1),yie=BigInt(`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`);function bie(e){let t=qW(e),n=t.length%32;return n?QW([t,m8.slice(n)]):Y(t)}var xie=hG(g8,32),Sie=hG(h8,32),_8={name:`string`,version:`string`,chainId:`uint256`,verifyingContract:`address`,salt:`bytes32`},v8=[`name`,`version`,`chainId`,`verifyingContract`,`salt`];function y8(e){return function(t){return J(typeof t==`string`,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}var Cie={name:y8(`name`),version:y8(`version`),chainId:function(e){let t=lG(e,`domain.chainId`);return J(t>=0,`invalid chain ID`,`domain.chainId`,e),Number.isSafeInteger(t)?Number(t):_G(t)},verifyingContract:function(e){try{return _ie(e).toLowerCase()}catch{}J(!1,`invalid domain value "verifyingContract"`,`domain.verifyingContract`,e)},salt:function(e){let t=qW(e,`domain.salt`);return J(t.length===32,`invalid domain value "salt"`,`domain.salt`,e),Y(t)}};function b8(e){{let t=e.match(/^(u?)int(\d*)$/);if(t){let n=t[1]===``,r=parseInt(t[2]||`256`);J(r%8==0&&r!==0&&r<=256&&(t[2]==null||t[2]===String(r)),`invalid numeric width`,`type`,e);let i=cG(yie,n?r-1:r),a=n?(i+g8)*vie:h8;return function(t){let r=lG(t,`value`);return J(r>=a&&r<=i,`value out-of-bounds for ${e}`,`value`,r),hG(n?sG(r,256):r,32)}}}{let t=e.match(/^bytes(\d+)$/);if(t){let n=parseInt(t[1]);return J(n!==0&&n<=32&&t[1]===String(n),`invalid bytes width`,`type`,e),function(t){return J(qW(t).length===n,`invalid length for ${e}`,`value`,t),bie(t)}}}switch(e){case`trcToken`:return b8(`uint256`);case`address`:return function(e){return nG(gie(e),32)};case`bool`:return function(e){return e?xie:Sie};case`bytes`:return function(e){return Lq(e)};case`string`:return function(e){return JX(e)}}return null}function x8(e,t){return`${e}(${t.map(({name:e,type:t})=>t+` `+e).join(`,`)})`}var S8=class e{primaryType;#e;get types(){return JSON.parse(this.#e)}#t;#n;constructor(e){this.#e=JSON.stringify(e),this.#t=new Map,this.#n=new Map;let t=new Map,n=new Map,r=new Map;Object.keys(e).forEach(e=>{t.set(e,new Set),n.set(e,[]),r.set(e,new Set)});for(let r in e){let i=new Set;for(let a of e[r]){J(!i.has(a.name),`duplicate variable name ${JSON.stringify(a.name)} in ${JSON.stringify(r)}`,`types`,e),i.add(a.name);let o=a.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;J(o!==r,`circular type reference to ${JSON.stringify(o)}`,`types`,e),!b8(o)&&(J(n.has(o),`unknown type ${JSON.stringify(o)}`,`types`,e),n.get(o).push(r),t.get(r).add(o))}}let i=Array.from(n.keys()).filter(e=>n.get(e).length===0);J(i.length!==0,`missing primary type`,`types`,e),J(i.length===1,`ambiguous primary types or unused types: ${i.map(e=>JSON.stringify(e)).join(`, `)}`,`types`,e),LW(this,{primaryType:i[0]});function a(i,o){J(!o.has(i),`circular type reference to ${JSON.stringify(i)}`,`types`,e),o.add(i);for(let e of t.get(i))if(n.has(e)){a(e,o);for(let t of o)r.get(t).add(e)}o.delete(i)}a(this.primaryType,new Set);for(let[t,n]of r){let r=Array.from(n);r.sort(),this.#t.set(t,x8(t,e[t])+r.map(t=>x8(t,e[t])).join(``))}}getEncoder(e){let t=this.#n.get(e);return t||(t=this.#r(e),this.#n.set(e,t)),t}#r(e){{let t=b8(e);if(t)return t}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let e=t[1],n=this.getEncoder(e);return r=>{J(!t[3]||parseInt(t[3])===r.length,`array length mismatch; expected length ${parseInt(t[3])}`,`value`,r);let i=r.map(n);return this.#t.has(e)&&(i=i.map(Lq)),Lq(QW(i))}}let n=this.types[e];if(n){let t=JX(this.#t.get(e));return e=>{let r=n.map(({name:t,type:n})=>{let r=this.getEncoder(n)(e[t]);return this.#t.has(n)?Lq(r):r});return r.unshift(t),QW(r)}}J(!1,`unknown type: ${e}`,`type`,e)}encodeType(e){let t=this.#t.get(e);return J(t,`unknown type: ${JSON.stringify(e)}`,`name`,e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Lq(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(b8(e))return n(e,t);let r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r)return J(!r[3]||parseInt(r[3])===t.length,`array length mismatch; expected length ${parseInt(r[3])}`,`value`,t),t.map(e=>this._visit(r[1],e,n));let i=this.types[e];if(i)return i.reduce((e,{name:r,type:i})=>(e[r]=this._visit(i,t[r],n),e),{});J(!1,`unknown type: ${e}`,`type`,e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(t){return new e(t)}static getPrimaryType(t){return e.from(t).primaryType}static hashStruct(t,n,r){return e.from(n).hashStruct(t,r)}static hashDomain(t){let n=[];for(let e in t){if(t[e]==null)continue;let r=_8[e];J(r,`invalid typed-data domain key: ${JSON.stringify(e)}`,`domain`,t),n.push({name:e,type:r})}return n.sort((e,t)=>v8.indexOf(e.name)-v8.indexOf(t.name)),e.hashStruct(`EIP712Domain`,{EIP712Domain:n},t)}static encode(t,n,r){return QW([`0x1901`,e.hashDomain(t),e.from(n).hash(r)])}static hash(t,n,r){return Lq(e.encode(t,n,r))}static async resolveNames(t,n,r,i){t=Object.assign({},t);for(let e in t)t[e]??delete t[e];let a={};t.verifyingContract&&!YW(t.verifyingContract,20)&&(a[t.verifyingContract]=`0x`);let o=e.from(n);o.visit(r,(e,t)=>(e===`address`&&!YW(t,20)&&(a[t]=`0x`),t));for(let e in a)a[e]=await i(e);return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),r=o.visit(r,(e,t)=>e===`address`&&a[t]?a[t]:t),{domain:t,value:r}}static getPayload(t,n,r){e.hashDomain(t);let i={},a=[];v8.forEach(e=>{let n=t[e];n!=null&&(i[e]=Cie[e](n),a.push({name:e,type:_8[e]}))});let o=e.from(n),s=Object.assign({},n);return J(s.EIP712Domain==null,`types must not contain EIP712Domain type`,`types.EIP712Domain`,n),s.EIP712Domain=a,o.encode(r),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return Y(qW(t));if(e.match(/^u?int/))return lG(t).toString();switch(e){case`trcToken`:return lG(t).toString();case`address`:return t.toLowerCase();case`bool`:return!!t;case`string`:return J(typeof t==`string`,`invalid string`,`value`,t),t}J(!1,`unsupported type`,`type`,e)})}}};function wie(e,t,n,r){let i=new pX(`0x${r.replace(/^0x/,``)}`),a=S8.hash(e,t,n),o=i.sign(a);return[`0x`,o.r.substring(2),o.s.substring(2),Number(o.v).toString(16)].join(``)}function Tie(e,t,n,r){return QX(S8.hash(e,t,n),r)}var C8=s((e=>{var t=typeof Object.defineProperties==`function`?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},n=typeof window<`u`&&window===e?e:typeof global<`u`&&global!=null?global:e;function r(e,r){if(r){var i=n;e=e.split(`.`);for(var a=0;a<e.length-1;a++){var o=e[a];o in i||(i[o]={}),i=i[o]}e=e[e.length-1],a=i[e],r=r(a),r!=a&&r!=null&&t(i,e,{configurable:!0,writable:!0,value:r})}}function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function a(){a=function(){},n.Symbol||=s}function o(e,n){this.a=e,t(this,`description`,{configurable:!0,writable:!0,value:n})}o.prototype.toString=function(){return this.a};var s=function(){function e(n){if(this instanceof e)throw TypeError(`Symbol is not a constructor`);return new o(`jscomp_symbol_`+(n||``)+`_`+ t++,n)}var t=0;return e}();function c(){a();var e=n.Symbol.iterator;e||=n.Symbol.iterator=n.Symbol(`Symbol.iterator`),typeof Array.prototype[e]!=`function`&&t(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return l(i(this))}}),c=function(){}}function l(e){return c(),e={next:e},e[n.Symbol.iterator]=function(){return this},e}function u(e,t){c(),e instanceof String&&(e+=``);var n=0,r={next:function(){if(n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r}r(`Array.prototype.entries`,function(e){return e||function(){return u(this,function(e,t){return[e,t]})}});var d=e||self;function f(e,t,n){e=e.split(`.`),n||=d,e[0]in n||n.execScript===void 0||n.execScript(`var `+e[0]);for(var r;e.length&&(r=e.shift());)e.length||t===void 0?n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}:n[r]=t}function p(e){var t=typeof e;if(t==`object`)if(e){if(e instanceof Array)return`array`;if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if(n==`[object Window]`)return`object`;if(n==`[object Array]`||typeof e.length==`number`&&e.splice!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable(`splice`))return`array`;if(n==`[object Function]`||e.call!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable(`call`))return`function`}else return`null`;else if(t==`function`&&e.call===void 0)return`object`;return t}function m(e){var t=typeof e;return t==`object`&&e!=null||t==`function`}function h(e,t,n){f(e,t,n)}function g(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}var _=`constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf`.split(` `);function v(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i],r)e[n]=r[n];for(var a=0;a<_.length;a++)n=_[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}var y=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=typeof e==`string`?e.split(``):e,i=0;i<n;i++)i in r&&t.call(void 0,r[i],i,e)},b=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=Array(n),i=typeof e==`string`?e.split(``):e,a=0;a<n;a++)a in i&&(r[a]=t.call(void 0,i[a],a,e));return r};function x(e,t,n){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,n)}function S(e,t,n,r){var i=`Assertion failed`;if(n){i+=`: `+n;var a=r}else e&&(i+=`: `+e,a=t);throw Error(i,a||[])}function C(e,t,n){var r=[...arguments].slice(2);return e||S(``,null,t,r),e}function w(e,t,n){var r=[...arguments].slice(2);typeof e!=`string`&&S(`Expected string but got %s: %s.`,[p(e),e],t,r)}function T(e,t,n){var r=[...arguments].slice(2);Array.isArray(e)||S(`Expected array but got %s: %s.`,[p(e),e],t,r)}function E(e,t){var n=[...arguments].slice(1);throw Error(`Failure`+(e?`: `+e:``),n)}function D(e,t,n,r){var i=[...arguments].slice(3);e instanceof t||S(`Expected instanceof %s but got %s.`,[O(t),O(e)],n,i)}function O(e){return e instanceof Function?e.displayName||e.name||`unknown type name`:e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):e===null?`null`:typeof e}function k(e,t){if(this.c=e,this.b=t,this.a={},this.arrClean=!0,0<this.c.length){for(e=0;e<this.c.length;e++){t=this.c[e];var n=t[0];this.a[n.toString()]=new N(n,t[1])}this.arrClean=!0}}f(`jspb.Map`,k,void 0),k.prototype.g=function(){if(this.arrClean){if(this.b){var e=this.a,t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t].a;n&&n.g()}}}else{for(this.c.length=0,e=M(this),e.sort(),t=0;t<e.length;t++){var r=this.a[e[t]];(n=r.a)&&n.g(),this.c.push([r.key,r.value])}this.arrClean=!0}return this.c},k.prototype.toArray=k.prototype.g,k.prototype.Mc=function(e,t){for(var n=this.g(),r=[],i=0;i<n.length;i++){var a=this.a[n[i][0].toString()];j(this,a);var o=a.a;o?(C(t),r.push([a.key,t(e,o)])):r.push([a.key,a.value])}return r},k.prototype.toObject=k.prototype.Mc,k.fromObject=function(e,t,n){t=new k([],t);for(var r=0;r<e.length;r++){var i=e[r][0],a=n(e[r][1]);t.set(i,a)}return t};function A(e){this.a=0,this.b=e}A.prototype.next=function(){return this.a<this.b.length?{done:!1,value:this.b[this.a++]}:{done:!0,value:void 0}},typeof Symbol<`u`&&(A.prototype[Symbol.iterator]=function(){return this}),k.prototype.Jb=function(){return M(this).length},k.prototype.getLength=k.prototype.Jb,k.prototype.clear=function(){this.a={},this.arrClean=!1},k.prototype.clear=k.prototype.clear,k.prototype.Cb=function(e){e=e.toString();var t=this.a.hasOwnProperty(e);return delete this.a[e],this.arrClean=!1,t},k.prototype.del=k.prototype.Cb,k.prototype.Eb=function(){var e=[],t=M(this);t.sort();for(var n=0;n<t.length;n++){var r=this.a[t[n]];e.push([r.key,r.value])}return e},k.prototype.getEntryList=k.prototype.Eb,k.prototype.entries=function(){var e=[],t=M(this);t.sort();for(var n=0;n<t.length;n++){var r=this.a[t[n]];e.push([r.key,j(this,r)])}return new A(e)},k.prototype.entries=k.prototype.entries,k.prototype.keys=function(){var e=[],t=M(this);t.sort();for(var n=0;n<t.length;n++)e.push(this.a[t[n]].key);return new A(e)},k.prototype.keys=k.prototype.keys,k.prototype.values=function(){var e=[],t=M(this);t.sort();for(var n=0;n<t.length;n++)e.push(j(this,this.a[t[n]]));return new A(e)},k.prototype.values=k.prototype.values,k.prototype.forEach=function(e,t){var n=M(this);n.sort();for(var r=0;r<n.length;r++){var i=this.a[n[r]];e.call(t,j(this,i),i.key,this)}},k.prototype.forEach=k.prototype.forEach,k.prototype.set=function(e,t){var n=new N(e);return this.b?(n.a=t,n.value=t.g()):n.value=t,this.a[e.toString()]=n,this.arrClean=!1,this},k.prototype.set=k.prototype.set;function j(e,t){return e.b?(t.a||=new e.b(t.value),t.a):t.value}k.prototype.get=function(e){if(e=this.a[e.toString()])return j(this,e)},k.prototype.get=k.prototype.get,k.prototype.has=function(e){return e.toString()in this.a},k.prototype.has=k.prototype.has,k.prototype.Jc=function(e,t,n,r,i){var a=M(this);a.sort();for(var o=0;o<a.length;o++){var s=this.a[a[o]];t.Va(e),n.call(t,1,s.key),this.b?r.call(t,2,j(this,s),i):r.call(t,2,s.value),t.Ya()}},k.prototype.serializeBinary=k.prototype.Jc,k.deserializeBinary=function(e,t,n,r,i,a,o){for(;t.oa()&&!t.bb();){var s=t.c;s==1?a=n.call(t):s==2&&(e.b?(C(i),o||=new e.b,r.call(t,o,i)):o=r.call(t))}C(a!=null),C(o!=null),e.set(a,o)};function M(e){e=e.a;var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}function N(e,t){this.key=e,this.value=t,this.a=void 0}function ee(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t=``,n=0;n<e.length;n+=8192)t+=String.fromCharCode.apply(null,x(e,n,n+8192));return t}var te={"\0":`\\0`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\x0B`,'"':`\\"`,"\\":`\\\\`,"<":`\\u003C`},P={"'":`\\'`},F={},ne=null;function re(e,t){t===void 0&&(t=0),oe(),t=F[t];for(var n=[],r=0;r<e.length;r+=3){var i=e[r],a=r+1<e.length,o=a?e[r+1]:0,s=r+2<e.length,c=s?e[r+2]:0,l=i>>2;i=(i&3)<<4|o>>4,o=(o&15)<<2|c>>6,c&=63,s||(c=64,a||(o=64)),n.push(t[l],t[i],t[o]||``,t[c]||``)}return n.join(``)}function ie(e){var t=e.length,n=3*t/4;n%3?n=Math.floor(n):`=.`.indexOf(e[t-1])!=-1&&(n=`=.`.indexOf(e[t-2])==-1?n-1:n-2);var r=new Uint8Array(n),i=0;return ae(e,function(e){r[i++]=e}),r.subarray(0,i)}function ae(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=ne[n];if(i!=null)return i;if(!/^[\s\xa0]*$/.test(n))throw Error(`Unknown base64 encoding at char: `+n)}return t}oe();for(var r=0;;){var i=n(-1),a=n(0),o=n(64),s=n(64);if(s===64&&i===-1)break;t(i<<2|a>>4),o!=64&&(t(a<<4&240|o>>2),s!=64&&t(o<<6&192|s))}}function oe(){if(!ne){ne={};for(var e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.split(``),t=[`+/=`,`+/`,`-_=`,`-_.`,`-_`],n=0;5>n;n++){var r=e.concat(t[n].split(``));F[n]=r;for(var i=0;i<r.length;i++){var a=r[i];ne[a]===void 0&&(ne[a]=i)}}}}f(`jspb.ConstBinaryMessage`,function(){},void 0),f(`jspb.BinaryMessage`,function(){},void 0),f(`jspb.BinaryConstants.FieldType`,{yb:-1,ee:1,FLOAT:2,ke:3,te:4,je:5,xb:6,wb:7,BOOL:8,re:9,ie:10,le:11,ce:12,se:13,ge:14,me:15,ne:16,oe:17,pe:18,he:30,ve:31},void 0),f(`jspb.BinaryConstants.WireType`,{yb:-1,ue:0,xb:1,de:2,qe:3,fe:4,wb:5},void 0),f(`jspb.BinaryConstants.FieldTypeToWireType`,function(e){switch(e){case 5:case 3:case 13:case 4:case 17:case 18:case 8:case 14:case 31:return 0;case 1:case 6:case 16:case 30:return 1;case 9:case 11:case 12:return 2;case 2:case 7:case 15:return 5;default:return-1}},void 0),f(`jspb.BinaryConstants.INVALID_FIELD_NUMBER`,-1,void 0),f(`jspb.BinaryConstants.FLOAT32_EPS`,1401298464324817e-60,void 0),f(`jspb.BinaryConstants.FLOAT32_MIN`,11754943508222875e-54,void 0),f(`jspb.BinaryConstants.FLOAT32_MAX`,34028234663852886e22,void 0),f(`jspb.BinaryConstants.FLOAT64_EPS`,5e-324,void 0),f(`jspb.BinaryConstants.FLOAT64_MIN`,22250738585072014e-324,void 0),f(`jspb.BinaryConstants.FLOAT64_MAX`,17976931348623157e292,void 0),f(`jspb.BinaryConstants.TWO_TO_20`,1048576,void 0),f(`jspb.BinaryConstants.TWO_TO_23`,8388608,void 0),f(`jspb.BinaryConstants.TWO_TO_31`,2147483648,void 0),f(`jspb.BinaryConstants.TWO_TO_32`,4294967296,void 0),f(`jspb.BinaryConstants.TWO_TO_52`,4503599627370496,void 0),f(`jspb.BinaryConstants.TWO_TO_63`,0x8000000000000000,void 0),f(`jspb.BinaryConstants.TWO_TO_64`,0x10000000000000000,void 0),f(`jspb.BinaryConstants.ZERO_HASH`,`\0\0\0\0\0\0\0\0`,void 0);var I=0,se=0;f(`jspb.utils.getSplit64Low`,function(){return I},void 0),f(`jspb.utils.getSplit64High`,function(){return se},void 0);function ce(e){var t=e>>>0;e=Math.floor((e-t)/4294967296)>>>0,I=t,se=e}f(`jspb.utils.splitUint64`,ce,void 0);function le(e){var t=0>e;e=Math.abs(e);var n=e>>>0;e=Math.floor((e-n)/4294967296),e>>>=0,t&&(e=~e>>>0,n=(~n>>>0)+1,4294967295<n&&(n=0,e++,4294967295<e&&(e=0))),I=n,se=e}f(`jspb.utils.splitInt64`,le,void 0);function ue(e){var t=0>e;e=2*Math.abs(e),ce(e),e=I;var n=se;t&&(e==0?n==0?n=e=4294967295:(n--,e=4294967295):e--),I=e,se=n}f(`jspb.utils.splitZigzag64`,ue,void 0);function de(e){var t=+(0>e);if(e=t?-e:e,e===0)0<1/e?I=se=0:(se=0,I=2147483648);else if(isNaN(e))se=0,I=2147483647;else if(34028234663852886e22<e)se=0,I=(t<<31|2139095040)>>>0;else if(11754943508222875e-54>e)e=Math.round(e/2**-149),se=0,I=(t<<31|e)>>>0;else{var n=Math.floor(Math.log(e)/Math.LN2);e*=2**-n,e=Math.round(8388608*e),16777216<=e&&++n,se=0,I=(t<<31|n+127<<23|e&8388607)>>>0}}f(`jspb.utils.splitFloat32`,de,void 0);function fe(e){var t=+(0>e);if(e=t?-e:e,e===0)se=0<1/e?0:2147483648,I=0;else if(isNaN(e))se=2147483647,I=4294967295;else if(17976931348623157e292<e)se=(t<<31|2146435072)>>>0,I=0;else if(22250738585072014e-324>e)e/=2**-1074,se=(t<<31|e/4294967296)>>>0,I=e>>>0;else{var n=e,r=0;if(2<=n)for(;2<=n&&1023>r;)r++,n/=2;else for(;1>n&&-1022<r;)n*=2,r--;e*=2**-r,se=(t<<31|r+1023<<20|1048576*e&1048575)>>>0,I=4503599627370496*e>>>0}}f(`jspb.utils.splitFloat64`,fe,void 0);function pe(e){var t=e.charCodeAt(4),n=e.charCodeAt(5),r=e.charCodeAt(6),i=e.charCodeAt(7);I=e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)>>>0,se=t+(n<<8)+(r<<16)+(i<<24)>>>0}f(`jspb.utils.splitHash64`,pe,void 0);function me(e,t){return 4294967296*t+(e>>>0)}f(`jspb.utils.joinUint64`,me,void 0);function he(e,t){var n=t&2147483648;return n&&(e=~e+1>>>0,t=~t>>>0,e==0&&(t=t+1>>>0)),e=me(e,t),n?-e:e}f(`jspb.utils.joinInt64`,he,void 0);function ge(e,t,n){var r=t>>31;return n(e<<1^r,(t<<1|e>>>31)^r)}f(`jspb.utils.toZigzag64`,ge,void 0);function _e(e,t){return ve(e,t,he)}f(`jspb.utils.joinZigzag64`,_e,void 0);function ve(e,t,n){var r=-(e&1);return n((e>>>1|t<<31)^r,t>>>1^r)}f(`jspb.utils.fromZigzag64`,ve,void 0);function ye(e){var t=2*(e>>31)+1,n=e>>>23&255;return e&=8388607,n==255?e?NaN:1/0*t:n==0?t*2**-149*e:t*2**(n-150)*(e+2**23)}f(`jspb.utils.joinFloat32`,ye,void 0);function be(e,t){var n=2*(t>>31)+1,r=t>>>20&2047;return e=4294967296*(t&1048575)+e,r==2047?e?NaN:1/0*n:r==0?n*2**-1074*e:n*2**(r-1075)*(e+4503599627370496)}f(`jspb.utils.joinFloat64`,be,void 0);function xe(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)}f(`jspb.utils.joinHash64`,xe,void 0),f(`jspb.utils.DIGITS`,`0123456789abcdef`.split(``),void 0);function Se(e,t){function n(e,t){return e=e?String(e):``,t?`0000000`.slice(e.length)+e:e}if(2097151>=t)return``+me(e,t);var r=(e>>>24|t<<8)>>>0&16777215;return t=t>>16&65535,e=(e&16777215)+6777216*r+6710656*t,r+=8147497*t,t*=2,1e7<=e&&(r+=Math.floor(e/1e7),e%=1e7),1e7<=r&&(t+=Math.floor(r/1e7),r%=1e7),n(t,0)+n(r,t)+n(e,1)}f(`jspb.utils.joinUnsignedDecimalString`,Se,void 0);function Ce(e,t){var n=t&2147483648;return n&&(e=~e+1>>>0,t=~t+ +(e==0)>>>0),e=Se(e,t),n?`-`+e:e}f(`jspb.utils.joinSignedDecimalString`,Ce,void 0);function L(e,t){pe(e),e=I;var n=se;return t?Ce(e,n):Se(e,n)}f(`jspb.utils.hash64ToDecimalString`,L,void 0),f(`jspb.utils.hash64ArrayToDecimalStrings`,function(e,t){for(var n=Array(e.length),r=0;r<e.length;r++)n[r]=L(e[r],t);return n},void 0);function we(e){function t(e,t){for(var n=0;8>n&&(e!==1||0<t);n++)t=e*i[n]+t,i[n]=t&255,t>>>=8}function n(){for(var e=0;8>e;e++)i[e]=~i[e]&255}C(0<e.length);var r=!1;e[0]===`-`&&(r=!0,e=e.slice(1));for(var i=[0,0,0,0,0,0,0,0],a=0;a<e.length;a++)t(10,e.charCodeAt(a)-48);return r&&(n(),t(1,1)),ee(i)}f(`jspb.utils.decimalStringToHash64`,we,void 0),f(`jspb.utils.splitDecimalString`,function(e){pe(we(e))},void 0);function Te(e){return String.fromCharCode(10>e?48+e:87+e)}function Ee(e){return 97<=e?e-97+10:e-48}f(`jspb.utils.hash64ToHexString`,function(e){var t=Array(18);t[0]=`0`,t[1]=`x`;for(var n=0;8>n;n++){var r=e.charCodeAt(7-n);t[2*n+2]=Te(r>>4),t[2*n+3]=Te(r&15)}return t.join(``)},void 0),f(`jspb.utils.hexStringToHash64`,function(e){e=e.toLowerCase(),C(e.length==18),C(e[0]==`0`),C(e[1]==`x`);for(var t=``,n=0;8>n;n++)t=String.fromCharCode(16*Ee(e.charCodeAt(2*n+2))+Ee(e.charCodeAt(2*n+3)))+t;return t},void 0),f(`jspb.utils.hash64ToNumber`,function(e,t){pe(e),e=I;var n=se;return t?he(e,n):me(e,n)},void 0),f(`jspb.utils.numberToHash64`,function(e){return le(e),xe(I,se)},void 0),f(`jspb.utils.countVarints`,function(e,t,n){for(var r=0,i=t;i<n;i++)r+=e[i]>>7;return n-t-r},void 0),f(`jspb.utils.countVarintFields`,function(e,t,n,r){var i=0;if(r*=8,128>r)for(;t<n&&e[t++]==r;)for(i++;;){var a=e[t++];if(!(a&128))break}else for(;t<n;){for(a=r;128<a;){if(e[t]!=(a&127|128))return i;t++,a>>=7}if(e[t++]!=a)break;for(i++;a=e[t++],a&128;);}return i},void 0);function De(e,t,n,r,i){var a=0;if(128>r)for(;t<n&&e[t++]==r;)a++,t+=i;else for(;t<n;){for(var o=r;128<o;){if(e[t++]!=(o&127|128))return a;o>>=7}if(e[t++]!=o)break;a++,t+=i}return a}f(`jspb.utils.countFixed32Fields`,function(e,t,n,r){return De(e,t,n,8*r+5,4)},void 0),f(`jspb.utils.countFixed64Fields`,function(e,t,n,r){return De(e,t,n,8*r+1,8)},void 0),f(`jspb.utils.countDelimitedFields`,function(e,t,n,r){var i=0;for(r=8*r+2;t<n;){for(var a=r;128<a;){if(e[t++]!=(a&127|128))return i;a>>=7}if(e[t++]!=a)break;i++;for(var o=0,s=1;a=e[t++],o+=(a&127)*s,s*=128,a&128;);t+=o}return i},void 0),f(`jspb.utils.debugBytesToTextFormat`,function(e){var t=`"`;if(e){e=Oe(e);for(var n=0;n<e.length;n++)t+=`\\x`,16>e[n]&&(t+=`0`),t+=e[n].toString(16)}return t+`"`},void 0),f(`jspb.utils.debugScalarToTextFormat`,function(e){if(typeof e==`string`){e=String(e);for(var t=[`"`],n=0;n<e.length;n++){var r=e.charAt(n),i=r.charCodeAt(0),a=n+1,o;(o=te[r])||(31<i&&127>i||(i=r,i in P?r=P[i]:i in te?r=P[i]=te[i]:(o=i.charCodeAt(0),31<o&&127>o?r=i:(256>o?(r=`\\x`,(16>o||256<o)&&(r+=`0`)):(r=`\\u`,4096>o&&(r+=`0`)),r+=o.toString(16).toUpperCase()),r=P[i]=r)),o=r),t[a]=o}t.push(`"`),e=t.join(``)}else e=e.toString();return e},void 0),f(`jspb.utils.stringToByteArray`,function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++){var r=e.charCodeAt(n);if(255<r)throw Error(`Conversion error: string contains codepoint outside of byte range`);t[n]=r}return t},void 0);function Oe(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?ie(e):e instanceof Uint8Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(E(`Type not convertible to Uint8Array.`),new Uint8Array)}f(`jspb.utils.byteSourceToUint8Array`,Oe,void 0);function R(e,t,n){this.b=null,this.a=this.c=this.h=0,this.v=!1,e&&this.H(e,t,n)}f(`jspb.BinaryDecoder`,R,void 0);var ke=[];R.getInstanceCacheLength=function(){return ke.length};function Ae(e,t,n){if(ke.length){var r=ke.pop();return e&&r.H(e,t,n),r}return new R(e,t,n)}R.alloc=Ae,R.prototype.Ca=function(){this.clear(),100>ke.length&&ke.push(this)},R.prototype.free=R.prototype.Ca,R.prototype.clone=function(){return Ae(this.b,this.h,this.c-this.h)},R.prototype.clone=R.prototype.clone,R.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1},R.prototype.clear=R.prototype.clear,R.prototype.Y=function(){return this.b},R.prototype.getBuffer=R.prototype.Y,R.prototype.H=function(e,t,n){this.b=Oe(e),this.h=t===void 0?0:t,this.c=n===void 0?this.b.length:this.h+n,this.a=this.h},R.prototype.setBlock=R.prototype.H,R.prototype.Db=function(){return this.c},R.prototype.getEnd=R.prototype.Db,R.prototype.setEnd=function(e){this.c=e},R.prototype.setEnd=R.prototype.setEnd,R.prototype.reset=function(){this.a=this.h},R.prototype.reset=R.prototype.reset,R.prototype.B=function(){return this.a},R.prototype.getCursor=R.prototype.B,R.prototype.Ma=function(e){this.a=e},R.prototype.setCursor=R.prototype.Ma,R.prototype.advance=function(e){this.a+=e,C(this.a<=this.c)},R.prototype.advance=R.prototype.advance,R.prototype.ya=function(){return this.a==this.c},R.prototype.atEnd=R.prototype.ya,R.prototype.Qb=function(){return this.a>this.c},R.prototype.pastEnd=R.prototype.Qb,R.prototype.getError=function(){return this.v||0>this.a||this.a>this.c},R.prototype.getError=R.prototype.getError,R.prototype.w=function(e){for(var t=128,n=0,r=0,i=0;4>i&&128<=t;i++)t=this.b[this.a++],n|=(t&127)<<7*i;if(128<=t&&(t=this.b[this.a++],n|=(t&127)<<28,r|=(t&127)>>4),128<=t)for(i=0;5>i&&128<=t;i++)t=this.b[this.a++],r|=(t&127)<<7*i+3;if(128>t)return e(n>>>0,r>>>0);E(`Failed to read varint, encoding is invalid.`),this.v=!0},R.prototype.readSplitVarint64=R.prototype.w,R.prototype.ea=function(e){return this.w(function(t,n){return ve(t,n,e)})},R.prototype.readSplitZigzagVarint64=R.prototype.ea,R.prototype.ta=function(e){var t=this.b,n=this.a;this.a+=8;for(var r=0,i=0,a=n+7;a>=n;a--)r=r<<8|t[a],i=i<<8|t[a+4];return e(r,i)},R.prototype.readSplitFixed64=R.prototype.ta,R.prototype.kb=function(){for(;this.b[this.a]&128;)this.a++;this.a++},R.prototype.skipVarint=R.prototype.kb,R.prototype.mb=function(e){for(;128<e;)this.a--,e>>>=7;this.a--},R.prototype.unskipVarint=R.prototype.mb,R.prototype.o=function(){var e=this.b,t=e[this.a],n=t&127;return 128>t?(this.a+=1,C(this.a<=this.c),n):(t=e[this.a+1],n|=(t&127)<<7,128>t?(this.a+=2,C(this.a<=this.c),n):(t=e[this.a+2],n|=(t&127)<<14,128>t?(this.a+=3,C(this.a<=this.c),n):(t=e[this.a+3],n|=(t&127)<<21,128>t?(this.a+=4,C(this.a<=this.c),n):(t=e[this.a+4],n|=(t&15)<<28,128>t?(this.a+=5,C(this.a<=this.c),n>>>0):(this.a+=5,128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&C(!1),C(this.a<=this.c),n)))))},R.prototype.readUnsignedVarint32=R.prototype.o,R.prototype.da=function(){return~~this.o()},R.prototype.readSignedVarint32=R.prototype.da,R.prototype.O=function(){return this.o().toString()},R.prototype.Ea=function(){return this.da().toString()},R.prototype.readSignedVarint32String=R.prototype.Ea,R.prototype.Ia=function(){var e=this.o();return e>>>1^-(e&1)},R.prototype.readZigzagVarint32=R.prototype.Ia,R.prototype.Ga=function(){return this.w(me)},R.prototype.readUnsignedVarint64=R.prototype.Ga,R.prototype.Ha=function(){return this.w(Se)},R.prototype.readUnsignedVarint64String=R.prototype.Ha,R.prototype.sa=function(){return this.w(he)},R.prototype.readSignedVarint64=R.prototype.sa,R.prototype.Fa=function(){return this.w(Ce)},R.prototype.readSignedVarint64String=R.prototype.Fa,R.prototype.Ja=function(){return this.w(_e)},R.prototype.readZigzagVarint64=R.prototype.Ja,R.prototype.fb=function(){return this.ea(xe)},R.prototype.readZigzagVarintHash64=R.prototype.fb,R.prototype.Ka=function(){return this.ea(Ce)},R.prototype.readZigzagVarint64String=R.prototype.Ka,R.prototype.Gc=function(){var e=this.b[this.a];return this.a+=1,C(this.a<=this.c),e},R.prototype.readUint8=R.prototype.Gc,R.prototype.Ec=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,C(this.a<=this.c),e<<0|t<<8},R.prototype.readUint16=R.prototype.Ec,R.prototype.m=function(){var e=this.b[this.a],t=this.b[this.a+1],n=this.b[this.a+2],r=this.b[this.a+3];return this.a+=4,C(this.a<=this.c),(e<<0|t<<8|n<<16|r<<24)>>>0},R.prototype.readUint32=R.prototype.m,R.prototype.ga=function(){return me(this.m(),this.m())},R.prototype.readUint64=R.prototype.ga,R.prototype.ha=function(){return Se(this.m(),this.m())},R.prototype.readUint64String=R.prototype.ha,R.prototype.Xb=function(){var e=this.b[this.a];return this.a+=1,C(this.a<=this.c),e<<24>>24},R.prototype.readInt8=R.prototype.Xb,R.prototype.Vb=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,C(this.a<=this.c),(e<<0|t<<8)<<16>>16},R.prototype.readInt16=R.prototype.Vb,R.prototype.P=function(){var e=this.b[this.a],t=this.b[this.a+1],n=this.b[this.a+2],r=this.b[this.a+3];return this.a+=4,C(this.a<=this.c),e<<0|t<<8|n<<16|r<<24},R.prototype.readInt32=R.prototype.P,R.prototype.ba=function(){return he(this.m(),this.m())},R.prototype.readInt64=R.prototype.ba,R.prototype.ca=function(){return Ce(this.m(),this.m())},R.prototype.readInt64String=R.prototype.ca,R.prototype.aa=function(){return ye(this.m(),0)},R.prototype.readFloat=R.prototype.aa,R.prototype.Z=function(){return be(this.m(),this.m())},R.prototype.readDouble=R.prototype.Z,R.prototype.pa=function(){return!!this.b[this.a++]},R.prototype.readBool=R.prototype.pa,R.prototype.ra=function(){return this.da()},R.prototype.readEnum=R.prototype.ra,R.prototype.fa=function(e){var t=this.b,n=this.a;e=n+e;for(var r=[],i=``;n<e;){var a=t[n++];if(128>a)r.push(a);else if(192>a)continue;else if(224>a){var o=t[n++];r.push((a&31)<<6|o&63)}else if(240>a){o=t[n++];var s=t[n++];r.push((a&15)<<12|(o&63)<<6|s&63)}else if(248>a){o=t[n++],s=t[n++];var c=t[n++];a=(a&7)<<18|(o&63)<<12|(s&63)<<6|c&63,a-=65536,r.push((a>>10&1023)+55296,(a&1023)+56320)}8192<=r.length&&(i+=String.fromCharCode.apply(null,r),r.length=0)}return i+=ee(r),this.a=n,i},R.prototype.readString=R.prototype.fa,R.prototype.Dc=function(){var e=this.o();return this.fa(e)},R.prototype.readStringWithLength=R.prototype.Dc,R.prototype.qa=function(e){if(0>e||this.a+e>this.b.length)return this.v=!0,E(`Invalid byte length!`),new Uint8Array;var t=this.b.subarray(this.a,this.a+e);return this.a+=e,C(this.a<=this.c),t},R.prototype.readBytes=R.prototype.qa,R.prototype.ia=function(){return this.w(xe)},R.prototype.readVarintHash64=R.prototype.ia,R.prototype.$=function(){var e=this.b,t=this.a,n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=e[t+5],c=e[t+6];return e=e[t+7],this.a+=8,String.fromCharCode(n,r,i,a,o,s,c,e)},R.prototype.readFixedHash64=R.prototype.$;function z(e,t,n){this.a=Ae(e,t,n),this.O=this.a.B(),this.b=this.c=-1,this.h=!1,this.v=null}f(`jspb.BinaryReader`,z,void 0);var je=[];z.clearInstanceCache=function(){je=[]},z.getInstanceCacheLength=function(){return je.length};function Me(e,t,n){if(je.length){var r=je.pop();return e&&r.a.H(e,t,n),r}return new z(e,t,n)}z.alloc=Me,z.prototype.zb=Me,z.prototype.alloc=z.prototype.zb,z.prototype.Ca=function(){this.a.clear(),this.b=this.c=-1,this.h=!1,this.v=null,100>je.length&&je.push(this)},z.prototype.free=z.prototype.Ca,z.prototype.Fb=function(){return this.O},z.prototype.getFieldCursor=z.prototype.Fb,z.prototype.B=function(){return this.a.B()},z.prototype.getCursor=z.prototype.B,z.prototype.Y=function(){return this.a.Y()},z.prototype.getBuffer=z.prototype.Y,z.prototype.Hb=function(){return this.c},z.prototype.getFieldNumber=z.prototype.Hb,z.prototype.Lb=function(){return this.b},z.prototype.getWireType=z.prototype.Lb,z.prototype.Mb=function(){return this.b==2},z.prototype.isDelimited=z.prototype.Mb,z.prototype.bb=function(){return this.b==4},z.prototype.isEndGroup=z.prototype.bb,z.prototype.getError=function(){return this.h||this.a.getError()},z.prototype.getError=z.prototype.getError,z.prototype.H=function(e,t,n){this.a.H(e,t,n),this.b=this.c=-1},z.prototype.setBlock=z.prototype.H,z.prototype.reset=function(){this.a.reset(),this.b=this.c=-1},z.prototype.reset=z.prototype.reset,z.prototype.advance=function(e){this.a.advance(e)},z.prototype.advance=z.prototype.advance,z.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return E(`Decoder hit an error`),!1;this.O=this.a.B();var e=this.a.o(),t=e>>>3;return e&=7,e!=0&&e!=5&&e!=1&&e!=2&&e!=3&&e!=4?(E(`Invalid wire type: %s (at position %s)`,e,this.O),this.h=!0,!1):(this.c=t,this.b=e,!0)},z.prototype.nextField=z.prototype.oa,z.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)},z.prototype.unskipHeader=z.prototype.Oa,z.prototype.Lc=function(){var e=this.c;for(this.Oa();this.oa()&&this.c==e;)this.C();this.a.ya()||this.Oa()},z.prototype.skipMatchingFields=z.prototype.Lc,z.prototype.lb=function(){this.b==0?this.a.kb():(E(`Invalid wire type for skipVarintField`),this.C())},z.prototype.skipVarintField=z.prototype.lb,z.prototype.gb=function(){if(this.b!=2)E(`Invalid wire type for skipDelimitedField`),this.C();else{var e=this.a.o();this.a.advance(e)}},z.prototype.skipDelimitedField=z.prototype.gb,z.prototype.hb=function(){this.b==5?this.a.advance(4):(E(`Invalid wire type for skipFixed32Field`),this.C())},z.prototype.skipFixed32Field=z.prototype.hb,z.prototype.ib=function(){this.b==1?this.a.advance(8):(E(`Invalid wire type for skipFixed64Field`),this.C())},z.prototype.skipFixed64Field=z.prototype.ib,z.prototype.jb=function(){var e=this.c;do{if(!this.oa()){E(`Unmatched start-group tag: stream EOF`),this.h=!0;break}if(this.b==4){this.c!=e&&(E(`Unmatched end-group tag`),this.h=!0);break}this.C()}while(1)},z.prototype.skipGroup=z.prototype.jb,z.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:E(`Invalid wire encoding for field.`)}},z.prototype.skipField=z.prototype.C,z.prototype.Hc=function(e,t){this.v===null&&(this.v={}),C(!this.v[e]),this.v[e]=t},z.prototype.registerReadCallback=z.prototype.Hc,z.prototype.Ic=function(e){return C(this.v!==null),e=this.v[e],C(e),e(this)},z.prototype.runReadCallback=z.prototype.Ic,z.prototype.Yb=function(e,t){C(this.b==2);var n=this.a.c,r=this.a.o();r=this.a.B()+r,this.a.setEnd(r),t(e,this),this.a.Ma(r),this.a.setEnd(n)},z.prototype.readMessage=z.prototype.Yb,z.prototype.Ub=function(e,t,n){C(this.b==3),C(this.c==e),n(t,this),this.h||this.b==4||(E(`Group submessage did not end with an END_GROUP tag`),this.h=!0)},z.prototype.readGroup=z.prototype.Ub,z.prototype.Gb=function(){C(this.b==2);var e=this.a.o(),t=this.a.B(),n=t+e;return e=Ae(this.a.Y(),t,e),this.a.Ma(n),e},z.prototype.getFieldDecoder=z.prototype.Gb,z.prototype.P=function(){return C(this.b==0),this.a.da()},z.prototype.readInt32=z.prototype.P,z.prototype.Wb=function(){return C(this.b==0),this.a.Ea()},z.prototype.readInt32String=z.prototype.Wb,z.prototype.ba=function(){return C(this.b==0),this.a.sa()},z.prototype.readInt64=z.prototype.ba,z.prototype.ca=function(){return C(this.b==0),this.a.Fa()},z.prototype.readInt64String=z.prototype.ca,z.prototype.m=function(){return C(this.b==0),this.a.o()},z.prototype.readUint32=z.prototype.m,z.prototype.Fc=function(){return C(this.b==0),this.a.O()},z.prototype.readUint32String=z.prototype.Fc,z.prototype.ga=function(){return C(this.b==0),this.a.Ga()},z.prototype.readUint64=z.prototype.ga,z.prototype.ha=function(){return C(this.b==0),this.a.Ha()},z.prototype.readUint64String=z.prototype.ha,z.prototype.zc=function(){return C(this.b==0),this.a.Ia()},z.prototype.readSint32=z.prototype.zc,z.prototype.Ac=function(){return C(this.b==0),this.a.Ja()},z.prototype.readSint64=z.prototype.Ac,z.prototype.Bc=function(){return C(this.b==0),this.a.Ka()},z.prototype.readSint64String=z.prototype.Bc,z.prototype.Rb=function(){return C(this.b==5),this.a.m()},z.prototype.readFixed32=z.prototype.Rb,z.prototype.Sb=function(){return C(this.b==1),this.a.ga()},z.prototype.readFixed64=z.prototype.Sb,z.prototype.Tb=function(){return C(this.b==1),this.a.ha()},z.prototype.readFixed64String=z.prototype.Tb,z.prototype.vc=function(){return C(this.b==5),this.a.P()},z.prototype.readSfixed32=z.prototype.vc,z.prototype.wc=function(){return C(this.b==5),this.a.P().toString()},z.prototype.readSfixed32String=z.prototype.wc,z.prototype.xc=function(){return C(this.b==1),this.a.ba()},z.prototype.readSfixed64=z.prototype.xc,z.prototype.yc=function(){return C(this.b==1),this.a.ca()},z.prototype.readSfixed64String=z.prototype.yc,z.prototype.aa=function(){return C(this.b==5),this.a.aa()},z.prototype.readFloat=z.prototype.aa,z.prototype.Z=function(){return C(this.b==1),this.a.Z()},z.prototype.readDouble=z.prototype.Z,z.prototype.pa=function(){return C(this.b==0),!!this.a.o()},z.prototype.readBool=z.prototype.pa,z.prototype.ra=function(){return C(this.b==0),this.a.sa()},z.prototype.readEnum=z.prototype.ra,z.prototype.fa=function(){C(this.b==2);var e=this.a.o();return this.a.fa(e)},z.prototype.readString=z.prototype.fa,z.prototype.qa=function(){C(this.b==2);var e=this.a.o();return this.a.qa(e)},z.prototype.readBytes=z.prototype.qa,z.prototype.ia=function(){return C(this.b==0),this.a.ia()},z.prototype.readVarintHash64=z.prototype.ia,z.prototype.Cc=function(){return C(this.b==0),this.a.fb()},z.prototype.readSintHash64=z.prototype.Cc,z.prototype.w=function(e){return C(this.b==0),this.a.w(e)},z.prototype.readSplitVarint64=z.prototype.w,z.prototype.ea=function(e){return C(this.b==0),this.a.w(function(t,n){return ve(t,n,e)})},z.prototype.readSplitZigzagVarint64=z.prototype.ea,z.prototype.$=function(){return C(this.b==1),this.a.$()},z.prototype.readFixedHash64=z.prototype.$,z.prototype.ta=function(e){return C(this.b==1),this.a.ta(e)},z.prototype.readSplitFixed64=z.prototype.ta;function Ne(e,t){C(e.b==2);var n=e.a.o();n=e.a.B()+n;for(var r=[];e.a.B()<n;)r.push(t.call(e.a));return r}z.prototype.gc=function(){return Ne(this,this.a.da)},z.prototype.readPackedInt32=z.prototype.gc,z.prototype.hc=function(){return Ne(this,this.a.Ea)},z.prototype.readPackedInt32String=z.prototype.hc,z.prototype.ic=function(){return Ne(this,this.a.sa)},z.prototype.readPackedInt64=z.prototype.ic,z.prototype.jc=function(){return Ne(this,this.a.Fa)},z.prototype.readPackedInt64String=z.prototype.jc,z.prototype.qc=function(){return Ne(this,this.a.o)},z.prototype.readPackedUint32=z.prototype.qc,z.prototype.rc=function(){return Ne(this,this.a.O)},z.prototype.readPackedUint32String=z.prototype.rc,z.prototype.sc=function(){return Ne(this,this.a.Ga)},z.prototype.readPackedUint64=z.prototype.sc,z.prototype.tc=function(){return Ne(this,this.a.Ha)},z.prototype.readPackedUint64String=z.prototype.tc,z.prototype.nc=function(){return Ne(this,this.a.Ia)},z.prototype.readPackedSint32=z.prototype.nc,z.prototype.oc=function(){return Ne(this,this.a.Ja)},z.prototype.readPackedSint64=z.prototype.oc,z.prototype.pc=function(){return Ne(this,this.a.Ka)},z.prototype.readPackedSint64String=z.prototype.pc,z.prototype.bc=function(){return Ne(this,this.a.m)},z.prototype.readPackedFixed32=z.prototype.bc,z.prototype.cc=function(){return Ne(this,this.a.ga)},z.prototype.readPackedFixed64=z.prototype.cc,z.prototype.dc=function(){return Ne(this,this.a.ha)},z.prototype.readPackedFixed64String=z.prototype.dc,z.prototype.kc=function(){return Ne(this,this.a.P)},z.prototype.readPackedSfixed32=z.prototype.kc,z.prototype.lc=function(){return Ne(this,this.a.ba)},z.prototype.readPackedSfixed64=z.prototype.lc,z.prototype.mc=function(){return Ne(this,this.a.ca)},z.prototype.readPackedSfixed64String=z.prototype.mc,z.prototype.fc=function(){return Ne(this,this.a.aa)},z.prototype.readPackedFloat=z.prototype.fc,z.prototype.$b=function(){return Ne(this,this.a.Z)},z.prototype.readPackedDouble=z.prototype.$b,z.prototype.Zb=function(){return Ne(this,this.a.pa)},z.prototype.readPackedBool=z.prototype.Zb,z.prototype.ac=function(){return Ne(this,this.a.ra)},z.prototype.readPackedEnum=z.prototype.ac,z.prototype.uc=function(){return Ne(this,this.a.ia)},z.prototype.readPackedVarintHash64=z.prototype.uc,z.prototype.ec=function(){return Ne(this,this.a.$)},z.prototype.readPackedFixedHash64=z.prototype.ec;function Pe(e,t,n,r,i){this.ma=e,this.Ba=t,this.la=n,this.Na=r,this.na=i}f(`jspb.ExtensionFieldInfo`,Pe,void 0);function Fe(e,t,n,r,i,a){this.Za=e,this.za=t,this.Aa=n,this.Wa=r,this.Ab=i,this.Nb=a}f(`jspb.ExtensionFieldBinaryInfo`,Fe,void 0),Pe.prototype.F=function(){return!!this.la},Pe.prototype.isMessageType=Pe.prototype.F;function B(){}f(`jspb.Message`,B,void 0),B.GENERATE_TO_OBJECT=!0,B.GENERATE_FROM_OBJECT=!0;var Ie=typeof Uint8Array==`function`;B.prototype.Ib=function(){return this.b},B.prototype.getJsPbMessageId=B.prototype.Ib,B.initialize=function(e,t,n,r,i,a){e.f=null,t||=n?[n]:[],e.b=n?String(n):void 0,e.D=n===0?-1:0,e.u=t;a:{if(n=e.u.length,t=-1,n&&(t=n-1,n=e.u[t],!(typeof n!=`object`||!n||Array.isArray(n)||Ie&&n instanceof Uint8Array))){e.G=t-e.D,e.i=n;break a}-1<r?(e.G=Math.max(r,t+1-e.D),e.i=null):e.G=Number.MAX_VALUE}if(e.a={},i)for(r=0;r<i.length;r++)t=i[r],t<e.G?(t+=e.D,e.u[t]=e.u[t]||Le):(Re(e),e.i[t]=e.i[t]||Le);if(a&&a.length)for(r=0;r<a.length;r++)Xe(e,a[r])};var Le=Object.freeze?Object.freeze([]):[];function Re(e){var t=e.G+e.D;e.u[t]||(e.i=e.u[t]={})}function ze(e,t,n){for(var r=[],i=0;i<e.length;i++)r[i]=t.call(e[i],n,e[i]);return r}B.toObjectList=ze,B.toObjectExtension=function(e,t,n,r,i){for(var a in n){var o=n[a],s=r.call(e,o);if(s!=null){for(var c in o.Ba)if(o.Ba.hasOwnProperty(c))break;t[c]=o.Na?o.na?ze(s,o.Na,i):o.Na(i,s):s}}},B.serializeBinaryExtensions=function(e,t,n,r){for(var i in n){var a=n[i],o=a.Za;if(!a.Aa)throw Error(`Message extension present that was generated without binary serialization support`);var s=r.call(e,o);if(s!=null)if(o.F())if(a.Wa)a.Aa.call(t,o.ma,s,a.Wa);else throw Error(`Message extension present holding submessage without binary support enabled, and message is being serialized to binary format`);else a.Aa.call(t,o.ma,s)}},B.readBinaryExtension=function(e,t,n,r,i){var a=n[t.c];if(a){if(n=a.Za,!a.za)throw Error(`Deserializing extension whose generated code does not support binary format`);if(n.F()){var o=new n.la;a.za.call(t,o,a.Ab)}else o=a.za.call(t);n.na&&!a.Nb?(t=r.call(e,n))?t.push(o):i.call(e,n,[o]):i.call(e,n,o)}else t.C()};function Be(e,t){if(t<e.G){t+=e.D;var n=e.u[t];return n===Le?e.u[t]=[]:n}if(e.i)return n=e.i[t],n===Le?e.i[t]=[]:n}B.getField=Be,B.getRepeatedField=function(e,t){return Be(e,t)};function Ve(e,t){return e=Be(e,t),e==null?e:+e}B.getOptionalFloatingPointField=Ve;function He(e,t){return e=Be(e,t),e==null?e:!!e}B.getBooleanField=He,B.getRepeatedFloatingPointField=function(e,t){var n=Be(e,t);if(e.a||={},!e.a[t]){for(var r=0;r<n.length;r++)n[r]=+n[r];e.a[t]=!0}return n},B.getRepeatedBooleanField=function(e,t){var n=Be(e,t);if(e.a||={},!e.a[t]){for(var r=0;r<n.length;r++)n[r]=!!n[r];e.a[t]=!0}return n};function Ue(e){return e==null||typeof e==`string`?e:Ie&&e instanceof Uint8Array?re(e):(E(`Cannot coerce to b64 string: `+p(e)),null)}B.bytesAsB64=Ue;function We(e){return e==null||e instanceof Uint8Array?e:typeof e==`string`?ie(e):(E(`Cannot coerce to Uint8Array: `+p(e)),null)}B.bytesAsU8=We,B.bytesListAsB64=function(e){return Ge(e),e.length&&typeof e[0]!=`string`?b(e,Ue):e},B.bytesListAsU8=function(e){return Ge(e),!e.length||e[0]instanceof Uint8Array?e:b(e,We)};function Ge(e){if(e&&1<e.length){var t=p(e[0]);y(e,function(e){p(e)!=t&&E(`Inconsistent type in JSPB repeated field array. Got `+p(e)+` expected `+t)})}}function Ke(e,t,n){return e=Be(e,t),e??n}B.getFieldWithDefault=Ke,B.getBooleanFieldWithDefault=function(e,t,n){return e=He(e,t),e??n},B.getFloatingPointFieldWithDefault=function(e,t,n){return e=Ve(e,t),e??n},B.getFieldProto3=Ke,B.getMapField=function(e,t,n,r){if(e.f||={},t in e.f)return e.f[t];var i=Be(e,t);if(!i){if(n)return;i=[],qe(e,t,i)}return e.f[t]=new k(i,r)};function qe(e,t,n){return D(e,B),t<e.G?e.u[t+e.D]=n:(Re(e),e.i[t]=n),e}B.setField=qe,B.setProto3IntField=function(e,t,n){return Je(e,t,n,0)},B.setProto3FloatField=function(e,t,n){return Je(e,t,n,0)},B.setProto3BooleanField=function(e,t,n){return Je(e,t,n,!1)},B.setProto3StringField=function(e,t,n){return Je(e,t,n,``)},B.setProto3BytesField=function(e,t,n){return Je(e,t,n,``)},B.setProto3EnumField=function(e,t,n){return Je(e,t,n,0)},B.setProto3StringIntField=function(e,t,n){return Je(e,t,n,`0`)};function Je(e,t,n,r){return D(e,B),n===r?t<e.G?e.u[t+e.D]=null:(Re(e),delete e.i[t]):qe(e,t,n),e}B.addToRepeatedField=function(e,t,n,r){return D(e,B),t=Be(e,t),r==null?t.push(n):t.splice(r,0,n),e};function Ye(e,t,n,r){return D(e,B),(n=Xe(e,n))&&n!==t&&r!==void 0&&(e.f&&n in e.f&&(e.f[n]=void 0),qe(e,n,void 0)),qe(e,t,r)}B.setOneofField=Ye;function Xe(e,t){for(var n,r,i=0;i<t.length;i++){var a=t[i],o=Be(e,a);o!=null&&(n=a,r=o,qe(e,a,void 0))}return n?(qe(e,n,r),n):0}B.computeOneofCase=Xe,B.getWrapperField=function(e,t,n,r){if(e.f||={},!e.f[n]){var i=Be(e,n);(r||i)&&(e.f[n]=new t(i))}return e.f[n]},B.getRepeatedWrapperField=function(e,t,n){return Ze(e,t,n),t=e.f[n],t==Le&&(t=e.f[n]=[]),t};function Ze(e,t,n){if(e.f||={},!e.f[n]){for(var r=Be(e,n),i=[],a=0;a<r.length;a++)i[a]=new t(r[a]);e.f[n]=i}}B.setWrapperField=function(e,t,n){D(e,B),e.f||={};var r=n&&n.g();return e.f[t]=n,qe(e,t,r)},B.setOneofWrapperField=function(e,t,n,r){D(e,B),e.f||={};var i=r&&r.g();return e.f[t]=r,Ye(e,t,n,i)},B.setRepeatedWrapperField=function(e,t,n){D(e,B),e.f||={},n||=[];for(var r=[],i=0;i<n.length;i++)r[i]=n[i].g();return e.f[t]=n,qe(e,t,r)},B.addToRepeatedWrapperField=function(e,t,n,r,i){Ze(e,r,t);var a=e.f[t];return a||=e.f[t]=[],n||=new r,e=Be(e,t),i==null?(a.push(n),e.push(n.g())):(a.splice(i,0,n),e.splice(i,0,n.g())),n},B.toMap=function(e,t,n,r){for(var i={},a=0;a<e.length;a++)i[t.call(e[a])]=n?n.call(e[a],r,e[a]):e[a];return i};function Qe(e){if(e.f)for(var t in e.f){var n=e.f[t];if(Array.isArray(n))for(var r=0;r<n.length;r++)n[r]&&n[r].g();else n&&n.g()}}B.prototype.g=function(){return Qe(this),this.u},B.prototype.toArray=B.prototype.g,B.prototype.toString=function(){return Qe(this),this.u.toString()},B.prototype.getExtension=function(e){if(this.i){this.f||={};var t=e.ma;if(e.na){if(e.F())return this.f[t]||(this.f[t]=b(this.i[t]||[],function(t){return new e.la(t)})),this.f[t]}else if(e.F())return!this.f[t]&&this.i[t]&&(this.f[t]=new e.la(this.i[t])),this.f[t];return this.i[t]}},B.prototype.getExtension=B.prototype.getExtension,B.prototype.Kc=function(e,t){this.f||={},Re(this);var n=e.ma;return e.na?(t||=[],e.F()?(this.f[n]=t,this.i[n]=b(t,function(e){return e.g()})):this.i[n]=t):e.F()?(this.f[n]=t,this.i[n]=t&&t.g()):this.i[n]=t,this},B.prototype.setExtension=B.prototype.Kc,B.difference=function(e,t){if(!(e instanceof t.constructor))throw Error(`Messages have different types.`);var n=e.g();t=t.g();var r=[],i=0,a=n.length>t.length?n.length:t.length;for(e.b&&(r[0]=e.b,i=1);i<a;i++)et(n[i],t[i])||(r[i]=t[i]);return new e.constructor(r)},B.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&et(e.g(),t.g())};function $e(e,t){e||={},t||={};var n={},r;for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!et(e[r],t[r]))return!1;return!0}B.compareExtensions=$e;function et(e,t){if(e==t)return!0;if(!m(e)||!m(t))return typeof e==`number`&&isNaN(e)||typeof t==`number`&&isNaN(t)?String(e)==String(t):!1;if(e.constructor!=t.constructor)return!1;if(Ie&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}if(e.constructor===Array){var r=void 0,i=void 0,a=Math.max(e.length,t.length);for(n=0;n<a;n++){var o=e[n],s=t[n];if(o&&o.constructor==Object&&(C(r===void 0),C(n===e.length-1),r=o,o=void 0),s&&s.constructor==Object&&(C(i===void 0),C(n===t.length-1),i=s,s=void 0),!et(o,s))return!1}return r||i?(r||={},i||={},$e(r,i)):!0}if(e.constructor===Object)return $e(e,t);throw Error(`Invalid type in JSPB array`)}B.compareFields=et,B.prototype.Bb=function(){return tt(this)},B.prototype.cloneMessage=B.prototype.Bb,B.prototype.clone=function(){return tt(this)},B.prototype.clone=B.prototype.clone,B.clone=function(e){return tt(e)};function tt(e){return new e.constructor(nt(e.g()))}B.copyInto=function(e,t){D(e,B),D(t,B),C(e.constructor==t.constructor,`Copy source and target message should have the same type.`),e=tt(e);for(var n=t.g(),r=e.g(),i=n.length=0;i<r.length;i++)n[i]=r[i];t.f=e.f,t.i=e.i};function nt(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n<e.length;n++){var r=e[n];r!=null&&(t[n]=typeof r==`object`?nt(C(r)):r)}return t}if(Ie&&e instanceof Uint8Array)return new Uint8Array(e);for(n in t={},e)r=e[n],r!=null&&(t[n]=typeof r==`object`?nt(C(r)):r);return t}B.registerMessageType=function(e,t){t.we=e};var rt={dump:function(e){return D(e,B,`jspb.Message instance expected`),C(e.getExtension,`Only unobfuscated and unoptimized compilation modes supported.`),rt.X(e)}};f(`jspb.debug.dump`,rt.dump,void 0),rt.X=function(e){var t=p(e);if(t==`number`||t==`string`||t==`boolean`||t==`null`||t==`undefined`||typeof Uint8Array<`u`&&e instanceof Uint8Array)return e;if(t==`array`)return T(e),b(e,rt.X);if(e instanceof k){var n={};e=e.entries();for(var r=e.next();!r.done;r=e.next())n[r.value[0]]=rt.X(r.value[1]);return n}D(e,B,`Only messages expected: `+e),t=e.constructor;var i={$name:t.name||t.displayName};for(s in t.prototype){var a=/^get([A-Z]\w*)/.exec(s);if(a&&s!=`getExtension`&&s!=`getJsPbMessageId`){var o=`has`+a[1];(!e[o]||e[o]())&&(o=e[s](),i[rt.$a(a[1])]=rt.X(o))}}if(e.extensionObject_)return i.$extensions=`Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly`,i;for(r in t.extensions)if(/^\d+$/.test(r)){o=t.extensions[r];var s=e.getExtension(o);a=void 0,o=o.Ba;var c=[],l=0;for(a in o)c[l++]=a;a=c[0],s!=null&&(n||=i.$extensions={},n[rt.$a(a)]=rt.X(s))}return i},rt.$a=function(e){return e.replace(/^[A-Z]/,function(e){return e.toLowerCase()})};function V(){this.a=[]}f(`jspb.BinaryEncoder`,V,void 0),V.prototype.length=function(){return this.a.length},V.prototype.length=V.prototype.length,V.prototype.end=function(){var e=this.a;return this.a=[],e},V.prototype.end=V.prototype.end,V.prototype.l=function(e,t){for(C(e==Math.floor(e)),C(t==Math.floor(t)),C(0<=e&&4294967296>e),C(0<=t&&4294967296>t);0<t||127<e;)this.a.push(e&127|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.a.push(e)},V.prototype.writeSplitVarint64=V.prototype.l,V.prototype.A=function(e,t){C(e==Math.floor(e)),C(t==Math.floor(t)),C(0<=e&&4294967296>e),C(0<=t&&4294967296>t),this.s(e),this.s(t)},V.prototype.writeSplitFixed64=V.prototype.A,V.prototype.j=function(e){for(C(e==Math.floor(e)),C(0<=e&&4294967296>e);127<e;)this.a.push(e&127|128),e>>>=7;this.a.push(e)},V.prototype.writeUnsignedVarint32=V.prototype.j,V.prototype.M=function(e){if(C(e==Math.floor(e)),C(-2147483648<=e&&2147483648>e),0<=e)this.j(e);else{for(var t=0;9>t;t++)this.a.push(e&127|128),e>>=7;this.a.push(1)}},V.prototype.writeSignedVarint32=V.prototype.M,V.prototype.va=function(e){C(e==Math.floor(e)),C(0<=e&&0x10000000000000000>e),le(e),this.l(I,se)},V.prototype.writeUnsignedVarint64=V.prototype.va,V.prototype.ua=function(e){C(e==Math.floor(e)),C(-0x8000000000000000<=e&&0x8000000000000000>e),le(e),this.l(I,se)},V.prototype.writeSignedVarint64=V.prototype.ua,V.prototype.wa=function(e){C(e==Math.floor(e)),C(-2147483648<=e&&2147483648>e),this.j((e<<1^e>>31)>>>0)},V.prototype.writeZigzagVarint32=V.prototype.wa,V.prototype.xa=function(e){C(e==Math.floor(e)),C(-0x8000000000000000<=e&&0x8000000000000000>e),ue(e),this.l(I,se)},V.prototype.writeZigzagVarint64=V.prototype.xa,V.prototype.Ta=function(e){this.W(we(e))},V.prototype.writeZigzagVarint64String=V.prototype.Ta,V.prototype.W=function(e){var t=this;pe(e),ge(I,se,function(e,n){t.l(e>>>0,n>>>0)})},V.prototype.writeZigzagVarintHash64=V.prototype.W,V.prototype.be=function(e){C(e==Math.floor(e)),C(0<=e&&256>e),this.a.push(e>>>0&255)},V.prototype.writeUint8=V.prototype.be,V.prototype.ae=function(e){C(e==Math.floor(e)),C(0<=e&&65536>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},V.prototype.writeUint16=V.prototype.ae,V.prototype.s=function(e){C(e==Math.floor(e)),C(0<=e&&4294967296>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},V.prototype.writeUint32=V.prototype.s,V.prototype.V=function(e){C(e==Math.floor(e)),C(0<=e&&0x10000000000000000>e),ce(e),this.s(I),this.s(se)},V.prototype.writeUint64=V.prototype.V,V.prototype.Qc=function(e){C(e==Math.floor(e)),C(-128<=e&&128>e),this.a.push(e>>>0&255)},V.prototype.writeInt8=V.prototype.Qc,V.prototype.Pc=function(e){C(e==Math.floor(e)),C(-32768<=e&&32768>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},V.prototype.writeInt16=V.prototype.Pc,V.prototype.S=function(e){C(e==Math.floor(e)),C(-2147483648<=e&&2147483648>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},V.prototype.writeInt32=V.prototype.S,V.prototype.T=function(e){C(e==Math.floor(e)),C(-0x8000000000000000<=e&&0x8000000000000000>e),le(e),this.A(I,se)},V.prototype.writeInt64=V.prototype.T,V.prototype.ka=function(e){C(e==Math.floor(e)),C(-0x8000000000000000<=+e&&0x8000000000000000>+e),pe(we(e)),this.A(I,se)},V.prototype.writeInt64String=V.prototype.ka,V.prototype.L=function(e){C(e===1/0||e===-1/0||isNaN(e)||-34028234663852886e22<=e&&34028234663852886e22>=e),de(e),this.s(I)},V.prototype.writeFloat=V.prototype.L,V.prototype.J=function(e){C(e===1/0||e===-1/0||isNaN(e)||-17976931348623157e292<=e&&17976931348623157e292>=e),fe(e),this.s(I),this.s(se)},V.prototype.writeDouble=V.prototype.J,V.prototype.I=function(e){C(typeof e==`boolean`||typeof e==`number`),this.a.push(+!!e)},V.prototype.writeBool=V.prototype.I,V.prototype.R=function(e){C(e==Math.floor(e)),C(-2147483648<=e&&2147483648>e),this.M(e)},V.prototype.writeEnum=V.prototype.R,V.prototype.ja=function(e){this.a.push.apply(this.a,e)},V.prototype.writeBytes=V.prototype.ja,V.prototype.N=function(e){pe(e),this.l(I,se)},V.prototype.writeVarintHash64=V.prototype.N,V.prototype.K=function(e){pe(e),this.s(I),this.s(se)},V.prototype.writeFixedHash64=V.prototype.K,V.prototype.U=function(e){var t=this.a.length;w(e);for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(128>r)this.a.push(r);else if(2048>r)this.a.push(r>>6|192),this.a.push(r&63|128);else if(65536>r)if(55296<=r&&56319>=r&&n+1<e.length){var i=e.charCodeAt(n+1);56320<=i&&57343>=i&&(r=1024*(r-55296)+i-56320+65536,this.a.push(r>>18|240),this.a.push(r>>12&63|128),this.a.push(r>>6&63|128),this.a.push(r&63|128),n++)}else this.a.push(r>>12|224),this.a.push(r>>6&63|128),this.a.push(r&63|128)}return this.a.length-t},V.prototype.writeString=V.prototype.U;function H(e,t){this.lo=e,this.hi=t}f(`jspb.arith.UInt64`,H,void 0),H.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},H.prototype.cmp=H.prototype.cmp,H.prototype.La=function(){return new H((this.lo>>>1|(this.hi&1)<<31)>>>0,this.hi>>>1>>>0)},H.prototype.rightShift=H.prototype.La,H.prototype.Da=function(){return new H(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},H.prototype.leftShift=H.prototype.Da,H.prototype.cb=function(){return!!(this.hi&2147483648)},H.prototype.msb=H.prototype.cb,H.prototype.Ob=function(){return!!(this.lo&1)},H.prototype.lsb=H.prototype.Ob,H.prototype.Ua=function(){return this.lo==0&&this.hi==0},H.prototype.zero=H.prototype.Ua,H.prototype.add=function(e){return new H((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+ +(4294967296<=this.lo+e.lo)>>>0)},H.prototype.add=H.prototype.add,H.prototype.sub=function(e){return new H((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo)>>>0)},H.prototype.sub=H.prototype.sub;function it(e,t){var n=e&65535;e>>>=16;var r=t&65535,i=t>>>16;for(t=n*r+65536*(n*i&65535)+65536*(e*r&65535),n=e*i+(n*i>>>16)+(e*r>>>16);4294967296<=t;)t-=4294967296,n+=1;return new H(t>>>0,n>>>0)}H.mul32x32=it,H.prototype.eb=function(e){var t=it(this.lo,e);return e=it(this.hi,e),e.hi=e.lo,e.lo=0,t.add(e)},H.prototype.mul=H.prototype.eb,H.prototype.Xa=function(e){if(e==0)return[];var t=new H(0,0),n=new H(this.lo,this.hi);e=new H(e,0);for(var r=new H(1,0);!e.cb();)e=e.Da(),r=r.Da();for(;!r.Ua();)0>=e.cmp(n)&&(t=t.add(r),n=n.sub(e)),e=e.La(),r=r.La();return[t,n]},H.prototype.div=H.prototype.Xa,H.prototype.toString=function(){for(var e=``,t=this;!t.Ua();){t=t.Xa(10);var n=t[0];e=t[1].lo+e,t=n}return e==``&&(e=`0`),e},H.prototype.toString=H.prototype.toString;function at(e){for(var t=new H(0,0),n=new H(0,0),r=0;r<e.length;r++){if(`0`>e[r]||`9`<e[r])return null;n.lo=parseInt(e[r],10),t=t.eb(10).add(n)}return t}H.fromString=at,H.prototype.clone=function(){return new H(this.lo,this.hi)},H.prototype.clone=H.prototype.clone;function ot(e,t){this.lo=e,this.hi=t}f(`jspb.arith.Int64`,ot,void 0),ot.prototype.add=function(e){return new ot((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+ +(4294967296<=this.lo+e.lo)>>>0)},ot.prototype.add=ot.prototype.add,ot.prototype.sub=function(e){return new ot((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo)>>>0)},ot.prototype.sub=ot.prototype.sub,ot.prototype.clone=function(){return new ot(this.lo,this.hi)},ot.prototype.clone=ot.prototype.clone,ot.prototype.toString=function(){var e=(this.hi&2147483648)!=0,t=new H(this.lo,this.hi);return e&&(t=new H(0,0).sub(t)),(e?`-`:``)+t.toString()},ot.prototype.toString=ot.prototype.toString;function st(e){var t=0<e.length&&e[0]==`-`;return t&&(e=e.substring(1)),e=at(e),e===null?null:(t&&(e=new H(0,0).sub(e)),new ot(e.lo,e.hi))}ot.fromString=st;function U(){this.c=[],this.b=0,this.a=new V,this.h=[]}f(`jspb.BinaryWriter`,U,void 0);function W(e,t){var n=e.a.end();e.c.push(n),e.c.push(t),e.b+=n.length+t.length}function ct(e,t){return ut(e,t,2),t=e.a.end(),e.c.push(t),e.b+=t.length,t.push(e.b),t}function lt(e,t){var n=t.pop();for(n=e.b+e.a.length()-n,C(0<=n);127<n;)t.push(n&127|128),n>>>=7,e.b++;t.push(n),e.b++}U.prototype.pb=function(e,t,n){W(this,e.subarray(t,n))},U.prototype.writeSerializedMessage=U.prototype.pb,U.prototype.Pb=function(e,t,n){e!=null&&t!=null&&n!=null&&this.pb(e,t,n)},U.prototype.maybeWriteSerializedMessage=U.prototype.Pb,U.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]},U.prototype.reset=U.prototype.reset,U.prototype.ab=function(){C(this.h.length==0);for(var e=new Uint8Array(this.b+this.a.length()),t=this.c,n=t.length,r=0,i=0;i<n;i++){var a=t[i];e.set(a,r),r+=a.length}return t=this.a.end(),e.set(t,r),r+=t.length,C(r==e.length),this.c=[e],e},U.prototype.getResultBuffer=U.prototype.ab,U.prototype.Kb=function(e){return re(this.ab(),e)},U.prototype.getResultBase64String=U.prototype.Kb,U.prototype.Va=function(e){this.h.push(ct(this,e))},U.prototype.beginSubMessage=U.prototype.Va,U.prototype.Ya=function(){C(0<=this.h.length),lt(this,this.h.pop())},U.prototype.endSubMessage=U.prototype.Ya;function ut(e,t,n){C(1<=t&&t==Math.floor(t)),e.a.j(8*t+n)}U.prototype.Nc=function(e,t,n){switch(e){case 1:this.J(t,n);break;case 2:this.L(t,n);break;case 3:this.T(t,n);break;case 4:this.V(t,n);break;case 5:this.S(t,n);break;case 6:this.Qa(t,n);break;case 7:this.Pa(t,n);break;case 8:this.I(t,n);break;case 9:this.U(t,n);break;case 10:E(`Group field type not supported in writeAny()`);break;case 11:E(`Message field type not supported in writeAny()`);break;case 12:this.ja(t,n);break;case 13:this.s(t,n);break;case 14:this.R(t,n);break;case 15:this.Ra(t,n);break;case 16:this.Sa(t,n);break;case 17:this.rb(t,n);break;case 18:this.sb(t,n);break;case 30:this.K(t,n);break;case 31:this.N(t,n);break;default:E(`Invalid field type in writeAny()`)}},U.prototype.writeAny=U.prototype.Nc;function dt(e,t,n){n!=null&&(ut(e,t,0),e.a.j(n))}function ft(e,t,n){n!=null&&(ut(e,t,0),e.a.M(n))}U.prototype.S=function(e,t){t!=null&&(C(-2147483648<=t&&2147483648>t),ft(this,e,t))},U.prototype.writeInt32=U.prototype.S,U.prototype.ob=function(e,t){t!=null&&(t=parseInt(t,10),C(-2147483648<=t&&2147483648>t),ft(this,e,t))},U.prototype.writeInt32String=U.prototype.ob,U.prototype.T=function(e,t){t!=null&&(C(-0x8000000000000000<=t&&0x8000000000000000>t),t!=null&&(ut(this,e,0),this.a.ua(t)))},U.prototype.writeInt64=U.prototype.T,U.prototype.ka=function(e,t){t!=null&&(t=st(t),ut(this,e,0),this.a.l(t.lo,t.hi))},U.prototype.writeInt64String=U.prototype.ka,U.prototype.s=function(e,t){t!=null&&(C(0<=t&&4294967296>t),dt(this,e,t))},U.prototype.writeUint32=U.prototype.s,U.prototype.ub=function(e,t){t!=null&&(t=parseInt(t,10),C(0<=t&&4294967296>t),dt(this,e,t))},U.prototype.writeUint32String=U.prototype.ub,U.prototype.V=function(e,t){t!=null&&(C(0<=t&&0x10000000000000000>t),t!=null&&(ut(this,e,0),this.a.va(t)))},U.prototype.writeUint64=U.prototype.V,U.prototype.vb=function(e,t){t!=null&&(t=at(t),ut(this,e,0),this.a.l(t.lo,t.hi))},U.prototype.writeUint64String=U.prototype.vb,U.prototype.rb=function(e,t){t!=null&&(C(-2147483648<=t&&2147483648>t),t!=null&&(ut(this,e,0),this.a.wa(t)))},U.prototype.writeSint32=U.prototype.rb,U.prototype.sb=function(e,t){t!=null&&(C(-0x8000000000000000<=t&&0x8000000000000000>t),t!=null&&(ut(this,e,0),this.a.xa(t)))},U.prototype.writeSint64=U.prototype.sb,U.prototype.$d=function(e,t){t!=null&&t!=null&&(ut(this,e,0),this.a.W(t))},U.prototype.writeSintHash64=U.prototype.$d,U.prototype.Zd=function(e,t){t!=null&&t!=null&&(ut(this,e,0),this.a.Ta(t))},U.prototype.writeSint64String=U.prototype.Zd,U.prototype.Pa=function(e,t){t!=null&&(C(0<=t&&4294967296>t),ut(this,e,5),this.a.s(t))},U.prototype.writeFixed32=U.prototype.Pa,U.prototype.Qa=function(e,t){t!=null&&(C(0<=t&&0x10000000000000000>t),ut(this,e,1),this.a.V(t))},U.prototype.writeFixed64=U.prototype.Qa,U.prototype.nb=function(e,t){t!=null&&(t=at(t),ut(this,e,1),this.a.A(t.lo,t.hi))},U.prototype.writeFixed64String=U.prototype.nb,U.prototype.Ra=function(e,t){t!=null&&(C(-2147483648<=t&&2147483648>t),ut(this,e,5),this.a.S(t))},U.prototype.writeSfixed32=U.prototype.Ra,U.prototype.Sa=function(e,t){t!=null&&(C(-0x8000000000000000<=t&&0x8000000000000000>t),ut(this,e,1),this.a.T(t))},U.prototype.writeSfixed64=U.prototype.Sa,U.prototype.qb=function(e,t){t!=null&&(t=st(t),ut(this,e,1),this.a.A(t.lo,t.hi))},U.prototype.writeSfixed64String=U.prototype.qb,U.prototype.L=function(e,t){t!=null&&(ut(this,e,5),this.a.L(t))},U.prototype.writeFloat=U.prototype.L,U.prototype.J=function(e,t){t!=null&&(ut(this,e,1),this.a.J(t))},U.prototype.writeDouble=U.prototype.J,U.prototype.I=function(e,t){t!=null&&(C(typeof t==`boolean`||typeof t==`number`),ut(this,e,0),this.a.I(t))},U.prototype.writeBool=U.prototype.I,U.prototype.R=function(e,t){t!=null&&(C(-2147483648<=t&&2147483648>t),ut(this,e,0),this.a.M(t))},U.prototype.writeEnum=U.prototype.R,U.prototype.U=function(e,t){t!=null&&(e=ct(this,e),this.a.U(t),lt(this,e))},U.prototype.writeString=U.prototype.U,U.prototype.ja=function(e,t){t!=null&&(t=Oe(t),ut(this,e,2),this.a.j(t.length),W(this,t))},U.prototype.writeBytes=U.prototype.ja,U.prototype.Rc=function(e,t,n){t!=null&&(e=ct(this,e),n(t,this),lt(this,e))},U.prototype.writeMessage=U.prototype.Rc,U.prototype.Sc=function(e,t,n){t!=null&&(ut(this,1,3),ut(this,2,0),this.a.M(e),e=ct(this,3),n(t,this),lt(this,e),ut(this,1,4))},U.prototype.writeMessageSet=U.prototype.Sc,U.prototype.Oc=function(e,t,n){t!=null&&(ut(this,e,3),n(t,this),ut(this,e,4))},U.prototype.writeGroup=U.prototype.Oc,U.prototype.K=function(e,t){t!=null&&(C(t.length==8),ut(this,e,1),this.a.K(t))},U.prototype.writeFixedHash64=U.prototype.K,U.prototype.N=function(e,t){t!=null&&(C(t.length==8),ut(this,e,0),this.a.N(t))},U.prototype.writeVarintHash64=U.prototype.N,U.prototype.A=function(e,t,n){ut(this,e,1),this.a.A(t,n)},U.prototype.writeSplitFixed64=U.prototype.A,U.prototype.l=function(e,t,n){ut(this,e,0),this.a.l(t,n)},U.prototype.writeSplitVarint64=U.prototype.l,U.prototype.tb=function(e,t,n){ut(this,e,0);var r=this.a;ge(t,n,function(e,t){r.l(e>>>0,t>>>0)})},U.prototype.writeSplitZigzagVarint64=U.prototype.tb,U.prototype.Ed=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)ft(this,e,t[n])},U.prototype.writeRepeatedInt32=U.prototype.Ed,U.prototype.Fd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.ob(e,t[n])},U.prototype.writeRepeatedInt32String=U.prototype.Fd,U.prototype.Gd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++){var r=t[n];r!=null&&(ut(this,e,0),this.a.ua(r))}},U.prototype.writeRepeatedInt64=U.prototype.Gd,U.prototype.Qd=function(e,t,n,r){if(t!=null)for(var i=0;i<t.length;i++)this.A(e,n(t[i]),r(t[i]))},U.prototype.writeRepeatedSplitFixed64=U.prototype.Qd,U.prototype.Rd=function(e,t,n,r){if(t!=null)for(var i=0;i<t.length;i++)this.l(e,n(t[i]),r(t[i]))},U.prototype.writeRepeatedSplitVarint64=U.prototype.Rd,U.prototype.Sd=function(e,t,n,r){if(t!=null)for(var i=0;i<t.length;i++)this.tb(e,n(t[i]),r(t[i]))},U.prototype.writeRepeatedSplitZigzagVarint64=U.prototype.Sd,U.prototype.Hd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.ka(e,t[n])},U.prototype.writeRepeatedInt64String=U.prototype.Hd,U.prototype.Ud=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)dt(this,e,t[n])},U.prototype.writeRepeatedUint32=U.prototype.Ud,U.prototype.Vd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.ub(e,t[n])},U.prototype.writeRepeatedUint32String=U.prototype.Vd,U.prototype.Wd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++){var r=t[n];r!=null&&(ut(this,e,0),this.a.va(r))}},U.prototype.writeRepeatedUint64=U.prototype.Wd,U.prototype.Xd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.vb(e,t[n])},U.prototype.writeRepeatedUint64String=U.prototype.Xd,U.prototype.Md=function(e,t){if(t!=null)for(var n=0;n<t.length;n++){var r=t[n];r!=null&&(ut(this,e,0),this.a.wa(r))}},U.prototype.writeRepeatedSint32=U.prototype.Md,U.prototype.Nd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++){var r=t[n];r!=null&&(ut(this,e,0),this.a.xa(r))}},U.prototype.writeRepeatedSint64=U.prototype.Nd,U.prototype.Od=function(e,t){if(t!=null)for(var n=0;n<t.length;n++){var r=t[n];r!=null&&(ut(this,e,0),this.a.Ta(r))}},U.prototype.writeRepeatedSint64String=U.prototype.Od,U.prototype.Pd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++){var r=t[n];r!=null&&(ut(this,e,0),this.a.W(r))}},U.prototype.writeRepeatedSintHash64=U.prototype.Pd,U.prototype.yd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.Pa(e,t[n])},U.prototype.writeRepeatedFixed32=U.prototype.yd,U.prototype.zd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.Qa(e,t[n])},U.prototype.writeRepeatedFixed64=U.prototype.zd,U.prototype.Ad=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.nb(e,t[n])},U.prototype.writeRepeatedFixed64String=U.prototype.Ad,U.prototype.Jd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.Ra(e,t[n])},U.prototype.writeRepeatedSfixed32=U.prototype.Jd,U.prototype.Kd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.Sa(e,t[n])},U.prototype.writeRepeatedSfixed64=U.prototype.Kd,U.prototype.Ld=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.qb(e,t[n])},U.prototype.writeRepeatedSfixed64String=U.prototype.Ld,U.prototype.Cd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.L(e,t[n])},U.prototype.writeRepeatedFloat=U.prototype.Cd,U.prototype.wd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.J(e,t[n])},U.prototype.writeRepeatedDouble=U.prototype.wd,U.prototype.ud=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.I(e,t[n])},U.prototype.writeRepeatedBool=U.prototype.ud,U.prototype.xd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.R(e,t[n])},U.prototype.writeRepeatedEnum=U.prototype.xd,U.prototype.Td=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.U(e,t[n])},U.prototype.writeRepeatedString=U.prototype.Td,U.prototype.vd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.ja(e,t[n])},U.prototype.writeRepeatedBytes=U.prototype.vd,U.prototype.Id=function(e,t,n){if(t!=null)for(var r=0;r<t.length;r++){var i=ct(this,e);n(t[r],this),lt(this,i)}},U.prototype.writeRepeatedMessage=U.prototype.Id,U.prototype.Dd=function(e,t,n){if(t!=null)for(var r=0;r<t.length;r++)ut(this,e,3),n(t[r],this),ut(this,e,4)},U.prototype.writeRepeatedGroup=U.prototype.Dd,U.prototype.Bd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.K(e,t[n])},U.prototype.writeRepeatedFixedHash64=U.prototype.Bd,U.prototype.Yd=function(e,t){if(t!=null)for(var n=0;n<t.length;n++)this.N(e,t[n])},U.prototype.writeRepeatedVarintHash64=U.prototype.Yd,U.prototype.ad=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.M(t[n]);lt(this,e)}},U.prototype.writePackedInt32=U.prototype.ad,U.prototype.bd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.M(parseInt(t[n],10));lt(this,e)}},U.prototype.writePackedInt32String=U.prototype.bd,U.prototype.cd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.ua(t[n]);lt(this,e)}},U.prototype.writePackedInt64=U.prototype.cd,U.prototype.md=function(e,t,n,r){if(t!=null){e=ct(this,e);for(var i=0;i<t.length;i++)this.a.A(n(t[i]),r(t[i]));lt(this,e)}},U.prototype.writePackedSplitFixed64=U.prototype.md,U.prototype.nd=function(e,t,n,r){if(t!=null){e=ct(this,e);for(var i=0;i<t.length;i++)this.a.l(n(t[i]),r(t[i]));lt(this,e)}},U.prototype.writePackedSplitVarint64=U.prototype.nd,U.prototype.od=function(e,t,n,r){if(t!=null){e=ct(this,e);for(var i=this.a,a=0;a<t.length;a++)ge(n(t[a]),r(t[a]),function(e,t){i.l(e>>>0,t>>>0)});lt(this,e)}},U.prototype.writePackedSplitZigzagVarint64=U.prototype.od,U.prototype.dd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++){var r=st(t[n]);this.a.l(r.lo,r.hi)}lt(this,e)}},U.prototype.writePackedInt64String=U.prototype.dd,U.prototype.pd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.j(t[n]);lt(this,e)}},U.prototype.writePackedUint32=U.prototype.pd,U.prototype.qd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.j(parseInt(t[n],10));lt(this,e)}},U.prototype.writePackedUint32String=U.prototype.qd,U.prototype.rd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.va(t[n]);lt(this,e)}},U.prototype.writePackedUint64=U.prototype.rd,U.prototype.sd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++){var r=at(t[n]);this.a.l(r.lo,r.hi)}lt(this,e)}},U.prototype.writePackedUint64String=U.prototype.sd,U.prototype.hd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.wa(t[n]);lt(this,e)}},U.prototype.writePackedSint32=U.prototype.hd,U.prototype.jd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.xa(t[n]);lt(this,e)}},U.prototype.writePackedSint64=U.prototype.jd,U.prototype.kd=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.W(we(t[n]));lt(this,e)}},U.prototype.writePackedSint64String=U.prototype.kd,U.prototype.ld=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.W(t[n]);lt(this,e)}},U.prototype.writePackedSintHash64=U.prototype.ld,U.prototype.Wc=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.s(t[e])},U.prototype.writePackedFixed32=U.prototype.Wc,U.prototype.Xc=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.V(t[e])},U.prototype.writePackedFixed64=U.prototype.Xc,U.prototype.Yc=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++){var n=at(t[e]);this.a.A(n.lo,n.hi)}},U.prototype.writePackedFixed64String=U.prototype.Yc,U.prototype.ed=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.S(t[e])},U.prototype.writePackedSfixed32=U.prototype.ed,U.prototype.fd=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.T(t[e])},U.prototype.writePackedSfixed64=U.prototype.fd,U.prototype.gd=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.ka(t[e])},U.prototype.writePackedSfixed64String=U.prototype.gd,U.prototype.$c=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.L(t[e])},U.prototype.writePackedFloat=U.prototype.$c,U.prototype.Uc=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.J(t[e])},U.prototype.writePackedDouble=U.prototype.Uc,U.prototype.Tc=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(t.length),e=0;e<t.length;e++)this.a.I(t[e])},U.prototype.writePackedBool=U.prototype.Tc,U.prototype.Vc=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.R(t[n]);lt(this,e)}},U.prototype.writePackedEnum=U.prototype.Vc,U.prototype.Zc=function(e,t){if(t!=null&&t.length)for(ut(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.K(t[e])},U.prototype.writePackedFixedHash64=U.prototype.Zc,U.prototype.td=function(e,t){if(t!=null&&t.length){e=ct(this,e);for(var n=0;n<t.length;n++)this.a.N(t[n]);lt(this,e)}},U.prototype.writePackedVarintHash64=U.prototype.td,typeof e==`object`&&(e.debug=rt,e.Map=k,e.Message=B,e.BinaryReader=z,e.BinaryWriter=U,e.ExtensionFieldInfo=Pe,e.ExtensionFieldBinaryInfo=Fe,e.exportSymbol=h,e.inherits=g,e.object={extend:v},e.typeOf=p)})),w8=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();n.exportSymbol(`proto.google.protobuf.Any`,null,r),proto.google.protobuf.Any=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.google.protobuf.Any,t.Message),n.DEBUG&&!COMPILED&&(proto.google.protobuf.Any.displayName=`proto.google.protobuf.Any`),t.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Any.prototype.toObject=function(e){return proto.google.protobuf.Any.toObject(e,this)},proto.google.protobuf.Any.toObject=function(e,n){var r={typeUrl:t.Message.getFieldWithDefault(n,1,``),value:n.getValue_asB64()};return e&&(r.$jspbMessageInstance=n),r}),proto.google.protobuf.Any.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new proto.google.protobuf.Any;return proto.google.protobuf.Any.deserializeBinaryFromReader(r,n)},proto.google.protobuf.Any.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readString();e.setTypeUrl(n);break;case 2:var n=t.readBytes();e.setValue(n);break;default:t.skipField();break}return e},proto.google.protobuf.Any.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return proto.google.protobuf.Any.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.Any.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getTypeUrl(),n.length>0&&t.writeString(1,n),n=e.getValue_asU8(),n.length>0&&t.writeBytes(2,n)},proto.google.protobuf.Any.prototype.getTypeUrl=function(){return t.Message.getFieldWithDefault(this,1,``)},proto.google.protobuf.Any.prototype.setTypeUrl=function(e){return t.Message.setProto3StringField(this,1,e)},proto.google.protobuf.Any.prototype.getValue=function(){return t.Message.getFieldWithDefault(this,2,``)},proto.google.protobuf.Any.prototype.getValue_asB64=function(){return t.Message.bytesAsB64(this.getValue())},proto.google.protobuf.Any.prototype.getValue_asU8=function(){return t.Message.bytesAsU8(this.getValue())},proto.google.protobuf.Any.prototype.setValue=function(e){return t.Message.setProto3BytesField(this,2,e)},n.object.extend(e,proto.google.protobuf),proto.google.protobuf.Any.prototype.getTypeName=function(){return this.getTypeUrl().split(`/`).pop()},proto.google.protobuf.Any.prototype.pack=function(e,t,n){n||=`type.googleapis.com/`,n.substr(-1)==`/`?this.setTypeUrl(n+t):this.setTypeUrl(n+`/`+t),this.setValue(e)},proto.google.protobuf.Any.prototype.unpack=function(e,t){return this.getTypeName()==t?e(this.getValue_asU8()):null}})),T8=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)(),i=w8();n.object.extend(proto,i),n.exportSymbol(`TronWebProto.Account`,null,r),n.exportSymbol(`TronWebProto.Account.AccountResource`,null,r),n.exportSymbol(`TronWebProto.Account.Frozen`,null,r),n.exportSymbol(`TronWebProto.AccountId`,null,r),n.exportSymbol(`TronWebProto.AccountType`,null,r),n.exportSymbol(`TronWebProto.DelegatedResource`,null,r),n.exportSymbol(`TronWebProto.Exchange`,null,r),n.exportSymbol(`TronWebProto.Key`,null,r),n.exportSymbol(`TronWebProto.MarketOrderDetail`,null,r),n.exportSymbol(`TronWebProto.Permission`,null,r),n.exportSymbol(`TronWebProto.Permission.PermissionType`,null,r),n.exportSymbol(`TronWebProto.Proposal`,null,r),n.exportSymbol(`TronWebProto.Proposal.State`,null,r),n.exportSymbol(`TronWebProto.Transaction`,null,r),n.exportSymbol(`TronWebProto.Transaction.Contract`,null,r),n.exportSymbol(`TronWebProto.Transaction.Contract.ContractType`,null,r),n.exportSymbol(`TronWebProto.Transaction.Result`,null,r),n.exportSymbol(`TronWebProto.Transaction.Result.code`,null,r),n.exportSymbol(`TronWebProto.Transaction.Result.contractResult`,null,r),n.exportSymbol(`TronWebProto.Transaction.raw`,null,r),n.exportSymbol(`TronWebProto.Vote`,null,r),n.exportSymbol(`TronWebProto.Votes`,null,r),n.exportSymbol(`TronWebProto.Witness`,null,r),n.exportSymbol(`TronWebProto.authority`,null,r),TronWebProto.AccountId=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountId,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountId.displayName=`TronWebProto.AccountId`),TronWebProto.Vote=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Vote,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Vote.displayName=`TronWebProto.Vote`),TronWebProto.Proposal=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Proposal.repeatedFields_,null)},n.inherits(TronWebProto.Proposal,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Proposal.displayName=`TronWebProto.Proposal`),TronWebProto.Exchange=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Exchange,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Exchange.displayName=`TronWebProto.Exchange`),TronWebProto.Account=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Account.repeatedFields_,null)},n.inherits(TronWebProto.Account,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Account.displayName=`TronWebProto.Account`),TronWebProto.Account.Frozen=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Account.Frozen,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Account.Frozen.displayName=`TronWebProto.Account.Frozen`),TronWebProto.Account.AccountResource=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Account.AccountResource,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Account.AccountResource.displayName=`TronWebProto.Account.AccountResource`),TronWebProto.Key=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Key,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Key.displayName=`TronWebProto.Key`),TronWebProto.DelegatedResource=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.DelegatedResource,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.DelegatedResource.displayName=`TronWebProto.DelegatedResource`),TronWebProto.authority=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.authority,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.authority.displayName=`TronWebProto.authority`),TronWebProto.Permission=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Permission.repeatedFields_,null)},n.inherits(TronWebProto.Permission,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Permission.displayName=`TronWebProto.Permission`),TronWebProto.Witness=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Witness,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Witness.displayName=`TronWebProto.Witness`),TronWebProto.Votes=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Votes.repeatedFields_,null)},n.inherits(TronWebProto.Votes,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Votes.displayName=`TronWebProto.Votes`),TronWebProto.MarketOrderDetail=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.MarketOrderDetail,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.MarketOrderDetail.displayName=`TronWebProto.MarketOrderDetail`),TronWebProto.Transaction=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Transaction.repeatedFields_,null)},n.inherits(TronWebProto.Transaction,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Transaction.displayName=`TronWebProto.Transaction`),TronWebProto.Transaction.Contract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.Transaction.Contract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Contract.displayName=`TronWebProto.Transaction.Contract`),TronWebProto.Transaction.Result=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Transaction.Result.repeatedFields_,null)},n.inherits(TronWebProto.Transaction.Result,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Result.displayName=`TronWebProto.Transaction.Result`),TronWebProto.Transaction.raw=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.Transaction.raw.repeatedFields_,null)},n.inherits(TronWebProto.Transaction.raw,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.Transaction.raw.displayName=`TronWebProto.Transaction.raw`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountId.prototype.toObject=function(e){return TronWebProto.AccountId.toObject(e,this)},TronWebProto.AccountId.toObject=function(e,t){var n={name:t.getName_asB64(),address:t.getAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountId.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountId;return TronWebProto.AccountId.deserializeBinaryFromReader(r,n)},TronWebProto.AccountId.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setName(n);break;case 2:var n=t.readBytes();e.setAddress(n);break;default:t.skipField();break}return e},TronWebProto.AccountId.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountId.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountId.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getName_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getAddress_asU8(),n.length>0&&t.writeBytes(2,n)},TronWebProto.AccountId.prototype.getName=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.AccountId.prototype.getName_asB64=function(){return t.Message.bytesAsB64(this.getName())},TronWebProto.AccountId.prototype.getName_asU8=function(){return t.Message.bytesAsU8(this.getName())},TronWebProto.AccountId.prototype.setName=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountId.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.AccountId.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountId.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountId.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Vote.prototype.toObject=function(e){return TronWebProto.Vote.toObject(e,this)},TronWebProto.Vote.toObject=function(e,n){var r={voteAddress:n.getVoteAddress_asB64(),voteCount:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Vote.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Vote;return TronWebProto.Vote.deserializeBinaryFromReader(r,n)},TronWebProto.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setVoteAddress(n);break;case 2:var n=t.readInt64();e.setVoteCount(n);break;default:t.skipField();break}return e},TronWebProto.Vote.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Vote.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getVoteAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getVoteCount(),n!==0&&t.writeInt64(2,n)},TronWebProto.Vote.prototype.getVoteAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.Vote.prototype.getVoteAddress_asB64=function(){return t.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.Vote.prototype.getVoteAddress_asU8=function(){return t.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.Vote.prototype.setVoteAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.Vote.prototype.getVoteCount=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Vote.prototype.setVoteCount=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.Proposal.repeatedFields_=[6],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Proposal.prototype.toObject=function(e){return TronWebProto.Proposal.toObject(e,this)},TronWebProto.Proposal.toObject=function(e,n){var r,i={proposalId:t.Message.getFieldWithDefault(n,1,0),proposerAddress:n.getProposerAddress_asB64(),parametersMap:(r=n.getParametersMap())?r.toObject(e,void 0):[],expirationTime:t.Message.getFieldWithDefault(n,4,0),createTime:t.Message.getFieldWithDefault(n,5,0),approvalsList:n.getApprovalsList_asB64(),state:t.Message.getFieldWithDefault(n,7,0)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.Proposal.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Proposal;return TronWebProto.Proposal.deserializeBinaryFromReader(r,n)},TronWebProto.Proposal.deserializeBinaryFromReader=function(e,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var r=n.readInt64();e.setProposalId(r);break;case 2:var r=n.readBytes();e.setProposerAddress(r);break;case 3:var r=e.getParametersMap();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readInt64,t.BinaryReader.prototype.readInt64,null,0,0)});break;case 4:var r=n.readInt64();e.setExpirationTime(r);break;case 5:var r=n.readInt64();e.setCreateTime(r);break;case 6:var r=n.readBytes();e.addApprovals(r);break;case 7:var r=n.readEnum();e.setState(r);break;default:n.skipField();break}return e},TronWebProto.Proposal.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Proposal.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Proposal.serializeBinaryToWriter=function(e,n){var r=void 0;r=e.getProposalId(),r!==0&&n.writeInt64(1,r),r=e.getProposerAddress_asU8(),r.length>0&&n.writeBytes(2,r),r=e.getParametersMap(!0),r&&r.getLength()>0&&r.serializeBinary(3,n,t.BinaryWriter.prototype.writeInt64,t.BinaryWriter.prototype.writeInt64),r=e.getExpirationTime(),r!==0&&n.writeInt64(4,r),r=e.getCreateTime(),r!==0&&n.writeInt64(5,r),r=e.getApprovalsList_asU8(),r.length>0&&n.writeRepeatedBytes(6,r),r=e.getState(),r!==0&&n.writeEnum(7,r)},TronWebProto.Proposal.State={PENDING:0,DISAPPROVED:1,APPROVED:2,CANCELED:3},TronWebProto.Proposal.prototype.getProposalId=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Proposal.prototype.setProposalId=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.Proposal.prototype.getProposerAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.Proposal.prototype.getProposerAddress_asB64=function(){return t.Message.bytesAsB64(this.getProposerAddress())},TronWebProto.Proposal.prototype.getProposerAddress_asU8=function(){return t.Message.bytesAsU8(this.getProposerAddress())},TronWebProto.Proposal.prototype.setProposerAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.Proposal.prototype.getParametersMap=function(e){return t.Message.getMapField(this,3,e,null)},TronWebProto.Proposal.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},TronWebProto.Proposal.prototype.getExpirationTime=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.Proposal.prototype.setExpirationTime=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.Proposal.prototype.getCreateTime=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.Proposal.prototype.setCreateTime=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.Proposal.prototype.getApprovalsList=function(){return t.Message.getRepeatedField(this,6)},TronWebProto.Proposal.prototype.getApprovalsList_asB64=function(){return t.Message.bytesListAsB64(this.getApprovalsList())},TronWebProto.Proposal.prototype.getApprovalsList_asU8=function(){return t.Message.bytesListAsU8(this.getApprovalsList())},TronWebProto.Proposal.prototype.setApprovalsList=function(e){return t.Message.setField(this,6,e||[])},TronWebProto.Proposal.prototype.addApprovals=function(e,n){return t.Message.addToRepeatedField(this,6,e,n)},TronWebProto.Proposal.prototype.clearApprovalsList=function(){return this.setApprovalsList([])},TronWebProto.Proposal.prototype.getState=function(){return t.Message.getFieldWithDefault(this,7,0)},TronWebProto.Proposal.prototype.setState=function(e){return t.Message.setProto3EnumField(this,7,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Exchange.prototype.toObject=function(e){return TronWebProto.Exchange.toObject(e,this)},TronWebProto.Exchange.toObject=function(e,n){var r={exchangeId:t.Message.getFieldWithDefault(n,1,0),creatorAddress:n.getCreatorAddress_asB64(),createTime:t.Message.getFieldWithDefault(n,3,0),firstTokenId:n.getFirstTokenId_asB64(),firstTokenBalance:t.Message.getFieldWithDefault(n,7,0),secondTokenId:n.getSecondTokenId_asB64(),secondTokenBalance:t.Message.getFieldWithDefault(n,9,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Exchange.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Exchange;return TronWebProto.Exchange.deserializeBinaryFromReader(r,n)},TronWebProto.Exchange.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setExchangeId(n);break;case 2:var n=t.readBytes();e.setCreatorAddress(n);break;case 3:var n=t.readInt64();e.setCreateTime(n);break;case 6:var n=t.readBytes();e.setFirstTokenId(n);break;case 7:var n=t.readInt64();e.setFirstTokenBalance(n);break;case 8:var n=t.readBytes();e.setSecondTokenId(n);break;case 9:var n=t.readInt64();e.setSecondTokenBalance(n);break;default:t.skipField();break}return e},TronWebProto.Exchange.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Exchange.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Exchange.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getExchangeId(),n!==0&&t.writeInt64(1,n),n=e.getCreatorAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getCreateTime(),n!==0&&t.writeInt64(3,n),n=e.getFirstTokenId_asU8(),n.length>0&&t.writeBytes(6,n),n=e.getFirstTokenBalance(),n!==0&&t.writeInt64(7,n),n=e.getSecondTokenId_asU8(),n.length>0&&t.writeBytes(8,n),n=e.getSecondTokenBalance(),n!==0&&t.writeInt64(9,n)},TronWebProto.Exchange.prototype.getExchangeId=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Exchange.prototype.setExchangeId=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.Exchange.prototype.getCreatorAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.Exchange.prototype.getCreatorAddress_asB64=function(){return t.Message.bytesAsB64(this.getCreatorAddress())},TronWebProto.Exchange.prototype.getCreatorAddress_asU8=function(){return t.Message.bytesAsU8(this.getCreatorAddress())},TronWebProto.Exchange.prototype.setCreatorAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.Exchange.prototype.getCreateTime=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.Exchange.prototype.setCreateTime=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.Exchange.prototype.getFirstTokenId=function(){return t.Message.getFieldWithDefault(this,6,``)},TronWebProto.Exchange.prototype.getFirstTokenId_asB64=function(){return t.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.Exchange.prototype.getFirstTokenId_asU8=function(){return t.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.Exchange.prototype.setFirstTokenId=function(e){return t.Message.setProto3BytesField(this,6,e)},TronWebProto.Exchange.prototype.getFirstTokenBalance=function(){return t.Message.getFieldWithDefault(this,7,0)},TronWebProto.Exchange.prototype.setFirstTokenBalance=function(e){return t.Message.setProto3IntField(this,7,e)},TronWebProto.Exchange.prototype.getSecondTokenId=function(){return t.Message.getFieldWithDefault(this,8,``)},TronWebProto.Exchange.prototype.getSecondTokenId_asB64=function(){return t.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.Exchange.prototype.getSecondTokenId_asU8=function(){return t.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.Exchange.prototype.setSecondTokenId=function(e){return t.Message.setProto3BytesField(this,8,e)},TronWebProto.Exchange.prototype.getSecondTokenBalance=function(){return t.Message.getFieldWithDefault(this,9,0)},TronWebProto.Exchange.prototype.setSecondTokenBalance=function(e){return t.Message.setProto3IntField(this,9,e)},TronWebProto.Account.repeatedFields_=[5,7,16,33],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.prototype.toObject=function(e){return TronWebProto.Account.toObject(e,this)},TronWebProto.Account.toObject=function(e,n){var r,i={accountName:n.getAccountName_asB64(),type:t.Message.getFieldWithDefault(n,2,0),address:n.getAddress_asB64(),balance:t.Message.getFieldWithDefault(n,4,0),votesList:t.Message.toObjectList(n.getVotesList(),TronWebProto.Vote.toObject,e),assetMap:(r=n.getAssetMap())?r.toObject(e,void 0):[],assetv2Map:(r=n.getAssetv2Map())?r.toObject(e,void 0):[],frozenList:t.Message.toObjectList(n.getFrozenList(),TronWebProto.Account.Frozen.toObject,e),netUsage:t.Message.getFieldWithDefault(n,8,0),acquiredDelegatedFrozenBalanceForBandwidth:t.Message.getFieldWithDefault(n,41,0),delegatedFrozenBalanceForBandwidth:t.Message.getFieldWithDefault(n,42,0),oldTronPower:t.Message.getFieldWithDefault(n,46,0),tronPower:(r=n.getTronPower())&&TronWebProto.Account.Frozen.toObject(e,r),assetOptimized:t.Message.getBooleanFieldWithDefault(n,60,!1),createTime:t.Message.getFieldWithDefault(n,9,0),latestOprationTime:t.Message.getFieldWithDefault(n,10,0),allowance:t.Message.getFieldWithDefault(n,11,0),latestWithdrawTime:t.Message.getFieldWithDefault(n,12,0),code:n.getCode_asB64(),isWitness:t.Message.getBooleanFieldWithDefault(n,14,!1),isCommittee:t.Message.getBooleanFieldWithDefault(n,15,!1),frozenSupplyList:t.Message.toObjectList(n.getFrozenSupplyList(),TronWebProto.Account.Frozen.toObject,e),assetIssuedName:n.getAssetIssuedName_asB64(),assetIssuedId:n.getAssetIssuedId_asB64(),latestAssetOperationTimeMap:(r=n.getLatestAssetOperationTimeMap())?r.toObject(e,void 0):[],latestAssetOperationTimev2Map:(r=n.getLatestAssetOperationTimev2Map())?r.toObject(e,void 0):[],freeNetUsage:t.Message.getFieldWithDefault(n,19,0),freeAssetNetUsageMap:(r=n.getFreeAssetNetUsageMap())?r.toObject(e,void 0):[],freeAssetNetUsagev2Map:(r=n.getFreeAssetNetUsagev2Map())?r.toObject(e,void 0):[],latestConsumeTime:t.Message.getFieldWithDefault(n,21,0),latestConsumeFreeTime:t.Message.getFieldWithDefault(n,22,0),accountId:n.getAccountId_asB64(),accountResource:(r=n.getAccountResource())&&TronWebProto.Account.AccountResource.toObject(e,r),codehash:n.getCodehash_asB64(),ownerPermission:(r=n.getOwnerPermission())&&TronWebProto.Permission.toObject(e,r),witnessPermission:(r=n.getWitnessPermission())&&TronWebProto.Permission.toObject(e,r),activePermissionList:t.Message.toObjectList(n.getActivePermissionList(),TronWebProto.Permission.toObject,e)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.Account.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Account;return TronWebProto.Account.deserializeBinaryFromReader(r,n)},TronWebProto.Account.deserializeBinaryFromReader=function(e,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var r=n.readBytes();e.setAccountName(r);break;case 2:var r=n.readEnum();e.setType(r);break;case 3:var r=n.readBytes();e.setAddress(r);break;case 4:var r=n.readInt64();e.setBalance(r);break;case 5:var r=new TronWebProto.Vote;n.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 6:var r=e.getAssetMap();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readString,t.BinaryReader.prototype.readInt64,null,``,0)});break;case 56:var r=e.getAssetv2Map();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readString,t.BinaryReader.prototype.readInt64,null,``,0)});break;case 7:var r=new TronWebProto.Account.Frozen;n.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozen(r);break;case 8:var r=n.readInt64();e.setNetUsage(r);break;case 41:var r=n.readInt64();e.setAcquiredDelegatedFrozenBalanceForBandwidth(r);break;case 42:var r=n.readInt64();e.setDelegatedFrozenBalanceForBandwidth(r);break;case 46:var r=n.readInt64();e.setOldTronPower(r);break;case 47:var r=new TronWebProto.Account.Frozen;n.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setTronPower(r);break;case 60:var r=n.readBool();e.setAssetOptimized(r);break;case 9:var r=n.readInt64();e.setCreateTime(r);break;case 10:var r=n.readInt64();e.setLatestOprationTime(r);break;case 11:var r=n.readInt64();e.setAllowance(r);break;case 12:var r=n.readInt64();e.setLatestWithdrawTime(r);break;case 13:var r=n.readBytes();e.setCode(r);break;case 14:var r=n.readBool();e.setIsWitness(r);break;case 15:var r=n.readBool();e.setIsCommittee(r);break;case 16:var r=new TronWebProto.Account.Frozen;n.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 17:var r=n.readBytes();e.setAssetIssuedName(r);break;case 57:var r=n.readBytes();e.setAssetIssuedId(r);break;case 18:var r=e.getLatestAssetOperationTimeMap();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readString,t.BinaryReader.prototype.readInt64,null,``,0)});break;case 58:var r=e.getLatestAssetOperationTimev2Map();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readString,t.BinaryReader.prototype.readInt64,null,``,0)});break;case 19:var r=n.readInt64();e.setFreeNetUsage(r);break;case 20:var r=e.getFreeAssetNetUsageMap();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readString,t.BinaryReader.prototype.readInt64,null,``,0)});break;case 59:var r=e.getFreeAssetNetUsagev2Map();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readString,t.BinaryReader.prototype.readInt64,null,``,0)});break;case 21:var r=n.readInt64();e.setLatestConsumeTime(r);break;case 22:var r=n.readInt64();e.setLatestConsumeFreeTime(r);break;case 23:var r=n.readBytes();e.setAccountId(r);break;case 26:var r=new TronWebProto.Account.AccountResource;n.readMessage(r,TronWebProto.Account.AccountResource.deserializeBinaryFromReader),e.setAccountResource(r);break;case 30:var r=n.readBytes();e.setCodehash(r);break;case 31:var r=new TronWebProto.Permission;n.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setOwnerPermission(r);break;case 32:var r=new TronWebProto.Permission;n.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setWitnessPermission(r);break;case 33:var r=new TronWebProto.Permission;n.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.addActivePermission(r);break;default:n.skipField();break}return e},TronWebProto.Account.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Account.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.serializeBinaryToWriter=function(e,n){var r=void 0;r=e.getAccountName_asU8(),r.length>0&&n.writeBytes(1,r),r=e.getType(),r!==0&&n.writeEnum(2,r),r=e.getAddress_asU8(),r.length>0&&n.writeBytes(3,r),r=e.getBalance(),r!==0&&n.writeInt64(4,r),r=e.getVotesList(),r.length>0&&n.writeRepeatedMessage(5,r,TronWebProto.Vote.serializeBinaryToWriter),r=e.getAssetMap(!0),r&&r.getLength()>0&&r.serializeBinary(6,n,t.BinaryWriter.prototype.writeString,t.BinaryWriter.prototype.writeInt64),r=e.getAssetv2Map(!0),r&&r.getLength()>0&&r.serializeBinary(56,n,t.BinaryWriter.prototype.writeString,t.BinaryWriter.prototype.writeInt64),r=e.getFrozenList(),r.length>0&&n.writeRepeatedMessage(7,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),r=e.getNetUsage(),r!==0&&n.writeInt64(8,r),r=e.getAcquiredDelegatedFrozenBalanceForBandwidth(),r!==0&&n.writeInt64(41,r),r=e.getDelegatedFrozenBalanceForBandwidth(),r!==0&&n.writeInt64(42,r),r=e.getOldTronPower(),r!==0&&n.writeInt64(46,r),r=e.getTronPower(),r!=null&&n.writeMessage(47,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),r=e.getAssetOptimized(),r&&n.writeBool(60,r),r=e.getCreateTime(),r!==0&&n.writeInt64(9,r),r=e.getLatestOprationTime(),r!==0&&n.writeInt64(10,r),r=e.getAllowance(),r!==0&&n.writeInt64(11,r),r=e.getLatestWithdrawTime(),r!==0&&n.writeInt64(12,r),r=e.getCode_asU8(),r.length>0&&n.writeBytes(13,r),r=e.getIsWitness(),r&&n.writeBool(14,r),r=e.getIsCommittee(),r&&n.writeBool(15,r),r=e.getFrozenSupplyList(),r.length>0&&n.writeRepeatedMessage(16,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),r=e.getAssetIssuedName_asU8(),r.length>0&&n.writeBytes(17,r),r=e.getAssetIssuedId_asU8(),r.length>0&&n.writeBytes(57,r),r=e.getLatestAssetOperationTimeMap(!0),r&&r.getLength()>0&&r.serializeBinary(18,n,t.BinaryWriter.prototype.writeString,t.BinaryWriter.prototype.writeInt64),r=e.getLatestAssetOperationTimev2Map(!0),r&&r.getLength()>0&&r.serializeBinary(58,n,t.BinaryWriter.prototype.writeString,t.BinaryWriter.prototype.writeInt64),r=e.getFreeNetUsage(),r!==0&&n.writeInt64(19,r),r=e.getFreeAssetNetUsageMap(!0),r&&r.getLength()>0&&r.serializeBinary(20,n,t.BinaryWriter.prototype.writeString,t.BinaryWriter.prototype.writeInt64),r=e.getFreeAssetNetUsagev2Map(!0),r&&r.getLength()>0&&r.serializeBinary(59,n,t.BinaryWriter.prototype.writeString,t.BinaryWriter.prototype.writeInt64),r=e.getLatestConsumeTime(),r!==0&&n.writeInt64(21,r),r=e.getLatestConsumeFreeTime(),r!==0&&n.writeInt64(22,r),r=e.getAccountId_asU8(),r.length>0&&n.writeBytes(23,r),r=e.getAccountResource(),r!=null&&n.writeMessage(26,r,TronWebProto.Account.AccountResource.serializeBinaryToWriter),r=e.getCodehash_asU8(),r.length>0&&n.writeBytes(30,r),r=e.getOwnerPermission(),r!=null&&n.writeMessage(31,r,TronWebProto.Permission.serializeBinaryToWriter),r=e.getWitnessPermission(),r!=null&&n.writeMessage(32,r,TronWebProto.Permission.serializeBinaryToWriter),r=e.getActivePermissionList(),r.length>0&&n.writeRepeatedMessage(33,r,TronWebProto.Permission.serializeBinaryToWriter)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.Frozen.prototype.toObject=function(e){return TronWebProto.Account.Frozen.toObject(e,this)},TronWebProto.Account.Frozen.toObject=function(e,n){var r={frozenBalance:t.Message.getFieldWithDefault(n,1,0),expireTime:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Account.Frozen.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Account.Frozen;return TronWebProto.Account.Frozen.deserializeBinaryFromReader(r,n)},TronWebProto.Account.Frozen.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setFrozenBalance(n);break;case 2:var n=t.readInt64();e.setExpireTime(n);break;default:t.skipField();break}return e},TronWebProto.Account.Frozen.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Account.Frozen.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.Frozen.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getFrozenBalance(),n!==0&&t.writeInt64(1,n),n=e.getExpireTime(),n!==0&&t.writeInt64(2,n)},TronWebProto.Account.Frozen.prototype.getFrozenBalance=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.Frozen.prototype.setFrozenBalance=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.Account.Frozen.prototype.getExpireTime=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.Frozen.prototype.setExpireTime=function(e){return t.Message.setProto3IntField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.AccountResource.prototype.toObject=function(e){return TronWebProto.Account.AccountResource.toObject(e,this)},TronWebProto.Account.AccountResource.toObject=function(e,n){var r,i={energyUsage:t.Message.getFieldWithDefault(n,1,0),frozenBalanceForEnergy:(r=n.getFrozenBalanceForEnergy())&&TronWebProto.Account.Frozen.toObject(e,r),latestConsumeTimeForEnergy:t.Message.getFieldWithDefault(n,3,0),acquiredDelegatedFrozenBalanceForEnergy:t.Message.getFieldWithDefault(n,4,0),delegatedFrozenBalanceForEnergy:t.Message.getFieldWithDefault(n,5,0),storageLimit:t.Message.getFieldWithDefault(n,6,0),storageUsage:t.Message.getFieldWithDefault(n,7,0),latestExchangeStorageTime:t.Message.getFieldWithDefault(n,8,0)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.Account.AccountResource.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Account.AccountResource;return TronWebProto.Account.AccountResource.deserializeBinaryFromReader(r,n)},TronWebProto.Account.AccountResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setEnergyUsage(n);break;case 2:var n=new TronWebProto.Account.Frozen;t.readMessage(n,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setFrozenBalanceForEnergy(n);break;case 3:var n=t.readInt64();e.setLatestConsumeTimeForEnergy(n);break;case 4:var n=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForEnergy(n);break;case 5:var n=t.readInt64();e.setDelegatedFrozenBalanceForEnergy(n);break;case 6:var n=t.readInt64();e.setStorageLimit(n);break;case 7:var n=t.readInt64();e.setStorageUsage(n);break;case 8:var n=t.readInt64();e.setLatestExchangeStorageTime(n);break;default:t.skipField();break}return e},TronWebProto.Account.AccountResource.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Account.AccountResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.AccountResource.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getEnergyUsage(),n!==0&&t.writeInt64(1,n),n=e.getFrozenBalanceForEnergy(),n!=null&&t.writeMessage(2,n,TronWebProto.Account.Frozen.serializeBinaryToWriter),n=e.getLatestConsumeTimeForEnergy(),n!==0&&t.writeInt64(3,n),n=e.getAcquiredDelegatedFrozenBalanceForEnergy(),n!==0&&t.writeInt64(4,n),n=e.getDelegatedFrozenBalanceForEnergy(),n!==0&&t.writeInt64(5,n),n=e.getStorageLimit(),n!==0&&t.writeInt64(6,n),n=e.getStorageUsage(),n!==0&&t.writeInt64(7,n),n=e.getLatestExchangeStorageTime(),n!==0&&t.writeInt64(8,n)},TronWebProto.Account.AccountResource.prototype.getEnergyUsage=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.AccountResource.prototype.setEnergyUsage=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.Account.AccountResource.prototype.getFrozenBalanceForEnergy=function(){return t.Message.getWrapperField(this,TronWebProto.Account.Frozen,2)},TronWebProto.Account.AccountResource.prototype.setFrozenBalanceForEnergy=function(e){return t.Message.setWrapperField(this,2,e)},TronWebProto.Account.AccountResource.prototype.clearFrozenBalanceForEnergy=function(){return this.setFrozenBalanceForEnergy(void 0)},TronWebProto.Account.AccountResource.prototype.hasFrozenBalanceForEnergy=function(){return t.Message.getField(this,2)!=null},TronWebProto.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.Account.AccountResource.prototype.getStorageLimit=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.Account.AccountResource.prototype.setStorageLimit=function(e){return t.Message.setProto3IntField(this,6,e)},TronWebProto.Account.AccountResource.prototype.getStorageUsage=function(){return t.Message.getFieldWithDefault(this,7,0)},TronWebProto.Account.AccountResource.prototype.setStorageUsage=function(e){return t.Message.setProto3IntField(this,7,e)},TronWebProto.Account.AccountResource.prototype.getLatestExchangeStorageTime=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.AccountResource.prototype.setLatestExchangeStorageTime=function(e){return t.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAccountName=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.Account.prototype.getAccountName_asB64=function(){return t.Message.bytesAsB64(this.getAccountName())},TronWebProto.Account.prototype.getAccountName_asU8=function(){return t.Message.bytesAsU8(this.getAccountName())},TronWebProto.Account.prototype.setAccountName=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.Account.prototype.getType=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.prototype.setType=function(e){return t.Message.setProto3EnumField(this,2,e)},TronWebProto.Account.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.Account.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.Account.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.Account.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.Account.prototype.getBalance=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.prototype.setBalance=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.Account.prototype.getVotesList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Vote,5)},TronWebProto.Account.prototype.setVotesList=function(e){return t.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Account.prototype.addVotes=function(e,n){return t.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Vote,n)},TronWebProto.Account.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.Account.prototype.getAssetMap=function(e){return t.Message.getMapField(this,6,e,null)},TronWebProto.Account.prototype.clearAssetMap=function(){return this.getAssetMap().clear(),this},TronWebProto.Account.prototype.getAssetv2Map=function(e){return t.Message.getMapField(this,56,e,null)},TronWebProto.Account.prototype.clearAssetv2Map=function(){return this.getAssetv2Map().clear(),this},TronWebProto.Account.prototype.getFrozenList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,7)},TronWebProto.Account.prototype.setFrozenList=function(e){return t.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Account.prototype.addFrozen=function(e,n){return t.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Account.Frozen,n)},TronWebProto.Account.prototype.clearFrozenList=function(){return this.setFrozenList([])},TronWebProto.Account.prototype.getNetUsage=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.prototype.setNetUsage=function(e){return t.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth=function(){return t.Message.getFieldWithDefault(this,41,0)},TronWebProto.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth=function(e){return t.Message.setProto3IntField(this,41,e)},TronWebProto.Account.prototype.getDelegatedFrozenBalanceForBandwidth=function(){return t.Message.getFieldWithDefault(this,42,0)},TronWebProto.Account.prototype.setDelegatedFrozenBalanceForBandwidth=function(e){return t.Message.setProto3IntField(this,42,e)},TronWebProto.Account.prototype.getOldTronPower=function(){return t.Message.getFieldWithDefault(this,46,0)},TronWebProto.Account.prototype.setOldTronPower=function(e){return t.Message.setProto3IntField(this,46,e)},TronWebProto.Account.prototype.getTronPower=function(){return t.Message.getWrapperField(this,TronWebProto.Account.Frozen,47)},TronWebProto.Account.prototype.setTronPower=function(e){return t.Message.setWrapperField(this,47,e)},TronWebProto.Account.prototype.clearTronPower=function(){return this.setTronPower(void 0)},TronWebProto.Account.prototype.hasTronPower=function(){return t.Message.getField(this,47)!=null},TronWebProto.Account.prototype.getAssetOptimized=function(){return t.Message.getBooleanFieldWithDefault(this,60,!1)},TronWebProto.Account.prototype.setAssetOptimized=function(e){return t.Message.setProto3BooleanField(this,60,e)},TronWebProto.Account.prototype.getCreateTime=function(){return t.Message.getFieldWithDefault(this,9,0)},TronWebProto.Account.prototype.setCreateTime=function(e){return t.Message.setProto3IntField(this,9,e)},TronWebProto.Account.prototype.getLatestOprationTime=function(){return t.Message.getFieldWithDefault(this,10,0)},TronWebProto.Account.prototype.setLatestOprationTime=function(e){return t.Message.setProto3IntField(this,10,e)},TronWebProto.Account.prototype.getAllowance=function(){return t.Message.getFieldWithDefault(this,11,0)},TronWebProto.Account.prototype.setAllowance=function(e){return t.Message.setProto3IntField(this,11,e)},TronWebProto.Account.prototype.getLatestWithdrawTime=function(){return t.Message.getFieldWithDefault(this,12,0)},TronWebProto.Account.prototype.setLatestWithdrawTime=function(e){return t.Message.setProto3IntField(this,12,e)},TronWebProto.Account.prototype.getCode=function(){return t.Message.getFieldWithDefault(this,13,``)},TronWebProto.Account.prototype.getCode_asB64=function(){return t.Message.bytesAsB64(this.getCode())},TronWebProto.Account.prototype.getCode_asU8=function(){return t.Message.bytesAsU8(this.getCode())},TronWebProto.Account.prototype.setCode=function(e){return t.Message.setProto3BytesField(this,13,e)},TronWebProto.Account.prototype.getIsWitness=function(){return t.Message.getBooleanFieldWithDefault(this,14,!1)},TronWebProto.Account.prototype.setIsWitness=function(e){return t.Message.setProto3BooleanField(this,14,e)},TronWebProto.Account.prototype.getIsCommittee=function(){return t.Message.getBooleanFieldWithDefault(this,15,!1)},TronWebProto.Account.prototype.setIsCommittee=function(e){return t.Message.setProto3BooleanField(this,15,e)},TronWebProto.Account.prototype.getFrozenSupplyList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,16)},TronWebProto.Account.prototype.setFrozenSupplyList=function(e){return t.Message.setRepeatedWrapperField(this,16,e)},TronWebProto.Account.prototype.addFrozenSupply=function(e,n){return t.Message.addToRepeatedWrapperField(this,16,e,TronWebProto.Account.Frozen,n)},TronWebProto.Account.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.Account.prototype.getAssetIssuedName=function(){return t.Message.getFieldWithDefault(this,17,``)},TronWebProto.Account.prototype.getAssetIssuedName_asB64=function(){return t.Message.bytesAsB64(this.getAssetIssuedName())},TronWebProto.Account.prototype.getAssetIssuedName_asU8=function(){return t.Message.bytesAsU8(this.getAssetIssuedName())},TronWebProto.Account.prototype.setAssetIssuedName=function(e){return t.Message.setProto3BytesField(this,17,e)},TronWebProto.Account.prototype.getAssetIssuedId=function(){return t.Message.getFieldWithDefault(this,57,``)},TronWebProto.Account.prototype.getAssetIssuedId_asB64=function(){return t.Message.bytesAsB64(this.getAssetIssuedId())},TronWebProto.Account.prototype.getAssetIssuedId_asU8=function(){return t.Message.bytesAsU8(this.getAssetIssuedId())},TronWebProto.Account.prototype.setAssetIssuedId=function(e){return t.Message.setProto3BytesField(this,57,e)},TronWebProto.Account.prototype.getLatestAssetOperationTimeMap=function(e){return t.Message.getMapField(this,18,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimeMap=function(){return this.getLatestAssetOperationTimeMap().clear(),this},TronWebProto.Account.prototype.getLatestAssetOperationTimev2Map=function(e){return t.Message.getMapField(this,58,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimev2Map=function(){return this.getLatestAssetOperationTimev2Map().clear(),this},TronWebProto.Account.prototype.getFreeNetUsage=function(){return t.Message.getFieldWithDefault(this,19,0)},TronWebProto.Account.prototype.setFreeNetUsage=function(e){return t.Message.setProto3IntField(this,19,e)},TronWebProto.Account.prototype.getFreeAssetNetUsageMap=function(e){return t.Message.getMapField(this,20,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsageMap=function(){return this.getFreeAssetNetUsageMap().clear(),this},TronWebProto.Account.prototype.getFreeAssetNetUsagev2Map=function(e){return t.Message.getMapField(this,59,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsagev2Map=function(){return this.getFreeAssetNetUsagev2Map().clear(),this},TronWebProto.Account.prototype.getLatestConsumeTime=function(){return t.Message.getFieldWithDefault(this,21,0)},TronWebProto.Account.prototype.setLatestConsumeTime=function(e){return t.Message.setProto3IntField(this,21,e)},TronWebProto.Account.prototype.getLatestConsumeFreeTime=function(){return t.Message.getFieldWithDefault(this,22,0)},TronWebProto.Account.prototype.setLatestConsumeFreeTime=function(e){return t.Message.setProto3IntField(this,22,e)},TronWebProto.Account.prototype.getAccountId=function(){return t.Message.getFieldWithDefault(this,23,``)},TronWebProto.Account.prototype.getAccountId_asB64=function(){return t.Message.bytesAsB64(this.getAccountId())},TronWebProto.Account.prototype.getAccountId_asU8=function(){return t.Message.bytesAsU8(this.getAccountId())},TronWebProto.Account.prototype.setAccountId=function(e){return t.Message.setProto3BytesField(this,23,e)},TronWebProto.Account.prototype.getAccountResource=function(){return t.Message.getWrapperField(this,TronWebProto.Account.AccountResource,26)},TronWebProto.Account.prototype.setAccountResource=function(e){return t.Message.setWrapperField(this,26,e)},TronWebProto.Account.prototype.clearAccountResource=function(){return this.setAccountResource(void 0)},TronWebProto.Account.prototype.hasAccountResource=function(){return t.Message.getField(this,26)!=null},TronWebProto.Account.prototype.getCodehash=function(){return t.Message.getFieldWithDefault(this,30,``)},TronWebProto.Account.prototype.getCodehash_asB64=function(){return t.Message.bytesAsB64(this.getCodehash())},TronWebProto.Account.prototype.getCodehash_asU8=function(){return t.Message.bytesAsU8(this.getCodehash())},TronWebProto.Account.prototype.setCodehash=function(e){return t.Message.setProto3BytesField(this,30,e)},TronWebProto.Account.prototype.getOwnerPermission=function(){return t.Message.getWrapperField(this,TronWebProto.Permission,31)},TronWebProto.Account.prototype.setOwnerPermission=function(e){return t.Message.setWrapperField(this,31,e)},TronWebProto.Account.prototype.clearOwnerPermission=function(){return this.setOwnerPermission(void 0)},TronWebProto.Account.prototype.hasOwnerPermission=function(){return t.Message.getField(this,31)!=null},TronWebProto.Account.prototype.getWitnessPermission=function(){return t.Message.getWrapperField(this,TronWebProto.Permission,32)},TronWebProto.Account.prototype.setWitnessPermission=function(e){return t.Message.setWrapperField(this,32,e)},TronWebProto.Account.prototype.clearWitnessPermission=function(){return this.setWitnessPermission(void 0)},TronWebProto.Account.prototype.hasWitnessPermission=function(){return t.Message.getField(this,32)!=null},TronWebProto.Account.prototype.getActivePermissionList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Permission,33)},TronWebProto.Account.prototype.setActivePermissionList=function(e){return t.Message.setRepeatedWrapperField(this,33,e)},TronWebProto.Account.prototype.addActivePermission=function(e,n){return t.Message.addToRepeatedWrapperField(this,33,e,TronWebProto.Permission,n)},TronWebProto.Account.prototype.clearActivePermissionList=function(){return this.setActivePermissionList([])},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Key.prototype.toObject=function(e){return TronWebProto.Key.toObject(e,this)},TronWebProto.Key.toObject=function(e,n){var r={address:n.getAddress_asB64(),weight:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Key.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Key;return TronWebProto.Key.deserializeBinaryFromReader(r,n)},TronWebProto.Key.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAddress(n);break;case 2:var n=t.readInt64();e.setWeight(n);break;default:t.skipField();break}return e},TronWebProto.Key.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Key.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Key.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getWeight(),n!==0&&t.writeInt64(2,n)},TronWebProto.Key.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.Key.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.Key.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.Key.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.Key.prototype.getWeight=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Key.prototype.setWeight=function(e){return t.Message.setProto3IntField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegatedResource.prototype.toObject=function(e){return TronWebProto.DelegatedResource.toObject(e,this)},TronWebProto.DelegatedResource.toObject=function(e,n){var r={from:n.getFrom_asB64(),to:n.getTo_asB64(),frozenBalanceForBandwidth:t.Message.getFieldWithDefault(n,3,0),frozenBalanceForEnergy:t.Message.getFieldWithDefault(n,4,0),expireTimeForBandwidth:t.Message.getFieldWithDefault(n,5,0),expireTimeForEnergy:t.Message.getFieldWithDefault(n,6,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.DelegatedResource.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.DelegatedResource;return TronWebProto.DelegatedResource.deserializeBinaryFromReader(r,n)},TronWebProto.DelegatedResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setFrom(n);break;case 2:var n=t.readBytes();e.setTo(n);break;case 3:var n=t.readInt64();e.setFrozenBalanceForBandwidth(n);break;case 4:var n=t.readInt64();e.setFrozenBalanceForEnergy(n);break;case 5:var n=t.readInt64();e.setExpireTimeForBandwidth(n);break;case 6:var n=t.readInt64();e.setExpireTimeForEnergy(n);break;default:t.skipField();break}return e},TronWebProto.DelegatedResource.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.DelegatedResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegatedResource.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getFrom_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getTo_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getFrozenBalanceForBandwidth(),n!==0&&t.writeInt64(3,n),n=e.getFrozenBalanceForEnergy(),n!==0&&t.writeInt64(4,n),n=e.getExpireTimeForBandwidth(),n!==0&&t.writeInt64(5,n),n=e.getExpireTimeForEnergy(),n!==0&&t.writeInt64(6,n)},TronWebProto.DelegatedResource.prototype.getFrom=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.DelegatedResource.prototype.getFrom_asB64=function(){return t.Message.bytesAsB64(this.getFrom())},TronWebProto.DelegatedResource.prototype.getFrom_asU8=function(){return t.Message.bytesAsU8(this.getFrom())},TronWebProto.DelegatedResource.prototype.setFrom=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegatedResource.prototype.getTo=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.DelegatedResource.prototype.getTo_asB64=function(){return t.Message.bytesAsB64(this.getTo())},TronWebProto.DelegatedResource.prototype.getTo_asU8=function(){return t.Message.bytesAsU8(this.getTo())},TronWebProto.DelegatedResource.prototype.setTo=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForBandwidth=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForBandwidth=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForEnergy=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForEnergy=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForBandwidth=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForBandwidth=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForEnergy=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForEnergy=function(e){return t.Message.setProto3IntField(this,6,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.authority.prototype.toObject=function(e){return TronWebProto.authority.toObject(e,this)},TronWebProto.authority.toObject=function(e,t){var n,r={account:(n=t.getAccount())&&TronWebProto.AccountId.toObject(e,n),permissionName:t.getPermissionName_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.authority.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.authority;return TronWebProto.authority.deserializeBinaryFromReader(r,n)},TronWebProto.authority.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=new TronWebProto.AccountId;t.readMessage(n,TronWebProto.AccountId.deserializeBinaryFromReader),e.setAccount(n);break;case 2:var n=t.readBytes();e.setPermissionName(n);break;default:t.skipField();break}return e},TronWebProto.authority.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.authority.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.authority.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAccount(),n!=null&&t.writeMessage(1,n,TronWebProto.AccountId.serializeBinaryToWriter),n=e.getPermissionName_asU8(),n.length>0&&t.writeBytes(2,n)},TronWebProto.authority.prototype.getAccount=function(){return t.Message.getWrapperField(this,TronWebProto.AccountId,1)},TronWebProto.authority.prototype.setAccount=function(e){return t.Message.setWrapperField(this,1,e)},TronWebProto.authority.prototype.clearAccount=function(){return this.setAccount(void 0)},TronWebProto.authority.prototype.hasAccount=function(){return t.Message.getField(this,1)!=null},TronWebProto.authority.prototype.getPermissionName=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.authority.prototype.getPermissionName_asB64=function(){return t.Message.bytesAsB64(this.getPermissionName())},TronWebProto.authority.prototype.getPermissionName_asU8=function(){return t.Message.bytesAsU8(this.getPermissionName())},TronWebProto.authority.prototype.setPermissionName=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.Permission.repeatedFields_=[7],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Permission.prototype.toObject=function(e){return TronWebProto.Permission.toObject(e,this)},TronWebProto.Permission.toObject=function(e,n){var r={type:t.Message.getFieldWithDefault(n,1,0),id:t.Message.getFieldWithDefault(n,2,0),permissionName:t.Message.getFieldWithDefault(n,3,``),threshold:t.Message.getFieldWithDefault(n,4,0),parentId:t.Message.getFieldWithDefault(n,5,0),operations:n.getOperations_asB64(),keysList:t.Message.toObjectList(n.getKeysList(),TronWebProto.Key.toObject,e)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Permission.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Permission;return TronWebProto.Permission.deserializeBinaryFromReader(r,n)},TronWebProto.Permission.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readEnum();e.setType(n);break;case 2:var n=t.readInt32();e.setId(n);break;case 3:var n=t.readString();e.setPermissionName(n);break;case 4:var n=t.readInt64();e.setThreshold(n);break;case 5:var n=t.readInt32();e.setParentId(n);break;case 6:var n=t.readBytes();e.setOperations(n);break;case 7:var n=new TronWebProto.Key;t.readMessage(n,TronWebProto.Key.deserializeBinaryFromReader),e.addKeys(n);break;default:t.skipField();break}return e},TronWebProto.Permission.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Permission.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Permission.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getType(),n!==0&&t.writeEnum(1,n),n=e.getId(),n!==0&&t.writeInt32(2,n),n=e.getPermissionName(),n.length>0&&t.writeString(3,n),n=e.getThreshold(),n!==0&&t.writeInt64(4,n),n=e.getParentId(),n!==0&&t.writeInt32(5,n),n=e.getOperations_asU8(),n.length>0&&t.writeBytes(6,n),n=e.getKeysList(),n.length>0&&t.writeRepeatedMessage(7,n,TronWebProto.Key.serializeBinaryToWriter)},TronWebProto.Permission.PermissionType={OWNER:0,WITNESS:1,ACTIVE:2},TronWebProto.Permission.prototype.getType=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Permission.prototype.setType=function(e){return t.Message.setProto3EnumField(this,1,e)},TronWebProto.Permission.prototype.getId=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Permission.prototype.setId=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.Permission.prototype.getPermissionName=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.Permission.prototype.setPermissionName=function(e){return t.Message.setProto3StringField(this,3,e)},TronWebProto.Permission.prototype.getThreshold=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.Permission.prototype.setThreshold=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.Permission.prototype.getParentId=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.Permission.prototype.setParentId=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.Permission.prototype.getOperations=function(){return t.Message.getFieldWithDefault(this,6,``)},TronWebProto.Permission.prototype.getOperations_asB64=function(){return t.Message.bytesAsB64(this.getOperations())},TronWebProto.Permission.prototype.getOperations_asU8=function(){return t.Message.bytesAsU8(this.getOperations())},TronWebProto.Permission.prototype.setOperations=function(e){return t.Message.setProto3BytesField(this,6,e)},TronWebProto.Permission.prototype.getKeysList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Key,7)},TronWebProto.Permission.prototype.setKeysList=function(e){return t.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Permission.prototype.addKeys=function(e,n){return t.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Key,n)},TronWebProto.Permission.prototype.clearKeysList=function(){return this.setKeysList([])},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Witness.prototype.toObject=function(e){return TronWebProto.Witness.toObject(e,this)},TronWebProto.Witness.toObject=function(e,n){var r={address:n.getAddress_asB64(),votecount:t.Message.getFieldWithDefault(n,2,0),pubkey:n.getPubkey_asB64(),url:t.Message.getFieldWithDefault(n,4,``),totalproduced:t.Message.getFieldWithDefault(n,5,0),totalmissed:t.Message.getFieldWithDefault(n,6,0),latestblocknum:t.Message.getFieldWithDefault(n,7,0),latestslotnum:t.Message.getFieldWithDefault(n,8,0),isjobs:t.Message.getBooleanFieldWithDefault(n,9,!1)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Witness.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Witness;return TronWebProto.Witness.deserializeBinaryFromReader(r,n)},TronWebProto.Witness.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAddress(n);break;case 2:var n=t.readInt64();e.setVotecount(n);break;case 3:var n=t.readBytes();e.setPubkey(n);break;case 4:var n=t.readString();e.setUrl(n);break;case 5:var n=t.readInt64();e.setTotalproduced(n);break;case 6:var n=t.readInt64();e.setTotalmissed(n);break;case 7:var n=t.readInt64();e.setLatestblocknum(n);break;case 8:var n=t.readInt64();e.setLatestslotnum(n);break;case 9:var n=t.readBool();e.setIsjobs(n);break;default:t.skipField();break}return e},TronWebProto.Witness.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Witness.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Witness.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getVotecount(),n!==0&&t.writeInt64(2,n),n=e.getPubkey_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getUrl(),n.length>0&&t.writeString(4,n),n=e.getTotalproduced(),n!==0&&t.writeInt64(5,n),n=e.getTotalmissed(),n!==0&&t.writeInt64(6,n),n=e.getLatestblocknum(),n!==0&&t.writeInt64(7,n),n=e.getLatestslotnum(),n!==0&&t.writeInt64(8,n),n=e.getIsjobs(),n&&t.writeBool(9,n)},TronWebProto.Witness.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.Witness.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.Witness.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.Witness.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.Witness.prototype.getVotecount=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Witness.prototype.setVotecount=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.Witness.prototype.getPubkey=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.Witness.prototype.getPubkey_asB64=function(){return t.Message.bytesAsB64(this.getPubkey())},TronWebProto.Witness.prototype.getPubkey_asU8=function(){return t.Message.bytesAsU8(this.getPubkey())},TronWebProto.Witness.prototype.setPubkey=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.Witness.prototype.getUrl=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.Witness.prototype.setUrl=function(e){return t.Message.setProto3StringField(this,4,e)},TronWebProto.Witness.prototype.getTotalproduced=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.Witness.prototype.setTotalproduced=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.Witness.prototype.getTotalmissed=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.Witness.prototype.setTotalmissed=function(e){return t.Message.setProto3IntField(this,6,e)},TronWebProto.Witness.prototype.getLatestblocknum=function(){return t.Message.getFieldWithDefault(this,7,0)},TronWebProto.Witness.prototype.setLatestblocknum=function(e){return t.Message.setProto3IntField(this,7,e)},TronWebProto.Witness.prototype.getLatestslotnum=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.Witness.prototype.setLatestslotnum=function(e){return t.Message.setProto3IntField(this,8,e)},TronWebProto.Witness.prototype.getIsjobs=function(){return t.Message.getBooleanFieldWithDefault(this,9,!1)},TronWebProto.Witness.prototype.setIsjobs=function(e){return t.Message.setProto3BooleanField(this,9,e)},TronWebProto.Votes.repeatedFields_=[2,3],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Votes.prototype.toObject=function(e){return TronWebProto.Votes.toObject(e,this)},TronWebProto.Votes.toObject=function(e,n){var r={address:n.getAddress_asB64(),oldVotesList:t.Message.toObjectList(n.getOldVotesList(),TronWebProto.Vote.toObject,e),newVotesList:t.Message.toObjectList(n.getNewVotesList(),TronWebProto.Vote.toObject,e)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Votes.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Votes;return TronWebProto.Votes.deserializeBinaryFromReader(r,n)},TronWebProto.Votes.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAddress(n);break;case 2:var n=new TronWebProto.Vote;t.readMessage(n,TronWebProto.Vote.deserializeBinaryFromReader),e.addOldVotes(n);break;case 3:var n=new TronWebProto.Vote;t.readMessage(n,TronWebProto.Vote.deserializeBinaryFromReader),e.addNewVotes(n);break;default:t.skipField();break}return e},TronWebProto.Votes.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Votes.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Votes.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getOldVotesList(),n.length>0&&t.writeRepeatedMessage(2,n,TronWebProto.Vote.serializeBinaryToWriter),n=e.getNewVotesList(),n.length>0&&t.writeRepeatedMessage(3,n,TronWebProto.Vote.serializeBinaryToWriter)},TronWebProto.Votes.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.Votes.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.Votes.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.Votes.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.Votes.prototype.getOldVotesList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Vote,2)},TronWebProto.Votes.prototype.setOldVotesList=function(e){return t.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.Votes.prototype.addOldVotes=function(e,n){return t.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.Vote,n)},TronWebProto.Votes.prototype.clearOldVotesList=function(){return this.setOldVotesList([])},TronWebProto.Votes.prototype.getNewVotesList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Vote,3)},TronWebProto.Votes.prototype.setNewVotesList=function(e){return t.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.Votes.prototype.addNewVotes=function(e,n){return t.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.Vote,n)},TronWebProto.Votes.prototype.clearNewVotesList=function(){return this.setNewVotesList([])},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.MarketOrderDetail.prototype.toObject=function(e){return TronWebProto.MarketOrderDetail.toObject(e,this)},TronWebProto.MarketOrderDetail.toObject=function(e,n){var r={makerorderid:n.getMakerorderid_asB64(),takerorderid:n.getTakerorderid_asB64(),fillsellquantity:t.Message.getFieldWithDefault(n,3,0),fillbuyquantity:t.Message.getFieldWithDefault(n,4,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.MarketOrderDetail.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.MarketOrderDetail;return TronWebProto.MarketOrderDetail.deserializeBinaryFromReader(r,n)},TronWebProto.MarketOrderDetail.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setMakerorderid(n);break;case 2:var n=t.readBytes();e.setTakerorderid(n);break;case 3:var n=t.readInt64();e.setFillsellquantity(n);break;case 4:var n=t.readInt64();e.setFillbuyquantity(n);break;default:t.skipField();break}return e},TronWebProto.MarketOrderDetail.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.MarketOrderDetail.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.MarketOrderDetail.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getMakerorderid_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getTakerorderid_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getFillsellquantity(),n!==0&&t.writeInt64(3,n),n=e.getFillbuyquantity(),n!==0&&t.writeInt64(4,n)},TronWebProto.MarketOrderDetail.prototype.getMakerorderid=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asB64=function(){return t.Message.bytesAsB64(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asU8=function(){return t.Message.bytesAsU8(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.setMakerorderid=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.MarketOrderDetail.prototype.getTakerorderid=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asB64=function(){return t.Message.bytesAsB64(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asU8=function(){return t.Message.bytesAsU8(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.setTakerorderid=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.MarketOrderDetail.prototype.getFillsellquantity=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.MarketOrderDetail.prototype.setFillsellquantity=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.MarketOrderDetail.prototype.getFillbuyquantity=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.MarketOrderDetail.prototype.setFillbuyquantity=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.Transaction.repeatedFields_=[2,5],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.prototype.toObject=function(e){return TronWebProto.Transaction.toObject(e,this)},TronWebProto.Transaction.toObject=function(e,n){var r,i={rawData:(r=n.getRawData())&&TronWebProto.Transaction.raw.toObject(e,r),signatureList:n.getSignatureList_asB64(),retList:t.Message.toObjectList(n.getRetList(),TronWebProto.Transaction.Result.toObject,e)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.Transaction.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Transaction;return TronWebProto.Transaction.deserializeBinaryFromReader(r,n)},TronWebProto.Transaction.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=new TronWebProto.Transaction.raw;t.readMessage(n,TronWebProto.Transaction.raw.deserializeBinaryFromReader),e.setRawData(n);break;case 2:var n=t.readBytes();e.addSignature(n);break;case 5:var n=new TronWebProto.Transaction.Result;t.readMessage(n,TronWebProto.Transaction.Result.deserializeBinaryFromReader),e.addRet(n);break;default:t.skipField();break}return e},TronWebProto.Transaction.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Transaction.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getRawData(),n!=null&&t.writeMessage(1,n,TronWebProto.Transaction.raw.serializeBinaryToWriter),n=e.getSignatureList_asU8(),n.length>0&&t.writeRepeatedBytes(2,n),n=e.getRetList(),n.length>0&&t.writeRepeatedMessage(5,n,TronWebProto.Transaction.Result.serializeBinaryToWriter)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Contract.prototype.toObject=function(e){return TronWebProto.Transaction.Contract.toObject(e,this)},TronWebProto.Transaction.Contract.toObject=function(e,n){var r,a={type:t.Message.getFieldWithDefault(n,1,0),parameter:(r=n.getParameter())&&i.Any.toObject(e,r),provider:n.getProvider_asB64(),contractname:n.getContractname_asB64(),permissionId:t.Message.getFieldWithDefault(n,5,0)};return e&&(a.$jspbMessageInstance=n),a}),TronWebProto.Transaction.Contract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Transaction.Contract;return TronWebProto.Transaction.Contract.deserializeBinaryFromReader(r,n)},TronWebProto.Transaction.Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readEnum();e.setType(n);break;case 2:var n=new i.Any;t.readMessage(n,i.Any.deserializeBinaryFromReader),e.setParameter(n);break;case 3:var n=t.readBytes();e.setProvider(n);break;case 4:var n=t.readBytes();e.setContractname(n);break;case 5:var n=t.readInt32();e.setPermissionId(n);break;default:t.skipField();break}return e},TronWebProto.Transaction.Contract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Transaction.Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Contract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getType(),n!==0&&t.writeEnum(1,n),n=e.getParameter(),n!=null&&t.writeMessage(2,n,i.Any.serializeBinaryToWriter),n=e.getProvider_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getContractname_asU8(),n.length>0&&t.writeBytes(4,n),n=e.getPermissionId(),n!==0&&t.writeInt32(5,n)},TronWebProto.Transaction.Contract.ContractType={ACCOUNTCREATECONTRACT:0,TRANSFERCONTRACT:1,TRANSFERASSETCONTRACT:2,VOTEASSETCONTRACT:3,VOTEWITNESSCONTRACT:4,WITNESSCREATECONTRACT:5,ASSETISSUECONTRACT:6,WITNESSUPDATECONTRACT:8,PARTICIPATEASSETISSUECONTRACT:9,ACCOUNTUPDATECONTRACT:10,FREEZEBALANCECONTRACT:11,UNFREEZEBALANCECONTRACT:12,WITHDRAWBALANCECONTRACT:13,UNFREEZEASSETCONTRACT:14,UPDATEASSETCONTRACT:15,PROPOSALCREATECONTRACT:16,PROPOSALAPPROVECONTRACT:17,PROPOSALDELETECONTRACT:18,SETACCOUNTIDCONTRACT:19,CUSTOMCONTRACT:20,CREATESMARTCONTRACT:30,TRIGGERSMARTCONTRACT:31,GETCONTRACT:32,UPDATESETTINGCONTRACT:33,EXCHANGECREATECONTRACT:41,EXCHANGEINJECTCONTRACT:42,EXCHANGEWITHDRAWCONTRACT:43,EXCHANGETRANSACTIONCONTRACT:44,UPDATEENERGYLIMITCONTRACT:45,ACCOUNTPERMISSIONUPDATECONTRACT:46,CLEARABICONTRACT:48,UPDATEBROKERAGECONTRACT:49,SHIELDEDTRANSFERCONTRACT:51,MARKETSELLASSETCONTRACT:52,MARKETCANCELORDERCONTRACT:53,FREEZEBALANCEV2CONTRACT:54,UNFREEZEBALANCEV2CONTRACT:55,WITHDRAWEXPIREUNFREEZECONTRACT:56,DELEGATERESOURCECONTRACT:57,UNDELEGATERESOURCECONTRACT:58,CANCELALLUNFREEZEV2CONTRACT:59},TronWebProto.Transaction.Contract.prototype.getType=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Contract.prototype.setType=function(e){return t.Message.setProto3EnumField(this,1,e)},TronWebProto.Transaction.Contract.prototype.getParameter=function(){return t.Message.getWrapperField(this,i.Any,2)},TronWebProto.Transaction.Contract.prototype.setParameter=function(e){return t.Message.setWrapperField(this,2,e)},TronWebProto.Transaction.Contract.prototype.clearParameter=function(){return this.setParameter(void 0)},TronWebProto.Transaction.Contract.prototype.hasParameter=function(){return t.Message.getField(this,2)!=null},TronWebProto.Transaction.Contract.prototype.getProvider=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.Transaction.Contract.prototype.getProvider_asB64=function(){return t.Message.bytesAsB64(this.getProvider())},TronWebProto.Transaction.Contract.prototype.getProvider_asU8=function(){return t.Message.bytesAsU8(this.getProvider())},TronWebProto.Transaction.Contract.prototype.setProvider=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.Transaction.Contract.prototype.getContractname=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.Transaction.Contract.prototype.getContractname_asB64=function(){return t.Message.bytesAsB64(this.getContractname())},TronWebProto.Transaction.Contract.prototype.getContractname_asU8=function(){return t.Message.bytesAsU8(this.getContractname())},TronWebProto.Transaction.Contract.prototype.setContractname=function(e){return t.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.Contract.prototype.getPermissionId=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.Transaction.Contract.prototype.setPermissionId=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.Transaction.Result.repeatedFields_=[26],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Result.prototype.toObject=function(e){return TronWebProto.Transaction.Result.toObject(e,this)},TronWebProto.Transaction.Result.toObject=function(e,n){var r={fee:t.Message.getFieldWithDefault(n,1,0),ret:t.Message.getFieldWithDefault(n,2,0),contractret:t.Message.getFieldWithDefault(n,3,0),assetissueid:t.Message.getFieldWithDefault(n,14,``),withdrawAmount:t.Message.getFieldWithDefault(n,15,0),unfreezeAmount:t.Message.getFieldWithDefault(n,16,0),exchangeReceivedAmount:t.Message.getFieldWithDefault(n,18,0),exchangeInjectAnotherAmount:t.Message.getFieldWithDefault(n,19,0),exchangeWithdrawAnotherAmount:t.Message.getFieldWithDefault(n,20,0),exchangeId:t.Message.getFieldWithDefault(n,21,0),shieldedTransactionFee:t.Message.getFieldWithDefault(n,22,0),orderid:n.getOrderid_asB64(),orderdetailsList:t.Message.toObjectList(n.getOrderdetailsList(),TronWebProto.MarketOrderDetail.toObject,e)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Transaction.Result.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Transaction.Result;return TronWebProto.Transaction.Result.deserializeBinaryFromReader(r,n)},TronWebProto.Transaction.Result.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setFee(n);break;case 2:var n=t.readEnum();e.setRet(n);break;case 3:var n=t.readEnum();e.setContractret(n);break;case 14:var n=t.readString();e.setAssetissueid(n);break;case 15:var n=t.readInt64();e.setWithdrawAmount(n);break;case 16:var n=t.readInt64();e.setUnfreezeAmount(n);break;case 18:var n=t.readInt64();e.setExchangeReceivedAmount(n);break;case 19:var n=t.readInt64();e.setExchangeInjectAnotherAmount(n);break;case 20:var n=t.readInt64();e.setExchangeWithdrawAnotherAmount(n);break;case 21:var n=t.readInt64();e.setExchangeId(n);break;case 22:var n=t.readInt64();e.setShieldedTransactionFee(n);break;case 25:var n=t.readBytes();e.setOrderid(n);break;case 26:var n=new TronWebProto.MarketOrderDetail;t.readMessage(n,TronWebProto.MarketOrderDetail.deserializeBinaryFromReader),e.addOrderdetails(n);break;default:t.skipField();break}return e},TronWebProto.Transaction.Result.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Transaction.Result.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Result.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getFee(),n!==0&&t.writeInt64(1,n),n=e.getRet(),n!==0&&t.writeEnum(2,n),n=e.getContractret(),n!==0&&t.writeEnum(3,n),n=e.getAssetissueid(),n.length>0&&t.writeString(14,n),n=e.getWithdrawAmount(),n!==0&&t.writeInt64(15,n),n=e.getUnfreezeAmount(),n!==0&&t.writeInt64(16,n),n=e.getExchangeReceivedAmount(),n!==0&&t.writeInt64(18,n),n=e.getExchangeInjectAnotherAmount(),n!==0&&t.writeInt64(19,n),n=e.getExchangeWithdrawAnotherAmount(),n!==0&&t.writeInt64(20,n),n=e.getExchangeId(),n!==0&&t.writeInt64(21,n),n=e.getShieldedTransactionFee(),n!==0&&t.writeInt64(22,n),n=e.getOrderid_asU8(),n.length>0&&t.writeBytes(25,n),n=e.getOrderdetailsList(),n.length>0&&t.writeRepeatedMessage(26,n,TronWebProto.MarketOrderDetail.serializeBinaryToWriter)},TronWebProto.Transaction.Result.code={SUCESS:0,FAILED:1},TronWebProto.Transaction.Result.contractResult={DEFAULT:0,SUCCESS:1,REVERT:2,BAD_JUMP_DESTINATION:3,OUT_OF_MEMORY:4,PRECOMPILED_CONTRACT:5,STACK_TOO_SMALL:6,STACK_TOO_LARGE:7,ILLEGAL_OPERATION:8,STACK_OVERFLOW:9,OUT_OF_ENERGY:10,OUT_OF_TIME:11,JVM_STACK_OVER_FLOW:12,UNKNOWN:13,TRANSFER_FAILED:14,INVALID_CODE:15},TronWebProto.Transaction.Result.prototype.getFee=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Result.prototype.setFee=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.Transaction.Result.prototype.getRet=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.Transaction.Result.prototype.setRet=function(e){return t.Message.setProto3EnumField(this,2,e)},TronWebProto.Transaction.Result.prototype.getContractret=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.Result.prototype.setContractret=function(e){return t.Message.setProto3EnumField(this,3,e)},TronWebProto.Transaction.Result.prototype.getAssetissueid=function(){return t.Message.getFieldWithDefault(this,14,``)},TronWebProto.Transaction.Result.prototype.setAssetissueid=function(e){return t.Message.setProto3StringField(this,14,e)},TronWebProto.Transaction.Result.prototype.getWithdrawAmount=function(){return t.Message.getFieldWithDefault(this,15,0)},TronWebProto.Transaction.Result.prototype.setWithdrawAmount=function(e){return t.Message.setProto3IntField(this,15,e)},TronWebProto.Transaction.Result.prototype.getUnfreezeAmount=function(){return t.Message.getFieldWithDefault(this,16,0)},TronWebProto.Transaction.Result.prototype.setUnfreezeAmount=function(e){return t.Message.setProto3IntField(this,16,e)},TronWebProto.Transaction.Result.prototype.getExchangeReceivedAmount=function(){return t.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.Result.prototype.setExchangeReceivedAmount=function(e){return t.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.Result.prototype.getExchangeInjectAnotherAmount=function(){return t.Message.getFieldWithDefault(this,19,0)},TronWebProto.Transaction.Result.prototype.setExchangeInjectAnotherAmount=function(e){return t.Message.setProto3IntField(this,19,e)},TronWebProto.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount=function(){return t.Message.getFieldWithDefault(this,20,0)},TronWebProto.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount=function(e){return t.Message.setProto3IntField(this,20,e)},TronWebProto.Transaction.Result.prototype.getExchangeId=function(){return t.Message.getFieldWithDefault(this,21,0)},TronWebProto.Transaction.Result.prototype.setExchangeId=function(e){return t.Message.setProto3IntField(this,21,e)},TronWebProto.Transaction.Result.prototype.getShieldedTransactionFee=function(){return t.Message.getFieldWithDefault(this,22,0)},TronWebProto.Transaction.Result.prototype.setShieldedTransactionFee=function(e){return t.Message.setProto3IntField(this,22,e)},TronWebProto.Transaction.Result.prototype.getOrderid=function(){return t.Message.getFieldWithDefault(this,25,``)},TronWebProto.Transaction.Result.prototype.getOrderid_asB64=function(){return t.Message.bytesAsB64(this.getOrderid())},TronWebProto.Transaction.Result.prototype.getOrderid_asU8=function(){return t.Message.bytesAsU8(this.getOrderid())},TronWebProto.Transaction.Result.prototype.setOrderid=function(e){return t.Message.setProto3BytesField(this,25,e)},TronWebProto.Transaction.Result.prototype.getOrderdetailsList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.MarketOrderDetail,26)},TronWebProto.Transaction.Result.prototype.setOrderdetailsList=function(e){return t.Message.setRepeatedWrapperField(this,26,e)},TronWebProto.Transaction.Result.prototype.addOrderdetails=function(e,n){return t.Message.addToRepeatedWrapperField(this,26,e,TronWebProto.MarketOrderDetail,n)},TronWebProto.Transaction.Result.prototype.clearOrderdetailsList=function(){return this.setOrderdetailsList([])},TronWebProto.Transaction.raw.repeatedFields_=[9,11],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.raw.prototype.toObject=function(e){return TronWebProto.Transaction.raw.toObject(e,this)},TronWebProto.Transaction.raw.toObject=function(e,n){var r={refBlockBytes:n.getRefBlockBytes_asB64(),refBlockNum:t.Message.getFieldWithDefault(n,3,0),refBlockHash:n.getRefBlockHash_asB64(),expiration:t.Message.getFieldWithDefault(n,8,0),authsList:t.Message.toObjectList(n.getAuthsList(),TronWebProto.authority.toObject,e),data:n.getData_asB64(),contractList:t.Message.toObjectList(n.getContractList(),TronWebProto.Transaction.Contract.toObject,e),scripts:n.getScripts_asB64(),timestamp:t.Message.getFieldWithDefault(n,14,0),feeLimit:t.Message.getFieldWithDefault(n,18,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.Transaction.raw.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.Transaction.raw;return TronWebProto.Transaction.raw.deserializeBinaryFromReader(r,n)},TronWebProto.Transaction.raw.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setRefBlockBytes(n);break;case 3:var n=t.readInt64();e.setRefBlockNum(n);break;case 4:var n=t.readBytes();e.setRefBlockHash(n);break;case 8:var n=t.readInt64();e.setExpiration(n);break;case 9:var n=new TronWebProto.authority;t.readMessage(n,TronWebProto.authority.deserializeBinaryFromReader),e.addAuths(n);break;case 10:var n=t.readBytes();e.setData(n);break;case 11:var n=new TronWebProto.Transaction.Contract;t.readMessage(n,TronWebProto.Transaction.Contract.deserializeBinaryFromReader),e.addContract(n);break;case 12:var n=t.readBytes();e.setScripts(n);break;case 14:var n=t.readInt64();e.setTimestamp(n);break;case 18:var n=t.readInt64();e.setFeeLimit(n);break;default:t.skipField();break}return e},TronWebProto.Transaction.raw.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.Transaction.raw.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.raw.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getRefBlockBytes_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getRefBlockNum(),n!==0&&t.writeInt64(3,n),n=e.getRefBlockHash_asU8(),n.length>0&&t.writeBytes(4,n),n=e.getExpiration(),n!==0&&t.writeInt64(8,n),n=e.getAuthsList(),n.length>0&&t.writeRepeatedMessage(9,n,TronWebProto.authority.serializeBinaryToWriter),n=e.getData_asU8(),n.length>0&&t.writeBytes(10,n),n=e.getContractList(),n.length>0&&t.writeRepeatedMessage(11,n,TronWebProto.Transaction.Contract.serializeBinaryToWriter),n=e.getScripts_asU8(),n.length>0&&t.writeBytes(12,n),n=e.getTimestamp(),n!==0&&t.writeInt64(14,n),n=e.getFeeLimit(),n!==0&&t.writeInt64(18,n)},TronWebProto.Transaction.raw.prototype.getRefBlockBytes=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asB64=function(){return t.Message.bytesAsB64(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asU8=function(){return t.Message.bytesAsU8(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.setRefBlockBytes=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.Transaction.raw.prototype.getRefBlockNum=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.raw.prototype.setRefBlockNum=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.Transaction.raw.prototype.getRefBlockHash=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asB64=function(){return t.Message.bytesAsB64(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asU8=function(){return t.Message.bytesAsU8(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.setRefBlockHash=function(e){return t.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.raw.prototype.getExpiration=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.Transaction.raw.prototype.setExpiration=function(e){return t.Message.setProto3IntField(this,8,e)},TronWebProto.Transaction.raw.prototype.getAuthsList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.authority,9)},TronWebProto.Transaction.raw.prototype.setAuthsList=function(e){return t.Message.setRepeatedWrapperField(this,9,e)},TronWebProto.Transaction.raw.prototype.addAuths=function(e,n){return t.Message.addToRepeatedWrapperField(this,9,e,TronWebProto.authority,n)},TronWebProto.Transaction.raw.prototype.clearAuthsList=function(){return this.setAuthsList([])},TronWebProto.Transaction.raw.prototype.getData=function(){return t.Message.getFieldWithDefault(this,10,``)},TronWebProto.Transaction.raw.prototype.getData_asB64=function(){return t.Message.bytesAsB64(this.getData())},TronWebProto.Transaction.raw.prototype.getData_asU8=function(){return t.Message.bytesAsU8(this.getData())},TronWebProto.Transaction.raw.prototype.setData=function(e){return t.Message.setProto3BytesField(this,10,e)},TronWebProto.Transaction.raw.prototype.getContractList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Contract,11)},TronWebProto.Transaction.raw.prototype.setContractList=function(e){return t.Message.setRepeatedWrapperField(this,11,e)},TronWebProto.Transaction.raw.prototype.addContract=function(e,n){return t.Message.addToRepeatedWrapperField(this,11,e,TronWebProto.Transaction.Contract,n)},TronWebProto.Transaction.raw.prototype.clearContractList=function(){return this.setContractList([])},TronWebProto.Transaction.raw.prototype.getScripts=function(){return t.Message.getFieldWithDefault(this,12,``)},TronWebProto.Transaction.raw.prototype.getScripts_asB64=function(){return t.Message.bytesAsB64(this.getScripts())},TronWebProto.Transaction.raw.prototype.getScripts_asU8=function(){return t.Message.bytesAsU8(this.getScripts())},TronWebProto.Transaction.raw.prototype.setScripts=function(e){return t.Message.setProto3BytesField(this,12,e)},TronWebProto.Transaction.raw.prototype.getTimestamp=function(){return t.Message.getFieldWithDefault(this,14,0)},TronWebProto.Transaction.raw.prototype.setTimestamp=function(e){return t.Message.setProto3IntField(this,14,e)},TronWebProto.Transaction.raw.prototype.getFeeLimit=function(){return t.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.raw.prototype.setFeeLimit=function(e){return t.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.prototype.getRawData=function(){return t.Message.getWrapperField(this,TronWebProto.Transaction.raw,1)},TronWebProto.Transaction.prototype.setRawData=function(e){return t.Message.setWrapperField(this,1,e)},TronWebProto.Transaction.prototype.clearRawData=function(){return this.setRawData(void 0)},TronWebProto.Transaction.prototype.hasRawData=function(){return t.Message.getField(this,1)!=null},TronWebProto.Transaction.prototype.getSignatureList=function(){return t.Message.getRepeatedField(this,2)},TronWebProto.Transaction.prototype.getSignatureList_asB64=function(){return t.Message.bytesListAsB64(this.getSignatureList())},TronWebProto.Transaction.prototype.getSignatureList_asU8=function(){return t.Message.bytesListAsU8(this.getSignatureList())},TronWebProto.Transaction.prototype.setSignatureList=function(e){return t.Message.setField(this,2,e||[])},TronWebProto.Transaction.prototype.addSignature=function(e,n){return t.Message.addToRepeatedField(this,2,e,n)},TronWebProto.Transaction.prototype.clearSignatureList=function(){return this.setSignatureList([])},TronWebProto.Transaction.prototype.getRetList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Result,5)},TronWebProto.Transaction.prototype.setRetList=function(e){return t.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Transaction.prototype.addRet=function(e,n){return t.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Transaction.Result,n)},TronWebProto.Transaction.prototype.clearRetList=function(){return this.setRetList([])},TronWebProto.AccountType={NORMAL:0,ASSETISSUE:1,CONTRACT:2},n.object.extend(e,TronWebProto)})),E8=s((e=>{var t=C8(),n=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||n!==void 0&&n||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();t.exportSymbol(`TronWebProto.ResourceCode`,null,n),TronWebProto.ResourceCode={BANDWIDTH:0,ENERGY:1,TRON_POWER:2},t.object.extend(e,TronWebProto)})),Eie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||function(){return this}.call(null)||Function(`return this`)(),i=E8();n.object.extend(proto,i),n.exportSymbol(`TronWebProto.AccountBalanceRequest`,null,r),n.exportSymbol(`TronWebProto.AccountBalanceResponse`,null,r),n.exportSymbol(`TronWebProto.AccountIdentifier`,null,r),n.exportSymbol(`TronWebProto.AccountTrace`,null,r),n.exportSymbol(`TronWebProto.BlockBalanceTrace`,null,r),n.exportSymbol(`TronWebProto.BlockBalanceTrace.BlockIdentifier`,null,r),n.exportSymbol(`TronWebProto.CancelAllUnfreezeV2Contract`,null,r),n.exportSymbol(`TronWebProto.DelegateResourceContract`,null,r),n.exportSymbol(`TronWebProto.FreezeBalanceContract`,null,r),n.exportSymbol(`TronWebProto.FreezeBalanceV2Contract`,null,r),n.exportSymbol(`TronWebProto.TransactionBalanceTrace`,null,r),n.exportSymbol(`TronWebProto.TransactionBalanceTrace.Operation`,null,r),n.exportSymbol(`TronWebProto.TransferContract`,null,r),n.exportSymbol(`TronWebProto.UnDelegateResourceContract`,null,r),n.exportSymbol(`TronWebProto.UnfreezeBalanceContract`,null,r),n.exportSymbol(`TronWebProto.UnfreezeBalanceV2Contract`,null,r),n.exportSymbol(`TronWebProto.WithdrawBalanceContract`,null,r),n.exportSymbol(`TronWebProto.WithdrawExpireUnfreezeContract`,null,r),TronWebProto.FreezeBalanceContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.FreezeBalanceContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceContract.displayName=`TronWebProto.FreezeBalanceContract`),TronWebProto.UnfreezeBalanceContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UnfreezeBalanceContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceContract.displayName=`TronWebProto.UnfreezeBalanceContract`),TronWebProto.WithdrawBalanceContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.WithdrawBalanceContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.WithdrawBalanceContract.displayName=`TronWebProto.WithdrawBalanceContract`),TronWebProto.TransferContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.TransferContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.TransferContract.displayName=`TronWebProto.TransferContract`),TronWebProto.TransactionBalanceTrace=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.TransactionBalanceTrace.repeatedFields_,null)},n.inherits(TronWebProto.TransactionBalanceTrace,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.displayName=`TronWebProto.TransactionBalanceTrace`),TronWebProto.TransactionBalanceTrace.Operation=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.TransactionBalanceTrace.Operation,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.Operation.displayName=`TronWebProto.TransactionBalanceTrace.Operation`),TronWebProto.BlockBalanceTrace=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.BlockBalanceTrace.repeatedFields_,null)},n.inherits(TronWebProto.BlockBalanceTrace,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.displayName=`TronWebProto.BlockBalanceTrace`),TronWebProto.BlockBalanceTrace.BlockIdentifier=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName=`TronWebProto.BlockBalanceTrace.BlockIdentifier`),TronWebProto.AccountTrace=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountTrace,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountTrace.displayName=`TronWebProto.AccountTrace`),TronWebProto.AccountIdentifier=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountIdentifier,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountIdentifier.displayName=`TronWebProto.AccountIdentifier`),TronWebProto.AccountBalanceRequest=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountBalanceRequest,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceRequest.displayName=`TronWebProto.AccountBalanceRequest`),TronWebProto.AccountBalanceResponse=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountBalanceResponse,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceResponse.displayName=`TronWebProto.AccountBalanceResponse`),TronWebProto.FreezeBalanceV2Contract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.FreezeBalanceV2Contract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceV2Contract.displayName=`TronWebProto.FreezeBalanceV2Contract`),TronWebProto.UnfreezeBalanceV2Contract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UnfreezeBalanceV2Contract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceV2Contract.displayName=`TronWebProto.UnfreezeBalanceV2Contract`),TronWebProto.WithdrawExpireUnfreezeContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.WithdrawExpireUnfreezeContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.WithdrawExpireUnfreezeContract.displayName=`TronWebProto.WithdrawExpireUnfreezeContract`),TronWebProto.DelegateResourceContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.DelegateResourceContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.DelegateResourceContract.displayName=`TronWebProto.DelegateResourceContract`),TronWebProto.UnDelegateResourceContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UnDelegateResourceContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UnDelegateResourceContract.displayName=`TronWebProto.UnDelegateResourceContract`),TronWebProto.CancelAllUnfreezeV2Contract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.CancelAllUnfreezeV2Contract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.CancelAllUnfreezeV2Contract.displayName=`TronWebProto.CancelAllUnfreezeV2Contract`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceContract.toObject(e,this)},TronWebProto.FreezeBalanceContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),frozenBalance:t.Message.getFieldWithDefault(n,2,0),frozenDuration:t.Message.getFieldWithDefault(n,3,0),resource:t.Message.getFieldWithDefault(n,10,0),receiverAddress:n.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.FreezeBalanceContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.FreezeBalanceContract;return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(r,n)},TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setFrozenBalance(n);break;case 3:var n=t.readInt64();e.setFrozenDuration(n);break;case 10:var n=t.readEnum();e.setResource(n);break;case 15:var n=t.readBytes();e.setReceiverAddress(n);break;default:t.skipField();break}return e},TronWebProto.FreezeBalanceContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getFrozenBalance(),n!==0&&t.writeInt64(2,n),n=e.getFrozenDuration(),n!==0&&t.writeInt64(3,n),n=e.getResource(),n!==0&&t.writeEnum(10,n),n=e.getReceiverAddress_asU8(),n.length>0&&t.writeBytes(15,n)},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.FreezeBalanceContract.prototype.getResource=function(){return t.Message.getFieldWithDefault(this,10,0)},TronWebProto.FreezeBalanceContract.prototype.setResource=function(e){return t.Message.setProto3EnumField(this,10,e)},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress=function(){return t.Message.getFieldWithDefault(this,15,``)},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return t.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return t.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress=function(e){return t.Message.setProto3BytesField(this,15,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceContract.toObject(e,this)},TronWebProto.UnfreezeBalanceContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),resource:t.Message.getFieldWithDefault(n,10,0),receiverAddress:n.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UnfreezeBalanceContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceContract;return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(r,n)},TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 10:var n=t.readEnum();e.setResource(n);break;case 15:var n=t.readBytes();e.setReceiverAddress(n);break;default:t.skipField();break}return e},TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getResource(),n!==0&&t.writeEnum(10,n),n=e.getReceiverAddress_asU8(),n.length>0&&t.writeBytes(15,n)},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceContract.prototype.getResource=function(){return t.Message.getFieldWithDefault(this,10,0)},TronWebProto.UnfreezeBalanceContract.prototype.setResource=function(e){return t.Message.setProto3EnumField(this,10,e)},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress=function(){return t.Message.getFieldWithDefault(this,15,``)},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return t.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return t.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress=function(e){return t.Message.setProto3BytesField(this,15,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawBalanceContract.prototype.toObject=function(e){return TronWebProto.WithdrawBalanceContract.toObject(e,this)},TronWebProto.WithdrawBalanceContract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.WithdrawBalanceContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.WithdrawBalanceContract;return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(r,n)},TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;default:t.skipField();break}return e},TronWebProto.WithdrawBalanceContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n)},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferContract.prototype.toObject=function(e){return TronWebProto.TransferContract.toObject(e,this)},TronWebProto.TransferContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),toAddress:n.getToAddress_asB64(),amount:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.TransferContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.TransferContract;return TronWebProto.TransferContract.deserializeBinaryFromReader(r,n)},TronWebProto.TransferContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setToAddress(n);break;case 3:var n=t.readInt64();e.setAmount(n);break;default:t.skipField();break}return e},TronWebProto.TransferContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.TransferContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getToAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getAmount(),n!==0&&t.writeInt64(3,n)},TronWebProto.TransferContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.TransferContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferContract.prototype.getToAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.TransferContract.prototype.getToAddress_asB64=function(){return t.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferContract.prototype.getToAddress_asU8=function(){return t.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferContract.prototype.setToAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferContract.prototype.getAmount=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransferContract.prototype.setAmount=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.repeatedFields_=[2],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.toObject(e,this)},TronWebProto.TransactionBalanceTrace.toObject=function(e,n){var r={transactionIdentifier:n.getTransactionIdentifier_asB64(),operationList:t.Message.toObjectList(n.getOperationList(),TronWebProto.TransactionBalanceTrace.Operation.toObject,e),type:t.Message.getFieldWithDefault(n,3,``),status:t.Message.getFieldWithDefault(n,4,``)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.TransactionBalanceTrace.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace;return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(r,n)},TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setTransactionIdentifier(n);break;case 2:var n=new TronWebProto.TransactionBalanceTrace.Operation;t.readMessage(n,TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader),e.addOperation(n);break;case 3:var n=t.readString();e.setType(n);break;case 4:var n=t.readString();e.setStatus(n);break;default:t.skipField();break}return e},TronWebProto.TransactionBalanceTrace.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getTransactionIdentifier_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getOperationList(),n.length>0&&t.writeRepeatedMessage(2,n,TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter),n=e.getType(),n.length>0&&t.writeString(3,n),n=e.getStatus(),n.length>0&&t.writeString(4,n)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.Operation.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.Operation.toObject(e,this)},TronWebProto.TransactionBalanceTrace.Operation.toObject=function(e,n){var r={operationIdentifier:t.Message.getFieldWithDefault(n,1,0),address:n.getAddress_asB64(),amount:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.TransactionBalanceTrace.Operation.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace.Operation;return TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(r,n)},TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setOperationIdentifier(n);break;case 2:var n=t.readBytes();e.setAddress(n);break;case 3:var n=t.readInt64();e.setAmount(n);break;default:t.skipField();break}return e},TronWebProto.TransactionBalanceTrace.Operation.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOperationIdentifier(),n!==0&&t.writeInt64(1,n),n=e.getAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getAmount(),n!==0&&t.writeInt64(3,n)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAmount=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAmount=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64=function(){return t.Message.bytesAsB64(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8=function(){return t.Message.bytesAsU8(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.setTransactionIdentifier=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.TransactionBalanceTrace.prototype.getOperationList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace.Operation,2)},TronWebProto.TransactionBalanceTrace.prototype.setOperationList=function(e){return t.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.TransactionBalanceTrace.prototype.addOperation=function(e,n){return t.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.TransactionBalanceTrace.Operation,n)},TronWebProto.TransactionBalanceTrace.prototype.clearOperationList=function(){return this.setOperationList([])},TronWebProto.TransactionBalanceTrace.prototype.getType=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.TransactionBalanceTrace.prototype.setType=function(e){return t.Message.setProto3StringField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getStatus=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.TransactionBalanceTrace.prototype.setStatus=function(e){return t.Message.setProto3StringField(this,4,e)},TronWebProto.BlockBalanceTrace.repeatedFields_=[3],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.toObject(e,this)},TronWebProto.BlockBalanceTrace.toObject=function(e,n){var r,i={blockIdentifier:(r=n.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r),timestamp:t.Message.getFieldWithDefault(n,2,0),transactionBalanceTraceList:t.Message.toObjectList(n.getTransactionBalanceTraceList(),TronWebProto.TransactionBalanceTrace.toObject,e)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.BlockBalanceTrace.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace;return TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader(r,n)},TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(n,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(n);break;case 2:var n=t.readInt64();e.setTimestamp(n);break;case 3:var n=new TronWebProto.TransactionBalanceTrace;t.readMessage(n,TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader),e.addTransactionBalanceTrace(n);break;default:t.skipField();break}return e},TronWebProto.BlockBalanceTrace.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.BlockBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getBlockIdentifier(),n!=null&&t.writeMessage(1,n,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter),n=e.getTimestamp(),n!==0&&t.writeInt64(2,n),n=e.getTransactionBalanceTraceList(),n.length>0&&t.writeRepeatedMessage(3,n,TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,this)},TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject=function(e,n){var r={hash:n.getHash_asB64(),number:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;return TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(r,n)},TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setHash(n);break;case 2:var n=t.readInt64();e.setNumber(n);break;default:t.skipField();break}return e},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getHash_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getNumber(),n!==0&&t.writeInt64(2,n)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64=function(){return t.Message.bytesAsB64(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8=function(){return t.Message.bytesAsU8(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setHash=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getNumber=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setNumber=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getBlockIdentifier=function(){return t.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,1)},TronWebProto.BlockBalanceTrace.prototype.setBlockIdentifier=function(e){return t.Message.setWrapperField(this,1,e)},TronWebProto.BlockBalanceTrace.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.BlockBalanceTrace.prototype.hasBlockIdentifier=function(){return t.Message.getField(this,1)!=null},TronWebProto.BlockBalanceTrace.prototype.getTimestamp=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.prototype.setTimestamp=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getTransactionBalanceTraceList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace,3)},TronWebProto.BlockBalanceTrace.prototype.setTransactionBalanceTraceList=function(e){return t.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.BlockBalanceTrace.prototype.addTransactionBalanceTrace=function(e,n){return t.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.TransactionBalanceTrace,n)},TronWebProto.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList=function(){return this.setTransactionBalanceTraceList([])},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountTrace.prototype.toObject=function(e){return TronWebProto.AccountTrace.toObject(e,this)},TronWebProto.AccountTrace.toObject=function(e,n){var r={balance:t.Message.getFieldWithDefault(n,1,0),placeholder:t.Message.getFieldWithDefault(n,99,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.AccountTrace.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountTrace;return TronWebProto.AccountTrace.deserializeBinaryFromReader(r,n)},TronWebProto.AccountTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setBalance(n);break;case 99:var n=t.readInt64();e.setPlaceholder(n);break;default:t.skipField();break}return e},TronWebProto.AccountTrace.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountTrace.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getBalance(),n!==0&&t.writeInt64(1,n),n=e.getPlaceholder(),n!==0&&t.writeInt64(99,n)},TronWebProto.AccountTrace.prototype.getBalance=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountTrace.prototype.setBalance=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.AccountTrace.prototype.getPlaceholder=function(){return t.Message.getFieldWithDefault(this,99,0)},TronWebProto.AccountTrace.prototype.setPlaceholder=function(e){return t.Message.setProto3IntField(this,99,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountIdentifier.prototype.toObject=function(e){return TronWebProto.AccountIdentifier.toObject(e,this)},TronWebProto.AccountIdentifier.toObject=function(e,t){var n={address:t.getAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountIdentifier.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountIdentifier;return TronWebProto.AccountIdentifier.deserializeBinaryFromReader(r,n)},TronWebProto.AccountIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAddress(n);break;default:t.skipField();break}return e},TronWebProto.AccountIdentifier.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountIdentifier.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAddress_asU8(),n.length>0&&t.writeBytes(1,n)},TronWebProto.AccountIdentifier.prototype.getAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.AccountIdentifier.prototype.getAddress_asB64=function(){return t.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountIdentifier.prototype.getAddress_asU8=function(){return t.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountIdentifier.prototype.setAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceRequest.prototype.toObject=function(e){return TronWebProto.AccountBalanceRequest.toObject(e,this)},TronWebProto.AccountBalanceRequest.toObject=function(e,t){var n,r={accountIdentifier:(n=t.getAccountIdentifier())&&TronWebProto.AccountIdentifier.toObject(e,n),blockIdentifier:(n=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,n)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountBalanceRequest.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountBalanceRequest;return TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader(r,n)},TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=new TronWebProto.AccountIdentifier;t.readMessage(n,TronWebProto.AccountIdentifier.deserializeBinaryFromReader),e.setAccountIdentifier(n);break;case 2:var n=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(n,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(n);break;default:t.skipField();break}return e},TronWebProto.AccountBalanceRequest.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountBalanceRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceRequest.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAccountIdentifier(),n!=null&&t.writeMessage(1,n,TronWebProto.AccountIdentifier.serializeBinaryToWriter),n=e.getBlockIdentifier(),n!=null&&t.writeMessage(2,n,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceRequest.prototype.getAccountIdentifier=function(){return t.Message.getWrapperField(this,TronWebProto.AccountIdentifier,1)},TronWebProto.AccountBalanceRequest.prototype.setAccountIdentifier=function(e){return t.Message.setWrapperField(this,1,e)},TronWebProto.AccountBalanceRequest.prototype.clearAccountIdentifier=function(){return this.setAccountIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasAccountIdentifier=function(){return t.Message.getField(this,1)!=null},TronWebProto.AccountBalanceRequest.prototype.getBlockIdentifier=function(){return t.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceRequest.prototype.setBlockIdentifier=function(e){return t.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceRequest.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasBlockIdentifier=function(){return t.Message.getField(this,2)!=null},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceResponse.prototype.toObject=function(e){return TronWebProto.AccountBalanceResponse.toObject(e,this)},TronWebProto.AccountBalanceResponse.toObject=function(e,n){var r,i={balance:t.Message.getFieldWithDefault(n,1,0),blockIdentifier:(r=n.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.AccountBalanceResponse.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountBalanceResponse;return TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader(r,n)},TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setBalance(n);break;case 2:var n=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(n,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(n);break;default:t.skipField();break}return e},TronWebProto.AccountBalanceResponse.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountBalanceResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceResponse.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getBalance(),n!==0&&t.writeInt64(1,n),n=e.getBlockIdentifier(),n!=null&&t.writeMessage(2,n,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceResponse.prototype.getBalance=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountBalanceResponse.prototype.setBalance=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.AccountBalanceResponse.prototype.getBlockIdentifier=function(){return t.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceResponse.prototype.setBlockIdentifier=function(e){return t.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceResponse.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceResponse.prototype.hasBlockIdentifier=function(){return t.Message.getField(this,2)!=null},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceV2Contract.toObject(e,this)},TronWebProto.FreezeBalanceV2Contract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),frozenBalance:t.Message.getFieldWithDefault(n,2,0),resource:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.FreezeBalanceV2Contract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.FreezeBalanceV2Contract;return TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader(r,n)},TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setFrozenBalance(n);break;case 3:var n=t.readEnum();e.setResource(n);break;default:t.skipField();break}return e},TronWebProto.FreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getFrozenBalance(),n!==0&&t.writeInt64(2,n),n=e.getResource(),n!==0&&t.writeEnum(3,n)},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getFrozenBalance=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setFrozenBalance=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getResource=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setResource=function(e){return t.Message.setProto3EnumField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceV2Contract.toObject(e,this)},TronWebProto.UnfreezeBalanceV2Contract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),unfreezeBalance:t.Message.getFieldWithDefault(n,2,0),resource:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UnfreezeBalanceV2Contract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceV2Contract;return TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(r,n)},TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setUnfreezeBalance(n);break;case 3:var n=t.readEnum();e.setResource(n);break;default:t.skipField();break}return e},TronWebProto.UnfreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getUnfreezeBalance(),n!==0&&t.writeInt64(2,n),n=e.getResource(),n!==0&&t.writeEnum(3,n)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getResource=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setResource=function(e){return t.Message.setProto3EnumField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawExpireUnfreezeContract.prototype.toObject=function(e){return TronWebProto.WithdrawExpireUnfreezeContract.toObject(e,this)},TronWebProto.WithdrawExpireUnfreezeContract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.WithdrawExpireUnfreezeContract;return TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(r,n)},TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;default:t.skipField();break}return e},TronWebProto.WithdrawExpireUnfreezeContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n)},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegateResourceContract.prototype.toObject=function(e){return TronWebProto.DelegateResourceContract.toObject(e,this)},TronWebProto.DelegateResourceContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),resource:t.Message.getFieldWithDefault(n,2,0),balance:t.Message.getFieldWithDefault(n,3,0),receiverAddress:n.getReceiverAddress_asB64(),lock:t.Message.getBooleanFieldWithDefault(n,5,!1),lockPeriod:t.Message.getFieldWithDefault(n,6,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.DelegateResourceContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.DelegateResourceContract;return TronWebProto.DelegateResourceContract.deserializeBinaryFromReader(r,n)},TronWebProto.DelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readEnum();e.setResource(n);break;case 3:var n=t.readInt64();e.setBalance(n);break;case 4:var n=t.readBytes();e.setReceiverAddress(n);break;case 5:var n=t.readBool();e.setLock(n);break;case 6:var n=t.readInt64();e.setLockPeriod(n);break;default:t.skipField();break}return e},TronWebProto.DelegateResourceContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.DelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegateResourceContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getResource(),n!==0&&t.writeEnum(2,n),n=e.getBalance(),n!==0&&t.writeInt64(3,n),n=e.getReceiverAddress_asU8(),n.length>0&&t.writeBytes(4,n),n=e.getLock(),n&&t.writeBool(5,n),n=e.getLockPeriod(),n!==0&&t.writeInt64(6,n)},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegateResourceContract.prototype.getResource=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.DelegateResourceContract.prototype.setResource=function(e){return t.Message.setProto3EnumField(this,2,e)},TronWebProto.DelegateResourceContract.prototype.getBalance=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegateResourceContract.prototype.setBalance=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return t.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return t.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.setReceiverAddress=function(e){return t.Message.setProto3BytesField(this,4,e)},TronWebProto.DelegateResourceContract.prototype.getLock=function(){return t.Message.getBooleanFieldWithDefault(this,5,!1)},TronWebProto.DelegateResourceContract.prototype.setLock=function(e){return t.Message.setProto3BooleanField(this,5,e)},TronWebProto.DelegateResourceContract.prototype.getLockPeriod=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegateResourceContract.prototype.setLockPeriod=function(e){return t.Message.setProto3IntField(this,6,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnDelegateResourceContract.prototype.toObject=function(e){return TronWebProto.UnDelegateResourceContract.toObject(e,this)},TronWebProto.UnDelegateResourceContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),resource:t.Message.getFieldWithDefault(n,2,0),balance:t.Message.getFieldWithDefault(n,3,0),receiverAddress:n.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UnDelegateResourceContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UnDelegateResourceContract;return TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader(r,n)},TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readEnum();e.setResource(n);break;case 3:var n=t.readInt64();e.setBalance(n);break;case 4:var n=t.readBytes();e.setReceiverAddress(n);break;default:t.skipField();break}return e},TronWebProto.UnDelegateResourceContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getResource(),n!==0&&t.writeEnum(2,n),n=e.getBalance(),n!==0&&t.writeInt64(3,n),n=e.getReceiverAddress_asU8(),n.length>0&&t.writeBytes(4,n)},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UnDelegateResourceContract.prototype.getResource=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnDelegateResourceContract.prototype.setResource=function(e){return t.Message.setProto3EnumField(this,2,e)},TronWebProto.UnDelegateResourceContract.prototype.getBalance=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnDelegateResourceContract.prototype.setBalance=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return t.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return t.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.setReceiverAddress=function(e){return t.Message.setProto3BytesField(this,4,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.CancelAllUnfreezeV2Contract.prototype.toObject=function(e){return TronWebProto.CancelAllUnfreezeV2Contract.toObject(e,this)},TronWebProto.CancelAllUnfreezeV2Contract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.CancelAllUnfreezeV2Contract;return TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader(r,n)},TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;default:t.skipField();break}return e},TronWebProto.CancelAllUnfreezeV2Contract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n)},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},n.object.extend(e,TronWebProto)})),Die=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();n.exportSymbol(`TronWebProto.AssetIssueContract`,null,r),n.exportSymbol(`TronWebProto.AssetIssueContract.FrozenSupply`,null,r),n.exportSymbol(`TronWebProto.ParticipateAssetIssueContract`,null,r),n.exportSymbol(`TronWebProto.TransferAssetContract`,null,r),n.exportSymbol(`TronWebProto.UnfreezeAssetContract`,null,r),n.exportSymbol(`TronWebProto.UpdateAssetContract`,null,r),TronWebProto.AssetIssueContract=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.AssetIssueContract.repeatedFields_,null)},n.inherits(TronWebProto.AssetIssueContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.displayName=`TronWebProto.AssetIssueContract`),TronWebProto.AssetIssueContract.FrozenSupply=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AssetIssueContract.FrozenSupply,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.FrozenSupply.displayName=`TronWebProto.AssetIssueContract.FrozenSupply`),TronWebProto.TransferAssetContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.TransferAssetContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.TransferAssetContract.displayName=`TronWebProto.TransferAssetContract`),TronWebProto.UnfreezeAssetContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UnfreezeAssetContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeAssetContract.displayName=`TronWebProto.UnfreezeAssetContract`),TronWebProto.UpdateAssetContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UpdateAssetContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UpdateAssetContract.displayName=`TronWebProto.UpdateAssetContract`),TronWebProto.ParticipateAssetIssueContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ParticipateAssetIssueContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ParticipateAssetIssueContract.displayName=`TronWebProto.ParticipateAssetIssueContract`),TronWebProto.AssetIssueContract.repeatedFields_=[5],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.toObject(e,this)},TronWebProto.AssetIssueContract.toObject=function(e,n){var r={id:t.Message.getFieldWithDefault(n,41,``),ownerAddress:n.getOwnerAddress_asB64(),name:n.getName_asB64(),abbr:n.getAbbr_asB64(),totalSupply:t.Message.getFieldWithDefault(n,4,0),frozenSupplyList:t.Message.toObjectList(n.getFrozenSupplyList(),TronWebProto.AssetIssueContract.FrozenSupply.toObject,e),trxNum:t.Message.getFieldWithDefault(n,6,0),precision:t.Message.getFieldWithDefault(n,7,0),num:t.Message.getFieldWithDefault(n,8,0),startTime:t.Message.getFieldWithDefault(n,9,0),endTime:t.Message.getFieldWithDefault(n,10,0),order:t.Message.getFieldWithDefault(n,11,0),voteScore:t.Message.getFieldWithDefault(n,16,0),description:n.getDescription_asB64(),url:n.getUrl_asB64(),freeAssetNetLimit:t.Message.getFieldWithDefault(n,22,0),publicFreeAssetNetLimit:t.Message.getFieldWithDefault(n,23,0),publicFreeAssetNetUsage:t.Message.getFieldWithDefault(n,24,0),publicLatestFreeNetTime:t.Message.getFieldWithDefault(n,25,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.AssetIssueContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AssetIssueContract;return TronWebProto.AssetIssueContract.deserializeBinaryFromReader(r,n)},TronWebProto.AssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 41:var n=t.readString();e.setId(n);break;case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setName(n);break;case 3:var n=t.readBytes();e.setAbbr(n);break;case 4:var n=t.readInt64();e.setTotalSupply(n);break;case 5:var n=new TronWebProto.AssetIssueContract.FrozenSupply;t.readMessage(n,TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader),e.addFrozenSupply(n);break;case 6:var n=t.readInt32();e.setTrxNum(n);break;case 7:var n=t.readInt32();e.setPrecision(n);break;case 8:var n=t.readInt32();e.setNum(n);break;case 9:var n=t.readInt64();e.setStartTime(n);break;case 10:var n=t.readInt64();e.setEndTime(n);break;case 11:var n=t.readInt64();e.setOrder(n);break;case 16:var n=t.readInt32();e.setVoteScore(n);break;case 20:var n=t.readBytes();e.setDescription(n);break;case 21:var n=t.readBytes();e.setUrl(n);break;case 22:var n=t.readInt64();e.setFreeAssetNetLimit(n);break;case 23:var n=t.readInt64();e.setPublicFreeAssetNetLimit(n);break;case 24:var n=t.readInt64();e.setPublicFreeAssetNetUsage(n);break;case 25:var n=t.readInt64();e.setPublicLatestFreeNetTime(n);break;default:t.skipField();break}return e},TronWebProto.AssetIssueContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getId(),n.length>0&&t.writeString(41,n),n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getName_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getAbbr_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getTotalSupply(),n!==0&&t.writeInt64(4,n),n=e.getFrozenSupplyList(),n.length>0&&t.writeRepeatedMessage(5,n,TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter),n=e.getTrxNum(),n!==0&&t.writeInt32(6,n),n=e.getPrecision(),n!==0&&t.writeInt32(7,n),n=e.getNum(),n!==0&&t.writeInt32(8,n),n=e.getStartTime(),n!==0&&t.writeInt64(9,n),n=e.getEndTime(),n!==0&&t.writeInt64(10,n),n=e.getOrder(),n!==0&&t.writeInt64(11,n),n=e.getVoteScore(),n!==0&&t.writeInt32(16,n),n=e.getDescription_asU8(),n.length>0&&t.writeBytes(20,n),n=e.getUrl_asU8(),n.length>0&&t.writeBytes(21,n),n=e.getFreeAssetNetLimit(),n!==0&&t.writeInt64(22,n),n=e.getPublicFreeAssetNetLimit(),n!==0&&t.writeInt64(23,n),n=e.getPublicFreeAssetNetUsage(),n!==0&&t.writeInt64(24,n),n=e.getPublicLatestFreeNetTime(),n!==0&&t.writeInt64(25,n)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.FrozenSupply.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.FrozenSupply.toObject(e,this)},TronWebProto.AssetIssueContract.FrozenSupply.toObject=function(e,n){var r={frozenAmount:t.Message.getFieldWithDefault(n,1,0),frozenDays:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AssetIssueContract.FrozenSupply;return TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(r,n)},TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setFrozenAmount(n);break;case 2:var n=t.readInt64();e.setFrozenDays(n);break;default:t.skipField();break}return e},TronWebProto.AssetIssueContract.FrozenSupply.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getFrozenAmount(),n!==0&&t.writeInt64(1,n),n=e.getFrozenDays(),n!==0&&t.writeInt64(2,n)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenDays=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenDays=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getId=function(){return t.Message.getFieldWithDefault(this,41,``)},TronWebProto.AssetIssueContract.prototype.setId=function(e){return t.Message.setProto3StringField(this,41,e)},TronWebProto.AssetIssueContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.AssetIssueContract.prototype.getName=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.AssetIssueContract.prototype.getName_asB64=function(){return t.Message.bytesAsB64(this.getName())},TronWebProto.AssetIssueContract.prototype.getName_asU8=function(){return t.Message.bytesAsU8(this.getName())},TronWebProto.AssetIssueContract.prototype.setName=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getAbbr=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.AssetIssueContract.prototype.getAbbr_asB64=function(){return t.Message.bytesAsB64(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.getAbbr_asU8=function(){return t.Message.bytesAsU8(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.setAbbr=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.AssetIssueContract.prototype.getTotalSupply=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.AssetIssueContract.prototype.setTotalSupply=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.AssetIssueContract.prototype.getFrozenSupplyList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.AssetIssueContract.FrozenSupply,5)},TronWebProto.AssetIssueContract.prototype.setFrozenSupplyList=function(e){return t.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.AssetIssueContract.prototype.addFrozenSupply=function(e,n){return t.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.AssetIssueContract.FrozenSupply,n)},TronWebProto.AssetIssueContract.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.AssetIssueContract.prototype.getTrxNum=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.AssetIssueContract.prototype.setTrxNum=function(e){return t.Message.setProto3IntField(this,6,e)},TronWebProto.AssetIssueContract.prototype.getPrecision=function(){return t.Message.getFieldWithDefault(this,7,0)},TronWebProto.AssetIssueContract.prototype.setPrecision=function(e){return t.Message.setProto3IntField(this,7,e)},TronWebProto.AssetIssueContract.prototype.getNum=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.AssetIssueContract.prototype.setNum=function(e){return t.Message.setProto3IntField(this,8,e)},TronWebProto.AssetIssueContract.prototype.getStartTime=function(){return t.Message.getFieldWithDefault(this,9,0)},TronWebProto.AssetIssueContract.prototype.setStartTime=function(e){return t.Message.setProto3IntField(this,9,e)},TronWebProto.AssetIssueContract.prototype.getEndTime=function(){return t.Message.getFieldWithDefault(this,10,0)},TronWebProto.AssetIssueContract.prototype.setEndTime=function(e){return t.Message.setProto3IntField(this,10,e)},TronWebProto.AssetIssueContract.prototype.getOrder=function(){return t.Message.getFieldWithDefault(this,11,0)},TronWebProto.AssetIssueContract.prototype.setOrder=function(e){return t.Message.setProto3IntField(this,11,e)},TronWebProto.AssetIssueContract.prototype.getVoteScore=function(){return t.Message.getFieldWithDefault(this,16,0)},TronWebProto.AssetIssueContract.prototype.setVoteScore=function(e){return t.Message.setProto3IntField(this,16,e)},TronWebProto.AssetIssueContract.prototype.getDescription=function(){return t.Message.getFieldWithDefault(this,20,``)},TronWebProto.AssetIssueContract.prototype.getDescription_asB64=function(){return t.Message.bytesAsB64(this.getDescription())},TronWebProto.AssetIssueContract.prototype.getDescription_asU8=function(){return t.Message.bytesAsU8(this.getDescription())},TronWebProto.AssetIssueContract.prototype.setDescription=function(e){return t.Message.setProto3BytesField(this,20,e)},TronWebProto.AssetIssueContract.prototype.getUrl=function(){return t.Message.getFieldWithDefault(this,21,``)},TronWebProto.AssetIssueContract.prototype.getUrl_asB64=function(){return t.Message.bytesAsB64(this.getUrl())},TronWebProto.AssetIssueContract.prototype.getUrl_asU8=function(){return t.Message.bytesAsU8(this.getUrl())},TronWebProto.AssetIssueContract.prototype.setUrl=function(e){return t.Message.setProto3BytesField(this,21,e)},TronWebProto.AssetIssueContract.prototype.getFreeAssetNetLimit=function(){return t.Message.getFieldWithDefault(this,22,0)},TronWebProto.AssetIssueContract.prototype.setFreeAssetNetLimit=function(e){return t.Message.setProto3IntField(this,22,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetLimit=function(){return t.Message.getFieldWithDefault(this,23,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetLimit=function(e){return t.Message.setProto3IntField(this,23,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetUsage=function(){return t.Message.getFieldWithDefault(this,24,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetUsage=function(e){return t.Message.setProto3IntField(this,24,e)},TronWebProto.AssetIssueContract.prototype.getPublicLatestFreeNetTime=function(){return t.Message.getFieldWithDefault(this,25,0)},TronWebProto.AssetIssueContract.prototype.setPublicLatestFreeNetTime=function(e){return t.Message.setProto3IntField(this,25,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferAssetContract.prototype.toObject=function(e){return TronWebProto.TransferAssetContract.toObject(e,this)},TronWebProto.TransferAssetContract.toObject=function(e,n){var r={assetName:n.getAssetName_asB64(),ownerAddress:n.getOwnerAddress_asB64(),toAddress:n.getToAddress_asB64(),amount:t.Message.getFieldWithDefault(n,4,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.TransferAssetContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.TransferAssetContract;return TronWebProto.TransferAssetContract.deserializeBinaryFromReader(r,n)},TronWebProto.TransferAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAssetName(n);break;case 2:var n=t.readBytes();e.setOwnerAddress(n);break;case 3:var n=t.readBytes();e.setToAddress(n);break;case 4:var n=t.readInt64();e.setAmount(n);break;default:t.skipField();break}return e},TronWebProto.TransferAssetContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.TransferAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferAssetContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAssetName_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getToAddress_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getAmount(),n!==0&&t.writeInt64(4,n)},TronWebProto.TransferAssetContract.prototype.getAssetName=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.TransferAssetContract.prototype.getAssetName_asB64=function(){return t.Message.bytesAsB64(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.getAssetName_asU8=function(){return t.Message.bytesAsU8(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.setAssetName=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferAssetContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferAssetContract.prototype.getToAddress=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.TransferAssetContract.prototype.getToAddress_asB64=function(){return t.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.getToAddress_asU8=function(){return t.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.setToAddress=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.TransferAssetContract.prototype.getAmount=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.TransferAssetContract.prototype.setAmount=function(e){return t.Message.setProto3IntField(this,4,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeAssetContract.prototype.toObject=function(e){return TronWebProto.UnfreezeAssetContract.toObject(e,this)},TronWebProto.UnfreezeAssetContract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.UnfreezeAssetContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UnfreezeAssetContract;return TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader(r,n)},TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;default:t.skipField();break}return e},TronWebProto.UnfreezeAssetContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n)},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateAssetContract.prototype.toObject=function(e){return TronWebProto.UpdateAssetContract.toObject(e,this)},TronWebProto.UpdateAssetContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),description:n.getDescription_asB64(),url:n.getUrl_asB64(),newLimit:t.Message.getFieldWithDefault(n,4,0),newPublicLimit:t.Message.getFieldWithDefault(n,5,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UpdateAssetContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UpdateAssetContract;return TronWebProto.UpdateAssetContract.deserializeBinaryFromReader(r,n)},TronWebProto.UpdateAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setDescription(n);break;case 3:var n=t.readBytes();e.setUrl(n);break;case 4:var n=t.readInt64();e.setNewLimit(n);break;case 5:var n=t.readInt64();e.setNewPublicLimit(n);break;default:t.skipField();break}return e},TronWebProto.UpdateAssetContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UpdateAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateAssetContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getDescription_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getUrl_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getNewLimit(),n!==0&&t.writeInt64(4,n),n=e.getNewPublicLimit(),n!==0&&t.writeInt64(5,n)},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateAssetContract.prototype.getDescription=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.UpdateAssetContract.prototype.getDescription_asB64=function(){return t.Message.bytesAsB64(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.getDescription_asU8=function(){return t.Message.bytesAsU8(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.setDescription=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateAssetContract.prototype.getUrl=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.UpdateAssetContract.prototype.getUrl_asB64=function(){return t.Message.bytesAsB64(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.getUrl_asU8=function(){return t.Message.bytesAsU8(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.setUrl=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.UpdateAssetContract.prototype.getNewLimit=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.UpdateAssetContract.prototype.setNewLimit=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.UpdateAssetContract.prototype.getNewPublicLimit=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.UpdateAssetContract.prototype.setNewPublicLimit=function(e){return t.Message.setProto3IntField(this,5,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ParticipateAssetIssueContract.prototype.toObject=function(e){return TronWebProto.ParticipateAssetIssueContract.toObject(e,this)},TronWebProto.ParticipateAssetIssueContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),toAddress:n.getToAddress_asB64(),assetName:n.getAssetName_asB64(),amount:t.Message.getFieldWithDefault(n,4,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ParticipateAssetIssueContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ParticipateAssetIssueContract;return TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader(r,n)},TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setToAddress(n);break;case 3:var n=t.readBytes();e.setAssetName(n);break;case 4:var n=t.readInt64();e.setAmount(n);break;default:t.skipField();break}return e},TronWebProto.ParticipateAssetIssueContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getToAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getAssetName_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getAmount(),n!==0&&t.writeInt64(4,n)},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asB64=function(){return t.Message.bytesAsB64(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asU8=function(){return t.Message.bytesAsU8(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setToAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asB64=function(){return t.Message.bytesAsB64(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asU8=function(){return t.Message.bytesAsU8(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.setAssetName=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAmount=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.ParticipateAssetIssueContract.prototype.setAmount=function(e){return t.Message.setProto3IntField(this,4,e)},n.object.extend(e,TronWebProto)})),Oie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||function(){return this}.call(null)||Function(`return this`)(),i=T8();n.object.extend(proto,i),n.exportSymbol(`TronWebProto.ClearABIContract`,null,r),n.exportSymbol(`TronWebProto.ContractState`,null,r),n.exportSymbol(`TronWebProto.CreateSmartContract`,null,r),n.exportSymbol(`TronWebProto.SmartContract`,null,r),n.exportSymbol(`TronWebProto.SmartContract.ABI`,null,r),n.exportSymbol(`TronWebProto.SmartContract.ABI.Entry`,null,r),n.exportSymbol(`TronWebProto.SmartContract.ABI.Entry.EntryType`,null,r),n.exportSymbol(`TronWebProto.SmartContract.ABI.Entry.Param`,null,r),n.exportSymbol(`TronWebProto.SmartContract.ABI.Entry.StateMutabilityType`,null,r),n.exportSymbol(`TronWebProto.SmartContractDataWrapper`,null,r),n.exportSymbol(`TronWebProto.TriggerSmartContract`,null,r),n.exportSymbol(`TronWebProto.UpdateEnergyLimitContract`,null,r),n.exportSymbol(`TronWebProto.UpdateSettingContract`,null,r),TronWebProto.SmartContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.SmartContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.displayName=`TronWebProto.SmartContract`),TronWebProto.SmartContract.ABI=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.repeatedFields_,null)},n.inherits(TronWebProto.SmartContract.ABI,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.displayName=`TronWebProto.SmartContract.ABI`),TronWebProto.SmartContract.ABI.Entry=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.Entry.repeatedFields_,null)},n.inherits(TronWebProto.SmartContract.ABI.Entry,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.displayName=`TronWebProto.SmartContract.ABI.Entry`),TronWebProto.SmartContract.ABI.Entry.Param=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.SmartContract.ABI.Entry.Param,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.Param.displayName=`TronWebProto.SmartContract.ABI.Entry.Param`),TronWebProto.ContractState=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ContractState,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ContractState.displayName=`TronWebProto.ContractState`),TronWebProto.CreateSmartContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.CreateSmartContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.CreateSmartContract.displayName=`TronWebProto.CreateSmartContract`),TronWebProto.TriggerSmartContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.TriggerSmartContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.TriggerSmartContract.displayName=`TronWebProto.TriggerSmartContract`),TronWebProto.ClearABIContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ClearABIContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ClearABIContract.displayName=`TronWebProto.ClearABIContract`),TronWebProto.UpdateSettingContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UpdateSettingContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UpdateSettingContract.displayName=`TronWebProto.UpdateSettingContract`),TronWebProto.UpdateEnergyLimitContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UpdateEnergyLimitContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UpdateEnergyLimitContract.displayName=`TronWebProto.UpdateEnergyLimitContract`),TronWebProto.SmartContractDataWrapper=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.SmartContractDataWrapper,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SmartContractDataWrapper.displayName=`TronWebProto.SmartContractDataWrapper`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.prototype.toObject=function(e){return TronWebProto.SmartContract.toObject(e,this)},TronWebProto.SmartContract.toObject=function(e,n){var r,i={originAddress:n.getOriginAddress_asB64(),contractAddress:n.getContractAddress_asB64(),abi:(r=n.getAbi())&&TronWebProto.SmartContract.ABI.toObject(e,r),bytecode:n.getBytecode_asB64(),callValue:t.Message.getFieldWithDefault(n,5,0),consumeUserResourcePercent:t.Message.getFieldWithDefault(n,6,0),name:t.Message.getFieldWithDefault(n,7,``),originEnergyLimit:t.Message.getFieldWithDefault(n,8,0),codeHash:n.getCodeHash_asB64(),trxHash:n.getTrxHash_asB64(),version:t.Message.getFieldWithDefault(n,11,0)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.SmartContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SmartContract;return TronWebProto.SmartContract.deserializeBinaryFromReader(r,n)},TronWebProto.SmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOriginAddress(n);break;case 2:var n=t.readBytes();e.setContractAddress(n);break;case 3:var n=new TronWebProto.SmartContract.ABI;t.readMessage(n,TronWebProto.SmartContract.ABI.deserializeBinaryFromReader),e.setAbi(n);break;case 4:var n=t.readBytes();e.setBytecode(n);break;case 5:var n=t.readInt64();e.setCallValue(n);break;case 6:var n=t.readInt64();e.setConsumeUserResourcePercent(n);break;case 7:var n=t.readString();e.setName(n);break;case 8:var n=t.readInt64();e.setOriginEnergyLimit(n);break;case 9:var n=t.readBytes();e.setCodeHash(n);break;case 10:var n=t.readBytes();e.setTrxHash(n);break;case 11:var n=t.readInt32();e.setVersion(n);break;default:t.skipField();break}return e},TronWebProto.SmartContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOriginAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getContractAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getAbi(),n!=null&&t.writeMessage(3,n,TronWebProto.SmartContract.ABI.serializeBinaryToWriter),n=e.getBytecode_asU8(),n.length>0&&t.writeBytes(4,n),n=e.getCallValue(),n!==0&&t.writeInt64(5,n),n=e.getConsumeUserResourcePercent(),n!==0&&t.writeInt64(6,n),n=e.getName(),n.length>0&&t.writeString(7,n),n=e.getOriginEnergyLimit(),n!==0&&t.writeInt64(8,n),n=e.getCodeHash_asU8(),n.length>0&&t.writeBytes(9,n),n=e.getTrxHash_asU8(),n.length>0&&t.writeBytes(10,n),n=e.getVersion(),n!==0&&t.writeInt32(11,n)},TronWebProto.SmartContract.ABI.repeatedFields_=[1],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.toObject(e,this)},TronWebProto.SmartContract.ABI.toObject=function(e,n){var r={entrysList:t.Message.toObjectList(n.getEntrysList(),TronWebProto.SmartContract.ABI.Entry.toObject,e)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.SmartContract.ABI.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SmartContract.ABI;return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(r,n)},TronWebProto.SmartContract.ABI.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=new TronWebProto.SmartContract.ABI.Entry;t.readMessage(n,TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader),e.addEntrys(n);break;default:t.skipField();break}return e},TronWebProto.SmartContract.ABI.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getEntrysList(),n.length>0&&t.writeRepeatedMessage(1,n,TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter)},TronWebProto.SmartContract.ABI.Entry.repeatedFields_=[4,5],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.toObject=function(e,n){var r={anonymous:t.Message.getBooleanFieldWithDefault(n,1,!1),constant:t.Message.getBooleanFieldWithDefault(n,2,!1),name:t.Message.getFieldWithDefault(n,3,``),inputsList:t.Message.toObjectList(n.getInputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),outputsList:t.Message.toObjectList(n.getOutputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),type:t.Message.getFieldWithDefault(n,6,0),payable:t.Message.getBooleanFieldWithDefault(n,7,!1),statemutability:t.Message.getFieldWithDefault(n,8,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.SmartContract.ABI.Entry.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry;return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(r,n)},TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBool();e.setAnonymous(n);break;case 2:var n=t.readBool();e.setConstant(n);break;case 3:var n=t.readString();e.setName(n);break;case 4:var n=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(n,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addInputs(n);break;case 5:var n=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(n,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addOutputs(n);break;case 6:var n=t.readEnum();e.setType(n);break;case 7:var n=t.readBool();e.setPayable(n);break;case 8:var n=t.readEnum();e.setStatemutability(n);break;default:t.skipField();break}return e},TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAnonymous(),n&&t.writeBool(1,n),n=e.getConstant(),n&&t.writeBool(2,n),n=e.getName(),n.length>0&&t.writeString(3,n),n=e.getInputsList(),n.length>0&&t.writeRepeatedMessage(4,n,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),n=e.getOutputsList(),n.length>0&&t.writeRepeatedMessage(5,n,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),n=e.getType(),n!==0&&t.writeEnum(6,n),n=e.getPayable(),n&&t.writeBool(7,n),n=e.getStatemutability(),n!==0&&t.writeEnum(8,n)},TronWebProto.SmartContract.ABI.Entry.EntryType={UNKNOWNENTRYTYPE:0,CONSTRUCTOR:1,FUNCTION:2,EVENT:3,FALLBACK:4,RECEIVE:5,ERROR:6},TronWebProto.SmartContract.ABI.Entry.StateMutabilityType={UNKNOWNMUTABILITYTYPE:0,PURE:1,VIEW:2,NONPAYABLE:3,PAYABLE:4},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.Param.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.Param.toObject=function(e,n){var r={indexed:t.Message.getBooleanFieldWithDefault(n,1,!1),name:t.Message.getFieldWithDefault(n,2,``),type:t.Message.getFieldWithDefault(n,3,``)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry.Param;return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(r,n)},TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBool();e.setIndexed(n);break;case 2:var n=t.readString();e.setName(n);break;case 3:var n=t.readString();e.setType(n);break;default:t.skipField();break}return e},TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getIndexed(),n&&t.writeBool(1,n),n=e.getName(),n.length>0&&t.writeString(2,n),n=e.getType(),n.length>0&&t.writeString(3,n)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed=function(){return t.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed=function(e){return t.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName=function(e){return t.Message.setProto3StringField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType=function(e){return t.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous=function(){return t.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous=function(e){return t.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getConstant=function(){return t.Message.getBooleanFieldWithDefault(this,2,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setConstant=function(e){return t.Message.setProto3BooleanField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getName=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.SmartContract.ABI.Entry.prototype.setName=function(e){return t.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,4)},TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList=function(e){return t.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addInputs=function(e,n){return t.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.SmartContract.ABI.Entry.Param,n)},TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList=function(){return this.setInputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,5)},TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList=function(e){return t.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs=function(e,n){return t.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.SmartContract.ABI.Entry.Param,n)},TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList=function(){return this.setOutputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getType=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setType=function(e){return t.Message.setProto3EnumField(this,6,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getPayable=function(){return t.Message.getBooleanFieldWithDefault(this,7,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setPayable=function(e){return t.Message.setProto3BooleanField(this,7,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability=function(e){return t.Message.setProto3EnumField(this,8,e)},TronWebProto.SmartContract.ABI.prototype.getEntrysList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry,1)},TronWebProto.SmartContract.ABI.prototype.setEntrysList=function(e){return t.Message.setRepeatedWrapperField(this,1,e)},TronWebProto.SmartContract.ABI.prototype.addEntrys=function(e,n){return t.Message.addToRepeatedWrapperField(this,1,e,TronWebProto.SmartContract.ABI.Entry,n)},TronWebProto.SmartContract.ABI.prototype.clearEntrysList=function(){return this.setEntrysList([])},TronWebProto.SmartContract.prototype.getOriginAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.SmartContract.prototype.getOriginAddress_asB64=function(){return t.Message.bytesAsB64(this.getOriginAddress())},TronWebProto.SmartContract.prototype.getOriginAddress_asU8=function(){return t.Message.bytesAsU8(this.getOriginAddress())},TronWebProto.SmartContract.prototype.setOriginAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.SmartContract.prototype.getContractAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.SmartContract.prototype.getContractAddress_asB64=function(){return t.Message.bytesAsB64(this.getContractAddress())},TronWebProto.SmartContract.prototype.getContractAddress_asU8=function(){return t.Message.bytesAsU8(this.getContractAddress())},TronWebProto.SmartContract.prototype.setContractAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContract.prototype.getAbi=function(){return t.Message.getWrapperField(this,TronWebProto.SmartContract.ABI,3)},TronWebProto.SmartContract.prototype.setAbi=function(e){return t.Message.setWrapperField(this,3,e)},TronWebProto.SmartContract.prototype.clearAbi=function(){return this.setAbi(void 0)},TronWebProto.SmartContract.prototype.hasAbi=function(){return t.Message.getField(this,3)!=null},TronWebProto.SmartContract.prototype.getBytecode=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.SmartContract.prototype.getBytecode_asB64=function(){return t.Message.bytesAsB64(this.getBytecode())},TronWebProto.SmartContract.prototype.getBytecode_asU8=function(){return t.Message.bytesAsU8(this.getBytecode())},TronWebProto.SmartContract.prototype.setBytecode=function(e){return t.Message.setProto3BytesField(this,4,e)},TronWebProto.SmartContract.prototype.getCallValue=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.SmartContract.prototype.setCallValue=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent=function(e){return t.Message.setProto3IntField(this,6,e)},TronWebProto.SmartContract.prototype.getName=function(){return t.Message.getFieldWithDefault(this,7,``)},TronWebProto.SmartContract.prototype.setName=function(e){return t.Message.setProto3StringField(this,7,e)},TronWebProto.SmartContract.prototype.getOriginEnergyLimit=function(){return t.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.prototype.setOriginEnergyLimit=function(e){return t.Message.setProto3IntField(this,8,e)},TronWebProto.SmartContract.prototype.getCodeHash=function(){return t.Message.getFieldWithDefault(this,9,``)},TronWebProto.SmartContract.prototype.getCodeHash_asB64=function(){return t.Message.bytesAsB64(this.getCodeHash())},TronWebProto.SmartContract.prototype.getCodeHash_asU8=function(){return t.Message.bytesAsU8(this.getCodeHash())},TronWebProto.SmartContract.prototype.setCodeHash=function(e){return t.Message.setProto3BytesField(this,9,e)},TronWebProto.SmartContract.prototype.getTrxHash=function(){return t.Message.getFieldWithDefault(this,10,``)},TronWebProto.SmartContract.prototype.getTrxHash_asB64=function(){return t.Message.bytesAsB64(this.getTrxHash())},TronWebProto.SmartContract.prototype.getTrxHash_asU8=function(){return t.Message.bytesAsU8(this.getTrxHash())},TronWebProto.SmartContract.prototype.setTrxHash=function(e){return t.Message.setProto3BytesField(this,10,e)},TronWebProto.SmartContract.prototype.getVersion=function(){return t.Message.getFieldWithDefault(this,11,0)},TronWebProto.SmartContract.prototype.setVersion=function(e){return t.Message.setProto3IntField(this,11,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ContractState.prototype.toObject=function(e){return TronWebProto.ContractState.toObject(e,this)},TronWebProto.ContractState.toObject=function(e,n){var r={energyUsage:t.Message.getFieldWithDefault(n,1,0),energyFactor:t.Message.getFieldWithDefault(n,2,0),updateCycle:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ContractState.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ContractState;return TronWebProto.ContractState.deserializeBinaryFromReader(r,n)},TronWebProto.ContractState.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readInt64();e.setEnergyUsage(n);break;case 2:var n=t.readInt64();e.setEnergyFactor(n);break;case 3:var n=t.readInt64();e.setUpdateCycle(n);break;default:t.skipField();break}return e},TronWebProto.ContractState.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ContractState.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ContractState.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getEnergyUsage(),n!==0&&t.writeInt64(1,n),n=e.getEnergyFactor(),n!==0&&t.writeInt64(2,n),n=e.getUpdateCycle(),n!==0&&t.writeInt64(3,n)},TronWebProto.ContractState.prototype.getEnergyUsage=function(){return t.Message.getFieldWithDefault(this,1,0)},TronWebProto.ContractState.prototype.setEnergyUsage=function(e){return t.Message.setProto3IntField(this,1,e)},TronWebProto.ContractState.prototype.getEnergyFactor=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.ContractState.prototype.setEnergyFactor=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.ContractState.prototype.getUpdateCycle=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.ContractState.prototype.setUpdateCycle=function(e){return t.Message.setProto3IntField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.CreateSmartContract.prototype.toObject=function(e){return TronWebProto.CreateSmartContract.toObject(e,this)},TronWebProto.CreateSmartContract.toObject=function(e,n){var r,i={ownerAddress:n.getOwnerAddress_asB64(),newContract:(r=n.getNewContract())&&TronWebProto.SmartContract.toObject(e,r),callTokenValue:t.Message.getFieldWithDefault(n,3,0),tokenId:t.Message.getFieldWithDefault(n,4,0)};return e&&(i.$jspbMessageInstance=n),i}),TronWebProto.CreateSmartContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.CreateSmartContract;return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(r,n)},TronWebProto.CreateSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=new TronWebProto.SmartContract;t.readMessage(n,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setNewContract(n);break;case 3:var n=t.readInt64();e.setCallTokenValue(n);break;case 4:var n=t.readInt64();e.setTokenId(n);break;default:t.skipField();break}return e},TronWebProto.CreateSmartContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.CreateSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CreateSmartContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getNewContract(),n!=null&&t.writeMessage(2,n,TronWebProto.SmartContract.serializeBinaryToWriter),n=e.getCallTokenValue(),n!==0&&t.writeInt64(3,n),n=e.getTokenId(),n!==0&&t.writeInt64(4,n)},TronWebProto.CreateSmartContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.CreateSmartContract.prototype.getNewContract=function(){return t.Message.getWrapperField(this,TronWebProto.SmartContract,2)},TronWebProto.CreateSmartContract.prototype.setNewContract=function(e){return t.Message.setWrapperField(this,2,e)},TronWebProto.CreateSmartContract.prototype.clearNewContract=function(){return this.setNewContract(void 0)},TronWebProto.CreateSmartContract.prototype.hasNewContract=function(){return t.Message.getField(this,2)!=null},TronWebProto.CreateSmartContract.prototype.getCallTokenValue=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.CreateSmartContract.prototype.setCallTokenValue=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.CreateSmartContract.prototype.getTokenId=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.CreateSmartContract.prototype.setTokenId=function(e){return t.Message.setProto3IntField(this,4,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.TriggerSmartContract.prototype.toObject=function(e){return TronWebProto.TriggerSmartContract.toObject(e,this)},TronWebProto.TriggerSmartContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64(),callValue:t.Message.getFieldWithDefault(n,3,0),data:n.getData_asB64(),callTokenValue:t.Message.getFieldWithDefault(n,5,0),tokenId:t.Message.getFieldWithDefault(n,6,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.TriggerSmartContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.TriggerSmartContract;return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(r,n)},TronWebProto.TriggerSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setContractAddress(n);break;case 3:var n=t.readInt64();e.setCallValue(n);break;case 4:var n=t.readBytes();e.setData(n);break;case 5:var n=t.readInt64();e.setCallTokenValue(n);break;case 6:var n=t.readInt64();e.setTokenId(n);break;default:t.skipField();break}return e},TronWebProto.TriggerSmartContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TriggerSmartContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getContractAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getCallValue(),n!==0&&t.writeInt64(3,n),n=e.getData_asU8(),n.length>0&&t.writeBytes(4,n),n=e.getCallTokenValue(),n!==0&&t.writeInt64(5,n),n=e.getTokenId(),n!==0&&t.writeInt64(6,n)},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.TriggerSmartContract.prototype.getContractAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64=function(){return t.Message.bytesAsB64(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8=function(){return t.Message.bytesAsU8(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.setContractAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.TriggerSmartContract.prototype.getCallValue=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.TriggerSmartContract.prototype.setCallValue=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.TriggerSmartContract.prototype.getData=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.TriggerSmartContract.prototype.getData_asB64=function(){return t.Message.bytesAsB64(this.getData())},TronWebProto.TriggerSmartContract.prototype.getData_asU8=function(){return t.Message.bytesAsU8(this.getData())},TronWebProto.TriggerSmartContract.prototype.setData=function(e){return t.Message.setProto3BytesField(this,4,e)},TronWebProto.TriggerSmartContract.prototype.getCallTokenValue=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.TriggerSmartContract.prototype.setCallTokenValue=function(e){return t.Message.setProto3IntField(this,5,e)},TronWebProto.TriggerSmartContract.prototype.getTokenId=function(){return t.Message.getFieldWithDefault(this,6,0)},TronWebProto.TriggerSmartContract.prototype.setTokenId=function(e){return t.Message.setProto3IntField(this,6,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ClearABIContract.prototype.toObject=function(e){return TronWebProto.ClearABIContract.toObject(e,this)},TronWebProto.ClearABIContract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.ClearABIContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ClearABIContract;return TronWebProto.ClearABIContract.deserializeBinaryFromReader(r,n)},TronWebProto.ClearABIContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setContractAddress(n);break;default:t.skipField();break}return e},TronWebProto.ClearABIContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ClearABIContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ClearABIContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getContractAddress_asU8(),n.length>0&&t.writeBytes(2,n)},TronWebProto.ClearABIContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ClearABIContract.prototype.getContractAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.ClearABIContract.prototype.getContractAddress_asB64=function(){return t.Message.bytesAsB64(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.getContractAddress_asU8=function(){return t.Message.bytesAsU8(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.setContractAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateSettingContract.prototype.toObject=function(e){return TronWebProto.UpdateSettingContract.toObject(e,this)},TronWebProto.UpdateSettingContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64(),consumeUserResourcePercent:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UpdateSettingContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UpdateSettingContract;return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(r,n)},TronWebProto.UpdateSettingContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setContractAddress(n);break;case 3:var n=t.readInt64();e.setConsumeUserResourcePercent(n);break;default:t.skipField();break}return e},TronWebProto.UpdateSettingContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateSettingContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getContractAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getConsumeUserResourcePercent(),n!==0&&t.writeInt64(3,n)},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateSettingContract.prototype.getContractAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64=function(){return t.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8=function(){return t.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.setContractAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent=function(e){return t.Message.setProto3IntField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateEnergyLimitContract.prototype.toObject=function(e){return TronWebProto.UpdateEnergyLimitContract.toObject(e,this)},TronWebProto.UpdateEnergyLimitContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64(),originEnergyLimit:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UpdateEnergyLimitContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UpdateEnergyLimitContract;return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(r,n)},TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setContractAddress(n);break;case 3:var n=t.readInt64();e.setOriginEnergyLimit(n);break;default:t.skipField();break}return e},TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getContractAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getOriginEnergyLimit(),n!==0&&t.writeInt64(3,n)},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64=function(){return t.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8=function(){return t.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit=function(e){return t.Message.setProto3IntField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContractDataWrapper.prototype.toObject=function(e){return TronWebProto.SmartContractDataWrapper.toObject(e,this)},TronWebProto.SmartContractDataWrapper.toObject=function(e,t){var n,r={smartContract:(n=t.getSmartContract())&&TronWebProto.SmartContract.toObject(e,n),runtimecode:t.getRuntimecode_asB64(),contractState:(n=t.getContractState())&&TronWebProto.ContractState.toObject(e,n)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContractDataWrapper.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SmartContractDataWrapper;return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(r,n)},TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=new TronWebProto.SmartContract;t.readMessage(n,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setSmartContract(n);break;case 2:var n=t.readBytes();e.setRuntimecode(n);break;case 3:var n=new TronWebProto.ContractState;t.readMessage(n,TronWebProto.ContractState.deserializeBinaryFromReader),e.setContractState(n);break;default:t.skipField();break}return e},TronWebProto.SmartContractDataWrapper.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getSmartContract(),n!=null&&t.writeMessage(1,n,TronWebProto.SmartContract.serializeBinaryToWriter),n=e.getRuntimecode_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getContractState(),n!=null&&t.writeMessage(3,n,TronWebProto.ContractState.serializeBinaryToWriter)},TronWebProto.SmartContractDataWrapper.prototype.getSmartContract=function(){return t.Message.getWrapperField(this,TronWebProto.SmartContract,1)},TronWebProto.SmartContractDataWrapper.prototype.setSmartContract=function(e){return t.Message.setWrapperField(this,1,e)},TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract=function(){return this.setSmartContract(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract=function(){return t.Message.getField(this,1)!=null},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64=function(){return t.Message.bytesAsB64(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8=function(){return t.Message.bytesAsU8(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContractDataWrapper.prototype.getContractState=function(){return t.Message.getWrapperField(this,TronWebProto.ContractState,3)},TronWebProto.SmartContractDataWrapper.prototype.setContractState=function(e){return t.Message.setWrapperField(this,3,e)},TronWebProto.SmartContractDataWrapper.prototype.clearContractState=function(){return this.setContractState(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasContractState=function(){return t.Message.getField(this,3)!=null},n.object.extend(e,TronWebProto)})),kie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();n.exportSymbol(`TronWebProto.VoteWitnessContract`,null,r),n.exportSymbol(`TronWebProto.VoteWitnessContract.Vote`,null,r),n.exportSymbol(`TronWebProto.WitnessCreateContract`,null,r),n.exportSymbol(`TronWebProto.WitnessUpdateContract`,null,r),TronWebProto.WitnessCreateContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.WitnessCreateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.WitnessCreateContract.displayName=`TronWebProto.WitnessCreateContract`),TronWebProto.WitnessUpdateContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.WitnessUpdateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.WitnessUpdateContract.displayName=`TronWebProto.WitnessUpdateContract`),TronWebProto.VoteWitnessContract=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.VoteWitnessContract.repeatedFields_,null)},n.inherits(TronWebProto.VoteWitnessContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.displayName=`TronWebProto.VoteWitnessContract`),TronWebProto.VoteWitnessContract.Vote=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.VoteWitnessContract.Vote,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.Vote.displayName=`TronWebProto.VoteWitnessContract.Vote`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessCreateContract.prototype.toObject=function(e){return TronWebProto.WitnessCreateContract.toObject(e,this)},TronWebProto.WitnessCreateContract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64(),url:t.getUrl_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.WitnessCreateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.WitnessCreateContract;return TronWebProto.WitnessCreateContract.deserializeBinaryFromReader(r,n)},TronWebProto.WitnessCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setUrl(n);break;default:t.skipField();break}return e},TronWebProto.WitnessCreateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.WitnessCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessCreateContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getUrl_asU8(),n.length>0&&t.writeBytes(2,n)},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessCreateContract.prototype.getUrl=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.WitnessCreateContract.prototype.getUrl_asB64=function(){return t.Message.bytesAsB64(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.getUrl_asU8=function(){return t.Message.bytesAsU8(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.setUrl=function(e){return t.Message.setProto3BytesField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessUpdateContract.prototype.toObject=function(e){return TronWebProto.WitnessUpdateContract.toObject(e,this)},TronWebProto.WitnessUpdateContract.toObject=function(e,t){var n={ownerAddress:t.getOwnerAddress_asB64(),updateUrl:t.getUpdateUrl_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.WitnessUpdateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.WitnessUpdateContract;return TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader(r,n)},TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 12:var n=t.readBytes();e.setUpdateUrl(n);break;default:t.skipField();break}return e},TronWebProto.WitnessUpdateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.WitnessUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessUpdateContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getUpdateUrl_asU8(),n.length>0&&t.writeBytes(12,n)},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl=function(){return t.Message.getFieldWithDefault(this,12,``)},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asB64=function(){return t.Message.bytesAsB64(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asU8=function(){return t.Message.bytesAsU8(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.setUpdateUrl=function(e){return t.Message.setProto3BytesField(this,12,e)},TronWebProto.VoteWitnessContract.repeatedFields_=[2],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.toObject(e,this)},TronWebProto.VoteWitnessContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),votesList:t.Message.toObjectList(n.getVotesList(),TronWebProto.VoteWitnessContract.Vote.toObject,e),support:t.Message.getBooleanFieldWithDefault(n,3,!1)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.VoteWitnessContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.VoteWitnessContract;return TronWebProto.VoteWitnessContract.deserializeBinaryFromReader(r,n)},TronWebProto.VoteWitnessContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=new TronWebProto.VoteWitnessContract.Vote;t.readMessage(n,TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader),e.addVotes(n);break;case 3:var n=t.readBool();e.setSupport(n);break;default:t.skipField();break}return e},TronWebProto.VoteWitnessContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.VoteWitnessContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getVotesList(),n.length>0&&t.writeRepeatedMessage(2,n,TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter),n=e.getSupport(),n&&t.writeBool(3,n)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.Vote.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.Vote.toObject(e,this)},TronWebProto.VoteWitnessContract.Vote.toObject=function(e,n){var r={voteAddress:n.getVoteAddress_asB64(),voteCount:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.VoteWitnessContract.Vote.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.VoteWitnessContract.Vote;return TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader(r,n)},TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setVoteAddress(n);break;case 2:var n=t.readInt64();e.setVoteCount(n);break;default:t.skipField();break}return e},TronWebProto.VoteWitnessContract.Vote.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getVoteAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getVoteCount(),n!==0&&t.writeInt64(2,n)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64=function(){return t.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8=function(){return t.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteCount=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteCount=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.prototype.getVotesList=function(){return t.Message.getRepeatedWrapperField(this,TronWebProto.VoteWitnessContract.Vote,2)},TronWebProto.VoteWitnessContract.prototype.setVotesList=function(e){return t.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.addVotes=function(e,n){return t.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.VoteWitnessContract.Vote,n)},TronWebProto.VoteWitnessContract.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.VoteWitnessContract.prototype.getSupport=function(){return t.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.VoteWitnessContract.prototype.setSupport=function(e){return t.Message.setProto3BooleanField(this,3,e)},n.object.extend(e,TronWebProto)})),Aie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();n.exportSymbol(`TronWebProto.BuyStorageBytesContract`,null,r),n.exportSymbol(`TronWebProto.BuyStorageContract`,null,r),n.exportSymbol(`TronWebProto.SellStorageContract`,null,r),n.exportSymbol(`TronWebProto.UpdateBrokerageContract`,null,r),TronWebProto.BuyStorageBytesContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.BuyStorageBytesContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageBytesContract.displayName=`TronWebProto.BuyStorageBytesContract`),TronWebProto.BuyStorageContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.BuyStorageContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageContract.displayName=`TronWebProto.BuyStorageContract`),TronWebProto.SellStorageContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.SellStorageContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SellStorageContract.displayName=`TronWebProto.SellStorageContract`),TronWebProto.UpdateBrokerageContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.UpdateBrokerageContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.UpdateBrokerageContract.displayName=`TronWebProto.UpdateBrokerageContract`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageBytesContract.prototype.toObject=function(e){return TronWebProto.BuyStorageBytesContract.toObject(e,this)},TronWebProto.BuyStorageBytesContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),bytes:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.BuyStorageBytesContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.BuyStorageBytesContract;return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(r,n)},TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setBytes(n);break;default:t.skipField();break}return e},TronWebProto.BuyStorageBytesContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getBytes(),n!==0&&t.writeInt64(2,n)},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageBytesContract.prototype.getBytes=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageBytesContract.prototype.setBytes=function(e){return t.Message.setProto3IntField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageContract.prototype.toObject=function(e){return TronWebProto.BuyStorageContract.toObject(e,this)},TronWebProto.BuyStorageContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),quant:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.BuyStorageContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.BuyStorageContract;return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(r,n)},TronWebProto.BuyStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setQuant(n);break;default:t.skipField();break}return e},TronWebProto.BuyStorageContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.BuyStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getQuant(),n!==0&&t.writeInt64(2,n)},TronWebProto.BuyStorageContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageContract.prototype.getQuant=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageContract.prototype.setQuant=function(e){return t.Message.setProto3IntField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SellStorageContract.prototype.toObject=function(e){return TronWebProto.SellStorageContract.toObject(e,this)},TronWebProto.SellStorageContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),storageBytes:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.SellStorageContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SellStorageContract;return TronWebProto.SellStorageContract.deserializeBinaryFromReader(r,n)},TronWebProto.SellStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setStorageBytes(n);break;default:t.skipField();break}return e},TronWebProto.SellStorageContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SellStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SellStorageContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getStorageBytes(),n!==0&&t.writeInt64(2,n)},TronWebProto.SellStorageContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.SellStorageContract.prototype.getStorageBytes=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.SellStorageContract.prototype.setStorageBytes=function(e){return t.Message.setProto3IntField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateBrokerageContract.prototype.toObject=function(e){return TronWebProto.UpdateBrokerageContract.toObject(e,this)},TronWebProto.UpdateBrokerageContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),brokerage:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.UpdateBrokerageContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.UpdateBrokerageContract;return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(r,n)},TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt32();e.setBrokerage(n);break;default:t.skipField();break}return e},TronWebProto.UpdateBrokerageContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getBrokerage(),n!==0&&t.writeInt32(2,n)},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateBrokerageContract.prototype.getBrokerage=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.UpdateBrokerageContract.prototype.setBrokerage=function(e){return t.Message.setProto3IntField(this,2,e)},n.object.extend(e,TronWebProto)})),jie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||function(){return this}.call(null)||Function(`return this`)(),i=T8();n.object.extend(proto,i),n.exportSymbol(`TronWebProto.AccountCreateContract`,null,r),n.exportSymbol(`TronWebProto.AccountPermissionUpdateContract`,null,r),n.exportSymbol(`TronWebProto.AccountUpdateContract`,null,r),n.exportSymbol(`TronWebProto.SetAccountIdContract`,null,r),TronWebProto.AccountCreateContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountCreateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountCreateContract.displayName=`TronWebProto.AccountCreateContract`),TronWebProto.AccountUpdateContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.AccountUpdateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountUpdateContract.displayName=`TronWebProto.AccountUpdateContract`),TronWebProto.SetAccountIdContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.SetAccountIdContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.SetAccountIdContract.displayName=`TronWebProto.SetAccountIdContract`),TronWebProto.AccountPermissionUpdateContract=function(e){t.Message.initialize(this,e,0,-1,TronWebProto.AccountPermissionUpdateContract.repeatedFields_,null)},n.inherits(TronWebProto.AccountPermissionUpdateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.AccountPermissionUpdateContract.displayName=`TronWebProto.AccountPermissionUpdateContract`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountCreateContract.prototype.toObject=function(e){return TronWebProto.AccountCreateContract.toObject(e,this)},TronWebProto.AccountCreateContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),accountAddress:n.getAccountAddress_asB64(),type:t.Message.getFieldWithDefault(n,3,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.AccountCreateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountCreateContract;return TronWebProto.AccountCreateContract.deserializeBinaryFromReader(r,n)},TronWebProto.AccountCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setAccountAddress(n);break;case 3:var n=t.readEnum();e.setType(n);break;default:t.skipField();break}return e},TronWebProto.AccountCreateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountCreateContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getAccountAddress_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getType(),n!==0&&t.writeEnum(3,n)},TronWebProto.AccountCreateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountCreateContract.prototype.getAccountAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asB64=function(){return t.Message.bytesAsB64(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asU8=function(){return t.Message.bytesAsU8(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.setAccountAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountCreateContract.prototype.getType=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.AccountCreateContract.prototype.setType=function(e){return t.Message.setProto3EnumField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountUpdateContract.toObject(e,this)},TronWebProto.AccountUpdateContract.toObject=function(e,t){var n={accountName:t.getAccountName_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountUpdateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountUpdateContract;return TronWebProto.AccountUpdateContract.deserializeBinaryFromReader(r,n)},TronWebProto.AccountUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAccountName(n);break;case 2:var n=t.readBytes();e.setOwnerAddress(n);break;default:t.skipField();break}return e},TronWebProto.AccountUpdateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountUpdateContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAccountName_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(2,n)},TronWebProto.AccountUpdateContract.prototype.getAccountName=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.AccountUpdateContract.prototype.getAccountName_asB64=function(){return t.Message.bytesAsB64(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.getAccountName_asU8=function(){return t.Message.bytesAsU8(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.setAccountName=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.SetAccountIdContract.prototype.toObject=function(e){return TronWebProto.SetAccountIdContract.toObject(e,this)},TronWebProto.SetAccountIdContract.toObject=function(e,t){var n={accountId:t.getAccountId_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.SetAccountIdContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.SetAccountIdContract;return TronWebProto.SetAccountIdContract.deserializeBinaryFromReader(r,n)},TronWebProto.SetAccountIdContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setAccountId(n);break;case 2:var n=t.readBytes();e.setOwnerAddress(n);break;default:t.skipField();break}return e},TronWebProto.SetAccountIdContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.SetAccountIdContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SetAccountIdContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getAccountId_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(2,n)},TronWebProto.SetAccountIdContract.prototype.getAccountId=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.SetAccountIdContract.prototype.getAccountId_asB64=function(){return t.Message.bytesAsB64(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.getAccountId_asU8=function(){return t.Message.bytesAsU8(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.setAccountId=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.repeatedFields_=[4],t.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountPermissionUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountPermissionUpdateContract.toObject(e,this)},TronWebProto.AccountPermissionUpdateContract.toObject=function(e,n){var r,a={ownerAddress:n.getOwnerAddress_asB64(),owner:(r=n.getOwner())&&i.Permission.toObject(e,r),witness:(r=n.getWitness())&&i.Permission.toObject(e,r),activesList:t.Message.toObjectList(n.getActivesList(),i.Permission.toObject,e)};return e&&(a.$jspbMessageInstance=n),a}),TronWebProto.AccountPermissionUpdateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.AccountPermissionUpdateContract;return TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader(r,n)},TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=new i.Permission;t.readMessage(n,i.Permission.deserializeBinaryFromReader),e.setOwner(n);break;case 3:var n=new i.Permission;t.readMessage(n,i.Permission.deserializeBinaryFromReader),e.setWitness(n);break;case 4:var n=new i.Permission;t.readMessage(n,i.Permission.deserializeBinaryFromReader),e.addActives(n);break;default:t.skipField();break}return e},TronWebProto.AccountPermissionUpdateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getOwner(),n!=null&&t.writeMessage(2,n,i.Permission.serializeBinaryToWriter),n=e.getWitness(),n!=null&&t.writeMessage(3,n,i.Permission.serializeBinaryToWriter),n=e.getActivesList(),n.length>0&&t.writeRepeatedMessage(4,n,i.Permission.serializeBinaryToWriter)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwner=function(){return t.Message.getWrapperField(this,i.Permission,2)},TronWebProto.AccountPermissionUpdateContract.prototype.setOwner=function(e){return t.Message.setWrapperField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearOwner=function(){return this.setOwner(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasOwner=function(){return t.Message.getField(this,2)!=null},TronWebProto.AccountPermissionUpdateContract.prototype.getWitness=function(){return t.Message.getWrapperField(this,i.Permission,3)},TronWebProto.AccountPermissionUpdateContract.prototype.setWitness=function(e){return t.Message.setWrapperField(this,3,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearWitness=function(){return this.setWitness(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasWitness=function(){return t.Message.getField(this,3)!=null},TronWebProto.AccountPermissionUpdateContract.prototype.getActivesList=function(){return t.Message.getRepeatedWrapperField(this,i.Permission,4)},TronWebProto.AccountPermissionUpdateContract.prototype.setActivesList=function(e){return t.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.AccountPermissionUpdateContract.prototype.addActives=function(e,n){return t.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.Permission,n)},TronWebProto.AccountPermissionUpdateContract.prototype.clearActivesList=function(){return this.setActivesList([])},n.object.extend(e,TronWebProto)})),Mie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();n.exportSymbol(`TronWebProto.ProposalApproveContract`,null,r),n.exportSymbol(`TronWebProto.ProposalCreateContract`,null,r),n.exportSymbol(`TronWebProto.ProposalDeleteContract`,null,r),TronWebProto.ProposalApproveContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ProposalApproveContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ProposalApproveContract.displayName=`TronWebProto.ProposalApproveContract`),TronWebProto.ProposalCreateContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ProposalCreateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ProposalCreateContract.displayName=`TronWebProto.ProposalCreateContract`),TronWebProto.ProposalDeleteContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ProposalDeleteContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ProposalDeleteContract.displayName=`TronWebProto.ProposalDeleteContract`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalApproveContract.prototype.toObject=function(e){return TronWebProto.ProposalApproveContract.toObject(e,this)},TronWebProto.ProposalApproveContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),proposalId:t.Message.getFieldWithDefault(n,2,0),isAddApproval:t.Message.getBooleanFieldWithDefault(n,3,!1)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ProposalApproveContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ProposalApproveContract;return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(r,n)},TronWebProto.ProposalApproveContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setProposalId(n);break;case 3:var n=t.readBool();e.setIsAddApproval(n);break;default:t.skipField();break}return e},TronWebProto.ProposalApproveContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalApproveContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getProposalId(),n!==0&&t.writeInt64(2,n),n=e.getIsAddApproval(),n&&t.writeBool(3,n)},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalApproveContract.prototype.getProposalId=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalApproveContract.prototype.setProposalId=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.ProposalApproveContract.prototype.getIsAddApproval=function(){return t.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.ProposalApproveContract.prototype.setIsAddApproval=function(e){return t.Message.setProto3BooleanField(this,3,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalCreateContract.prototype.toObject=function(e){return TronWebProto.ProposalCreateContract.toObject(e,this)},TronWebProto.ProposalCreateContract.toObject=function(e,t){var n,r={ownerAddress:t.getOwnerAddress_asB64(),parametersMap:(n=t.getParametersMap())?n.toObject(e,void 0):[]};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalCreateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ProposalCreateContract;return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(r,n)},TronWebProto.ProposalCreateContract.deserializeBinaryFromReader=function(e,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var r=n.readBytes();e.setOwnerAddress(r);break;case 2:var r=e.getParametersMap();n.readMessage(r,function(e,n){t.Map.deserializeBinary(e,n,t.BinaryReader.prototype.readInt64,t.BinaryReader.prototype.readInt64,null,0,0)});break;default:n.skipField();break}return e},TronWebProto.ProposalCreateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalCreateContract.serializeBinaryToWriter=function(e,n){var r=void 0;r=e.getOwnerAddress_asU8(),r.length>0&&n.writeBytes(1,r),r=e.getParametersMap(!0),r&&r.getLength()>0&&r.serializeBinary(2,n,t.BinaryWriter.prototype.writeInt64,t.BinaryWriter.prototype.writeInt64)},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalCreateContract.prototype.getParametersMap=function(e){return t.Message.getMapField(this,2,e,null)},TronWebProto.ProposalCreateContract.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalDeleteContract.prototype.toObject=function(e){return TronWebProto.ProposalDeleteContract.toObject(e,this)},TronWebProto.ProposalDeleteContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),proposalId:t.Message.getFieldWithDefault(n,2,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ProposalDeleteContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ProposalDeleteContract;return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(r,n)},TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setProposalId(n);break;default:t.skipField();break}return e},TronWebProto.ProposalDeleteContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalDeleteContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getProposalId(),n!==0&&t.writeInt64(2,n)},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalDeleteContract.prototype.getProposalId=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalDeleteContract.prototype.setProposalId=function(e){return t.Message.setProto3IntField(this,2,e)},n.object.extend(e,TronWebProto)})),Nie=s((e=>{var t=C8(),n=t,r=typeof globalThis<`u`&&globalThis||typeof window<`u`&&window||r!==void 0&&r||typeof self<`u`&&self||(function(){return this}).call(null)||Function(`return this`)();n.exportSymbol(`TronWebProto.ExchangeCreateContract`,null,r),n.exportSymbol(`TronWebProto.ExchangeInjectContract`,null,r),n.exportSymbol(`TronWebProto.ExchangeTransactionContract`,null,r),n.exportSymbol(`TronWebProto.ExchangeWithdrawContract`,null,r),TronWebProto.ExchangeCreateContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ExchangeCreateContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ExchangeCreateContract.displayName=`TronWebProto.ExchangeCreateContract`),TronWebProto.ExchangeInjectContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ExchangeInjectContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ExchangeInjectContract.displayName=`TronWebProto.ExchangeInjectContract`),TronWebProto.ExchangeWithdrawContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ExchangeWithdrawContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ExchangeWithdrawContract.displayName=`TronWebProto.ExchangeWithdrawContract`),TronWebProto.ExchangeTransactionContract=function(e){t.Message.initialize(this,e,0,-1,null,null)},n.inherits(TronWebProto.ExchangeTransactionContract,t.Message),n.DEBUG&&!COMPILED&&(TronWebProto.ExchangeTransactionContract.displayName=`TronWebProto.ExchangeTransactionContract`),t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeCreateContract.prototype.toObject=function(e){return TronWebProto.ExchangeCreateContract.toObject(e,this)},TronWebProto.ExchangeCreateContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),firstTokenId:n.getFirstTokenId_asB64(),firstTokenBalance:t.Message.getFieldWithDefault(n,3,0),secondTokenId:n.getSecondTokenId_asB64(),secondTokenBalance:t.Message.getFieldWithDefault(n,5,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ExchangeCreateContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ExchangeCreateContract;return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(r,n)},TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readBytes();e.setFirstTokenId(n);break;case 3:var n=t.readInt64();e.setFirstTokenBalance(n);break;case 4:var n=t.readBytes();e.setSecondTokenId(n);break;case 5:var n=t.readInt64();e.setSecondTokenBalance(n);break;default:t.skipField();break}return e},TronWebProto.ExchangeCreateContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeCreateContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getFirstTokenId_asU8(),n.length>0&&t.writeBytes(2,n),n=e.getFirstTokenBalance(),n!==0&&t.writeInt64(3,n),n=e.getSecondTokenId_asU8(),n.length>0&&t.writeBytes(4,n),n=e.getSecondTokenBalance(),n!==0&&t.writeInt64(5,n)},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId=function(){return t.Message.getFieldWithDefault(this,2,``)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64=function(){return t.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8=function(){return t.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId=function(e){return t.Message.setProto3BytesField(this,2,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance=function(){return t.Message.getFieldWithDefault(this,3,0)},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance=function(e){return t.Message.setProto3IntField(this,3,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId=function(){return t.Message.getFieldWithDefault(this,4,``)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64=function(){return t.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8=function(){return t.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId=function(e){return t.Message.setProto3BytesField(this,4,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance=function(e){return t.Message.setProto3IntField(this,5,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeInjectContract.prototype.toObject=function(e){return TronWebProto.ExchangeInjectContract.toObject(e,this)},TronWebProto.ExchangeInjectContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),exchangeId:t.Message.getFieldWithDefault(n,2,0),tokenId:n.getTokenId_asB64(),quant:t.Message.getFieldWithDefault(n,4,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ExchangeInjectContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ExchangeInjectContract;return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(r,n)},TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setExchangeId(n);break;case 3:var n=t.readBytes();e.setTokenId(n);break;case 4:var n=t.readInt64();e.setQuant(n);break;default:t.skipField();break}return e},TronWebProto.ExchangeInjectContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeInjectContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getExchangeId(),n!==0&&t.writeInt64(2,n),n=e.getTokenId_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getQuant(),n!==0&&t.writeInt64(4,n)},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeInjectContract.prototype.getExchangeId=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeInjectContract.prototype.setExchangeId=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeInjectContract.prototype.getTokenId=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64=function(){return t.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8=function(){return t.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.setTokenId=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeInjectContract.prototype.getQuant=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeInjectContract.prototype.setQuant=function(e){return t.Message.setProto3IntField(this,4,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeWithdrawContract.prototype.toObject=function(e){return TronWebProto.ExchangeWithdrawContract.toObject(e,this)},TronWebProto.ExchangeWithdrawContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),exchangeId:t.Message.getFieldWithDefault(n,2,0),tokenId:n.getTokenId_asB64(),quant:t.Message.getFieldWithDefault(n,4,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ExchangeWithdrawContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ExchangeWithdrawContract;return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(r,n)},TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setExchangeId(n);break;case 3:var n=t.readBytes();e.setTokenId(n);break;case 4:var n=t.readInt64();e.setQuant(n);break;default:t.skipField();break}return e},TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getExchangeId(),n!==0&&t.writeInt64(2,n),n=e.getTokenId_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getQuant(),n!==0&&t.writeInt64(4,n)},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64=function(){return t.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8=function(){return t.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.setTokenId=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeWithdrawContract.prototype.getQuant=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeWithdrawContract.prototype.setQuant=function(e){return t.Message.setProto3IntField(this,4,e)},t.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeTransactionContract.prototype.toObject=function(e){return TronWebProto.ExchangeTransactionContract.toObject(e,this)},TronWebProto.ExchangeTransactionContract.toObject=function(e,n){var r={ownerAddress:n.getOwnerAddress_asB64(),exchangeId:t.Message.getFieldWithDefault(n,2,0),tokenId:n.getTokenId_asB64(),quant:t.Message.getFieldWithDefault(n,4,0),expected:t.Message.getFieldWithDefault(n,5,0)};return e&&(r.$jspbMessageInstance=n),r}),TronWebProto.ExchangeTransactionContract.deserializeBinary=function(e){var n=new t.BinaryReader(e),r=new TronWebProto.ExchangeTransactionContract;return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(r,n)},TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var n=t.readBytes();e.setOwnerAddress(n);break;case 2:var n=t.readInt64();e.setExchangeId(n);break;case 3:var n=t.readBytes();e.setTokenId(n);break;case 4:var n=t.readInt64();e.setQuant(n);break;case 5:var n=t.readInt64();e.setExpected(n);break;default:t.skipField();break}return e},TronWebProto.ExchangeTransactionContract.prototype.serializeBinary=function(){var e=new t.BinaryWriter;return TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter=function(e,t){var n=void 0;n=e.getOwnerAddress_asU8(),n.length>0&&t.writeBytes(1,n),n=e.getExchangeId(),n!==0&&t.writeInt64(2,n),n=e.getTokenId_asU8(),n.length>0&&t.writeBytes(3,n),n=e.getQuant(),n!==0&&t.writeInt64(4,n),n=e.getExpected(),n!==0&&t.writeInt64(5,n)},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress=function(){return t.Message.getFieldWithDefault(this,1,``)},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64=function(){return t.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8=function(){return t.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress=function(e){return t.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeTransactionContract.prototype.getExchangeId=function(){return t.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeTransactionContract.prototype.setExchangeId=function(e){return t.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeTransactionContract.prototype.getTokenId=function(){return t.Message.getFieldWithDefault(this,3,``)},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64=function(){return t.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8=function(){return t.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.setTokenId=function(e){return t.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeTransactionContract.prototype.getQuant=function(){return t.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeTransactionContract.prototype.setQuant=function(e){return t.Message.setProto3IntField(this,4,e)},TronWebProto.ExchangeTransactionContract.prototype.getExpected=function(){return t.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeTransactionContract.prototype.setExpected=function(e){return t.Message.setProto3IntField(this,5,e)},n.object.extend(e,TronWebProto)}));function D8(e,t){return function(){return e.apply(t,arguments)}}var{toString:Pie}=Object.prototype,{getPrototypeOf:O8}=Object,{iterator:k8,toStringTag:A8}=Symbol,j8=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M8=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),j8(n,t))return!0;n=O8(n)}return!1},Fie=(e,t)=>e!=null&&M8(e,t)?e[t]:void 0,N8=(e=>t=>{let n=Pie.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P8=e=>(e=e.toLowerCase(),t=>N8(t)===e),F8=e=>t=>typeof t===e,{isArray:I8}=Array,L8=F8(`undefined`);function R8(e){return e!==null&&!L8(e)&&e.constructor!==null&&!L8(e.constructor)&&B8(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z8=P8(`ArrayBuffer`);function Iie(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&z8(e.buffer),t}var Lie=F8(`string`),B8=F8(`function`),V8=F8(`number`),H8=e=>typeof e==`object`&&!!e,Rie=e=>e===!0||e===!1,U8=e=>{if(!H8(e))return!1;let t=O8(e);return(t===null||t===Object.prototype||O8(t)===null)&&!M8(e,A8)&&!M8(e,k8)},zie=e=>{if(!H8(e)||R8(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Bie=P8(`Date`),Vie=P8(`File`),Hie=e=>!!(e&&e.uri!==void 0),Uie=e=>e&&e.getParts!==void 0,Wie=P8(`Blob`),Gie=P8(`FileList`),Kie=P8(`Set`),qie=e=>H8(e)&&B8(e.pipe);function Jie(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var W8=Jie(),G8=W8.FormData===void 0?void 0:W8.FormData,Yie=e=>{if(!e)return!1;if(G8&&e instanceof G8)return!0;let t=O8(e);if(!t||t===Object.prototype||!B8(e.append))return!1;let n=N8(e);return n===`formdata`||n===`object`&&B8(e.toString)&&e.toString()===`[object FormData]`},Xie=P8(`URLSearchParams`),[Zie,Qie,$ie,eae]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(P8),tae=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function K8(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),I8(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(R8(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function q8(e,t){if(R8(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var J8=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Y8=e=>!L8(e)&&e!==J8;function X8(...e){let{caseless:t,skipUndefined:n}=Y8(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&q8(r,i)||i,o=j8(r,a)?r[a]:void 0;U8(o)&&U8(e)?r[a]=X8(o,e):U8(e)?r[a]=X8({},e):I8(e)?r[a]=e.slice():(!n||!L8(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||R8(n)||(K8(n,i),typeof n!=`object`||I8(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];pae.call(n,t)&&i(n[t],t)}}return r}var nae=(e,t,n,{allOwnKeys:r}={})=>(K8(t,(t,r)=>{n&&B8(t)?Object.defineProperty(e,r,{__proto__:null,value:D8(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),rae=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),iae=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},aae=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&O8(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},oae=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},sae=e=>{if(!e)return null;if(I8(e))return e;let t=e.length;if(!V8(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},cae=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&O8(Uint8Array)),lae=(e,t)=>{let n=(e&&e[k8]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},uae=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},dae=P8(`HTMLFormElement`),fae=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:pae}=Object.prototype,mae=P8(`RegExp`),Z8=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};K8(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},hae=e=>{Z8(e,(t,n)=>{if(B8(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(B8(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},gae=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return I8(e)?r(e):r(String(e).split(t)),n},_ae=()=>{},vae=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yae(e){return!!(e&&B8(e.append)&&e[A8]===`FormData`&&e[k8])}var bae=e=>{let t=new WeakSet,n=e=>{if(H8(e)){if(t.has(e))return;if(R8(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(Kie(e)){r=[];for(let t of e){let e=n(t);!L8(e)&&r.push(e)}}else r=I8(e)?[]:{},K8(e,(e,t)=>{let i=n(e);!L8(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},xae=P8(`AsyncFunction`),Sae=e=>e&&(H8(e)||B8(e))&&B8(e.then)&&B8(e.catch),Q8=((e,t)=>e?setImmediate:t?((e,t)=>(J8.addEventListener(`message`,({source:n,data:r})=>{n===J8&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),J8.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,B8(J8.postMessage)),Cae=typeof queueMicrotask<`u`?queueMicrotask.bind(J8):typeof process<`u`&&process.nextTick||Q8,$8=e=>e!=null&&B8(e[k8]),Q={isArray:I8,isArrayBuffer:z8,isBuffer:R8,isFormData:Yie,isArrayBufferView:Iie,isString:Lie,isNumber:V8,isBoolean:Rie,isObject:H8,isPlainObject:U8,isEmptyObject:zie,isReadableStream:Zie,isRequest:Qie,isResponse:$ie,isHeaders:eae,isUndefined:L8,isDate:Bie,isFile:Vie,isReactNativeBlob:Hie,isReactNative:Uie,isBlob:Wie,isRegExp:mae,isFunction:B8,isStream:qie,isURLSearchParams:Xie,isTypedArray:cae,isFileList:Gie,forEach:K8,merge:X8,extend:nae,trim:tae,stripBOM:rae,inherits:iae,toFlatObject:aae,kindOf:N8,kindOfTest:P8,endsWith:oae,toArray:sae,forEachEntry:lae,matchAll:uae,isHTMLForm:dae,hasOwnProperty:j8,hasOwnProp:j8,hasOwnInPrototypeChain:M8,getSafeProp:Fie,reduceDescriptors:Z8,freezeMethods:hae,toObjectSet:gae,toCamelCase:fae,noop:_ae,toFiniteNumber:vae,findKey:q8,global:J8,isContextDefined:Y8,isSpecCompliantForm:yae,toJSONObject:bae,isAsyncFn:xae,isThenable:Sae,setImmediate:Q8,asap:Cae,isIterable:$8,isSafeIterable:e=>e!=null&&M8(e,k8)&&$8(e)},wae=Q.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),Tae=e=>{let t={},n,r,i;return e&&e.split(`
|
|
97
|
-
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=Q.hasOwnProp(t,n);!n||a&&Q.hasOwnProp(wae,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function Eae(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Dae=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Oae=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function e5(e,t){return Q.isArray(e)?e.map(e=>e5(e,t)):Eae(String(e).replace(t,``))}var kae=e=>e5(e,Dae),Aae=e=>e5(e,Oae);function t5(e){let t=Object.create(null);return Q.forEach(e.toJSON(),(e,n)=>{t[n]=Aae(e)}),t}var n5=Symbol(`internals`);function r5(e){return e&&String(e).trim().toLowerCase()}function i5(e){return e===!1||e==null?e:Q.isArray(e)?e.map(i5):kae(String(e))}function jae(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Mae=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function a5(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function Nae(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function Pae(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=a5(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=a5(i.slice(0,a));if(!Mae.test(o))return;let s=o.toLowerCase();s===`__proto__`||s===`constructor`||s===`prototype`||(t[s]=Nae(a5(i.slice(a+1))))}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}var Fae=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function o5(e,t,n,r,i){if(Q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function Iae(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Lae(e,t){let n=Q.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var s5=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=r5(t);if(!i)return;let a=Q.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=i5(e))}let a=(e,t)=>Q.forEach(e,(e,n)=>i(e,n,t));if(Q.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Q.isString(e)&&(e=e.trim())&&!Fae(e))a(Tae(e),t);else if(Q.isObject(e)&&Q.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!Q.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],Q.hasOwnProp(n,i)?(r=n[i],n[i]=Q.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=r5(e),e){let n=Q.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return jae(e);if(Q.isFunction(t))return t.call(this,e,n);if(Q.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=r5(e),e){let n=Q.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||o5(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=r5(e),e){let i=Q.findKey(n,e);i&&(!t||o5(n,n[i],i,t))&&(delete n[i],r=!0)}}return Q.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||o5(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return Q.forEach(this,(r,i)=>{let a=Q.findKey(n,i);if(a){t[a]=i5(r),delete t[i];return}let o=e?Iae(i):String(i).trim();o!==i&&delete t[i],t[o]=i5(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Q.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&Q.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
98
|
-
`)}getSetCookie(){let e=this.get(`set-cookie`);return Q.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return Pae(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[n5]=this[n5]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=r5(e);t[r]||(Lae(n,e),t[r]=!0)}return Q.isArray(e)?e.forEach(r):r(e),this}};s5.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Q.reduceDescriptors(s5.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Q.freezeMethods(s5);var c5=`[REDACTED ****]`;function Rae(e){if(Q.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Q.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function zae(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||Q.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof s5&&(e=e.toJSON()),r.push(e);let t;if(Q.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);Q.isUndefined(r)||(t[n]=r)});else{if(!Q.isPlainObject(e)&&Rae(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?c5:i(a);Q.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function l5(e){try{return String(e)}catch{return``}}function Bae(e){return e.errors.map(e=>{try{return e&&e.message?l5(e.message):l5(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var $=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&Q.isArray(t.errors)&&t.errors.length&&(s=Bae(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&Q.hasOwnProp(e,`redact`)?e.redact:void 0,n=Q.isArray(t)&&t.length>0?zae(e,t):Q.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};$.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,$.ERR_BAD_OPTION=`ERR_BAD_OPTION`,$.ECONNABORTED=`ECONNABORTED`,$.ETIMEDOUT=`ETIMEDOUT`,$.ECONNREFUSED=`ECONNREFUSED`,$.ERR_NETWORK=`ERR_NETWORK`,$.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,$.ERR_DEPRECATED=`ERR_DEPRECATED`,$.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,$.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,$.ERR_CANCELED=`ERR_CANCELED`,$.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,$.ERR_INVALID_URL=`ERR_INVALID_URL`,$.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function u5(e){return Q.isPlainObject(e)||Q.isArray(e)}function d5(e){return Q.endsWith(e,`[]`)?e.slice(0,-2):e}function f5(e,t,n){return e?e.concat(t).map(function(e,t){return e=d5(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Vae(e){return Q.isArray(e)&&!e.some(u5)}var Hae=Q.toFlatObject(Q,{},null,function(e){return/^is[A-Z]/.test(e)});function p5(e,t,n){if(!Q.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Q.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&Q.isSpecCompliantForm(t),u=[];if(!Q.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(Q.isDate(e))return e.toISOString();if(Q.isBoolean(e))return e.toString();if(!l&&Q.isBlob(e))throw new $(`Blob is not supported. Use a Buffer instead.`);if(Q.isArrayBuffer(e)||Q.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);throw new $(`Blob is not supported. Use a Buffer instead.`,$.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new $(`Object is too deeply nested (`+e+` levels). Max depth: `+c,$.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!Q.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(Q.isReactNative(t)&&Q.isReactNativeBlob(e))return t.append(f5(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(Q.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(Q.isArray(e)&&Vae(e)||(Q.isFileList(e)||Q.endsWith(n,`[]`))&&(s=Q.toArray(e)))return n=d5(n),s.forEach(function(e,r){!(Q.isUndefined(e)||e===null)&&t.append(o===!0?f5([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return u5(e)?!0:(t.append(f5(i,n,a),d(e)),!1)}let h=Object.assign(Hae,{defaultVisitor:m,convertValue:d,isVisitable:u5});function g(e,n,r=0){if(!Q.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),Q.forEach(e,function(e,a){(!(Q.isUndefined(e)||e===null)&&i.call(t,e,Q.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!Q.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function m5(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function h5(e,t){this._pairs=[],e&&p5(e,this,t)}var g5=h5.prototype;g5.append=function(e,t){this._pairs.push([e,t])},g5.toString=function(e){let t=e?t=>e.call(this,t,m5):m5;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Uae(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function _5(e,t,n){if(!t)return e;e||=``;let r=Q.isFunction(n)?{serialize:n}:n,i=Q.getSafeProp(r,`encode`)||Uae,a=Q.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):Q.isURLSearchParams(t)?t.toString():new h5(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var v5=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){Q.forEach(this.handlers,function(t){t!==null&&e(t)})}},y5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Wae={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:h5,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Gae=c({hasBrowserEnv:()=>b5,hasStandardBrowserEnv:()=>Kae,hasStandardBrowserWebWorkerEnv:()=>qae,navigator:()=>x5,origin:()=>Jae}),b5=typeof window<`u`&&typeof document<`u`,x5=typeof navigator==`object`&&navigator||void 0,Kae=b5&&(!x5||[`ReactNative`,`NativeScript`,`NS`].indexOf(x5.product)<0),qae=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Jae=b5&&window.location.href||`http://localhost`,S5={...Gae,...Wae};function Yae(e,t){return p5(e,new S5.classes.URLSearchParams,{visitor:function(e,t,n,r){return S5.isNode&&Q.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var C5=100;function w5(e){if(e>C5)throw new $(`FormData field is too deeply nested (`+e+` levels). Max depth: `+C5,$.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Xae(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)w5(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Zae(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function T5(e){function t(e,n,r,i){w5(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&Q.isArray(r)?r.length:a,s?(Q.hasOwnProp(r,a)?r[a]=Q.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!Q.hasOwnProp(r,a)||!Q.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&Q.isArray(r[a])&&(r[a]=Zae(r[a])),!o)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){let n={};return Q.forEachEntry(e,(e,r)=>{t(Xae(e),r,n,0)}),n}return null}var E5=(e,t)=>e!=null&&Q.hasOwnProp(e,t)?e[t]:void 0;function Qae(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var D5={transitional:y5,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=Q.isObject(e);if(i&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return r?JSON.stringify(T5(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=E5(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Yae(e,t).toString();if((a=Q.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=E5(this,`env`),r=n&&n.FormData;return p5(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Qae(e)):e}],transformResponse:[function(e){let t=E5(this,`transitional`)||D5.transitional,n=t&&t.forcedJSONParsing,r=E5(this,`responseType`),i=r===`json`;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,E5(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?$.from(e,$.ERR_BAD_RESPONSE,this,null,E5(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:S5.classes.FormData,Blob:S5.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{D5.headers[e]={}});function O5(e,t){let n=this||D5,r=t||n,i=s5.from(r.headers),a=r.data;return Q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function k5(e){return!!(e&&e.__CANCEL__)}var A5=class extends ${constructor(e,t,n){super(e??`canceled`,$.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function j5(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $(`Request failed with status code `+n.status,n.status>=400&&n.status<500?$.ERR_BAD_REQUEST:$.ERR_BAD_RESPONSE,n.config,n.request,n))}function $ae(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function eoe(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function toe(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var M5=(e,t,n=3)=>{let r=0,i=eoe(50,250);return toe(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},N5=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},P5=(e,t=Q.asap)=>(...n)=>t(()=>e(...n)),noe=S5.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,S5.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(S5.origin),S5.navigator&&/(msie|trident)/i.test(S5.navigator.userAgent)):()=>!0,roe=S5.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&s.push(`path=${r}`),Q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function ioe(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function aoe(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var ooe=/^https?:(?!\/\/)/i,soe=/[\t\n\r]/g;function coe(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function loe(e){return coe(e).replace(soe,``)}function uoe(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${c5}`)}function doe(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${c5}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${c5}`);return n===-1?r:`${r}#${uoe(t.slice(n+1))}`}function F5(e,t){if(typeof e==`string`){let n=loe(e);if(ooe.test(n))throw new $(`Invalid URL ${JSON.stringify(doe(n))}: missing "//" after protocol`,$.ERR_INVALID_URL,t)}}function I5(e,t,n,r){F5(t,r);let i=!ioe(t);return e&&(i||n===!1)?(F5(e,r),aoe(e,t)):t}var L5=e=>e instanceof s5?{...e}:e,foe=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function R5(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:r},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function i(e,t,n,i){if(!Q.isUndefined(t))return r(e,t,n,i);if(!Q.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!Q.isUndefined(t))return r(void 0,t)}function o(e,t){if(!Q.isUndefined(t))return r(void 0,t);if(!Q.isUndefined(e))return r(void 0,e)}function s(n){let r=Q.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!Q.isUndefined(r))if(Q.isPlainObject(r)){if(Q.hasOwnProp(r,n))return r[n]}else return;let i=Q.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(Q.isPlainObject(i)&&Q.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(Q.hasOwnProp(t,a))return r(n,i);if(Q.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(L5(e),L5(t),n,!0)};return Q.forEach(foe({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Q.hasOwnProp(l,r)?l[r]:i,o=a(Q.hasOwnProp(e,r)?e[r]:void 0,Q.hasOwnProp(t,r)?t[r]:void 0,r);Q.isUndefined(o)&&a!==c||(n[r]=o)}),Q.hasOwnProp(t,`validateStatus`)&&Q.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(Q.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var poe=[`content-type`,`content-length`];function moe(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{poe.includes(t.toLowerCase())&&e.set(t,n)})}var hoe=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function z5(e){let t=R5({},e),n=e=>Q.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=s5.from(s),t.url=_5(I5(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=Q.getSafeProp(c,`username`)||``,n=Q.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?hoe(n):``)))}catch(t){throw $.from(t,$.ERR_BAD_OPTION_VALUE,e)}}if(Q.isFormData(r)&&(S5.hasStandardBrowserEnv||S5.hasStandardBrowserWebWorkerEnv||Q.isReactNative(r)?s.setContentType(void 0):Q.isFunction(r.getHeaders)&&moe(s,r.getHeaders(),n(`formDataHeaderPolicy`))),S5.hasStandardBrowserEnv&&(Q.isFunction(i)&&(i=i(t)),i===!0||i==null&&noe(t.url))){let e=a&&o&&roe.read(o);e&&s.set(a,e)}return t}var goe=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=z5(e),i=r.data,a=s5.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=s5.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());j5(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new $(`Request aborted`,$.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new $(t&&t.message?t.message:`Network Error`,$.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||y5;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new $(t,i.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&Q.forEach(t5(a),function(e,t){h.setRequestHeader(t,e)}),Q.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=M5(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=M5(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new A5(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=$ae(r.url);if(_&&!S5.protocols.includes(_)){n(new $(`Unsupported protocol `+_+`:`,$.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})},_oe=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof $?t:new A5(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new $(`timeout of ${t}ms exceeded`,$.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:s}=n;return s.unsubscribe=()=>Q.asap(o),s},voe=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},yoe=async function*(e,t){for await(let n of boe(e))yield*voe(n,t)},boe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},B5=(e,t,n,r)=>{let i=yoe(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},V5=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,H5=(e,t,n)=>t+2<n&&V5(e.charCodeAt(t+1))&&V5(e.charCodeAt(t+2)),U5=e=>e<=57?e-48:(e&223)-55,xoe=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Soe=e=>e===9||e===10||e===12||e===13||e===32,Coe=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},woe=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Toe=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&H5(e,a,t)&&(o=U5(e.charCodeAt(a+1))*16+U5(e.charCodeAt(a+2)),a+=2),!Soe(o)){if(o===61){r++;continue}if(!xoe(o)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?woe(e):Coe(n)},Eoe=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&H5(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function Doe(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return Eoe(t===-1?e:e.slice(0,t),Toe)}var W5=`1.19.0`,G5=64*1024,{isFunction:K5}=Q,Ooe=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),q5=e=>{if(!Q.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},J5=(e,...t)=>{try{return!!e(...t)}catch{return!1}},koe=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Aoe=e=>{let t=Q.global!==void 0&&Q.global!==null?Q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?K5(i):typeof fetch==`function`,c=K5(a),l=K5(o);if(!s)return!1;let u=s&&K5(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&J5(()=>{let e=!1,t=new a(S5.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&J5(()=>Q.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new $(`Response type '${e}' is not supported`,$.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e))return(await new a(S5.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(e)||Q.isArrayBuffer(e))return e.byteLength;if(Q.isURLSearchParams(e)&&(e+=``),Q.isString(e))return(await d(e)).byteLength},g=async(e,t)=>Q.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T}=z5(e),E=Q.isNumber(w)&&w>-1,D=Q.isNumber(T)&&T>-1,O=t=>Q.hasOwnProp(e,t)?e[t]:void 0,k=i||fetch;b=b?(b+``).toLowerCase():`text`;let A=_oe([l,d&&d.toAbortSignal()],_),j=null,M=A&&A.unsubscribe&&(()=>{A.unsubscribe()}),N,ee=null,te=()=>new $(`Request body larger than maxBodyLength limit`,$.ERR_BAD_REQUEST,e,j);try{let i,l=O(`auth`);if(l&&(i={username:Q.getSafeProp(l,`username`)||``,password:Q.getSafeProp(l,`password`)||``}),koe(t)){let e=new URL(t,S5.origin);!i&&(e.username||e.password)&&(i={username:q5(e.username),password:q5(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Ooe((i.username||``)+`:`+(i.password||``))))),E&&typeof t==`string`&&t.startsWith(`data:`)&&Doe(t)>w)throw new $(`maxContentLength size of `+w+` exceeded`,$.ERR_BAD_RESPONSE,e,j);if(D&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(N=e,e>T))throw te()}let d=D&&(Q.isReadableStream(s)||Q.isStream(s)),_=(e,t,n)=>B5(e,G5,e=>{if(D&&e>T)throw ee=te();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(N??=await g(x,s),N!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(Q.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&N5(N,M5(P5(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new $(`Stream request bodies are not supported by the current fetch implementation`,$.ERR_NOT_SUPPORT,e,j);Q.isString(S)||(S=S?`include`:`omit`);let P=c&&`credentials`in a.prototype;if(Q.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+W5,!1);let F={...C,signal:A,method:n.toUpperCase(),headers:t5(x.normalize()),body:s,duplex:`half`,credentials:P?S:void 0};j=c&&new a(t,F);let ne=await(c?k(j,C):k(t,F)),re=s5.from(ne.headers);if(E){let t=Q.toFiniteNumber(re.getContentLength());if(t!=null&&t>w)throw new $(`maxContentLength size of `+w+` exceeded`,$.ERR_BAD_RESPONSE,e,j)}let ie=p&&(b===`stream`||b===`response`);if(p&&ne.body&&(v||E||ie&&M)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=ne[e]});let n=Q.toFiniteNumber(re.getContentLength()),[r,i]=v&&N5(n,M5(P5(v),!0))||[],a=0;ne=new o(B5(ne.body,G5,t=>{if(E&&(a=t,a>w))throw new $(`maxContentLength size of `+w+` exceeded`,$.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let ae=await m[Q.findKey(m,b)||`text`](ne,e);if(E&&!p&&!ie){let t;if(ae!=null&&(typeof ae.byteLength==`number`?t=ae.byteLength:typeof ae.size==`number`?t=ae.size:typeof ae==`string`&&(t=typeof r==`function`?new r().encode(ae).byteLength:ae.length)),typeof t==`number`&&t>w)throw new $(`maxContentLength size of `+w+` exceeded`,$.ERR_BAD_RESPONSE,e,j)}return!ie&&M&&M(),await new Promise((t,n)=>{j5(t,n,{data:ae,headers:s5.from(ne.headers),status:ne.status,statusText:ne.statusText,config:e,request:j})})}catch(t){if(M&&M(),A&&A.aborted&&A.reason instanceof $){let n=A.reason;throw n.config=e,j&&(n.request=j),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(ee)throw j&&!ee.request&&(ee.request=j),ee;if(t instanceof $)throw j&&!t.request&&(t.request=j),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new $(`Network Error`,$.ERR_NETWORK,e,j,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw $.from(t,t&&t.code,e,j,t&&t.response)}}},joe=new Map,Y5=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=joe;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Aoe(t)),l=c;return c};Y5();var X5={http:null,xhr:goe,fetch:{get:Y5}};Q.forEach(X5,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Z5=e=>`- ${e}`,Moe=e=>Q.isFunction(e)||e===null||e===!1;function Noe(e,t){e=Q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Moe(r)&&(i=X5[(n=String(r)).toLowerCase()],i===void 0))throw new $(`Unknown adapter '${n}'`);if(i&&(Q.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new $(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
99
|
-
`+e.map(Z5).join(`
|
|
100
|
-
`):` `+Z5(e[0]):`as no adapter specified`),$.ERR_NOT_SUPPORT)}return i}var Q5={getAdapter:Noe,adapters:X5};function $5(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new A5(null,e)}function e7(e){return $5(e),e.headers=s5.from(e.headers),e.data=O5.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Q5.getAdapter(e.adapter||D5.adapter,e)(e).then(function(t){$5(e),e.response=t;try{t.data=O5.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=s5.from(t.headers),t},function(t){if(!k5(t)&&($5(e),t&&t.response)){e.response=t.response;try{t.response.data=O5.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=s5.from(t.response.headers)}return Promise.reject(t)})}var t7={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{t7[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var n7={};t7.transitional=function(e,t,n){function r(e,t){return`[Axios v`+W5+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new $(r(i,` has been removed`+(t?` in `+t:``)),$.ERR_DEPRECATED);return t&&!n7[i]&&(n7[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},t7.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Poe(e,t,n){if(typeof e!=`object`||!e)throw new $(`options must be an object`,$.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new $(`option `+a+` must be `+n,$.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $(`Unknown option `+a,$.ERR_BAD_OPTION)}}var r7={assertOptions:Poe,validators:t7},i7=r7.validators,a7=class{constructor(e){this.defaults=e||{},this.interceptors={request:new v5,response:new v5}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
|
101
|
-
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
102
|
-
`),r=t===-1?-1:n.indexOf(`
|
|
103
|
-
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
104
|
-
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=R5(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&r7.assertOptions(n,{silentJSONParsing:i7.transitional(i7.boolean),forcedJSONParsing:i7.transitional(i7.boolean),clarifyTimeoutError:i7.transitional(i7.boolean),legacyInterceptorReqResOrdering:i7.transitional(i7.boolean),advertiseZstdAcceptEncoding:i7.transitional(i7.boolean),validateStatusUndefinedResolves:i7.transitional(i7.boolean)},!1),r!=null&&(Q.isFunction(r)?t.paramsSerializer={serialize:r}:r7.assertOptions(r,{encode:i7.function,serialize:i7.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),r7.assertOptions(t,{baseUrl:i7.spelling(`baseURL`),withXsrfToken:i7.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&Q.merge(i.common,i[t.method]);i&&Q.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=s5.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||y5;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[e7.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);Q.isThenable(n)&&(l=Promise.resolve(n).then(()=>e7.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=e7.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=R5(this.defaults,e),_5(I5(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};Q.forEach([`delete`,`get`,`head`,`options`],function(e){a7.prototype[e]=function(t,n){return this.request(R5(n||{},{method:e,url:t,data:n&&Q.hasOwnProp(n,`data`)?n.data:void 0}))}}),Q.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(R5(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}a7.prototype[e]=t(),e!==`query`&&(a7.prototype[e+`Form`]=t(!0))});var Foe=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new A5(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Ioe(e){return function(t){return e.apply(null,t)}}function Loe(e){return Q.isObject(e)&&e.isAxiosError===!0}var o7={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(o7).forEach(([e,t])=>{o7[t]=e});function s7(e){let t=new a7(e),n=D8(a7.prototype.request,t);return Q.extend(n,a7.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return s7(R5(e,t))},n}var c7=s7(D5);c7.Axios=a7,c7.CanceledError=A5,c7.CancelToken=Foe,c7.isCancel=k5,c7.VERSION=W5,c7.toFormData=p5,c7.AxiosError=$,c7.Cancel=c7.CanceledError,c7.all=function(e){return Promise.all(e)},c7.spread=Ioe,c7.isAxiosError=Loe,c7.mergeConfig=R5,c7.AxiosHeaders=s5,c7.formToJSON=e=>T5(Q.isHTMLForm(e)?new FormData(e):e),c7.getAdapter=Q5.getAdapter,c7.HttpStatusCode=o7,c7.default=c7;var Roe=u(w8());T8(),E8(),Eie(),Die(),Oie(),kie(),Aie(),jie(),Mie(),Nie();var l7=class{host;timeout;user;password;headers;statusPage;instance;constructor(e,t=3e4,n=``,r=``,i={},a=`/`){if(!P6(e))throw Error(`Invalid URL provided to HttpProvider`);if(isNaN(t)||t<0)throw Error(`Invalid timeout duration provided`);if(!F6(i))throw Error(`Invalid headers object provided`);e=e.replace(/\/+$/,``),this.host=e,this.timeout=t,this.user=n,this.password=r,this.headers=i,this.statusPage=a,this.instance=c7.create({baseURL:e,timeout:t,headers:i,auth:n?{username:n,password:r}:void 0})}setStatusPage(e=`/`){this.statusPage=e}async isConnected(e=this.statusPage){return this.request(e).then(e=>G6(e,`blockID`,`block_header`)).catch(()=>!1)}request(e,t={},n=`get`){return n=n.toLowerCase(),this.instance.request({data:n==`post`&&Object.keys(t).length?t:null,params:n==`get`&&t,url:e,method:n}).then(({data:e})=>e)}},u7={HttpProvider:l7},zoe=u(s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default,d7=s(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),f7=s(((e,t)=>{t.exports=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),p7=s(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=d7(),a=f7();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),m7=s(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),h7=s(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),g7=s(((e,t)=>{var n=f7(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=d7(),{safeRe:a,safeSrc:o,t:s}=p7(),c=m7(),{compareIdentifiers:l}=h7();t.exports=class e{constructor(t,o){if(o=c(o),t instanceof e){if(t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let l=t.trim().match(o.loose?a[s.LOOSE]:a[s.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),l(this.major,t.major)||l(this.minor,t.minor)||l(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return l(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return l(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=RegExp(`^${this.options.loose?o[s.PRERELEASELOOSE]:o[s.PRERELEASE]}$`),n=`-${t}`.match(e);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),l(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),_7=s(((e,t)=>{var n=g7();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),Boe=s(((e,t)=>{var n=_7();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),Voe=s(((e,t)=>{var n=_7();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),Hoe=s(((e,t)=>{var n=g7();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),Uoe=s(((e,t)=>{var n=_7();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),Woe=s(((e,t)=>{var n=g7();t.exports=(e,t)=>new n(e,t).major})),Goe=s(((e,t)=>{var n=g7();t.exports=(e,t)=>new n(e,t).minor})),Koe=s(((e,t)=>{var n=g7();t.exports=(e,t)=>new n(e,t).patch})),qoe=s(((e,t)=>{var n=_7();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),v7=s(((e,t)=>{var n=g7();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),Joe=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(t,e,r)})),Yoe=s(((e,t)=>{var n=v7();t.exports=(e,t)=>n(e,t,!0)})),y7=s(((e,t)=>{var n=g7();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),Xoe=s(((e,t)=>{var n=y7();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),Zoe=s(((e,t)=>{var n=y7();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),b7=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(e,t,r)>0})),x7=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(e,t,r)<0})),S7=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(e,t,r)===0})),C7=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(e,t,r)!==0})),w7=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(e,t,r)>=0})),T7=s(((e,t)=>{var n=v7();t.exports=(e,t,r)=>n(e,t,r)<=0})),E7=s(((e,t)=>{var n=S7(),r=C7(),i=b7(),a=w7(),o=x7(),s=T7();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Qoe=s(((e,t)=>{var n=g7(),r=_7(),{safeRe:i,t:a}=p7();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),$oe=s(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),D7=s(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(k(this.set[t],e,this.options))return!0;return!1}};var r=new($oe()),i=m7(),a=O7(),o=f7(),s=g7(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=p7(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=d7(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),k=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),O7=s(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=m7(),{safeRe:i,t:a}=p7(),o=E7(),s=f7(),c=g7(),l=D7()})),k7=s(((e,t)=>{var n=D7();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),ese=s(((e,t)=>{var n=D7();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),tse=s(((e,t)=>{var n=g7(),r=D7();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),nse=s(((e,t)=>{var n=g7(),r=D7();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),rse=s(((e,t)=>{var n=g7(),r=D7(),i=b7();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),ise=s(((e,t)=>{var n=D7();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),A7=s(((e,t)=>{var n=g7(),r=O7(),{ANY:i}=r,a=D7(),o=k7(),s=b7(),c=x7(),l=T7(),u=w7();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),ase=s(((e,t)=>{var n=A7();t.exports=(e,t,r)=>n(e,t,`>`,r)})),ose=s(((e,t)=>{var n=A7();t.exports=(e,t,r)=>n(e,t,`<`,r)})),sse=s(((e,t)=>{var n=D7();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),cse=s(((e,t)=>{var n=k7(),r=v7();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),lse=s(((e,t)=>{var n=D7(),r=O7(),{ANY:i}=r,a=k7(),o=v7(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),j7=u(s(((e,t)=>{var n=p7(),r=d7(),i=g7(),a=h7();t.exports={parse:_7(),valid:Boe(),clean:Voe(),inc:Hoe(),diff:Uoe(),major:Woe(),minor:Goe(),patch:Koe(),prerelease:qoe(),compare:v7(),rcompare:Joe(),compareLoose:Yoe(),compareBuild:y7(),sort:Xoe(),rsort:Zoe(),gt:b7(),lt:x7(),eq:S7(),neq:C7(),gte:w7(),lte:T7(),cmp:E7(),coerce:Qoe(),Comparator:O7(),Range:D7(),satisfies:k7(),toComparators:ese(),maxSatisfying:tse(),minSatisfying:nse(),minVersion:rse(),validRange:ise(),outside:A7(),gtr:ase(),ltr:ose(),intersects:sse(),simplifyRange:cse(),subset:lse(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))()),M7=class{invalid(e){return e.msg||`Invalid ${e.name}${e.type===`address`?` address`:``} provided`}notPositive(e){return`${e.name} must be a positive integer`}notEqual(e){return e.msg||`${e.names?.[0]} can not be equal to ${e.names?.[1]}`}notValid(e){let t={},n=!1;for(let r of e){let{name:e,names:i,value:a,type:o,gt:s,lt:c,gte:l,lte:u,optional:d}=r;if(!(d&&(!Y6(a)||o!==`boolean`&&a===!1))){switch(t[e]=r.value,o){case`address`:r8(a)?t[e]=Z(a):n=!0;break;case`integer`:(!U6(a)||typeof s==`number`&&a<=s||typeof c==`number`&&a>=c||typeof l==`number`&&a<l||typeof u==`number`&&a>u)&&(n=!0);break;case`positive-integer`:if(!U6(a)||a<=0)throw Error(this.notPositive(r));break;case`tokenId`:(!B6(a)||!a.length)&&(n=!0);break;case`notEmptyObject`:(!F6(a)||!Object.keys(a).length)&&(n=!0);break;case`notEqual`:if(i&&t[i[0]]===t[i[1]])throw Error(this.notEqual(r));break;case`resource`:[`BANDWIDTH`,`ENERGY`].includes(a)||(n=!0);break;case`url`:P6(a)||(n=!0);break;case`hex`:H6(a)||(n=!0);break;case`array`:Array.isArray(a)||(n=!0);break;case`not-empty-string`:(!B6(a)||!a.length)&&(n=!0);break;case`boolean`:R6(a)||(n=!0);break;case`string`:(!B6(a)||typeof s==`number`&&a.length<=s||typeof c==`number`&&a.length>=c||typeof l==`number`&&a.length<l||typeof u==`number`&&a.length>u)&&(n=!0);break}if(n)throw Error(this.invalid(r))}}return!1}},N7;(function(e){e.AccountCreateContract=`AccountCreateContract`,e.TransferContract=`TransferContract`,e.TransferAssetContract=`TransferAssetContract`,e.VoteAssetContract=`VoteAssetContract`,e.VoteWitnessContract=`VoteWitnessContract`,e.WitnessCreateContract=`WitnessCreateContract`,e.AssetIssueContract=`AssetIssueContract`,e.WitnessUpdateContract=`WitnessUpdateContract`,e.ParticipateAssetIssueContract=`ParticipateAssetIssueContract`,e.AccountUpdateContract=`AccountUpdateContract`,e.FreezeBalanceContract=`FreezeBalanceContract`,e.UnfreezeBalanceContract=`UnfreezeBalanceContract`,e.CancelAllUnfreezeV2Contract=`CancelAllUnfreezeV2Contract`,e.WithdrawBalanceContract=`WithdrawBalanceContract`,e.UnfreezeAssetContract=`UnfreezeAssetContract`,e.UpdateAssetContract=`UpdateAssetContract`,e.ProposalCreateContract=`ProposalCreateContract`,e.ProposalApproveContract=`ProposalApproveContract`,e.ProposalDeleteContract=`ProposalDeleteContract`,e.SetAccountIdContract=`SetAccountIdContract`,e.CustomContract=`CustomContract`,e.CreateSmartContract=`CreateSmartContract`,e.TriggerSmartContract=`TriggerSmartContract`,e.GetContract=`GetContract`,e.UpdateSettingContract=`UpdateSettingContract`,e.ExchangeCreateContract=`ExchangeCreateContract`,e.ExchangeInjectContract=`ExchangeInjectContract`,e.ExchangeWithdrawContract=`ExchangeWithdrawContract`,e.ExchangeTransactionContract=`ExchangeTransactionContract`,e.UpdateEnergyLimitContract=`UpdateEnergyLimitContract`,e.AccountPermissionUpdateContract=`AccountPermissionUpdateContract`,e.ClearABIContract=`ClearABIContract`,e.UpdateBrokerageContract=`UpdateBrokerageContract`,e.ShieldedTransferContract=`ShieldedTransferContract`,e.MarketSellAssetContract=`MarketSellAssetContract`,e.MarketCancelOrderContract=`MarketCancelOrderContract`,e.FreezeBalanceV2Contract=`FreezeBalanceV2Contract`,e.UnfreezeBalanceV2Contract=`UnfreezeBalanceV2Contract`,e.WithdrawExpireUnfreezeContract=`WithdrawExpireUnfreezeContract`,e.DelegateResourceContract=`DelegateResourceContract`,e.UnDelegateResourceContract=`UnDelegateResourceContract`,e.UNRECOGNIZED=`UNRECOGNIZED`})(N7||={});var use;(function(e){e[e.Owner=0]=`Owner`,e[e.Witness=1]=`Witness`,e[e.Active=2]=`Active`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(use||={});var dse;(function(e){e[e.Normal=0]=`Normal`,e[e.AssetIssue=1]=`AssetIssue`,e[e.Contract=2]=`Contract`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`})(dse||={});function P7(e){return W7.fromUtf8(e).replace(/^0x/,``)}function F7(e){return JSON.parse(JSON.stringify(e))}function fse(e,t,n){if(e.Error)throw Error(e.Error);if(e.result&&e.result.message)throw Error(W7.toUtf8(e.result.message));if(o9(e,t,n))return e;throw Error(`Invalid transaction`)}function pse(e,t,n){if(e.Error)throw Error(e.Error);if(e.result&&e.result.message)throw Error(W7.toUtf8(e.result.message));if(!(n._isConstant||n.estimateEnergy)){if(o9(e.transaction,t,n))return e;throw Error(`Invalid transaction`)}return e}function mse(e,t){return`41`+Lq(Buffer.from(t+e,`hex`)).toString().substring(2).slice(24)}function I7(e={}){if(e.ref_block_bytes===void 0&&e.ref_block_hash===void 0&&e.expiration===void 0&&e.timestamp===void 0)return!1;if(typeof e.ref_block_bytes!=`string`)throw Error(`Invalid ref_block_bytes provided.`);if(typeof e.ref_block_hash!=`string`)throw Error(`Invalid ref_block_hash provided.`);if(typeof e.expiration!=`number`)throw Error(`Invalid expiration provided.`);if(typeof e.timestamp!=`number`)throw Error(`Invalid timestamp provided.`);return!0}async function L7(e,t,n,r,i={}){let a={visible:!1,txID:``,raw_data_hex:``,raw_data:{contract:[{parameter:{value:n,type_url:`type.googleapis.com/protocol.${t}`},type:t}],...I7(i)?{}:await e.trx.getCurrentRefBlockParams(),...i}};r&&(a.raw_data.contract[0].Permission_id=r);let o=t9(a);return a.txID=s9(o).replace(/^0x/,``),a.raw_data_hex=i9(o).toLowerCase(),a}function R7(e={}){let t={};return I7(e.blockHeader)&&(t.ref_block_bytes=e.blockHeader.ref_block_bytes,t.ref_block_hash=e.blockHeader.ref_block_hash,t.expiration=e.blockHeader.expiration,t.timestamp=e.blockHeader.timestamp),t}var hse=class{tronWeb;validator;constructor(e){if(!e||!(e instanceof W7))throw Error(`Expected instance of TronWeb`);this.tronWeb=e,this.validator=new M7}async sendTrx(e,t=0,n=this.tronWeb.defaultAddress.hex,r={}){t=parseInt(t),this.validator.notValid([{name:`recipient`,type:`address`,value:e},{name:`origin`,type:`address`,value:n},{names:[`recipient`,`origin`],type:`notEqual`,msg:`Cannot transfer TRX to the same account`},{name:`amount`,type:`integer`,gt:0,value:t}]);let i={to_address:Z(e),owner_address:Z(n),amount:t},a=R7(r);return L7(this.tronWeb,N7.TransferContract,i,r?.permissionId,a)}async sendToken(e,t=0,n,r=this.tronWeb.defaultAddress.hex,i={}){t=parseInt(t),this.validator.notValid([{name:`recipient`,type:`address`,value:e},{name:`origin`,type:`address`,value:r},{names:[`recipient`,`origin`],type:`notEqual`,msg:`Cannot transfer tokens to the same account`},{name:`amount`,type:`integer`,gt:0,value:t},{name:`token ID`,type:`tokenId`,value:n}]);let a={to_address:Z(e),owner_address:Z(r),asset_name:P7(n),amount:t},o=R7(i);return L7(this.tronWeb,N7.TransferAssetContract,a,i?.permissionId,o)}async purchaseToken(e,t,n=0,r=this.tronWeb.defaultAddress.hex,i={}){this.validator.notValid([{name:`buyer`,type:`address`,value:r},{name:`issuer`,type:`address`,value:e},{names:[`buyer`,`issuer`],type:`notEqual`,msg:`Cannot purchase tokens from same account`},{name:`amount`,type:`integer`,gt:0,value:n},{name:`token ID`,type:`tokenId`,value:t}]);let a={to_address:Z(e),owner_address:Z(r),asset_name:P7(t),amount:parseInt(n)},o=R7(i);return L7(this.tronWeb,N7.ParticipateAssetIssueContract,a,i?.permissionId,o)}async freezeBalance(e=0,t=3,n=`BANDWIDTH`,r=this.tronWeb.defaultAddress.hex,i,a={}){this.validator.notValid([{name:`origin`,type:`address`,value:r},{name:`receiver`,type:`address`,value:i,optional:!0},{name:`amount`,type:`integer`,gt:0,value:e},{name:`duration`,type:`integer`,gte:3,value:t},{name:`resource`,type:`resource`,value:n,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`}]);let o={owner_address:Z(r),frozen_balance:parseInt(e),frozen_duration:parseInt(String(t))};n!==`BANDWIDTH`&&(o.resource=n),Y6(i)&&Z(i)!==Z(r)&&(o.receiver_address=Z(i));let s=R7(a);return L7(this.tronWeb,N7.FreezeBalanceContract,o,a?.permissionId,s)}async unfreezeBalance(e=`BANDWIDTH`,t=this.tronWeb.defaultAddress.hex,n,r={}){this.validator.notValid([{name:`origin`,type:`address`,value:t},{name:`receiver`,type:`address`,value:n,optional:!0},{name:`resource`,type:`resource`,value:e,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`}]);let i={owner_address:Z(t)};e!==`BANDWIDTH`&&(i.resource=e),Y6(n)&&Z(n)!==Z(t)&&(i.receiver_address=Z(n));let a=R7(r);return L7(this.tronWeb,N7.UnfreezeBalanceContract,i,r?.permissionId,a)}async freezeBalanceV2(e=0,t=`BANDWIDTH`,n=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:`origin`,type:`address`,value:n},{name:`amount`,type:`integer`,gt:0,value:e},{name:`resource`,type:`resource`,value:t,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`}]);let i={owner_address:Z(n),frozen_balance:parseInt(e)};t!==`BANDWIDTH`&&(i.resource=t);let a=R7(r);return L7(this.tronWeb,N7.FreezeBalanceV2Contract,i,r?.permissionId,a)}async unfreezeBalanceV2(e=0,t=`BANDWIDTH`,n=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:`origin`,type:`address`,value:n},{name:`amount`,type:`integer`,gt:0,value:e},{name:`resource`,type:`resource`,value:t,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`}]);let i={owner_address:Z(n),unfreeze_balance:parseInt(e)};t!==`BANDWIDTH`&&(i.resource=t);let a=R7(r);return L7(this.tronWeb,N7.UnfreezeBalanceV2Contract,i,r?.permissionId,a)}async cancelUnfreezeBalanceV2(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:`origin`,type:`address`,value:e}]);let n={owner_address:Z(e)},r=R7(t);return L7(this.tronWeb,N7.CancelAllUnfreezeV2Contract,n,t?.permissionId,r)}async delegateResource(e=0,t,n=`BANDWIDTH`,r=this.tronWeb.defaultAddress.hex,i=!1,a,o={}){if(this.validator.notValid([{name:`amount`,type:`integer`,gt:0,value:e},{name:`resource`,type:`resource`,value:n,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`},{name:`receiver`,type:`address`,value:t},{name:`origin`,type:`address`,value:r},{name:`lock`,type:`boolean`,value:i},{name:`lock period`,type:`integer`,gte:0,value:a,optional:!0}]),Z(t)===Z(r))throw Error(`Receiver address must not be the same as owner address`);let s={owner_address:Z(r),receiver_address:Z(t),balance:parseInt(e)};n!==`BANDWIDTH`&&(s.resource=n),i&&(s.lock=i,Y6(a)&&(s.lock_period=a));let c=R7(o);return L7(this.tronWeb,N7.DelegateResourceContract,s,o?.permissionId,c)}async undelegateResource(e=0,t,n=`BANDWIDTH`,r=this.tronWeb.defaultAddress.hex,i={}){if(this.validator.notValid([{name:`origin`,type:`address`,value:r},{name:`receiver`,type:`address`,value:t},{name:`amount`,type:`integer`,gt:0,value:e},{name:`resource`,type:`resource`,value:n,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`}]),Z(t)===Z(r))throw Error(`Receiver address must not be the same as owner address`);let a={owner_address:Z(r),receiver_address:Z(t),balance:parseInt(e)};n!==`BANDWIDTH`&&(a.resource=n);let o=R7(i);return L7(this.tronWeb,N7.UnDelegateResourceContract,a,i?.permissionId,o)}async withdrawExpireUnfreeze(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:`origin`,type:`address`,value:e}]);let n={owner_address:Z(e)},r=R7(t);return L7(this.tronWeb,N7.WithdrawExpireUnfreezeContract,n,t?.permissionId,r)}async withdrawBlockRewards(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:`origin`,type:`address`,value:e}]);let n={owner_address:Z(e)},r=R7(t);return L7(this.tronWeb,N7.WithdrawBalanceContract,n,t?.permissionId,r)}async applyForSR(e=this.tronWeb.defaultAddress.hex,t=``,n={}){this.validator.notValid([{name:`origin`,type:`address`,value:e},{name:`url`,type:`url`,value:t,msg:`Invalid url provided`},{name:`url`,type:`string`,value:t,lte:256,msg:`Invalid url provided`}]);let r={owner_address:Z(e),url:P7(t)},i=R7(n);return L7(this.tronWeb,N7.WitnessCreateContract,r,n?.permissionId,i)}async vote(e={},t=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:`voter`,type:`address`,value:t},{name:`votes`,type:`notEmptyObject`,value:e}]);let r=Object.entries(e);for(let[e,t]of r)this.validator.notValid([{name:`SR`,type:`address`,value:e},{name:`vote count`,type:`integer`,gt:0,value:t,msg:`Invalid vote count provided for SR: `+e}]);let i=r.map(([e,t])=>({vote_address:Z(e),vote_count:parseInt(t)})),a={owner_address:Z(t),votes:i},o=R7(n);return L7(this.tronWeb,N7.VoteWitnessContract,a,n?.permissionId,o)}async createSmartContract(e={},t=this.tronWeb.defaultAddress.hex){let n=e.feeLimit||this.tronWeb.feeLimit,r=e.userFeePercentage;typeof r!=`number`&&!r&&(r=100);let i=e.originEnergyLimit||1e7,a=e.callValue||0,o=e.tokenValue,s=e.tokenId||e.token_id,{abi:c}=e,{parameters:l=[]}=e,u=``,{bytecode:d=!1,name:f=``}=e;if(c&&B6(c))try{c=JSON.parse(c)}catch{throw Error(`Invalid options.abi provided`)}let p=c,m=p;if(p.entrys&&(m=p.entrys),!I6(m))throw Error(`Invalid options.abi provided`);let h=m.some(e=>e.type===`constructor`&&e.stateMutability.toLowerCase()===`payable`);if(this.validator.notValid([{name:`bytecode`,type:`hex`,value:d},{name:`feeLimit`,type:`integer`,value:n,gt:0},{name:`callValue`,type:`integer`,value:a,gte:0},{name:`userFeePercentage`,type:`integer`,value:r,gte:0,lte:100},{name:`originEnergyLimit`,type:`integer`,value:i,gte:0,lte:1e7},{name:`parameters`,type:`array`,value:l},{name:`issuer`,type:`address`,value:t},{name:`tokenValue`,type:`integer`,value:o,gte:0,optional:!0},{name:`tokenId`,type:`integer`,value:s,gte:0,optional:!0}]),!h&&(a>0||o>0))throw Error(`When contract is not payable, options.callValue and options.tokenValue must be 0`);let{rawParameter:g,funcABIV2:_,parametersV2:v}=e;if(g&&B6(g))u=g.replace(/^(0x)/,``);else if(_)u=u8(_,v).replace(/^(0x)/,``);else{let e=m.find(e=>e.type===`constructor`);if(e!==void 0&&e){let t=new mQ,n=[],r=[];if(e=e.inputs,l.length!=e.length)throw Error(`constructor needs ${e.length} but ${l.length} provided`);for(let t=0;t<l.length;t++){let i=e[t].type,a=l[t];if(!i||!B6(i)||!i.length)throw Error(`Invalid parameter type provided: `+i);let o=e=>I6(e)?e.map(e=>o(e)):Z(e).replace(hW,`0x`);i===`address`||i.match(/^([^\x5b]*)(\x5b|$)/)?.[0]===`address[`?a=o(a):/trcToken/.test(i)&&(i=i.replace(/trcToken/,`uint256`)),n.push(i),r.push(a)}try{u=t.encode(n,r).replace(/^(0x)/,``)}catch(e){throw Error(e)}}else u=``}let y={owner_address:Z(t),fee_limit:parseInt(n),call_value:parseInt(a),consume_user_resource_percent:r,origin_energy_limit:i,abi:JSON.stringify(m),bytecode:d,parameter:u,name:f};Y6(o)&&(y.call_token_value=parseInt(o)),Y6(s)&&(y.token_id=parseInt(s));let b={};b.owner_address=y.owner_address,Y6(y.call_token_value)&&(b.call_token_value=y.call_token_value),Y6(y.token_id)&&(b.token_id=y.token_id);let x=b.new_contract={};y.abi?x.abi={entrys:JSON.parse(y.abi)}:x.abi={},y.call_value&&(x.call_value=y.call_value),x.consume_user_resource_percent=y.consume_user_resource_percent,x.origin_energy_limit=y.origin_energy_limit,x.origin_address=y.origin_address??y.owner_address,y.bytecode+y.parameter&&(x.bytecode=(y.bytecode+y.parameter).replace(/^0x/,``)),Y6(y.name)&&(x.name=y.name);let S=R7(e),C=await L7(this.tronWeb,N7.CreateSmartContract,b,e?.permissionId,{...S,fee_limit:y.fee_limit});return C.contract_address=mse(y.owner_address,C.txID),C}async triggerSmartContract(e,t,n,r,i){let a=[e,t,n,r,i];return typeof a[2]!=`object`&&(a[2]={feeLimit:a[2],callValue:a[3]},a.splice(3,1)),a[2]?.txLocal?this._triggerSmartContractLocal(...a):this._triggerSmartContract(...a)}async triggerConstantContract(e,t,n={},r=[],i=this.tronWeb.defaultAddress.hex){return n._isConstant=!0,this._triggerSmartContract(e,t,n,r,i)}async triggerConfirmedConstantContract(e,t,n={},r=[],i=this.tronWeb.defaultAddress.hex){return n._isConstant=!0,n.confirmed=!0,this._triggerSmartContract(e,t,n,r,i)}async estimateEnergy(e,t,n={},r=[],i=this.tronWeb.defaultAddress.hex){return n.estimateEnergy=!0,await this._triggerSmartContract(e,t,n,r,i)}async deployConstantContract(e={input:``,ownerAddress:``}){let{input:t,ownerAddress:n,tokenId:r,tokenValue:i,callValue:a=0}=e;this.validator.notValid([{name:`input`,type:`not-empty-string`,value:t},{name:`callValue`,type:`integer`,value:a,gte:0},{name:`owner`,type:`address`,value:n},{name:`tokenValue`,type:`integer`,value:i,gte:0,optional:!0},{name:`tokenId`,type:`integer`,value:r,gte:0,optional:!0}]);let o={data:t,owner_address:Z(n),call_value:a};r&&(o.token_id=r),i&&(o.call_token_value=i);let s=`wallet${e.confirmed?`solidity`:``}/estimateenergy`,c=await this.tronWeb[e.confirmed?`solidityNode`:`fullNode`].request(s,o,`post`);if(c.Error)throw Error(c.Error);if(c.result&&c.result.message)throw Error(this.tronWeb.toUtf8(c.result.message));return c}_getTriggerSmartContractArgs(e,t,n,r,i,a,o,s,c){let l={contract_address:Z(e),owner_address:Z(i)};if(t&&B6(t)){t=t.replace(/\s*/g,``);let e;if(r.length){let t=new mQ,n=[],i=[];for(let e=0;e<r.length;e++){let{value:t}=r[e],{type:a}=r[e];if(!a||!B6(a)||!a.length)throw Error(`Invalid parameter type provided: `+a);let o=e=>I6(e)?e.map(e=>o(e)):Z(e).replace(hW,`0x`);(a===`address`||a.match(/^([^\x5b]*)(\x5b|$)/)?.[0]===`address[`)&&(t=o(t)),n.push(a),i.push(t)}try{n=n.map(e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,`uint256`)),e)),e=t.encode(n,i).replace(/^(0x)/,``)}catch(e){throw Error(e)}}else e=``;n.funcABIV2&&(e=u8(n.funcABIV2,n.parametersV2).replace(/^(0x)/,``)),n.shieldedParameter&&B6(n.shieldedParameter)&&(e=n.shieldedParameter.replace(/^(0x)/,``)),n.rawParameter&&B6(n.rawParameter)&&(e=n.rawParameter.replace(/^(0x)/,``)),l.function_selector=t,l.parameter=e}else n.input&&(l.data=n.input);return l.call_value=parseInt(s),Y6(a)&&(l.call_token_value=parseInt(a)),Y6(o)&&(l.token_id=parseInt(o)),n._isConstant||n.estimateEnergy||(l.fee_limit=parseInt(c)),n.permissionId&&(l.Permission_id=n.permissionId),l}async _triggerSmartContractLocal(e,t,n={},r=[],i=this.tronWeb.defaultAddress.hex){let{tokenValue:a,tokenId:o,callValue:s,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},n);this.validator.notValid([{name:`feeLimit`,type:`integer`,value:c,gt:0},{name:`callValue`,type:`integer`,value:s,gte:0},{name:`parameters`,type:`array`,value:r},{name:`contract`,type:`address`,value:e},{name:`issuer`,type:`address`,value:i,optional:!0},{name:`tokenValue`,type:`integer`,value:a,gte:0,optional:!0},{name:`tokenId`,type:`integer`,value:o,gte:0,optional:!0}]);let l=this._getTriggerSmartContractArgs(e,t,n,r,i,a,o,s,c);l.function_selector&&(l.data=Lq(Buffer.from(l.function_selector,`utf-8`)).toString().substring(2,10)+l.parameter);let u={data:l.data,owner_address:l.owner_address,contract_address:l.contract_address};l.call_value&&(u.call_value=l.call_value),l.call_token_value&&(u.call_token_value=l.call_token_value),l.token_id&&(u.token_id=l.token_id);let d=R7(n);return{result:{result:!0},transaction:await L7(this.tronWeb,N7.TriggerSmartContract,u,n.permissionId,{...d,fee_limit:l.fee_limit})}}async _triggerSmartContract(e,t,n={},r=[],i=this.tronWeb.defaultAddress.hex){let{tokenValue:a,tokenId:o,callValue:s,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},n);this.validator.notValid([{name:`feeLimit`,type:`integer`,value:c,gt:0},{name:`callValue`,type:`integer`,value:s,gte:0},{name:`parameters`,type:`array`,value:r},{name:`contract`,type:`address`,value:e},{name:`issuer`,type:`address`,value:i,optional:!0},{name:`tokenValue`,type:`integer`,value:a,gte:0,optional:!0},{name:`tokenId`,type:`integer`,value:o,gte:0,optional:!0}]);let l=this._getTriggerSmartContractArgs(e,t,n,r,i,a,o,s,c),u=`triggersmartcontract`;return n._isConstant?u=`triggerconstantcontract`:n.estimateEnergy&&(u=`estimateenergy`),u=`wallet${n.confirmed?`solidity`:``}/${u}`,pse(await this.tronWeb[n.confirmed?`solidityNode`:`fullNode`].request(u,l,`post`),l,n)}async clearABI(e,t=this.tronWeb.defaultAddress.hex,n={}){if(!W7.isAddress(e))throw Error(`Invalid contract address provided`);if(!W7.isAddress(t))throw Error(`Invalid owner address provided`);let r={contract_address:Z(e),owner_address:Z(t)};this.tronWeb.trx.cache.contracts[e]&&delete this.tronWeb.trx.cache.contracts[e];let i=R7(n);return L7(this.tronWeb,N7.ClearABIContract,r,n?.permissionId,i)}async updateBrokerage(e,t=this.tronWeb.defaultAddress.hex,n={}){if(!Y6(e))throw Error(`Invalid brokerage provided`);if(!U6(e)||e<0||e>100)throw Error(`Brokerage must be an integer between 0 and 100`);if(!W7.isAddress(t))throw Error(`Invalid owner address provided`);let r={brokerage:parseInt(e),owner_address:Z(t)},i=R7(n);return L7(this.tronWeb,N7.UpdateBrokerageContract,r,n?.permissionId,i)}async createToken(e={},t=this.tronWeb.defaultAddress.hex){let{name:n=!1,abbreviation:r=!1,description:i=``,url:a=!1,totalSupply:o=0,trxRatio:s=1,tokenRatio:c=1,saleStart:l=Date.now(),saleEnd:u=!1,freeBandwidth:d=0,freeBandwidthLimit:f=0,frozenAmount:p=0,frozenDuration:m=0,voteScore:h,precision:g}=e;if(this.validator.notValid([{name:`Supply amount`,type:`positive-integer`,value:o},{name:`TRX ratio`,type:`positive-integer`,value:s},{name:`Token ratio`,type:`positive-integer`,value:c},{name:`token abbreviation`,type:`string`,value:r,lte:32,gt:0},{name:`token name`,type:`not-empty-string`,value:n},{name:`token description`,type:`string`,value:i,lte:200},{name:`token url`,type:`url`,value:a},{name:`token url`,type:`string`,value:a,lte:256},{name:`issuer`,type:`address`,value:t},{name:`sale start timestamp`,type:`integer`,value:l,gte:Date.now()},{name:`sale end timestamp`,type:`integer`,value:u,gt:l},{name:`Frozen supply`,type:`integer`,value:p,gte:0},{name:`Frozen duration`,type:`integer`,value:m,gte:0}]),Y6(h)&&(!U6(h)||h<=0))throw Error(`voteScore must be a positive integer greater than 0`);if(Y6(g)&&(!U6(g)||g<0||g>6))throw Error(`precision must be a positive integer >= 0 and <= 6`);let _={owner_address:Z(t),name:P7(n),abbr:P7(r),description:P7(i),url:P7(a),total_supply:parseInt(o),trx_num:parseInt(s),num:parseInt(c),start_time:parseInt(l),end_time:parseInt(u),frozen_supply:[{frozen_amount:parseInt(p),frozen_days:parseInt(m)}]};[`name`,`abbr`,`description`,`url`].forEach(e=>{_[e]||delete _[e]}),parseInt(p)>0||delete _.frozen_supply,d&&!isNaN(parseInt(d))&&parseInt(d)>=0&&(_.free_asset_net_limit=parseInt(d)),f&&!isNaN(parseInt(f))&&parseInt(f)>=0&&(_.public_free_asset_net_limit=parseInt(f)),g&&!isNaN(parseInt(g))&&(_.precision=parseInt(g)),h&&!isNaN(parseInt(h))&&(_.vote_score=parseInt(h));let v=R7(e);return L7(this.tronWeb,N7.AssetIssueContract,_,e?.permissionId,v)}async createAccount(e,t=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:`account`,type:`address`,value:e},{name:`origin`,type:`address`,value:t}]);let r={owner_address:Z(t),account_address:Z(e)},i=R7(n);return L7(this.tronWeb,N7.AccountCreateContract,r,n?.permissionId,i)}async updateAccount(e,t=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:`Name`,type:`string`,lte:200,gt:0,value:e,msg:`Invalid accountName`},{name:`origin`,type:`address`,value:t}]);let r={account_name:P7(e),owner_address:Z(t)},i=R7(n);return L7(this.tronWeb,N7.AccountUpdateContract,r,n?.permissionId,i)}async setAccountId(e,t=this.tronWeb.defaultAddress.hex,n={}){e&&B6(e)&&e.startsWith(`0x`)&&(e=e.slice(2)),this.validator.notValid([{name:`accountId`,type:`hex`,value:e},{name:`accountId`,type:`string`,lte:32,gte:8,value:e},{name:`origin`,type:`address`,value:t}]);let r={account_id:e,owner_address:Z(t)},i=R7(n);return L7(this.tronWeb,N7.SetAccountIdContract,r,n?.permissionId,i)}async updateToken(e={},t=this.tronWeb.defaultAddress.hex){let{description:n=``,url:r=!1,freeBandwidth:i=0,freeBandwidthLimit:a=0}=e;this.validator.notValid([{name:`token description`,type:`string`,value:n,lte:200},{name:`token url`,type:`url`,value:r},{name:`token url`,type:`string`,value:r,lte:256},{name:`issuer`,type:`address`,value:t}]);let o={owner_address:Z(t),description:P7(n),url:P7(r)};i&&!isNaN(parseInt(i))&&parseInt(i)>=0&&(o.new_limit=parseInt(i)),a&&!isNaN(parseInt(a))&&parseInt(a)>=0&&(o.new_public_limit=parseInt(a));let s=R7(e);return L7(this.tronWeb,N7.UpdateAssetContract,o,e?.permissionId,s)}async sendAsset(e,t=0,n,r=this.tronWeb.defaultAddress.hex,i={}){return this.sendToken(e,t,n,r,i)}async purchaseAsset(e,t,n=0,r=this.tronWeb.defaultAddress.hex,i={}){return this.purchaseToken(e,t,n,r,i)}async createAsset(e,t){return this.createToken(e,t)}async updateAsset(e={},t=this.tronWeb.defaultAddress.hex){return this.updateToken(e,t)}async createProposal(e,t=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:`issuer`,type:`address`,value:t}]);let r=`Invalid proposal parameters provided`;if(!e)throw Error(r);let i=I6(e)?e:[e];for(let e of i)if(!F6(e))throw Error(r);let a={owner_address:Z(t),parameters:i},o=R7(n);return L7(this.tronWeb,N7.ProposalCreateContract,a,n?.permissionId,o)}async deleteProposal(e,t=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:`issuer`,type:`address`,value:t},{name:`proposalID`,type:`integer`,value:e,gte:0}]);let r={owner_address:Z(t),proposal_id:parseInt(e)},i=R7(n);return L7(this.tronWeb,N7.ProposalDeleteContract,r,n?.permissionId,i)}async voteProposal(e,t=!1,n=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:`voter`,type:`address`,value:n},{name:`proposalID`,type:`integer`,value:e,gte:0},{name:`has approval`,type:`boolean`,value:t}]);let i={owner_address:Z(n),proposal_id:parseInt(e),is_add_approval:t},a=R7(r);return L7(this.tronWeb,N7.ProposalApproveContract,i,r?.permissionId,a)}async createTRXExchange(e,t,n,r=this.tronWeb.defaultAddress.hex,i={}){this.validator.notValid([{name:`owner`,type:`address`,value:r},{name:`token name`,type:`not-empty-string`,value:e},{name:`token balance`,type:`positive-integer`,value:t},{name:`trx balance`,type:`positive-integer`,value:n}]);let a={owner_address:Z(r),first_token_id:P7(e),first_token_balance:t,second_token_id:`5f`,second_token_balance:n},o=R7(i);return L7(this.tronWeb,N7.ExchangeCreateContract,a,i?.permissionId,o)}async createTokenExchange(e,t,n,r,i=this.tronWeb.defaultAddress.hex,a={}){this.validator.notValid([{name:`owner`,type:`address`,value:i},{name:`first token name`,type:`not-empty-string`,value:e},{name:`second token name`,type:`not-empty-string`,value:n},{name:`first token balance`,type:`positive-integer`,value:t},{name:`second token balance`,type:`positive-integer`,value:r}]);let o={owner_address:Z(i),first_token_id:P7(e),first_token_balance:t,second_token_id:P7(n),second_token_balance:r},s=R7(a);return L7(this.tronWeb,N7.ExchangeCreateContract,o,a?.permissionId,s)}async injectExchangeTokens(e,t,n,r=this.tronWeb.defaultAddress.hex,i={}){this.validator.notValid([{name:`owner`,type:`address`,value:r},{name:`token name`,type:`not-empty-string`,value:t},{name:`token amount`,type:`integer`,value:n,gte:1},{name:`exchangeID`,type:`integer`,value:e,gte:0}]);let a={owner_address:Z(r),exchange_id:parseInt(e),token_id:P7(t),quant:parseInt(n)},o=R7(i);return L7(this.tronWeb,N7.ExchangeInjectContract,a,i?.permissionId,o)}async withdrawExchangeTokens(e,t,n,r=this.tronWeb.defaultAddress.hex,i={}){this.validator.notValid([{name:`owner`,type:`address`,value:r},{name:`token name`,type:`not-empty-string`,value:t},{name:`token amount`,type:`integer`,value:n,gte:1},{name:`exchangeID`,type:`integer`,value:e,gte:0}]);let a={owner_address:Z(r),exchange_id:parseInt(e),token_id:P7(t),quant:parseInt(n)},o=R7(i);return L7(this.tronWeb,N7.ExchangeWithdrawContract,a,i?.permissionId,o)}async tradeExchangeTokens(e,t,n,r,i=this.tronWeb.defaultAddress.hex,a={}){this.validator.notValid([{name:`owner`,type:`address`,value:i},{name:`token name`,type:`not-empty-string`,value:t},{name:`tokenAmountSold`,type:`integer`,value:n,gte:1},{name:`tokenAmountExpected`,type:`integer`,value:r,gte:1},{name:`exchangeID`,type:`integer`,value:e,gte:0}]);let o={owner_address:Z(i),exchange_id:parseInt(e),token_id:W7.fromAscii(t).replace(/^0x/,``),quant:parseInt(n),expected:parseInt(r)},s=R7(a);return L7(this.tronWeb,N7.ExchangeTransactionContract,o,a?.permissionId,s)}async updateSetting(e,t,n=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:`owner`,type:`address`,value:n},{name:`contract`,type:`address`,value:e},{name:`userFeePercentage`,type:`integer`,value:t,gte:0,lte:100}]);let i={owner_address:Z(n),contract_address:Z(e),consume_user_resource_percent:t},a=R7(r);return L7(this.tronWeb,N7.UpdateSettingContract,i,r?.permissionId,a)}async updateEnergyLimit(e,t=0,n=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:`owner`,type:`address`,value:n},{name:`contract`,type:`address`,value:e},{name:`originEnergyLimit`,type:`integer`,value:t,gte:0,lte:1e7}]);let i={owner_address:Z(n),contract_address:Z(e),origin_energy_limit:t},a=R7(r);return L7(this.tronWeb,N7.UpdateEnergyLimitContract,i,r?.permissionId,a)}checkPermissions(e,t){if(e){if(e.type!==t||!e.permission_name||!B6(e.permission_name)||!U6(e.threshold)||e.threshold<1||!e.keys)return!1;for(let n of e.keys)if(!W7.isAddress(n.address)||!U6(n.weight)||n.weight<1||t===2&&!e.operations)return!1}return!0}async updateAccountPermissions(e=this.tronWeb.defaultAddress.hex,t,n,r,i={}){if(!W7.isAddress(e))throw Error(`Invalid ownerAddress provided`);if(!this.checkPermissions(t,0))throw Error(`Invalid ownerPermissions provided`);if(!this.checkPermissions(n,1))throw Error(`Invalid witnessPermissions provided`);Array.isArray(r)||(r=[r]);for(let e of r)if(!this.checkPermissions(e,2))throw Error(`Invalid activesPermissions provided`);let a={owner_address:Z(e)};if(t){let e=F7(t);`type`in e&&delete e.type,e.keys=e.keys?.map(({address:e,weight:t})=>({address:Z(e),weight:t})),a.owner=e}if(n){let e=F7(n);e.type=`Witness`,e.keys=e.keys.map(({address:e,weight:t})=>({address:Z(e),weight:t})),a.witness=e}if(r){let e=F7(r);e.forEach(e=>{e.type=`Active`}),e.forEach(e=>{e.keys=e.keys.map(({address:e,weight:t})=>({address:Z(e),weight:t}))}),a.actives=e}let o=R7(i);return L7(this.tronWeb,N7.AccountPermissionUpdateContract,a,i?.permissionId,o)}async newTxID(e,t={}){if(t?.txLocal){let t=e.raw_data.contract[0];try{let n=await L7(this.tronWeb,t.type,t.parameter.value,t.Permission_id,{fee_limit:e.raw_data.fee_limit,data:e.raw_data.data,ref_block_bytes:e.raw_data.ref_block_bytes,ref_block_hash:e.raw_data.ref_block_hash,expiration:e.raw_data.expiration,timestamp:e.raw_data.timestamp});return n.signature=e.signature,n.visible=e.visible,n}catch{throw Error(`Error generating a new transaction id.`)}}try{let t=await this.tronWeb.fullNode.request(`wallet/getsignweight`,e,`post`);return typeof e.visible==`boolean`&&(t.transaction.transaction.visible=e.visible),fse(t.transaction.transaction,{...e.raw_data.contract[0].parameter.value,Permission_id:e.raw_data.contract[0].Permission_id},{data:e.raw_data.data,fee_limit:e.raw_data.fee_limit})}catch{throw Error(`Error generating a new transaction id.`)}}async alterTransaction(e,t={}){if(Reflect.has(e,`signature`))throw Error(`You can not extend the expiration of a signed transaction.`);if(t.data){if(t.dataFormat!==`hex`&&!/^0x/.test(t.data)&&(t.data=W7.fromUtf8(t.data)),!H6(t.data)||(t.data=t.data.replace(/^0x/,``),t.data=t.data.padStart(Math.ceil(t.data.length/2)*2,`0`),t.data.length===0))throw Error(`Invalid data provided`);e.raw_data.data=t.data}if(t.extension){if(t.extension=parseInt(t.extension*1e3),isNaN(t.extension)||e.raw_data.expiration+t.extension<=Date.now()+3e3)throw Error(`Invalid extension provided`);e.raw_data.expiration+=t.extension}return await this.newTxID(e,{txLocal:t.txLocal})}async extendExpiration(e,t,n={}){return await this.alterTransaction(e,{extension:t,txLocal:n?.txLocal})}async addUpdateData(e,t,n=`utf8`,r={}){return this.alterTransaction(e,{data:t,dataFormat:n,txLocal:r?.txLocal})}},z7=`TRON Signed Message:
|
|
105
|
-
32`,B7=`Ethereum Signed Message:
|
|
106
|
-
32`,gse=class e{tronWeb;cache;validator;signMessage;sendAsset;send;sendTrx;broadcast;broadcastHex;signTransaction;constructor(e){this.tronWeb=e,this.cache={contracts:{}},this.validator=new M7,this.signMessage=this.sign,this.sendAsset=this.sendToken,this.send=this.sendTransaction,this.sendTrx=this.sendTransaction,this.broadcast=this.sendRawTransaction,this.broadcastHex=this.sendHexTransaction,this.signTransaction=this.sign}_parseToken(e){return{...e,name:this.tronWeb.toUtf8(e.name),abbr:e.abbr&&this.tronWeb.toUtf8(e.abbr),description:e.description&&this.tronWeb.toUtf8(e.description),url:e.url&&this.tronWeb.toUtf8(e.url)}}getCurrentBlock(){return this.tronWeb.fullNode.request(`wallet/getnowblock`)}getConfirmedCurrentBlock(){return this.tronWeb.solidityNode.request(`walletsolidity/getnowblock`)}async getBlock(e=this.tronWeb.defaultBlock){if(e===!1)throw Error(`No block identifier provided`);return e==`earliest`&&(e=0),e==`latest`?this.getCurrentBlock():isNaN(+e)&&u9.isHex(e.toString())?this.getBlockByHash(e):this.getBlockByNumber(e)}async getBlockByHash(e){let t=await this.tronWeb.fullNode.request(`wallet/getblockbyid`,{value:e},`post`);if(!Object.keys(t).length)throw Error(`Block not found`);return t}async getBlockByNumber(e){if(!u9.isInteger(e)||e<0)throw Error(`Invalid block number provided`);return this.tronWeb.fullNode.request(`wallet/getblockbynum`,{num:parseInt(e)},`post`).then(e=>{if(!Object.keys(e).length)throw Error(`Block not found`);return e})}async getBlockTransactionCount(e=this.tronWeb.defaultBlock){let{transactions:t=[]}=await this.getBlock(e);return t.length}async getTransactionFromBlock(e=this.tronWeb.defaultBlock,t){let{transactions:n}=await this.getBlock(e);if(!n)throw Error(`Transaction not found in block`);if(t>=0&&t<n.length)return n[t];throw Error(`Invalid transaction index provided`)}async getTransactionsFromBlock(e=this.tronWeb.defaultBlock){let{transactions:t}=await this.getBlock(e);if(!t)throw Error(`Transaction not found in block`);return t}async getTransaction(e){let t=await this.tronWeb.fullNode.request(`wallet/gettransactionbyid`,{value:e},`post`);if(!Object.keys(t).length)throw Error(`Transaction not found`);return t}async getConfirmedTransaction(e){let t=await this.tronWeb.solidityNode.request(`walletsolidity/gettransactionbyid`,{value:e},`post`);if(!Object.keys(t).length)throw Error(`Transaction not found`);return t}getUnconfirmedTransactionInfo(e){return this.tronWeb.fullNode.request(`wallet/gettransactioninfobyid`,{value:e},`post`)}getTransactionInfo(e){return this.tronWeb.solidityNode.request(`walletsolidity/gettransactioninfobyid`,{value:e},`post`)}getTransactionsToAddress(e=this.tronWeb.defaultAddress.hex,t=30,n=0){return this.getTransactionsRelated(Z(e),`to`,t,n)}getTransactionsFromAddress(e=this.tronWeb.defaultAddress.hex,t=30,n=0){return this.getTransactionsRelated(Z(e),`from`,t,n)}async getTransactionsRelated(e=this.tronWeb.defaultAddress.hex,t=`all`,n=30,r=0){if(this.tronWeb.fullnodeSatisfies(`>=4.1.1`))throw Error(`This api is not supported any more`);if(![`to`,`from`,`all`].includes(t))throw Error(`Invalid direction provided: Expected "to", "from" or "all"`);if(t==`all`){let[t,i]=await Promise.all([this.getTransactionsRelated(e,`from`,n,r),this.getTransactionsRelated(e,`to`,n,r)]);return[...t.map(e=>(e.direction=`from`,e)),...i.map(e=>(e.direction=`to`,e))].sort((e,t)=>t.raw_data.timestamp-e.raw_data.timestamp)}if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);if(!u9.isInteger(n)||n<0||r&&n<1)throw Error(`Invalid limit provided`);if(!u9.isInteger(r)||r<0)throw Error(`Invalid offset provided`);return e=Z(e),this.tronWeb.solidityNode.request(`walletextension/gettransactions${t}this`,{account:{address:e},offset:r,limit:n},`post`).then(({transaction:e})=>e)}async getAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return e=Z(e),this.tronWeb.solidityNode.request(`walletsolidity/getaccount`,{address:e},`post`)}getAccountById(e){return this.getAccountInfoById(e,{confirmed:!0})}async getAccountInfoById(e,t){return this.validator.notValid([{name:`accountId`,type:`hex`,value:e},{name:`accountId`,type:`string`,lte:32,gte:8,value:e}]),e.startsWith(`0x`)&&(e=e.slice(2)),this.tronWeb[t.confirmed?`solidityNode`:`fullNode`].request(`wallet${t.confirmed?`solidity`:``}/getaccountbyid`,{account_id:e},`post`)}async getBalance(e=this.tronWeb.defaultAddress.hex){let{balance:t=0}=await this.getAccount(e);return t}async getUnconfirmedAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return e=Z(e),this.tronWeb.fullNode.request(`wallet/getaccount`,{address:e},`post`)}getUnconfirmedAccountById(e){return this.getAccountInfoById(e,{confirmed:!1})}async getUnconfirmedBalance(e=this.tronWeb.defaultAddress.hex){let{balance:t=0}=await this.getUnconfirmedAccount(e);return t}async getBandwidth(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return e=Z(e),this.tronWeb.fullNode.request(`wallet/getaccountnet`,{address:e},`post`).then(({freeNetUsed:e=0,freeNetLimit:t=0,NetUsed:n=0,NetLimit:r=0})=>t-e+(r-n))}async getTokensIssuedByAddress(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return e=Z(e),this.tronWeb.fullNode.request(`wallet/getassetissuebyaccount`,{address:e},`post`).then(({assetIssue:e})=>e?e.map(e=>this._parseToken(e)).reduce((e,t)=>(e[t.name]=t,e),{}):{})}async getTokenFromID(e){if(u9.isInteger(e)&&(e=e.toString()),!u9.isString(e)||!e.length)throw Error(`Invalid token ID provided`);return this.tronWeb.fullNode.request(`wallet/getassetissuebyname`,{value:this.tronWeb.fromUtf8(e)},`post`).then(e=>{if(!e.name)throw Error(`Token does not exist`);return this._parseToken(e)})}async listNodes(){let{nodes:e=[]}=await this.tronWeb.fullNode.request(`wallet/listnodes`);return e.map(({address:{host:e,port:t}})=>`${this.tronWeb.toUtf8(e)}:${t}`)}async getBlockRange(e=0,t=30){if(!u9.isInteger(e)||e<0)throw Error(`Invalid start of range provided`);if(!u9.isInteger(t)||t<e)throw Error(`Invalid end of range provided`);if(t+1-e>100)throw Error(`Invalid range size, which should be no more than 100.`);return this.tronWeb.fullNode.request(`wallet/getblockbylimitnext`,{startNum:parseInt(e),endNum:parseInt(t)+1},`post`).then(({block:e=[]})=>e)}async listSuperRepresentatives(){let{witnesses:e=[]}=await this.tronWeb.fullNode.request(`wallet/listwitnesses`);return e}async listTokens(e=0,t=0){if(!u9.isInteger(e)||e<0||t&&e<1)throw Error(`Invalid limit provided`);if(!u9.isInteger(t)||t<0)throw Error(`Invalid offset provided`);return e?this.tronWeb.fullNode.request(`wallet/getpaginatedassetissuelist`,{offset:parseInt(t),limit:parseInt(e)},`post`).then(({assetIssue:e=[]})=>e.map(e=>this._parseToken(e))):this.tronWeb.fullNode.request(`wallet/getassetissuelist`).then(({assetIssue:e=[]})=>e.map(e=>this._parseToken(e)))}async timeUntilNextVoteCycle(){let{num:e=-1}=await this.tronWeb.fullNode.request(`wallet/getnextmaintenancetime`);if(e==-1)throw Error(`Failed to get time until next vote cycle`);return Math.floor(e/1e3)}async getContract(e){if(!this.tronWeb.isAddress(e))throw Error(`Invalid contract address provided`);if(this.cache.contracts[e])return this.cache.contracts[e];e=Z(e);let t=await this.tronWeb.fullNode.request(`wallet/getcontract`,{value:e});if(t.Error)throw Error(`Contract does not exist`);return this.cache.contracts[e]=t,t}ecRecover(t){return e.ecRecover(t)}static ecRecover(e){if(!a9(e))throw Error(`Invalid transaction`);if(!e.signature?.length)throw Error(`Transaction is not signed`);if(e.signature.length===1){let t=z2(e.txID,e.signature[0]);return W7.address.fromHex(t)}return e.signature.map(t=>{let n=z2(e.txID,t);return W7.address.fromHex(n)})}async verifyMessage(t,n,r=this.tronWeb.defaultAddress.base58,i=!0){if(!u9.isHex(t))throw Error(`Expected hex message input`);if(e.verifySignature(t,r,n,i))return!0;throw Error(`Signature does not match`)}static verifySignature(e,t,n,r=!0){e=e.replace(/^0x/,``);let i=[...AG(r?z7:B7),...u9.code.hexStr2byteArray(e)],a=`41`+QX(Lq(new Uint8Array(i)),fX.from(`0x${n.replace(/^0x/,``)}`)).substr(2);return W7.address.fromHex(a)==W7.address.fromHex(t)}async verifyMessageV2(t,n){return e.verifyMessageV2(t,n)}static verifyMessageV2(e,t){return u9.message.verifyMessage(e,t)}verifyTypedData(t,n,r,i,a=this.tronWeb.defaultAddress.base58){if(e.verifyTypedData(t,n,r,i,a))return!0;throw Error(`Signature does not match`)}static verifyTypedData(e,t,n,r,i){let a=`41`+QX(u9.typedData.TypedDataEncoder.hash(e,t,n),fX.from(`0x${r.replace(/^0x/,``)}`)).substr(2);return W7.address.fromHex(a)==W7.address.fromHex(i)}async sign(t,n=this.tronWeb.defaultPrivateKey,r=!0,i=!1){if(u9.isString(t)){if(!u9.isHex(t))throw Error(`Expected hex message input`);return e.signString(t,n,r)}if(!u9.isObject(t))throw Error(`Invalid transaction provided`);if(!i&&t.signature)throw Error(`Transaction is already signed`);if(!i){if(Z(this.tronWeb.address.fromPrivateKey(n)).toLowerCase()!==Z(t.raw_data.contract[0].parameter.value.owner_address))throw Error(`Private key does not match address in transaction`);if(!a9(t))throw Error(`Invalid transaction`)}return u9.crypto.signTransaction(n,t)}static signString(e,t,n=!0){e=e.replace(/^0x/,``);let r=new pX(`0x${t.replace(/^0x/,``)}`),i=[...AG(n?z7:B7),...u9.code.hexStr2byteArray(e)],a=Lq(new Uint8Array(i)),o=r.sign(a);return[`0x`,o.r.substring(2),o.s.substring(2),Number(o.v).toString(16)].join(``)}signMessageV2(t,n=this.tronWeb.defaultPrivateKey){return e.signMessageV2(t,n)}static signMessageV2(e,t){return u9.message.signMessage(e,t)}_signTypedData(t,n,r,i=this.tronWeb.defaultPrivateKey){return e._signTypedData(t,n,r,i)}static _signTypedData(e,t,n,r){return u9.typedData.signTypedData(e,t,n,r)}signTypedData(t,n,r,i=this.tronWeb.defaultPrivateKey){return e.signTypedData(t,n,r,i)}static signTypedData(e,t,n,r){return u9.typedData.signTypedData(e,t,n,r)}async multiSign(e,t=this.tronWeb.defaultPrivateKey,n=0){if(!u9.isObject(e)||!e.raw_data||!e.raw_data.contract)throw Error(`Invalid transaction provided`);if(!e.raw_data.contract[0].Permission_id&&n>0){e.raw_data.contract[0].Permission_id=n;let r=Z(this.tronWeb.address.fromPrivateKey(t)).toLowerCase(),i=await this.getSignWeight(e,n);if(i.result.code===`PERMISSION_ERROR`)throw Error(i.result.message);let a=!1;if(i.permission.keys.map(e=>{e.address===r&&(a=!0)}),!a)throw Error(`Address `+Q6(r)+` has no permission to sign`);if(i.approved_list&&i.approved_list.indexOf(r)!=-1)throw Error(`Address `+Q6(r)+` already sign transaction`);if(i.transaction&&i.transaction.transaction)e=i.transaction.transaction,n>0&&(e.raw_data.contract[0].Permission_id=n);else throw Error(`Invalid transaction provided`)}if(!a9(e))throw Error(`Invalid transaction`);return u9.crypto.signTransaction(t,e)}async getApprovedList(e){if(!u9.isObject(e))throw Error(`Invalid transaction provided`);return this.tronWeb.fullNode.request(`wallet/getapprovedlist`,e,`post`)}async getSignWeight(e,t){if(!u9.isObject(e)||!e.raw_data||!e.raw_data.contract)throw Error(`Invalid transaction provided`);return u9.isInteger(t)?e.raw_data.contract[0].Permission_id=parseInt(t):typeof e.raw_data.contract[0].Permission_id!=`number`&&(e.raw_data.contract[0].Permission_id=0),this.tronWeb.fullNode.request(`wallet/getsignweight`,e,`post`)}async sendRawTransaction(e){if(!u9.isObject(e))throw Error(`Invalid transaction provided`);if(!e.signature||!u9.isArray(e.signature))throw Error(`Transaction is not signed`);return{...await this.tronWeb.fullNode.request(`wallet/broadcasttransaction`,e,`post`),transaction:e}}async sendHexTransaction(e){if(!u9.isHex(e))throw Error(`Invalid hex transaction provided`);let t={transaction:e},n=await this.tronWeb.fullNode.request(`wallet/broadcasthex`,t,`post`);return n.result?{...n,transaction:JSON.parse(n.transaction),hexTransaction:e}:n}async sendTransaction(e,t,n={}){if(typeof n==`string`&&(n={privateKey:n}),!this.tronWeb.isAddress(e))throw Error(`Invalid recipient provided`);if(!u9.isInteger(t)||t<=0)throw Error(`Invalid amount provided`);if(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n},!n.privateKey&&!n.address)throw Error(`Function requires either a private key or address to be set`);let r=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,i=await this.tronWeb.transactionBuilder.sendTrx(e,t,r),a=await this.sign(i,n.privateKey);return await this.sendRawTransaction(a)}async sendToken(e,t,n,r={}){if(typeof r==`string`&&(r={privateKey:r}),!this.tronWeb.isAddress(e))throw Error(`Invalid recipient provided`);if(!u9.isInteger(t)||t<=0)throw Error(`Invalid amount provided`);if(u9.isInteger(n)&&(n=n.toString()),!u9.isString(n))throw Error(`Invalid token ID provided`);if(r={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...r},!r.privateKey&&!r.address)throw Error(`Function requires either a private key or address to be set`);let i=r.privateKey?this.tronWeb.address.fromPrivateKey(r.privateKey):r.address,a=await this.tronWeb.transactionBuilder.sendToken(e,t,n,i),o=await this.sign(a,r.privateKey);return await this.sendRawTransaction(o)}async freezeBalance(e=0,t=3,n=`BANDWIDTH`,r={},i){if(typeof r==`string`&&(r={privateKey:r}),![`BANDWIDTH`,`ENERGY`].includes(n))throw Error(`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`);if(!u9.isInteger(e)||e<=0)throw Error(`Invalid amount provided`);if(!u9.isInteger(t)||t<3)throw Error(`Invalid duration provided, minimum of 3 days`);if(r={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...r},!r.privateKey&&!r.address)throw Error(`Function requires either a private key or address to be set`);let a=r.privateKey?this.tronWeb.address.fromPrivateKey(r.privateKey):r.address,o=await this.tronWeb.transactionBuilder.freezeBalance(e,t,n,a,i),s=await this.sign(o,r.privateKey);return await this.sendRawTransaction(s)}async unfreezeBalance(e=`BANDWIDTH`,t={},n){if(typeof t==`string`&&(t={privateKey:t}),![`BANDWIDTH`,`ENERGY`].includes(e))throw Error(`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`);if(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t},!t.privateKey&&!t.address)throw Error(`Function requires either a private key or address to be set`);let r=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,i=await this.tronWeb.transactionBuilder.unfreezeBalance(e,r,n),a=await this.sign(i,t.privateKey);return await this.sendRawTransaction(a)}async updateAccount(e,t={}){if(typeof t==`string`&&(t={privateKey:t}),!u9.isString(e)||!e.length)throw Error(`Name must be a string`);if(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t},!t.privateKey&&!t.address)throw Error(`Function requires either a private key or address to be set`);let n=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,r=await this.tronWeb.transactionBuilder.updateAccount(e,n),i=await this.sign(r,t.privateKey);return await this.sendRawTransaction(i)}async getProposal(e){if(!u9.isInteger(e)||e<0)throw Error(`Invalid proposalID provided`);return this.tronWeb.fullNode.request(`wallet/getproposalbyid`,{id:parseInt(e)},`post`)}async listProposals(){let{proposals:e=[]}=await this.tronWeb.fullNode.request(`wallet/listproposals`,{},`post`);return e}async getChainParameters(){let{chainParameter:e=[]}=await this.tronWeb.fullNode.request(`wallet/getchainparameters`,{},`post`);return e}async getAccountResources(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return this.tronWeb.fullNode.request(`wallet/getaccountresource`,{address:Z(e)},`post`)}async getDelegatedResourceV2(e=this.tronWeb.defaultAddress.hex,t=this.tronWeb.defaultAddress.hex,n={confirmed:!0}){if(!this.tronWeb.isAddress(e)||!this.tronWeb.isAddress(t))throw Error(`Invalid address provided`);return this.tronWeb[n.confirmed?`solidityNode`:`fullNode`].request(`wallet${n.confirmed?`solidity`:``}/getdelegatedresourcev2`,{fromAddress:Z(e),toAddress:Z(t)},`post`)}async getDelegatedResourceAccountIndexV2(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return this.tronWeb[t.confirmed?`solidityNode`:`fullNode`].request(`wallet${t.confirmed?`solidity`:``}/getdelegatedresourceaccountindexv2`,{value:Z(e)},`post`)}async getCanDelegatedMaxSize(e=this.tronWeb.defaultAddress.hex,t=`BANDWIDTH`,n={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return this.validator.notValid([{name:`resource`,type:`resource`,value:t,msg:`Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"`}]),this.tronWeb[n.confirmed?`solidityNode`:`fullNode`].request(`wallet${n.confirmed?`solidity`:``}/getcandelegatedmaxsize`,{owner_address:Z(e),type:+(t===`ENERGY`)},`post`)}async getAvailableUnfreezeCount(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);return this.tronWeb[t.confirmed?`solidityNode`:`fullNode`].request(`wallet${t.confirmed?`solidity`:``}/getavailableunfreezecount`,{owner_address:Z(e)},`post`)}async getCanWithdrawUnfreezeAmount(e=this.tronWeb.defaultAddress.hex,t=Date.now(),n={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw Error(`Invalid address provided`);if(!u9.isInteger(t)||t<0)throw Error(`Invalid timestamp provided`);return this.tronWeb[n.confirmed?`solidityNode`:`fullNode`].request(`wallet${n.confirmed?`solidity`:``}/getcanwithdrawunfreezeamount`,{owner_address:Z(e),timestamp:t},`post`)}async getExchangeByID(e){if(!u9.isInteger(e)||e<0)throw Error(`Invalid exchangeID provided`);return this.tronWeb.fullNode.request(`wallet/getexchangebyid`,{id:e},`post`)}async listExchanges(){return this.tronWeb.fullNode.request(`wallet/listexchanges`,{},`post`).then(({exchanges:e=[]})=>e)}async listExchangesPaginated(e=10,t=0){return this.tronWeb.fullNode.request(`wallet/getpaginatedexchangelist`,{limit:e,offset:t},`post`).then(({exchanges:e=[]})=>e)}async getNodeInfo(){return this.tronWeb.fullNode.request(`wallet/getnodeinfo`,{},`post`)}async getTokenListByName(e){if(u9.isInteger(e)&&(e=e.toString()),!u9.isString(e)||!e.length)throw Error(`Invalid token ID provided`);return this.tronWeb.fullNode.request(`wallet/getassetissuelistbyname`,{value:this.tronWeb.fromUtf8(e)},`post`).then(e=>{if(Array.isArray(e.assetIssue))return e.assetIssue.map(e=>this._parseToken(e));if(!e.name)throw Error(`Token does not exist`);return this._parseToken(e)})}getTokenByID(e){if(u9.isInteger(e)&&(e=e.toString()),!u9.isString(e)||!e.length)throw Error(`Invalid token ID provided`);return this.tronWeb.fullNode.request(`wallet/getassetissuebyid`,{value:e},`post`).then(e=>{if(!e.name)throw Error(`Token does not exist`);return this._parseToken(e)})}async getReward(e,t={}){return t.confirmed=!0,this._getReward(e,t)}async getUnconfirmedReward(e,t={}){return t.confirmed=!1,this._getReward(e,t)}async getBrokerage(e,t={}){return t.confirmed=!0,this._getBrokerage(e,t)}async getUnconfirmedBrokerage(e,t={}){return t.confirmed=!1,this._getBrokerage(e,t)}async _getReward(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:`origin`,type:`address`,value:e}]);let n={address:Z(e)};return this.tronWeb[t.confirmed?`solidityNode`:`fullNode`].request(`wallet${t.confirmed?`solidity`:``}/getReward`,n,`post`).then((e={reward:void 0})=>{if(e.reward===void 0)throw Error(`Not found.`);return e.reward})}async _getBrokerage(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:`origin`,type:`address`,value:e}]);let n={address:Z(e)};return this.tronWeb[t.confirmed?`solidityNode`:`fullNode`].request(`wallet${t.confirmed?`solidity`:``}/getBrokerage`,n,`post`).then((e={})=>{if(e.brokerage===void 0)throw Error(`Not found.`);return e.brokerage})}async getBandwidthPrices(){return this.tronWeb.fullNode.request(`wallet/getbandwidthprices`,{},`post`).then((e={})=>{if(e.prices===void 0)throw Error(`Not found.`);return e.prices})}async getEnergyPrices(){return this.tronWeb.fullNode.request(`wallet/getenergyprices`,{},`post`).then((e={})=>{if(e.prices===void 0)throw Error(`Not found.`);return e.prices})}async getCurrentRefBlockParams(){try{let{block_header:e,blockID:t}=await this.tronWeb.fullNode.request(`wallet/getblock`,{detail:!1},`post`),{number:n,timestamp:r}=e.raw_data;return{ref_block_bytes:n.toString(16).slice(-4).padStart(4,`0`),ref_block_hash:t.slice(16,32),expiration:r+60*1e3,timestamp:r}}catch(e){throw Error(`Unable to get params: ${e.message||e}`)}}async getNowWitnessList(e={}){let{offset:t=0,limit:n=10,visible:r=!1,confirmed:i=!0}=e;this.validator.notValid([{name:`offset`,type:`integer`,gte:0,value:t,msg:`Invalid offset: must be an integer >= 0`},{name:`limit`,type:`integer`,gt:0,value:n,msg:`Invalid limit: must be an integer > 0`},{name:`visible`,type:`boolean`,value:r,msg:`Invalid visible: must be a boolean`}]);let a={offset:Number(t),limit:Number(n),visible:r},o=i?this.tronWeb.solidityNode:this.tronWeb.fullNode,s=`wallet${i?`solidity`:``}/getpaginatednowwitnesslist`,c=await o.request(s,a,`post`);if(c?.Error)throw Error(c.Error);return Array.isArray(c?.witnesses)?c.witnesses:[]}},_se=e=>{if(`stateMutability`in e&&(e.stateMutability=e.stateMutability?e.stateMutability.toLowerCase():`nonpayable`),e.type=e.type?e.type.toLowerCase():``,e.type===`fallback`||e.type===`receive`)return`0x`;let t=new u9.ethersUtils.Interface([e]),n;if(n=e.type===`event`?t.getEvent(e.name):t.getFunction(e.name),n)return n.format(`sighash`);throw Error(`unknown function`)},V7=(e,t)=>d8(e,t),vse=class{tronWeb;contract;abi;name;inputs;outputs;functionSelector;signature;defaultOptions;constructor(e,t){this.tronWeb=e.tronWeb,this.contract=e,this.abi=t,this.name=t.name||t.type,this.inputs=t.inputs||[],this.outputs=[],`outputs`in t&&t.outputs&&(this.outputs=t.outputs),this.functionSelector=_se(t),this.signature=n4(this.functionSelector,!1).slice(0,8),this.defaultOptions={feeLimit:this.tronWeb.feeLimit,callValue:0,shouldPollResponse:!1}}decodeInput(e){let t=JSON.parse(JSON.stringify(this.abi));return t.outputs=t.inputs,V7(t,`0x`+e)}onMethod(...e){let t=``;return this.abi&&!/event/i.test(this.abi.type)&&(t=u8(this.abi,e)),{call:async(e={})=>(e={...e,rawParameter:t},await this._call([],[],e)),send:async(e={},n=this.tronWeb.defaultPrivateKey)=>(e={...e,rawParameter:t},await this._send([],[],e,n))}}async _call(e,t,n={}){if(e.length!==t.length)throw Error(`Invalid argument count provided`);if(!this.contract.address)throw Error(`Smart contract is missing address`);if(!this.contract.deployed)throw Error(`Calling smart contracts requires you to load the contract first`);if(`stateMutability`in this.abi){let{stateMutability:e}=this.abi;if(e&&![`pure`,`view`].includes(e.toLowerCase()))throw Error(`Methods with state mutability "${e}" must use send()`)}n={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...n,_isConstant:!0};let r=t.map((t,n)=>({type:e[n],value:t})),i=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,n,r,n.from?this.tronWeb.address.toHex(n.from):void 0);if(!u9.hasProperty(i,`constant_result`))throw Error(`Failed to execute`);let a=i.constant_result[0].length;if(a===0||a%64==8){let e=`The call has been reverted or has thrown an error.`;if(a!==0){e+=` Error message: `;let t=``,n=i.constant_result[0].substring(8);for(let e=0;e<a-8;e+=64)t+=this.tronWeb.toUtf8(n.substring(e,e+64));e+=t.replace(/(\u0000|\u000b|\f)+/g,` `).replace(/ +/g,` `).replace(/\s+$/g,``)}throw Error(e)}let o=V7(this.abi,`0x`+i.constant_result[0]);return o.length===1&&Object.keys(o).length===1?o[0]:o}async _send(e,t,n={},r=this.tronWeb.defaultPrivateKey){if(e.length!==t.length)throw Error(`Invalid argument count provided`);if(!this.contract.address)throw Error(`Smart contract is missing address`);if(!this.contract.deployed)throw Error(`Calling smart contracts requires you to load the contract first`);let{stateMutability:i}=this.abi;if([`pure`,`view`].includes(i.toLowerCase()))throw Error(`Methods with state mutability "${i}" must use call()`);[`payable`].includes(i.toLowerCase())||(n.callValue=0),n={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...n};let a=t.map((t,n)=>({type:e[n],value:t})),o=r?this.tronWeb.address.fromPrivateKey(r):this.tronWeb.defaultAddress.base58,s=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,n,a,this.tronWeb.address.toHex(o));if(!s.result||!s.result.result)throw Error(`Unknown error: `+JSON.stringify(s,null,2));let c=await this.tronWeb.trx.sign(s.transaction,r);if(!c.signature)throw Error(r?`Invalid private key provided`:`Transaction was not signed properly`);let l=await this.tronWeb.trx.sendRawTransaction(c);if(l.code){let e={error:l.code,message:l.code};l.message&&(e.message=this.tronWeb.toUtf8(l.message));let t=Error(e.message);throw t.error=l.code,t}if(!n.shouldPollResponse)return c.txID;let u=async e=>{if(e===(n.pollTimes||20)){let e=Error(`Cannot find result in solidity node`);throw e.error=`Cannot find result in solidity node`,e.transaction=c,e}let t=await this.tronWeb.trx.getTransactionInfo(c.txID);if(!Object.keys(t).length)return await new Promise(e=>setTimeout(e,3e3)),u(e+1);if(t.result&&t.result===`FAILED`){let e=Error(this.tronWeb.toUtf8(t.resMessage));throw e.error=this.tronWeb.toUtf8(t.resMessage),e.transaction=c,e.output=t,e}if(!u9.hasProperty(t,`contractResult`)){let e=Error(`Failed to execute: `+JSON.stringify(t,null,2));throw e.error=`Failed to execute: `+JSON.stringify(t,null,2),e.transaction=c,e.output=t,e}if(n.rawResponse)return t;let r=V7(this.abi,`0x`+t.contractResult[0]);return r.length===1&&Object.keys(r).length===1&&(r=r[0]),n.keepTxID?[c.txID,r]:r};return u(0)}},yse=class{tronWeb;abi;address;eventListener;bytecode;deployed;lastBlock;methods;methodInstances;props;constructor(e,t=[],n){if(!e||!(e instanceof W7))throw Error(`Expected instance of TronWeb`);this.tronWeb=e,this.address=n,this.abi=t,this.eventListener=!1,this.bytecode=!1,this.deployed=!1,this.lastBlock=!1,this.methods={},this.methodInstances={},this.props=[],u9.address.isAddress(n)?this.deployed=!0:this.address=!1,this.loadAbi(t)}hasProperty(e){return this.hasOwnProperty(e)||this.__proto__.hasOwnProperty(e)}loadAbi(e){this.abi=e,this.methods={},this.props.forEach(e=>delete this[e]),e.forEach(e=>{if(!e.type||[`constructor`,`error`].includes(e.type.toLowerCase()))return;let t=new vse(this,e),n=t.onMethod.bind(t),{name:r,functionSelector:i,signature:a}=t,o=r,s=i,c=a;this.methods[r]=n,this.methods[i]=n,this.methods[a]=n,this.methodInstances[o]=t,this.methodInstances[s]=t,this.methodInstances[c]=t,this.hasProperty(r)||(this[r]=n,this.props.push(r)),this.hasProperty(i)||(this[i]=n,this.props.push(i)),this.hasProperty(a)||(this[a]=n,this.props.push(a))})}decodeInput(e){let t=e.substring(0,8),n=e.substring(8);if(!this.methodInstances[t])throw Error(`Contract method `+t+` not found`);return{name:this.methodInstances[t].name,params:this.methodInstances[t].decodeInput(n)}}async new(e,t=this.tronWeb.defaultPrivateKey){let n=this.tronWeb.address.fromPrivateKey(t),r=await this.tronWeb.transactionBuilder.createSmartContract(e,n),i=await this.tronWeb.trx.sign(r,t),a=await this.tronWeb.trx.sendRawTransaction(i);if(a.code)throw{error:a.code,message:this.tronWeb.toUtf8(a.message)};await u9.sleep(3e3);let o=i.raw_data.contract[0].parameter.value.new_contract.abi.entrys||[];return this.tronWeb.contract(o,i.contract_address)}async at(e){try{let t=await this.tronWeb.trx.getContract(e);if(!t.contract_address)throw Error(`Unknown error: `+JSON.stringify(t,null,2));return this.address=t.contract_address,this.bytecode=t.bytecode,this.deployed=!0,this.loadAbi(t.abi&&t.abi.entrys?t.abi.entrys:[]),this}catch(e){throw e.toString().includes(`does not exist`)?Error(`Contract has not been deployed on the network`):Error(e)}}},bse=class{tronWeb;pluginNoOverride;disablePlugins;constructor(e,t={}){if(!e||!(e instanceof W7))throw Error(`Expected instance of TronWeb`);this.tronWeb=e,this.pluginNoOverride=[`register`],this.disablePlugins=!!t.disablePlugins}register(e,t){let n={requires:`0.0.0`,components:{}},r={libs:[],plugged:[],skipped:[],error:void 0};if(this.disablePlugins)return r.error=`This instance of TronWeb has plugins disabled.`,r;let i=new e(this.tronWeb);if(u9.isFunction(i.pluginInterface)&&(n=i.pluginInterface(t)),j7.default.satisfies(W7.version,n.requires))if(n.fullClass){let t=i.constructor.name,n=t.substring(0,1).toLowerCase()+t.substring(1);t!==n&&(Object.assign(W7,{[t]:e}),Object.assign(this.tronWeb,{[n]:i}),r.libs.push(t))}else for(let e in n.components){if(!this.tronWeb.hasOwnProperty(e))continue;let t=n.components[e],i=this.tronWeb[e].pluginNoOverride||[];for(let n in t){if(n===`constructor`||this.tronWeb[e][n]&&(i.includes(n)||/^_/.test(n))){r.skipped.push(n);continue}this.tronWeb[e][n]=t[n].bind(this.tronWeb[e]),r.plugged.push(n)}}else throw Error(`The plugin is not compatible with this version of TronWeb`);return r}},xse=class{tronWeb;constructor(e){if(!e||!(e instanceof W7))throw Error(`Expected instance of TronWeb`);this.tronWeb=e}setServer(e,t=`healthcheck`){if(!e)return this.tronWeb.eventServer=void 0;if(u9.isString(e)&&(e=new l7(e)),!this.tronWeb.isValidProvider(e))throw Error(`Invalid event server provided`);this.tronWeb.eventServer=e,this.tronWeb.eventServer.isConnected=()=>this.tronWeb.eventServer.request(t).then(()=>!0).catch(()=>!1)}async getEventsByContractAddress(e,t={}){let n=Object.assign({limit:20},t),{eventName:r,blockNumber:i,onlyUnconfirmed:a,onlyConfirmed:o,minBlockTimestamp:s,maxBlockTimestamp:c,orderBy:l,fingerprint:u}=n,{limit:d}=n;if(!this.tronWeb.eventServer)throw Error(`No event server configured`);if(!this.tronWeb.isAddress(e))throw Error(`Invalid contract address provided`);if(s!==void 0&&!u9.isInteger(s))throw Error(`Invalid minBlockTimestamp provided`);if(c!==void 0&&!u9.isInteger(c))throw Error(`Invalid maxBlockTimestamp provided`);u9.isInteger(d)&&d>200&&(console.warn(`Defaulting to maximum accepted limit: 200`),d=200);let f={};r&&(f.event_name=r),i&&(f.block_number=i),typeof a==`boolean`&&(f.only_unconfirmed=a),typeof o==`boolean`&&(f.only_confirmed=o),s&&(f.min_block_timestamp=s),c&&(f.max_block_timestamp=c),l&&(f.order_by=l),u&&(f.fingerprint=u),u9.isInteger(d)&&(f.limit=d);let p=await this.tronWeb.eventServer.request(`v1/contracts/${this.tronWeb.address.fromHex(e)}/events?${new URLSearchParams(f).toString()}`);if(p.success)return p;throw Error(p.error)}async getEventsByTransactionID(e,t={}){if(!this.tronWeb.eventServer)throw Error(`No event server configured`);let n={};return typeof t.only_unconfirmed==`boolean`&&(n.only_unconfirmed=t.only_unconfirmed),typeof t.only_confirmed==`boolean`&&(n.only_confirmed=t.only_confirmed),this.tronWeb.eventServer.request(`v1/transactions/${e}/events?${new URLSearchParams(n).toString()}`).then(e=>{if(e.success)return e;throw Error(JSON.parse(e.error).message)})}async getEventsByBlockNumber(e,t={}){if(!this.tronWeb.eventServer)throw Error(`No event server configured`);let n={};return typeof t.only_confirmed==`boolean`&&(n.only_confirmed=t.only_confirmed),t.limit&&(n.limit=t.limit),t.fingerprint&&(n.fingerprint=t.fingerprint),this.tronWeb.eventServer.request(`v1/blocks/${e}/events?${new URLSearchParams(n).toString()}`).then(e=>{if(e.success)return e;throw Error(e.error)})}async getEventsOfLatestBlock(e={}){if(!this.tronWeb.eventServer)throw Error(`No event server configured`);let t={};return typeof e.only_confirmed==`boolean`&&(t.only_confirmed=e.only_confirmed),this.tronWeb.eventServer.request(`v1/blocks/latest/events?${new URLSearchParams(t).toString()}`).then(e=>{if(e.success)return e;throw Error(e.error)})}},H7=`4.7.1`,Sse=15e7,Cse=`6.2.2`;function U7(e){return!!e&&typeof e==`object`&&(!!e.fullNode||!!e.fullHost)}var W7=class e extends zoe{providers;BigNumber;transactionBuilder;trx;plugin;event;version;static version=Cse;utils;defaultBlock;defaultPrivateKey;defaultAddress;fullnodeVersion;feeLimit;fullNode;solidityNode;eventServer;constructor(t,n=``,r,i=``){super();let a,o=!1,s=!1;U7(t)?(a=t.fullNode||t.fullHost,n=t.solidityNode||t.fullHost,r=t.eventServer||t.fullHost,o=t.headers||!1,s=t.eventHeaders||o,i=t.privateKey):a=t,u9.isString(a)&&(a=new u7.HttpProvider(a)),u9.isString(n)&&(n=new u7.HttpProvider(n)),u9.isString(r)&&(r=new u7.HttpProvider(r)),this.event=new xse(this),this.transactionBuilder=new hse(this),this.trx=new gse(this),this.plugin=new bse(this,{disablePlugins:U7(t)?t.disablePlugins:!1}),this.utils=u9,this.setFullNode(a),this.setSolidityNode(n),this.setEventServer(r),this.providers=u7,this.BigNumber=D4,this.defaultBlock=!1,this.defaultPrivateKey=!1,this.defaultAddress={hex:!1,base58:!1},this.version=e.version,this.sha3=e.sha3,this.fromUtf8=e.fromUtf8,this.address=e.address,this.toAscii=e.toAscii,this.toUtf8=e.toUtf8,this.isAddress=e.isAddress,this.fromAscii=e.fromAscii,this.toHex=e.toHex,this.toBigNumber=e.toBigNumber,this.toDecimal=e.toDecimal,this.fromDecimal=e.fromDecimal,this.toSun=e.toSun,this.fromSun=e.fromSun,this.createAccount=e.createAccount,this.createRandom=e.createRandom,this.fromMnemonic=e.fromMnemonic,i&&this.setPrivateKey(i),this.fullnodeVersion=H7,this.feeLimit=Sse,o&&this.setFullNodeHeader(o),s&&this.setEventHeader(s)}async getFullnodeVersion(){try{let e=await this.trx.getNodeInfo();this.fullnodeVersion=e.configNodeInfo.codeVersion,this.fullnodeVersion.split(`.`).length===2&&(this.fullnodeVersion+=`.0`)}catch{this.fullnodeVersion=H7}}setDefaultBlock(e=!1){if([!1,`latest`,`earliest`,0].includes(e))return this.defaultBlock=e;if(!u9.isInteger(e)||!e)throw Error(`Invalid block ID provided`);return this.defaultBlock=Math.abs(e)}setPrivateKey(t){try{this.setAddress(e.address.fromPrivateKey(t))}catch{throw Error(`Invalid private key provided`)}this.defaultPrivateKey=t}setAddress(t){if(!e.isAddress(t))throw Error(`Invalid address provided`);let n=e.address.toHex(t),r=e.address.fromHex(t);this.defaultPrivateKey&&e.address.fromPrivateKey(this.defaultPrivateKey)!==r&&(this.defaultPrivateKey=!1),this.defaultAddress={hex:n,base58:r},this.emit(`addressChanged`,{hex:n,base58:r})}fullnodeSatisfies(e){return j7.default.satisfies(this.fullnodeVersion,e)}isValidProvider(e){return Object.values(u7).some(t=>e instanceof t)}setFullNode(e){if(B6(e)&&(e=new u7.HttpProvider(e)),!this.isValidProvider(e))throw Error(`Invalid full node provided`);this.fullNode=e,this.fullNode.setStatusPage(`wallet/getnowblock`)}setSolidityNode(e){if(u9.isString(e)&&(e=new u7.HttpProvider(e)),!this.isValidProvider(e))throw Error(`Invalid solidity node provided`);this.solidityNode=e,this.solidityNode.setStatusPage(`walletsolidity/getnowblock`)}setEventServer(e,t){this.event.setServer(e,t)}setHeader(e={}){let t=new u7.HttpProvider(this.fullNode.host,3e4,``,``,e),n=new u7.HttpProvider(this.solidityNode.host,3e4,``,``,e),r=new u7.HttpProvider(this.eventServer.host,3e4,``,``,e);this.setFullNode(t),this.setSolidityNode(n),this.setEventServer(r)}setFullNodeHeader(e={}){let t=new u7.HttpProvider(this.fullNode.host,3e4,``,``,e),n=new u7.HttpProvider(this.solidityNode.host,3e4,``,``,e);this.setFullNode(t),this.setSolidityNode(n)}setEventHeader(e={}){let t=new u7.HttpProvider(this.eventServer.host,3e4,``,``,e);this.setEventServer(t)}currentProviders(){return{fullNode:this.fullNode,solidityNode:this.solidityNode,eventServer:this.eventServer}}currentProvider(){return this.currentProviders()}getEventResult(...e){return this.event.getEventsByContractAddress(...e)}getEventByTransactionID(...e){return this.event.getEventsByTransactionID(...e)}contract(e=[],t){return new yse(this,e,t)}address;static get address(){return{fromHex(e){return Q6(e)},toHex(e){return Z(e)},toChecksumAddress(e){return e8(e)},isChecksumAddress(e){return t8(e)},fromPrivateKey(e,t=!1){return n8(e,t)}}}sha3;static sha3(e,t=!0){return(t?`0x`:``)+Lq(Buffer.from(e,`utf-8`)).toString().substring(2)}toHex;static toHex(t){if(u9.isBoolean(t))return e.fromDecimal(+t);if(u9.isBigNumber(t))return e.fromDecimal(t);if(typeof t==`object`)return e.fromUtf8(JSON.stringify(t));if(u9.isString(t)){if(/^(-|)0x/.test(t))return t;if(!isFinite(t)||/^\s*$/.test(t))return e.fromUtf8(t)}let n=e.fromDecimal(t);if(n===`0xNaN`)throw Error(`The passed value is not convertible to a hex string`);return n}toUtf8;static toUtf8(e){if(u9.isHex(e))return e=e.replace(/^0x/,``),Buffer.from(e,`hex`).toString(`utf8`);throw Error(`The passed value is not a valid hex string`)}fromUtf8;static fromUtf8(e){if(!u9.isString(e))throw Error(`The passed value is not a valid utf-8 string`);return`0x`+Buffer.from(e,`utf8`).toString(`hex`)}toAscii;static toAscii(e){if(u9.isHex(e)){let t=``,n=0,r=e.length;for(e.substring(0,2)===`0x`&&(n=2);n<r;n+=2){let r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t}else throw Error(`The passed value is not a valid hex string`)}fromAscii;static fromAscii(e,t){if(!u9.isString(e))throw Error(`The passed value is not a valid utf-8 string`);return`0x`+Buffer.from(e,`ascii`).toString(`hex`).padEnd(t,`0`)}toDecimal;static toDecimal(t){return e.toBigNumber(t).toNumber()}fromDecimal;static fromDecimal(t){let n=e.toBigNumber(t),r=n.toString(16);return n.isLessThan(0)?`-0x`+r.substr(1):`0x`+r}fromSun;static fromSun(t){let n=e.toBigNumber(t).div(1e6);return u9.isBigNumber(t)?n:n.toString(10)}toSun;static toSun(t){let n=e.toBigNumber(t).times(1e6);return u9.isBigNumber(t)?n:n.toString(10)}toBigNumber;static toBigNumber(e=0){return u9.isBigNumber(e)?e:u9.isString(e)&&/^(-|)0x/.test(e)?new D4(e.replace(`0x`,``),16):new D4(e.toString(10),10)}isAddress;static isAddress(e=``){return r8(e)}createAccount;static async createAccount(){return u9.accounts.generateAccount()}createRandom;static createRandom(...e){return u9.accounts.generateRandom(...e)}fromMnemonic;static fromMnemonic(...e){return u9.accounts.generateAccountWithMnemonic(...e)}async isConnected(){return{fullNode:await this.fullNode.isConnected(),solidityNode:await this.solidityNode.isConnected(),eventServer:this.eventServer&&await this.eventServer.isConnected()}}},wse=c({txCheck:()=>a9,txCheckWithArgs:()=>o9,txJsonToPb:()=>t9,txJsonToPbWithArgs:()=>n9,txPbToRawDataHex:()=>i9,txPbToTxID:()=>s9}),{Transaction:G7,Permission:Tse,Key:Ese}=globalThis.TronWebProto,{TransferContract:Dse,FreezeBalanceContract:Ose,UnfreezeBalanceContract:kse,WithdrawBalanceContract:Ase,FreezeBalanceV2Contract:jse,UnfreezeBalanceV2Contract:Mse,CancelAllUnfreezeV2Contract:Nse,WithdrawExpireUnfreezeContract:Pse,DelegateResourceContract:Fse,UnDelegateResourceContract:Ise}=globalThis.TronWebProto,{TransferAssetContract:Lse,ParticipateAssetIssueContract:Rse,AssetIssueContract:K7,UpdateAssetContract:zse}=globalThis.TronWebProto,{TriggerSmartContract:Bse,ClearABIContract:Vse,UpdateEnergyLimitContract:Hse,UpdateSettingContract:Use,CreateSmartContract:Wse,SmartContract:q7}=globalThis.TronWebProto,{ResourceCode:J7}=globalThis.TronWebProto,{WitnessCreateContract:Gse,VoteWitnessContract:Y7}=globalThis.TronWebProto,{UpdateBrokerageContract:Kse}=globalThis.TronWebProto,{AccountCreateContract:qse,AccountUpdateContract:Jse,SetAccountIdContract:Yse,AccountPermissionUpdateContract:Xse}=globalThis.TronWebProto,{ProposalCreateContract:Zse,ProposalDeleteContract:Qse,ProposalApproveContract:$se}=globalThis.TronWebProto,{ExchangeCreateContract:ece,ExchangeInjectContract:tce,ExchangeWithdrawContract:nce,ExchangeTransactionContract:rce}=globalThis.TronWebProto,X7=e=>!e||e.length===0?new Uint8Array([]):new Uint8Array(W7.address.toHex(e).match(/.{1,2}/g).map(e=>parseInt(e,16))),Z7=e=>!e||e.length===0?new Uint8Array([]):new Uint8Array((H6(e)?e:W7.toHex(e)).replace(/^0x/,``).match(/.{1,2}/g).map(e=>parseInt(e,16))),Q7=(e,t)=>Z7(t?W7.fromUtf8(e).replace(/^0x/,``):e.replace(/^0x/,``)),ice=(e,t=!0)=>(t?`0x`:``)+Lq(Buffer.from(e,`utf-8`)).toString().substring(2),$7=(e,t,n,r)=>{let i=new Roe.default.Any;i.pack(e.serializeBinary(),`protocol.`+n);let a=new G7.Contract;a.setType(t),a.setParameter(i),r&&a.setPermissionId(r);let o=new G7.raw;o.addContract(a);let s=new G7;return s.setRawData(o),s},ace=(e,t)=>{let{to_address:n,owner_address:r,amount:i}=e,a=new Dse;return a.setToAddress(X7(n)),a.setOwnerAddress(X7(r)),a.setAmount(i),$7(a,G7.Contract.ContractType.TRANSFERCONTRACT,`TransferContract`,t.Permission_id)},oce=(e,t)=>{let{to_address:n,owner_address:r,amount:i,asset_name:a}=e,o=new Lse;return o.setToAddress(X7(n)),o.setOwnerAddress(X7(r)),o.setAssetName(Q7(a,t.visible)),o.setAmount(i),$7(o,G7.Contract.ContractType.TRANSFERASSETCONTRACT,`TransferAssetContract`,t.Permission_id)},sce=(e,t)=>{let n=new Rse;return n.setToAddress(X7(e.to_address)),n.setOwnerAddress(X7(e.owner_address)),n.setAssetName(Q7(e.asset_name,t.visible)),n.setAmount(e.amount),$7(n,G7.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT,`ParticipateAssetIssueContract`,t.Permission_id)},cce=(e,t)=>{let n=new Bse,{owner_address:r,contract_address:i,parameter:a=``,function_selector:o,call_value:s,call_token_value:c,token_id:l,data:u}=e;if(n.setOwnerAddress(X7(r)),n.setContractAddress(X7(i)),n.setCallValue(s),u)n.setData(Z7(u));else if(o){let e=ice(o).substring(2,10)+a;n.setData(Z7(e))}return l&&n.setTokenId(l),c&&n.setCallTokenValue(c),$7(n,G7.Contract.ContractType.TRIGGERSMARTCONTRACT,`TriggerSmartContract`,t.Permission_id)},lce=(e,t)=>{let n=new Ose,{owner_address:r,frozen_balance:i,frozen_duration:a,resource:o,receiver_address:s}=e;return n.setOwnerAddress(X7(r)),n.setFrozenBalance(i),n.setFrozenDuration(a),o&&n.setResource(J7[o]),s&&n.setReceiverAddress(X7(s)),$7(n,G7.Contract.ContractType.FREEZEBALANCECONTRACT,`FreezeBalanceContract`,t.Permission_id)},uce=(e,t)=>{let n=new kse,{owner_address:r,resource:i,receiver_address:a}=e;return n.setOwnerAddress(X7(r)),i&&n.setResource(J7[i]),a&&n.setReceiverAddress(X7(a)),$7(n,G7.Contract.ContractType.UNFREEZEBALANCECONTRACT,`UnfreezeBalanceContract`,t.Permission_id)},dce=(e,t)=>{let n=new Ase,{owner_address:r}=e;return n.setOwnerAddress(X7(r)),$7(n,G7.Contract.ContractType.WITHDRAWBALANCECONTRACT,`WithdrawBalanceContract`,t.Permission_id)},fce=(e,t)=>{let n=new jse,{owner_address:r,frozen_balance:i,resource:a}=e;return n.setOwnerAddress(X7(r)),n.setFrozenBalance(i),n.setResource(J7[a]),$7(n,G7.Contract.ContractType.FREEZEBALANCEV2CONTRACT,`FreezeBalanceV2Contract`,t.Permission_id)},pce=(e,t)=>{let n=new Nse,{owner_address:r}=e;return n.setOwnerAddress(X7(r)),$7(n,G7.Contract.ContractType.CANCELALLUNFREEZEV2CONTRACT,`CancelAllUnfreezeV2Contract`,t.Permission_id)},mce=(e,t)=>{let n=new Mse,{owner_address:r,unfreeze_balance:i,resource:a}=e;return n.setOwnerAddress(X7(r)),n.setUnfreezeBalance(i),n.setResource(J7[a]),$7(n,G7.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT,`UnfreezeBalanceV2Contract`,t.Permission_id)},hce=(e,t)=>{let n=new Fse,{owner_address:r,receiver_address:i,balance:a,resource:o,lock:s=!1,lock_period:c}=e;return n.setOwnerAddress(X7(r)),n.setBalance(a),n.setResource(J7[o]),n.setLock(s),n.setLockPeriod(c),n.setReceiverAddress(X7(i)),$7(n,G7.Contract.ContractType.DELEGATERESOURCECONTRACT,`DelegateResourceContract`,t.Permission_id)},gce=(e,t)=>{let n=new Ise,{owner_address:r,receiver_address:i,balance:a,resource:o}=e;return n.setOwnerAddress(X7(r)),n.setBalance(a),n.setResource(J7[o]),n.setReceiverAddress(X7(i)),$7(n,G7.Contract.ContractType.UNDELEGATERESOURCECONTRACT,`UnDelegateResourceContract`,t.Permission_id)},_ce=(e,t)=>{let n=new Pse,{owner_address:r}=e;return n.setOwnerAddress(X7(r)),$7(n,G7.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT,`WithdrawExpireUnfreezeContract`,t.Permission_id)},vce=(e,t)=>{let n=new Gse,{owner_address:r,url:i}=e;return n.setOwnerAddress(X7(r)),n.setUrl(Z7(i.replace(/^0x/,``))),$7(n,G7.Contract.ContractType.WITNESSCREATECONTRACT,`WitnessCreateContract`,t.Permission_id)},yce=(e,t)=>{let n=new Y7,{owner_address:r,votes:i}=e;return n.setOwnerAddress(X7(r)),i.forEach(e=>{let t=new Y7.Vote,{vote_address:r,vote_count:i}=e;t.setVoteAddress(X7(r));let a=parseInt(i);t.setVoteCount(a),n.addVotes(t)}),$7(n,G7.Contract.ContractType.VOTEWITNESSCONTRACT,`VoteWitnessContract`,t.Permission_id)},bce=(e,t)=>{let n=e?.new_contract?{owner_address:e.owner_address,call_token_value:e.call_token_value,token_id:e.token_id,...e.new_contract}:e,{owner_address:r,consume_user_resource_percent:i,origin_energy_limit:a,abi:o,bytecode:s=``,parameter:c=``,call_value:l,call_token_value:u,token_id:d,name:f}=n,{origin_address:p}=n,m=new Wse;m.setOwnerAddress(X7(r)),d&&m.setTokenId(d),u&&m.setCallTokenValue(u);let h=new q7;if(o){let e;e=typeof o==`string`?JSON.parse(o):o?.entrys||[];let t=new q7.ABI,n=e=>{let t=new q7.ABI.Entry.Param,{indexed:n,name:r,type:i}=e;return n===!0&&t.setIndexed(!0),t.setName(r),t.setType(i),t},r=e.map(e=>{let{anonymous:t,constant:r,name:i,inputs:a,outputs:o,type:s,payable:c,stateMutability:l}=e,u=new q7.ABI.Entry;return u.setAnonymous(t),u.setConstant(r),u.setName(i),a&&u.setInputsList(a.map(e=>n(e))),o&&u.setOutputsList(o.map(e=>n(e))),s&&u.setType(q7.ABI.Entry.EntryType[s.toUpperCase()]),u.setPayable(c),l&&u.setStatemutability(q7.ABI.Entry.StateMutabilityType[l.toUpperCase()]),u});t.setEntrysList(r),h.setAbi(t)}if(l&&h.setCallValue(l),h.setConsumeUserResourcePercent(i),h.setOriginEnergyLimit(a),p||=r,h.setOriginAddress(X7(p)),s){let e=s.replace(/^0x/,``)+c.replace(/^0x/,``);h.setBytecode(Z7(e))}return h.setName(f),m.setNewContract(h),$7(m,G7.Contract.ContractType.CREATESMARTCONTRACT,`CreateSmartContract`,t.Permission_id)},xce=(e,t)=>{let{contract_address:n,owner_address:r}=e,i=new Vse;return i.setOwnerAddress(X7(r)),i.setContractAddress(X7(n)),$7(i,G7.Contract.ContractType.CLEARABICONTRACT,`ClearABIContract`,t.Permission_id)},Sce=(e,t)=>{let{brokerage:n,owner_address:r}=e,i=new Kse;return i.setOwnerAddress(X7(r)),i.setBrokerage(n),$7(i,G7.Contract.ContractType.UPDATEBROKERAGECONTRACT,`UpdateBrokerageContract`,t.Permission_id)},Cce=(e,t)=>{let{owner_address:n,name:r,abbr:i,description:a,url:o,total_supply:s,trx_num:c,num:l,start_time:u,end_time:d,precision:f,free_asset_net_limit:p,public_free_asset_net_limit:m,public_free_asset_net_usage:h=0,public_latest_free_net_time:g=0,vote_score:_=0,frozen_supply:v}=e,y=new K7;if(y.setOwnerAddress(X7(n)),r&&y.setName(Z7(r.replace(/^0x/,``))),i&&y.setAbbr(Z7(i.replace(/^0x/,``))),y.setTotalSupply(s),y.setNum(l),y.setEndTime(d),y.setStartTime(u),y.setTrxNum(c),y.setVoteScore(_),f&&y.setPrecision(f),g&&y.setPublicLatestFreeNetTime(g),a&&y.setDescription(Z7(a.replace(/^0x/,``))),o&&y.setUrl(Z7(o.replace(/^0x/,``))),y.setPublicFreeAssetNetUsage(h),y.setFreeAssetNetLimit(p),y.setPublicFreeAssetNetLimit(m),v){let e=new K7.FrozenSupply;e.setFrozenAmount(v.length?v[0].frozen_amount:v.frozen_amount),e.setFrozenDays(v.length?v[0].frozen_days:v.frozen_days),y.addFrozenSupply(e)}return $7(y,G7.Contract.ContractType.ASSETISSUECONTRACT,`AssetIssueContract`,t.Permission_id)},wce=(e,t)=>{let n=new qse,{account_address:r,owner_address:i}=e;return n.setOwnerAddress(X7(i)),n.setAccountAddress(X7(r.replace(/^0x/,``))),$7(n,G7.Contract.ContractType.ACCOUNTCREATECONTRACT,`AccountCreateContract`,t.Permission_id)},Tce=(e,t)=>{let n=new Jse,{account_name:r,owner_address:i}=e;return n.setOwnerAddress(X7(i)),n.setAccountName(Z7(r.replace(/^0x/,``))),$7(n,G7.Contract.ContractType.ACCOUNTUPDATECONTRACT,`AccountUpdateContract`,t.Permission_id)},Ece=(e,t)=>{let n=new Yse,{account_id:r,owner_address:i}=e;return n.setOwnerAddress(X7(i)),n.setAccountId(Z7(r.replace(/^0x/,``))),$7(n,G7.Contract.ContractType.SETACCOUNTIDCONTRACT,`SetAccountIdContract`,t.Permission_id)},Dce=(e,t)=>{let n=new Zse,{owner_address:r,parameters:i}=e;return n.setOwnerAddress(X7(r)),i.forEach(e=>{n.getParametersMap().set(e.key,e.value)}),$7(n,G7.Contract.ContractType.PROPOSALCREATECONTRACT,`ProposalCreateContract`,t.Permission_id)},Oce=(e,t)=>{let n=new Qse,{owner_address:r,proposal_id:i}=e;return n.setOwnerAddress(X7(r)),n.setProposalId(i),$7(n,G7.Contract.ContractType.PROPOSALDELETECONTRACT,`ProposalDeleteContract`,t.Permission_id)},kce=(e,t)=>{let n=new $se,{owner_address:r,proposal_id:i,is_add_approval:a}=e;return n.setOwnerAddress(X7(r)),n.setProposalId(i),n.setIsAddApproval(a),$7(n,G7.Contract.ContractType.PROPOSALAPPROVECONTRACT,`ProposalApproveContract`,t.Permission_id)},Ace=(e,t)=>{let n=new ece,{owner_address:r,first_token_id:i,first_token_balance:a,second_token_id:o,second_token_balance:s}=e;return n.setOwnerAddress(X7(r)),n.setFirstTokenId(Q7(i,t.visible)),n.setFirstTokenBalance(a),n.setSecondTokenId(Q7(o,t.visible)),n.setSecondTokenBalance(s),$7(n,G7.Contract.ContractType.EXCHANGECREATECONTRACT,`ExchangeCreateContract`,t.Permission_id)},jce=(e,t)=>{let n=new tce,{owner_address:r,exchange_id:i,token_id:a,quant:o}=e;return n.setOwnerAddress(X7(r)),n.setExchangeId(i),n.setTokenId(Q7(a,t.visible)),n.setQuant(o),$7(n,G7.Contract.ContractType.EXCHANGEINJECTCONTRACT,`ExchangeInjectContract`,t.Permission_id)},Mce=(e,t)=>{let n=new nce,{owner_address:r,exchange_id:i,token_id:a,quant:o}=e;return n.setOwnerAddress(X7(r)),n.setExchangeId(i),n.setTokenId(Q7(a,t.visible)),n.setQuant(o),$7(n,G7.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT,`ExchangeWithdrawContract`,t.Permission_id)},Nce=(e,t)=>{let n=new rce,{owner_address:r,exchange_id:i,token_id:a,quant:o,expected:s}=e;return n.setOwnerAddress(X7(r)),n.setExchangeId(i),n.setTokenId(Q7(a,t.visible)),n.setQuant(o),n.setExpected(s),$7(n,G7.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT,`ExchangeTransactionContract`,t.Permission_id)},Pce=(e,t)=>{let n=new Use,{owner_address:r,contract_address:i,consume_user_resource_percent:a}=e;return n.setOwnerAddress(X7(r)),n.setContractAddress(X7(i)),n.setConsumeUserResourcePercent(a),$7(n,G7.Contract.ContractType.UPDATESETTINGCONTRACT,`UpdateSettingContract`,t.Permission_id)},Fce=(e,t)=>{let n=new Hse,{owner_address:r,contract_address:i,origin_energy_limit:a}=e;return n.setOwnerAddress(X7(r)),n.setContractAddress(X7(i)),n.setOriginEnergyLimit(a),$7(n,G7.Contract.ContractType.UPDATEENERGYLIMITCONTRACT,`UpdateEnergyLimitContract`,t.Permission_id)},Ice=(e,t)=>{let n=new Xse,{owner_address:r,owner:i,witness:a,actives:o}=e;n.setOwnerAddress(X7(r));let s=e=>isNaN(e)?e===`Active`?2:+(e===`Witness`):e,c=e=>{let t=new Tse,{type:n,id:r,permission_name:i,threshold:a,parentId:o,operations:c,keys:l}=e;return t.setType(s(n)),t.setId(r),t.setPermissionName(i),t.setThreshold(a),o&&t.setParentId(o),c&&t.setOperations(Z7(c)),l&&t.setKeysList(l.map(e=>{let t=new Ese;return t.setAddress(X7(e.address)),t.setWeight(e.weight),t})),t};return i&&n.setOwner(c(i)),a&&n.setWitness(c(a)),o&&(Array.isArray(o)?n.setActivesList(o.map(e=>c(e))):n.setActivesList([c(o)])),$7(n,G7.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT,`AccountPermissionUpdateContract`,t.Permission_id)},Lce=(e,t)=>{let n=new zse,{owner_address:r,description:i,url:a,new_limit:o,new_public_limit:s}=e;return n.setOwnerAddress(X7(r)),i&&n.setDescription(Z7(i.replace(/^0x/,``))),a&&n.setUrl(Z7(a.replace(/^0x/,``))),o&&n.setNewLimit(o),s&&n.setNewPublicLimit(s),$7(n,G7.Contract.ContractType.UPDATEASSETCONTRACT,`UpdateAssetContract`,t.Permission_id)},e9=(e,t,n)=>{switch(e.type){case`TransferContract`:return ace(t,n);case`TransferAssetContract`:return oce(t,n);case`ParticipateAssetIssueContract`:return sce(t,n);case`TriggerSmartContract`:return cce(t,n);case`FreezeBalanceContract`:return lce(t,n);case`UnfreezeBalanceContract`:return uce(t,n);case`WithdrawBalanceContract`:return dce(t,n);case`FreezeBalanceV2Contract`:return fce(t,n);case`CancelAllUnfreezeV2Contract`:return pce(t,n);case`UnfreezeBalanceV2Contract`:return mce(t,n);case`DelegateResourceContract`:return hce(t,n);case`UnDelegateResourceContract`:return gce(t,n);case`WithdrawExpireUnfreezeContract`:return _ce(t,n);case`WitnessCreateContract`:return vce(t,n);case`VoteWitnessContract`:return yce(t,n);case`CreateSmartContract`:return bce(t,n);case`ClearABIContract`:return xce(t,n);case`UpdateBrokerageContract`:return Sce(t,n);case`AssetIssueContract`:return Cce(t,n);case`AccountCreateContract`:return wce(t,n);case`AccountUpdateContract`:return Tce(t,n);case`SetAccountIdContract`:return Ece(t,n);case`ProposalCreateContract`:return Dce(t,n);case`ProposalDeleteContract`:return Oce(t,n);case`ProposalApproveContract`:return kce(t,n);case`ExchangeCreateContract`:return Ace(t,n);case`ExchangeInjectContract`:return jce(t,n);case`ExchangeWithdrawContract`:return Mce(t,n);case`ExchangeTransactionContract`:return Nce(t,n);case`UpdateSettingContract`:return Pce(t,n);case`UpdateEnergyLimitContract`:return Fce(t,n);case`AccountPermissionUpdateContract`:return Ice(t,n);case`UpdateAssetContract`:return Lce(t,n);default:throw Error(`Unsupported transaction type: `+e.type)}},t9=e=>{let t=e.raw_data,n=t.contract[0],r=n.parameter.value,i=e9(n,r,{Permission_id:n.Permission_id,visible:e.visible}),a=i.getRawData();return a.setRefBlockBytes(Z7(t.ref_block_bytes)),a.setRefBlockHash(Z7(t.ref_block_hash)),t.data&&a.setData(Z7(t.data)),t.fee_limit&&a.setFeeLimit(t.fee_limit),t.expiration&&a.setExpiration(t.expiration),t.timestamp&&a.setTimestamp(t.timestamp),i.setRawData(a),i},n9=(e,t={},n={})=>{let r=e.raw_data,i=r.contract[0],a=e9(i,t,{Permission_id:t?.Permission_id}),o=a.getRawData();return o.setRefBlockBytes(Z7(r.ref_block_bytes)),o.setRefBlockHash(Z7(r.ref_block_hash)),n.data&&o.setData(Z7(n.data.replace(/^0x/,``))),(n.fee_limit||t.fee_limit)&&o.setFeeLimit(n.fee_limit||t.fee_limit),r.expiration&&o.setExpiration(r.expiration),r.timestamp&&o.setTimestamp(r.timestamp),a.setRawData(o),a},r9=(e,t)=>{let n=t.getRawData().serializeBinary(),r=dW(n),i=MJ(n);return r.toLowerCase()===e.raw_data_hex.toLowerCase()&&i.replace(/^0x/,``).toLowerCase()===e.txID.replace(/^0x/,``).toLowerCase()},i9=e=>dW(e.getRawData().serializeBinary()),a9=e=>r9(e,t9(e)),o9=(e,t,n)=>r9(e,n9(e,t,n)),s9=e=>MJ(e.getRawData().serializeBinary()),Rce=c({deserializeTransaction:()=>gle}),{Transaction:zce}=globalThis.TronWebProto,{TransferContract:Bce,WithdrawBalanceContract:Vce,WitnessCreateContract:Hce,FreezeBalanceV2Contract:Uce,UnfreezeBalanceV2Contract:Wce,CancelAllUnfreezeV2Contract:Gce,WithdrawExpireUnfreezeContract:Kce,DelegateResourceContract:qce,UnDelegateResourceContract:Jce}=globalThis.TronWebProto,{TransferAssetContract:Yce,ParticipateAssetIssueContract:Xce,AssetIssueContract:Zce,UpdateAssetContract:Qce}=globalThis.TronWebProto,{TriggerSmartContract:$ce}=globalThis.TronWebProto,ele={0:`AccountCreateContract`,1:`TransferContract`,2:`TransferAssetContract`,4:`VoteWitnessContract`,5:`WitnessCreateContract`,6:`AssetIssueContract`,9:`ParticipateAssetIssueContract`,10:`AccountUpdateContract`,11:`FreezeBalanceContract`,12:`UnfreezeBalanceContract`,13:`WithdrawBalanceContract`,15:`UpdateAssetContract`,16:`ProposalCreateContract`,17:`ProposalApproveContract`,18:`ProposalDeleteContract`,19:`SetAccountIdContract`,30:`CreateSmartContract`,31:`TriggerSmartContract`,33:`UpdateSettingContract`,41:`ExchangeCreateContract`,42:`ExchangeInjectContract`,43:`ExchangeWithdrawContract`,44:`ExchangeTransactionContract`,45:`UpdateEnergyLimitContract`,46:`AccountPermissionUpdateContract`,48:`ClearABIContract`,49:`UpdateBrokerageContract`,54:`FreezeBalanceV2Contract`,55:`UnfreezeBalanceV2Contract`,56:`WithdrawExpireUnfreezeContract`,57:`DelegateResourceContract`,58:`UnDelegateResourceContract`,59:`CancelAllUnfreezeV2Contract`},tle=e=>e.getAuthsList().map(e=>{let t=dW(e.getPermissionName_asU8()),n=e.getAccount();return{permission_name:t,account:{name:dW(n.getName_asU8()),address:dW(n.getAddress_asU8())}}}),c9=(e,t)=>{let n=zce.raw.deserializeBinary(wW(t)),r=n.getContractList()[0],i=r.getParameter().getValue(),a=ele[r.getType()];if(e!==a)throw Error(`type ${e} dismatches with rawDataHex type ${a}`);return[{contract:[{parameter:{value:{},type_url:r.getParameter().getTypeUrl()},type:e,Permission_id:r.getPermissionId()}],data:dW(n.getData()),fee_limit:n.getFeeLimit(),ref_block_bytes:dW(n.getRefBlockBytes_asU8()),ref_block_hash:dW(n.getRefBlockHash_asU8()),expiration:n.getExpiration(),timestamp:n.getTimestamp(),scripts:dW(n.getScripts_asU8()),auths:tle(n)},i]},nle=(e,t)=>{let[n,r]=c9(e,t),i=$ce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),contract_address:dW(i.getContractAddress_asU8()),call_value:i.getCallValue(),data:dW(i.getData_asU8()),call_token_value:i.getCallTokenValue(),token_id:i.getTokenId()},n},l9=e=>{switch(e){case 0:return`BANDWIDTH`;case 1:return`ENERGY`;default:return`BANDWIDTH`}},rle=(e,t)=>{let[n,r]=c9(e,t),i=Uce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),frozen_balance:i.getFrozenBalance(),resource:l9(i.getResource())},n},ile=(e,t)=>{let[n,r]=c9(e,t),i=Wce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),unfreeze_balance:i.getUnfreezeBalance(),resource:l9(i.getResource())},n},ale=(e,t)=>{let[n,r]=c9(e,t),i=Gce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8())},n},ole=(e,t)=>{let[n,r]=c9(e,t),i=qce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),balance:i.getBalance(),lock:i.getLock(),lock_period:i.getLockPeriod(),receiver_address:dW(i.getReceiverAddress_asU8()),resource:l9(i.getResource())},n},sle=(e,t)=>{let[n,r]=c9(e,t),i=Jce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),balance:i.getBalance(),receiver_address:dW(i.getReceiverAddress_asU8()),resource:l9(i.getResource())},n},cle=(e,t)=>{let[n,r]=c9(e,t),i=Kce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8())},n},lle=(e,t)=>{let[n,r]=c9(e,t),i=Bce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),to_address:dW(i.getToAddress_asU8()),amount:i.getAmount()},n},ule=(e,t)=>{let[n,r]=c9(e,t),i=Vce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8())},n},dle=(e,t)=>{let[n,r]=c9(e,t),i=Hce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),url:dW(i.getUrl_asU8())},n},fle=(e,t)=>{let[n,r]=c9(e,t),i=Yce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),to_address:dW(i.getToAddress_asU8()),asset_name:dW(i.getAssetName_asU8()),amount:i.getAmount()},n},ple=(e,t)=>{let[n,r]=c9(e,t),i=Xce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),to_address:dW(i.getToAddress_asU8()),asset_name:dW(i.getAssetName_asU8()),amount:i.getAmount()},n},mle=(e,t)=>{let[n,r]=c9(e,t),i=Zce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),name:dW(i.getName_asU8()),abbr:dW(i.getAbbr_asU8()),description:dW(i.getDescription_asU8()),url:dW(i.getUrl_asU8()),total_supply:i.getTotalSupply(),trx_num:i.getTrxNum(),num:i.getNum(),start_time:i.getStartTime(),end_time:i.getEndTime(),frozen_supply:i.getFrozenSupplyList().map(e=>({frozen_amount:e.getFrozenAmount(),frozen_days:e.getFrozenDays()})),free_asset_net_limit:i.getFreeAssetNetLimit(),public_free_asset_net_limit:i.getPublicFreeAssetNetLimit(),precision:i.getPrecision(),vote_score:i.getVoteScore()},n},hle=(e,t)=>{let[n,r]=c9(e,t),i=Qce.deserializeBinary(r);return n.contract[0].parameter.value={owner_address:dW(i.getOwnerAddress_asU8()),description:dW(i.getDescription_asU8()),url:dW(i.getUrl_asU8()),new_limit:i.getNewLimit(),new_public_limit:i.getNewPublicLimit()},n},gle=(e,t)=>{if(!t)throw Error(`rawDataHex cannot be empty`);if(!H6(t))throw Error(`rawDataHex is not a valid hex string`);switch(e){case`TriggerSmartContract`:return nle(e,t);case`FreezeBalanceV2Contract`:return rle(e,t);case`UnfreezeBalanceV2Contract`:return ile(e,t);case`CancelAllUnfreezeV2Contract`:return ale(e,t);case`DelegateResourceContract`:return ole(e,t);case`UnDelegateResourceContract`:return sle(e,t);case`WithdrawExpireUnfreezeContract`:return cle(e,t);case`TransferContract`:return lle(e,t);case`WithdrawBalanceContract`:return ule(e,t);case`WitnessCreateContract`:return dle(e,t);case`TransferAssetContract`:return fle(e,t);case`ParticipateAssetIssueContract`:return ple(e,t);case`AssetIssueContract`:return mle(e,t);case`UpdateAssetContract`:return hle(e,t);default:throw Error(`trasaction ${e} not supported`)}},u9={...M6,constants:mW,address:Z6,code:vW,accounts:r4,base58:OW,bytes:sW,crypto:P2,abi:lie,message:fie,_TypedDataEncoder:S8,typedData:hie,transaction:wse,ethersUtils:M1,deserializeTx:Rce},_le;(function(e){e[e.BANDWIDTH=0]=`BANDWIDTH`,e[e.ENERGY=1]=`ENERGY`,e[e.TRON_POWER=2]=`TRON_POWER`})(_le||={});var vle;(function(e){e.ENOUGH_PERMISSION=`ENOUGH_PERMISSION`,e.NOT_ENOUGH_PERMISSION=`NOT_ENOUGH_PERMISSION`,e.SIGNATURE_FORMAT_ERROR=`SIGNATURE_FORMAT_ERROR`,e.COMPUTE_ADDRESS_ERROR=`COMPUTE_ADDRESS_ERROR`,e.PERMISSION_ERROR=`PERMISSION_ERROR`,e.OTHER_ERROR=`OTHER_ERROR`})(vle||={});var yle;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.SIGERROR=1]=`SIGERROR`,e[e.CONTRACT_VALIDATE_ERROR=2]=`CONTRACT_VALIDATE_ERROR`,e[e.CONTRACT_EXE_ERROR=3]=`CONTRACT_EXE_ERROR`,e[e.BANDWITH_ERROR=4]=`BANDWITH_ERROR`,e[e.DUP_TRANSACTION_ERROR=5]=`DUP_TRANSACTION_ERROR`,e[e.TAPOS_ERROR=6]=`TAPOS_ERROR`,e[e.TOO_BIG_TRANSACTION_ERROR=7]=`TOO_BIG_TRANSACTION_ERROR`,e[e.TRANSACTION_EXPIRATION_ERROR=8]=`TRANSACTION_EXPIRATION_ERROR`,e[e.SERVER_BUSY=9]=`SERVER_BUSY`,e[e.NO_CONNECTION=10]=`NO_CONNECTION`,e[e.NOT_ENOUGH_EFFECTIVE_CONNECTION=11]=`NOT_ENOUGH_EFFECTIVE_CONNECTION`,e[e.OTHER_ERROR=20]=`OTHER_ERROR`})(yle||={});var ble;(function(e){e[e.PENDING=0]=`PENDING`,e[e.DISAPPROVED=1]=`DISAPPROVED`,e[e.APPROVED=2]=`APPROVED`,e[e.CANCELED=3]=`CANCELED`})(ble||={});var xle=s(((e,t)=>{var n={};t.exports=function(e=[]){let t=r(),i=!1;async function*a(){for(;!i;){if(await t.promise===n)return;for(;e.length;)yield e.shift()}}function o(n){e.push(n),t.resolve(),t=r()}function s(){i=!0,t.resolve(n)}return[a(),o,s]};function r(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}}));s(((e,t)=>{var n=xle();t.exports=async function*(...e){let[t,r]=n(),i=!1;e.forEach(async e=>{for await(let t of e)r(t);i=!0});for await(let e of t)if(yield e,i)break}}))();var Sle=Object.defineProperty;((e,t)=>{for(var n in t)Sle(e,n,{get:t[n],enumerable:!0})})({},{KeccakMerge:()=>Ple,default:()=>Fle,generate_root_with_proof:()=>wle,initSync:()=>kle,verify_proof:()=>Dle});function d9(){return(b9===null||b9.byteLength===0)&&(b9=new Uint8Array(y9.memory.buffer)),b9}function f9(e,t){return e>>>=0,jle.decode(d9().subarray(e,e+t))}function p9(e,t,n){if(n===void 0){let n=Mle.encode(e),r=t(n.length,1)>>>0;return d9().subarray(r,r+n.length).set(n),x9=n.length,r}let r=e.length,i=t(r,1)>>>0,a=d9(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=d9().subarray(i+o,i+r),a=Nle(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return x9=o,i}function Cle(e){return e==null}function m9(){return(S9===null||S9.buffer.detached===!0||S9.buffer.detached===void 0&&S9.buffer!==y9.memory.buffer)&&(S9=new DataView(y9.memory.buffer)),S9}function h9(e,t){let n=t(e.length*1,1)>>>0;return d9().set(e,n/1),x9=e.length,n}function g9(e){let t=y9.__wbindgen_export_0.get(e);return y9.__externref_table_dealloc(e),t}function wle(e,t){let n,r;try{let o=h9(e,y9.__wbindgen_malloc),s=x9,c=y9.generate_root_with_proof(o,s,t);var i=c[0],a=c[1];if(c[3])throw i=0,a=0,g9(c[2]);return n=i,r=a,f9(i,a)}finally{y9.__wbindgen_free(n,r,1)}}function Tle(e){let t=y9.__externref_table_alloc();return y9.__wbindgen_export_0.set(t,e),t}function Ele(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=Tle(e[t]);m9().setUint32(n+4*t,r,!0)}return x9=e.length,n}function Dle(e,t,n,r,i){let a=p9(e,y9.__wbindgen_malloc,y9.__wbindgen_realloc),o=x9,s=Ele(t,y9.__wbindgen_malloc),c=x9,l=h9(i,y9.__wbindgen_malloc),u=x9,d=y9.verify_proof(a,o,s,c,n,r,l,u);if(d[2])throw g9(d[1]);return d[0]!==0}async function Ole(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.headers.get(`Content-Type`)!=`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function _9(){let e={};return e.wbg={},e.wbg.__wbindgen_error_new=function(e,t){return Error(f9(e,t))},e.wbg.__wbindgen_init_externref_table=function(){let e=y9.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e.wbg.__wbindgen_string_get=function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=Cle(r)?0:p9(r,y9.__wbindgen_malloc,y9.__wbindgen_realloc),a=x9;m9().setInt32(e+4,a,!0),m9().setInt32(e+0,i,!0)},e.wbg.__wbindgen_throw=function(e,t){throw Error(f9(e,t))},e}function v9(e,t){return y9=e.exports,Ale.__wbindgen_wasm_module=t,S9=null,b9=null,y9.__wbindgen_start(),y9}function kle(e){if(y9!==void 0)return y9;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=_9();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),v9(new WebAssembly.Instance(e,t),e)}async function Ale(e){if(y9!==void 0)return y9;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0&&(e=new URL(``+new URL(`web_bg-DRHK22rw.wasm`,import.meta.url).href,``+import.meta.url));let t=_9();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await Ole(await e,t);return v9(n,r)}var y9,jle,b9,x9,Mle,Nle,S9,Ple,Fle,C9=Object.freeze({SOURCE:`SOURCE`,SOURCE_FINALIZED:`SOURCE_FINALIZED`,HYPERBRIDGE_DELIVERED:`HYPERBRIDGE_DELIVERED`,HYPERBRIDGE_FINALIZED:`HYPERBRIDGE_FINALIZED`,DESTINATION:`DESTINATION`,TIMED_OUT:`TIMED_OUT`,HYPERBRIDGE_TIMED_OUT:`HYPERBRIDGE_TIMED_OUT`}),w9=Object.freeze({PENDING_TIMEOUT:`PENDING_TIMEOUT`,DESTINATION_FINALIZED_TIMEOUT:`DESTINATION_FINALIZED_TIMEOUT`,HYPERBRIDGE_TIMED_OUT:`HYPERBRIDGE_TIMED_OUT`,HYPERBRIDGE_FINALIZED_TIMEOUT:`HYPERBRIDGE_FINALIZED_TIMEOUT`,TIMED_OUT:`TIMED_OUT`});Object.freeze({AWAITING_PLACE_ORDER:`AWAITING_PLACE_ORDER`,ORDER_PLACED:`ORDER_PLACED`,ORDER_CONFIRMED:`ORDER_CONFIRMED`,AWAITING_BIDS:`AWAITING_BIDS`,NEW_BID:`NEW_BID`,BIDS_RECEIVED:`BIDS_RECEIVED`,BID_SELECTED:`BID_SELECTED`,FILLED:`FILLED`,PARTIAL_FILL:`PARTIAL_FILL`,CANCELLED:`CANCELLED`,EXPIRED:`EXPIRED`,FAILED:`FAILED`});function T9(e){let t=YH(e);if(t.length!==25||t[0]!==65)throw Error(`Not a Tron base58 address: ${e}`);return`0x${Array.from(t.slice(1,21),e=>e.toString(16).padStart(2,`0`)).join(``)}`}var E9=BV({id:420420417,name:`Polkadot Asset Hub (Paseo)`,nativeCurrency:{name:`PAS`,symbol:`PAS`,decimals:10},rpcUrls:{default:{http:[`https://testnet-asset-hub-eth-rpc.polkadot.io`]}},blockExplorers:{default:{name:`Routescan`,url:`https://polkadot.testnet.routescan.io`}}}),Ile=BV({id:420420419,name:`Polkadot Hub`,nativeCurrency:{name:`DOT`,symbol:`DOT`,decimals:10},rpcUrls:{default:{http:[`https://hub-eth-rpc.polkadot.io`]}},blockExplorers:{default:{name:`Blockscout`,url:`https://blockscout.polkadot.io`}}}),D9=BV({id:688600,name:`Pharos Mainnet`,nativeCurrency:{name:`PHRS`,symbol:`PHRS`,decimals:18},rpcUrls:{default:{http:[`https://atlantic.dplabs-internal.com`]}}}),O9=BV({id:688689,name:`Pharos Atlantic Testnet`,nativeCurrency:{name:`PHRS`,symbol:`PHRS`,decimals:18},rpcUrls:{default:{http:[`https://atlantic.dplabs-internal.com`]}}}),k9=BV({id:3448148188,name:`TRON Nile Testnet`,nativeCurrency:{name:`TRX`,symbol:`TRX`,decimals:6},rpcUrls:{default:{http:[`https://nile.trongrid.io/jsonrpc`]}},blockExplorers:{default:{name:`Nile Tronscan`,url:`https://nile.tronscan.org`}}}),Lle={97:{chainId:97,stateMachineId:`EVM-97`,viemChain:nH,wrappedNativeDecimals:18,assets:{WETH:`0xae13d989dac2f0debff460ac112a837c89baa7cd`,DAI:`0x1938165569a5463327fb206be06d8d9253aa06b7`,USDC:`0xA801da100bF16D07F668F4A49E1f71fc54D05177`,USDT:`0xc043f483373072f7f27420d6e7d7ad269c018e18`,cNGN:`0x2bbbd701cfc25d37f18127e51df0933566d5778a`},tokenDecimals:{USDC:18,USDT:18,cNGN:6},tokenStorageSlots:{USDC:{balanceSlot:1,allowanceSlot:2},USDT:{balanceSlot:151,allowanceSlot:152}},addresses:{IntentGateway:`0x6CF42FA9BecbC5b6a26884964956b113530f7cFA`,TokenGateway:`0xFcDa26cA021d5535C3059547390E6cCd8De7acA6`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,UniswapRouter02:`0x9639379819420704457B07A0C33B678D9E0F8Df0`,UniswapV2Factory:`0x12e036669DA18F4A2777853d6e2136b32AceEC86`,UniswapV3Factory:`0x0000000000000000000000000000000000000000`,UniversalRouter:`0xcc6d5ece3d4a57245bf5a2f64f3ed9179b81f714`,UniswapV3Quoter:`0x0000000000000000000000000000000000000000`,UniswapV4Quoter:`0x0000000000000000000000000000000000000000`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,SolverAccount:`0x153DB990FE3b761B54ad71D0f1A0987dF11740DB`},rpcEnvKey:`BSC_CHAPEL`,defaultRpcUrl:`https://bnb-testnet.api.onfinality.io/public`,consensusStateId:`BSC0`,coingeckoId:`binance-smart-chain`,popularTokens:[`0xae13d989dac2f0debff460ac112a837c89baa7cd`,`0xC625ec7D30A4b1AAEfb1304610CdAcD0d606aC92`,`0xc043f483373072f7f27420d6e7d7ad269c018e18`,`0x1938165569A5463327fb206bE06d8D9253aa06b7`]},10200:{chainId:10200,stateMachineId:`EVM-10200`,viemChain:iH,wrappedNativeDecimals:18,assets:{WETH:`0x0000000000000000000000000000000000000000`,USDC:`0x50b1d3c7c073c9caa1ef207365a2c9c976bd70b9`,DAI:`0x0000000000000000000000000000000000000000`,USDT:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:6,USDT:6},addresses:{IntentGateway:`0x016b6ffC9f890d1e28f9Fdb9eaDA776b02F89509`,TokenGateway:`0xFcDa26cA021d5535C3059547390E6cCd8De7acA6`,Host:`0x58A41B89F4871725E5D898d98eF4BF917601c5eB`,UniswapRouter02:`0x0000000000000000000000000000000000000000`,UniswapV2Factory:`0x0000000000000000000000000000000000000000`,UniswapV3Factory:`0x0000000000000000000000000000000000000000`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},rpcEnvKey:`GNOSIS_CHIADO`,defaultRpcUrl:`https://gnosis-chiado-rpc.publicnode.com`,consensusStateId:`GNO0`,coingeckoId:`gnosis`,popularTokens:[`0x50B1d3c7c073c9caa1Ef207365A2c9C976bD70b9`]},4009:{chainId:4009,stateMachineId:`KUSAMA-4009`,addresses:{},rpcEnvKey:`HYPERBRIDGE_GARGANTUA`,defaultRpcUrl:``,consensusStateId:`PAS0`,coingeckoId:`hyperbridge`},11155111:{chainId:11155111,stateMachineId:`EVM-11155111`,viemChain:fH,wrappedNativeDecimals:18,assets:{WETH:`0x7b79995e5f793a07bc00c21412e50ecae098e7f9`,USDC:`0x0000000000000000000000000000000000000000`,USDT:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:6,USDT:6},addresses:{IntentGateway:`0x016b6ffC9f890d1e28f9Fdb9eaDA776b02F89509`,TokenGateway:`0xFcDa26cA021d5535C3059547390E6cCd8De7acA6`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,UniswapRouter02:`0x0000000000000000000000000000000000000000`,UniswapV2Factory:`0x0000000000000000000000000000000000000000`,UniswapV3Factory:`0x0000000000000000000000000000000000000000`,Calldispatcher:`0xC7f13b6D03A0A7F3239d38897503E90553ABe155`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},rpcEnvKey:`SEPOLIA`,defaultRpcUrl:`https://1rpc.io/sepolia`,consensusStateId:`ETH0`,coingeckoId:`ethereum`,popularTokens:[`0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9`]},1:{chainId:1,stateMachineId:`EVM-1`,viemChain:aH,wrappedNativeDecimals:18,assets:{WETH:`0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`,DAI:`0x6b175474e89094c44da98b954eedeac495271d0f`,USDC:`0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`,USDT:`0xdac17f958d2ee523a2206206994597c13d831ec7`,cNGN:`0x17CDB2a01e7a34CbB3DD4b83260B05d0274C8dab`,ZARP:`0xb755506531786C8aC63B756BaB1ac387bACB0C04`,EURC:`0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c`,XSGD:`0x70e8dE73cE538DA2bEEd35d14187F6959a8ecA96`,TRYB:`0x2C537E5624e4af88A7ae4060C022609376C8D0EB`,USDR:`0x9623DfB044D5612Ce0c0F1606973CCAEFd03CD05`},tokenDecimals:{USDC:6,USDT:6,cNGN:6,ZARP:18,EURC:6,XSGD:6,TRYB:6,USDR:6},tokenStorageSlots:{USDT:{balanceSlot:2,allowanceSlot:5},USDC:{balanceSlot:9,allowanceSlot:10},WETH:{balanceSlot:3,allowanceSlot:4},DAI:{balanceSlot:0,allowanceSlot:0},cNGN:{balanceSlot:201,allowanceSlot:202},ZARP:{balanceSlot:51,allowanceSlot:52},EURC:{balanceSlot:9,allowanceSlot:10},XSGD:{balanceSlot:7,allowanceSlot:8},TRYB:{balanceSlot:9,allowanceSlot:10},USDR:{balanceSlot:51,allowanceSlot:52}},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0xFd413e3AFe560182C4471F4d143A96d3e259B6dE`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D`,UniswapV2Factory:`0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f`,UniswapV3Factory:`0x1F98431c8aD98523631AE4a59f267346ea31F984`,UniversalRouter:`0x66a9893cc07d91d95644aedd05d03f95e1dba8af`,UniswapV3Quoter:`0x61fFE014bA17989E743c5F6cB21bF9697530B21e`,UniswapV4Quoter:`0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203`,UniswapV4PositionManager:`0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e`,UniswapV4PoolManager:`0x000000000004444c5dc75cB358380D2e3dE08A90`,UniswapV4StateView:`0x7ffe42c4a5deea5b0fec41c94c136cf115597227`,Calldispatcher:`0xc71251c8b3e7b02697a84363eef6dce8dfbdf333`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,CirclePaymaster:`0x0578cFB241215b77442a541325d6A4E6dFE700Ec`,SimplexPaymaster:`0xD4340d7466e040626383cb9cda9307ba8E081149`,Usdt0Oft:`0x6C96dE32CEa08842dcc4058c14d3aaAD7Fa41dee`},rpcEnvKey:`ETH_MAINNET`,defaultRpcUrl:`https://eth-mainnet.g.alchemy.com/v2/demo`,consensusStateId:`ETH0`,coingeckoId:`ethereum`,layerZeroEid:30101,erc4626Vaults:[{label:`Aave stataUSDC`,address:`0xD4fa2D31b7968E448877f69A96DE69f5de8cD23E`,asset:`USDC`},{label:`Aave stataUSDT`,address:`0x7Bc3485026Ac48b6cf9BaF0A377477Fff5703Af8`,asset:`USDT`}],popularTokens:[`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,`0xdAC17F958D2ee523a2206206994597C13D831ec7`,`0x6B175474E89094C44Da98b954EedeAC495271d0F`]},56:{chainId:56,stateMachineId:`EVM-56`,viemChain:tH,wrappedNativeDecimals:18,assets:{WETH:`0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c`,DAI:`0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3`,USDC:`0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d`,USDT:`0x55d398326f99059ff775485246999027b3197955`,EXT:`0x7C8c11ADb8EF7cd3CFa718008Ea048445C6E7209`,cNGN:`0xa8AEA66B361a8d53e8865c62D142167Af28Af058`},tokenDecimals:{USDC:18,USDT:18,cNGN:6,EXT:18},tokenStorageSlots:{USDT:{balanceSlot:1,allowanceSlot:2},USDC:{balanceSlot:1,allowanceSlot:2},WETH:{balanceSlot:3,allowanceSlot:4},DAI:{balanceSlot:0,allowanceSlot:0},cNGN:{balanceSlot:201,allowanceSlot:202}},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0xFd413e3AFe560182C4471F4d143A96d3e259B6dE`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0x10ED43C718714eb63d5aA57B78B54704E256024E`,UniswapV2Factory:`0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73`,UniswapV3Factory:`0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865`,UniversalRouter:`0xd9C500DfF816a1Da21A48A732d3498Bf09dc9AEB`,UniswapV3Quoter:`0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997`,UniswapV4Quoter:`0xd0737C9762912dD34c3271197E362Aa736Df0926`,UniswapV4PositionManager:`0x7a4a5c919ae2541aed11041a1aeee68f1287f95b`,UniswapV4PoolManager:`0x28e2ea090877bf75740558f6bfb36a5ffee9e9df`,UniswapV4StateView:`0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4`,Calldispatcher:`0xc71251c8b3e7b02697a84363eef6dce8dfbdf333`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,SimplexPaymaster:`0xeD02f9f0df8F562B89cC5b25867Ad3C2d61252A9`},rpcEnvKey:`BSC_MAINNET`,defaultRpcUrl:`https://bsc-rpc.publicnode.com`,consensusStateId:`BSC0`,coingeckoId:`binance-smart-chain`,erc4626Vaults:[{label:`Aave stataUSDC`,address:`0x3906cDdfb781f02B21f21BD81ed7Fd8DC37075E1`,asset:`USDC`},{label:`Aave stataUSDT`,address:`0x0471D185cc7Be61E154277cAB2396cD397663da6`,asset:`USDT`}],popularTokens:[`0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82`,`0x000Ae314E2A2172a039B26378814C252734f556A`,`0x8d0d000ee44948fc98c9b98a4fa4921476f08b0d`,`0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c`,`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,`0x55d398326f99059fF775485246999027B3197955`,`0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3`]},42161:{chainId:42161,stateMachineId:`EVM-42161`,viemChain:YV,wrappedNativeDecimals:18,assets:{WETH:`0x82af49447d8a07e3bd95bd0d56f35241523fbab1`,DAI:`0xda10009cbd5d07dd0cecc66161fc93d7c9000da1`,USDC:`0xaf88d065e77c8cc2239327c5edb3a432268e5831`,USDT:`0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9`,EXT:`0x0e668E5127087e236578893a0e01E41837A28469`},tokenDecimals:{USDC:6,USDT:6,EXT:18},tokenStorageSlots:{USDT:{balanceSlot:51,allowanceSlot:52},USDC:{balanceSlot:9,allowanceSlot:10},WETH:{balanceSlot:51,allowanceSlot:52},DAI:{balanceSlot:0,allowanceSlot:0}},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0xFd413e3AFe560182C4471F4d143A96d3e259B6dE`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24`,UniswapV2Factory:`0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9`,UniswapV3Factory:`0x1F98431c8aD98523631AE4a59f267346ea31F984`,UniversalRouter:`0xa51afafe0263b40edaef0df8781ea9aa03e381a3`,UniswapV3Quoter:`0x61fFE014bA17989E743c5F6cB21bF9697530B21e`,UniswapV4Quoter:`0x3972c00f7ed4885e145823eb7c655375d275a1c5`,UniswapV4PositionManager:`0xd88f38f930b7952f2db2432cb002e7abbf3dd869`,UniswapV4PoolManager:`0x360e68faccca8ca495c1b759fd9eee466db9fb32`,UniswapV4StateView:`0x76fd297e2d437cd7f76d50f01afe6160f86e9990`,Calldispatcher:`0xc71251c8b3e7b02697a84363eef6dce8dfbdf333`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,CirclePaymaster:`0x0578cFB241215b77442a541325d6A4E6dFE700Ec`,SimplexPaymaster:`0x7281Bccb4f0BCE44F3B8542d1fC5e51c2F5fC08C`,Usdt0Oft:`0x14E4A1B13bf7F943c8ff7C51fb60FA964A298D92`},rpcEnvKey:`ARBITRUM_MAINNET`,defaultRpcUrl:`https://arbitrum-one.public.blastapi.io`,consensusStateId:`ETH0`,coingeckoId:`arbitrum-one`,layerZeroEid:30110,erc4626Vaults:[{label:`Aave stataUSDC`,address:`0x7F6501d3B98eE91f9b9535E4b0ac710Fb0f9e0bc`,asset:`USDC`},{label:`Aave stataUSDT`,address:`0xa6D12574eFB239FC1D2099732bd8b5dC6306897F`,asset:`USDT`}],popularTokens:[`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`]},8453:{chainId:8453,stateMachineId:`EVM-8453`,viemChain:QV,wrappedNativeDecimals:18,assets:{WETH:`0x4200000000000000000000000000000000000006`,DAI:`0x50c5725949a6f0c72e6c4a641f24049a917db0cb`,USDC:`0x833589fcd6edb6e08f4c7c32d4f71b54bda02913`,USDT:`0xfde4c96c8593536e31f229ea8f37b2ada2699bb2`,EXT:`0x0e668E5127087e236578893a0e01E41837A28469`,cNGN:`0x46C85152bFe9f96829aA94755D9f915F9B10EF5F`,ZARP:`0xb755506531786C8aC63B756BaB1ac387bACB0C04`,EURC:`0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42`,USDR:`0x3B5F2810fB2168FfA9C73160F97BF9f2461fFa5c`},tokenDecimals:{USDC:6,USDT:6,cNGN:6,EXT:18,ZARP:18,EURC:6,USDR:6},tokenStorageSlots:{USDT:{balanceSlot:0,allowanceSlot:1},USDC:{balanceSlot:9,allowanceSlot:10},WETH:{balanceSlot:3,allowanceSlot:4},DAI:{balanceSlot:0,allowanceSlot:0},cNGN:{balanceSlot:201,allowanceSlot:202},ZARP:{balanceSlot:51,allowanceSlot:52},EURC:{balanceSlot:9,allowanceSlot:10},USDR:{balanceSlot:51,allowanceSlot:52}},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0xFd413e3AFe560182C4471F4d143A96d3e259B6dE`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24`,UniswapV2Factory:`0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6`,UniswapV3Factory:`0x33128a8fC17869897dcE68Ed026d694621f6FDfD`,UniversalRouter:`0x6ff5693b99212da76ad316178a184ab56d299b43`,UniswapV3Quoter:`0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a`,UniswapV4Quoter:`0x0d5e0f971ed27fbff6c2837bf31316121532048d`,Calldispatcher:`0xc71251c8b3e7b02697a84363eef6dce8dfbdf333`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,CirclePaymaster:`0x0578cFB241215b77442a541325d6A4E6dFE700Ec`,SimplexPaymaster:`0x15b3B03C870c7ef252029c35A12d3b339F5c8d7f`,AerodromeRouter:`0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43`,UniswapV4PositionManager:`0x7c5f5a4bbd8fd63184577525326123b519429bdc`,UniswapV4PoolManager:`0x498581ff718922c3f8e6a244956af099b2652b2b`,UniswapV4StateView:`0xa3c0c9b65bad0b08107aa264b0f3db444b867a71`},rpcEnvKey:`BASE_MAINNET`,defaultRpcUrl:`https://base-mainnet.public.blastapi.io`,consensusStateId:`ETH0`,coingeckoId:`base`,layerZeroEid:30184,erc4626Vaults:[{label:`Aave stataUSDC`,address:`0xC768c589647798a6EE01A91FdE98EF2ed046DBD6`,asset:`USDC`},{label:`Yield Bearing cNGN`,address:`0xa82A3531021317240Fb32E67f9c7bC091F737D3b`,asset:`cNGN`}],popularTokens:[`0x4200000000000000000000000000000000000006`,`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`]},137:{chainId:137,stateMachineId:`EVM-137`,viemChain:uH,wrappedNativeDecimals:18,assets:{WETH:`0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270`,DAI:`0x8f3cf7ad23cd3cadbd9735aff958023239c6a063`,USDC:`0x3c499c542cef5e3811e1192ce70d8cc03d5c3359`,USDT:`0xc2132d05d31c914a87c6611c10748aeb04b58e8f`,EXT:`0x7C8c11ADb8EF7cd3CFa718008Ea048445C6E7209`,cNGN:`0x52828daa48C1a9A06F37500882b42daf0bE04C3B`,ZARP:`0xb755506531786C8aC63B756BaB1ac387bACB0C04`,XSGD:`0xDC3326e71D45186F113a2F448984CA0e8D201995`,USDR:`0x3B5F2810fB2168FfA9C73160F97BF9f2461fFa5c`},tokenDecimals:{USDC:6,USDT:6,EXT:18,cNGN:6,ZARP:18,XSGD:6,USDR:6},tokenStorageSlots:{USDT:{balanceSlot:0,allowanceSlot:1},USDC:{balanceSlot:9,allowanceSlot:10},WETH:{balanceSlot:3,allowanceSlot:4},DAI:{balanceSlot:0,allowanceSlot:0},cNGN:{balanceSlot:201,allowanceSlot:202},ZARP:{balanceSlot:51,allowanceSlot:52},XSGD:{balanceSlot:7,allowanceSlot:8},USDR:{balanceSlot:51,allowanceSlot:52}},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0x8b536105b6Fae2aE9199f5146D3C57Dfe53b614E`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0xd2f9496824951D5237cC71245D659E48d0d5f9E8`,UniswapV2Factory:`0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32`,UniswapV3Factory:`0x1F98431c8aD98523631AE4a59f267346ea31F984`,UniversalRouter:`0x1095692a6237d83c6a72f3f5efedb9a670c49223`,UniswapV3Quoter:`0x61fFE014bA17989E743c5F6cB21bF9697530B21e`,UniswapV4Quoter:`0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9`,UniswapV4PositionManager:`0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9`,UniswapV4PoolManager:`0x67366782805870060151383f4bbff9dab53e5cd6`,UniswapV4StateView:`0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a`,Calldispatcher:`0xc71251c8b3e7b02697a84363eef6dce8dfbdf333`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,CirclePaymaster:`0x0578cFB241215b77442a541325d6A4E6dFE700Ec`,SimplexPaymaster:`0xe99acFe0f5fC4C8ea54A187D8D3b05f136150095`,Usdt0Oft:`0x6BA10300f0DC58B7a1e4c0e41f5daBb7D7829e13`},rpcEnvKey:`POLYGON_MAINNET`,defaultRpcUrl:`https://polygon-bor-rpc.publicnode.com`,consensusStateId:`POLY`,coingeckoId:`polygon-pos`,layerZeroEid:30109,erc4626Vaults:[{label:`Aave stataUSDC`,address:`0x79261231698B26Ed9085b59ae89d59843Ae925a8`,asset:`USDC`},{label:`Aave stataUSDT`,address:`0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff`,asset:`USDT`}],popularTokens:[`0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270`,`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`]},3448148188:{chainId:3448148188,stateMachineId:`EVM-3448148188`,viemChain:k9,wrappedNativeDecimals:6,assets:{WETH:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`,USDC:T9(`TNuoKL1ni8aoshfFL1ASca1Gou9RXwAzfn`),USDT:T9(`TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf`)},tokenDecimals:{USDC:6,USDT:6},tokenStorageSlots:{USDT:{balanceSlot:0,allowanceSlot:1}},addresses:{IntentGateway:T9(`TMcm6r9RRVKPJNLgyFxcuJknFruQBuPumF`),Host:T9(`TNduR7v184pMWv2oTamRxxzsmz7oHrKqJc`),Calldispatcher:T9(`TA9XyBPuXL9ecXcLpcFV1g778fzstke2Eh`),UniswapRouter02:T9(`TLXGSird23Ww5FZrtbTYisrZNARUmjwmcy`)},rpcEnvKey:`TRON_NILE`,defaultRpcUrl:`https://nile.trongrid.io/jsonrpc`,consensusStateId:`TRON`,coingeckoId:`tron`},80002:{chainId:80002,stateMachineId:`EVM-80002`,viemChain:dH,wrappedNativeDecimals:18,assets:{WETH:`0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0xBE97E73126D66188d72fbF99029126D0340a7f18`,USDT:`0x0000000000000000000000000000000000000000`,cNGN:`0xe4ff5d2ae65c10f530c000215029919961e8a758`},tokenDecimals:{USDC:18,USDT:18,cNGN:6},tokenStorageSlots:{USDT:{balanceSlot:0,allowanceSlot:1},USDC:{balanceSlot:0,allowanceSlot:1}},addresses:{IntentGateway:`0x6CF42FA9BecbC5b6a26884964956b113530f7cFA`,TokenGateway:`0x8b536105b6Fae2aE9199f5146D3C57Dfe53b614E`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,Calldispatcher:`0x876F1891982E260026630c233A4897160A281Fb8`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,SolverAccount:`0x153DB990FE3b761B54ad71D0f1A0987dF11740DB`},rpcEnvKey:`POLYGON_AMOY`,defaultRpcUrl:`https://rpc-amoy.polygon.technology`,consensusStateId:`POLY`,coingeckoId:`polygon-pos`},10:{chainId:10,stateMachineId:`EVM-10`,viemChain:sH,wrappedNativeDecimals:18,assets:{WETH:`0x4200000000000000000000000000000000000006`,DAI:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,USDC:`0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85`,USDT:`0x94b008aA00579c1307B0EF2c499aD98a8ce58e58`},tokenDecimals:{USDC:6,USDT:6},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0xFd413e3AFe560182C4471F4d143A96d3e259B6dE`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2`,UniswapV2Factory:`0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf`,UniswapV3Factory:`0x1F98431c8aD98523631AE4a59f267346ea31F984`,Calldispatcher:`0xC71251c8b3e7B02697A84363Eef6DcE8DfBdF333`,Permit2:`0x000000000022D473030F116dDEE9F6B43aC78BA3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,CirclePaymaster:`0x0578cFB241215b77442a541325d6A4E6dFE700Ec`,UniswapV4PositionManager:`0x3c3ea4b57a46241e54610e5f022e5c45859a1017`,UniswapV4PoolManager:`0x9a13f98cb987694c9f086b1f5eb990eea8264ec3`},defaultRpcUrl:`https://mainnet.optimism.io`,consensusStateId:`ETH0`,coingeckoId:`optimistic-ethereum`},100:{chainId:100,stateMachineId:`EVM-100`,viemChain:rH,wrappedNativeDecimals:18,assets:{WETH:`0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1`,DAI:`0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d`,USDC:`0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83`,USDT:`0x4ECaBa5870353805a9F068101A40E0f32ed605C6`},tokenDecimals:{USDC:6,USDT:6},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,TokenGateway:`0xFd413e3AFe560182C4471F4d143A96d3e259B6dE`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,UniswapRouter02:`0xB2e26652e4BAd1e56055A051f922E06760cA0BFE`,UniswapV2Factory:`0x0000000000000000000000000000000000000000`,Calldispatcher:`0xC71251c8b3e7B02697A84363Eef6DcE8DfBdF333`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},defaultRpcUrl:`https://rpc.gnosischain.com`,consensusStateId:`GNO0`,coingeckoId:`gnosis`},1868:{chainId:1868,stateMachineId:`EVM-1868`,viemChain:mH,wrappedNativeDecimals:18,assets:{WETH:`0x4200000000000000000000000000000000000006`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369`,USDT:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:6,USDT:6},addresses:{TokenGateway:`0xCe304770236f39F9911BfCC51afBdfF3b8635718`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`,UniswapV4PositionManager:`0x1b35d13a2e2528f192637f14b05f0dc0e7deb566`,UniswapV4PoolManager:`0x360e68faccca8ca495c1b759fd9eee466db9fb32`},defaultRpcUrl:`https://rpc.soneium.org`,consensusStateId:`ETH0`,coingeckoId:`ethereum`},421614:{chainId:421614,stateMachineId:`EVM-421614`,viemChain:XV,wrappedNativeDecimals:18,assets:{WETH:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0x0000000000000000000000000000000000000000`,USDT:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:6,USDT:6},addresses:{TokenGateway:`0xFcDa26cA021d5535C3059547390E6cCd8De7acA6`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},defaultRpcUrl:`https://sepolia-rollup.arbitrum.io/rpc`,consensusStateId:`ETH0`,coingeckoId:`arbitrum-one`},11155420:{chainId:11155420,stateMachineId:`EVM-11155420`,viemChain:lH,wrappedNativeDecimals:18,assets:{WETH:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0x0000000000000000000000000000000000000000`,USDT:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:6,USDT:6},addresses:{TokenGateway:`0xFcDa26cA021d5535C3059547390E6cCd8De7acA6`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},defaultRpcUrl:`https://sepolia.optimism.io`,consensusStateId:`ETH0`,coingeckoId:`optimistic-ethereum`},84532:{chainId:84532,stateMachineId:`EVM-84532`,viemChain:eH,wrappedNativeDecimals:18,assets:{WETH:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0x0000000000000000000000000000000000000000`,USDT:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:6,USDT:6},addresses:{TokenGateway:`0xFcDa26cA021d5535C3059547390E6cCd8De7acA6`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},defaultRpcUrl:`https://sepolia.base.org`,consensusStateId:`ETH0`,coingeckoId:`base`},420420417:{chainId:420420417,stateMachineId:`EVM-420420417`,viemChain:E9,wrappedNativeDecimals:18,assets:{WETH:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0x0dc440cf87830f0af564eb8b62b454b7e0c68a4b`,USDT:`0x0000000000000000000000000000000000000000`},tokenDecimals:{USDC:18,USDT:18},addresses:{IntentGateway:`0x606ba811aa6cb424ce2108e8977c5284686f0d1f`,TokenGateway:`0x1c1e5be83df4a54c7a2230c337e4a3e8b7354b1c`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,EntryPointV08:`0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`},defaultRpcUrl:`https://testnet-asset-hub-eth-rpc.polkadot.io`,consensusStateId:`PAS0`,coingeckoId:`polkadot`},420420419:{chainId:420420419,stateMachineId:`EVM-420420419`,viemChain:Ile,wrappedNativeDecimals:18,assets:{WETH:`0x0000000000000000000000000000000000000000`,DAI:`0x0000000000000000000000000000000000000000`,USDC:`0x0000053900000000000000000000000001200000`,USDT:`0x000007c000000000000000000000000001200000`},tokenDecimals:{USDC:6,USDT:6},addresses:{IntentGateway:`0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716`,SolverAccount:`0xd5535d4DeB17F050e52B6efda2fDe00435f39279`,Host:`0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3`,Calldispatcher:`0xE2C7e576E26E0bE7aC97c6fE925bcDAbD87c4bEd`},defaultRpcUrl:`https://hub-eth-rpc.polkadot.io`,consensusStateId:`DOT0`,coingeckoId:`polkadot`},688600:{chainId:688600,stateMachineId:`EVM-688600`,viemChain:D9,wrappedNativeDecimals:18,addresses:{Host:`0x0000000000000000000000000000000000000000`},consensusStateId:`PHAR`,coingeckoId:`pharos`},688689:{chainId:688689,stateMachineId:`EVM-688689`,viemChain:O9,wrappedNativeDecimals:18,addresses:{TokenGateway:`0x451bDd8273839AD0Ec7F4Fa798E8B3DABb223fD8`,Host:`0x9AA003594d59C62EE17A73A569Fd7B1DbdBd71E1`,IntentGateway:`0xb8039832c6c9266F928d038eA49A8a169300C670`},consensusStateId:`PHAR`,coingeckoId:`pharos`}};Object.fromEntries(Object.values(Lle).map(e=>[e.stateMachineId,e])),aH.id,YV.id,XV.id,sH.id,lH.id,QV.id,eH.id,mH.id,tH.id,nH.id,rH.id,iH.id,uH.id,_H.id,hH.id,k9.id,E9.id,D9.id,O9.id,new TextEncoder().encode(`intents::bid::`),tW({filler:BU(32),user_op:iW(fU)}),tW({sender:BU(20),nonce:BU(32),initCode:iW(fU),callData:iW(fU),accountGasLimits:BU(32),preVerificationGas:BU(32),gasFees:BU(32),paymasterAndData:iW(fU),signature:iW(fU)}),tW({account_type:UU({Contract:tW({trie_id:iW(fU)})})});var A9=iW(fU,32);tW({contractProof:iW(iW(fU)),storageProof:iW(QU(iW(fU),iW(iW(fU))))}),tW({hasher:UU({Keccak:LU,Blake2:LU}),storageProof:iW(iW(fU))}),iW(iW(fU)),tW({leafIndexAndPos:iW(tW({leafIndex:hU,pos:hU})),leafCount:hU,items:iW(A9)});var j9=iW(fU,4),Rle=tW({consensusProof:iW(fU),consensusStateId:j9,signer:iW(fU)}),zle=tW({proof1:iW(fU),proof2:iW(fU),consensusStateId:j9}),M9=UU({Evm:mU,Polkadot:mU,Kusama:mU,Substrate:j9,Tendermint:j9}),N9=tW({height:tW({id:tW({id:M9,consensusStateId:j9}),height:hU}),proof:iW(fU)}),P9=tW({source:M9,dest:M9,nonce:hU,from:iW(fU),to:iW(fU),timeoutTimestamp:hU,body:iW(fU)}),Ble=tW({post:P9,response:iW(fU),timeoutTimestamp:hU}),F9=tW({source:M9,dest:M9,nonce:hU,from:iW(fU),keys:iW(iW(fU)),height:hU,context:iW(fU),timeoutTimestamp:hU}),Vle=tW({get:F9,values:iW(tW({key:iW(fU),value:KU(iW(fU))}))}),I9=UU({Post:P9,Get:F9}),L9=UU({Post:Ble,Get:Vle}),Hle=tW({requests:iW(P9),proof:N9,signer:iW(fU)}),Ule=tW({datagram:iW(UU({Request:iW(I9),Response:iW(L9)})),proof:N9,signer:iW(fU)}),Wle=UU({Post:tW({requests:iW(I9),proof:N9}),PostResponse:tW({responses:iW(L9),proof:N9}),Get:tW({requests:iW(I9)})});tW({requests:iW(F9),source:N9,response:N9,signer:iW(fU)}),UU({ConsensusMessage:Rle,FraudProofMessage:zle,RequestMessage:Hle,ResponseMessage:Ule,TimeoutMessage:Wle}),new TextEncoder().encode(`:child_storage:default:`);var R9=tW({proofNode:iW(fU),nextBeginOffset:mU,nextEndOffset:mU}),Gle=tW({slotIndex:fU,leftmostLeafKey:iW(fU),proofPath:iW(R9)}),Kle=tW({proofNodes:iW(R9),siblingProofs:iW(Gle)}),qle=tW({proofNodes:iW(R9),rawValue:iW(fU)});tW({storageProof:iW(QU(iW(fU),iW(R9))),storageValues:iW(QU(iW(fU),iW(fU))),nonExistenceProofs:iW(QU(iW(fU),Kle)),accountProofs:iW(QU(iW(fU),qle))});function Jle(e){let t=e.startsWith(`0x`)?e.slice(2):e,n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return new TextDecoder().decode(n)}function z9(e){return zz(e)?Jle(e):e}KR({level:RR.silent}),C9.SOURCE,C9.SOURCE_FINALIZED,C9.HYPERBRIDGE_DELIVERED,C9.HYPERBRIDGE_FINALIZED,C9.DESTINATION,C9.HYPERBRIDGE_TIMED_OUT,C9.TIMED_OUT,w9.PENDING_TIMEOUT,w9.DESTINATION_FINALIZED_TIMEOUT,w9.HYPERBRIDGE_TIMED_OUT,w9.HYPERBRIDGE_FINALIZED_TIMEOUT,w9.TIMED_OUT,C9.SOURCE,C9.SOURCE_FINALIZED,C9.HYPERBRIDGE_DELIVERED,C9.HYPERBRIDGE_FINALIZED,C9.DESTINATION,w9.PENDING_TIMEOUT,w9.DESTINATION_FINALIZED_TIMEOUT,w9.HYPERBRIDGE_TIMED_OUT,w9.HYPERBRIDGE_FINALIZED_TIMEOUT,w9.TIMED_OUT,Object.freeze({destProof:(e,t,n)=>`cancel-order:${B9(e,t,n)}:destProof`,getRequest:(e,t,n)=>`cancel-order:${B9(e,t,n)}:getRequest`,sourceProof:(e,t,n)=>`cancel-order:${B9(e,t,n)}:sourceProof`,postCommitment:(e,t,n)=>`cancel-order:${B9(e,t,n)}:postCommitment`}),Object.freeze({destProof:(e,t,n)=>`cancel-order:${V9(e,t,n)}:destProof`,getRequest:(e,t,n)=>`cancel-order:${V9(e,t,n)}:getRequest`,sourceProof:(e,t,n)=>`cancel-order:${V9(e,t,n)}:sourceProof`,postCommitment:(e,t,n)=>`cancel-order:${V9(e,t,n)}:postCommitment`});function B9(e,t,n){return!t||!n?e:`${e}:${encodeURIComponent(z9(t))}:${encodeURIComponent(z9(n))}`}function V9(e,t,n){return!t||!n?e:`${e}:${encodeURIComponent(t)}:${encodeURIComponent(n)}`}_B(rB(`SelectSolver(bytes32 commitment,address solver)`)),_B(rB(`PackedUserOperation(address sender,uint256 nonce,bytes initCode,bytes callData,bytes32 accountGasLimits,uint256 preVerificationGas,bytes32 gasFees,bytes paymasterAndData)`)),_B(rB(`EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)`)),Rz([`function _orders(bytes32 commitment, address token) view returns (uint256)`,`function _partialFills(bytes32 commitment, bytes32 token) view returns (uint256)`]),10n**BigInt(18);var H9=`side fillChain rate depthIn depthOut backingLiquidity sourceChains orderCount solverCount`;`${H9}${H9}`,tW({destination:M9,recepient:A9,amount:vU,timeout:hU,tokenGatewayAddress:iW(fU),relayerFee:vU,callData:KU(iW(fU)),redeem:xU}),tW({substrate_account:BU(32),evm_account:BU(20),dest_state_machine:M9,timeout:hU,account_nonce:hU});var Yle=.1;function Xle(e){let t=e=>/^\d+(\.\d+)?$/.test(e.trim())&&Number(e)>0;for(let n of e){if(!n.chain?.trim())throw Error(`Each vault must have a non-empty 'chain' (e.g. EVM-8453)`);if(!n.vault?.trim())throw Error(`Each vault entry must include a 'vault' address`);if(n.threshold!==void 0&&!t(n.threshold))throw Error(`Vault ${n.vault} 'threshold' must be a positive number`);if(n.minBalance!==void 0&&!t(n.minBalance))throw Error(`Vault ${n.vault} 'minBalance' must be a positive number`);if(n.threshold!==void 0){if(n.minBalance===void 0)throw Error(`Vault ${n.vault} sets 'threshold' so it must also set 'minBalance'`);if(Number(n.threshold)<=Number(n.minBalance))throw Error(`Vault ${n.vault} 'threshold' must be greater than 'minBalance'`)}}}function Zle(e){if(!e.url)throw Error(`orderbook.url is required`);let t=[[`defaultTtlSecs`,e.defaultTtlSecs,900],[`reconcileIntervalSecs`,e.reconcileIntervalSecs,1],[`requestTimeoutMs`,e.requestTimeoutMs,1]];for(let[e,n,r]of t)if(n!==void 0&&(!Number.isInteger(n)||n<r))throw Error(`orderbook.${e} must be an integer >= ${r}; got ${n}`)}function Qle(e,t=!1){if(`strategies`in e)throw Error(`[[strategies]] was removed — declare top-level [[pairs]] instead (a same-token pair like USDC/USDC with an ask curve below par replaces the stable strategy; engine settings moved to [confirmationPolicies])`);if(t||e.simplex?.watchOnly,!e.simplex?.substratePrivateKey)throw Error(`simplex.substratePrivateKey is required`);if(!e.simplex?.hyperbridgeWsUrl)throw Error(`simplex.hyperbridgeWsUrl is required`);if(!e.chains||e.chains.length===0)throw Error(`At least one chain must be configured`);for(let t of e.chains){if(!Array.isArray(t.rpcUrls)||t.rpcUrls.length===0||t.rpcUrls.some(e=>!e))throw Error(`Each chain configuration must have rpcUrls (a non-empty array of strings)`);if(!t.bundlerUrl)throw Error(`Each chain configuration must have bundlerUrl`)}let n=e.simplex.maxConcurrentOrders;if(n!==void 0&&(!Number.isInteger(n)||n<1))throw Error(`simplex.maxConcurrentOrders must be an integer >= 1; got ${n}`);let r=e.simplex.blockScanIntervalSeconds;if(r!==void 0&&(!Number.isFinite(r)||r<.1))throw Error(`simplex.blockScanIntervalSeconds must be a number >= ${Yle} (seconds); got ${r}`);if(e.allowlist){for(let t of e.allowlist.users??[])if(!Dx(t))throw Error(`allowlist.users contains an invalid address: ${t}`);for(let[t,n]of Object.entries(e.allowlist.bySource??{})){if(!Array.isArray(n))throw Error(`allowlist.bySource."${t}" must be an array of addresses`);for(let e of n)if(!Dx(e))throw Error(`allowlist.bySource."${t}" contains an invalid address: ${e}`)}}if(e.vault?.vaults?.length&&Xle(e.vault.vaults),!e.orderbook)throw Error(`an [orderbook] section is required`);Zle(e.orderbook),e.assets&&Ux(e.assets),(e.pairs?.length??0)>0&&Bre(e.pairs,e.assets),e.confirmationPolicies&&new Cv(e.confirmationPolicies)}var $le=`Enter a valid 64-character hexadecimal EVM private key.`,eue=`Invalid EVM private key.`;function U9(e){let t=e.trim();return t?/^(0x)?[0-9a-fA-F]{64}$/.test(t)?void 0:$le:`Enter the EVM private key.`}var W9=zx;function G9(e,t=`USDC`){return{enabled:!0,token0:t,token1:e}}function tue(e){return{network:`mainnet`,signerType:`privateKey`,signerKey:``,signerKeyValidation:`empty`,mpcVault:{apiToken:``,vaultUuid:``,accountAddress:``,callbackClientSignerPublicKey:``,grpcTarget:``},turnkey:{organizationId:``,apiPublicKey:``,apiPrivateKey:``,signWith:``},substrateKey:``,hyperbridgeWsUrl:e.hyperbridgeWs.mainnet,alchemyKey:``,chains:e.chains.map(e=>({meta:e,enabled:!1,rpcUrls:[``],bundlerUrl:``,viaAlchemy:!1,watchOnly:!1})),pairs:[],customAssets:{},vaults:[],allowlistUsers:[],maxConcurrentOrders:String(e.maxConcurrentOrders),logging:`info`}}function K9(e){return e.chains.filter(e=>e.enabled)}function nue(e){return e.pairs.filter(e=>e.enabled)}function q9(e){let t=e.trim();return t&&!t.startsWith(`0x`)?`0x${t}`:t}function rue(e,t,n){return e.map((e,r)=>r===t?{...e,...n}:e)}function iue(e,t){return e.filter((e,n)=>n!==t)}function aue(e,t,n){return{...e,chains:e.chains.map(e=>e.meta.chainId===t?{...e,...n}:e)}}function J9(e,t){let n=K9(e),r=nue(e).map(e=>({token0:e.token0,token1:e.token1})),i=new Set(r.flatMap(e=>[e.token0,e.token1])),a=Object.fromEntries(Object.entries(e.customAssets).filter(([e])=>i.has(e)&&!Hx(e)).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([,e])=>e.trim()))])),o=kR(e.vaults),s=o.length>0?o:void 0,c=n.filter(e=>e.watchOnly).map(e=>[String(e.meta.chainId),!0]),l=e.allowlistUsers;return{simplex:{signer:e.signerType===`privateKey`?{type:`privateKey`,key:q9(e.signerKey)}:e.signerType===`mpcVault`?{type:`mpcVault`,apiToken:e.mpcVault.apiToken.trim(),vaultUuid:e.mpcVault.vaultUuid.trim(),accountAddress:e.mpcVault.accountAddress.trim(),callbackClientSignerPublicKey:e.mpcVault.callbackClientSignerPublicKey.trim(),...e.mpcVault.grpcTarget.trim()?{grpcTarget:e.mpcVault.grpcTarget.trim()}:{}}:{type:`turnkey`,organizationId:e.turnkey.organizationId.trim(),apiPublicKey:e.turnkey.apiPublicKey.trim(),apiPrivateKey:e.turnkey.apiPrivateKey.trim(),signWith:e.turnkey.signWith.trim()},maxConcurrentOrders:Number(e.maxConcurrentOrders)||t.maxConcurrentOrders,...e.logging===`info`?{}:{logging:e.logging},...c.length>0?{watchOnly:Object.fromEntries(c)}:{},substratePrivateKey:e.substrateKey.trim(),hyperbridgeWsUrl:e.hyperbridgeWsUrl.trim()},...Object.keys(a).length>0?{assets:a}:{},pairs:r,chains:n.map(e=>({rpcUrls:e.rpcUrls.map(e=>e.trim()).filter(Boolean),bundlerUrl:e.bundlerUrl.trim()})),...s?{vault:{vaults:s}}:{},...l.length>0?{allowlist:{users:l}}:{}}}function Y9(e){return K9(e).map(e=>`${e.meta.label} (chainId ${e.meta.chainId})`)}function X9(e){return(0,L.jsxs)(`label`,{className:`field`,style:e.style,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[e.label,e.required?(0,L.jsx)(`span`,{className:`field-required`,children:`Required`}):null]}),(0,L.jsx)(`input`,{type:e.type??`text`,value:e.value,placeholder:e.placeholder,required:e.required,onChange:t=>e.onChange(t.target.value),onBlur:e.onBlur,"aria-invalid":e.ariaInvalid})]})}var oue=[{value:`privateKey`,label:`Private key`},{value:`mpcVault`,label:`MPCVault`},{value:`turnkey`,label:`Turnkey`}],sue={privateKey:{title:`Direct wallet control`,description:`Use a dedicated EVM wallet. The encrypted local config is the only place this credential is stored.`},mpcVault:{title:`Institutional MPC custody`,description:`Connect your MPCVault account and registered client signer to authorize fills without exposing a private key.`},turnkey:{title:`Hosted key management`,description:`Connect an API keypair created in your Turnkey dashboard and select the wallet that signs fills.`}},cue=[{key:`apiToken`,label:`API token`,type:`password`},{key:`vaultUuid`,label:`Vault UUID`},{key:`accountAddress`,label:`Wallet address in the vault (0x…)`},{key:`callbackClientSignerPublicKey`,label:`Callback client-signer public key (ssh-ed25519 …)`},{key:`grpcTarget`,label:`gRPC target (optional, defaults to api.mpcvault.com:443)`}],lue=[{key:`organizationId`,label:`Organization ID`},{key:`apiPublicKey`,label:`API public key`},{key:`apiPrivateKey`,label:`API private key`,type:`password`},{key:`signWith`,label:`Wallet address to sign with (0x…)`}];function uue({state:e,setState:t}){let n=(0,b.useRef)(0),[r,i]=(0,b.useState)(),[a,o]=(0,b.useState)(!1),s=sue[e.signerType],c=e=>{let r=++n.current;o(!1),i(void 0);let a=U9(e);if(a){t(t=>({...t,signerKey:e,signerAddress:void 0,signerKeyValidation:e.trim()?`invalid`:`empty`,signerKeyValidationMessage:a}));return}t(t=>({...t,signerKey:e,signerAddress:void 0,signerKeyValidation:`checking`,signerKeyValidationMessage:void 0})),ve.post(`/api/setup/derive-evm-address`,{privateKey:q9(e)}).then(({address:e})=>{r===n.current&&t(t=>({...t,signerAddress:e,signerKeyValidation:`valid`,signerKeyValidationMessage:void 0}))}).catch(()=>{r===n.current&&t(e=>({...e,signerAddress:void 0,signerKeyValidation:`error`,signerKeyValidationMessage:eue}))})},l=()=>{e.signerAddress&&navigator.clipboard.writeText(e.signerAddress).then(()=>{o(!0),window.setTimeout(()=>o(!1),1600)}).catch(()=>i(`Could not copy the filler wallet address. Select it and copy it manually.`))},u=e.signerKeyValidation??`empty`,d=e.signerKeyValidationMessage??(u===`checking`?`Checking the EVM private key…`:u===`valid`?`EVM private key is valid.`:`Enter the EVM private key.`);return(0,L.jsx)(`div`,{className:`wizard-sections signer-step`,children:(0,L.jsxs)(`section`,{className:`card signer-card`,"aria-labelledby":`signer-title`,children:[(0,L.jsx)(`div`,{className:`card-heading`,children:(0,L.jsx)(`h2`,{id:`signer-title`,children:`Filler wallet`})}),(0,L.jsx)(`p`,{className:`hint`,children:`This wallet signs fills and holds the funds used for orders. Its credentials stay private on this machine.`}),(0,L.jsx)(ky,{options:oue,value:e.signerType,onChange:e=>t(t=>({...t,signerType:e})),className:`signer-tabs`,ariaLabel:`Filler wallet signing method`}),(0,L.jsx)(`div`,{className:`signer-method-summary`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:s.title}),(0,L.jsx)(`p`,{children:s.description})]})}),e.signerType===`privateKey`&&(0,L.jsxs)(`div`,{className:`signer-credentials`,children:[(0,L.jsx)(X9,{label:`EVM private key (64 hex characters; 0x optional)`,type:`password`,required:!0,value:e.signerKey,placeholder:`0x…`,ariaInvalid:u===`invalid`||u===`error`,onChange:c}),(0,L.jsxs)(`div`,{className:`signer-key-validation signer-key-validation-${u}`,role:`status`,"aria-live":`polite`,children:[(0,L.jsx)(`span`,{className:`signer-key-validation-icon`,"aria-hidden":`true`,children:u===`valid`?(0,L.jsx)(Te,{}):u===`checking`?(0,L.jsx)(`span`,{className:`signer-key-validation-spinner`}):u===`empty`?(0,L.jsx)(`span`,{className:`signer-key-validation-dot`}):(0,L.jsx)(De,{})}),(0,L.jsx)(`span`,{children:d})]}),(0,L.jsx)(`p`,{className:`credential-note`,children:`Use a dedicated wallet and keep the generated config file protected. The key is checked by the local Simplex server and never persisted by validation.`}),e.signerAddress&&(0,L.jsxs)(`aside`,{className:`filler-address-callout`,"aria-labelledby":`filler-address-title`,children:[(0,L.jsxs)(`div`,{className:`filler-address-heading`,children:[(0,L.jsx)(`span`,{className:`filler-address-status`,"aria-hidden":`true`,children:(0,L.jsx)(Te,{})}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{id:`filler-address-title`,children:`Filler wallet address`}),(0,L.jsx)(`p`,{children:`Confirm this is the wallet you intend to fund.`})]})]}),(0,L.jsxs)(`div`,{className:`filler-address-value`,children:[(0,L.jsx)(`code`,{children:e.signerAddress}),(0,L.jsxs)(`button`,{type:`button`,onClick:l,"aria-live":`polite`,children:[a?(0,L.jsx)(Te,{"aria-hidden":`true`}):(0,L.jsx)(R,{"aria-hidden":`true`}),a?`Copied`:`Copy`]})]})]})]}),e.signerType===`mpcVault`&&(0,L.jsx)(`div`,{className:`signer-credentials`,children:cue.map(n=>(0,L.jsx)(X9,{label:n.label,type:n.type,required:n.key!==`grpcTarget`,value:e.mpcVault[n.key],onChange:e=>t(t=>({...t,mpcVault:{...t.mpcVault,[n.key]:e}}))},n.key))}),e.signerType===`turnkey`&&(0,L.jsx)(`div`,{className:`signer-credentials`,children:lue.map(n=>(0,L.jsx)(X9,{label:n.label,type:n.type,required:!0,value:e.turnkey[n.key],onChange:e=>t(t=>({...t,turnkey:{...t.turnkey,[n.key]:e}}))},n.key))}),r&&(0,L.jsx)(`p`,{className:`error`,children:r})]})})}function due(){return(0,L.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 20 20`,width:`16`,height:`16`,children:(0,L.jsx)(`path`,{d:`M6.75 6.75h7.5v7.5h-7.5zM4 11V4h7`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function fue(e){let[t,n]=(0,b.useState)(!1),[r,i]=(0,b.useState)(`idle`),a=e.phrase.trim().split(/\s+/);return(0,L.jsx)(Lp,{open:!0,dismissible:!1,children:(0,L.jsxs)(Rp,{className:`recovery-dialog`,overlayClassName:`dialog-overlay`,preventEscapeKeyDown:!0,children:[(0,L.jsxs)(`header`,{className:`recovery-dialog-header`,children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`New Hyperbridge account`}),(0,L.jsx)(zp,{children:`Back up your recovery phrase`}),(0,L.jsx)(Bp,{children:`Write these words down in order and store them somewhere private. You will need them to recover this account.`})]}),(0,L.jsxs)(`div`,{className:`recovery-warning`,role:`note`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`!`}),(0,L.jsxs)(`p`,{children:[(0,L.jsx)(`strong`,{children:`Keep it private.`}),` Anyone with this phrase can control the account and its funds.`]})]}),(0,L.jsx)(`ol`,{className:`recovery-words`,"aria-label":`Recovery phrase words`,children:a.map((e,t)=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:t+1}),(0,L.jsx)(`strong`,{children:e})]},`${t}-${e}`))}),(0,L.jsxs)(`div`,{className:`recovery-copy-row`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`secondary`,onClick:async()=>{try{await navigator.clipboard.writeText(e.phrase),i(`copied`)}catch{i(`failed`)}},children:[(0,L.jsx)(due,{}),r===`copied`?`Copied`:`Copy recovery phrase`]}),(0,L.jsx)(`span`,{className:`recovery-copy-status`,"data-state":r,role:`status`,children:r===`copied`?`Recovery phrase copied to clipboard.`:r===`failed`?`Clipboard unavailable. Write the phrase down manually.`:``})]}),(0,L.jsxs)(`label`,{className:`recovery-acknowledgement`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,L.jsx)(`span`,{children:`I’ve saved these words somewhere safe.`})]}),(0,L.jsx)(`footer`,{className:`recovery-dialog-footer`,children:(0,L.jsx)(`button`,{type:`button`,className:`primary`,disabled:!t,onClick:e.onAcknowledge,children:`I’ve saved it`})})]})})}function pue({state:e,setState:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)(`idle`),c=async()=>{r(!0),a(void 0),s(`idle`);try{let{mnemonic:e,address:n}=await ve.post(`/api/setup/generate-substrate-key`);t(t=>({...t,substrateKey:e,generatedMnemonic:e,substrateAddress:n}))}catch(e){a(e instanceof Error?e.message:String(e))}finally{r(!1)}},l=async()=>{if(e.substrateKey.trim())try{let{address:n}=await ve.post(`/api/setup/generate-substrate-key`,{key:e.substrateKey.trim()});s(`idle`),t(e=>({...e,substrateAddress:n,generatedMnemonic:void 0}))}catch(e){a(e instanceof Error?e.message:String(e))}},u=async()=>{r(!0),a(void 0);try{let n=await ve.post(`/api/setup/check-substrate-balance`,{wsUrl:e.hyperbridgeWsUrl.trim(),key:e.substrateKey.trim()});t(e=>({...e,substrateAddress:n.address,balanceCheck:{funded:n.funded,free:n.free,decimals:n.decimals}}))}catch(e){a(e instanceof Error?e.message:String(e))}finally{r(!1)}},d=async()=>{if(e.substrateAddress)try{await navigator.clipboard.writeText(e.substrateAddress),s(`copied`)}catch{s(`failed`)}},f=e.balanceCheck?(Number(e.balanceCheck.free)/10**e.balanceCheck.decimals).toLocaleString():null;return(0,L.jsxs)(`div`,{className:`substrate-card`,children:[(0,L.jsxs)(`div`,{className:`substrate-account-options`,children:[(0,L.jsxs)(`section`,{className:`substrate-account-option`,"aria-labelledby":`new-account-title`,children:[(0,L.jsx)(`h3`,{id:`new-account-title`,children:`New account`}),(0,L.jsx)(`p`,{children:`Generate a dedicated account and save its recovery phrase.`}),(0,L.jsxs)(`button`,{type:`button`,className:`primary substrate-generate-button`,onClick:c,disabled:n,children:[`Generate account `,(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]})]}),(0,L.jsxs)(`section`,{className:`substrate-account-option substrate-import-option`,"aria-labelledby":`existing-account-title`,children:[(0,L.jsx)(`h3`,{id:`existing-account-title`,children:`Existing account`}),(0,L.jsx)(`p`,{children:`Import the account you already use for Hyperbridge.`}),(0,L.jsx)(X9,{label:`Recovery phrase or hex seed`,type:`password`,required:!0,value:e.substrateKey,onChange:e=>{s(`idle`),t(t=>({...t,substrateKey:e,generatedMnemonic:void 0,balanceCheck:void 0}))},onBlur:l})]})]}),e.generatedMnemonic?(0,L.jsx)(fue,{phrase:e.generatedMnemonic,onAcknowledge:()=>t(e=>({...e,generatedMnemonic:void 0}))}):null,e.substrateAddress?(0,L.jsxs)(`section`,{className:`substrate-address`,"aria-labelledby":`substrate-address-title`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{id:`substrate-address-title`,children:`Hyperbridge address`}),(0,L.jsx)(`code`,{children:e.substrateAddress})]}),(0,L.jsxs)(`button`,{type:`button`,className:`secondary substrate-copy-button`,onClick:d,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`⧉`}),o===`copied`?`Copied`:`Copy`]}),(0,L.jsx)(`p`,{className:`substrate-address-status`,"data-state":o,role:`status`,children:o===`copied`?`Address copied to clipboard.`:o===`failed`?`Clipboard unavailable.`:`Fund this account with BRIDGE before taking orders.`})]}):null,(0,L.jsxs)(`section`,{className:`substrate-connection`,"aria-labelledby":`substrate-connection-title`,children:[(0,L.jsxs)(`div`,{className:`substrate-section-heading`,children:[(0,L.jsx)(`h3`,{id:`substrate-connection-title`,children:`Connection`}),(0,L.jsx)(`p`,{children:`Used to submit bids and track execution.`})]}),(0,L.jsx)(X9,{label:`Hyperbridge WebSocket URL`,required:!0,value:e.hyperbridgeWsUrl,onChange:e=>t(t=>({...t,hyperbridgeWsUrl:e}))})]}),(0,L.jsxs)(`section`,{className:`substrate-balance`,"aria-labelledby":`substrate-balance-title`,children:[(0,L.jsxs)(`div`,{className:`substrate-section-heading`,children:[(0,L.jsx)(`h3`,{id:`substrate-balance-title`,children:`BRIDGE balance`}),(0,L.jsx)(`p`,{children:`Check whether this account is ready to submit bids.`})]}),(0,L.jsx)(`button`,{type:`button`,className:`secondary substrate-balance-button`,onClick:u,disabled:n||!e.substrateKey.trim(),children:`Check balance`}),e.balanceCheck?(0,L.jsxs)(`div`,{className:`substrate-balance-state`,"data-state":e.balanceCheck.funded?`funded`:`unfunded`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:e.balanceCheck.funded?`${f} BRIDGE available`:`Not funded yet`}),(0,L.jsx)(`p`,{children:e.balanceCheck.funded?`This account is ready to submit bids.`:`You can continue setup, then fund this address before taking orders.`})]})]}):null]}),i?(0,L.jsx)(`p`,{className:`error`,children:i}):null]})}function mue({state:e,setState:t}){let[n,r]=(0,b.useState)(!1),i=(e,n)=>t(t=>aue(t,e,n)),a=async()=>{if(e.alchemyKey.trim()){r(!0);try{let n=await ve.post(`/api/setup/validate-alchemy-key`,{apiKey:e.alchemyKey.trim()});t(e=>({...e,alchemyStatus:n.valid?`ok`:`err`,alchemyError:n.error,chains:n.valid?e.chains.map(e=>{let t=n.chains.find(t=>t.chainId===e.meta.chainId);return t?.rpcUrl?{...e,rpcUrls:[t.rpcUrl,...e.rpcUrls.slice(1)],bundlerUrl:t.bundlerUrl??e.bundlerUrl,viaAlchemy:!0,rpcStatus:void 0}:e}):e.chains})),n.valid?P.success(`Provider endpoints added`,{description:`Supported chain endpoints were filled from your Alchemy key.`}):P.error(`Alchemy key could not be validated`,{description:n.error})}catch(e){let n=e instanceof Error?e.message:String(e);t(e=>({...e,alchemyStatus:`err`,alchemyError:n})),P.error(`Alchemy key could not be validated`,{description:n})}finally{r(!1)}}},o=async e=>{let t=P.loading(`Verifying ${e.meta.label}`,{description:`Checking the RPC and bundler endpoints.`});i(e.meta.chainId,{rpcStatus:`checking`,rpcError:void 0,bundlerWarning:void 0});let n=e.rpcUrls.map(e=>e.trim()).filter(Boolean);try{let r=await ve.post(`/api/setup/validate-rpc`,{urls:n,expectedChainId:e.meta.chainId});if(!r.ok){let n=r.error??r.results.find(e=>e.error)?.error??`RPC check failed`;i(e.meta.chainId,{rpcStatus:`err`,rpcError:n}),P.error(`${e.meta.label} RPC could not be verified`,{description:n,id:t});return}i(e.meta.chainId,{rpcStatus:`ok`})}catch(n){let r=n instanceof Error?n.message:String(n);i(e.meta.chainId,{rpcStatus:`err`,rpcError:r}),P.error(`${e.meta.label} RPC could not be verified`,{description:r,id:t});return}if(e.bundlerUrl.trim())try{let n=await ve.post(`/api/setup/validate-bundler`,{url:e.bundlerUrl.trim(),chainId:e.meta.chainId});if(i(e.meta.chainId,{bundlerWarning:n.warning,bundlerOk:!n.warning}),n.warning){P.warning(`${e.meta.label} RPC verified`,{description:n.warning,id:t});return}}catch(n){let r=`Bundler check failed: ${n instanceof Error?n.message:n}`;i(e.meta.chainId,{bundlerWarning:r,bundlerOk:!1}),P.error(`${e.meta.label} bundler could not be verified`,{description:r,id:t});return}P.success(`${e.meta.label} endpoints verified`,{description:e.bundlerUrl.trim()?`RPC and bundler connections are ready.`:`RPC connection is ready.`,id:t})};return(0,L.jsxs)(`div`,{className:`wizard-sections chains-step`,children:[(0,L.jsxs)(`div`,{className:`card`,children:[(0,L.jsx)(`h2`,{children:`Provider key`}),(0,L.jsx)(`p`,{className:`hint`,children:`One Alchemy API key can fill in the RPC and bundler URL for every supported chain — Alchemy serves ERC-4337 bundler methods on the same endpoint. Use premium endpoints with archive access; free tiers rate-limit and break event scanning. Every field stays editable if you prefer other providers (e.g. a Pimlico bundler).`}),(0,L.jsxs)(`div`,{className:`chain-provider-controls`,children:[(0,L.jsx)(`input`,{type:`password`,"aria-label":`Alchemy API key`,style:{maxWidth:`24rem`},placeholder:`Alchemy API key (optional)`,value:e.alchemyKey,onChange:e=>t(t=>({...t,alchemyKey:e.target.value,alchemyStatus:void 0}))}),(0,L.jsx)(`button`,{type:`button`,onClick:a,disabled:n||!e.alchemyKey.trim(),children:`Validate & prefill`})]})]}),e.chains.map(e=>(0,L.jsxs)(Yv,{className:`card chain-configuration`,"data-enabled":e.enabled,open:e.enabled,children:[(0,L.jsxs)(`div`,{className:`chain-configuration-header`,children:[(0,L.jsxs)(`div`,{className:`chain-identity`,children:[(0,L.jsx)(Ov,{label:e.meta.label}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{children:e.meta.label}),e.viaAlchemy&&(0,L.jsx)(`span`,{className:`chain-source`,children:`Configured with Alchemy`})]})]}),(0,L.jsxs)(`label`,{className:`chain-enable-toggle`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:t=>i(e.meta.chainId,{enabled:t.target.checked})}),(0,L.jsx)(`span`,{className:`chain-enable-switch`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{children:`Enable fills`})]})]}),(0,L.jsx)(Zv,{className:`chain-collapsible-content`,children:(0,L.jsxs)(`div`,{className:`chain-configuration-fields`,children:[e.rpcUrls.map((t,n)=>(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[n===0?`RPC endpoint`:`Backup RPC endpoint`,n===0?(0,L.jsx)(`span`,{className:`field-required`,children:`Required`}):null]}),n===0&&(0,L.jsx)(`small`,{children:`Used to read the chain and find orders.`}),n>0&&(0,L.jsx)(`small`,{children:`A second provider helps protect against bad or unavailable data.`}),(0,L.jsxs)(`div`,{className:`row`,children:[(0,L.jsx)(`input`,{type:`text`,style:{flex:1},value:t,required:n===0,onChange:t=>i(e.meta.chainId,{rpcUrls:e.rpcUrls.map((e,r)=>r===n?t.target.value:e),rpcStatus:void 0,viaAlchemy:n===0?!1:e.viaAlchemy})}),n>0&&(0,L.jsx)(`button`,{type:`button`,onClick:()=>i(e.meta.chainId,{rpcUrls:e.rpcUrls.filter((e,t)=>t!==n)}),children:`✕`})]})]},n)),(0,L.jsxs)(`div`,{className:`chain-backup-rpc`,children:[(0,L.jsxs)(`button`,{className:`chain-add-backup-button`,type:`button`,title:`A backup RPC lets Simplex compare independent providers before it acts on chain data.`,onClick:()=>i(e.meta.chainId,{rpcUrls:[...e.rpcUrls,``]}),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),`Add backup RPC`]}),(0,L.jsxs)(`p`,{className:`chain-info-text`,children:[(0,L.jsx)(`span`,{className:`chain-info-icon`,"aria-hidden":`true`,children:`i`}),(0,L.jsx)(`span`,{children:`A backup lets Simplex compare providers before it acts on chain data.`})]})]}),(0,L.jsxs)(`label`,{className:`field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[`Bundler endpoint `,(0,L.jsx)(`span`,{className:`field-required`,children:`Required`})]}),(0,L.jsx)(`small`,{children:`Used to submit sponsored fills on this chain.`}),(0,L.jsx)(`input`,{type:`text`,value:e.bundlerUrl,required:!0,onChange:t=>i(e.meta.chainId,{bundlerUrl:t.target.value}),placeholder:`https://api.pimlico.io/v2/<chainId>/rpc?apikey=…`})]}),(0,L.jsxs)(`div`,{className:`chain-configuration-actions`,children:[(0,L.jsx)(`button`,{type:`button`,disabled:!e.rpcUrls[0]?.trim()||e.rpcStatus===`checking`,onClick:()=>o(e),children:e.rpcStatus===`checking`?`Verifying…`:`Verify`}),(0,L.jsxs)(`label`,{className:`chain-watch-toggle`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:e.watchOnly,onChange:t=>i(e.meta.chainId,{watchOnly:t.target.checked})}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`strong`,{children:`Observe only`}),(0,L.jsx)(`small`,{children:`Monitor orders without filling them.`})]})]})]})]})})]},e.meta.chainId))]})}var Z9=`__custom_token__`;function hue(e){let{label:t,value:n,symbols:r,custom:i,onSelect:a,onCustom:o}=e,s=i?Z9:n,c=r.map(e=>({value:e,label:e,leading:(0,L.jsx)(lm,{symbol:e})}));return c.push({value:Z9,label:`Custom token`,leading:(0,L.jsx)(lm,{symbol:``}),muted:!0,separatorBefore:!0}),(0,L.jsx)(mg,{value:s,options:c,onValueChange:e=>e===Z9?o():a(e),placeholder:`Choose token`,ariaLabel:t,required:!0})}function Q9(e){let{label:t,value:n,symbols:r,custom:i,onSelect:a,onCustom:o,onCustomSymbol:s}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`field market-symbol-field`,children:[(0,L.jsxs)(`span`,{className:`field-label field-label-required-mark`,children:[t,(0,L.jsx)(`span`,{className:`field-required-mark`,"aria-hidden":`true`,children:`*`})]}),(0,L.jsx)(hue,{label:t,value:n,symbols:r,custom:i,onSelect:a,onCustom:o})]}),i&&(0,L.jsxs)(`label`,{className:`field market-symbol-field market-custom-symbol-field`,children:[(0,L.jsxs)(`span`,{className:`field-label`,children:[`Symbol `,(0,L.jsx)(`span`,{className:`field-required`,children:`Required`})]}),(0,L.jsx)(`input`,{type:`text`,required:!0,placeholder:`e.g. BRZ`,value:n,onChange:e=>s(W9(e.target.value))})]})]})}function gue(e){let{pair:t,symbols:n,usdStables:r,chains:i,duplicate:a,customAssets:o,onPatch:s,onSymbolChange:c,onRenameAsset:l,onCustomAddress:u}=e,d=t.custom0??!1,f=t.custom1??!1,p=W9(t.token0)!==``&&W9(t.token0)===W9(t.token1),m=[t.token0,t.token1].filter((e,t)=>(t===0?d:f)&&e&&Hx(e));return(0,L.jsxs)(`section`,{className:`market-editor`,children:[(0,L.jsx)(`div`,{className:`market-editor-heading`,children:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`markets-kicker`,children:`Token pair`}),(0,L.jsx)(`h3`,{children:`Choose the two assets`}),(0,L.jsx)(`p`,{className:`hint`,children:`Simplex can buy or sell either side of this pair.`})]})}),(0,L.jsxs)(`div`,{className:`market-asset-grid`,children:[(0,L.jsx)(Q9,{label:`First asset`,value:t.token0,symbols:n,custom:d,onSelect:e=>{l(t.token0,e),c({token0:e,custom0:!1})},onCustom:()=>c({token0:``,custom0:!0}),onCustomSymbol:e=>{l(t.token0,e),c({token0:e})}}),(0,L.jsx)(Q9,{label:`Second asset`,value:t.token1,symbols:n,custom:f,onSelect:e=>{l(t.token1,e),c({token1:e,custom1:!1})},onCustom:()=>c({token1:``,custom1:!0}),onCustomSymbol:e=>{l(t.token1,e),c({token1:e})}})]}),a&&(0,L.jsx)(`p`,{className:`error`,children:`This market is already declared (a pair and its reverse are the same market — one orientation only).`}),p&&(0,L.jsx)(`p`,{className:`error`,children:`Choose two different assets. Same-asset transfer markets are not supported here.`}),m.length>0&&(0,L.jsxs)(`p`,{className:`error`,children:[m.join(`, `),` ships with the registry — pick it from the dropdown instead of entering it as a custom token (a custom address here would silently repoint the real asset).`]}),[...d&&t.token0?[t.token0]:[],...f&&t.token1&&t.token1!==t.token0?[t.token1]:[]].map(e=>(0,L.jsx)(_ue,{symbol:e,chains:i,addresses:o[e]??{},onAddress:(t,n)=>u(e,t,n)},e))]})}function _ue(e){let{symbol:t,chains:n,addresses:r,onAddress:i}=e,[a,o]=(0,b.useState)({}),s=async e=>{let t=(r[e.meta.stateMachineId]??``).trim();if(!(!t||!e.rpcUrls[0]?.trim()))try{let n=await ve.post(`/api/setup/validate-token`,{rpcUrl:e.rpcUrls[0].trim(),address:t});o(t=>({...t,[e.meta.stateMachineId]:n.ok?{ok:`${n.symbol} (${n.decimals} decimals)`}:{err:n.error}}))}catch(t){o(n=>({...n,[e.meta.stateMachineId]:{err:t instanceof Error?t.message:String(t)}}))}};return(0,L.jsxs)(`div`,{className:`custom-asset-addresses`,children:[(0,L.jsxs)(`p`,{className:`hint`,children:[t,` contract address per chain it exists on (at least one required):`]}),n.map(e=>(0,L.jsxs)(`div`,{className:`field custom-asset-chain`,children:[(0,L.jsx)(`span`,{children:e.meta.label}),(0,L.jsxs)(`div`,{className:`custom-asset-chain-control`,children:[(0,L.jsx)(`input`,{type:`text`,"aria-label":`${t} contract address on ${e.meta.label}`,placeholder:`0x… (leave empty if the token isn't on this chain)`,value:r[e.meta.stateMachineId]??``,onChange:t=>i(e.meta.stateMachineId,t.target.value)}),(0,L.jsx)(`button`,{type:`button`,disabled:!(r[e.meta.stateMachineId]??``).trim(),onClick:()=>s(e),children:`Verify`}),a[e.meta.stateMachineId]?.ok&&(0,L.jsx)(`span`,{className:`badge ok`,children:a[e.meta.stateMachineId].ok}),a[e.meta.stateMachineId]?.err&&(0,L.jsx)(`span`,{className:`badge err`,children:a[e.meta.stateMachineId].err})]})]},e.meta.chainId))]})}function vue(e){let{state:t,setState:n,defaults:r}=e,i=K9(t),a=[...new Set(i.flatMap(e=>(r.knownTokens[e.meta.stateMachineId]??[]).map(e=>e.symbol)))].sort((e,t)=>Number(r.usdStables.includes(t))-Number(r.usdStables.includes(e))),o=t.pairs.map((e,t)=>({pair:e,index:t})),s=t.pairs.filter(e=>e.enabled),c=new Set,l=new Set;for(let e of s){let t=`${W9(e.token0)}/${W9(e.token1)}`,n=`${W9(e.token1)}/${W9(e.token0)}`;(l.has(t)||l.has(n))&&c.add(t),l.add(t)}let u=a.find(e=>W9(e)===`CNGN`)??a.find(e=>!r.usdStables.includes(W9(e)))??`USDT`,d=a.some(e=>W9(e)===`USDT`);return(0,b.useEffect)(()=>{n(e=>{if(e.fxSeeded)return e;let t=[G9(u)];return W9(u)===`CNGN`&&d&&t.push(G9(u,`USDT`)),{...e,fxSeeded:!0,pairs:[...e.pairs,...t]}})},[u,r.usdStables,d,n]),{chains:i,availableSymbols:a,marketRows:o,enabled:s,duplicateKeys:c,defaultToken1:u,patchPair:(e,t)=>n(n=>({...n,pairs:rue(n.pairs,e,t)}))}}function yue({state:e,setState:t,defaults:n}){let[r,i]=(0,b.useState)(null),{chains:a,availableSymbols:o,marketRows:s,enabled:c,duplicateKeys:l,defaultToken1:u,patchPair:d}=vue({state:e,setState:t,defaults:n}),f=r===null?null:e.pairs[r];return(0,L.jsxs)(`div`,{className:`wizard-sections strategies-step`,children:[(0,L.jsxs)(`section`,{className:`card market-flow-section markets-primary-section`,children:[(0,L.jsxs)(`div`,{className:`market-flow-heading markets-section-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`market-flow-step`,children:`2 · Trading markets`}),(0,L.jsx)(`h2`,{children:`Which token pairs should Simplex fill?`}),(0,L.jsx)(`p`,{className:`hint`,children:`Each market can be reviewed and priced in a focused editor.`})]}),(0,L.jsxs)(`button`,{type:`button`,className:`market-create-button`,onClick:()=>{let n=e.pairs.length;t(e=>({...e,pairs:[...e.pairs,G9(u)]})),i(n)},children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),` Create market`]})]}),(0,L.jsx)(`div`,{className:`market-overview-list`,children:s.map(({pair:e,index:t})=>(0,L.jsxs)(`div`,{className:`market-overview-row`,children:[(0,L.jsx)(um,{tokenA:e.token0,tokenB:e.token1}),(0,L.jsx)(`div`,{className:`market-overview-copy`,children:(0,L.jsxs)(`strong`,{children:[e.token0||`Choose asset`,` `,(0,L.jsx)(`span`,{children:`↔`}),` `,e.token1||`Choose asset`]})}),(0,L.jsx)(`button`,{type:`button`,className:`market-configure-button`,onClick:()=>i(t),children:`Configure`})]},t))})]}),(0,L.jsx)(oS,{open:f!==null,onClose:()=>i(null),title:f?`${f.token0||`New`} ↔ ${f.token1||`market`}`:`Configure market`,description:`Choose the token pair, order limit, and how each direction should be priced.`,children:f&&r!==null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(gue,{pair:f,symbols:o,usdStables:n.usdStables,chains:a,duplicate:l.has(`${W9(f.token0)}/${W9(f.token1)}`),customAssets:e.customAssets,onPatch:e=>d(r,e),onSymbolChange:e=>d(r,e),onRenameAsset:(e,n)=>t(t=>{let i={...t.customAssets},a=t.pairs.some((t,n)=>n!==r&&(t.token0===e||t.token1===e));return e&&i[e]&&e!==n&&!a&&(n&&!Hx(n)&&(i[n]=i[e]),delete i[e]),{...t,customAssets:i}}),onCustomAddress:(e,n,r)=>t(t=>Hx(e)?t:{...t,customAssets:{...t.customAssets,[e]:{...t.customAssets[e]??{},[n]:r}}})}),(0,L.jsxs)(`footer`,{className:`market-dialog-footer`,children:[(0,L.jsx)(`button`,{type:`button`,className:`market-delete-button`,onClick:()=>{t(e=>({...e,pairs:iue(e.pairs,r)})),i(null)},children:`Delete market`}),(0,L.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>i(null),children:`Done`})]})]})})]})}function bue({state:e,setState:t,defaults:n,goToStep:r}){let i=K9(e);return(0,L.jsx)(`div`,{className:`wizard-sections treasury-step`,children:(0,L.jsxs)(`section`,{className:`card treasury-section`,children:[(0,L.jsxs)(`div`,{className:`treasury-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`market-flow-step`,children:`Optional · Treasury automation`}),(0,L.jsx)(`h2`,{children:`Put idle liquidity to work`}),(0,L.jsx)(`p`,{className:`hint`,children:`Connect ERC-4626 vaults without taking working capital away from fills.`})]}),e.vaults.length>0&&(0,L.jsxs)(`span`,{className:`treasury-selected-count`,children:[e.vaults.length,` `,e.vaults.length===1?`vault`:`vaults`,` connected`]})]}),(0,L.jsxs)(`div`,{className:`treasury-flow`,role:`note`,"aria-label":`How treasury automation works`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`01`}),(0,L.jsx)(`strong`,{children:`Keep a reserve`}),(0,L.jsx)(`small`,{children:`The minimum balance remains immediately available.`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`02`}),(0,L.jsx)(`strong`,{children:`Sweep the excess`}),(0,L.jsx)(`small`,{children:`Funds above your threshold move into the vault.`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{children:`03`}),(0,L.jsx)(`strong`,{children:`Redeem for fills`}),(0,L.jsx)(`small`,{children:`Liquidity returns automatically when an order needs it.`})]})]}),(0,L.jsx)(OR,{chains:i.map(e=>({key:e.meta.stateMachineId,label:e.meta.label})),knownVaults:n.knownVaults,network:e.network,onEnableChain:()=>r(`chains`),rows:e.vaults,onChange:e=>t(t=>({...t,vaults:e}))})]})})}function xue({state:e,setState:t}){return(0,L.jsxs)(`div`,{className:`wizard-sections advanced-step`,children:[(0,L.jsxs)(`section`,{className:`card`,children:[(0,L.jsx)(`h2`,{children:`Runtime`}),(0,L.jsx)(`p`,{className:`hint`,children:`Working defaults are already selected. Change these only when operating conditions require it.`}),(0,L.jsxs)(`div`,{className:`row`,children:[(0,L.jsx)(X9,{label:`Max concurrent orders`,style:{maxWidth:`14rem`},value:e.maxConcurrentOrders,onChange:e=>t(t=>({...t,maxConcurrentOrders:e}))}),(0,L.jsx)(hg,{label:`Log level`,style:{maxWidth:`10rem`},value:e.logging,options:Uy.map(e=>({value:e,label:e})),onValueChange:e=>t(t=>({...t,logging:e}))})]}),(0,L.jsx)(`p`,{className:`section-footnote`,children:`Lower concurrency if RPC providers rate-limit. Gas fee bump and overfill protection retain their safe defaults.`})]}),(0,L.jsxs)(`section`,{className:`card`,children:[(0,L.jsx)(`h2`,{children:`Order access`}),(0,L.jsx)(`p`,{className:`hint`,children:`Optionally restrict fills to orders submitted by these user addresses.`}),(0,L.jsx)(Bv,{addresses:e.allowlistUsers,onChange:e=>t(t=>({...t,allowlistUsers:e}))})]})]})}var Sue=/^EIP-7702 delegation failed on all chains:\s*(.+?)\.\s*Shutting down for restart\.?$/i;function Cue(e){return e.length<=1?e[0]??`the enabled network`:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(`, `)}, and ${e.at(-1)}`}function wue(e,t){let n=e.match(Sue);if(!n)return e;let r=Array.from(n[1].matchAll(/\bEVM-(\d+)\b/g),([,e])=>{let n=Number.parseInt(e,10);return t.get(n)??`EVM chain ${n}`}),i=Cue(Array.from(new Set(r)));return`Simplex could not activate the filler wallet on ${i}. Make sure it holds at least 1 USDC or USDT on ${i}, confirm the RPC and bundler endpoints are reachable, then retry. If you use Docker, restart Simplex with the latest image.`}function Tue({state:e,defaults:t}){let[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)(`review`),[c,l]=(0,b.useState)();(0,b.useEffect)(()=>{let n=!1,i=J9(e,t);return ve.post(`/api/setup/preview`,{config:i,chainLabels:Y9(e),chainIds:K9(e).map(e=>e.meta.chainId)}).then(e=>{n||(r(e.toml),a(void 0))}).catch(e=>{n||(r(void 0),a(e instanceof Error?e.message:String(e)))}),()=>{n=!0}},[e,t]),(0,b.useEffect)(()=>{if(o!==`starting`)return;let e=setInterval(async()=>{try{let e=await ve.get(`/api/setup/start-status`);e.state===`running`?window.location.href=`/`:e.state===`failed`&&(s(`failed`),l(e.error))}catch{}},2e3);return()=>clearInterval(e)},[o]);let u=()=>{o!==`saving`&&(s(`saving`),l(void 0),ve.post(`/api/setup/save-and-start`,{config:J9(e,t),chainLabels:Y9(e),chainIds:K9(e).map(e=>e.meta.chainId)}).then(()=>s(`starting`)).catch(e=>{s(`failed`),l(e instanceof Error?e.message:String(e))}))},d=K9(e);if(o===`starting`)return(0,L.jsx)(`div`,{className:`wizard-sections review-step`,children:(0,L.jsxs)(`div`,{className:`card`,children:[(0,L.jsx)(`h2`,{children:`Starting the filler…`}),(0,L.jsx)(`p`,{className:`hint`,children:`Resolving chains, hydrating funding venues and setting up EIP-7702 delegation — this takes up to a minute. This page switches to the dashboard automatically.`})]})});let f=e.signerType===`privateKey`?e.signerAddress:e.signerType===`mpcVault`?e.mpcVault.accountAddress:e.turnkey.signWith,p=c?wue(c,new Map(d.map(e=>[e.meta.chainId,e.meta.label]))):void 0,m=t.configPath.lastIndexOf(`/`),h=m>=0?t.configPath.slice(0,m+1):``,g=m>=0?t.configPath.slice(m+1):t.configPath,_=h.split(`/`).filter(Boolean),v=_.length>3?`…/${_.slice(-3).join(`/`)}/`:h;return(0,L.jsxs)(`div`,{className:`wizard-sections review-step`,children:[(0,L.jsxs)(`section`,{className:`card review-accounts-section`,children:[(0,L.jsxs)(`header`,{className:`review-section-heading`,children:[(0,L.jsx)(`span`,{className:`markets-kicker`,children:`Funding checklist`}),(0,L.jsx)(`h2`,{children:`Fund your accounts`}),(0,L.jsx)(`p`,{children:`These are the two identities Simplex will use after launch.`})]}),(0,L.jsxs)(`div`,{className:`review-account-list`,children:[f&&(0,L.jsxs)(`article`,{className:`review-account-row`,children:[(0,L.jsxs)(`div`,{className:`review-account-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{children:`Filler wallet`}),(0,L.jsx)(`span`,{children:`EVM execution account`})]}),(0,L.jsx)(`span`,{className:`review-account-network`,children:`EVM`})]}),(0,L.jsx)(`p`,{children:`Fund with USDC or USDT on every enabled chain. Gas is covered by the paymaster.`}),(0,L.jsx)(`div`,{className:`review-account-value`,children:(0,L.jsx)(B,{value:f,chars:42,copyLabel:`Copy filler wallet address`})})]}),e.substrateAddress&&(0,L.jsxs)(`article`,{className:`review-account-row`,children:[(0,L.jsxs)(`div`,{className:`review-account-heading`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{children:`Hyperbridge account`}),(0,L.jsx)(`span`,{children:`Bid submission account`})]}),(0,L.jsx)(`span`,{className:`review-account-network`,children:`SUBSTRATE`})]}),(0,L.jsx)(`p`,{children:`Fund with BRIDGE for bid fees. Claimed fees return automatically after fills.`}),(0,L.jsx)(`div`,{className:`review-account-value`,children:(0,L.jsx)(B,{value:e.substrateAddress,chars:64,copyLabel:`Copy Hyperbridge account address`})})]})]})]}),(0,L.jsxs)(`section`,{className:`card review-config-section`,children:[(0,L.jsxs)(`header`,{className:`review-section-heading`,children:[(0,L.jsx)(`span`,{className:`markets-kicker`,children:`Local output`}),(0,L.jsx)(`h2`,{children:`Configuration file`}),(0,L.jsx)(`p`,{children:`Simplex writes a private, editable TOML file to this location.`})]}),(0,L.jsxs)(`div`,{className:`review-config-path`,children:[(0,L.jsx)(`span`,{className:`review-config-path-label`,children:`Destination`}),(0,L.jsxs)(B,{value:t.configPath,chars:t.configPath.length,copyLabel:`Copy config path`,children:[(0,L.jsx)(`span`,{className:`review-path-directory`,children:v}),(0,L.jsx)(`strong`,{children:g})]})]}),(0,L.jsxs)(`p`,{className:`review-config-security`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`◆`}),`Only your user account can read or edit this file. Keep it private and out of version control.`]}),i?(0,L.jsxs)(`div`,{className:`review-validation`,"data-state":`error`,role:`alert`,children:[(0,L.jsx)(`span`,{className:`review-validation-icon`,"aria-hidden":`true`,children:`!`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Configuration needs attention`}),(0,L.jsx)(`p`,{children:i})]})]}):n?(0,L.jsxs)(`div`,{className:`review-validation`,"data-state":`ready`,role:`status`,children:[(0,L.jsx)(`span`,{className:`review-validation-icon`,"aria-hidden":`true`,children:(0,L.jsx)(Te,{})}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Ready to launch`}),(0,L.jsx)(`p`,{children:`The generated configuration passed validation.`})]})]}):(0,L.jsxs)(`div`,{className:`review-validation`,"data-state":`checking`,role:`status`,children:[(0,L.jsx)(`span`,{className:`review-validation-icon review-validation-spinner`,"aria-hidden":`true`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Checking configuration`}),(0,L.jsx)(`p`,{children:`Validating the generated TOML before launch.`})]})]})]}),o===`failed`&&(0,L.jsxs)(`div`,{className:`card`,role:`alert`,children:[(0,L.jsx)(`p`,{className:`error`,children:p}),(0,L.jsx)(`p`,{className:`hint`,children:`Your configuration is already saved. Correct the checks above, then retry startup.`})]}),(0,L.jsxs)(`div`,{className:`review-launch-row`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`primary review-start-button`,disabled:!n||o===`saving`,onClick:u,children:[o===`saving`?`Saving configuration…`:o===`failed`?`Retry startup`:`Save config & start Simplex`,o!==`saving`&&(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]}),(0,L.jsx)(`p`,{children:`The dashboard opens automatically when the solver is ready.`})]})]})}function Eue(e){if(e.signerType===`privateKey`){let t=U9(e.signerKey);return t?[t]:e.signerKeyValidation===`valid`&&e.signerAddress?[]:e.signerKeyValidation===`checking`?[`Checking the EVM private key…`]:[e.signerKeyValidationMessage??`Verify the EVM private key before continuing.`]}return e.signerType===`mpcVault`?[[`API token`,e.mpcVault.apiToken],[`Vault UUID`,e.mpcVault.vaultUuid],[`Wallet address`,e.mpcVault.accountAddress],[`Callback client-signer public key`,e.mpcVault.callbackClientSignerPublicKey]].filter(([,e])=>!e.trim()).map(([e])=>`Enter the MPCVault ${e.toLowerCase()}.`):[[`Organization ID`,e.turnkey.organizationId],[`API public key`,e.turnkey.apiPublicKey],[`API private key`,e.turnkey.apiPrivateKey],[`Wallet address`,e.turnkey.signWith]].filter(([,e])=>!e.trim()).map(([e])=>`Enter the Turnkey ${e.toLowerCase()}.`)}function Due(e){let t=[];return e.substrateKey.trim()||t.push(`Generate an account or enter an existing recovery phrase or hex seed.`),e.hyperbridgeWsUrl.trim().startsWith(`ws`)||t.push(`Enter a Hyperbridge WebSocket URL beginning with ws:// or wss://.`),t}function Oue(e){let t=e.chains.filter(e=>e.enabled);return t.length===0?[`Enable fills for at least one chain.`]:t.flatMap(e=>{let t=[];return e.rpcUrls[0]?.trim()||t.push(`Enter the RPC endpoint for ${e.meta.label}.`),e.bundlerUrl.trim()||t.push(`Enter the bundler endpoint for ${e.meta.label}.`),t})}function kue(e,t){let n=e.pairs.filter(e=>e.enabled);if(n.length===0)return[`Enable or add at least one market.`];let r=e.chains.filter(e=>e.enabled),i=new Set(r.flatMap(e=>(t.knownTokens[e.meta.stateMachineId]??[]).map(e=>W9(e.symbol)))),a=new Set(r.map(e=>e.meta.stateMachineId));for(let t of n){if(t.token0.trim()&&W9(t.token0)===W9(t.token1))return[`Choose two different assets for every market.`];for(let n of[t.token0,t.token1]){if(!n.trim())return[`Choose both assets for every enabled market.`];if(Hx(n)){if(e.customAssets[n])return[`Select ${n} from the asset list instead of defining it as custom.`];if(!i.has(W9(n)))return[`${n} is not available on any enabled chain.`]}else{let t=e.customAssets[n];if(!t||!Object.entries(t).some(([e,t])=>a.has(e)&&t.trim()))return[`Enter a contract address for custom asset ${n} on an enabled chain.`]}}}try{Qle(J9(e,t))}catch(e){return[e instanceof Error?e.message:`Review the enabled market settings.`]}return[]}var $9=[{id:`signer`,title:`Signer`,description:`Choose the wallet infrastructure that will identify Simplex and authorize every fill.`,component:uue,requirements:Eue},{id:`substrate`,title:`Hyperbridge account`,description:`Connect the account Simplex uses to submit bids and settle execution fees on Hyperbridge.`,component:pue,requirements:Due},{id:`chains`,title:`Chains`,description:`Select execution networks and verify the RPC and bundler infrastructure behind each one.`,component:mue,requirements:Oue},{id:`strategies`,title:`Markets`,description:`Define the asset pairs, pricing curves, and liquidity sources Simplex is allowed to serve.`,component:yue,requirements:kue},{id:`treasury`,title:`Treasury`,description:`Optionally connect vaults that keep idle liquidity productive and available for fills.`,component:bue,requirements:()=>[]},{id:`advanced`,title:`Advanced`,description:`Tune concurrency, logging, and access policy—or keep the safe defaults.`,component:xue,requirements:()=>[]},{id:`review`,title:`Review & launch`,description:`Confirm the accounts and generated configuration before starting the solver.`,component:Tue,requirements:()=>[]}];function Aue(e){let[t,n]=(0,b.useState)(()=>tue(e.defaults)),[r,i]=(0,b.useState)(0),a=$9[r],o=a.component,s=e=>{let t=$9.findIndex(t=>t.id===e);t>=0&&i(t)},c=a.requirements(t,e.defaults),l=c.length===0,u=`wizard-${a.id}-requirements`,d=(r+1)/$9.length*100;return(0,L.jsxs)(`div`,{className:`wizard-shell`,children:[(0,L.jsxs)(`header`,{className:`wizard-brandbar`,children:[(0,L.jsxs)(`div`,{className:`wizard-brand`,children:[(0,L.jsx)(`img`,{className:`hyperfx-logo`,src:Se,alt:`HyperFX`}),(0,L.jsx)(`span`,{className:`wizard-product-name`,children:`Simplex`})]}),(0,L.jsxs)(`div`,{className:`wizard-brand-actions`,children:[(0,L.jsx)(rm,{}),(0,L.jsxs)(`div`,{className:`wizard-local-status`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`}),`Local setup`]})]})]}),(0,L.jsxs)(`div`,{className:`wizard-layout`,children:[(0,L.jsxs)(`aside`,{className:`wizard-sidebar`,children:[(0,L.jsxs)(`div`,{className:`wizard-intro`,children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Solver onboarding`}),(0,L.jsx)(`h1`,{children:`Configure Simplex`}),(0,L.jsx)(`p`,{children:`Set up execution, liquidity, and risk controls for your Hyperbridge solver.`})]}),(0,L.jsx)(`nav`,{className:`stepper`,"aria-label":`Setup progress`,children:(0,L.jsx)(`ol`,{children:$9.map((e,t)=>(0,L.jsxs)(`li`,{className:`step`,"data-state":t===r?`active`:t<r?`done`:`upcoming`,children:[(0,L.jsx)(`span`,{className:`step-index`,"aria-hidden":`true`,children:t<r?`✓`:String(t+1).padStart(2,`0`)}),(0,L.jsxs)(`span`,{className:`step-copy`,children:[(0,L.jsx)(`strong`,{children:e.title}),(0,L.jsx)(`small`,{children:t===r?`In progress`:t<r?`Complete`:`Upcoming`})]})]},e.id))})}),(0,L.jsxs)(`div`,{className:`wizard-security-note`,children:[(0,L.jsx)(`span`,{className:`wizard-security-icon`,"aria-hidden":`true`,children:`◆`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Local by design`}),(0,L.jsx)(`p`,{children:`Credentials remain on this machine and are written only to your protected config file.`})]})]})]}),(0,L.jsxs)(`section`,{className:`wizard-main`,"aria-labelledby":`wizard-step-title`,children:[(0,L.jsxs)(`header`,{className:`wizard-step-header`,children:[(0,L.jsxs)(`div`,{className:`wizard-progress-meta`,children:[(0,L.jsxs)(`span`,{className:`eyebrow`,children:[`Step `,r+1,` of `,$9.length]}),(0,L.jsxs)(`span`,{className:`wizard-progress-value`,children:[Math.round(d),`%`]})]}),(0,L.jsx)(`progress`,{className:`wizard-progress-track`,max:100,value:d,"aria-label":`Setup ${Math.round(d)}% complete`}),(0,L.jsx)(`h2`,{id:`wizard-step-title`,children:a.title}),(0,L.jsx)(`p`,{children:a.description})]}),(0,L.jsx)(`div`,{className:`wizard-step-content`,children:(0,L.jsx)(o,{state:t,setState:n,defaults:e.defaults,goToStep:s})}),(0,L.jsxs)(`footer`,{className:`footer-nav`,children:[r>0?(0,L.jsxs)(`button`,{type:`button`,className:`secondary`,onClick:()=>i(e=>e-1),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` Back`]}):(0,L.jsx)(`span`,{"aria-hidden":`true`}),r<$9.length-1&&c.length>0?(0,L.jsxs)(`div`,{className:`wizard-requirements`,id:u,role:`status`,"aria-live":`polite`,children:[(0,L.jsx)(`span`,{className:`wizard-requirements-icon`,"aria-hidden":`true`,children:`!`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Required to continue`}),(0,L.jsx)(`ul`,{children:c.map(e=>(0,L.jsx)(`li`,{children:e},e))})]})]}):null,r<$9.length-1&&(0,L.jsxs)(`button`,{type:`button`,className:`primary`,disabled:!l,"aria-describedby":l?void 0:u,onClick:()=>i(e=>e+1),children:[`Continue `,(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]})]})]})]})]})}function jue(e){let{state:t,refresh:n}=e;switch(t.kind){case`error`:return(0,L.jsxs)(`div`,{className:`connection-error`,role:`alert`,children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Connection unavailable`}),(0,L.jsx)(`h1`,{children:`Simplex could not be reached`}),(0,L.jsx)(`p`,{children:t.message}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>void n(),children:`Retry connection`})]});case`connecting`:return(0,L.jsx)(`p`,{className:`hint`,children:`Connecting…`});case`loading-setup`:return(0,L.jsx)(`p`,{className:`hint`,children:`Loading setup…`});case`version-skew`:return(0,L.jsxs)(`div`,{className:`connection-error`,role:`alert`,children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Restart required`}),(0,L.jsx)(`h1`,{children:`Simplex versions do not match`}),(0,L.jsxs)(`p`,{children:[`The desktop app is version `,t.desktopVersion,`, but the running solver is version`,` `,t.solverVersion,`. The dashboard is blocked so a newer UI cannot drive an older solver.`]}),(0,L.jsx)(`p`,{children:`Choose “Restart with bundled solver” from the Simplex tray or application menu.`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>void n(),children:`Check again`})]});case`operator`:return(0,L.jsx)(Rre,{status:t.status,refresh:n});case`setup`:return(0,L.jsx)(Aue,{defaults:t.defaults})}}function Mue(e,t,n,r){if(n)return{kind:`error`,message:n};if(!e)return{kind:`connecting`};let i=typeof e.version==`string`?e.version:`unknown`;return r&&r!==i?{kind:`version-skew`,desktopVersion:r,solverVersion:i}:e.mode===`operator`?{kind:`operator`,status:e}:t?{kind:`setup`,defaults:t}:{kind:`loading-setup`}}function Nue(){let[e,t]=(0,b.useState)(),[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)(),c=(0,b.useRef)(0),l=(0,b.useCallback)(async()=>{let e=++c.current;try{let n=await ve.getWithMeta(`/api/status`),i=n.body;if(e!==c.current)return;if(s(n.response.headers.get(`x-simplex-desktop-version`)??void 0),t(i),a(void 0),i.mode===`operator`){r(void 0);return}let o=await ve.get(`/api/setup/defaults`);e===c.current&&r(o)}catch(t){e===c.current&&a(t instanceof Error?t.message:String(t))}},[]);return(0,b.useEffect)(()=>(l(),()=>{c.current+=1}),[l]),{state:Mue(e,n,i,o),refresh:l}}var Pue=class extends b.Component{state={};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Simplex UI render failed`,e,t)}render(){return this.state.error?(0,L.jsxs)(`div`,{className:`screen-error`,role:`alert`,children:[(0,L.jsx)(`span`,{className:`eyebrow`,children:`Something went wrong`}),(0,L.jsx)(`h1`,{children:`This view could not be rendered`}),(0,L.jsx)(`p`,{children:this.state.error.message}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),children:`Reload dashboard`})]}):this.props.children}};function Fue(){let{state:e,refresh:t}=Nue();return(0,L.jsxs)(nm,{children:[(0,L.jsxs)(`div`,{className:`app-shell ${e.kind===`operator`?`app-shell-operator`:``}`,children:[(0,L.jsx)(Iue,{}),(0,L.jsx)(`main`,{className:`app-container ${e.kind===`operator`?`operator-container`:``}`,children:(0,L.jsx)(Pue,{children:(0,L.jsx)(jue,{state:e,refresh:t})})})]}),(0,L.jsx)(me,{className:`simplex-toaster`,position:`top-right`,theme:`dark`,closeButton:!0,richColors:!0})]})}function Iue(){return(0,L.jsx)(`div`,{className:`header-gradient bg-gradient-brand-animated`})}`serviceWorker`in navigator&&navigator.serviceWorker.register(`./sw.js`,{scope:`./`}).catch(()=>{}),(0,y.createRoot)(document.getElementById(`root`)).render((0,L.jsx)(b.StrictMode,{children:(0,L.jsx)(Fue,{})}));
|