Guest

Untitled 580

Feb 24th, 2026
7
0
Never
Not a member of gistpad yet? Sign Up, it unlocks many cool features!
None 948.88 KB | None | 0 0
  1. Look for any hardcoded endpoints
  2. grep -E "/v[0-9]/[a-z_]+" full_js.js | head -50
  3.  
  4. var e,t,n,r,i=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=Math.pow,d=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&d(e,n,t[n]);if(a)for(var n of a(t))c.call(t,n)&&d(e,n,t[n]);return e},h=(e,t)=>o(e,s(t)),p=(e,t)=>{var n={};for(var r in e)l.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&a)for(var r of a(e))t.indexOf(r)<0&&c.call(e,r)&&(n[r]=e[r]);return n},m=(e,t,n)=>(d(e,"symbol"!=typeof t?t+"":t,n),n),g=(e,t,n)=>new Promise(((r,i)=>{var o=e=>{try{a(n.next(e))}catch(_k){i(_k)}},s=e=>{try{a(n.throw(e))}catch(_k){i(_k)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}));import{r as v,a as y,b,c as x,g as _,R as w,d as C,u as k,e as S,O as E,N as A,f as j,B as O}from"./react-vendor-fefe78c0.js";import{d as N,a as T,b as P,l as M}from"./utils-vendor-983d4447.js";import{h as I}from"./html2canvas-062eb67f.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var L={exports:{}},R={},D=v,B=Symbol.for("react.element"),F=Symbol.for("react.fragment"),H=Object.prototype.hasOwnProperty,z=D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,V={key:!0,ref:!0,__self:!0,__source:!0};function U(e,t,n){var r,i={},o=null,s=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(s=t.ref),t)H.call(t,r)&&!V.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:B,type:e,key:o,ref:s,props:i,_owner:z.current}}R.Fragment=F,R.jsx=U,R.jsxs=U,L.exports=R;var G=L.exports,W={},q=y;W.createRoot=q.createRoot,W.hydrateRoot=q.hydrateRoot;const Z=e=>{localStorage.setItem("chain_config",JSON.stringify(e))},X=()=>localStorage.notice?JSON.parse(localStorage.notice):null,K=e=>{let t=Y();t=t?f(f({},t),e):e,localStorage.setItem("chainConfigItem",JSON.stringify(t))},Y=()=>localStorage.chainConfigItem?JSON.parse(localStorage.chainConfigItem):{},$=()=>localStorage.token,J=e=>{localStorage.token=e},Q=e=>{localStorage.setItem("searchAddress",JSON.stringify(e))},ee=()=>localStorage.searchAddress?JSON.parse(localStorage.searchAddress):[],te=e=>{localStorage.setItem("walletType",e)},ne=()=>localStorage.walletType,re=e=>{let t=ie();t=t?f(f({},t),e):e,localStorage.setItem("walletInfo",JSON.stringify(t))},ie=()=>localStorage.walletInfo?JSON.parse(localStorage.walletInfo):{},oe=e=>{let t=se();t=t?f(f({},t),e):e,localStorage.setItem("triggerStore",JSON.stringify(t))},se=()=>localStorage.triggerStore?JSON.parse(localStorage.triggerStore):{},ae=e=>{localStorage.setItem("prompt",JSON.stringify(e))},le=()=>!!localStorage.prompt&&JSON.parse(localStorage.prompt),ce=e=>{localStorage.clearance=e},ue=()=>localStorage.clearance,de=(e={})=>localStorage.setItem("key_tv_chart_state",JSON.stringify(e)),fe=(e={})=>{lett=localStorage.key_tv_chart_state;return t?JSON.parse(t):void 0},he=e=>{localStorage.setItem("key_tv_chart_height",JSON.stringify(e))},pe=()=>localStorage.key_tv_chart_height?JSON.parse(localStorage.key_tv_chart_height):0,me=e=>{localStorage.setItem("selfChecked",JSON.stringify(e))},ge=()=>!!localStorage.selfChecked&&JSON.parse(localStorage.selfChecked),ve=e=>{localStorage.setItem("filterHoneyPot",JSON.stringify(e))},ye=()=>!localStorage.filterHoneyPot||JSON.parse(localStorage.filterHoneyPot),be=()=>!localStorage.klineTagOnOff||JSON.parse(localStorage.klineTagOnOff),xe=e=>{localStorage.setItem("showHoldWallet",JSON.stringify(e))},_e=()=>!localStorage.showHoldWallet||JSON.parse(localStorage.showHoldWallet),we=()=>{try{const e=localStorage.getItem("clientConfig");return e?JSON.parse(e):{KlineFormat:"price",ShowAverageHoldingPrice:"0",ShowHistory:"0"}}catch(_k){return{KlineFormat:"price",ShowAverageHoldingPrice:"0",ShowHistory:"0"}}},Ce="strategyPageUrl";function ke(){return localStorage.getItem(Ce)||""}function Se(e){localStorage.setItem(Ce,JSON.stringify(e))}function Ee(){try{const e=sessionStorage.getItem("refInfo");return e?JSON.parse(e):null}catch(e){return sessionStorage.removeItem("refInfo"),null}}function Ae(){return localStorage.tradeWalletGroups?JSON.parse(localStorage.tradeWalletGroups):null}function je(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Oe=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Ne=()=>Math.random().toString(36).substring(7).split("").join("."),Te={INIT:`@@redux/INIT${Ne()}`,REPLACE:`@@redux/REPLACE${Ne()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ne()}`};function Pe(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Me(e,t,n){if("function"!=typeof e)throw new Error(je(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(je(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(je(1));return n(Me)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach(((e,t)=>{s.set(t,e)})))}function u(){if(l)throw new Error(je(3));return i}function d(e){if("function"!=typeof e)throw new Error(je(4));if(l)throw new Error(je(5));let t=!0;c();constn=a++;return s.set(n,e),function(){if(t){if(l)throw new Error(je(6));t=!1,c(),s.delete(n),o=null}}}function f(e){if(!Pe(e))throw new Error(je(7));if(void 0===e.type)throw new Error(je(8));if("string"!=typeof e.type)throw new Error(je(17));if(l)throw new Error(je(9));try{l=!0,i=r(i,e)}finally{l=!1}return(o=s).forEach((e=>{e()})),e}f({type:Te.INIT});return{dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(je(10));r=e,f({type:Te.REPLACE})},[Oe]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(je(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[Oe](){return this}}}}}function Ie(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const r=t[o];"function"==typeof e[r]&&(n[r]=e[r])}const r=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Te.INIT}))throw new Error(je(12));if(void 0===n(void 0,{type:Te.PROBE_UNKNOWN_ACTION()}))throw new Error(je(13))}))}(n)}catch(_k){i=_k}return function(e={},t){if(i)throw i;let o=!1;const s={};for(let i=0;i<r.length;i++){const a=r[i],l=n[a],c=e[a],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(je(14));s[a]=u,o=o||u!==c}return o=o||r.length!==Object.keys(e).length,o?s:e}}function Le(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var Re=Symbol.for("immer-nothing"),De=Symbol.for("immer-draftable"),Be=Symbol.for("immer-state");function Fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var He=Object.getPrototypeOf;function ze(e){return!!e&&!!e[Be]}function Ve(e){var t;return!!e&&(Ge(e)||Array.isArray(e)||!!e[De]||!!(null==(t=e.constructor)?void 0:t[De])||Ke(e)||Ye(e))}var Ue=Object.prototype.constructor.toString();function Ge(e){if(!e||"object"!=typeof e)return!1;const t=He(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Ue}function We(e,t){0===qe(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function qe(e){const t=e[Be];return t?t.type_:Array.isArray(e)?1:Ke(e)?2:Ye(e)?3:0}function Ze(e,t){return 2===qe(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xe(e,t,n){const r=qe(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Ke(e){return e instanceof Map}function Ye(e){return e instanceof Set}function $e(e){return e.copy_||e.base_}function Je(e,t){if(Ke(e))return new Map(e);if(Ye(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Ge(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Be];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(He(e),t)}{const t=He(e);if(null!==t&&n)return f({},e);const r=Object.create(t);return Object.assign(r,e)}}function Qe(e,t=!1){return tt(e)||ze(e)||!Ve(e)||(qe(e)>1&&(e.set=e.add=e.clear=e.delete=et),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>Qe(t,!0)))),e}function et(){Fe(2)}function tt(e){return Object.isFrozen(e)}var nt,rt={};function it(e){const t=rt[e];return t||Fe(0),t}function ot(){return nt}function st(e,t){t&&(it("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function at(e){lt(e),e.drafts_.forEach(ut),e.drafts_=null}function lt(e){e===nt&&(nt=e.parent_)}function ct(e){return nt={drafts_:[],parent_:nt,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ut(e){const t=e[Be];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function dt(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Be].modified_&&(at(t),Fe(4)),Ve(e)&&(e=ft(t,e),t.parent_||pt(t,e)),t.patches_&&it("Patches").generateReplacementPatches_(n[Be].base_,e,t.patches_,t.inversePatches_)):e=ft(t,n,[]),at(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Re?e:void 0}function ft(e,t,n){if(tt(t))return t;const r=t[Be];if(!r)return We(t,((i,o)=>ht(e,r,t,i,o,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return pt(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let i=t,o=!1;3===r.type_&&(i=new Set(t),t.clear(),o=!0),We(i,((i,s)=>ht(e,r,t,i,s,n,o))),pt(e,t,!1),n&&e.patches_&&it("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ht(e,t,n,r,i,o,s){if(ze(i)){const s=ft(e,i,o&&t&&3!==t.type_&&!Ze(t.assigned_,r)?o.concat(r):void 0);if(Xe(n,r,s),!ze(s))return;e.canAutoFreeze_=!1}else s&&n.add(i);if(Ve(i)&&!tt(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ft(e,i),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||pt(e,i)}}function pt(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qe(t,n)}var mt={get(e,t){if(t===Be)return e;const n=$e(e);if(!Ze(n,t))return function(e,t,n){var r;const i=yt(t,n);return i?"value"in i?i.value:null==(r=i.get)?void 0:r.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Ve(r)?r:r===vt(e.base_,t)?(xt(e),e.copy_[t]=_t(r,e)):r},has:(e,t)=>t in $e(e),ownKeys:e=>Reflect.ownKeys($e(e)),set(e,t,n){const r=yt($e(e),t);if(null==r?void 0:r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=vt($e(e),t),i=null==r?void 0:r[Be];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Ze(e.base_,t)))return!0;xt(e),bt(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==vt(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,xt(e),bt(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=$e(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Fe(11)},getPrototypeOf:e=>He(e.base_),setPrototypeOf(){Fe(12)}},gt={};function vt(e,t){const n=e[Be];return(n?$e(n):e)[t]}function yt(e,t){if(!(tin e))return;let n=He(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=He(n)}}function bt(e){e.modified_||(e.modified_=!0,e.parent_&&bt(e.parent_))}function xt(e){e.copy_||(e.copy_=Je(e.base_,e.scope_.immer_.useStrictShallowCopy_))}We(mt,((e,t)=>{gt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gt.deleteProperty=function(e,t){return gt.set.call(this,e,t,void 0)},gt.set=function(e,t,n){return mt.set.call(this,e[0],t,n,e[0])};function _t(e,t){const n=Ke(e)?it("MapSet").proxyMap_(e,t):Ye(e)?it("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ot(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=mt;n&&(i=[r],o=gt);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}(e,t);return(t?t.scope_:ot()).drafts_.push(n),n}function wt(e){if(!Ve(e)||tt(e))return e;const t=e[Be];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Je(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Je(e,!0);return We(n,((e,t)=>{Xe(n,e,wt(t))})),t&&(t.finalized_=!1),n}var Ct=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,(e=>t.call(this,e,...i)))}}let r;if("function"!=typeof t&&Fe(6),void 0!==n&&"function"!=typeof n&&Fe(7),Ve(e)){const i=ct(this),o=_t(e,void 0);let s=!0;try{r=t(o),s=!1}finally{s?at(i):lt(i)}return st(i,n),dt(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Re&&(r=void 0),this.autoFreeze_&&Qe(r,!0),n){const t=[],i=[];it("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}Fe(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ve(e)||Fe(8),ze(e)&&(e=function(e){ze(e)||Fe(10);return wt(e)}(e));const t=ct(this),n=_t(e,void 0);return n[Be].isManual_=!0,lt(t),n}finishDraft(e,t){const n=e&&e[Be];n&&n.isManual_||Fe(9);const{scope_:r}=n;return st(r,t),dt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=it("Patches").applyPatches_;return ze(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},kt=Ct.produce;function St(e){return({dispatch:t,getState:n})=>r=>i=>"function"==typeof i?i(t,n,e):r(i)}Ct.produceWithPatches.bind(Ct),Ct.setAutoFreeze.bind(Ct),Ct.setUseStrictShallowCopy.bind(Ct),Ct.applyPatches.bind(Ct),Ct.createDraft.bind(Ct),Ct.finishDraft.bind(Ct);var Et=St(),At=St,jt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Le:Le.apply(null,arguments)};function Ot(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Vt(0));return f(f({type:e,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return Pe(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var Nt=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Tt(e){return Ve(e)?kt(e,(()=>{})):e}function Pt(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Mt=e=>t=>{setTimeout(t,e)},It=e=>function(t){const{autoBatch:n=!0}=null!=t?t:{};let r=new Nt(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Mt(10):"callback"===e.type?e.queueNotification:Mt(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>i&&e()));return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t.RTK_autoBatch),o=!i,o&&(s||(s=!0,l(c))),r.dispatch(e)}finally{i=!0}}})})("object"==typeof n?n:void 0)),r};function Lt(e){const t={},n=[];let r;const i={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Vt(28));if(r in t)throw newError(Vt(29));return t[r]=n,i},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(r=e,i)};return e(i),[t,n,r]}var Rt=Symbol.for("rtk-slice-createasyncthunk");function Dt(e,t){return`${e}/${t}`}function Bt({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[Rt];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(Vt(11));const i=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return f({_reducerDefinitionType:"asyncThunk",payloadCreator:e},t)}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},o=Object.keys(i),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Vt(12));if(n in s.sliceCaseReducersByType)throw new Error(Vt(13));return s.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(s.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(s.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(s.sliceCaseReducersByName[e]=t,a)};function l(){const[t={},n=[],r]="function"==typeof e.extraReducers?Lt(e.extraReducers):[e.extraReducers],i=f(f({},t),s.sliceCaseReducersByType);return function(e,t){let n,[r,i,o]=Lt(t);if(function(e){return"function"==typeof e}(e))n=()=>Tt(e());else{const t=Tt(e);n=()=>t}function s(e=n(),t){let s=[r[t.type],...i.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===s.filter((e=>!!e)).length&&(s=[o]),s.reduce(((e,n)=>{if(n){if(ze(e)){const r=n(e,t);return void 0===r?e:r}if(Ve(e))return kt(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return s.getInitialState=n,s}(e.initialState,(e=>{for(let t in i)e.addCase(t,i[t]);for(let t of s.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}o.forEach((r=>{const o=i[r],s={reducerName:r,type:Dt(t,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(o)?function({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error(Vt(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Ot(e,s):Ot(e))}(s,o,a):function({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Vt(18));const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s);a&&r.addCase(d.pending,a);l&&r.addCase(d.rejected,l);c&&r.addMatcher(d.settled,c);r.exposeCaseReducer(t,{fulfilled:s||zt,pending:a||zt,rejected:l||zt,settled:c||zt})}(s,o,a,n)}));const c=e=>e,u=new Map;let d;function m(e,t){return d||(d=l()),d(e,t)}function g(){return d||(d=l()),d.getInitialState()}function v(t,n=!1){function r(e){let r=e[t];return void 0===r&&n&&(r=g()),r}function i(t=c){const r=Pt(u,n,(()=>new WeakMap));return Pt(r,t,(()=>{var r;const i={};for(const[o,s]of Object.entries(null!=(r=e.selectors)?r:{}))i[o]=Ft(s,t,g,n);return i}))}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}const y=h(f({name:t,reducer:m,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:g},v(r)),{injectInto(e,t={}){var n=t,{reducerPath:i}=n,o=p(n,["reducerPath"]);const s=null!=i?i:r;return e.inject({reducerPath:s,reducer:m},o),f(f({},y),v(s,!0))}});return y}}function Ft(e,t,n,r){function i(i,...o){let s=t(i);return void 0===s&&r&&(s=n()),e(s,...o)}return i.unwrapped=e,i}var Ht=Bt();function zt(){}function Vt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Ut=e=>"string"==typeof e,Gt=()=>{let e,t;const n=newPromise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Wt=e=>null==e?"":""+e,qt=/###/g,Zt=e=>e&&e.indexOf("###")>-1?e.replace(qt,"."):e,Xt=e=>!e||Ut(e),Kt=(e,t,n)=>{const r=Ut(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Xt(e))return{};const t=Zt(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Xt(e)?{}:{obj:e,k:Zt(r[i])}},Yt=(e,t,n)=>{const{obj:r,k:i}=Kt(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],s=t.slice(0,t.length-1),a=Kt(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=Kt(e,s,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},$t=(e,t)=>{const{obj:n,k:r}=Kt(e,t);if(n)return n[r]},Jt=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Ut(e[r])||e[r]instanceof String||Ut(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Jt(e[r],t[r],n):e[r]=t[r]);return e},Qt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var en={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const tn=e=>Ut(e)?e.replace(/[&<>"'\/]/g,(e=>en[e])):e;const nn=[" ",",","?","!",";"],rn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),on=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||"object"!=typeof i)return;let e,t="";for(let s=o;s<r.length;++s)if(s!==o&&(t+=n),t+=r[s],e=i[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&s<r.length-1)continue;o+=s-o+1;break}i=e}return i},sn=e=>e&&e.replace("_","-"),an={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]}};class ln{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||an,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Ut(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ln(this.logger,f(f({},{prefix:`${this.prefix}:${e}:`}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ln(this.logger,e)}}var cn=new ln;let un=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let i=0;i<r;i++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,i]=t;for(let o=0;o<i;o++)r.apply(r,[e,...n])}))}}};class dn extends un{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):Ut(n)&&i?s.push(...n.split(i)):s.push(n)));const a=$t(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&o&&Ut(n)?on(this.data&&this.data[e]&&this.data[e][t],n,i):a}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),Yt(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in n)(Ut(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=$t(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Jt(a,n,i):a=f(f({},a),n),Yt(this.data,s,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?f(f({},{}),this.getResource(e,t)):this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var fn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))})),t}};const hn={};class pn extends un{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{n[e]&&(r[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=cn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=nn.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const i=rn.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Ut(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:Ut(i)?[i]:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t=f({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],t),a=s[s.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(c){conste=t.nsSeparator||this.options.nsSeparator;return r?{res:`${a}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:o}const u=this.resolve(e,t);let d=u&&u.res;const p=u&&u.usedKey||o,m=u&&u.exactUsedKey||o,g=Object.prototype.toString.apply(d),v=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Ut(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(y&&d&&b&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0)||Ut(v)&&Array.isArray(d))if(y&&Ut(v)&&Array.isArray(d))d=d.join(v),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,s=!1;const c=void 0!==t.count&&!Ut(t.count),p=pn.hasDefaultValue(t),m=c?this.pluralResolver.getSuffix(l,t.count,t):"",g=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",v=c&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),y=v&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${m}`]||t[`defaultValue${g}`]||t.defaultValue;!this.isValidLookup(d)&&p&&(r=!0,d=y),this.isValidLookup(d)||(s=!0,d=o);const b=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:d,x=p&&y!==d&&this.options.updateMissing;if(s||r||x){if(this.logger.log(x?"updateKey":"missingKey",l,a,o,x?y:d),i){const e=this.resolve(o,h(f({},t),{keySeparator:!1}));e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}lete=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=p&&r!==d?r:b;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,i,x,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,n,i,x,t),this.emit("missingKey",e,a,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);v&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],o+n,t[`defaultValue${n}`]||y)}))})):r(e,o,y))}d=this.extendTranslation(d,e,t,u,n),s&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${o}`),(s||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,r?d:void 0):this.options.parseMissingKeyHandler(d))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,h(f({},t),{ns:s})):`key '${o} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(i){const e=Array.isArray(d),n=e?[]:{},r=e?m:p;for(const o in d)if(Object.prototype.hasOwnProperty.call(d,o)){const e=`${r}${i}${o}`;n[o]=this.translate(e,f(f({},t),{joinArrays:!1,ns:s})),n[o]===e&&(n[o]=d[o])}d=n}}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,f(f({},this.options.interpolation.defaultVariables),n),n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(f(f({},n),{interpolation:f(f({},this.options.interpolation),n.interpolation)}));const s=Ut(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=n.replace&&!Ut(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=f(f({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),s){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):o.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a=Ut(s)?[s]:s;return null!=e&&a&&a.length&&!1!==n.applyPostProcessor&&(e=fn.handle(a,e,t,this.options&&this.options.postProcessPassResolved?f({i18nResolved:h(f({},r),{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){let t,n,r,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ut(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,s),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==s.count&&!Ut(s.count),d=u&&!s.ordinal&&0===s.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&(Ut(s.context)||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(o=e,!hn[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(hn[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((n=>{if(this.isValidLookup(t))return;i=n;const o=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,l,n,e,s);else{let e;u&&(e=this.pluralResolver.getSuffix(n,s.count,s));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(o.push(l+e),s.ordinal&&0===e.indexOf(r)&&o.push(l+e.replace(r,this.options.pluralSeparator)),d&&o.push(l+t)),f){const n=`${l}${this.options.contextSeparator}${s.context}`;o.push(n),u&&(o.push(n+e),s.ordinal&&0===e.indexOf(r)&&o.push(n+e.replace(r,this.options.pluralSeparator)),d&&o.push(n+t))}}let a;for(;a=o.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,s))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Ut(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r=f(f({},this.options.interpolation.defaultVariables),r)),!n){r=f({},r);for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const mn=e=>e.charAt(0).toUpperCase()+e.slice(1);class gn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=cn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=sn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=sn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Ut(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(_k){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=mn(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=mn(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=mn(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Ut(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Ut(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Ut(e)&&i(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))})),r}}let vn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],yn={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const bn=["v1","v2","v3"],xn=["v4"],_n={zero:0,one:1,two:2,few:3,many:4,other:5};class wn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=cn.create("pluralResolver"),this.options.compatibilityJSON&&!xn.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, usean Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return vn.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:yn[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const r=sn("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(r,t)}return this.pluralRulesCache[o]=s,s}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>_n[e]-_n[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!bn.includes(this.options.compatibilityJSON)}}const Cn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,n)=>{const r=$t(e,n);return void 0!==r?r:$t(t,n)})(e,t,n);return!o&&i&&Ut(n)&&(o=on(e,n,r),void 0===o&&(o=on(t,n,r))),o},kn=e=>e.replace(/\$/g,"$$$$");class Sn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=cn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:tn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Qt(i):o||"{{",this.suffix=s?Qt(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Qt(d):f||Qt("$t("),this.nestingSuffix=h?Qt(h):p||Qt(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Cn(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,h(f(f({},r),t),{interpolationkey:e})):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),s=i.join(this.formatSeparator).trim();return this.format(Cn(t,a,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,h(f(f({},r),t),{interpolationkey:o}))};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>kn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?kn(this.escape(e)):kn(e)}].forEach((t=>{for(s=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=Ut(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Ut(o)||this.useRawValueToEscape||(o=Wt(o));const a=t.safeValue(o);if(e=e.replace(i[0],a),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}})),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const s=o.match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=f(f({},t),i))}catch(_k){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,_k),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];i=f({},o),i=i.replace&&!Ut(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),a=e,l=!0}if(r=t(s.call(this,n[1].trim(),i),i),r&&n[0]===e&&!Ut(r))return r;Ut(r)||(r=Wt(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=a.reduce(((e,t)=>this.format(e,t,o.lng,h(f({},o),{interpolationkey:n[1].trim()}))),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const En=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o=h(f({},o),{[i.interpolationkey]:void 0}));const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(sn(r),i),t[s]=a),a(n)}};class An{constructor(){lete=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=cn.create("formatter"),this.options=e,this.formats={number:En(((e,t)=>{const n=new Intl.NumberFormat(e,f({},t));return e=>n.format(e)})),currency:En(((e,t)=>{const n=newIntl.NumberFormat(e,h(f({},t),{style:"currency"}));return e=>n.format(e)})),datetime:En(((e,t)=>{const n=new Intl.DateTimeFormat(e,f({},t));return e=>n.format(e)})),relativetime:En(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,f({},t));return e=>n.format(e,t.range||"day")})),list:En(((e,t)=>{const n=new Intl.ListFormat(e,f({},t));return e=>n.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=En(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find((e=>e.indexOf(")")>-1))){const e=i.findIndex((e=>e.indexOf(")")>-1));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce(((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const s=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[i](e,a,f(f(f({},o),r),s))}catch(s){this.logger.warn(s)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e)}}class jn extends un{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=cn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},s={},a={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,r=!1,void 0===o[s]&&(o[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===a[t]&&(a[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:i}=Kt(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*i,o)}),i):o(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then((e=>s(null,e))).catch(s):s(null,n)}catch(l){s(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Ut(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ut(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)}))}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const l=h(f({},o),{isUpdate:i}),c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,n,r,l):c(e,t,n,r),i&&"function"==typeof i.then?i.then((e=>s(null,e))).catch(s):s(null,i)}catch(a){s(a)}else c(e,t,n,r,s,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const On=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Ut(e[1])&&(t.defaultValue=e[1]),Ut(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nn=e=>(Ut(e.ns)&&(e.ns=[e.ns]),Ut(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ut(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Tn=()=>{};class Pn extends un{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Nn(e),this.services={},this.logger=cn,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(Ut(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=On();this.options=f(f(f({},r),this.options),Nn(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=f(f({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?cn.init(i(this.modules.logger),this.options):cn.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=An);const n=new gn(this.options);this.store=new dn(this.options.resources,this.options);const o=this.services;o.logger=cn,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new wn(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Sn(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new jn(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new pn(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=Tn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=Gt(),s=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn;const n=Ut(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Gt();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Tn),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("Youare passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&fn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=Gt();this.emit("languageChanging",e);consti=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},s=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Ut(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{o(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let o;if("object"!=typeof t){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([e,t].concat(a))}else o=f({},t);o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const c=r.options.keySeparator||".";let u;return u=o.keyPrefix&&Array.isArray(e)?e.map((e=>`${o.keyPrefix}${c}${e}`)):o.keyPrefix?`${o.keyPrefix}${c}${e}`:e,r.t(u,o)};return Ut(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=Gt();return this.options.ns?(Ut(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Gt();Ut(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=r.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new gn(On());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Pn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r=f(f(f({},this.options),e),{isClone:!0}),i=new Pn(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services=f({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new dn(this.store.data,r),i.services.resourceStore=i.store),i.translator=new pn(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Mn=Pn.createInstance();Mn.createInstance=Pn.createInstance,Mn.createInstance,Mn.dir,Mn.init,Mn.loadResources,Mn.reloadResources,Mn.use,Mn.changeLanguage,Mn.getFixedT,Mn.t,Mn.exists,Mn.setDefaultNamespace,Mn.hasLoadedNamespace,Mn.loadNamespaces,Mn.loadLanguages;const{actions:In,reducer:Ln}=Ht({name:"login",initialState:{isRefreshWallet:!1,userInfo:{user_login_address:"",user_name:"",email:"",my_invite_code:"",my_invite_url:"",is_bind_2FA:1,is_open_monitor_office_trade_action:0,is_open_monitor_office:1,is_open_monitor_self:1},listen_key:"",i18nextLng:"zh",barrageStatus:"true"===localStorage.getItem("barrageStatus"),isShowRegWallet:!1,isAuthorizationModal:!1,isCodeSubmitModal:!1,codeMsgType:"add",isBindGoogleModal:!1,isWalletNeedUpdate:{needUpdate:!1,needRetry:!1},configLoaded:!1,toastItem:null,newTokenTransferNotice:!1,isRegisterModal:!1,isRegionModal:!1,isLoginModal:!1,isForgetPasswordModal:!1,isLoginExpiredModal:!1,isLoginExpiredResetPasswordModal:!1,forgetPasswordEmail:""},reducers:{setIsLoginExpiredModal(e,t){e.isLoginExpiredModal=t.payload},setIsLoginExpiredResetPasswordModal(e,t){e.isLoginExpiredResetPasswordModal=t.payload},setIsRegisterModal(e,t){e.isRegisterModal=t.payload},setIsRegionModal(e,t){e.isRegionModal=t.payload},setIsLoginModal(e,t){e.isLoginModal=t.payload},setToastItem(e,t){e.toastItem=t.payload},clearToastItem(e){e.toastItem=null},setNewTokenTransferNotice(e,t){e.newTokenTransferNotice=t.payload},clearNewTokenTransferNotice(e){e.newTokenTransferNotice=!1},setUserInfo(e,t){e.userInfo=f(f({},e.userInfo),t.payload)},clearUserInfo(e){e.userInfo={user_login_address:"",user_name:"",email:"",my_invite_code:"",my_invite_url:"",is_bind_2FA:1,is_open_monitor_office_trade_action:0,is_open_monitor_office:1,is_open_monitor_self:1}},setListenKey(e,t){localStorage.setItem("listen_key",t.payload),e.listen_key=t.payload},setI18nextLng(e,t){localStorage.setItem("i18nextLng",t.payload),Mn.changeLanguage(t.payload),e.i18nextLng=t.payload},setBarrageStatus(e,t){localStorage.setItem("barrageStatus",t.payload),e.barrageStatus=t.payload},setIsShowRegWallet(e,t){e.isShowRegWallet=t.payload},setIsAuthorizationModal(e,t){e.isAuthorizationModal=t.payload},setIsCodeSubmitModal(e,t){e.codeMsgType=JSON.parse(JSON.stringify(t.payload.codeMsgType)),e.isCodeSubmitModal=JSON.parse(JSON.stringify(t.payload.modal))},setIsBindGoogleModal(e,t){e.isBindGoogleModal=t.payload},setIsWalletNeedUpdate(e,t){e.isWalletNeedUpdate=t.payload},setConfigLoadStatus(e,t){e.configLoaded=t.payload},setIsRefreshWallet(e,t){e.isRefreshWallet=t.payload},clearIsRefreshWallet(e){e.isRefreshWallet=!1},setIsForgetPasswordModal(e,t){e.isForgetPasswordModal=t.payload},setForgetPasswordEmail(e,t){e.forgetPasswordEmail=t.payload}}}),{setUserInfo:Rn,setListenKey:Dn,setI18nextLng:Bn,setBarrageStatus:Fn,setIsShowRegWallet:Hn,setToastItem:zn,clearToastItem:Vn,setNewTokenTransferNotice:Un,clearNewTokenTransferNotice:Gn,setIsRefreshWallet:Wn,clearIsRefreshWallet:qn,setIsRegisterModal:Zn,setIsRegionModal:Xn,setIsLoginModal:Kn,setIsForgetPasswordModal:Yn,setIsLoginExpiredModal:$n,setIsLoginExpiredResetPasswordModal:Jn,setForgetPasswordEmail:Qn}=In,{actions:er,reducer:tr}=Ht({name:"chainConfig",initialState:{chainInit:localStorage.chain_config?JSON.parse(localStorage.chain_config):null,chainMode:Y().chainMode||{},hotMode:Y().hotMode||{},timeMode:Y().timeMode||{value:"1h",label:"tabPane.kline_1h"},wsConnected:null,chainAll:!1,allRankList:(localStorage.all_rank_tab?JSON.parse(localStorage.all_rank_tab):null)||[],chainConfigInfo:(localStorage.chain_config_info?JSON.parse(localStorage.chain_config_info):null)||{},currentChainConfig:Y().currentChainConfig||{},tradeConfig:{}},reducers:{setTradeConfig(e,{payload:t}){e.tradeConfig=t},fetchChainConfig(e,{payload:t}){var n,r,i;let o=e.chainMode.chain_id;if(o){let i=null==(n=e.hotMode)?void 0:n.list_type;e.chainMode=t.filter((e=>e.chain_id==o))[0],K({chainMode:e.chainMode}),e.hotMode=null==(r=e.chainMode)?void 0:r.list_config.filter((e=>e.list_type==i))[0],K({hotMode:e.hotMode})}else e.chainMode=t[0],K({chainMode:t[0]}),e.hotMode=null==(i=e.chainMode)?void 0:i.list_config[1],K({hotMode:e.hotMode}),e.timeMode={value:"1h",label:"tabPane.kline_1h"},K({timeMode:e.timeMode});e.chainInit&&!o||(e.chainInit=t,Z(t))},toggleChain(e,{payload:t}){var n;e.chainAll=!1,e.chainMode=t,"2"==(null==(n=e.hotMode)?void 0:n.list_type)?e.hotMode=t.list_config[0]:e.hotMode=t.list_config[1],K({chainMode:t,hotMode:e.hotMode})},toggleHot(e,{payload:t}){"2"==(null==t?void 0:t.list_type)?e.chainAll=!0:e.chainAll=!1,e.hotMode=t,K({hotMode:t})},toggleTime(e,{payload:t}){e.timeMode=t,K({timeMode:t})},setWsConnected(e,{payload:t}){e.wsConnected=t},setChainAll(e,{payload:t}){e.chainAll=t},setChainConfigInfoStore(e,{payload:t}){var n;e.chainConfigInfo=t,n=t,localStorage.setItem("chain_config_info",JSON.stringify(n))},setAllRankList(e,{payload:t}){var n,r,i,o;let s=e.chainMode.chain_id;var a;if(e.allRankList=t,a=t,localStorage.setItem("all_rank_tab",JSON.stringify(a)),void 0===(null==(n=e.hotMode)?void 0:n.list_type)){let n=t.filter((e=>"0"==e.list_type))[0];e.hotMode=h(f({},n),{chains:void 0}),K({hotMode:h(f({},n),{chains:void 0})})}if(void 0===s||""===s){let n=null==(r=t.filter((e=>"0"==e.list_type))[0])?void 0:r.chains;e.chainInit=n,Z(n);let i=n.filter((e=>"0"==e.chain_id))[0],o=e.chainConfigInfo.filter((e=>e.chain_id==i.chain_id))[0]||{chain_id:0,chain_name:"ALL",warn_msg:{ok:!1,warn_msg:""}};e.chainMode=f(f({},i),h(f({},o),{list_config:void 0})),K({chainMode:f(f({},i),h(f({},o),{list_config:void 0}))})}else{let n=null==(i=t.filter((t=>t.list_type==e.hotMode.list_type))[0])?void 0:i.chains;if(!n){n=null==(o=t.filter((e=>"0"==e.list_type))[0])?void 0:o.chains;let r=n.filter((e=>"0"==e.chain_id))[0]||{chain_id:0,chain_name:"ALL",warn_msg:{ok:!1,warn_msg:""}},i=t.filter((e=>"0"==e.list_type))[0];e.hotMode=h(f({},i),{chains:void 0}),e.chainMode=f(f({},r),h(f({},r),{list_config:void 0})),K({hotMode:h(f({},i),{chains:void 0}),chainMode:f(f({},r),h(f({},r),{list_config:void 0}))}),Z(r)}e.chainInit=n,Z(n)}},setToggleRankTab(e,{payload:t}){var n,r;let i=e.chainMode.chain_id;"2"==(null==t?void 0:t.list_type)?e.chainAll=!0:e.chainAll=!1,e.hotMode=h(f({},t),{chains:void 0}),K({hotMode:h(f({},t),{chains:void 0})}),e.chainInit=null==t?void 0:t.chains,Z(null==t?void 0:t.chains);let o=null==(n=null==t?void 0:t.chains)?void 0:n.filter((e=>e.chain_id==i))[0];o||(o=null==(r=null==t?void 0:t.chains)?void 0:r[0]);let s=e.chainConfigInfo.filter((e=>e.chain_id==(null==o?void 0:o.chain_id)))[0];e.chainMode=f(f({},o),h(f({},s),{list_config:void 0})),K({chainMode:f(f({},o),h(f({},s),{list_config:void 0}))})},setRankChainConfigItem(e,{payload:t}){let n=e.chainConfigInfo.filter((e=>e.chain_id==t.chain_id))[0]||{chain_id:0,chain_name:"ALL",warn_msg:{ok:!1,warn_msg:""}};e.chainMode=f(f({},t),h(f({},n),{list_config:void 0})),K({chainMode:f(f({},t),h(f({},n),{list_config:void 0}))})}}}),{setWsConnected:nr}=er,{actions:rr,reducer:ir}=Ht({name:"account",initialState:{walletAll:null,chainWallet:{},walletGrouos:[],totalChainGasType:[],tabPrice:{}},reducers:{setWalletAll(e,{payload:t}){e.walletAll=t},setWalletGrouos(e,{payload:t}){e.walletGrouos=t},setChainWallet(e,{payload:t}){e.chainWallet=t},setTotalChainGasType(e,{payload:t}){localStorage.setItem("totalChainGasType",JSON.stringify(t)),e.totalChainGasType=t},setTabPrice(e,{payload:t}){e.tabPrice=t}}}),{actions:or,reducer:sr}=Ht({name:"tradeSetting",initialState:{isTriggerDeal:!1,pumpToast:{show:!1,chain_id:""},klineTag:be(),buyAmount:(null==(e=se())?void 0:e.buyAmount)||{},sellAmount:(null==(t=se())?void 0:t.sellAmount)||[15,25,50,70,85,100],chainTradeSetting:{},chainGasOneTradeSetting:(localStorage.gasOneTradeInfo?JSON.parse(localStorage.gasOneTradeInfo):[])||[],isRenewalGasOneTradeSet:!1,isDoubleOutSuccess:!1,clientConfig:we(),priceMcapStatus:localStorage.getItem("priceMcapStatus")||"price",currentChainGasFee:{},walletGroupsTrade:Ae(),allWalletAmount:[]},reducers:{setInitBuyAmount(e,{payload:t}){e.buyAmount=t,oe({buyAmount:t})},setInitSellAmount(e,{payload:t}){e.sellAmount=t,oe({sellAmount:t})},setIsTriggerDeal(e,{payload:t}){e.isTriggerDeal=t},setPumpToast(e,{payload:t}){e.pumpToast=t},setKlineHooks(e,{payload:t}){var n;e.klineTag=t,n=t,localStorage.setItem("klineTagOnOff",JSON.stringify(n))},setChainTradeSetting(e,{payload:t}){e.chainTradeSetting=t},setChainGasOneTradeSetting(e,{payload:t}){var n;e.chainGasOneTradeSetting=t,n=t,localStorage.setItem("gasOneTradeInfo",JSON.stringify(n))},setIsRenewalGasOneTradeSet(e,{payload:t}){e.isRenewalGasOneTradeSet=t},setDoubleOutSuccess(e,{payload:t}){e.isDoubleOutSuccess=t},setPriceMcapStatus(e,{payload:t}){e.priceMcapStatus=t,localStorage.setItem("priceMcapStatus",t)},setClientConfigQue(e,{payload:t}){e.clientConfig=f(f({},e.clientConfig),t),(e=>{const t=we(),n=f(f({},t),e);try{localStorage.setItem("clientConfig",JSON.stringify(n))}catch(_k){}})(t)},setCurrentChainGasFee(e,{payload:t}){e.currentChainGasFee=t},setOnChangeSelectWallet(e,{payload:t}){var n;e.walletGroupsTrade=t,n=t,localStorage.setItem("tradeWalletGroups",JSON.stringify(n))},setAllWalletAmount(e,{payload:t}){e.allWalletAmount=t}}});var ar=(e=>(e.LIGHT="light",e.DARK="dark",e))(ar||{});const lr=()=>localStorage.getItem("theme")||"dark",{actions:cr,reducer:ur}=Ht({name:"theme",initialState:{theme:lr()||ar.DARK},reducers:{setThemeMode(e,t){var n;e.theme=t.payload,n=t.payload,localStorage.setItem("theme",n),document.body.setAttribute("arco-theme",n),localStorage.setItem("tradingview.current_theme.name",t.payload)}}}),{setThemeMode:dr}=cr,fr=Ht({name:"deal",initialState:{activeTab:"1",strategy:{minPrice:"",maxPrice:"",gridCount:"",gridArray:[],isClose:!1},updateList:!1,currentTokenPriceHook:{}},reducers:{setActiveTab:(e,t)=>{$()||["1","2"].includes(t.payload)?e.activeTab=t.payload:e.activeTab="1"},resetDealState:e=>{e.activeTab="1"},setDefaultTab:(e,t)=>{e.activeTab=t.payload},setStrategy:(e,t)=>{e.strategy=f(h(f({},e.strategy),{isClose:!1}),t.payload)},setUpdateList:(e,t)=>{e.updateList=t.payload},resetStrategy:e=>{e.strategy={minPrice:"",maxPrice:"",gridCount:"",gridArray:[],isClose:!0}},setCurrentTokenPriceHook:(e,t)=>{e.currentTokenPriceHook=t.payload}}}),{setActiveTab:hr,resetDealState:pr,setDefaultTab:mr}=fr.actions,gr=function(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=null!=e?e:{};let o=new Nt;return t&&(function(e){return"boolean"==typeof e}(t)?o.push(Et):o.push(At(t.extraArgument))),o},{reducer:n,middleware:r,devTools:i=!0,preloadedState:o,enhancers:s}=e||{};let a,l;if("function"==typeof n)a=n;else{if(!Pe(n))throw new Error(Vt(1));a=Ie(n)}l="function"==typeof r?r(t):t();let c=Le;i&&(c=jt(f({trace:!1},"object"==typeofi&&i)));const u=function(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(je(15))};const s={getState:i.getState,dispatch:(e,...t)=>o(e,...t)},a=e.map((e=>e(s)));return o=Le(...a)(i.dispatch),h(f({},i),{dispatch:o})}}(...l),d=It(u);return Me(a,o,c(..."function"==typeof s?s(d):d()))}({reducer:{login:Ln,chainConfig:tr,account:ir,tradeSetting:sr,theme:ur,deal:fr.reducer}});var vr={exports:{}},yr={},br=v;var xr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},_r=br.useSyncExternalStore,wr=br.useRef,Cr=br.useEffect,kr=br.useMemo,Sr=br.useDebugValue;yr.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=wr(null);if(null===o.current){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=kr((function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==i&&s.hasValue){var t=s.value;if(i(t,e))return a=t}return a=e}if(t=a,xr(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(o=e,t):(o=e,a=n)}var o,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var a=_r(e,o[0],o[1]);return Cr((function(){s.hasValue=!0,s.value=a}),[a]),Sr(a),a},vr.exports=yr;var Er=vr.exports;var Ar={notify(){},get:()=>[]};var jr=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Or=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),Nr=(()=>jr||Or?v.useLayoutEffect:v.useEffect)(),Tr=Symbol.for("react-redux-context"),Pr="undefined"!=typeof globalThis?globalThis:{};function Mr(){var e;if(!v.createContext)return{};const t=null!=(e=Pr[Tr])?e:Pr[Tr]=new Map;let n=t.get(v.createContext);return n||(n=v.createContext(null),t.set(v.createContext,n)),n}var Ir=Mr();var Lr=function(e){const{children:t,context:n,serverState:r,store:i}=e,o=v.useMemo((()=>{const e=function(e,t){let n,r=Ar,i=0,o=!1;function s(){c.onStateChange&&c.onStateChange()}function a(){i++,n||(n=t?t.addNestedSub(s):e.subscribe(s),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}())}function l(){i--,n&&0===i&&(n(),n=void 0,r.clear(),r=Ar)}const c={addNestedSub:function(e){a();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:s,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,a())},tryUnsubscribe:function(){o&&(o=!1,l())},getListeners:()=>r};return c}(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}}),[i,r]),s=v.useMemo((()=>i.getState()),[i]);Nr((()=>{const{subscription:e}=o;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[o,s]);const a=n||Ir;return v.createElement(a.Provider,{value:o},t)};function Rr(e=Ir){return function(){return v.useContext(e)}}var Dr=Rr();function Br(e=Ir){const t=e===Ir?Dr:Rr(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}var Fr=Br();function Hr(e=Ir){const t=e===Ir?Fr:Br(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var zr=Hr(),Vr=(e,t)=>e===t;function Ur(e=Ir){const t=e===Ir?Dr:Rr(e),n=(e,n={})=>{const{equalityFn:r=Vr}="function"==typeof n?{equalityFn:n}:n,i=t(),{store:o,subscription:s,getServerState:a}=i;v.useRef(!0);const l=v.useCallback({[e.name]:t=>e(t)}[e.name],[e]),c=Er.useSyncExternalStoreWithSelector(s.addNestedSub,o.getState,a||o.getState,l,r);return v.useDebugValue(c),c};return Object.assign(n,{withTypes:()=>n}),n}for(var Gr,Wr=Ur(),qr=[],Zr=0;Zr<256;++Zr)qr.push((Zr+256).toString(16).slice(1));var Xr=new Uint8Array(16);function Kr(){if(!Gr&&!(Gr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gr(Xr)}const Yr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $r(e,t,n){if(Yr.randomUUID&&!t&&!e)return Yr.randomUUID();var r=(e=e||{}).random||(e.rng||Kr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e,t=0){return(qr[e[t+0]]+qr[e[t+1]]+qr[e[t+2]]+qr[e[t+3]]+"-"+qr[e[t+4]]+qr[e[t+5]]+"-"+qr[e[t+6]]+qr[e[t+7]]+"-"+qr[e[t+8]]+qr[e[t+9]]+"-"+qr[e[t+10]]+qr[e[t+11]]+qr[e[t+12]]+qr[e[t+13]]+qr[e[t+14]]+qr[e[t+15]]).toLowerCase()}(r)}var Jr={exports:{}};var Qr={exports:{}};const ei=b(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ti;function ni(){return ti||(ti=1,Qr.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==x&&x.crypto&&(n=x.crypto),!n)try{n=ei}catch(m){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(m){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(m){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(_k){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,o);if(c){for(var d=0;d<c;d+=s)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=h.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}});var p=o.algo={};return o}(Math),e)),Qr.exports;var e}var ri,ii={exports:{}};function oi(){return ri?ii.exports:(ri=1,ii.exports=(s=ni(),n=(t=s).lib,r=n.Base,i=n.WordArray,(o=t.x64={}).Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),o.WordArray=r.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),n=t.length,i=0;i<n;i++)t[i]=t[i].clone();return e}}),s));var e,t,n,r,i,o,s}var si,ai={exports:{}};function li(){return si||(si=1,ai.exports=(e=ni(),function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,n=t.init,r=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],i=0;i<t;i++)r[i>>>2]|=e[i]<<24-i%4*8;n.call(this,r,t)}else n.apply(this,arguments)};r.prototype=t}}(),e.lib.WordArray)),ai.exports;var e}var ci,ui={exports:{}};function di(){return ci?ui.exports:(ci=1,ui.exports=(e=ni(),function(){var t=e,n=t.lib.WordArray,r=t.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return n.create(r,2*t)}},r.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var s=i(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o<t;o++)r[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return n.create(r,2*t)}}}(),e.enc.Utf16));var e}var fi,hi={exports:{}};function pi(){return fi?hi.exports:(fi=1,hi.exports=(e=ni(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64));var e}var mi,gi={exports:{}};function vi(){return mi?gi.exports:(mi=1,gi.exports=(e=ni(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],s=0;s<r;s+=3)for(var a=(n[s>>>2]>>>24-s%4*8&255)<<16|(n[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|n[s+2>>>2]>>>24-(s+2)%4*8&255,l=0;l<4&&s+.75*l<r;l++)o.push(i.charAt(a>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<i.length;s++)o[i.charCodeAt(s)]=s}var a=i.charAt(64);if(a){var l=e.indexOf(a);-1!==l&&(n=l)}return r(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url));var e}var yi,bi={exports:{}};function xi(){return yi||(yi=1,bi.exports=(e=ni(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],l=e[t+1],h=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],x=e[t+9],_=e[t+10],w=e[t+11],C=e[t+12],k=e[t+13],S=e[t+14],E=e[t+15],A=o[0],j=o[1],O=o[2],N=o[3];A=c(A,j,O,N,s,7,a[0]),N=c(N,A,j,O,l,12,a[1]),O=c(O,N,A,j,h,17,a[2]),j=c(j,O,N,A,p,22,a[3]),A=c(A,j,O,N,m,7,a[4]),N=c(N,A,j,O,g,12,a[5]),O=c(O,N,A,j,v,17,a[6]),j=c(j,O,N,A,y,22,a[7]),A=c(A,j,O,N,b,7,a[8]),N=c(N,A,j,O,x,12,a[9]),O=c(O,N,A,j,_,17,a[10]),j=c(j,O,N,A,w,22,a[11]),A=c(A,j,O,N,C,7,a[12]),N=c(N,A,j,O,k,12,a[13]),O=c(O,N,A,j,S,17,a[14]),A=u(A,j=c(j,O,N,A,E,22,a[15]),O,N,l,5,a[16]),N=u(N,A,j,O,v,9,a[17]),O=u(O,N,A,j,w,14,a[18]),j=u(j,O,N,A,s,20,a[19]),A=u(A,j,O,N,g,5,a[20]),N=u(N,A,j,O,_,9,a[21]),O=u(O,N,A,j,E,14,a[22]),j=u(j,O,N,A,m,20,a[23]),A=u(A,j,O,N,x,5,a[24]),N=u(N,A,j,O,S,9,a[25]),O=u(O,N,A,j,p,14,a[26]),j=u(j,O,N,A,b,20,a[27]),A=u(A,j,O,N,k,5,a[28]),N=u(N,A,j,O,h,9,a[29]),O=u(O,N,A,j,y,14,a[30]),A=d(A,j=u(j,O,N,A,C,20,a[31]),O,N,g,4,a[32]),N=d(N,A,j,O,b,11,a[33]),O=d(O,N,A,j,w,16,a[34]),j=d(j,O,N,A,S,23,a[35]),A=d(A,j,O,N,l,4,a[36]),N=d(N,A,j,O,m,11,a[37]),O=d(O,N,A,j,y,16,a[38]),j=d(j,O,N,A,_,23,a[39]),A=d(A,j,O,N,k,4,a[40]),N=d(N,A,j,O,s,11,a[41]),O=d(O,N,A,j,p,16,a[42]),j=d(j,O,N,A,v,23,a[43]),A=d(A,j,O,N,x,4,a[44]),N=d(N,A,j,O,C,11,a[45]),O=d(O,N,A,j,E,16,a[46]),A=f(A,j=d(j,O,N,A,h,23,a[47]),O,N,s,6,a[48]),N=f(N,A,j,O,y,10,a[49]),O=f(O,N,A,j,S,15,a[50]),j=f(j,O,N,A,g,21,a[51]),A=f(A,j,O,N,C,6,a[52]),N=f(N,A,j,O,p,10,a[53]),O=f(O,N,A,j,_,15,a[54]),j=f(j,O,N,A,l,21,a[55]),A=f(A,j,O,N,b,6,a[56]),N=f(N,A,j,O,E,10,a[57]),O=f(O,N,A,j,v,15,a[58]),j=f(j,O,N,A,k,21,a[59]),A=f(A,j,O,N,m,6,a[60]),N=f(N,A,j,O,w,10,a[61]),O=f(O,N,A,j,h,15,a[62]),j=f(j,O,N,A,x,21,a[63]),o[0]=o[0]+A|0,o[1]=o[1]+j|0,o[2]=o[2]+O|0,o[3]=o[3]+N|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,l=a.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function u(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function d(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(l),n.HmacMD5=o._createHmacHelper(l)}(Math),e.MD5)),bi.exports;var e}var _i,wi={exports:{}};function Ci(){return _i?wi.exports:(_i=1,wi.exports=(a=ni(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],l=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var u=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=u<<1|u>>>31}var d=(r<<5|r>>>27)+l+o[c];d+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,l=a,a=s,s=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1));var e,t,n,r,i,o,s,a}var ki,Si={exports:{}};function Ei(){return ki?Si.exports:(ki=1,Si.exports=(e=ni(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],l=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}functionn(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(a[i]=n(t.pow(r,.5))),l[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],u=n[5],d=n[6],f=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[h-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[h]=m+c[h-7]+v+c[h-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=f+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&d)+l[h]+c[h];f=d,d=u,u=a,a=s+x|0,s=o,o=i,i=r,r=x+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(u),n.HmacSHA256=o._createHmacHelper(u)}(Math),e.SHA256));var e}var Ai,ji={exports:{}};var Oi,Ni={exports:{}};function Ti(){return Oi||(Oi=1,Ni.exports=(e=ni(),oi(),function(){var t=e,n=t.lib.Hasher,r=t.x64,i=r.Word,o=r.WordArray,s=t.algo;function a(){return i.create.apply(i,arguments)}var l=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=a()}();var u=s.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],u=n[5],d=n[6],f=n[7],h=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=s.high,x=s.low,_=a.high,w=a.low,C=u.high,k=u.low,S=d.high,E=d.low,A=f.high,j=f.low,O=h,N=p,T=m,P=g,M=v,I=y,L=b,R=x,D=_,B=w,F=C,H=k,z=S,V=E,U=A,G=j,W=0;W<80;W++){var q,Z,X=c[W];if(W<16)Z=X.high=0|e[t+2*W],q=X.low=0|e[t+2*W+1];else{var K=c[W-15],Y=K.high,$=K.low,J=(Y>>>1|$<<31)^(Y>>>8|$<<24)^Y>>>7,Q=($>>>1|Y<<31)^($>>>8|Y<<24)^($>>>7|Y<<25),ee=c[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[W-7],se=oe.high,ae=oe.low,le=c[W-16],ce=le.high,ue=le.low;Z=(Z=(Z=J+se+((q=Q+ae)>>>0<Q>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=ue)>>>0<ue>>>0?1:0),X.high=Z,X.low=q}var de,fe=D&F^~D&z,he=B&H^~B&V,pe=O&T^O&M^T&M,me=N&P^N&I^P&I,ge=(O>>>28|N<<4)^(O<<30|N>>>2)^(O<<25|N>>>7),ve=(N>>>28|O<<4)^(N<<30|O>>>2)^(N<<25|O>>>7),ye=(D>>>14|B<<18)^(D>>>18|B<<14)^(D<<23|B>>>9),be=(B>>>14|D<<18)^(B>>>18|D<<14)^(B<<23|D>>>9),xe=l[W],_e=xe.high,we=xe.low,Ce=U+ye+((de=G+be)>>>0<G>>>0?1:0),ke=ve+me;U=z,G=V,z=F,V=H,F=D,H=B,D=L+(Ce=(Ce=(Ce=Ce+fe+((de+=he)>>>0<he>>>0?1:0))+_e+((de+=we)>>>0<we>>>0?1:0))+Z+((de+=q)>>>0<q>>>0?1:0))+((B=R+de|0)>>>0<R>>>0?1:0)|0,L=M,R=I,M=T,I=P,T=O,P=N,O=Ce+(ge+pe+(ke>>>0<ve>>>0?1:0))+((N=de+ke|0)>>>0<de>>>0?1:0)|0}p=r.low=p+N,r.high=h+O+(p>>>0<N>>>0?1:0),g=i.low=g+P,i.high=m+T+(g>>>0<P>>>0?1:0),y=o.low=y+I,o.high=v+M+(y>>>0<I>>>0?1:0),x=s.low=x+R,s.high=b+L+(x>>>0<R>>>0?1:0),w=a.low=w+B,a.high=_+D+(w>>>0<B>>>0?1:0),k=u.low=k+H,u.high=C+F+(k>>>0<H>>>0?1:0),E=d.low=E+V,d.high=S+z+(E>>>0<V>>>0?1:0),j=f.low=j+G,f.high=A+U+(j>>>0<G>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=n._createHelper(u),t.HmacSHA512=n._createHmacHelper(u)}(),e.SHA512)),Ni.exports;var e}var Pi,Mi={exports:{}};var Ii,Li={exports:{}};function Ri(){return Ii||(Ii=1,Li.exports=(e=ni(),oi(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.x64.Word,a=n.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,d=0,f=0;f<7;f++){if(1&i){var h=(1<<f)-1;h<32?d^=1<<h:a^=1<<h-32}128&i?i=i<<1^113:i<<=1}u[o]=s.create(a,d)}}();var d=[];!function(){for(var e=0;e<25;e++)d[e]=s.create()}();var f=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=e[t+2*i],s=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(j=n[i]).high^=s,j.low^=o}for(var a=0;a<24;a++){for(var f=0;f<5;f++){for(var h=0,p=0,m=0;m<5;m++)h^=(j=n[f+5*m]).high,p^=j.low;var g=d[f];g.high=h,g.low=p}for(f=0;f<5;f++){var v=d[(f+4)%5],y=d[(f+1)%5],b=y.high,x=y.low;for(h=v.high^(b<<1|x>>>31),p=v.low^(x<<1|b>>>31),m=0;m<5;m++)(j=n[f+5*m]).high^=h,j.low^=p}for(var _=1;_<25;_++){var w=(j=n[_]).high,C=j.low,k=l[_];k<32?(h=w<<k|C>>>32-k,p=C<<k|w>>>32-k):(h=C<<k-32|w>>>64-k,p=w<<k-32|C>>>64-k);var S=d[c[_]];S.high=h,S.low=p}var E=d[0],A=n[0];for(E.high=A.high,E.low=A.low,f=0;f<5;f++)for(m=0;m<5;m++){var j=n[_=f+5*m],O=d[_],N=d[(f+1)%5+5*m],T=d[(f+2)%5+5*m];j.high=O.high^~N.high&T.high,j.low=O.low^~N.low&T.low}j=n[0];var P=u[a];j.high^=P.high,j.low^=P.low}},_doFinalize:function(){var e=this._data,n=e.words;this._nDataBytes;var r=8*e.sigBytes,o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,l=a/8,c=[],u=0;u<l;u++){var d=s[u],f=d.high,h=d.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(f)}return new i.init(c,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});n.SHA3=o._createHelper(f),n.HmacSHA3=o._createHmacHelper(f)}(Math),e.SHA3)),Li.exports;var e}var Di,Bi={exports:{}};var Fi,Hi={exports:{}};function zi(){return Fi?Hi.exports:(Fi=1,Hi.exports=(e=ni(),n=(t=e).lib.Base,r=t.enc.Utf8,void(t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,l=s.words,c=0;c<n;c++)a[c]^=1549556828,l[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}}))));var e,t,n,r}var Vi,Ui={exports:{}};var Gi,Wi={exports:{}};function qi(){return Gi?Wi.exports:(Gi=1,Wi.exports=(a=ni(),Ci(),zi(),t=(e=a).lib,n=t.Base,r=t.WordArray,i=e.algo,o=i.MD5,s=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,i=this.cfg,o=i.hasher.create(),s=r.create(),a=s.words,l=i.keySize,c=i.iterations;a.length<l;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var u=1;u<c;u++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*l,s}}),e.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)},a.EvpKDF));var e,t,n,r,i,o,s,a}var Zi,Xi={exports:{}};function Ki(){return Zi?Xi.exports:(Zi=1,Xi.exports=(e=ni(),qi(),void(e.lib.Cipher||function(t){var n=e,r=n.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=n.enc;a.Utf8;var l=a.Base64,c=n.algo.EvpKDF,u=r.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var d=n.mode={},f=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=d.CBC=function(){var e=f.extend();function n(e,n,r){var i,o=this._iv;o?(i=o,this._iv=t):i=this._prevBlock;for(var s=0;s<r;s++)e[n+s]^=i[s]}return e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),e}(),p=(n.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(i);var l=o.create(s,r);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:t})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return m.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(n.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=o.random(8)),i)s=c.create({keySize:t+n,hasher:i}).compute(e,r);else var s=c.create({keySize:t+n}).compute(e,r);var a=o.create(s.words.slice(t),4*n);return s.sigBytes=4*t,m.create({key:s,iv:a,salt:r})}},b=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}())));var e}var Yi,$i={exports:{}};var Ji,Qi={exports:{}};var eo,to={exports:{}};function no(){return eo?to.exports:(eo=1,to.exports=(e=ni(),Ki(),
  5. /** @preserve
  6. * Counter block mode compatible with Dr Brian Gladman fileenc.c
  7. /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};const jV=((e,t,n)=>function(e){const t=t=>e().update(lV(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}((()=>new AV(t,e,n))))(1,136,32);let OV=!1;const NV=function(e){return jV(e)};let TV=NV;function PV(e){const t=rV(e,"data");return function(e){const t=rV(e);let n="0x";for(let r=0;r<t.length;r++){const e=t[r];n+=iV[(240&e)>>4]+iV[15&e]}return n}(TV(t))}PV._=NV,PV.lock=function(){OV=!0},PV.register=function(e){if(OV)throw new TypeError("keccak256 is locked");TV=e},Object.freeze(PV);const MV=BigInt(0),IV=BigInt(36);function LV(e){const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=t[i].charCodeAt(0);const r=rV(PV(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&r[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const RV={};for(let LJe=0;LJe<10;LJe++)RV[String(LJe)]=String(LJe);for(let LJe=0;LJe<26;LJe++)RV[String.fromCharCode(65+LJe)]=String(10+LJe);const DV=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function BV(e){if(nV("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=LV(e);return nV(!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}$/)){nV(e.substring(2,4)===function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>RV[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);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}(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=MV;for(let n=0;n<e.length;n++)t=t*IV+DV[e[n]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return LV("0x"+t)}nV(!1,"invalid address","address",e)}const FV=e=>{try{return BV(e.toLowerCase())}catch(_k){return e}};var HV,zV;let VV=(HV="U2FsdGVkX19hono6+OQqZNpO+ZzRxTmy38oHeHzuZV7jDyEW09kU9Qs5Ow2Pqp0QBtKiRezkkz9rfb4WmyUS5g==",zV="你赶紧给我隐藏",Ho.AES.decrypt(HV,zV).toString(Ho.enc.Utf8));function UV(){let e=localStorage.getItem("device_id");return e||(e=$r(),localStorage.setItem("device_id",e)),e}const GV=P.create({baseURL:window.location.host.includes("localhost")?"https://web-react-test.dexxt.net/-/api":`https://${window.location.host}/-/api`,retry:3,retryDelay:1e3,timeout:3e4,headers:{"Content-Type":"application/json",Expires:0,"X-Version":"2","X-Source":"3","X-Version-Web":"3"}});let WV=[];function qV(e){return GV({url:"/v1/data/get_config",method:"get",data:e})}function ZV(e){return GV({url:"/v1/data/get_token_list",method:"get",data:h(f({},e),{not_msg:!0})})}function XV(e){return GV({url:"/v1/data/search_pair_address",method:"get",data:e})}function KV(e){return GV({url:"/v1/account/get_token_like_list",method:"get",data:h(f({},e),{not_msg:!0})})}function YV(e){return GV({url:"/v2/account/get_monitor_wallet_trade_info",method:"get",data:e})}function $V(e){return GV({url:"/v1/account/add_monitor_wallet",method:"post",data:e})}function JV(e){return GV({url:"/v1/account/edit_monitor_wallet",method:"post",data:e})}function QV(e){return GV({url:"/v1/account/delete_monitor_wallet",method:"post",data:e})}function eU(e){return GV({url:"/v1/account/get_monitor_wallet",method:"get",data:e})}function tU(e){returnGV({url:"/v1/data/get_pump_token_list",method:"get",data:e})}function nU(e){return GV({url:"/v2/address_black_manage",method:"post",data:e})}function rU(e){return GV({url:"/v2/account/transfer_history",method:"post",data:e})}function iU(e){return GV({url:"/v2/data/ranking_tabs",method:"get",data:e})}function oU(){return{send:function(e){const{params:t}=e,n=window.webSocket;!n||1!==n.readyState&&3!==n.readyState||n.send(JSON.stringify(t))},cancel:function(e){const{params:t}=e,n=window.webSocket;!n||1!==n.readyState&&3!==n.readyState||n.send(JSON.stringify(t))},clear:function(){sessionStorage.clear()}}}function sU(e){return"function"==typeof e}function aU(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}GV.interceptors.request.use((e=>{var t,n;e.metadata={startTime:(new Date).getTime()},(null==(t=e.data)?void 0:t.token_ca)&&(e.data.token_ca=FV(null==(n=e.data)?void 0:n.token_ca));const r=["toString","method","floor","keys","theme","X-Signature","Bearer ","headers","data","get","now"],i=function(e,t){return r[e-=0]};e[i("0x7")]=h(f({},e[i("0x7")]),{"X-Language":("zh-CN"==Mn.language?"zh":Mn.language)||"zh","N-Timestamp":Math[i("0x2")](Date[i("0xa")]()/1e3)[i("0x0")](),"X-Theme":"light"===localStorage.getItem(i("0x4"))?1:2,"N-Uuid":$r(),"N-Device-Id":UV()});let o=Qo("get"===e[i("0x1")]?null:e.data,VV),s=Jo({"N-Timestamp":e.headers["N-Timestamp"],"N-Uuid":e[i("0x7")]["N-Uuid"],"N-Device-Id":UV()},o,VV);e.headers[i("0x5")]=s;let a=$();if(a&&(e[i("0x7")].Authorization=i("0x6")+a),e.method===i("0x9")&&e[i("0x8")]){let t=e.url+"?";for(const n of Object.keys(e.data)){const r=e[i("0x8")][n];var l=encodeURIComponent(n)+"=";if(null!=r)if("object"==typeof r){for(const e of Object[i("0x3")](r))if(null!==r[e]&&void 0!==r[e]){t+=encodeURIComponent(n+"["+e+"]")+"="+encodeURIComponent(r[e])+"&"}}else t+=l+encodeURIComponent(r)+"&"}t=t.slice(0,-1),e[i("0x8")]="",e.url=t}else e.data=o;return e}),(e=>{Promise.reject(e)})),GV.interceptors.response.use((e=>{const{status:t,data:{code:n,message:r},config:i,request:o}=e,s=(new Date).getTime(),{startTime:a}=i.metadata,l=s-a;return WV.push({key:e.config.url,value:l}),WV.length>100&&WV.shift(),localStorage.setItem("times",JSON.stringify(WV)),200==t?(1013===n||1611===n?(localStorage.removeItem("token"),localStorage.removeItem("listen_key"),localStorage.removeItem("walletInfo"),hc.error(Mn.t("message.please_log_in")),gr.dispatch({type:"login/setIsLoginExpiredModal",payload:n})):1e3!==n&&(5004===n||1606==n||1023==n||1601==n||1800==n||1612==n||1048==n||1066==n||1060==n||3003==n||(null==o?void 0:o.url)&&o.url.includes("v1/strategy/grid/create")||r&&("已绑定 google验证,请输入谷歌验证码后登录"!==r&&"Authenticator is bound. Please enter your Google/Microsoft authenticator code to log in"!==r&&"已綁定驗證器,請輸入Google/微軟驗證碼後登入"!==r&&hc.error(r))),Promise.resolve(e.data)):Promise.reject(e)}),(e=>{if(e.config){const t=(new Date).getTime(),{startTime:n}=e.config.metadata,r=t-n;WV.push({key:e.config.url,value:r}),WV.length>100&&WV.shift(),localStorage.setItem("times",JSON.stringify(WV))}return Promise.reject(e)}));var lU=aU((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function cU(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var uU=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=UO(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(h){e={error:h}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(sU(l))try{l()}catch(_k){i=_k instanceof lU?_k.errors:[_k]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=UO(c),d=u.next();!d.done;d=u.next()){var f=d.value;try{hU(f)}catch(p){i=null!=i?i:[],p instanceof lU?i=WO(WO([],GO(i)),GO(p.errors)):i.push(p)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new lU(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)hU(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&cU(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&cU(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),dU=uU.EMPTY;function fU(e){return e instanceof uU||e&&"closed"in e&&sU(e.remove)&&sU(e.add)&&sU(e.unsubscribe)}function hU(e){sU(e)?e():e.unsubscribe()}var pU=void 0,mU=!1,gU={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=gU.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,WO([e,t],GO(n))):setTimeout.apply(void0,WO([e,t],GO(n)))},clearTimeout:function(e){var t=gU.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function vU(){}function yU(e){e()}var bU=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,fU(t)&&t.add(n)):n.destination=SU,n}return BO(t,e),t.create=function(e,t,n){return new CU(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(uU),xU=Function.prototype.bind;function _U(e,t){return xU.call(e,t)}var wU=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){kU(n)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){kU(n)}else kU(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){kU(t)}},e}(),CU=function(e){function t(t,n,r){vari,o,s=e.call(this)||this;sU(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&mU?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&_U(t.next,o),error:t.error&&_U(t.error,o),complete:t.complete&&_U(t.complete,o)}):i=t;return s.destination=new wU(i),s}return BO(t,e),t}(bU);function kU(e){var t;t=e,gU.setTimeout((function(){throw t}))}var SU={closed:!0,next:vU,error:function(e){throw e},complete:vU},EU="function"==typeof Symbol&&Symbol.observable||"@@observable";function AU(e){return e}var jU=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,o=(r=e)&&r instanceof bU||function(e){return e&&sU(e.next)&&sU(e.error)&&sU(e.complete)}(r)&&fU(r)?e:new CU(e,t,n);return yU((function(){var e=i,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=OU(t))((function(t,r){var i=new CU({next:function(t){try{e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[EU]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?AU:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=OU(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function OU(e){var t;return null!==(t=null!=e?e:pU)&&void 0!==t?t:Promise}function NU(e){return function(t){if(function(e){return sU(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(n){this.error(n)}}));throw new TypeError("Unable to lift unknown Observable type")}}var TU=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(r){t.error(r)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(n){t.error(n)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return BO(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(bU),PU=aU((function(e){returnfunction(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),MU=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return BO(t,e),t.prototype.lift=function(e){var t=new IU(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new PU},t.prototype.next=function(e){var t=this;yU((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=UO(t.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(e)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;yU((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;yU((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?dU:(this.currentObservers=null,o.push(e),new uU((function(){t.currentObservers=null,cU(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new jU;return e.source=this,e},t.create=function(e,t){return new IU(e,t)},t}(jU),IU=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return BO(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:dU},t}(MU),LU=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return BO(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(MU);function RU(e,t){return void 0===t&&(t=AU),e=null!=e?e:DU,NU((function(n,r){var i,o,s,a,l=!0;n.subscribe(new TU(r,(function(n){var o=t(n);!l&&e(i,o)||(l=!1,i=o,r.next(n))}),o,s,a))}))}function DU(e,t){return e===t}let BU={office_smart_trade_erupt_action_activity:new LU(null),office_smart_trade_activity:new LU(null),smart_trade_activity:new LU(null),token_kline:new LU(null),token_trades:new LU(null),token_interval_open:new LU(null),system_notice:new LU(null),token_transfer_notice:new LU(null),token_price:new LU(null),market_buy:new LU(null),strategy_activity:new LU(null),chain_token_price:new LU(null),pump_progress:new LU(null)};const FU=()=>({office_smart_trade_erupt_action_activity:BU.office_smart_trade_erupt_action_activity.pipe(RU()),office_smart_trade_activity:BU.office_smart_trade_activity.pipe(RU()),smart_trade_activity:BU.smart_trade_activity.pipe(RU()),token_kline:BU.token_kline.pipe(RU()),token_trades:BU.token_trades.pipe(RU()),token_interval_open:BU.token_interval_open.pipe(RU()),system_notice:BU.system_notice.pipe(RU()),token_transfer_notice:BU.token_transfer_notice.pipe(RU()),token_price:BU.token_price.pipe(RU()),market_buy:BU.market_buy.pipe(RU()),strategy_activity:BU.strategy_activity.pipe(RU()),chain_token_price:BU.chain_token_price.pipe(RU()),pump_progress:BU.pump_progress.pipe(RU())}),HU=()=>zr(),zU=Wr;letVU,UU,GU=window.location.host.includes("localhost")?"wss://web-react-test.dexxt.net/-/ws/stream":`wss://${window.location.host}/-/ws/stream`,WU=!1,qU=null;function ZU(){const{listen_key:e}=zU((e=>e.login)),t=v.useRef(!1),n=v.useRef(null),r=v.useRef(null),i=HU();function o(e){try{VU=new WebSocket(GU),n.current=VU,window.webSocket=VU,function(e){VU.onopen=function(){t.current=!0,VU.send(JSON.stringify(e)),i(nr("1")),"1"===qU&&(VU.send(JSON.stringify(e)),localStorage.setItem("wsRecoConnected","1")),a.start()},VU.onclose=function(i){t.current=!1,n.current=null,a.stop(),r.current&&s(e)},VU.onerror=function(){qU="1",t.current=!1,localStorage.setItem("wsRecoConnected","1"),s(e)},VU.onmessage=function(e){let t=JSON.parse(e.data);e.data&&!["pong","connect",null,void 0,""].includes(t.action)&&1e3===t.code&&t.data&&(localStorage.getItem("wsRecoConnected")&&localStorage.removeItem("wsRecoConnected"),(e=>{e&&["office_smart_trade_erupt_action_activity","office_smart_trade_activity","smart_trade_activity","token_kline","token_activity","token_interval_open","system_notice","token_transfer_notice","token_trades","token_price","market_buy","strategy_activity","chain_token_price","pump_progress"].includes(e.channel)&&BU[e.channel].next(e.data)})(t))}}(e)}catch(_k){s(e)}}function s(e){i(nr(null)),WU||(WU=!0,UU&&clearTimeout(UU),UU=setTimeout((function(){o(e),WU=!1}),4e3))}v.useEffect((()=>{let t={action:"connect"};e?GU=GU+"?token="+e:localStorage.getItem("listen_key")&&(GU=GU+"?token="+localStorage.getItem("listen_key")),r.current=t,o(t)}),[e]);var a={timeout:3e4,timeoutObj:null,reset:function(){return clearTimeout(this.timeoutObj),this},start:function(){const e=this;clearTimeout(e.timeoutObj);let n=t.current;e.timeoutObj=setInterval((()=>{n&&VU.send(JSON.stringify({action:"ping"}))}),e.timeout)},stop:function(){clearTimeout(this.timeoutObj)}};return{connectStatus:t,wsInstance:n}}var XU=/iPhone/i,KU=/iPod/i,YU=/iPad/i,$U=/\biOS-universal(?:.+)Mac\b/i,JU=/\bAndroid(?:.+)Mobile\b/i,QU=/Android/i,eG=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,tG=/Silk/i,nG=/Windows Phone/i,rG=/\bWindows(?:.+)ARM\b/i,iG=/BlackBerry/i,oG=/BB10/i,sG=/Opera Mini/i,aG=/\b(CriOS|Chrome)(?:.+)Mobile/i,lG=/Mobile(?:.+)Firefox\b/i,cG=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};const uG="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,dG=globalThis,fG="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,hG="9.2.0";function pG(){return mG(dG),dG}function mG(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||hG,t[hG]=t[hG]||{}}function gG(e,t,n=dG){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[hG]=r[hG]||{};return i[e]||(i[e]=t())}const vG=["debug","info","warn","error","log","assert","trace"],yG={};function bG(e){if(!("console"in dG))return e();const t=dG.console,n={},r=Object.keys(yG);r.forEach((e=>{const r=yG[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const xG=gG("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return fG?vG.forEach((n=>{t[n]=(...t)=>{e&&bG((()=>{dG.console[n](`Sentry Logger [${n}]:`,...t)}))}})):vG.forEach((e=>{t[e]=()=>{}})),t})),_G="?",wG=/\(error: (.*)\)/,CG=/captureMessage|captureException/;function kG(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const i=[],o=e.split("\n");for(let s=n;s<o.length;s++){const e=o[s];if(e.length>1024)continue;const n=wG.test(e)?e.replace(wG,"$1"):e;if(!n.match(/\S*Error: /)){for(const e of t){const t=e(n);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(SG(t).function||"")&&t.pop();t.reverse(),CG.test(SG(t).function||"")&&(t.pop(),CG.test(SG(t).function||"")&&t.pop());return t.slice(0,50).map((e=>h(f({},e),{filename:e.filename||SG(t).filename,function:e.function||_G})))}(i.slice(r))}}function SG(e){return e[e.length-1]||{}}const EG="<anonymous>";function AG(e){try{return e&&"function"==typeof e&&e.name||EG}catch(_k){return EG}}function jG(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(n){return}}}const OG={},NG={};function TG(e,t){OG[e]=OG[e]||[],OG[e].push(t)}function PG(e,t){if(!NG[e]){NG[e]=!0;try{t()}catch(_k){fG&&xG.error(`Error while instrumenting ${e}`,_k)}}}function MG(e,t){const n=e&&OG[e];if(n)for(const r of n)try{r(t)}catch(_k){fG&&xG.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${AG(r)}\nError:`,_k)}}let IG=null;function LG(e){const t="error";TG(t,e),PG(t,RG)}function RG(){IG=dG.onerror,dG.onerror=function(e,t,n,r,i){return MG("error",{column:r,error:i,line:n,msg:e,url:t}),!!IG&&IG.apply(this,arguments)},dG.onerror.__SENTRY_INSTRUMENTED__=!0}let DG=null;function BG(e){const t="unhandledrejection";TG(t,e),PG(t,FG)}function FG(){DG=dG.onunhandledrejection,dG.onunhandledrejection=function(e){return MG("unhandledrejection",e),!DG||DG.apply(this,arguments)},dG.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const HG=Object.prototype.toString;function zG(e){switch(HG.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return $G(e,Error)}}function VG(e,t){return HG.call(e)===`[object ${t}]`}function UG(e){return VG(e,"ErrorEvent")}functionGG(e){return VG(e,"DOMError")}function WG(e){return VG(e,"String")}function qG(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ZG(e){return null===e||qG(e)||"object"!=typeof e&&"function"!=typeof e}function XG(e){return VG(e,"Object")}function KG(e){return"undefined"!=typeof Event&&$G(e,Event)}function YG(e){return Boolean((null==e?void 0:e.then)&&"function"==typeof e.then)}function $G(e,t){try{return e instanceof t}catch(n){return!1}}function JG(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const QG=dG;function eW(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",l=a.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(c=tW(n,u),!("html"===c||o>1&&s+i.length*l+c.length>=d));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(a)}catch(n){return"<unknown>"}}function tW(e,t){const n=e,r=[];if(!(null==n?void 0:n.tagName))return"";if(QG.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=(null==t?void 0:t.length)?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(null==i?void 0:i.length)i.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&WG(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const s of o){const e=n.getAttribute(s);e&&r.push(`[${s}="${e}"]`)}return r.join("")}function nW(){try{return QG.document.location.href}catch(e){return""}}function rW(e){if(!QG.HTMLElement)return null;let t=e;for(let n=0;n<5;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function iW(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function oW(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];try{JG(t)?n.push("[VueViewModel]"):n.push(String(t))}catch(_k){n.push("[value cannot be serialized]")}}return n.join(t)}function sW(e,t,n=!1){return!!WG(e)&&(VG(t,"RegExp")?t.test(e):!!WG(t)&&(n?e===t:e.includes(t)))}function aW(e,t=[],n=!1){return t.some((t=>sW(e,t,n)))}function lW(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&uW(i,r);try{e[t]=i}catch(_k){fG&&xG.log(`Failed to replace method "${t}" in object`,e)}}function cW(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){fG&&xG.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function uW(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,cW(e,"__sentry_original__",t)}catch(n){}}function dW(e){return e.__sentry_original__}function fW(e){if(zG(e))return f({message:e.message,name:e.name,stack:e.stack},pW(e));if(KG(e)){const t=f({type:e.type,target:hW(e.target),currentTarget:hW(e.currentTarget)},pW(e));return"undefined"!=typeof CustomEvent&&$G(e,CustomEvent)&&(t.detail=e.detail),t}return e}function hW(e){try{return t=e,"undefined"!=typeof Element&&$G(t,Element)?eW(e):Object.prototype.toString.call(e)}catch(n){return"<unknown>"}var t}function pW(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function mW(e){return gW(e,new Map)}function gW(e,t){if(function(e){if(!XG(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(_k){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))void 0!==e[i]&&(r[i]=gW(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(gW(e,t))})),r}return e}function vW(){return Date.now()/1e3}const yW=function(){const{performance:e}=dG;if(!(null==e?void 0:e.now))return vW;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();let bW;function xW(){return bW||(bW=function(){var e;const{performance:t}=dG;if(!(null==t?void 0:t.now))return[void 0,"none"];const n=36e5,r=t.now(),i=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+r-i):n,s=o<n,a=null==(e=t.timing)?void 0:e.navigationStart,l="number"==typeof a?Math.abs(a+r-i):n;return s||l<n?o<=l?[t.timeOrigin,"timeOrigin"]:[a,"navigationStart"]:[i,"dateNow"]}()),bW[0]}function _W(){const e=dG,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(null==t?void 0:t.randomUUID)return t.randomUUID().replace(/-/g,"");(null==t?void 0:t.getRandomValues)&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(PJe){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}functionwW(e){var t,n;return null==(n=null==(t=e.exception)?void 0:t.values)?void 0:n[0]}function CW(e){const{message:t,event_id:n}=e;if(t)return t;const r=wW(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function kW(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function SW(e,t){const n=wW(e);if(!n)return;const r=n.mechanism;if(n.mechanism=f(f(f({},{type:"generic",handled:!0}),r),t),t&&"data"in t){const e=f(f({},null==r?void 0:r.data),t.data);n.mechanism.data=e}}function EW(e){if(function(e){try{return e.__sentry_captured__}catch(_k){}}(e))return!0;try{cW(e,"__sentry_captured__",!0)}catch(t){}return!1}var AW;function jW(e){return new NW((t=>{t(e)}))}function OW(e){return new NW(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(AW||(AW={}));class NW{constructor(e){this._state=AW.PENDING,this._handlers=[],this._runExecutor(e)}then(e,t){return new NW(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(_k){r(_k)}else n(t)},e=>{if(t)try{n(t(e))}catch(_k){r(_k)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new NW(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}_executeHandlers(){if(this._state===AW.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===AW.RESOLVED&&e[1](this._value),this._state===AW.REJECTED&&e[2](this._value),e[0]=!0)}))}_runExecutor(e){const t=(e,t)=>{this._state===AW.PENDING&&(YG(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(AW.RESOLVED,e)},r=e=>{t(AW.REJECTED,e)};try{e(n,r)}catch(_k){r(_k)}}}function TW(e){const t=yW(),n={sid:_W(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return mW({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&PW(n,e),n}function PW(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||yW(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:_W()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function MW(){return _W()}function IW(){return _W().substring(16)}function LW(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r=f({},e);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=LW(r[i],t[i],n-1));return r}const RW="_sentrySpan";function DW(e,t){t?cW(e,RW,t):delete e[RW]}function BW(e){return e[RW]}class FW{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:MW(),sampleRand:Math.random()}}clone(){const e=new FW;return e._breadcrumbs=[...this._breadcrumbs],e._tags=f({},this._tags),e._extra=f({},this._extra),e._contexts=f({},this._contexts),this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata=f({},this._sdkProcessingMetadata),e._propagationContext=f({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,DW(e,BW(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&PW(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags=f(f({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=h(f({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=f(f({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=h(f({},this._extra),{[e]:t}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof FW?t.getScopeData():XG(t)?e:void 0,{tags:r,extra:i,user:o,contexts:s,level:a,fingerprint:l=[],propagationContext:c}=n||{};return this._tags=f(f({},this._tags),r),this._extra=f(f({},this._extra),i),this._contexts=f(f({},this._contexts),s),o&&Object.keys(o).length&&(this._user=o),a&&(this._level=a),l.length&&(this._fingerprint=l),c&&(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,DW(this,void 0),this._attachments=[],this.setPropagationContext({traceId:MW(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){var n;const r="number"==typeof t?t:100;if(r<=0)return this;const i=f({timestamp:vW()},e);return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),null==(n=this._client)||n.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:BW(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=LW(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=(null==t?void 0:t.event_id)||_W();if(!this._client)return xG.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,h(f({originalException:e,syntheticException:r},t),{event_id:n}),this),n}captureMessage(e,t,n){const r=(null==n?void 0:n.event_id)||_W();if(!this._client)return xG.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);returnthis._client.captureMessage(e,t,h(f({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureEvent(e,t){const n=(null==t?void 0:t.event_id)||_W();return this._client?(this._client.captureEvent(e,h(f({},t),{event_id:n}),this),n):(xG.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}class HW{constructor(e,t){let n,r;n=e||new FW,r=t||new FW,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(_k){throw this._popScope(),_k}return YG(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function zW(){const e=mG(pG());return e.stack=e.stack||new HW(gG("defaultCurrentScope",(()=>new FW)),gG("defaultIsolationScope",(()=>new FW)))}function VW(e){return zW().withScope(e)}function UW(e,t){const n=zW();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function GW(e){return zW().withScope((()=>e(zW().getIsolationScope())))}function WW(e){const t=mG(e);return t.acs?t.acs:{withIsolationScope:GW,withScope:VW,withSetScope:UW,withSetIsolationScope:(e,t)=>GW(t),getCurrentScope:()=>zW().getScope(),getIsolationScope:()=>zW().getIsolationScope()}}function qW(){return WW(pG()).getCurrentScope()}function ZW(){return WW(pG()).getIsolationScope()}function XW(...e){const t=WW(pG());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function KW(){return qW().getClient()}function YW(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t;return mW({trace_id:n,span_id:i||IW(),parent_span_id:r})}const $W="sentry.source",JW="sentry.sample_rate",QW="sentry.op",eq="sentry.origin",tq="sentry.idle_span_finish_reason",nq="sentry.measurement_unit",rq="sentry.measurement_value",iq="sentry.custom_span_name",oq="sentry.profile_id",sq="sentry.exclusive_time";function aq(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const lq="_sentryScope",cq="_sentryIsolationScope";function uq(e){return{scope:e[lq],isolationScope:e[cq]}}function dq(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const fq="sentry-",hq=/^sentry-/;function pq(e){const t=function(e){if(!e||!WG(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce(((e,t)=>{const n=gq(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{});return gq(e)}(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(hq)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function mq(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],r)=>{const i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===r?i:`${e},${i}`;return o.length>8192?(fG&&xG.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${fq}${t}`]=n),e)),{}))}function gq(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const vq=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function yq(e,t){const n=function(e){if(!e)return;const t=e.match(vq);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=pq(t);if(!(null==n?void 0:n.traceId))return{traceId:MW(),sampleRand:Math.random()};const i=function(e,t){const n=dq(null==t?void 0:t.sample_rand);if(void 0!==n)return n;const r=dq(null==t?void 0:t.sample_rate);return r&&void 0!==(null==e?void 0:e.parentSampled)?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function bq(e=MW(),t=IW(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let xq=!1;function _q(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:l}=Eq(e);return mW({parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:l})}function wq(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Eq(e).parent_span_id,o=uq(e).scope;return mW({parent_span_id:i,span_id:r?(null==o?void 0:o.getPropagationContext().propagationSpanId)||IW():t,trace_id:n})}function Cq(e){return e&&e.length>0?e.map((e=>{var t=e,{context:n}=t,r=n,{spanId:i,traceId:o,traceFlags:s}=r,a=p(r,["spanId","traceId","traceFlags"]),{attributes:l}=t;return f({span_id:i,trace_id:o,sampled:1===s,attributes:l},a)})):void 0}function kq(e){return"number"==typeof e?Sq(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Sq(e.getTime()):yW()}function Sq(e){return e>9999999999?e/1e3:e}function Eq(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:l,links:c}=e;return mW({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:kq(i),timestamp:kq(s)||void 0,status:jq(l),op:r[QW],origin:r[eq],links:Cq(c)})}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Aq(e){const{traceFlags:t}=e.spanContext();return 1===t}function jq(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Oq="_sentryChildSpans",Nq="_sentryRootSpan";function Tq(e,t){const n=e[Nq]||e;cW(t,Nq,n),e[Oq]?e[Oq].add(t):cW(e,Oq,new Set([t]))}function Pq(e){const t=new Set;return function e(n){if(!t.has(n)&&Aq(n)){t.add(n);const r=n[Oq]?Array.from(n[Oq]):[];for(const t of r)e(t)}}(e),Array.from(t)}function Mq(e){return e[Nq]||e}function Iq(){const e=WW(pG());return e.getActiveSpan?e.getActiveSpan():BW(qW())}function Lq(){xq||(bG((()=>{})),xq=!0)}let Rq=!1;function Dq(){const e=Iq(),t=e&&Mq(e);if(t){const e="internal_error";uG&&xG.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}function Bq(e){var t;if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=e||(null==(t=KW())?void 0:t.getOptions());return!(!n||null==n.tracesSampleRate&&!n.tracesSampler)}Dq.tag="sentry_tracingErrorCallback";const Fq="production",Hq="_frozenDsc";function zq(e,t){cW(e,Hq,t)}function Vq(e,t){constn=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=mW({environment:n.environment||Fq,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Uq(e,t){const n=t.getPropagationContext();return n.dsc||Vq(n.traceId,e)}function Gq(e){var t,n,r;const i=KW();if(!i)return{};const o=Mq(e),s=Eq(o),a=s.data,l=o.spanContext().traceState,c=null!=(t=null==l?void 0:l.get("sentry.sample_rate"))?t:a[JW];function u(e){return"number"!=typeof c&&"string"!=typeof c||(e.sample_rate=`${c}`),e}const d=o[Hq];if(d)return u(d);const f=null==l?void 0:l.get("sentry.dsc"),h=f&&pq(f);if(h)return u(h);const p=Vq(e.spanContext().traceId,i),m=a[$W],g=s.description;return"url"!==m&&g&&(p.transaction=g),Bq()&&(p.sampled=String(Aq(o)),p.sample_rand=null!=(r=null==l?void 0:l.get("sentry.sample_rand"))?r:null==(n=uq(o).scope)?void 0:n.getPropagationContext().sampleRand.toString()),u(p),i.emit("createDsc",p,o),p}class Wq{constructor(e={}){this._traceId=e.traceId||MW(),this._spanId=e.spanId||IW()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}const qq=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Zq(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${s}`}function Xq(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Kq(e){const t="string"==typeof e?function(e){const t=qq.exec(e);if(!t)return void bG((()=>{}));const[n,r,i="",o="",s="",a=""]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return Xq({host:o,pass:i,path:l,projectId:c,port:s,protocol:n,publicKey:r})}(e):Xq(e);if(t&&function(e){if(!fG)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(xG.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(xG.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(xG.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(xG.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Yq(e,t=100,n=1/0){try{return Jq("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function $q(e,t=3,n=102400){const r=Yq(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?$q(e,t-1,n):r;var i}function Jq(e,t,n=1/0,r=1/0,i=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[o,s]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(JG(t))return"[VueViewModel]";if(XG(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${AG(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return a.replace("object ","");if(o(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return Jq("",c.toJSON(),l-1,r,i)}catch(h){}const u=Array.isArray(t)?[]:{};let d=0;const f=fW(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){u[p]="[MaxProperties ~]";break}const e=f[p];u[p]=Jq(p,e,l-1,r,i),d++}return s(t),u}function Qq(e,t=[]){return[e,t]}function eZ(e,t){const[n,r]=e;return[n,[...r,t]]}function tZ(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function nZ(e){const t=mG(dG);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function rZ(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[nZ(r),e]:r.push("string"==typeof e?nZ(e):e)}for(const o of n){const[e,t]=o;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch(_k){e=JSON.stringify(Yq(t))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(r)}function iZ(e){return[{type:"span"},e]}function oZ(e){const t="string"==typeof e.data?nZ(e.data):e.data;return[mW({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const sZ={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security"};function aZ(e){return sZ[e]}function lZ(e){if(!(null==e?void 0:e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function cZ(e,t,n,r){var i;const o=null==(i=e.sdkProcessingMetadata)?void 0:i.dynamicSamplingContext;return f(f(f({event_id:e.event_id,sent_at:(new Date).toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:Zq(r)}),o&&{trace:mW(f({},o))})}function uZ(e){if(!e||0===e.length)return;const t={};return e.forEach((e=>{const n=e.attributes||{},r=n[nq],i=n[rq];"string"==typeof r&&"number"==typeof i&&(t[e.name]={value:i,unit:r})})),t}class dZ{constructor(e={}){this._traceId=e.traceId||MW(),this._spanId=e.spanId||IW(),this._startTime=e.startTimestamp||yW(),this._links=e.links,this._attributes={},this.setAttributes(f({[eq]:"manual",[QW]:e.op},e.attributes)),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach((t=>this.setAttribute(t,e[t]))),this}updateStartTime(e){this._startTime=kq(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute($W,"custom"),this}end(e){this._endTime||(this._endTime=kq(e),function(e){if(!uG)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Eq(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${Mq(e)===e?"root ":""}span "${t}" with ID ${r}`;xG.log(i)}(this),this._onSpanEnded())}getSpanJSON(){return mW({data:this._attributes,description:this._name,op:this._attributes[QW],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:jq(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[eq],profile_id:this._attributes[oq],exclusive_time:this._attributes[sq],measurements:uZ(this._events),is_segment:this._isStandaloneSpan&&Mq(this)===this||void 0,segment_id:this._isStandaloneSpan?Mq(this).spanContext().spanId:void 0,links:Cq(this._links)})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){uG&&xG.log("[Tracing] Adding an event to span:",e);const r=fZ(t)?t:n||yW(),i=fZ(t)?{}:t||{},o={name:e,time:kq(r),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=KW();e&&e.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===Mq(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=KW();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function(e,t){const n=Gq(e[0]),r=null==t?void 0:t.getDsn(),i=null==t?void 0:t.getOptions().tunnel,o=f(f({sent_at:(new Date).toISOString()},!!(s=n).trace_id&&!!s.public_key&&{trace:n}),!!i&&r&&{dsn:Zq(r)});var s;consta=null==t?void 0:t.getOptions().beforeSendSpan,l=a?e=>{const t=Eq(e);return a(t)||(Lq(),t)}:Eq,c=[];for(const u of e){const e=l(u);e&&c.push(iZ(e))}return Qq(o,c)}([this],e)):(uG&&xG.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();if(t){(uq(this).scope||qW()).captureEvent(t)}}_convertSpanToTransaction(){if(!hZ(Eq(this)))return;this._name||(uG&&xG.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=uq(this);if(!0!==this._sampled)return;const n=Pq(this).filter((e=>e!==this&&!function(e){return einstanceof dZ&&e.isStandaloneSpan()}(e))).map((e=>Eq(e))).filter(hZ),r=this._attributes[$W];delete this._attributes[iq],n.forEach((e=>{delete e.data[iq]}));const i=f({contexts:{trace:_q(this)},spans:n.length>1e3?n.sort(((e,t)=>e.start_timestamp-t.start_timestamp)).slice(0,1e3):n,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:f({capturedSpanScope:e,capturedSpanIsolationScope:t},mW({dynamicSamplingContext:Gq(this)}))},r&&{transaction_info:{source:r}}),o=uZ(this._events);return o&&Object.keys(o).length&&(uG&&xG.log("[Measurements] Adding measurements to transaction event",JSON.stringify(o,void 0,2)),i.measurements=o),i}}function fZ(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function hZ(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const pZ="__SENTRY_SUPPRESS_TRACING__";function mZ(e){const t=vZ();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t=e.experimental||{},n=f({isStandalone:t.standalone},e);if(e.startTime){const t=f({},n);return t.startTimestamp=kq(e.startTime),delete t.startTime,t}return n}(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>XW(e.scope,t):void 0!==i?e=>gZ(i,e):e=>e())((()=>{const t=qW(),i=function(e){const t=BW(e);if(!t)return;const n=KW(),r=n?n.getOptions():{};if(r.parentSpanIsAlwaysRootSpan)return Mq(t);return t}(t);return e.onlyIfParent&&!i?new Wq:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Bq()){const r=new Wq;if(n||!e){zq(r,f({sampled:"false",sample_rate:"0",transaction:t.name},Gq(r)))}return r}const i=ZW();let o;if(e&&!n)o=function(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=!t.getScopeData().sdkProcessingMetadata[pZ]&&Aq(e),s=o?new dZ(h(f({},n),{parentSpanId:r,traceId:i,sampled:o})):new Wq({traceId:i});Tq(e,s);const a=KW();a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s));return s}(e,r,t),Tq(e,o);else if(e){const n=Gq(e),{traceId:i,spanId:s}=e.spanContext(),a=Aq(e);o=yZ(f({traceId:i,parentSpanId:s},t),r,a),zq(o,n)}else{const{traceId:e,dsc:n,parentSpanId:s,sampled:a}=f(f({},i.getPropagationContext()),r.getPropagationContext());o=yZ(f({traceId:e,parentSpanId:s},t),r,a),n&&zq(o,n)}return function(e){if(!uG)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Eq(e),{spanId:i}=e.spanContext(),o=Aq(e),s=Mq(e),a=s===e,l=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,c=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&c.push(`parent ID: ${r}`),!a){const{op:e,description:t}=Eq(s);c.push(`root ID: ${s.spanContext().spanId}`),e&&c.push(`root op: ${e}`),t&&c.push(`root description: ${t}`)}xG.log(`${l}\n ${c.join("\n ")}`)}(o),function(e,t,n){e&&(cW(e,cq,n),cW(e,lq,t))}(o,r,i),o}({parentSpan:i,spanArguments:n,forceTransaction:r,scope:t})}))}function gZ(e,t){const n=vZ();return n.withActiveSpan?n.withActiveSpan(e,t):XW((n=>(DW(n,e||void 0),t(n))))}function vZ(){return WW(pG())}function yZ(e,t,n){var r;const i=KW(),o=(null==i?void 0:i.getOptions())||{},{name:s="",attributes:a}=e,l=t.getPropagationContext(),[c,u,d]=t.getScopeData().sdkProcessingMetadata[pZ]?[!1]:function(e,t,n){if(!Bq(e))return[!1];let r,i;"function"==typeof e.tracesSampler?(i=e.tracesSampler(h(f({},t),{inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeoft.parentSampled?Number(t.parentSampled):e})),r=!0):void 0!==t.parentSampled?i=t.parentSampled:void 0!==e.tracesSampleRate&&(i=e.tracesSampleRate,r=!0);const o=dq(i);if(void 0===o)return uG&&xG.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return uG&&xG.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,o,r];const s=n<o;return s||uG&&xG.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}(o,{name:s,parentSampled:n,attributes:a,parentSampleRate:dq(null==(r=l.dsc)?void 0:r.sample_rate)},l.sampleRand),p=new dZ(h(f({},e),{attributes:f({[$W]:"custom",[JW]:void 0!==u&&d?u:void 0},e.attributes),sampled:c}));return!c&&i&&(uG&&xG.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate","transaction")),i&&i.emit("spanStart",p),p}const bZ={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function xZ(e,t={}){const n=new Map;let r,i=!1,o="externalFinish",s=!t.disableAutoFinish;const a=[],{idleTimeout:l=bZ.idleTimeout,finalTimeout:c=bZ.finalTimeout,childSpanTimeout:u=bZ.childSpanTimeout,beforeSpanEnd:d}=t,h=KW();if(!h||!Bq()){const e=new Wq;return zq(e,f({sample_rate:"0",sampled:"false"},Gq(e))),e}const p=qW(),m=Iq(),g=function(e){const t=mZ(e);return DW(qW(),t),uG&&xG.log("[Tracing] Started span is an idle span"),t}(e);function v(){r&&(clearTimeout(r),r=void 0)}function y(e){v(),r=setTimeout((()=>{!i&&0===n.size&&s&&(o="idleTimeout",g.end(e))}),l)}function b(e){r=setTimeout((()=>{!i&&s&&(o="heartbeatFailed",g.end(e))}),u)}function x(e){i=!0,n.clear(),a.forEach((e=>e())),DW(p,m);const t=Eq(g),{start_timestamp:r}=t;if(!r)return;t.data[tq]||g.setAttribute(tq,o),xG.log(`[Tracing] Idle span "${t.op}" finished`);const s=Pq(g).filter((e=>e!==g));let u=0;s.forEach((t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),uG&&xG.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=Eq(t),{timestamp:r=0,start_timestamp:i=0}=n,o=i<=e,s=r-i<=(c+l)/1e3;if(uG){const e=JSON.stringify(t,void 0,2);o?s||xG.log("[Tracing] Discarding span since it finished after idle span final timeout",e):xG.log("[Tracing] Discarding span since it happened after idle span was finished",e)}s&&o||(!function(e,t){e[Oq]&&e[Oq].delete(t)}(g,t),u++)})),u>0&&g.setAttribute("sentry.idle_span_discarded_spans",u)}return g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof Wq)return;const[r,...i]=n,o=kq(r||yW()),s=Pq(g).filter((e=>e!==g));if(!s.length)return x(o),Reflect.apply(e,t,[o,...i]);const a=s.map((e=>Eq(e).timestamp)).filter((e=>!!e)),l=a.length?Math.max(...a):void 0,u=Eq(g).start_timestamp,f=Math.min(u?u+c/1e3:1/0,Math.max(u||-1/0,Math.min(o,l||1/0)));return x(f),Reflect.apply(e,t,[f,...i])}}),a.push(h.on("spanStart",(e=>{if(i||e===g||Eq(e).timestamp)return;var t;Pq(g).includes(e)&&(t=e.spanContext().spanId,v(),n.set(t,!0),b(yW()+u/1e3))}))),a.push(h.on("spanEnd",(e=>{var t;i||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&y(yW()+l/1e3))}))),a.push(h.on("idleSpanEnableAutoFinish",(e=>{e===g&&(s=!0,y(),n.size&&b())}))),t.disableAutoFinish||y(),setTimeout((()=>{i||(g.setStatus({code:2,message:"deadline_exceeded"}),o="finalTimeout",g.end())}),c),g}function _Z(e,t,n,r=0){return new NW(((i,o)=>{const s=e[r];if(null===t||"function"!=typeof s)i(t);else{const a=s(f({},t),n);uG&&s.id&&null===a&&xG.log(`Event processor "${s.id}" dropped event`),YG(a)?a.then((t=>_Z(e,t,n,r+1).then(i))).then(null,o):_Z(e,a,n,r+1).then(i).then(null,o)}}))}let wZ,CZ,kZ;function SZ(e){const t=dG._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return kZ&&n.length===CZ||(CZ=n.length,kZ=n.reduce(((n,r)=>{wZ||(wZ={});const i=wZ[r];if(i)n[i[0]]=i[1];else{const i=e(r);for(let e=i.length-1;e>=0;e--){const o=i[e],s=null==o?void 0:o.filename,a=t[r];if(s&&a){n[s]=a,wZ[r]=[s,a];break}}}return n}),{})),kZ}function EZ(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t,l=mW(n);Object.keys(l).length&&(e.extra=f(f({},l),e.extra));const c=mW(r);Object.keys(c).length&&(e.tags=f(f({},c),e.tags));const u=mW(i);Object.keys(u).length&&(e.user=f(f({},u),e.user));const d=mW(o);Object.keys(d).length&&(e.contexts=f(f({},d),e.contexts));s&&(e.level=s);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts=f({trace:wq(t)},e.contexts),e.sdkProcessingMetadata=f({dynamicSamplingContext:Gq(t)},e.sdkProcessingMetadata);const n=Mq(t),r=Eq(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata=f(f({},e.sdkProcessingMetadata),t)}(e,o)}function AZ(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:p,span:m}=t;jZ(e,"extra",n),jZ(e,"tags",r),jZ(e,"user",i),jZ(e,"contexts",o),e.sdkProcessingMetadata=LW(e.sdkProcessingMetadata,a,2),s&&(e.level=s),p&&(e.transactionName=p),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext=f(f({},e.propagationContext),h)}function jZ(e,t,n){e[t]=LW(e[t],n,1)}function OZ(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l=h(f({},t),{event_id:t.event_id||n.event_id||_W(),timestamp:t.timestamp||vW()}),c=n.integrations||e.integrations.map((e=>e.name));!function(e,t){var n,r;const{environment:i,release:o,dist:s,maxValueLength:a=250}=t;e.environment=e.environment||i||Fq,!e.release&&o&&(e.release=o);!e.dist&&s&&(e.dist=s);e.message&&(e.message=iW(e.message,a));const l=null==(r=null==(n=e.exception)?void 0:n.values)?void 0:r[0];(null==l?void 0:l.value)&&(l.value=iW(l.value,a));const c=e.request;(null==c?void 0:c.url)&&(c.url=iW(c.url,a))}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){var n,r;const i=SZ(t);null==(r=null==(n=e.exception)?void 0:n.values)||r.forEach((e=>{var t,n;null==(n=null==(t=e.stacktrace)?void 0:t.frames)||n.forEach((e=>{e.filename&&(e.debug_id=i[e.filename])}))}))}(l,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new FW;return n.update(t),n}(r,n.captureContext);n.mechanism&&SW(l,n.mechanism);const d=i?i.getEventProcessors():[],p=gG("globalScope",(()=>new FW)).getScopeData();if(o){AZ(p,o.getScopeData())}if(u){AZ(p,u.getScopeData())}const m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),EZ(l,p);return _Z([...d,...p.eventProcessors],l,n).then((e=>(e&&function(e){var t,n;const r={};if(null==(n=null==(t=e.exception)?void 0:t.values)||n.forEach((e=>{var t,n;null==(n=null==(t=e.stacktrace)?void 0:t.frames)||n.forEach((e=>{e.debug_id&&(e.abs_path?r[e.abs_path]=e.debug_id:e.filename&&(r[e.filename]=e.debug_id),delete e.debug_id)}))})),0===Object.keys(r).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const i=e.debug_meta.images;Object.entries(r).forEach((([e,t])=>{i.push({type:"sourcemap",code_file:e,debug_id:t})}))}(e),"number"==typeof s&&s>0?function(e,t,n){var r,i;if(!e)return null;const o=f(f(f(f(f({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>f(f({},e),e.data&&{data:Yq(e.data,t,n)})))}),e.user&&{user:Yq(e.user,t,n)}),e.contexts&&{contexts:Yq(e.contexts,t,n)}),e.extra&&{extra:Yq(e.extra,t,n)});(null==(r=e.contexts)?void 0:r.trace)&&o.contexts&&(o.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(o.contexts.trace.data=Yq(e.contexts.trace.data,t,n)));e.spans&&(o.spans=e.spans.map((e=>f(f({},e),e.data&&{data:Yq(e.data,t,n)}))));(null==(i=e.contexts)?void 0:i.flags)&&o.contexts&&(o.contexts.flags=Yq(e.contexts.flags,3,n));return o}(e,s,a):e)))}function NZ(e){if(e)return function(e){return e instanceof FW||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>TZ.includes(e)))}(e)?{captureContext:e}:e}const TZ=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function PZ(e,t){return qW().captureException(e,NZ(t))}function MZ(e,t){return qW().captureEvent(e,t)}function IZ(e,t){ZW().setContext(e,t)}function LZ(e){const t=ZW(),n=qW(),{userAgent:r}=dG.navigator||{},i=TW(f(f({user:n.getUser()||t.getUser()},r&&{userAgent:r}),e)),o=t.getSession();return"ok"===(null==o?void 0:o.status)&&PW(o,{status:"exited"}),RZ(),t.setSession(i),i}function RZ(){const e=ZW(),t=qW().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),PW(e,n)}(t),DZ(),e.setSession()}function DZ(){const e=ZW(),t=KW(),n=e.getSession();n&&t&&t.captureSession(n)}function BZ(e=!1){e?RZ():DZ()}function FZ(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const HZ=[];function zZ(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(r)}function VZ(e,t){for(const n of t)(null==n?void 0:n.afterAllSetup)&&n.afterAllSetup(e)}function UZ(e,t,n){if(n[t.name])uG&&xG.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===HZ.indexOf(t.name)&&"function"==typeoft.setupOnce&&(t.setupOnce(),HZ.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}uG&&xG.log(`Integration installed: ${t.name}`)}}class GZ extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}function WZ(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];(null==n?void 0:n.value)&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(_k){}return t}const qZ="Not capturing exception because it's already been captured.",ZZ="Discarded session because of missing or non-string release";class XZ{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Kq(e.dsn):uG&&xG.warn("No DSN provided, client will not send events."),this._dsn){const t=FZ(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(h(f({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){const r=_W();if(EW(e))return uG&&xG.log(qZ),r;const i=f({event_id:r},t);return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,n)))),i.event_id}captureMessage(e,t,n,r){const i=f({event_id:_W()},n),o=qG(e)?e:String(e),s=ZG(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(s.then((e=>this._captureEvent(e,i,r)))),i.event_id}captureEvent(e,t,n){const r=_W();if((null==t?void 0:t.originalException)&&EW(t.originalException))return uG&&xG.log(qZ),r;const i=f({event_id:r},t),o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,a=o.capturedSpanIsolationScope;returnthis._process(this._captureEvent(e,i,s||n,a)),i.event_id}captureSession(e){this.sendSession(e),PW(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):jW(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];UZ(this,e,this._integrations),t||VZ(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const i=lZ(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,null==n?void 0:n.sdk);const s=cZ(e,i,r,t);return delete e.sdkProcessingMetadata,Qq(s,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])n=eZ(n,oZ(i));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const{release:t,environment:n=Fq}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(uG&&xG.warn(ZZ));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(uG&&xG.warn(ZZ));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const i=lZ(n);return Qq(f(f({sent_at:(new Date).toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:Zq(t)}),["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;uG&&xG.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(uG&&xG.error("Error while sending envelope:",e),e))):(uG&&xG.error("Transport disabled"),jW({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&UZ(e,t,n)})),n}(this,e),VZ(this,e)}_updateSessionFromEvent(e,t){var n;let r="fatal"===t.level,i=!1;const o=null==(n=t.exception)?void 0:n.values;if(o){i=!0;for(const e of o){const t=e.mechanism;if(!1===(null==t?void 0:t.handled)){r=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&r)&&(PW(e,h(f({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new NW((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&(null==o?void 0:o.length)&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),OZ(i,e,t,n,this,r).then((e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts=f({trace:YW(n)},e.contexts);const r=Uq(this,n);return e.sdkProcessingMetadata=f({dynamicSamplingContext:r},e.sdkProcessingMetadata),e}))}_captureEvent(e,t={},n=qW(),r=ZW()){return uG&&KZ(e)&&xG.log(`Captured error event \`${WZ(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then((e=>e.event_id),(e=>{uG&&(e instanceof GZ&&"log"===e.logLevel?xG.log(e.message):xG.warn(e))}))}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:o}=i,s=YZ(e),a=KZ(e),l=e.type||"error",c=`before send for type \`${l}\``,u=void 0===o?void 0:dq(o);if(a&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error"),OW(new GZ(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const d="replay_event"===l?"replay":l;return this._prepareEvent(e,t,n,r).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),new GZ("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;let a=n;if(KZ(a)&&i)return i(a,r);if(YZ(a)){if(s){const e=s(function(e){var t,n,r;const{trace_id:i,parent_span_id:o,span_id:s,status:a,origin:l,data:c,op:u}=null!=(n=null==(t=e.contexts)?void 0:t.trace)?n:{};return mW({data:null!=c?c:{},description:e.transaction,op:u,parent_span_id:o,span_id:null!=s?s:"",start_timestamp:null!=(r=e.start_timestamp)?r:0,status:a,timestamp:e.timestamp,trace_id:null!=i?i:"",origin:l,profile_id:null==c?void 0:c[oq],exclusive_time:null==c?void 0:c[sq],measurements:e.measurements,is_segment:!0})}(a));if(e?a=LW(n,mW({type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:f(f(f({},l.data),l.profile_id&&{[oq]:l.profile_id}),l.exclusive_time&&{[sq]:l.exclusive_time})}},measurements:l.measurements})):Lq(),a.spans){const e=[];for(const t of a.spans){const n=s(t);n?e.push(n):(Lq(),e.push(t))}a.spans=e}}if(o){if(a.spans){const e=a.spans.length;a.sdkProcessingMetadata=h(f({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:e})}return o(a,r)}}var l;return a}(0,i,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(YG(e))return e.then((e=>{if(!XG(e)&&null!==e)throw new GZ(n);return e}),(e=>{throw new GZ(`${t} rejected with ${e}`)}));if(!XG(e)&&null!==e)throw new GZ(n);return e}(n,c)})).then((i=>{var o;if(null===i){if(this.recordDroppedEvent("before_send",d),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new GZ(`${c} returned \`null\`, will not send event.`,"log")}const l=n.getSession()||r.getSession();if(a&&l&&this._updateSessionFromEvent(l,i),s){const e=((null==(o=i.sdkProcessingMetadata)?void 0:o.spanCountBeforeProcessing)||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const u=i.transaction_info;if(s&&u&&i.transaction!==e.transaction){const e="custom";i.transaction_info=h(f({},u),{source:e})}return this.sendEvent(i,t),i})).then(null,(e=>{if(e instanceof GZ)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new GZ(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){uG&&xG.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(uG&&xG.log("No outcomes to send"));if(!this._dsn)return void(uG&&xG.log("No dsn provided, will not sendoutcomes"));uG&&xG.log("Sending outcomes:",e);const t=(n=e,Qq((r=this._options.tunnel&&Zq(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||vW(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}}function KZ(e){return void 0===e.type}function YZ(e){return"transaction"===e.type}function $Z(e,t){!0===t.debug&&(uG?xG.enable():bG((()=>{})));qW().update(t.initialScope);const n=new e(t);return function(e){qW().setClient(e)}(n),n.init(),n}function JZ(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return OW(new GZ("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new NW(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{jW(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}function QZ(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function eX(e,{statusCode:t,headers:n},r=Date.now()){const i=f({},e),o=null==n?void 0:n["x-sentry-rate-limits"],s=null==n?void 0:n["retry-after"];if(o)for(const a of o.trim().split(",")){const[e,t,,,n]=a.split(":",5),o=parseInt(e,10),s=1e3*(isNaN(o)?60:o);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(i[a]=r+s);else i.all=r+s}else s?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function tX(e,t){const n=null==t?void 0:t.getDsn(),r=null==t?void 0:t.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,n)||function(e,t){if(!t)return!1;return nX(e)===nX(t)}(e,r)}function nX(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function rX(e){var t;void 0===(null==(t=e.user)?void 0:t.ip_address)&&(e.user=h(f({},e.user),{ip_address:"{{auto}}"}))}function iX(e){var t;"aggregates"in e?void 0===(null==(t=e.attrs)?void 0:t.ip_address)&&(e.attrs=h(f({},e.attrs),{ip_address:"{{auto}}"})):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function oX(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:hG}))),version:hG}),e._metadata=i}function sX(e={}){const t=KW();if(!function(){const e=KW();return!1!==(null==e?void 0:e.getOptions().enabled)&&!!(null==e?void 0:e.getTransport())}()||!t)return{};const n=WW(pG());if(n.getTraceData)return n.getTraceData(e);const r=qW(),i=e.span||Iq(),o=i?function(e){const{traceId:t,spanId:n}=e.spanContext();return bq(t,n,Aq(e))}(i):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return bq(t,r,n)}(r),s=mq(i?Gq(i):Uq(t,r));return vq.test(o)?{"sentry-trace":o,baggage:s}:(xG.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const aX=100;function lX(e,t){const n=KW(),r=ZW();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=aX}=n.getOptions();if(o<=0)return;const s=vW(),a=f({timestamp:s},e),l=i?bG((()=>i(a,t))):a;null!==l&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}let cX;const uX=new WeakMap,dX=()=>({name:"FunctionToString",setupOnce(){cX=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=dW(this),n=uX.has(KW())&&void 0!==t?t:this;return cX.apply(n,e)}}catch(_k){}},setup(e){uX.set(e,!0)}}),fX=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejectioncaptured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],hX=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:fX],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(_k){}return!1}(e))return uG&&xG.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${CW(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return WZ(e).some((e=>aW(e,t)))}(e,t.ignoreErrors))return uG&&xG.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${CW(e)}`),!0;if(function(e){var t,n;if(e.type)return!1;if(!(null==(n=null==(t=e.exception)?void 0:t.values)?void 0:n.length))return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return uG&&xG.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${CW(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&aW(n,t)}(e,t.ignoreTransactions))return uG&&xG.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${CW(e)}`),!0;if(function(e,t){if(!(null==t?void 0:t.length))return!1;const n=pX(e);return!!n&&aW(n,t)}(e,t.denyUrls))return uG&&xG.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${CW(e)}.\nUrl: ${pX(e)}`),!0;if(!function(e,t){if(!(null==t?void 0:t.length))return!0;const n=pX(e);return!n||aW(n,t)}(e,t.allowUrls))return uG&&xG.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${CW(e)}.\nUrl: ${pX(e)}`),!0;return!1}(t,o)?null:t}});function pX(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(_k){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)returnn.filename||null}return null}(t):null}catch(t){return uG&&xG.error(`Cannot extract url for event ${CW(e)}`),null}}function mX(e,t,n=250,r,i,o,s){var a;if(!(null==(a=o.exception)?void 0:a.values)||!s||!$G(s.originalException,Error))return;const l=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,u;l&&(o.exception.values=(c=gX(e,t,i,s.originalException,r,o.exception.values,l,0),u=n,c.map((e=>(e.value&&(e.value=iW(e.value,u)),e)))))}function gX(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if($G(r[i],Error)){vX(s,a);const o=e(t,r[i]),c=l.length;yX(o,i,c,a),l=gX(e,t,n,r[i],i,[o,...l],o,c)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if($G(r,Error)){vX(s,a);const c=e(t,r),u=l.length;yX(c,`errors[${o}]`,u,a),l=gX(e,t,n,r,i,[c,...l],c,u)}})),l}function vX(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=h(f(f({},e.mechanism),"AggregateError"===e.type&&{is_exception_group:!0}),{exception_id:t})}function yX(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=h(f({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function bX(){"console"in dG&&vG.forEach((function(e){e in dG.console&&lW(dG.console,e,(function(t){return yG[e]=t,function(...t){MG("console",{args:t,level:e});const n=yG[e];null==n||n.apply(dG.console,t)}}))}))}function xX(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const _X=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!CX(e,t))return!1;if(!wX(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=kX(t),r=kX(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!CX(e,t))return!1;if(!wX(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return uG&&xG.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}};function wX(e,t){let n=jG(e),r=jG(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function CX(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(i){return!1}}function kX(e){var t;return(null==(t=e.exception)?void 0:t.values)&&e.exception.values[0]}function SX(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function EX(e){return e.split(/[?#]/,1)[0]}function AX(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=Bq()&&t(s);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){var n;if(t.response){aq(e,t.response.status);const r=(null==(n=t.response)?void 0:n.headers)&&t.response.headers.get("content-length");if(r){const t=parseInt(r);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete r[t]))}const l=function(e){try{return new URL(e).href}catch(_k){return}}(s),c=SX(l||s),u=!!Iq(),d=a&&u?mZ({name:`${o} ${EX(s)}`,attributes:f(f({url:s,type:"fetch","http.method":o,"http.url":l,"server.address":null==c?void 0:c.host,[eq]:i,[QW]:"http.client"},(null==c?void 0:c.search)&&{"http.query":null==c?void 0:c.search}),(null==c?void 0:c.hash)&&{"http.fragment":null==c?void 0:c.hash})}):new Wq;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const t=e.args[0],n=e.args[1]||{},r=function(e,t,n){const r=sX({span:n}),i=r["sentry-trace"],o=r.baggage;if(!i)return;const s=t.headers||(function(e){return"undefined"!=typeof Request&&$G(e,Request)}(e)?e.headers:void 0);if(s){if(function(e){return"undefined"!=typeof Headers&&$G(e,Headers)}(s)){const e=new Headers(s);if(e.set("sentry-trace",i),o){const t=e.get("baggage");if(t){const n=jX(t);e.set("baggage",n?`${n},${o}`:o)}else e.set("baggage",o)}return e}if(Array.isArray(s)){const e=[...s.filter((e=>!(Array.isArray(e)&&"sentry-trace"===e[0]))).map((e=>{if(Array.isArray(e)&&"baggage"===e[0]&&"string"==typeof e[1]){const[t,n,...r]=e;return[t,jX(n),...r]}return e})),["sentry-trace",i]];return o&&e.push(["baggage",o]),e}{const e="baggage"in s?s.baggage:void 0;let t=[];return Array.isArray(e)?t=e.map((e=>"string"==typeof e?jX(e):e)).filter((e=>""===e)):e&&t.push(jX(e)),o&&t.push(o),h(f({},s),{"sentry-trace":i,baggage:t.length>0?t.join(","):void 0})}}return f({},r)}(t,n,Bq()&&u?d:void 0);r&&(e.args[1]=n,n.headers=r)}const p=KW();if(p){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",d,t)}return d}function jX(e){return e.split(",").filter((e=>!e.split("=")[0].startsWith(fq))).join(",")}function OX(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const NX=dG;function TX(){if(!("fetch"in NX))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(_k){return!1}}function PX(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function MX(e,t){const n="fetch";TG(n,e),PG(n,(()=>IX(void 0,t)))}function IX(e,t=!1){t&&!function(){var e;if("string"==typeof EdgeRuntime)return!0;if(!TX())return!1;if(PX(NX.fetch))return!0;let t=!1;const n=NX.document;if(n&&"function"==typeof n.createElement)try{const r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),(null==(e=r.contentWindow)?void 0:e.fetch)&&(t=PX(r.contentWindow.fetch)),n.head.removeChild(r)}catch(r){fG&&xG.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}()||lW(dG,"fetch",(function(t){return function(...n){const r=new Error,{method:i,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:DX(t),method:RX(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:DX(t),method:RX(t,"method")?String(t.method).toUpperCase():"GET"}}(n),s={args:n,fetchData:{method:i,url:o},startTimestamp:1e3*yW(),virtualError:r};return e||MG("fetch",f({},s)),t.apply(dG,n).then((t=>g(this,null,(function*(){return e?e(t):MG("fetch",h(f({},s),{endTimestamp:1e3*yW(),response:t})),t}))),(e=>{throw MG("fetch",h(f({},s),{endTimestamp:1e3*yW(),error:e})),zG(e)&&void 0===e.stack&&(e.stack=r.stack,cW(e,"framesToPop",1)),e}))}}))}function LX(e){let t;try{t=e.clone()}catch(_k){return}!function(e,t){g(this,null,(function*(){if(null==e?void 0:e.body){const r=e.body,i=r.getReader(),o=setTimeout((()=>{r.cancel().then(null,(()=>{}))}),9e4);let s=!0;for(;s;){let e;try{e=setTimeout((()=>{r.cancel().then(null,(()=>{}))}),5e3);const{done:n}=yield i.read();clearTimeout(e),n&&(t(),s=!1)}catch(n){s=!1}finally{clearTimeout(e)}}clearTimeout(o),i.releaseLock(),r.cancel().then(null,(()=>{}))}}))}(t,(()=>{MG("fetch-body-resolved",{endTimestamp:1e3*yW(),response:e})}))}function RX(e,t){return!!e&&"object"==typeof e&&!!e[t]}function DX(e){return"string"==typeof e?e:e?RX(e,"url")?e.url:e.toString?e.toString():"":""}function BX(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function FX(){return"undefined"!=typeof window&&(!BX()||function(){const e=dG.process;return"renderer"===(null==e?void 0:e.type)}())}const HX=dG;let zX=0;function VX(){return zX>0}function UX(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(dW(e))return e}catch(_k){return e}const n=function(...n){try{const r=n.map((e=>UX(e,t)));return e.apply(this,r)}catch(r){throw zX++,setTimeout((()=>{zX--})),XW((e=>{e.addEventProcessor((e=>(t.mechanism&&(kW(e,void 0,void 0),SW(e,t.mechanism)),e.extra=h(f({},e.extra),{arguments:n}),e))),PZ(r)})),r}};try{for(const t ine)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(_k){}uW(n,e),cW(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(_k){}return n}function GX(e,t){const n=ZX(e,t),r={type:YX(t),value:$X(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function WX(e,t,n,r){const i=KW(),o=null==i?void 0:i.getOptions().normalizeDepth,s=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),a={__serialized__:$q(t,o)};if(s)return{exception:{values:[GX(e,s)]},extra:a};const l={exception:{values:[{type:KG(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:eK(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=ZX(e,n);t.length&&(l.exception.values[0].stacktrace={frames:t})}return l}function qX(e,t){return{exception:{values:[GX(e,t)]}}}function ZX(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&XX.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch(_k){}return[]}const XX=/Minified React error #\d+;/i;function KX(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function YX(e){const t=null==e?void 0:e.name;if(!t&&KX(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function $X(e){const t=null==e?void 0:e.message;return KX(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function JX(e,t,n,r,i){let o;if(UG(t)&&t.error){returnqX(e,t.error)}if(GG(t)||VG(t,"DOMException")){const i=t;if("stack"in t)o=qX(e,t);else{const t=i.name||(GG(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;o=QX(e,s,n,r),kW(o,s)}return"code"in i&&(o.tags=h(f({},o.tags),{"DOMException.code":`${i.code}`})),o}if(zG(t))return qX(e,t);if(XG(t)||KG(t)){return o=WX(e,t,n,i),SW(o,{synthetic:!0}),o}return o=QX(e,t,n,r),kW(o,`${t}`,void 0),SW(o,{synthetic:!0}),o}function QX(e,t,n,r){const i={};if(r&&n){const r=ZX(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),SW(i,{synthetic:!0})}if(qG(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function eK(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(fW(e));n.sort();const r=n[0];if(!r)return"[object has nokeys]";if(r.length>=t)return iW(r,t);for(let i=n.length;i>0;i--){const e=n.slice(0,i).join(", ");if(!(e.length>t))returni===n.length?e:iW(e,t)}return""}(e),r=t?"promise rejection":"exception";if(UG(e))return`Event \`ErrorEvent\` captured as${r} with message \`${e.message}\``;if(KG(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(_k){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class tK extends XZ{constructor(e){const t=f({parentSpanIsAlwaysRootSpan:!0},e);oX(t,"browser",["browser"],HX.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&HX.document&&HX.document.addEventListener("visibilitychange",(()=>{"hidden"===HX.document.visibilityState&&this._flushOutcomes()})),this._options.sendDefaultPii&&(this.on("postprocessEvent",rX),this.on("beforeSendSession",iX))}eventFromException(e,t){return function(e,t,n,r){const i=JX(e,t,(null==n?void 0:n.syntheticException)||void 0,r);return SW(i),i.level="error",(null==n?void 0:n.event_id)&&(i.event_id=n.event_id),jW(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=QX(e,t,(null==r?void 0:r.syntheticException)||void 0,i);return o.level=n,(null==r?void 0:r.event_id)&&(o.event_id=r.event_id),jW(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const nK="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,rK=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i||0),(o||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},iK=dG,oK=(e=!0)=>{var t,n;const r=null==(n=null==(t=iK.performance)?void 0:t.getEntriesByType)?void 0:n.call(t,"navigation")[0];if(!e||r&&r.responseStart>0&&r.responseStart<performance.now())return r},sK=()=>{const e=oK();return(null==e?void 0:e.activationStart)||0},aK=(e,t)=>{var n,r;const i=oK();let o="navigate";i&&((null==(n=iK.document)?void 0:n.prerendering)||sK()>0?o="prerender":(null==(r=iK.document)?void 0:r.wasDiscarded)?o="restore":i.type&&(o=i.type.replace(/_/g,"-")));return{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},lK=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(_k){}},cK=e=>{const t=t=>{var n;"pagehide"!==t.type&&"hidden"!==(null==(n=iK.document)?void 0:n.visibilityState)||e(t)};iK.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},uK=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let dK=-1;const fK=e=>{"hidden"===iK.document.visibilityState&&dK>-1&&(dK="visibilitychange"===e.type?e.timeStamp:0,hK())},hK=()=>{removeEventListener("visibilitychange",fK,!0),removeEventListener("prerenderingchange",fK,!0)},pK=()=>(iK.document&&dK<0&&(dK="hidden"!==iK.document.visibilityState||iK.document.prerendering?1/0:0,addEventListener("visibilitychange",fK,!0),addEventListener("prerenderingchange",fK,!0)),{get firstHiddenTime(){return dK}}),mK=e=>{var t;(null==(t=iK.document)?void 0:t.prerendering)?addEventListener("prerenderingchange",(()=>e()),!0):e()},gK=[1800,3e3],vK=[.1,.25],yK=(e,t={})=>{((e,t={})=>{mK((()=>{const n=pK(),r=aK("FCP");let i;const o=lK("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-sK(),0),r.entries.push(e),i(!0)))}))}));o&&(i=rK(e,r,gK,t.reportAllChanges))}))})(uK((()=>{const n=aK("CLS",0);let r,i=0,o=[];const s=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>n.value&&(n.value=i,n.entries=o,r())},a=lK("layout-shift",s);a&&(r=rK(e,n,vK,t.reportAllChanges),cK((()=>{s(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},bK=[100,300];let xK=0,_K=1/0,wK=0;const CK=e=>{e.forEach((e=>{e.interactionId&&(_K=Math.min(_K,e.interactionId),wK=Math.max(wK,e.interactionId),xK=wK?(wK-_K)/7+1:0)}))};let kK;const SK=[],EK=new Map;const AK=()=>(kK?xK:performance.interactionCount||0)-0,jK=[],OK=e=>{var t;if(jK.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const n=SK[SK.length-1],r=EK.get(e.interactionId);if(r||SK.length<10||n&&e.duration>n.latency){if(r)e.duration>r.latency?(r.entries=[e],r.latency=e.duration):e.duration===r.latency&&e.startTime===(null==(t=r.entries[0])?void 0:t.startTime)&&r.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};EK.set(t.id,t),SK.push(t)}SK.sort(((e,t)=>t.latency-e.latency)),SK.length>10&&SK.splice(10).forEach((e=>EK.delete(e.id)))}},NK=e=>{var t;const n=iK.requestIdleCallback||iK.setTimeout;let r=-1;return e=uK(e),"hidden"===(null==(t=iK.document)?void 0:t.visibilityState)?e():(r=n(e),cK(e)),r},TK=[200,500],PK=(e,t={})=>{"PerformanceEventTiming"in iK&&"interactionId"in PerformanceEventTiming.prototype&&mK((()=>{"interactionCount"in performance||kK||(kK=lK("event",CK,{type:"event",buffered:!0,durationThreshold:0}));const n=aK("INP");let r;const i=e=>{NK((()=>{e.forEach(OK);const t=(()=>{const e=Math.min(SK.length-1,Math.floor(AK()/50));return SK[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=lK("event",i,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=rK(e,n,TK,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),cK((()=>{i(o.takeRecords()),r(!0)})))}))},MK=[2500,4e3],IK={},LK=[800,1800],RK=e=>{var t,n;(null==(t=iK.document)?void 0:t.prerendering)?mK((()=>RK(e))):"complete"!==(null==(n=iK.document)?void 0:n.readyState)?addEventListener("load",(()=>RK(e)),!0):setTimeout(e,0)},DK={},BK={};let FK,HK,zK,VK,UK;function GK(e,t=!1){return tY("cls",e,YK,FK,t)}function WK(e,t=!1){return tY("lcp",e,JK,zK,t)}function qK(e){return tY("fid",e,$K,HK)}function ZK(e){return tY("inp",e,eY,UK)}function XK(e,t){return nY(e,t),BK[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);lK(e,(t=>{KK(e,{entries:t})}),t)}(e),BK[e]=!0),rY(e,t)}function KK(e,t){const n=DK[e];if(null==n?void 0:n.length)for(const r of n)try{r(t)}catch(_k){nK&&xG.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${AG(r)}\nError:`,_k)}}function YK(){return yK((e=>{KK("cls",{metric:e}),FK=e}),{reportAllChanges:!0})}function $K(){return((e,t={})=>{mK((()=>{const n=pK(),r=aK("FID");let i;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),i(!0))},s=e=>{e.forEach(o)},a=lK("first-input",s);i=rK(e,r,bK,t.reportAllChanges),a&&cK(uK((()=>{s(a.takeRecords()),a.disconnect()})))}))})((e=>{KK("fid",{metric:e}),HK=e}))}function JK(){return((e,t={})=>{mK((()=>{const n=pK(),r=aK("LCP");let i;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-sK(),0),r.entries=[e],i())}))},s=lK("largest-contentful-paint",o);if(s){i=rK(e,r,MK,t.reportAllChanges);const n=uK((()=>{IK[r.id]||(o(s.takeRecords()),s.disconnect(),IK[r.id]=!0,i(!0))}));["keydown","click"].forEach((e=>{iK.document&&addEventListener(e,(()=>NK(n)),{once:!0,capture:!0})})),cK(n)}}))})((e=>{KK("lcp",{metric:e}),zK=e}),{reportAllChanges:!0})}function QK(){return((e,t={})=>{const n=aK("TTFB"),r=rK(e,n,LK,t.reportAllChanges);RK((()=>{const e=oK();e&&(n.value=Math.max(e.responseStart-sK(),0),n.entries=[e],r(!0))}))})((e=>{KK("ttfb",{metric:e}),VK=e}))}function eY(){return PK((e=>{KK("inp",{metric:e}),UK=e}))}function tY(e,t,n,r,i=!1){let o;return nY(e,t),BK[e]||(o=n(),BK[e]=!0),r&&t({metric:r}),rY(e,t,i?o:void 0)}function nY(e,t){DK[e]=DK[e]||[],DK[e].push(t)}function rY(e,t,n){return()=>{n&&n();const r=DK[e];if(!r)return;const i=r.indexOf(t);-1!==i&&r.splice(i,1)}}function iY(e){return"number"==typeof e&&isFinite(e)}function oY(e,t,n,r){var i=p(r,[]);const o=Eq(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),gZ(e,(()=>{const e=mZ(f({startTime:t},i));return e&&e.end(n),e}))}function sY(e){var t;const n=KW();if(!n)return;const{name:r,transaction:i,attributes:o,startTime:s}=e,{release:a,environment:l,sendDefaultPii:c}=n.getOptions(),u=n.getIntegrationByName("Replay"),d=null==u?void 0:u.getReplayId(),h=qW(),p=h.getUser(),m=void 0!==p?p.email||p.id||p.ip_address:void 0;let g;try{g=h.getScopeData().contexts.profile.profile_id}catch(_k){}return mZ({name:r,attributes:f({release:a,environment:l,user:m||void 0,profile_id:g||void 0,replay_id:d||void 0,transaction:i,"user_agent.original":null==(t=iK.navigator)?void 0:t.userAgent,"client.address":c?"{{auto}}":void 0},o),startTime:s,experimental:{standalone:!0}})}function aY(){return iK.addEventListener&&iK.performance}function lY(e){return e/1e3}function cY(e){let t="unknown",n="unknown",r="";for(const i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function uY(){let e,t,n=0;if(!function(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch(_k){return!1}}())return;let r=!1;function i(){r||(r=!0,t&&function(e,t,n){var r;nK&&xG.log(`Sending CLS span (${e})`);const i=lY((xW()||0)+((null==t?void0:t.startTime)||0)),o=qW().getScopeData().transactionName,s=t?eW(null==(r=t.sources[0])?void 0:r.node):"Layout shift",a=mW({[eq]:"auto.http.browser.cls",[QW]:"ui.webvital.cls",[sq]:(null==t?void 0:t.duration)||0,"sentry.pageload.span_id":n}),l=sY({name:s,transaction:o,attributes:a,startTime:i});l&&(l.addEvent("cls",{[nq]:"",[rq]:e}),l.end(i))}(n,e,t),o())}const o=GK((({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)}),!0);cK((()=>{i()})),setTimeout((()=>{const e=KW();if(!e)return;const n=e.on("startNavigationSpan",(()=>{i(),null==n||n()})),r=Iq();if(r){const e=Mq(r);"pageload"===Eq(e).op&&(t=e.spanContext().spanId)}}),0)}let dY,fY,hY=0,pY={};function mY({recordClsStandaloneSpans:e}){const t=aY();if(t&&xW()){t.mark&&iK.performance.mark("sentry-tracing-init");const n=qK((({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=lY(xW()),r=lY(t.startTime);pY.fid={value:e.value,unit:"millisecond"},pY["mark.fid"]={value:n+r,unit:"second"}})),r=WK((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(pY.lcp={value:e.value,unit:"millisecond"},dY=t)}),!0),i=tY("ttfb",(({metric:e})=>{e.entries[e.entries.length-1]&&(pY.ttfb={value:e.value,unit:"millisecond"})}),QK,VK),o=e?uY():GK((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(pY.cls={value:e.value,unit:""},fY=t)}),!0);return()=>{n(),r(),i(),null==o||o()}}return()=>{}}function gY(e,t){const n=aY(),r=xW();if(!(null==n?void 0:n.getEntries)||!r)return;const i=lY(r),o=n.getEntries(),{op:s,start_timestamp:a}=Eq(e);if(o.slice(hY).forEach((t=>{const n=lY(t.startTime),r=lY(Math.max(0,t.duration));if(!("navigation"===s&&a&&i+n<a))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((r=>{vY(e,t,r,n)})),vY(e,t,"secureConnection",n,"TLS/SSL"),vY(e,t,"fetch",n,"cache"),vY(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+lY(t.requestStart),i=n+lY(t.responseEnd),o=n+lY(t.responseStart);t.responseEnd&&(oY(e,r,i,{op:"browser.request",name:t.name,attributes:{[eq]:"auto.ui.browser.metrics"}}),oY(e,o,i,{op:"browser.response",name:t.name,attributes:{[eq]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,i);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,i){const o=oK(!1),s=lY(o?o.requestStart:0),a=i+Math.max(n,s),l=i+n,c=l+r,u={[eq]:"auto.resource.browser.metrics"};a!==l&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=a);a<=c&&oY(e,a,c,{name:t.name,op:t.entryType,attributes:u})}(e,t,n,r,i);const o=pK(),s=t.startTime<o.firstHiddenTime;"first-paint"===t.name&&s&&(pY.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&s&&(pY.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,i,o){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const s=SX(n),a={[eq]:"auto.resource.browser.metrics"};yY(a,t,"transferSize","http.response_transfer_size"),yY(a,t,"encodedBodySize","http.response_content_length"),yY(a,t,"decodedBodySize","http.decoded_response_content_length");const l=t.deliveryType;null!=l&&(a["http.response_delivery_type"]=l);const c=t.renderBlockingStatus;c&&(a["resource.render_blocking_status"]=c);s.protocol&&(a["url.scheme"]=s.protocol.split(":").pop());s.host&&(a["server.address"]=s.host);a["url.same_origin"]=n.includes(iK.location.origin);const{name:u,version:d}=cY(t.nextHopProtocol);a["network.protocol.name"]=u,a["network.protocol.version"]=d;const f=o+r,h=f+i;oY(e,f,h,{name:n.replace(iK.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}(e,t,t.name,n,r,i)}})),hY=Math.max(o.length-1,0),function(e){const t=iK.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),iY(n.rtt)&&(pY["connection.rtt"]={value:n.rtt,unit:"millisecond"}));iY(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`);iY(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===s){!function(e){const t=oK(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(pY);const n=pY["mark.fid"];n&&pY.fid&&(oY(e,n.value,n.value+lY(pY.fid.value),{name:"first input delay",op:"ui.action",attributes:{[eq]:"auto.ui.browser.metrics"}}),delete pY["mark.fid"]),"fcp"in pY&&t.recordClsOnPageloadSpan||delete pY.cls,Object.entries(pY).forEach((([e,t])=>{!function(e,t,n,r=Iq()){const i=r&&Mq(r);i&&(uG&&xG.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[rq]:t,[nq]:n}))}(e,t.value,t.unit)})),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",sK()),function(e){dY&&(dY.element&&e.setAttribute("lcp.element",eW(dY.element)),dY.id&&e.setAttribute("lcp.id",dY.id),dY.url&&e.setAttribute("lcp.url",dY.url.trim().slice(0,200)),null!=dY.loadTime&&e.setAttribute("lcp.loadTime",dY.loadTime),null!=dY.renderTime&&e.setAttribute("lcp.renderTime",dY.renderTime),e.setAttribute("lcp.size",dY.size));(null==fY?void 0:fY.sources)&&fY.sources.forEach(((t,n)=>e.setAttribute(`cls.source.${n+1}`,eW(t.node))))}(e)}dY=void 0,fY=void 0,pY={}}function vY(e,t,n,r,i=n){const o=function(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),s=t[o],a=t[`${n}Start`];a&&s&&oY(e,r+lY(a),r+lY(s),{op:`browser.${i}`,name:t.name,attributes:{[eq]:"auto.ui.browser.metrics"}})}function yY(e,t,n,r){const i=t[n];null!=i&&i<2147483647&&(e[r]=i)}let bY,xY,_Y,wY;function CY(e){TG("dom",e),PG("dom",kY)}function kY(){if(!iK.document)return;const e=MG.bind(null,"dom"),t=SY(e,!0);iK.document.addEventListener("click",t,!1),iK.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{var n,r;const i=null==(n=iK[t])?void 0:n.prototype;(null==(r=null==i?void 0:i.hasOwnProperty)?void 0:r.call(i,"addEventListener"))&&(lW(i,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=SY(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch(_k){}return t.call(this,n,r,i)}})),lW(i,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(_k){}return e.call(this,t,n,r)}})))}))}function SY(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(_k){return null}}(n);if(function(e,t){return"keypress"===e&&(!(null==t?void 0:t.tagName)||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;cW(n,"_sentryCaptured",!0),r&&!r._sentryId&&cW(r,"_sentryId",_W());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==xY)return!1;try{if(!e.target||e.target._sentryId!==_Y)return!1}catch(_k){}return!0}(n)){e({event:n,name:i,global:t}),xY=n.type,_Y=r?r._sentryId:void 0}clearTimeout(bY),bY=iK.setTimeout((()=>{_Y=void 0,xY=void 0}),1e3)}}function EY(e){const t="history";TG(t,e),PG(t,AY)}function AY(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=wY,t=String(n);if(wY=t,e===t)return;MG("history",{from:e,to:t})}return e.apply(this,t)}}iK.addEventListener("popstate",(()=>{const e=iK.location.href,t=wY;if(wY=e,t===e)return;MG("history",{from:t,to:e})})),"history"inNX&&(lW(iK.history,"pushState",e),lW(iK.history,"replaceState",e))}const jY={};function OY(e){const t=jY[e];if(t)return t;let n=iK[e];if(PX(n))return jY[e]=n.bind(iK);const r=iK.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;(null==i?void 0:i[e])&&(n=i[e]),r.head.removeChild(t)}catch(_k){nK&&xG.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,_k)}return n?jY[e]=n.bind(iK):n}function NY(e){jY[e]=void 0}function TY(...e){return OY("setTimeout")(...e)}const PY="__sentry_xhr_v3__";function MY(e){TG("xhr",e),PG("xhr",IY)}function IY(){if(!iK.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*yW(),o=WG(n[0])?n[0].toUpperCase():void 0,s=function(e){if(WG(e))return e;try{return e.toString()}catch(_k){}return}(n[1]);if(!o||!s)return e.apply(t,n);t[PY]={method:o,url:s,request_headers:{}},"POST"===o&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[PY];if(e&&4===t.readyState){try{e.status_code=t.status}catch(_k){}MG("xhr",{endTimestamp:1e3*yW(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,o=t[PY];return o&&WG(r)&&WG(i)&&(o.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[PY];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return MG("xhr",{startTimestamp:1e3*yW(),xhr:t}),e.apply(t,n)}})}function LY(e){return new URLSearchParams(e).toString()}function RY(e,t=xG){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[LY(e)];if(!e)return[void 0]}catch(n){return nK&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return nK&&t.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function DY(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}const BY=[],FY=new Map;function HY(){if(aY()&&xW()){const e=ZK((({metric:e})=>{if(null==e.value)return;const t=e.entries.find((t=>t.duration===e.value&&zY[t.name]));if(!t)return;const{interactionId:n}=t,r=zY[t.name],i=lY(xW()+t.startTime),o=lY(e.value),s=Iq(),a=s?Mq(s):void 0,l=(null!=n?FY.get(n):void 0)||a,c=l?Eq(l).description:qW().getScopeData().transactionName,u=sY({name:eW(t.target),transaction:c,attributes:mW({[eq]:"auto.http.browser.inp",[QW]:`ui.interaction.${r}`,[sq]:t.duration}),startTime:i});u&&(u.addEvent("inp",{[nq]:"millisecond",[rq]:e.value}),u.end(i+o))}));return()=>{e()}}return()=>{}}const zY={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function VY(e,t=OY("fetch")){let n=0,r=0;return function(e,t,n=JZ(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(tZ(i,((t,n)=>{const i=aZ(n);QZ(r,i)?e.recordDroppedEvent("ratelimit_backoff",i):o.push(t)})),0===o.length)return jW({});const s=Qq(i[0],o),a=t=>{tZ(s,((n,r)=>{e.recordDroppedEvent(t,aZ(r))}))};return n.add((()=>t({body:rZ(s)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&uG&&xG.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=eX(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof GZ)return uG&&xG.error("Skipped sending event because buffer is full."),a("queue_overflow"),jW({});throw e}))},flush:e=>n.drain(e)}}(e,(function(i){const o=i.body.length;n+=o,r++;const s=f({body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return NY("fetch"),OW("No fetch implementation available");try{return t(e.url,s).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(_k){return NY("fetch"),n-=o,r--,OW(_k)}}))}function UY(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?_G:t,in_app:!0};returnvoid 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const GY=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,WY=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qY=/\((\S*)(?::(\d+))(?::(\d+))\)/,ZY=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,XY=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,KY=kG(...[[30,e=>{const t=GY.exec(e);if(t){const[,e,n,r]=t;return UY(e,_G,+n,+r)}const n=WY.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=qY.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=YY(n[1]||_G,n[2]);return UY(t,e,n[3]?+n[3]:void0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=ZY.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=XY.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||_G;return[n,e]=YY(n,e),UY(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),YY=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:_G,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},$Y="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,JY=1024,QY=(e={})=>{const t=f({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";TG(t,e),PG(t,bX)}(function(e){return function(t){if(KW()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:xX(t.level),message:oW(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${oW(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}lX(n,{input:t.args,level:t.level})}}(e)),t.dom&&CY(function(e,t){return function(n){if(KW()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>JY&&($Y&&xG.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=JY),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=eW(t,{keyAttrs:o,maxStringLength:s}),i=rW(t)}catch(_k){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),lX(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&MY(function(e){return function(t){if(KW()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[PY];if(!n||!r||!i)return;const{method:o,url:s,status_code:a,body:l}=i,c={method:o,url:s,status_code:a},u={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:c,type:"http",level:OX(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,u),lX(d,u)}}(e)),t.fetch&&MX(function(e){return function(t){if(KW()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const i=t.fetchData,o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),lX(s,o)}else{const i=t.response,o=h(f({},t.fetchData),{status_code:null==i?void 0:i.status});t.fetchData.request_body_size,t.fetchData.response_body_size,null==i||i.status;const s={input:t.args,response:i,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,type:"http",level:OX(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,s),lX(a,s)}}}(e)),t.history&&EY(function(e){return function(t){if(KW()!==e)return;let n=t.from,r=t.to;const i=SX(HX.location.href);let o=n?SX(n):void 0;const s=SX(r);(null==o?void 0:o.path)||(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),lX({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){KW()===e&&lX({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:CW(t)},{event:t})}}(e))}}};const e$=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],t$=(e={})=>{const t=f({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&lW(HX,"setTimeout",n$),t.setInterval&&lW(HX,"setInterval",n$),t.requestAnimationFrame&&lW(HX,"requestAnimationFrame",r$),t.XMLHttpRequest&&"XMLHttpRequest"in HX&&lW(XMLHttpRequest.prototype,"send",i$);const e=t.eventTarget;if(e){(Array.isArray(e)?e:e$).forEach(o$)}}}};function n$(e){return function(...t){const n=t[0];return t[0]=UX(n,{mechanism:{data:{function:AG(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function r$(e){return function(t){return e.apply(this,[UX(t,{mechanism:{data:{function:"requestAnimationFrame",handler:AG(e)},handled:!1,type:"instrument"}})])}}function i$(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&lW(n,e,(function(t){const n={mechanism:{data:{function:e,handler:AG(t)},handled:!1,type:"instrument"}},r=dW(t);return r&&(n.mechanism.data.handler=AG(r)),UX(t,n)}))})),e.apply(this,t)}}function o$(e){var t,n;const r=null==(t=HX[e])?void 0:t.prototype;(null==(n=null==r?void 0:r.hasOwnProperty)?void 0:n.call(r,"addEventListener"))&&(lW(r,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=UX(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:AG(r),target:e},handled:!1,type:"instrument"}}))}catch(_k){}return t.apply(this,[n,UX(r,{mechanism:{data:{function:"addEventListener",handler:AG(r),target:e},handled:!1,type:"instrument"}}),i])}})),lW(r,"removeEventListener",(function(e){return function(t,n,r){try{const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(_k){}return e.call(this,t,n,r)}})))}const s$=()=>({name:"BrowserSession",setupOnce(){void 0!==HX.document?(LZ({ignoreDuration:!0}),BZ(),EY((({from:e,to:t})=>{void 0!==e&&e!==t&&(LZ({ignoreDuration:!0}),BZ())}))):$Y&&xG.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),a$=(e={})=>{const t=f({onerror:!0,onunhandledrejection:!0},e);return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){LG((t=>{const{stackParser:n,attachStacktrace:r}=c$();if(KW()!==e||VX())return;const{msg:i,url:o,line:s,column:a,error:l}=t,c=function(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],c=r,u=n,d=WG(t)&&t.length>0?t:nW();0===l.length&&l.push({colno:c,filename:d,function:_G,in_app:!0,lineno:u});return e}(JX(n,l||i,void 0,r,!1),o,s,a);c.level="error",MZ(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}(e),l$("onerror")),t.onunhandledrejection&&(!function(e){BG((t=>{const{stackParser:n,attachStacktrace:r}=c$();if(KW()!==e||VX())return;const i=function(e){if(ZG(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return e}(t),o=ZG(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:JX(n,i,void 0,r,!0);o.level="error",MZ(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),l$("onunhandledrejection"))}}};function l$(e){$Y&&xG.log(`Global Handler attached: ${e}`)}function c$(){const e=KW();return(null==e?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const u$=()=>({name:"HttpContext",preprocessEvent(e){var t,n;if(!HX.navigator&&!HX.location&&!HX.document)return;const r=(null==(t=e.request)?void 0:t.url)||nW(),{referrer:i}=HX.document||{},{userAgent:o}=HX.navigator||{},s=f(f(f({},null==(n=e.request)?void 0:n.headers),i&&{Referer:i}),o&&{"User-Agent":o}),a=h(f(f({},e.request),r&&{url:r}),{headers:s});e.request=a}}),d$=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){const o=i.getOptions();mX(GX,o.stackParser,o.maxValueLength,n,t,e,r)}}};function f$(e={}){var t;const n={defaultIntegrations:[hX(),dX(),t$(),QY(),a$(),d$(),_X(),u$(),s$()],release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:null==(t=HX.SENTRY_RELEASE)?void 0:t.id,sendClientReports:!0};return f(f({},n),function(e){const t={};for(constn of Object.getOwnPropertyNames(e)){const r=n;void 0!==e[r]&&(t[r]=e[r])}return t}(e))}function h$(e={}){const t=f$(e);if(!t.skipBrowserExtensionCheck&&function(){var e;const t=void 0!==HX.window&&HX;if(!t)return!1;const n=t[t.chrome?"chrome":"browser"],r=null==(e=null==n?void 0:n.runtime)?void 0:e.id,i=nW()||"",o=!!r&&HX===HX.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>i.startsWith(`${e}//`))),s=void 0!==t.nw;return!!r&&!o&&!s}())return void($Y&&bG((()=>{})));$Y&&!TX()&&xG.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n=h(f({},t),{stackParser:(r=t.stackParser||KY,Array.isArray(r)?kG(...r):r),integrations:zZ(t),transport:t.transport||VY});var r;return $Z(tK,n)}const p$=dG,m$="sentryReplaySession",g$="Unable to send Replay",v$=15e4,y$=5e3,b$=2e7,x$=36e5;var _$,w$;function C$(e){const t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function k$(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function S$(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,E$).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(n){return null}var t}function E$(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=S$(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(t)),n||r)return t}return t||e.cssText}(w$=_$||(_$={}))[w$.Document=0]="Document",w$[w$.DocumentType=1]="DocumentType",w$[w$.Element=2]="Element",w$[w$.Text=3]="Text",w$[w$.CDATA=4]="CDATA",w$[w$.Comment=5]="Comment";class A${constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return-1;const n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function j$({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function O$({isMasked:e,element:t,value:n,maskInputFn:r}){leti=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function N$(e){return e.toLowerCase()}function T$(e){return e.toUpperCase()}const P$="__rrweb_original__";function M$(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?N$(t):null}function I$(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function L$(e,t){var n;let r;try{r=new URL(e,null!=t?t:window.location.href)}catch(o){return null}const i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(n=null==i?void 0:i[1])?n:null}const R$={};function D$(e){const t=R$[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(_k){}return R$[e]=r.bind(window)}function B$(...e){return D$("setTimeout")(...e)}function F$(...e){return D$("clearTimeout")(...e)}function H$(e){try{return e.contentDocument}catch(_k){}}let z$=1;const V$=new RegExp("[^a-z0-9-_:]");function U$(){return z$++}let G$,W$;const q$=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Z$=/^(?:[a-z+]+:)?\/\//i,X$=/^www\..*/i,K$=/^(data:)([^,]*),(.*)/i;function Y$(e,t){return(e||"").replace(q$,((e,n,r,i,o,s)=>{const a=r||o||s,l=n||i||"";if(!a)return e;if(Z$.test(a)||X$.test(a))return`url(${l}${a}${l})`;if(K$.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const t of u)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`}))}const $$=/^[^ \t\n\r\u000c]+/,J$=/^[, \t\n\r\u000c]+/;const Q$=new WeakMap;function eJ(e,t){return t&&""!==t.trim()?nJ(e,t):t}function tJ(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function nJ(e,t){let n=Q$.get(e);if(n||(n=e.createElement("a"),Q$.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function rJ(e,t,n,r,i,o){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?eJ(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}const i=[];for(;r(J$),!(n>=t.length);){let o=r($$);if(","===o.slice(-1))o=eJ(e,o.substring(0,o.length-1)),i.push(o);else{let r="";o=eJ(e,o);let s=!1;for(;;){const e=t.charAt(n);if(""===e){i.push((o+r).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){n+=1,i.push((o+r).trim());break}"("===e&&(s=!0)}r+=e,n+=1}}}return i.join(", ")}(e,r):"style"===n?Y$(r,nJ(e)):"object"===t&&"data"===n?eJ(e,r):"function"==typeof o?o(n,r,i):r:eJ(e,r):r}function iJ(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function oJ(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:oJ(e.parentNode,t,n,r+1):-1}function sJ(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(_k){return!1}}}function aJ(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===s)return!1;if("INPUT"===s.tagName){const e=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,l=-1;if(o){if(l=oJ(s,sJ(r,i)),l<0)return!0;a=oJ(s,sJ(t,n),l>=0?l:1/0)}else{if(a=oJ(s,sJ(t,n)),a<0)return!1;l=oJ(s,sJ(r,i),a>=0?a:1/0)}return a>=0?!(l>=0)||a<=l:!(l>=0)&&!!o}catch(_k){}return!!o}function lJ(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,dataURLOptions:v={},inlineImages:y,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:_=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:_$.Document,childNodes:[],compatMode:e.compatMode}:{type:_$.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:_$.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m,maskAllText:g,maskTextClass:v,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:x}=t,_=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(_k){}return!1}(e,r,i,o),w=function(e){if(e instanceof HTMLFormElement)return"form";const t=N$(e.tagName);return V$.test(t)?"div":t}(e);let C={};const k=e.attributes.length;for(let E=0;E<k;E++){const t=e.attributes[E];t.name&&!iJ(w,t.name,t.value)&&(C[t.name]=rJ(n,w,N$(t.name),t.value,e,l))}if("link"===w&&s){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=S$(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=Y$(r,t.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=S$(e.sheet);t&&(C._cssText=Y$(t,nJ(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const t=e,n=M$(t),r=I$(t,T$(w),n),i=t.checked;if("submit"!==n&&"button"!==n&&r){const e=aJ(t,v,b,y,x,j$({type:n,tagName:T$(w),maskInputOptions:a}));C.value=O$({isMasked:e,element:t,value:r,maskInputFn:c})}i&&(C.checked=i)}"option"===w&&(e.selected&&!a.select?C.selected=!0:delete C.selected);if("canvas"===w&&f)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const i=t.getImageData,o=P$ in i?i[P$]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}if("img"===w&&d){G$||(G$=n.createElement("canvas"),W$=G$.getContext("2d"));const t=e,r=(t.currentSrc||t.getAttribute("src"),t.crossOrigin),i=()=>{t.removeEventListener("load",i);try{G$.width=t.naturalWidth,G$.height=t.naturalHeight,W$.drawImage(t,0,0),C.rr_dataURL=G$.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i))}"anonymous"===t.crossOrigin&&(r?C.crossOrigin=r:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}"audio"!==w&&"video"!==w||(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime);p||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop));if(_){const{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==w||h(C.src)||(_||H$(e)||(C.rr_src=C.src),delete C.src);let S;try{customElements.get(w)&&(S=!0)}catch(_k){}return{type:_$.Element,tagName:w,attributes:C,childNodes:[],isSVG:tJ(e)||void 0,needBlock:_,rootId:m,isCustom:S}}(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:h,maskAttributeFn:l,maskInputOptions:p,maskInputFn:g,dataURLOptions:v,inlineImages:y,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:_,rootId:w,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return function(e,t){var n;const{maskAllText:r,maskTextClass:i,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:a,maskTextFn:l,maskInputOptions:c,maskInputFn:u,rootId:d}=t,f=e.parentNode&&e.parentNode.tagName;let h=e.textContent;const p="STYLE"===f||void 0,m="SCRIPT"===f||void 0,g="TEXTAREA"===f||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||(null==(n=e.parentNode.sheet)?void 0:n.cssRules)&&(h=S$(e.parentNode.sheet))}catch(y){}h=Y$(h,nJ(t.doc))}m&&(h="SCRIPT_PLACEHOLDER");const v=aJ(e,i,s,o,a,r);p||m||g||!h||!v||(h=l?l(h,e.parentElement):h.replace(/[\S]/g,"*"));g&&h&&(c.textarea||v)&&(h=u?u(h,e.parentNode):h.replace(/[\S]/g,"*"));if("OPTION"===f&&h){h=O$({isMasked:aJ(e,i,s,o,a,j$({type:null,tagName:f,maskInputOptions:c})),element:e,value:h,maskInputFn:u})}return{type:_$.Text,textContent:h||"",isStyle:p,rootId:d}}(e,{doc:n,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:_$.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:_$.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function cJ(e){return null==e?"":e.toLowerCase()}function uJ(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b={},inlineImages:x=!1,recordCanvas:_=!1,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:k=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:j=!1}=t;let{preserveWhiteSpace:O=!0}=t;const N=lJ(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,dataURLOptions:b,inlineImages:x,recordCanvas:_,keepIframeSrcFn:A,newlyAddedElement:j});if(!N)return null;let T;T=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===_$.Comment)return!0;if(e.type===_$.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===L$(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(cJ(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===cJ(e.attributes.name)||"icon"===cJ(e.attributes.rel)||"apple-touch-icon"===cJ(e.attributes.rel)||"shortcut icon"===cJ(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&cJ(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(cJ(e.attributes.property).match(/^(og|twitter|fb):/)||cJ(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===cJ(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===cJ(e.attributes.name)||"googlebot"===cJ(e.attributes.name)||"bingbot"===cJ(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===cJ(e.attributes.name)||"generator"===cJ(e.attributes.name)||"framework"===cJ(e.attributes.name)||"publisher"===cJ(e.attributes.name)||"progid"===cJ(e.attributes.name)||cJ(e.attributes.property).match(/^article:/)||cJ(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===cJ(e.attributes.name)||"yandex-verification"===cJ(e.attributes.name)||"csrf-token"===cJ(e.attributes.name)||"p:domain_verify"===cJ(e.attributes.name)||"verify-v1"===cJ(e.attributes.name)||"verification"===cJ(e.attributes.name)||"shopify-checkout-api-token"===cJ(e.attributes.name)))return!0}}return!1}(N,y)&&(O||N.type!==_$.Text||N.isStyle||N.textContent.replace(/^\s+|\s+$/gm,"").length)?U$():-2;const P=Object.assign(N,{id:T});if(r.add(e,P),-2===T)return null;w&&w(e);let M=!f;if(P.type===_$.Element){M=M&&!P.needBlock,delete P.needBlock;const t=e.shadowRoot;t&&k$(t)&&(P.isShadowHost=!0)}if((P.type===_$.Document||P.type===_$.Element)&&M){y.headWhitespace&&P.type===_$.Element&&"head"===P.tagName&&(O=!1);const t={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:x,recordCanvas:_,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A};for(const n of Array.from(e.childNodes)){const e=uJ(n,t);e&&P.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=uJ(n,t);r&&(k$(e.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}return e.parentNode&&C$(e.parentNode)&&k$(e.parentNode)&&(P.isShadow=!0),P.type===_$.Element&&"iframe"===P.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let i,o=!1;try{i=r.document.readyState}catch(a){return}if("complete"!==i){const r=B$((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{F$(r),o=!0,t()}))}const s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return B$(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=H$(e);if(t&&C){const n=uJ(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:x,recordCanvas:_,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A});n&&C(e,n)}}),k),P.type===_$.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===L$(P.attributes.href))&&function(e,t,n){let r,i=!1;try{r=e.sheet}catch(s){return}if(r)return;const o=B$((()=>{i||(t(),i=!0)}),n);e.addEventListener("load",(()=>{F$(o),i=!0,t()}))}(e,(()=>{if(S){const t=uJ(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:x,recordCanvas:_,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A});t&&S(e,t)}}),E),P}function dJ(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let fJ={map:{},getId:()=>-1,getNode:()=>null,removeNodeFromMap(){},has:()=>!1,reset(){}};function hJ(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();i||!1!==n.leading||(i=s);const a=t-(s-i),l=this;a<=0||a>t?(r&&(!function(...e){MJ("clearTimeout")(...e)}(r),r=null),i=s,e.apply(l,o)):r||!1===n.trailing||(r=IJ((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(l,o)}),a))}}function pJ(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){IJ((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>pJ(e,t,o||{},!0)}function mJ(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(_k){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(fJ=new Proxy(fJ,{get:(e,t,n)=>Reflect.get(e,t,n)}));let gJ=Date.now;function vJ(e){var t,n,r,i,o,s;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==a?void 0:a.documentElement.scrollLeft)||(null==(n=null==(t=null==a?void 0:a.body)?void 0:t.parentElement)?void 0:n.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==(o=null==(i=null==a?void 0:a.body)?void 0:i.parentElement)?void 0:o.scrollTop)||(null==(s=null==a?void 0:a.body)?void 0:s.scrollTop)||0}}function yJ(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function bJ(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function xJ(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function _J(e,t,n,r,i){if(!e)return!1;const o=xJ(e);if(!o)return!1;const s=sJ(t,n);if(!i){const e=r&&o.matches(r);return s(o)&&!e}const a=oJ(o,s);let l=-1;return!(a<0)&&(r&&(l=oJ(o,sJ(null,r))),a>-1&&l<0||a<l)}function wJ(e,t){return-2===t.getId(e)}function CJ(e,t){if(C$(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||CJ(e.parentNode,t))}function kJ(e){return Boolean(e.changedTouches)}function SJ(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function EJ(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function AJ(e){return Boolean(null==e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(gJ=()=>(new Date).getTime());class jJ{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function OJ(e){var t,n;let r=null;return(null==(n=null==(t=e.getRootNode)?void 0:t.call(e))?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function NJ(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=OJ(n);)n=t;return n}(e);return t.contains(n)}function TJ(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||NJ(e))}const PJ={};function MJ(e){const t=PJ[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(_k){}return PJ[e]=r.bind(window)}function IJ(...e){return MJ("setTimeout")(...e)}var LJ,RJ,DJ=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(DJ||{}),BJ=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(BJ||{}),FJ=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(FJ||{}),HJ=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(HJ||{});function zJ(e){try{return e.contentDocument}catch(_k){}}function VJ(e){return"__ln"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(LJ||(LJ={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(RJ||(RJ={}));class UJ{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&VJ(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&VJ(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const GJ=(e,t)=>`${e}@${t}`;class WJ{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new UJ,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!TJ(i))return;const o=C$(i.parentNode)?this.mirror.getId(OJ(i)):this.mirror.getId(i.parentNode),s=r(i);if(-1===o||-1===s)return n.addNode(i);const a=uJ(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{SJ(e,this.mirror)&&!_J(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),EJ(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),AJ(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{_J(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:s,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)ZJ(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)XJ(this.droppedSet,a)||ZJ(this.removes,a,this.mirror)?XJ(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),i(e.value)}const s={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!wJ(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;_J(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:aJ(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,xJ(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=M$(t),i=t.tagName;r=I$(t,i,n);const o=j$({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=O$({isMasked:aJ(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(_J(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(zJ(t))return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!iJ(t.tagName,n)&&(i.attributes[n]=rJ(this.doc,N$(t.tagName),N$(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(_k){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?i.styleDiff[e]=""===o?r:[r,o]:i._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(_J(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=C$(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);_J(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||wJ(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(qJ(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||CJ(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[GJ(n,r)]?qJ(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!C$(e.target)||!k$(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(wJ(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[GJ(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_J(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),AJ(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function qJ(e,t){e.delete(t),t.childNodes.forEach((t=>qJ(e,t)))}function ZJ(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}(e,t,n)}function XJ(e,t){return 0!==e.size&&KJ(e,t)}function KJ(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||KJ(e,n))}let YJ;const $J=e=>{if(!YJ)return e;return(...t)=>{try{return e(...t)}catch(n){if(YJ&&!0===YJ(n))return()=>{};throw n}}},JJ=[];function QJ(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(_k){}return e&&e.target}function eQ(e,t){var n,r;const i=new WJ;JJ.push(i),i.init(e);let o=window.MutationObserver||window.__rrMutationObserver;const s=null==(r=null==(n=null==window?void 0:window.Zone)?void 0:n.__symbol__)?void 0:r.call(n,"MutationObserver");s&&window[s]&&(o=window[s]);const a=new o($J((t=>{e.onMutation&&!1===e.onMutation(t)||i.processMutations.bind(i)(t)})));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function tQ({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(!1===s.mouseInteraction)return()=>{};const a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[];let c=null;return Object.keys(FJ).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((s=>{let a=N$(s);const u=(t=>s=>{const a=QJ(s);if(_J(a,r,i,o,!0))return;let l=null,u=t;if("pointerType"in s){switch(s.pointerType){case"mouse":l=HJ.Mouse;break;case"touch":l=HJ.Touch;break;case"pen":l=HJ.Pen}l===HJ.Touch?FJ[t]===FJ.MouseDown?u="TouchStart":FJ[t]===FJ.MouseUp&&(u="TouchEnd"):HJ.Pen}else kJ(s)&&(l=HJ.Touch);null!==l?(c=l,(u.startsWith("Touch")&&l===HJ.Touch||u.startsWith("Mouse")&&l===HJ.Mouse)&&(l=null)):FJ[t]===FJ.Click&&(l=c,c=null);const d=kJ(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(a),{clientX:p,clientY:m}=d;$J(e)(f({type:FJ[u],id:h,x:p,y:m},null!==l&&{pointerType:l}))})(s);if(window.PointerEvent)switch(FJ[s]){case FJ.MouseDown:case FJ.MouseUp:a=a.replace("mouse","pointer");break;case FJ.TouchStart:case FJ.TouchEnd:return}l.push(dJ(a,u,t))})),$J((()=>{l.forEach((e=>e()))}))}function nQ({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){return dJ("scroll",$J(hJ($J((s=>{const a=QJ(s);if(!a||_J(a,r,i,o,!0))return;const l=n.getId(a);if(a===t&&t.defaultView){const n=vJ(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:a.scrollLeft,y:a.scrollTop})})),s.scroll||100)),t)}const rQ=["INPUT","TEXTAREA","SELECT"],iQ=new WeakMap;function oQ({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:v}){function y(e){let n=QJ(e);const u=e.isTrusted,f=n&&T$(n.tagName);if("OPTION"===f&&(n=n.parentElement),!n||!f||rQ.indexOf(f)<0||_J(n,r,i,o,!0))return;const h=n;if(h.classList.contains(s)||a&&h.matches(a))return;const y=M$(n);let x=I$(h,f,y),_=!1;const w=j$({maskInputOptions:l,tagName:f,type:y}),C=aJ(n,p,g,m,v,w);"radio"!==y&&"checkbox"!==y||(_=n.checked),x=O$({isMasked:C,element:n,value:x,maskInputFn:c}),b(n,d?{text:x,isChecked:_,userTriggered:u}:{text:x,isChecked:_});const k=n.name;"radio"===y&&k&&_&&t.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach((e=>{if(e!==n){const t=O$({isMasked:C,element:e,value:I$(e,f,y),maskInputFn:c});b(e,d?{text:t,isChecked:!_,userTriggered:!1}:{text:t,isChecked:!_})}}))}function b(t,r){const i=iQ.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){iQ.set(t,r);const i=n.getId(t);$J(e)(h(f({},r),{id:i}))}}const x=("last"===u.input?["change"]:["input","change"]).map((e=>dJ(e,$J(y),t))),_=t.defaultView;if(!_)return()=>{x.forEach((e=>e()))};const w=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),C=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&x.push(...C.map((e=>pJ(e[0],e[1],{set(){$J(y)({target:this,isTrusted:!1})}},!1,_)))),$J((()=>{x.forEach((e=>e()))}))}function sQ(e){return function(e,t){if(uQ("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||uQ("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||uQ("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||uQ("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function aQ(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function lQ({mirror:e,stylesheetManager:t},n){var r,i,o;let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?null==(r=n.defaultView)?void 0:r.Document:null==(o=null==(i=n.ownerDocument)?void 0:i.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var n;const r=null==(n=l.set)?void 0:n.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(_k){}return r}}),$J((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function cQ(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=eQ(e,e.doc));const i=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const i="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let s,a=[];const l=hJ($J((t=>{const n=Date.now()-s;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],s=null})),o),c=$J(hJ($J((e=>{const t=QJ(e),{clientX:n,clientY:i}=kJ(e)?e.changedTouches[0]:e;s||(s=gJ()),a.push({x:n,y:i,id:r.getId(t),timeOffset:gJ()-s}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?BJ.Drag:e instanceof MouseEvent?BJ.MouseMove:BJ.TouchMove)})),i,{trailing:!1})),u=[dJ("mousemove",c,n),dJ("touchmove",c,n),dJ("drag",c,n)];return $J((()=>{u.forEach((e=>e()))}))}(e),o=tQ(e),s=nQ(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return dJ("resize",$J(hJ($J((()=>{const t=yJ(),i=bJ();n===t&&r===i||(e({width:Number(i),height:Number(t)}),n=t,r=i)})),200)),t)}(e,{win:n}),l=oQ(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=$J((s=>hJ($J((o=>{const a=QJ(o);if(!a||_J(a,t,n,r,!0))return;const{currentTime:l,volume:c,muted:u,playbackRate:d}=a;e({type:s,id:i.getId(a),currentTime:l,volume:c,muted:u,playbackRate:d})})),o.media||500))),l=[dJ("play",a(0),s),dJ("pause",a(1),s),dJ("seeked",a(2),s),dJ("volumechange",a(3),s),dJ("ratechange",a(4),s)];return $J((()=>{l.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$J(((r,i,o)=>{const[s,a]=o,{id:l,styleId:c}=aQ(i,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:s,index:a}]}),r.apply(i,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let s,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:$J(((r,i,o)=>{const[s]=o,{id:a,styleId:l}=aQ(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:s}]}),r.apply(i,o)}))}),r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:$J(((r,i,o)=>{const[s]=o,{id:a,styleId:l}=aQ(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:s}),r.apply(i,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:$J(((r,i,o)=>{const[s]=o,{id:a,styleId:l}=aQ(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:s}),r.apply(i,o)}))}));const l={};dQ("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(dQ("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),dQ("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),dQ("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach((([r,i])=>{c[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(c[r].insertRule,{apply:$J(((r,i,o)=>{const[s,a]=o,{id:l,styleId:c}=aQ(i.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:s,index:[...sQ(i),a||0]}]}),r.apply(i,o)}))}),i.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:$J(((r,i,o)=>{const[s]=o,{id:a,styleId:l}=aQ(i.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...sQ(i),s]}]}),r.apply(i,o)}))})})),$J((()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:n}),d=lQ(e,e.doc),f=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:$J(((i,s,a)=>{var l;const[c,u,d]=a;if(n.has(c))return o.apply(s,[c,u,d]);const{id:f,styleId:h}=aQ(null==(l=s.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(f&&-1!==f||h&&-1!==h)&&e({id:f,styleId:h,set:{property:c,value:u,priority:d},index:sQ(s.parentRule)}),i.apply(s,a)}))});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:$J(((i,o,a)=>{var l;const[c]=a;if(n.has(c))return s.apply(o,[c]);const{id:u,styleId:d}=aQ(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||d&&-1!==d)&&e({id:u,styleId:d,remove:{property:c},index:sQ(o.parentRule)}),i.apply(o,a)}))}),$J((()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s}))}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){constr=new o(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const s=mJ(t.fonts,"add",(function(t){return function(n){return IJ($J((()=>{const t=i.get(n);t&&(e(t),i.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(s),$J((()=>{r.forEach((e=>e()))}))}(e)));const p=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const l=$J((()=>{const e=t.getSelection();if(!e||a&&(null==e?void 0:e.isCollapsed))return;a=e.isCollapsed||!1;const l=[],c=e.rangeCount||0;for(let t=0;t<c;t++){const s=e.getRangeAt(t),{startContainer:a,startOffset:c,endContainer:u,endOffset:d}=s;_J(a,r,i,o,!0)||_J(u,r,i,o,!0)||l.push({start:n.getId(a),startOffset:c,end:n.getId(u),endOffset:d})}s({ranges:l})}));return l(),dJ("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?mJ(n.customElements,"define",(function(e){return function(n,r,i){try{t({define:{name:n}})}catch(_k){}return e.apply(this,[n,r,i])}})):()=>{}}(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,n,v.options));return $J((()=>{JJ.forEach((e=>e.reset())),null==r||r.disconnect(),i(),o(),s(),a(),l(),c(),u(),d(),f(),h(),p(),m(),g.forEach((e=>e()))}))}function uQ(e){return void 0!==window[e]}function dQ(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class fQ{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const i=r.get(t);return i||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class hQ{constructor(){this.crossOriginIframeMirror=new fQ(U$),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class pQ{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new fQ(U$),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fQ(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null==(n=this.loadListener)||n.call(this,e);const r=zJ(e);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case DJ.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:DJ.IncrementalSnapshot,data:{source:BJ.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case DJ.Meta:case DJ.Load:case DJ.DomContentLoaded:return!1;case DJ.Plugin:return t;case DJ.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case DJ.IncrementalSnapshot:switch(t.data.source){case BJ.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case BJ.Drag:case BJ.TouchMove:case BJ.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case BJ.ViewportResize:return!1;case BJ.MediaInteraction:case BJ.MouseInteraction:case BJ.Scroll:case BJ.CanvasMutation:case BJ.Input:return this.replaceIds(t.data,e,["id"]),t;case BJ.StyleSheetRule:case BJ.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case BJ.Font:return t;case BJ.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case BJ.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(const i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===_$.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class mQ{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class gQ{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!k$(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=eQ(h(f({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(nQ(h(f({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),IJ((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(lQ({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=zJ(e),n=function(e){try{return e.contentWindow}catch(_k){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(mJ(e.prototype,"attachShadow",(function(e){return function(r){const i=e.call(this,r);return this.shadowRoot&&TJ(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(_k){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class vQ{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class yQ{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new jJ,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const i of e){let e;this.styleMirror.has(i)?e=this.styleMirror.getId(i):(e=this.styleMirror.add(i),r.push({styleId:e,rules:Array.from(i.rules||CSSRule,((e,t)=>({rule:E$(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class bQ{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,function(...e){MJ("requestAnimationFrame")(...e)}((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let xQ,_Q;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(n=e.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(e)}}catch(MJe){}const wQ=new A$;function CQ(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:g,maskInputOptions:v,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:x,maskTextFn:_,maxCanvasSize:w=null,packFn:C,sampling:k={},dataURLOptions:S={},mousemoveWait:E,recordDOM:A=!0,recordCanvas:j=!1,recordCrossOriginIframes:O=!1,recordAfter:N=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:P=!1,inlineImages:M=!1,plugins:I,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:R=new Set([]),errorHandler:D,onMutation:B,getCanvasManager:F}=e;YJ=D;const H=!O||window.parent===window;let z=!1;if(!H)try{window.parent.document&&(z=!1)}catch(_k){z=!0}if(H&&!t)throw new Error("emit function is required");if(!H&&!z)return()=>{};void 0!==E&&void 0===k.mousemove&&(k.mousemove=E),wQ.reset();const V=!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==v?v:{},U=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let G;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let W=0;const q=e=>{for(const t of I||[])t.eventProcessor&&(e=t.eventProcessor(e));return C&&!z&&(e=C(e)),e};xQ=(e,i)=>{var o;const s=e;if(s.timestamp=gJ(),!(null==(o=JJ[0])?void 0:o.isFrozen())||s.type===DJ.FullSnapshot||s.type===DJ.IncrementalSnapshot&&s.data.source===BJ.Mutation||JJ.forEach((e=>e.unfreeze())),H)null==t||t(q(s),i);else if(z){const e={type:"rrweb",event:q(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,"*")}if(s.type===DJ.FullSnapshot)G=s,W=0;else if(s.type===DJ.IncrementalSnapshot){if(s.data.source===BJ.Mutation&&s.data.isAttachIframe)return;W++;const e=r&&W>=r,t=n&&G&&s.timestamp-G.timestamp>n;(e||t)&&te(!0)}};const Z=e=>{xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.Mutation},e)})},X=e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.Scroll},e)}),K=e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.CanvasMutation},e)}),Y=new yQ({mutationCb:Z,adoptedStyleSheetCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.AdoptedStyleSheet},e)})}),$="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?newhQ:new pQ({mirror:wQ,mutationCb:Z,stylesheetManager:Y,recordCrossOriginIframes:O,wrappedEmit:xQ});for(const f of I||[])f.getMirror&&f.getMirror({nodeMirror:wQ,crossOriginIframeMirror:$.crossOriginIframeMirror,crossOriginIframeStyleMirror:$.crossOriginIframeStyleMirror});const J=new bQ,Q=function(e,t){try{return e?e(t):new vQ}catch(_k){return new vQ}}(F,{mirror:wQ,win:window,mutationCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.CanvasMutation},e)}),recordCanvas:j,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:w,sampling:k.canvas,dataURLOptions:S,errorHandler:D}),ee="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new mQ:new gQ({mutationCb:Z,scrollCb:X,bypassOptions:{onMutation:B,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:V,dataURLOptions:S,maskAttributeFn:b,maskTextFn:_,maskInputFn:x,recordCanvas:j,inlineImages:M,sampling:k,slimDOMOptions:U,iframeManager:$,stylesheetManager:Y,canvasManager:Q,keepIframeSrcFn:L,processedNodeManager:J},mirror:wQ}),te=(e=!1)=>{if(!A)return;xQ({type:DJ.Meta,data:{href:window.location.href,width:bJ(),height:yJ()}},e),Y.reset(),ee.init(),JJ.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new A$,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOM:y=!1,dataURLOptions:b,preserveWhiteSpace:x,onSerialize:_,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:E=()=>!1}=t;return uJ(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:b,inlineImages:f,recordCanvas:h,preserveWhiteSpace:x,onSerialize:_,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:!1})}(document,{mirror:wQ,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:V,maskAttributeFn:b,maskInputFn:x,maskTextFn:_,slimDOM:U,dataURLOptions:S,recordCanvas:j,inlineImages:M,onSerialize:e=>{SJ(e,wQ)&&$.addIframe(e),EJ(e,wQ)&&Y.trackLinkElement(e),AJ(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{$.attachIframe(e,t),e.contentWindow&&Q.addWindow(e.contentWindow),ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:L});t&&(xQ({type:DJ.FullSnapshot,data:{node:t,initialOffset:vJ(window)}}),JJ.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,wQ.getId(document)))};_Q=te;try{const e=[],t=e=>{var t;return $J(cQ)({onMutation:B,mutationCb:Z,mousemoveCb:(e,t)=>xQ({type:DJ.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.MouseInteraction},e)}),scrollCb:X,viewportResizeCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.ViewportResize},e)}),inputCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.Input},e)}),mediaInteractionCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.MediaInteraction},e)}),styleSheetRuleCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.StyleSheetRule},e)}),styleDeclarationCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.StyleDeclaration},e)}),canvasMutationCb:K,fontCb:e=>xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.Font},e)}),selectionCb:e=>{xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.Selection},e)})},customElementCb:e=>{xQ({type:DJ.IncrementalSnapshot,data:f({source:BJ.CustomElement},e)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,maskInputOptions:V,inlineStylesheet:m,sampling:k,recordDOM:A,recordCanvas:j,inlineImages:M,userTriggeredOnInput:T,collectFonts:P,doc:e,maskAttributeFn:b,maskInputFn:x,maskTextFn:_,keepIframeSrcFn:L,blockSelector:o,unblockSelector:s,slimDOMOptions:U,dataURLOptions:S,mirror:wQ,iframeManager:$,stylesheetManager:Y,shadowDomManager:ee,processedNodeManager:J,canvasManager:Q,ignoreCSSAttributes:R,plugins:(null==(t=null==I?void 0:I.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>xQ({type:DJ.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},{})};$.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(r){}}));const n=()=>{te(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(dJ("DOMContentLoaded",(()=>{xQ({type:DJ.DomContentLoaded,data:{}}),"DOMContentLoaded"===N&&n()}))),e.push(dJ("load",(()=>{xQ({type:DJ.Load,data:{}}),"load"===N&&n()}),window))),()=>{e.forEach((e=>e())),J.destroy(),_Q=void 0,YJ=void 0}}catch(ne){}}CQ.mirror=wQ,CQ.takeFullSnapshot=function(e){if(!_Q)throw new Error("please take full snapshot after start recording");_Q(e)};function kQ(e){return e>9999999999?e:1e3*e}function SQ(e){return e>9999999999?e/1e3:e}function EQ(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:DJ.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:Yq(t,10,1e3)}}),"console"===t.category))))}function AQ(e){return e.closest("button,a")||e}function jQ(e){const t=OQ(e);return t&&t instanceof Element?AQ(t):t}function OQ(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let NQ;function TQ(e){return NQ||(NQ=[],lW(p$,"open",(function(e){return function(...t){if(NQ)try{NQ.forEach((e=>e()))}catch(_k){}return e.apply(p$,t)}}))),NQ.push(e),()=>{const t=NQ?NQ.indexOf(e):-1;t>-1&&NQ.splice(t,1)}}const PQ=new Set([BJ.Mutation,BJ.StyleSheetRule,BJ.StyleDeclaration,BJ.AdoptedStyleSheet,BJ.CanvasMutation,BJ.Selection,BJ.MediaInteraction]);class MQ{constructor(e,t,n=EQ){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=TQ((()=>{this._lastMutation=LQ()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!IQ.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:SQ(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=SQ(e)}registerScroll(e=Date.now()){this._lastScroll=SQ(e)}registerClick(e){const t=AQ(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=LQ();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const n of e){const e=this._clicks.indexOf(n);e>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:o,clickBreadcrumb:s}=e;if(i){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:h(f({},s.data),{url:p$.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1})};this._addBreadcrumbEvent(t,i)}else if(o>1){const e={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:h(f({},s.data),{url:p$.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0})};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=TY((()=>this._checkClicks()),1e3)}}const IQ=["A","BUTTON","INPUT"];function LQ(){return Date.now()/1e3}function RQ(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(PQ.has(n)&&e.registerMutation(t.timestamp),n===BJ.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===BJ.MouseInteraction}(t)){const{type:n,id:r}=t.data,i=CQ.mirror.getNode(r);i instanceof HTMLElement&&n===FJ.Click&&e.registerClick(i)}}catch(_k){}}function DQ(e){return f({timestamp:Date.now()/1e3,type:"default"},e)}var BQ;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(BQ||(BQ={}));const FQ=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function HQ(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(FQ.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const zQ=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?jQ(e.event):OQ(e.event),n=eW(r,{maxStringLength:200})||"<unknown>"}catch(_k){n="<unknown>"}return{target:r,message:n}}(e);return DQ(f({category:`ui.${e.name}`},VQ(t,n)))}(t);if(!n)return;const r="click"===t.name,i=r?t.event:void 0;var o,s,a;!(r&&e.clickDetector&&i&&i.target)||i.altKey||i.metaKey||i.ctrlKey||i.shiftKey||(o=e.clickDetector,s=n,a=jQ(t.event),o.handleClick(s,a)),EQ(e,n)};functionVQ(e,t){const n=CQ.mirror.getId(e),r=n&&CQ.mirror.getNode(n),i=r&&CQ.mirror.getMeta(r),o=i&&function(e){return e.type===BQ.Element}(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===BQ.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:HQ(o.attributes)}}:{}}}function UQ(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(s)||!o)return null;const a=t||r||i,l=1===o.length;if(!a&&l)return null;const c=eW(s,{maxStringLength:200})||"<unknown>",u=VQ(s,c);return DQ({category:"ui.keyDown",message:c,data:h(f({},u.data),{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o})})}(t);n&&EQ(e,n)}const GQ={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:ZQ(o),end:ZQ(i),name:r,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=ZQ(i);return{type:n,name:r,start:o,end:o+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:p,type:m}=e;if(0===i)return null;return{type:`${t}.${m}`,start:ZQ(h),end:ZQ(o),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:f}}}};function WQ(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function qQ(e){const t=GQ[e.entryType];return t?t(e):null}function ZQ(e){return((xW()||p$.performance.timeOrigin)+e)/1e3}function XQ(e){const t=e.entries[e.entries.length-1];return QQ(e,"largest-contentful-paint",(null==t?void 0:t.element)?[t.element]:void 0)}function KQ(e){return void 0!==e.sources}function YQ(e){const t=[],n=[];for(const r of e.entries)if(KQ(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=CQ.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return QQ(e,"cumulative-layout-shift",n,t)}function $Q(e){const t=e.entries[e.entries.length-1];return QQ(e,"first-input-delay",(null==t?void 0:t.target)?[t.target]:void 0)}function JQ(e){const t=e.entries[e.entries.length-1];return QQ(e,"interaction-to-next-paint",(null==t?void 0:t.target)?[t.target]:void 0)}function QQ(e,t,n,r){const i=e.value,o=e.rating,s=ZQ(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map((e=>CQ.mirror.getId(e))):void 0,attributions:r}}}const e1="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const t1=["info","warn","error","log"],n1="[Replay] ";function r1(e,t="info"){lX({category:"console",data:{logger:"replay"},level:t,message:`${n1}${e}`},{level:t})}const i1=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return e1?(t1.forEach((e=>{n[e]=(...n)=>{xG[e](n1,...n),t&&r1(n.join(""),xX(e))}})),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),xG.error(n1,r),e?PZ(r):t&&r1(r,"error")},n.infoTick=(...e)=>{xG.info(n1,...e),t&&setTimeout((()=>r1(e[0])),0)}):t1.forEach((e=>{n[e]=()=>{}})),n}();class o1 extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class s1{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}addEvent(e){return g(this,null,(function*(){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>b$)throw new o1;this.events.push(e)}))}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?kQ(e):null}}class a1{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){e1&&i1.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,i)=>{const o=({data:t})=>{const s=t;if(s.method===e&&s.id===n){if(this._worker.removeEventListener("message",o),!s.success)return e1&&i1.error("Error in compression worker: ",s.response),void i(new Error("Error in compression worker"));r(s.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class l1{constructor(e){this._worker=new a1(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=kQ(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>b$?Promise.reject(new o1):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{e1&&i1.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}_finishRequest(){return g(this,null,(function*(){const e=yield this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}))}}class c1{constructor(e){this._fallback=new s1,this._compression=new l1(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}finish(){return g(this,null,(function*(){return yield this.ensureWorkerIsLoaded(),this._used.finish()}))}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}_ensureWorkerIsLoaded(){return g(this,null,(function*(){try{yield this._compression.ensureReady()}catch(e){return void(e1&&i1.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}yield this._switchToCompressionWorker()}))}_switchToCompressionWorker(){return g(this,null,(function*(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const o of e)r.push(this._compression.addEvent(o));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{yield Promise.all(r),this._fallback.clear()}catch(i){e1&&i1.exception(i,"Failed to add events when switching buffers.")}}))}}function u1({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort((function(t,n){return p[n.s]-p[t.s]||t.f-n.f}));s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){G.prototype.flush.call(this)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),s=i.length;return q(i,n),j(i,s-8,r.d()),j(i,s-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;e1&&i1.info("Usingcompression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new c1(n)}catch(t){e1&&i1.exception(t,"Failed to create compression worker")}}(t);if(e)return e}return e1&&i1.info("Using simple buffer"),new s1}function d1(){try{return"sessionStorage"in p$&&!!p$.sessionStorage}catch(_k){return!1}}function f1(e){!function(){if(!d1())return;try{p$.sessionStorage.removeItem(m$)}catch(_k){}}(),e.session=void 0}function h1(e){return void 0!==e&&Math.random()<e}function p1(e){const t=Date.now();return{id:e.id||_W(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function m1(e){if(d1())try{p$.sessionStorage.setItem(m$,JSON.stringify(e))}catch(_k){}}function g1({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=function(e,t){return h1(e)?"session":!!t&&"buffer"}(e,t),o=p1({sampled:i,previousSessionId:r});return n&&m1(o),o}function v1(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function y1(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return v1(e.started,t,r)||v1(e.lastActivity,n,r)}function b1(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!y1(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function x1({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&function(){if(!d1())return null;try{const e=p$.sessionStorage.getItem(m$);if(!e)return null;const t=JSON.parse(e);return e1&&i1.infoTick("Loading existing session"),p1(t)}catch(_k){return null}}();return i?b1(i,{sessionIdleExpire:e,maxReplayDuration:t})?(e1&&i1.infoTick("Session in sessionStorage is expired, creating new one..."),g1(r,{previousSessionId:i.id})):i:(e1&&i1.infoTick("Creating new session"),g1(r,{previousSessionId:n}))}function _1(e,t,n){return!!C1(e,t)&&(w1(e,t,n),!0)}function w1(e,t,n){return g(this,null,(function*(){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i="buffer"===e.recordingMode;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=function(e,t){try{if("function"==typeof t&&function(e){return e.type===DJ.Custom}(e))return t(e)}catch(n){return e1&&i1.exception(n,"An error occurred inthe `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,o.beforeAddRecordingEvent);if(!s)return;return yield r.addEvent(s)}catch(o){const t=o&&o instanceof o1,n=t?"addEventSizeExceeded":"addEvent";if(t&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),yield e.stop({reason:n});const s=KW();s&&s.recordDroppedEvent("internal_sdk_error","replay")}}))}function C1(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=kQ(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(e1&&i1.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function k1(e){return!e.type}function S1(e){return"transaction"===e.type}function E1(e){return"feedback"===e.type}function A1(e){return(t,n)=>{if(!e.isEnabled()||!k1(t)&&!S1(t))return;const r=null==n?void 0:n.statusCode;!r||r<200||r>=300||(S1(t)?function(e,t){var n,r;const i=e.getContext();(null==(r=null==(n=t.contexts)?void 0:n.trace)?void 0:r.trace_id)&&i.traceIds.size<100&&i.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;TY((()=>g(this,null,(function*(){try{yield e.sendBufferedReplayOrFlush()}catch(MJe){e.handleException(MJe)}}))))}(e,t))}}function j1(e){return t=>{e.isEnabled()&&k1(t)&&function(e,t){var n,r,i;const o=null==(i=null==(r=null==(n=t.exception)?void 0:n.values)?void 0:r[0])?void 0:i.value;if("string"!=typeof o)return;if(o.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||o.match(/(does not match server-rendered HTML|Hydration failed because)/i)){EQ(e,DQ({category:"replay.hydrate-error",data:{url:nW()}}))}}(e,t)}}function O1(e){const t=KW();t&&t.on("beforeAddBreadcrumb",(t=>function(e,t){if(!e.isEnabled()||!N1(t))return;const n=function(e){if(!N1(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(e){var t;const n=null==(t=e.data)?void 0:t.arguments;if(!Array.isArray(n)||0===n.length)return DQ(e);let r=!1;const i=n.map((e=>{if(!e)return e;if("string"==typeof e)returne.length>y$?(r=!0,`${e.slice(0,y$)}…`):e;if("object"==typeof e)try{const t=Yq(e,7);return JSON.stringify(t).length>y$?(r=!0,`${JSON.stringify(t,null,2).slice(0,y$)}…`):t}catch(_k){}return e}));return DQ(h(f({},e),{data:f(h(f({},e.data),{arguments:i}),r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}(e);return DQ(e)}(t);n&&EQ(e,n)}(e,t)))}function N1(e){return!!e.category}function T1(){const e=qW().getPropagationContext().dsc;e&&delete e.replay_id;const t=Iq();if(t){delete Gq(t).replay_id}}function P1(e){return Object.assign(((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!k1(t)&&!S1(t)&&!E1(t))return t;if(!e.checkAndHandleExpiredSession())return T1(),t;if(E1(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:DJ.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}(e,t),t;if(function(e,t){var n;return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!(null==(n=t.originalException)?void 0:n.__rrweb__))}(t,n)&&!e.getOptions()._experiments.captureExceptions)return e1&&i1.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==g$&&!(!t.exception||t.type)&&h1(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags=h(f({},t.tags),{replayId:e.getSessionId()})),t}),{id:"Replay"})}function M1(e,t){return t.map((({type:t,start:n,end:r,name:i,data:o})=>{const s=e.throttledAddEvent({type:DJ.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof s?Promise.resolve(null):s}))}function I1(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(M1(e,[n]),!1))))}}function L1(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!e1||!e.getOptions()._experiments.traceInternals)&&tX(t,KW())}(e,t.name)||e.addUpdate((()=>(M1(e,[t]),!0))))}function R1(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=LY(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(_k){}}function D1(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function B1(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n=f({},e._meta),r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function F1(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:mW({method:o,statusCode:s,request:a,response:l})}}function H1(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function z1(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>v$,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,v$);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(_k){}return{body:e}}(n);return r.body=i,(null==o?void 0:o.length)&&(r._meta={warnings:o}),r}function V1(e,t){return Object.entries(e).reduce(((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n}),{})}function U1(e,t){const n=function(e,t=p$.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(p$.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return aW(n,t)}function G1(e,t,n){return g(this,null,(function*(){try{const r=yield function(e,t,n){return g(this,null,(function*(){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=U1(s,n.networkDetailAllowUrls)&&!U1(s,n.networkDetailDenyUrls),f=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return q1(e[0],t);if(2===e.length)return q1(e[1],t);return{}}(n,t):{};if(!e)return z1(i,r,void 0);const o=DY(n),[s,a]=RY(o,i1),l=z1(i,r,s);if(a)return B1(l,a);return l}(n,t.input,c):H1(c),h=yield function(e,t,n,r){return g(this,arguments,(function*(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&void 0!==i)return H1(i);const o=r?W1(r.headers,n):{};if(!r||!t&&void0!==i)return z1(o,i,void 0);const[s,a]=yield function(e){return g(this,null,(function*(){const t=function(e){try{return e.clone()}catch(t){e1&&i1.exception(t,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=yield function(e){return new Promise(((t,n)=>{const r=TY((()=>n(new Error("Timeout while trying to read response body"))),500);(function(e){return g(this,null,(function*(){return yield e.text()}))})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(e1&&i1.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(e1&&i1.exception(n,"Failed to get text bodyfrom response"),[void 0,"BODY_PARSE_ERROR"])}}))}(r),l=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=(null==e?void 0:e.length)&&void 0===n?R1(e):n;return r?z1(i,o,t?e:void 0):H1(o)}catch(o){return e1&&i1.exception(o,"Failed to serialize response body"),z1(i,n,void 0)}}(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?B1(l,a):l}))}(d,n,t.response,u);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:l,request:f,response:h}}))}(e,t,n),i=F1("resource.fetch",r);L1(n.replay,i)}catch(r){e1&&i1.exception(r,"Failed to capture fetch breadcrumb")}}))}function W1(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function q1(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?W1(n,t):Array.isArray(n)?{}:V1(n,t):{}}function Z1(e,t,n){return g(this,null,(function*(){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!U1(l,n.networkDetailAllowUrls)||U1(l,n.networkDetailDenyUrls)){return{startTimestamp:i,endTimestamp:o,url:l,method:c,statusCode:u,request:H1(d),response:H1(f)}}const h=a[PY],p=h?V1(h.request_headers,n.networkRequestHeaders):{},m=V1(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{})}(a),n.networkResponseHeaders),[g,v]=n.networkCaptureBodies?RY(s,i1):[void 0],[y,b]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(_k){t.push(_k)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return e1&&i1.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return e1&&i1.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(_k){t.push(_k)}return e1&&i1.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],x=z1(p,d,g),_=z1(m,f,y);return{startTimestamp:i,endTimestamp:o,url:l,method:c,statusCode:u,request:v?B1(x,v):x,response:b?B1(_,b):_}}(e,t,n),i=F1("resource.xhr",r);L1(n.replay,i)}catch(r){e1&&i1.exception(r,"Failed to capture xhr breadcrumb")}}))}function X1(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=R1(r),o=n.getResponseHeader("content-length")?D1(n.getResponseHeader("content-length")):function(e,t){try{return R1("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch(_k){return}}(n.response,n.responseType);void 0!==i&&(e.data.request_body_size=i),void 0!==o&&(e.data.response_body_size=o)}function K1(e){const t=KW();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return null==e?void 0:e.xhr}(n)&&(X1(t,n),Z1(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return null==e?void 0:e.response}(n)&&(!function(e,t){const{input:n,response:r}=t,i=R1(n?DY(n):void 0),o=r?D1(r.headers.get("content-length")):void 0;void0!==i&&(e.data.request_body_size=i),void 0!==o&&(e.data.response_body_size=o)}(t,n),G1(t,n,e))}catch(_k){e1&&i1.exception(_k,"Error when enriching network breadcrumb")}}(a,e,t)))}catch(_k){}}function Y1(e,{autoFlushOnFeedback:t}){const n=KW();CY(zQ(e)),EY(I1(e)),O1(e),K1(e);const r=P1(e);var i;i=r,ZW().addEventProcessor(i),n&&(n.on("beforeSendEvent",j1(e)),n.on("afterSendEvent",A1(e)),n.on("createDsc",(t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}})),n.on("spanStart",(t=>{e.lastActiveSpan=t})),n.on("spanEnd",(t=>{e.lastActiveSpan=t})),n.on("beforeSendFeedback",((n,r)=>g(this,null,(function*(){var i;const o=e.getSessionId();(null==r?void 0:r.includeReplay)&&e.isEnabled()&&o&&(null==(i=n.contexts)?void 0:i.feedback)&&("api"===n.contexts.feedback.source&&t&&(yield e.flush()),n.contexts.feedback.replay_id=o)})))),t&&n.on("openFeedbackWidget",(()=>g(this,null,(function*(){yield e.flush()})))))}function $1(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}const J1=dG.navigator;function Q1(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(e1&&i1.warn("Received replay event after session expired."));const i=r||!t;t=!0,e.clickDetector&&RQ(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&i&&e.setInitialState(),!_1(e,n,i))return!0;if(!i)return!1;const t=e.session;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;_1(e,function(e){const t=e.getOptions();return{type:DJ.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,i),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(e1&&i1.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&m1(t))}return(null==t?void 0:t.previousSessionId)||"session"===e.recordingMode&&e.flush(),!0}))}}function e0(e){return g(this,arguments,(function*({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=r,d=KW(),p=qW(),m=null==d?void 0:d.getTransport(),v=null==d?void 0:d.getDsn();if(!(d&&m&&v&&o.sampled))return jW({});const y={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},b=yield function(e){return g(this,arguments,(function*({client:e,scope:t,replayId:n,event:r}){const i={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,i);const o=yield OZ(e.getOptions(),r,i,t,e,ZW());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const s=e.getSdkMetadata(),{name:a,version:l}=(null==s?void 0:s.sdk)||{};return o.sdk=h(f({},o.sdk),{name:a||"sentry.javascript.unknown",version:l||"0.0.0"}),o}))}({scope:p,client:d,replayId:t,event:y});if(!b)return d.recordDroppedEvent("event_processor","replay"),e1&&i1.info("An event processor returned `null`, will not send event."),jW({});delete b.sdkProcessingMetadata;const x=function(e,t,n,r){return Qq(cZ(e,lZ(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(b,s,v,d.getOptions().tunnel);let _;try{_=yield m.send(x)}catch(MJe){const t=new Error(g$);try{t.cause=MJe}catch(_k){}throw t}if("number"==typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new t0(_.statusCode);const w=eX({},_);if(QZ(w,"replay"))throw new n0(w);return _}))}class t0 extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class n0 extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}function r0(e){return g(this,arguments,(function*(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return yield e0(e),!0}catch(MJe){if(MJe instanceof t0||MJe instanceof n0)throw MJe;if(IZ("Replays",{_retryCount:t.count}),r&&r(MJe),t.count>=3){const e=new Error(`${g$} - max retries exceeded`);try{e.cause=MJe}catch(_k){}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{TY((()=>g(this,null,(function*(){try{yield r0(e,t),n(!0)}catch(i){r(i)}}))),t.interval)}))}}))}const i0="__THROTTLED";function o0(e,t,n){const r=new Map;let i=!1;return(...o)=>{const s=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(s),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=i;return i=!0,e?"__SKIPPED":i0}i=!1;const a=r.get(s)||0;return r.set(s,a+1),e(...o)}}class s0{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,i,o;const s=(null==n?void 0:n.maxWait)?Math.max(n.maxWait,t):0;function a(){return l(),r=e(),r}function l(){void 0!==i&&clearTimeout(i),void 0!==o&&clearTimeout(o),i=o=void 0}function c(){return i&&clearTimeout(i),i=TY(a,t),s&&void 0===o&&(o=TY(a,s)),r}return c.cancel=l,c.flush=function(){return void 0!==i||void 0!==o?a():r},c}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=o0(((e,t)=>function(e,t,n){return C1(e,t)?w1(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(i&&(this.clickDetector=new MQ(this,i)),e1){const t=e._experiments;i1.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===p$.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=DQ({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=DQ({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{UQ(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){e1&&i1.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",e1&&i1.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):e1&&i1.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(e1&&i1.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(e1&&i1.info("Buffering is in progress, call `flush()` to save the replay"));e1&&i1.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=x1({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(e1&&i1.info("Buffering is in progress, call `flush()` to save the replay"));e1&&i1.infoTick("Starting replay in buffer mode");const e=x1({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const n=this._canvas;this._stopRecording=CQ(f(h(f(h(f(f({},this._recordingOptions),"buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{emit:Q1(this)}),/iPhone|iPad|iPod/i.test(null!=(e=null==J1?void 0:J1.userAgent)?e:"")||/Macintosh/i.test(null!=(t=null==J1?void 0:J1.userAgent)?t:"")&&(null==J1?void 0:J1.maxTouchPoints)&&(null==J1?void 0:J1.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}),{onMutation:this._onMutationHandler.bind(this)}),n?{recordCanvas:n.recordCanvas,getCanvasManager:n.getCanvasManager,sampling:n.sampling,dataURLOptions:n.dataURLOptions}:{}))}catch(MJe){this.handleException(MJe)}var e,t}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(MJe){return this.handleException(MJe),!1}}stop(){return g(this,arguments,(function*({forceFlush:e=!1,reason:t}={}){var n;if(this._isEnabled){this._isEnabled=!1;try{e1&&i1.info("Stopping Replay"+(t?`triggered by ${t}`:"")),T1(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&(yield this._flush({force:!0})),null==(n=this.eventBuffer)||n.destroy(),this.eventBuffer=null,f1(this)}catch(MJe){this.handleException(MJe)}}}))}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),e1&&i1.info("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),e1&&i1.info("Resuming replay"))}sendBufferedReplayOrFlush(){return g(this,arguments,(function*({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();e1&&i1.info("Converting buffer to session"),yield this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}))}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){var e;return null==(e=this.session)?void 0:e.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&v1(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${p$.location.pathname}${p$.location.hash}${p$.location.search}`,t=`${p$.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===i0){const e=DQ({category:"replay.throttled"});this.addUpdate((()=>!_1(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Iq(),t=e&&Mq(e),n=(t&&Eq(t).data||{})[$W];if(t&&n&&["route","custom"].includes(n))return Eq(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=u1({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=x1({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!b1(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}_refreshSession(e){return g(this,null,(function*(){this._isEnabled&&(yield this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}))}_addListeners(){try{p$.document.addEventListener("visibilitychange",this._handleVisibilityChange),p$.addEventListener("blur",this._handleWindowBlur),p$.addEventListener("focus",this._handleWindowFocus),p$.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Y1(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(MJe){this.handleException(MJe)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(XK(e,n))})),r.push(WK(WQ(XQ,e)),GK(WQ(YQ,e)),qK(WQ($Q,e)),ZK(WQ(JQ,e))),()=>{r.forEach((e=>e()))}}(this)}_removeListeners(){try{p$.document.removeEventListener("visibilitychange",this._handleVisibilityChange),p$.removeEventListener("blur",this._handleWindowBlur),p$.removeEventListener("focus",this._handleWindowFocus),p$.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(MJe){this.handleException(MJe)}}_doChangeToBackgroundTasks(e){if(!this.session)return;y1(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):e1&&i1.info("Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:DJ.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(qQ).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(M1(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}_runFlush(){returng(this,null,(function*(){var e;const t=this.getSessionId();if(this.session&&this.eventBuffer&&t){if(yield this._addPerformanceEntries(),(null==(e=this.eventBuffer)?void 0:e.hasEvents)&&(yield function(e){return g(this,null,(function*(){try{return Promise.all(M1(e,[$1(p$.performance.memory)]))}catch(t){return[]}}))}(this),this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const i=yield this.eventBuffer.finish();yield r0({replayId:t,recordingData:i,segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:e=>this.handleException(e)})}catch(MJe){this.handleException(MJe),this.stop({reason:"sendReplay"});const t=KW();if(t){const n=MJe instanceof n0?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else e1&&i1.error("No session or eventBuffer found to flush.")}))}_flush(){returng(this,arguments,(function*({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(e1&&i1.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i)return e1&&i1.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&e1&&i1.info("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{yield this._flushLock}catch(MJe){this.handleException(MJe)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}))}_maybeSaveSession(){this.session&&this._options.stickySession&&m1(this.session)}_onMutationHandler(e){const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=DQ({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function a0(e,t){return[...e,...t].join(",")}const l0='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',c0=["content-length","content-type","accept"];let u0=!1;class d0{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:i=!0,useCompression:o=!0,workerUrl:s,_experiments:a={},maskAllText:l=!0,maskAllInputs:c=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:y=[],networkCaptureBodies:b=!0,networkRequestHeaders:x=[],networkResponseHeaders:_=[],mask:w=[],maskAttributes:C=["title","placeholder"],unmask:k=[],block:S=[],unblock:E=[],ignore:A=[],maskFn:j,beforeAddRecordingEvent:O,beforeErrorSampling:N,onError:T}={}){this.name="Replay";const P=function({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:a0(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:a0(t,[]),blockSelector:a0(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:a0(r,[]),ignoreSelector:a0(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:w,unmask:k,block:S,unblock:E,ignore:A});if(this._recordingOptions=h(f({maskAllInputs:c,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:j,maskInputFn:j,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return r?i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o:o}({maskAttributes:C,maskAllText:l,privacyOptions:P,key:e,value:t,el:n})},P),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(t){}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)}),this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,x$),stickySession:i,useCompression:o,workerUrl:s,blockAllMedia:u,maskAllInputs:c,maskAllText:l,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:g,networkDetailAllowUrls:v,networkDetailDenyUrls:y,networkCaptureBodies:b,networkRequestHeaders:f0(x),networkResponseHeaders:f0(_),beforeAddRecordingEvent:O,beforeErrorSampling:N,onError:T,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${l0}`:l0),this._isInitialized&&FX())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return u0}set _isInitialized(e){u0=e}afterAllSetup(e){FX()&&!this._replay&&(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){var e;if(null==(e=this._replay)?void 0:e.isEnabled())return this._replay.getSessionId()}getRecordingMode(){var e;if(null==(e=this._replay)?void 0:e.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r=f({sessionSampleRate:0,errorSampleRate:0},mW(e)),i=dq(n.replaysSessionSampleRate),o=dq(n.replaysOnErrorSampleRate);null==i&&null==o&&bG((()=>{}));null!=i&&(r.sessionSampleRate=i);null!=o&&(r.errorSampleRate=o);return r}(this._initialOptions,e);this._replay=new s0({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(_k){}}}function f0(e){return[...c0,...e.map((e=>e.toLowerCase()))]}const h0=new WeakMap,p0=new Map,m0={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function g0(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a}=f({traceFetch:m0.traceFetch,traceXHR:m0.traceXHR,trackFetchStreamPerformance:m0.trackFetchStreamPerformance},t),l="function"==typeof o?o:e=>!0,c=e=>function(e,t){const n=nW();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch(_k){return!1}const o=r.origin===i;return t?aW(r.toString(),t)||o&&aW(r.pathname,t):o}{const n=!!e.match(/^\/(?!\/)/);return t?aW(e,t):n}}(e,a),u={};n&&(e.addEventProcessor((e=>("transaction"===e.type&&e.spans&&e.spans.forEach((e=>{if("http.client"===e.op){const t=p0.get(e.span_id);t&&(e.timestamp=t/1e3,p0.delete(e.span_id))}})),e))),i&&function(e){const t="fetch-body-resolved";TG(t,e),PG(t,(()=>IX(LX)))}((e=>{if(e.response){const t=h0.get(e.response);t&&e.endTimestamp&&p0.set(t,e.endTimestamp)}})),MX((e=>{const t=AX(e,l,c,u);if(e.response&&e.fetchData.__span&&h0.set(e.response,e.fetchData.__span),t){const n=b0(e.fetchData.url),r=n?SX(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}s&&t&&v0(t)}))),r&&MY((e=>{const t=function(e,t,n,r){const i=e.xhr,o=null==i?void 0:i[PY];if(!i||i.__sentry_own_request__||!o)return;const{url:s,method:a}=o,l=Bq()&&t(s);if(e.endTimestamp&&l){const e=i.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==o.status_code&&(aq(t,o.status_code),t.end(),delete r[e]))}const c=b0(s),u=SX(c||s),d=EX(s),h=!!Iq(),p=l&&h?mZ({name:`${a} ${d}`,attributes:f(f({url:s,type:"xhr","http.method":a,"http.url":c,"server.address":null==u?void 0:u.host,[eq]:"auto.http.browser",[QW]:"http.client"},(null==u?void 0:u.search)&&{"http.query":null==u?void 0:u.search}),(null==u?void 0:u.hash)&&{"http.fragment":null==u?void 0:u.hash})}):new Wq;i.__sentry_xhr_span_id__=p.spanContext().spanId,r[i.__sentry_xhr_span_id__]=p,n(s)&&function(e,t){const{"sentry-trace":n,baggage:r}=sX({span:t});n&&function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch(PJe){}}(e,n,r)}(i,Bq()&&h?p:void 0);const m=KW();m&&m.emit("beforeOutgoingRequestSpan",p,e);return p}(e,l,c,u);s&&t&&v0(t)}))}function v0(e){const{url:t}=Eq(e).data;if(!t||"string"!=typeof t)return;const n=XK("resource",(({entries:r})=>{r.forEach((r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){(function(e){const{name:t,version:n}=cY(e.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",t]),!xW())return r;return[...r,["http.request.redirect_start",y0(e.redirectStart)],["http.request.fetch_start",y0(e.fetchStart)],["http.request.domain_lookup_start",y0(e.domainLookupStart)],["http.request.domain_lookup_end",y0(e.domainLookupEnd)],["http.request.connect_start",y0(e.connectStart)],["http.request.secure_connection_start",y0(e.secureConnectionStart)],["http.request.connection_end",y0(e.connectEnd)],["http.request.request_start",y0(e.requestStart)],["http.request.response_start",y0(e.responseStart)],["http.request.response_end",y0(e.responseEnd)]]})(r).forEach((t=>e.setAttribute(...t))),setTimeout(n)}}))}))}function y0(e=0){return((xW()||performance.timeOrigin)+e)/1e3}function b0(e){try{return new URL(e,HX.location.origin).href}catch(_k){return}}const x0=f(h(f({},bZ),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{}}),m0),_0=(e={})=>{const t=HX.document;Rq||(Rq=!0,LG(Dq),BG(Dq));const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:i,_experiments:{enableInteractions:o,enableStandaloneClsSpans:s},beforeStartSpan:a,idleTimeout:l,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:d,traceFetch:p,traceXHR:m,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:v,enableHTTPTimings:y,instrumentPageLoad:b,instrumentNavigation:x}=f(f({},x0),e),_=mY({recordClsStandaloneSpans:s||!1});n&&HY(),i&&dG.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver((e=>{const t=Iq();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=lY(xW()+n.startTime),{start_timestamp:r,op:i}=Eq(t);if("navigation"===i&&r&&e<r)continue;const o=lY(n.duration),s={[eq]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:l,invokerType:c,sourceURL:u,sourceFunctionName:d,sourceCharPosition:f}=a;s["browser.script.invoker"]=l,s["browser.script.invoker_type"]=c,u&&(s["code.filepath"]=u),d&&(s["code.function"]=d),-1!==f&&(s["browser.script.source_char_position"]=f),oY(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:s})}})).observe({type:"long-animation-frame",buffered:!0}):r&&XK("longtask",(({entries:e})=>{const t=Iq();if(!t)return;const{op:n,start_timestamp:r}=Eq(t);for(const i of e){const e=lY(xW()+i.startTime),o=lY(i.duration);"navigation"===n&&r&&e<r||oY(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[eq]:"auto.ui.browser.metrics"}})}})),o&&XK("event",(({entries:e})=>{const t=Iq();if(t)for(const n of e)if("click"===n.name){const e=lY(xW()+n.startTime),r=lY(n.duration),i={name:eW(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[eq]:"auto.ui.browser.metrics"}},o=rW(n.target);o&&(i.attributes["ui.component_name"]=o),oY(t,e,e+r,i)}}));const w={name:void 0,source:void 0};function C(e,n){const r="pageload"===n.op,i=a?a(n):n,o=i.attributes||{};n.name!==i.name&&(o[$W]="custom",i.attributes=o),w.name=i.name,w.source=o[$W];const d=xZ(i,{idleTimeout:l,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:r,beforeSpanEnd:t=>{_(),gY(t,{recordClsOnPageloadSpan:!s}),S0(e,void 0);const n=qW(),r=n.getPropagationContext();n.setPropagationContext(h(f({},r),{traceId:d.spanContext().traceId,sampled:Aq(d),dsc:Gq(t)}))}});function p(){t&&["interactive","complete"].includes(t.readyState)&&e.emit("idleSpanEnableAutoFinish",d)}S0(e,d),r&&t&&(t.addEventListener("readystatechange",(()=>{p()})),p())}return{name:"BrowserTracing",afterAllSetup(e){let t=nW();function r(){const t=k0(e);t&&!Eq(t).timestamp&&($Y&&xG.log(`[Tracing] Finishing current active span with op: ${Eq(t).op}`),t.end())}if(e.on("startNavigationSpan",(t=>{KW()===e&&(r(),ZW().setPropagationContext({traceId:MW(),sampleRand:Math.random()}),qW().setPropagationContext({traceId:MW(),sampleRand:Math.random()}),C(e,f({op:"navigation"},t)))})),e.on("startPageLoadSpan",((t,n={})=>{if(KW()!==e)return;r();const i=yq(n.sentryTrace||w0("sentry-trace"),n.baggage||w0("baggage"));qW().setPropagationContext(i),C(e,f({op:"pageload"},t))})),HX.location){if(b){const t=xW();!function(e,t,n){e.emit("startPageLoadSpan",t,n),qW().setTransactionName(t.name),k0(e)}(e,{name:HX.location.pathname,startTime:t?t/1e3:void 0,attributes:{[$W]:"url",[eq]:"auto.pageload.browser"}})}x&&EY((({to:n,from:r})=>{void 0!==r||-1===(null==t?void 0:t.indexOf(n))?r!==n&&(t=void 0,function(e,t){e.emit("startNavigationSpan",t),qW().setTransactionName(t.name),k0(e)}(e,{name:HX.location.pathname,attributes:{[$W]:"url",[eq]:"auto.navigation.browser"}})):t=void 0}))}d&&(HX.document?HX.document.addEventListener("visibilitychange",(()=>{const e=Iq();if(!e)return;const t=Mq(e);if(HX.document.hidden&&t){const e="cancelled",{op:n,status:r}=Eq(t);$Y&&xG.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}})):$Y&&xG.warn("[Tracing] Could not set up background tab detection due to lack of global document")),o&&function(e,t,n,r,i){const o=HX.document;let s;const a=()=>{const o="ui.action.click",a=k0(e);if(a){const e=Eq(a).op;if(["navigation","pageload"].includes(e))return void($Y&&xG.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`))}s&&(s.setAttribute(tq,"interactionInterrupted"),s.end(),s=void 0),i.name?s=xZ({name:i.name,op:o,attributes:{[$W]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):$Y&&xG.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`)};o&&addEventListener("click",a,{once:!1,capture:!0})}(e,l,c,u,w),n&&function(){const e=({entries:e})=>{const t=Iq(),n=t&&Mq(t);e.forEach((e=>{if(!function(e){return"duration"in e}(e)||!n)return;const t=e.interactionId;if(null!=t&&!FY.has(t)){if(BY.length>10){const e=BY.shift();FY.delete(e)}BY.push(t),FY.set(t,n)}}))};XK("event",e),XK("first-input",e)}(),g0(e,{traceFetch:p,traceXHR:m,trackFetchStreamPerformance:g,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:y})}}};function w0(e){const t=HX.document,n=null==t?void 0:t.querySelector(`meta[name=${e}]`);return(null==n?void 0:n.getAttribute("content"))||void 0}const C0="_sentry_idleSpan";function k0(e){return e[C0]}function S0(e,t){cW(e,C0,t)}const E0=1e6,A0=String(0),j0="main",O0=HX.navigator;let N0="",T0="",P0="",M0=(null==O0?void 0:O0.userAgent)||"",I0="";const L0=(null==O0?void 0:O0.language)||(null==(r=null==O0?void 0:O0.languages)?void 0:r[0])||"";const R0=null==O0?void 0:O0.userAgentData;var D0;function B0(e){return function(e){return!("thread_metadata"in e)}(e)?function(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[A0]:{name:j0}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=xW(),a="number"==typeof performance.timeOrigin?performance.timeOrigin:s||0,l=a-(s||a);return e.samples.forEach(((i,s)=>{if(void 0===i.stackId)return void 0===t&&(t=n,r.stacks[t]=[],n++),void(r.samples[s]={elapsed_since_start_ns:((i.timestamp+l-o)*E0).toFixed(0),stack_id:t,thread_id:A0});let a=e.stacks[i.stackId];const c=[];for(;a;){c.push(a.frameId);const t=e.frames[a.frameId];t&&void 0===r.frames[a.frameId]&&(r.frames[a.frameId]={function:t.name,abs_path:"number"==typeof t.resourceId?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),a=void 0===a.parentId?void 0:e.stacks[a.parentId]}const u={elapsed_since_start_ns:((i.timestamp+l-o)*E0).toFixed(0),stack_id:n,thread_id:A0};r.stacks[n]=c,r.samples[s]=u,n++})),r}(e):e}function F0(e,t,n,r){if("transaction"!==r.type)throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(null==n)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=function(e){var t,n;const r=null==(n=null==(t=e.contexts)?void 0:t.trace)?void 0:n.trace_id;return"string"==typeof r&&32!==r.length&&$Y&&xG.log(`[Profiling] Invalid traceId: ${r}on profiled event`),"string"!=typeof r?"":r}(r),o=B0(n),s=t||("number"==typeof r.start_timestamp?1e3*r.start_timestamp:1e3*yW()),a="number"==typeof r.timestamp?1e3*r.timestamp:1e3*yW();return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Fq,runtime:{name:"javascript",version:HX.navigator.userAgent},os:{name:N0,version:T0,build_number:M0},device:{locale:L0,model:I0,manufacturer:M0,architecture:P0,is_emulator:!1},debug_meta:{images:z0(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||_W(),trace_id:i,active_thread_id:A0,relative_start_ns:"0",relative_end_ns:(1e6*(a-s)).toFixed(0)}]}}function H0(e){return"pageload"===Eq(e).op}function z0(e){const t=KW(),n=null==t?void 0:t.getOptions(),r=null==n?void 0:n.stackParser;return r?function(e,t){const n=SZ(e);if(!n)return[];const r=[];for(const i of t)i&&n[i]&&r.push({type:"sourcemap",code_file:i,debug_id:n[i]});return r}(r,e):[]}"object"==typeof(D0=R0)&&null!==D0&&"getHighEntropyValues"in D0&&R0.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then((e=>{var t;if(N0=e.platform||"",P0=e.architecture||"",I0=e.model||"",T0=e.platformVersion||"",null==(t=e.fullVersionList)?void 0:t.length){const t=e.fullVersionList[e.fullVersionList.length-1];M0=`${t.brand} ${t.version}`}})).catch((e=>{}));let V0=!1;function U0(e){if(V0)return $Y&&xG.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return $Y&&xG.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=KW(),n=null==t?void 0:t.getOptions();if(!n)return $Y&&xG.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;if(!("number"!=typeof(i=r)&&"boolean"!=typeof i||"number"==typeof i&&isNaN(i)?($Y&&xG.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!0===i||!1===i||!(i<0||i>1)||($Y&&xG.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${i}.`),0)))return $Y&&xG.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;var i;if(!r)return $Y&&xG.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1;return!!(!0===r||Math.random()<r)||($Y&&xG.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1)}function G0(e,t,n,r){return function(e){return e.samples.length<2?($Y&&xG.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):!!e.frames.length||($Y&&xG.log("[Profiling] Discarding profile because it contains no frames"),!1)}(n)?F0(e,t,n,r):null}const W0=new Map;function q0(e){const t=W0.get(e);return t&&W0.delete(e),t}function Z0(e){let t;H0(e)&&(t=1e3*yW());const n=function(){const e=HX.Profiler;if("function"!=typeof e)return void($Y&&xG.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."));const t=Math.floor(3e3);try{return new e({sampleInterval:10,maxBufferSize:t})}catch(_k){$Y&&(xG.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),xG.log("[Profiling] Disabling profiling for current user session.")),V0=!0}}();if(!n)return;$Y&&xG.log(`[Profiling] started profiling span: ${Eq(e).description}`);const r=_W();function i(){return g(this,null,(function*(){if(e&&n)return n.stop().then((t=>{o&&(HX.clearTimeout(o),o=void 0),$Y&&xG.log(`[Profiling] stopped profiling of span: ${Eq(e).description}`),t?function(e,t){if(W0.set(e,t),W0.size>30){const e=W0.keys().next().value;W0.delete(e)}}(r,t):$Y&&xG.log(`[Profiling] profiler returned null profile for: ${Eq(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")})).catch((e=>{$Y&&xG.log("[Profiling] error while stopping profiler:",e)}))}))}qW().setContext("profile",{profile_id:r,start_timestamp:t});let o=HX.setTimeout((()=>{$Y&&xG.log("[Profiling] max profile duration elapsed, stopping profiling for:",Eq(e).description),i()}),3e4);const s=e.end.bind(e);e.end=function(){return e?(i().then((()=>{s()}),(()=>{s()})),e):s()}}const X0=()=>({name:"BrowserProfiling",setup(e){const t=Iq(),n=t&&Mq(t);n&&H0(n)&&U0(n)&&Z0(n),e.on("spanStart",(e=>{e===Mq(e)&&U0(e)&&Z0(e)})),e.on("beforeEnvelope",(e=>{var t,n;if(!W0.size)return;const r=function(e){const t=[];return tZ(e,((e,n)=>{if("transaction"===n)for(let r=1;r<e.length;r++){const n=e[r];(null==n?void 0:n.contexts)&&n.contexts.profile&&n.contexts.profile.profile_id&&t.push(e[r])}})),t}(e);if(!r.length)return;const i=[];for(const o of r){const e=null==o?void 0:o.contexts,r=null==(t=null==e?void 0:e.profile)?void 0:t.profile_id,s=null==(n=null==e?void 0:e.profile)?void 0:n.start_timestamp;if("string"!=typeof r){$Y&&xG.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!r){$Y&&xG.log("[Profiling] cannot find profile for a span without a profile context");continue}(null==e?void 0:e.profile)&&delete e.profile;const a=q0(r);if(!a){$Y&&xG.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}const l=G0(r,s,a,o);l&&i.push(l)}!function(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n])}(e,i)}))}});var K0={exports:{}},Y0={},$0="function"==typeof Symbol&&Symbol.for,J0=$0?Symbol.for("react.element"):60103,Q0=$0?Symbol.for("react.portal"):60106,e2=$0?Symbol.for("react.fragment"):60107,t2=$0?Symbol.for("react.strict_mode"):60108,n2=$0?Symbol.for("react.profiler"):60114,r2=$0?Symbol.for("react.provider"):60109,i2=$0?Symbol.for("react.context"):60110,o2=$0?Symbol.for("react.async_mode"):60111,s2=$0?Symbol.for("react.concurrent_mode"):60111,a2=$0?Symbol.for("react.forward_ref"):60112,l2=$0?Symbol.for("react.suspense"):60113,c2=$0?Symbol.for("react.suspense_list"):60120,u2=$0?Symbol.for("react.memo"):60115,d2=$0?Symbol.for("react.lazy"):60116,f2=$0?Symbol.for("react.block"):60121,h2=$0?Symbol.for("react.fundamental"):60117,p2=$0?Symbol.for("react.responder"):60118,m2=$0?Symbol.for("react.scope"):60119;function g2(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case J0:switch(e=e.type){case o2:case s2:case e2:case n2:case t2:case l2:return e;default:switch(e=e&&e.$$typeof){casei2:case a2:case d2:case u2:case r2:return e;default:return t}}case Q0:return t}}}function v2(e){return g2(e)===s2}Y0.AsyncMode=o2,Y0.ConcurrentMode=s2,Y0.ContextConsumer=i2,Y0.ContextProvider=r2,Y0.Element=J0,Y0.ForwardRef=a2,Y0.Fragment=e2,Y0.Lazy=d2,Y0.Memo=u2,Y0.Portal=Q0,Y0.Profiler=n2,Y0.StrictMode=t2,Y0.Suspense=l2,Y0.isAsyncMode=function(e){return v2(e)||g2(e)===o2},Y0.isConcurrentMode=v2,Y0.isContextConsumer=function(e){return g2(e)===i2},Y0.isContextProvider=function(e){return g2(e)===r2},Y0.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===J0},Y0.isForwardRef=function(e){return g2(e)===a2},Y0.isFragment=function(e){return g2(e)===e2},Y0.isLazy=function(e){return g2(e)===d2},Y0.isMemo=function(e){return g2(e)===u2},Y0.isPortal=function(e){return g2(e)===Q0},Y0.isProfiler=function(e){return g2(e)===n2},Y0.isStrictMode=function(e){return g2(e)===t2},Y0.isSuspense=function(e){return g2(e)===l2},Y0.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===e2||e===s2||e===n2||e===t2||e===l2||e===c2||"object"==typeof e&&null!==e&&(e.$$typeof===d2||e.$$typeof===u2||e.$$typeof===r2||e.$$typeof===i2||e.$$typeof===a2||e.$$typeof===h2||e.$$typeof===p2||e.$$typeof===m2||e.$$typeof===f2)},Y0.typeOf=g2,K0.exports=Y0;var y2=K0.exports,b2={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},x2={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},_2={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},w2={};function C2(e){return y2.isMemo(e)?_2:w2[e.$$typeof]||b2}w2[y2.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w2[y2.Memo]=_2;vark2=Object.defineProperty,S2=Object.getOwnPropertyNames,E2=Object.getOwnPropertySymbols,A2=Object.getOwnPropertyDescriptor,j2=Object.getPrototypeOf,O2=Object.prototype;var N2=function e(t,n,r){if("string"!=typeof n){if(O2){var i=j2(n);i&&i!==O2&&e(t,i,r)}var o=S2(n);E2&&(o=o.concat(E2(n)));for(var s=C2(t),a=C2(n),l=0;l<o.length;++l){var c=o[l];if(!(x2[c]||r&&r[c]||a&&a[c]||s&&s[c])){var u=A2(n,c);try{k2(t,c,u)}catch(_k){}}}}return t};const T2=_(N2),P2=(e,t,n,r)=>{var i,o,s,a;const l=[n,f({code:t},r||{})];if(null==(o=null==(i=null==e?void 0:e.services)?void 0:i.logger)?void 0:o.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);B2(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(null==(a=null==(s=null==e?void 0:e.services)?void 0:s.logger)?void 0:a.warn)?e.services.logger.warn(...l):null==console||console.warn},M2={},I2=(e,t,n,r)=>{B2(n)&&M2[n]||(B2(n)&&(M2[n]=new Date),P2(e,t,n,r))},L2=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}},R2=(e,t,n)=>{e.loadNamespaces(t,L2(e,n))},D2=(e,t,n,r)=>{if(B2(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return R2(e,n,r);n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,L2(e,r))},B2=e=>"string"==typeof e,F2=e=>"object"==typeof e&&null!==e,H2=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,z2={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":"","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},V2=e=>z2[e];let U2={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(H2,V2)};const G2=()=>U2;let W2;const q2=()=>W2,Z2={type:"3rdParty",init(e){((e={})=>{U2=f(f({},U2),e)})(e.options.react),(e=>{W2=e})(e)}},X2=v.createContext();class K2{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Y2=(e,t,n,r)=>e.getFixedT(t,n,r),$2=(e,t={})=>{var n,r,i,o;const{i18n:s}=t,{i18n:a,defaultNS:l}=v.useContext(X2)||{},c=s||a||q2();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new K2),!c){I2(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>B2(t)?t:F2(t)&&B2(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}(null==(n=c.options.react)?void 0:n.wait)&&I2(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const u=f(f(f({},G2()),c.options.react),t),{useSuspense:d,keyPrefix:h}=u;let p=e||l||(null==(r=c.options)?void 0:r.defaultNS);p=B2(p)?[p]:p||["translation"],null==(o=(i=c.reportNamespaces).addUsedNamespaces)||o.call(i,p);const m=(c.isInitialized||c.initializedStoreOnce)&&p.every((e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{var i;if((null==(i=n.bindI18n)?void 0:i.indexOf("languageChanging"))>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(I2(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,c,u))),g=((e,t,n,r)=>v.useCallback(Y2(e,t,n,r),[e,t,n,r]))(c,t.lng||null,"fallback"===u.nsMode?p:p[0],h),y=()=>g,b=()=>Y2(c,t.lng||null,"fallback"===u.nsMode?p:p[0],h),[x,_]=v.useState(y);let w=p.join();t.lng&&(w=`${t.lng}${w}`);const C=((e,t)=>{const n=v.useRef();return v.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current})(w),k=v.useRef(!0);v.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=u;k.current=!0,m||d||(t.lng?D2(c,t.lng,p,(()=>{k.current&&_(b)})):R2(c,p,(()=>{k.current&&_(b)}))),m&&C&&C!==w&&k.current&&_(b);const r=()=>{k.current&&_(b)};return e&&(null==c||c.on(e,r)),n&&(null==c||c.store.on(n,r)),()=>{k.current=!1,c&&(null==e||e.split(" ").forEach((e=>c.off(e,r)))),n&&c&&n.split(" ").forEach((e=>c.store.off(e,r)))}}),[c,w]),v.useEffect((()=>{k.current&&m&&_(y)}),[c,h,m]);const S=[x,c,m];if(S.t=x,S.i18n=c,S.ready=m,m)return S;if(!m&&!d)return S;throw new Promise((e=>{t.lng?D2(c,t.lng,p,(()=>e())):R2(c,p,(()=>e()))}))};function J2({i18n:e,defaultNS:t,children:n}){const r=v.useMemo((()=>({i18n:e,defaultNS:t})),[e,t]);return v.createElement(X2.Provider,{value:r},n)}const Q2="/assets/svg/100000-ae78b464.svg",e3="/assets/svg/110000_light-689f43a6.svg",t3="/assets/svg/196_light-d8bbf82c.svg",n3="/assets/svg/1-27a19b80.svg",r3="/assets/svg/1-27a19b80.svg",i3="/assets/svg/1-27a19b80.svg";var o3={exports:{}};o3.exports=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var o,s=function(e,n,r){void 0===r&&(r={});var i=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",i=e+"|"+r,o=t[i];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[i]=o),o}(n,r).formatToParts(i)},a=function(t,n){for(var r=s(t,n),o=[],a=0;a<r.length;a+=1){var l=r[a],c=l.type,u=l.value,d=e[c];d>=0&&(o[d]=parseInt(u,10))}var f=o[3],h=24===f?0:f,p=o[0]+"-"+o[1]+"-"+o[2]+" "+h+":"+o[4]+":"+o[5]+":000",m=+t;return(i.utc(p).valueOf()-(m-=m%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=o);var n,r=this.utcOffset(),s=this.toDate(),a=s.toLocaleString("en-US",{timeZone:e}),l=Math.round((s-new Date(a))/1e3/60),c=15*-Math.round(s.getTimezoneOffset()/15)-l;if(Number(c)){if(n=i(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,s=n||t||o,l=a(+i(),s);if("string"!=typeof e)return i(e).tz(s);var c=function(e,t,n){var r=e-60*t*1e3,i=a(r,n);if(t===i)return[r,t];var o=a(r-=60*(i-t)*1e3,n);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(e,r).valueOf(),l,s),u=c[0],d=c[1],f=i(u).utcOffset(d);return f.$x.$timezone=s,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}}}();const s3=_(o3.exports);var a3={exports:{}};a3.exports=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,o){var s=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},s.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var l=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=s.utcOffset;s.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var i=(""+r[0]).match(n)||["-",0,0],o=i[0],s=60*+i[1]+ +i[2];return 0===s?0:"+"===o?s:-s}(r)))return this;var s=Math.abs(r)<=16?60*r:r,a=this;if(i)return a.$offset=s,a.$u=0===r,a;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(s+l,e)).$offset=s,a.$x.$localOffset=l}else a=this.utc();return a};var u=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=s.diff;s.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=o(e).local();return f.call(r,i,t,n)}}}();const l3=_(a3.exports);T.extend(s3),T.extend(l3);const c3=(e,t)=>{if("string"!=typeof e&&(e=""),e.length<=12)return e.toUpperCase();const n=e.split(""),r=n.slice(0,5).join(""),i=n.slice(n.length-4,n.length).join("");return t?`${i}`:`${r}...${i}`},u3=Intl.DateTimeFormat().resolvedOptions().timeZone||"Asia/Shanghai",d3=(e,t)=>{t=t||"YYYY-MM-DD HH:mm:ss";let n=(e=>{let t=Number(e);return t<1e12?t*=1e3:t>1e14&&(t=Math.floor(t/1e6)),T(t).tz(u3).format("YYYY-MM-DD HH:mm:ss")})(e);return T(new Date(n).getTime()).format(t)};let f3=JSON.parse(localStorage.getItem("chain_config_info")||"[]");const h3=e=>{var t;return f3&&!f3.length&&(f3=JSON.parse(localStorage.getItem("chain_config_info")||"[]")),(null==(t=null==f3?void 0:f3.find((t=>t.chain_id==e)))?void 0:t.chain_logo)||new URL(Object.assign({"../assets/chain/0.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAhCAYAAAC4JqlRAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAASoSURBVHgBxVc/bBNXGP/uMJ1iaqshVc1iFpytoJoJqbKZQIi4HUCoRgoBIcJEWhG2JEVsgJpkSqsKxUhpVbGUBFViwlYlpqQCMeFOWTC0sXUoTic3d/1+3+WFy7t38aUg8ZNOd/f+fP//vEf0nmHR/4DjOKlOh7KWRSk1lkjQ03Q6/Zp2iNgCrKw4Bc+iQd5RII+yEdSWea7mEc1/3Ju+H4duVwFaLeeKS/St573RNhZ8Ya739aYr2y+LAJv5YMelWSZykN4GLMhum4rsnmXTtG0abDadwX9dqr41c4Dd1VmnJ83m6iDFEWCl5UywySs7Nvn2SLm0Xnm14ozoE1tc8FfT+YIHfo2i0m63aX5+garVGj1/Xpd/IJlMUn9/jgYGTlI+n6d9+zJRJNgg9GUwQDcFYJ9nO77Zs6aNMzM/0NzcT8J0z54kFYtFymQ+2RRsYeEBra76Al2+PMzPpSgZXu/eRYdUTCTUKPtpgl9ZffWLFw0aGfmG6vU6HT1apEePqqLptWujIcpzcz/LmpmZ78VSd+78aLJGinnN8ruIH4kB5Di/zpmYX7hwkV6+bAgxMAagvQ41Vi5/RTduXKe1tbbsBQ0DChs8fQG4wEyYVo2PTwghMD98OE9LS0syjm8diAG4plqtUqk0IHuwFzRMUDwT4vt1rm4aYMLFxSU29VXK5XIyVq//KSbFHPweDEI8PT1JWQNgz/DwJbp587ash1C6FVDSrb+bzjn+mdVnjx07IRqUy2XRPBj13aCyIp//jJk/kLGHD38LrXM9+trmNCjpE9C80WhIVCOgwLhU8v2PN4g9fvw7PXv2RB58Y0ytQSACyBzQwQOaOmzL/tTmRMzqE8rXCCYQv3fvFzp7tixjyPNMJiNaBjXGGOYApCBiAHtBA0BshOEWbM9QbuFHmBB+U4xUjgcZ61BzwdgADQjXbq+ZtqSMvQAEdEZBot0EUMIqIHDhhtgCgFBUwMUNxLiwpW+HBOgJFRBV0bYTQGmpVz9U0VzugGnLcoJr/zJpJRg5jPRBKqLoFIuFkH9NUHNwweLigsSSqhmqlugCoA5M8ccVndCRI59LZVMEFRBQCFBVfIKMVfoqBPcjTbE3CG770wnLo/tcFrcI4EfvSW48NUlBEIUZ0WxQnFSNwDeACgjgH+ZHP4DlMH78+InNTNCxi3lLO2YrOPzacgABk9Onz4jpkNPA2Ng4a/mHsaoBcFl//wGampqU/1OnzkgjgxIhATj2+j5K7/ebkUfTOjFsGB29KmYdG/MbCoRRlU0Hghbj6IpwCfbAaugHJu09l+7iLQJ8kCDEQehMD9OhqiGQoJ0KJJwJdKjqCebnz1+UPdirKqiuvZugiv+5gVctZ8T2aJIMAMNbt25vpib8C+sgGAFojkMLGhaA4Juc/M7YtjcwpI7r2pmwVbHINp5ewQRa4egVccgQxghAaB1dMe1KX++HQ+pviwBy5YpxHIdvIQTegErNiFx/A4ue/sN3hP2BK1zoYhJXiB3DwBwI9QJcMDk9DvHnNL0joOCYmPtybQM5LeHsFnUZ7QaOdsulob1707XoJTGwcWxDcBYoHmr83O12MQX+A8uiZuQI+KaTAAAAAElFTkSuQmCC","../assets/chain/1.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAecSURBVHgBzZl5bFTVHse/58xOZ0qpdHldaIVXllqesjzziPDg+dwwRFBDNGqMcYFWQvxDXCJCL1LcoiIBAQvRuETjhjERtz/QuAUVBBQUEK3ttHSlLdOZdmbucvzdS0u3mbbce61+ksnce+65557f+S3nd85hsJHbnzga8HS4c7jLnacKNo0xpAhV8wouIoAz7OTqAcQcDc9tyKmGjTBYZIVUN1NRtUWci8uFwAUCLI06n7RdIYTMGasSTFRxjb0F7tm9VcpsgAVMCXFz+S+pY5lviQbxEASmwAqMWhDsJcH4i89LOZ/DBOcsRJkUvIU+WkFfLoC9qNSbr1VVK9uxvuDIubw4YiFWVJwsUBXlFRJgHv5MSDNkkhvGnBYbN27Mbx3ZKyOgVKq5DYJvJov2YzQwTAwHucIXb92QGxyuOh+uQll5cB21+sKoCaAjjMGdIVzageVraucMV31ITZD9byHdrsBfCGMsokC9cYdU8H7SOskelK4NltNTCX8HGDo0qAsqpcLvEz9OwPK1wZX0t2moeD/aMIFmBxcXbZEmnBz4bJBP6FGIMfG4HQKMT3fi4n/5YAeCIUMBe1mSxKA+DypQZfVNknsMLEKDgCvnBnDRNB/SxzpgCxoWNGjB1QOL+wlRtrZOd+KLYQP5/3Dj3yVj4HIwXFDkAbfDMBkcjLMHyqTqiX2LzwpRWhHMpXzmHtiAz8tw3RVj4XKe6XlOphPn57thBxQtU4Rga/qW9WpCwbVUpQg2MHeWH1MKPWfvnaSNkskeeN32xAly1yV3SDUlPfd9zWkZbCBjnBOXzxk8L/p9HEUFNmkDSHOCLe25N4QolaoW0JPpsIjuzJddEkDAn9iRp07y2ObkTLBbV61qSNGvuzXhWgobmDbJi7kzkwc2t4thRrHXMC/riMJwqjpZv+oWQlwCi+j2vuh/qeDDhKHs8U7kZjlhC4p2jf7HVz5cM4ni71RYZGaJD+fnjszmL5xKTu6xQRscRnLI41wUkrt7YAF9dBdfmtavjEIhuqIaTocpfdNEv2eBFAemT7b0SQMahmL93+ngyB3wjXNriFq66r+pSPX3BrpQREVji4zmVgXHf48jFNaQeZ7DELZn7piY58avQRmt7SrMQt32P/hY+zinAC+GBQqpM7OKfdBoJEJhFXVNcbSd7u5Yt8VEujRU1WqobZSRk+EyhPGQk0+nmfyL/Z30Lswh4AvFwgVO+rifMXP26fNyLPl/KlpDKhqa44YQQyHLQPVJGfXNCsalcmSTQJMmuPELacsk1H8ty8k4fDBpTgU5bjIHBU2n5MQVkrQblwUaT6loalXJwTkcFNFUMzat51KMZTiFxrpMKoLsPYr2kIIZeqaaxhN9ZEginRrqGhRzAugI2iEBO8E5RxgmSQs4DJP65KsO7PuxC/H4CDojdLPS0HxKQSf5StZ4B5j5aKvQu1F9+H6ASfSoM5kSvVuXpKONFpAffhkm7cSQbGAN54+QAG0qsjNdmDc7BWHShjCtCBF1uVz1nDYWTG8hKqrAnr1hjKekb3VplrF+OHw8jk/3RtDe0d/JozGB+ibFmEAu/U8K5lzoxbGqmDEQZqFsNrRpdVYjaSJ6mFoOwSSyIvD6B21Q6H/pVWm49/YMMhEXPv4ygn2Ho2ijyNVEpqOP+Gya1RfO9yOTlq3BesWIVFYQ0L7V//l26Z9NJFMTLFBbL+Ptj9uN69wsF5bfcB790hEiE/u9VkYuLYqunudHUaHbiEStNI/sOxKFZTiM3Y8zmRjDLhLrfljgO3LsGcVRSie8hqOWFPmMJer+w52UvfbW003wwE9RMi/zZmR0mTHNpTg+0K+NuKiq4m1j49ACeud0begTXw+BMQ5kpPdfP5yoliklUWAd8fPm9XmH9CtDiB3rJ3xHByGmo1QPuu2/sbvN8JNENNLzQ0ej1karG4oPu3uue2cojW2GDfxwLIq9hyKDymM0h+wnR9c1ZgMtiux+pufmrBByNEL7TfgNNvD+ng5U1/VGHj3B+/m3mBGp7IB87sWdj2Y19tyfFeKFJ6d20MNyIaxrW0/FX9vdSqN/xnlrTsbx04kY7IE1qR2dT/Yt6ZfwbJPyX6XNqXdgAzU0B3z2bdiYHw4ejZmelQegcCEerXx6SkvfwkGLXS9S7ooiPJcus2GRj77oMHY39PWEPbBdWx/J2zSwdFDq+aw0rp1K76Y4bDkO6il3gy3h1JgXjoE5VyZ6lvCkaHt5/rtQRZlx7PT3oEZWlIXbpeyEmUXS465t6/N30i7Iur9eEFarMrZ4Z0VhVdIaw7SAZWuCdzoc2EqO6cIoQ6N3XKjRqysrin4dqt6IliNla4Lz6WiDDh8xEaPBGe3voZ3Jm5KZUP/qI2TZA61jmS+yhdq/gY5t/jytMJymWLaqUiJzHvEr50ipVL0IcEgU+GfBXuIUgt7TELm7Uuo/DwyH6dVt2brgQvITPeTNJ+VbOR7TO7yTMdeObVK2qbTH8oboyvLavLjQ5tFMfz0trufQaOYM9w4dIn5Dp6E/0m9XSiDv86fuYxFYwPYj3vufEIHOrvpcWRNFDEqOYDyL9raOMBWdqqIeREtLS2XlbGvr0gH8AbH79Q8JMunRAAAAAElFTkSuQmCC","../assets/chain/100000-1.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAdhSURBVHgB1VpLjBRFGP6qemaWZYEdYBeBiI6P6MZEA/EZjbrGqDHxedeoifGqHjzoZZeLJxM0Ho1RIPEqB+VmdiEmikF5HCQEYRbE8BDcF7C7zHT//n89umt6Z1/ssix/UlPVVX9X/1/VX/+jexQWkIiozNVmLhVX8nSQy4BS6iCWErHg3Vy2canS3KiPywdcKrgRJCvOpYfLIC0M9XF5G4tF/LD3F1D4PFW5bMb1IpmcywFaHPqGFlrNyK7+YlN1wYCQPbQ3ikRtX8N8iOy2LgV6C9dCdGN3oBl1z0V+AdBDS49EtSrN5FVNAAhjdSqAR4ZHcPLKFSSKQOZurjVMm9yMJGOOP9HSZ68pGCNteRMnQTZueVarEl4qrs8/foDLFvb4QzOBEAAVNKHdf5/BzuMnMZrUEGsRkLi2YKSdRDDXpq3IAAj7yPXFjreBz80l/cIn83/Ueg8+WnZPXozPGcSHU4JgAD1c9TYD8Pu5QXx5+BhG4loqiBE+okxwnQkg/RkfpaA9n29n/bCAohAU8Fnb/Xhj2W15cbaE8VchAFDh6u08dz1J8Of5UWw/WMXERIyi1uYBWiv78ATcloe6a6616xdhzJjiPhGOaw+alOWPPJDI8iUJpfN0FotYpYrN1nQbl2cmgWB6H03U6Ni/l7BzfxXDYzUUjKBeOHKCwwghOh4rJ4zOila2jsmtOG+fVn6lFRTzawGcwO2KLe3FEj5uuxevtGxoBkKCzm7ejf48iElO5cT5S/jul5MYvlzjHVDBatuVj/3KK8p2h6xwpCgV1IyRW2l3j9xrdifJ5pSFiRlUWbXgk/YuvLh8PaYhkbc/BUHWK1byXP9cHMPoEAOABRBHmRpku2GtU5yql1UnckC1By3CKrd7EVk1S1Rw2O0ubtCt+KSzC4+1rZlsdRrpLZa7VyyV34lXm3Hdv6kdbaUIY7U4M38yoI1hzUyme5oxp8j6KGwLj6iRMAR9IZ/039W6Eg8sb8csyCdg/crtxJRmdYnTF7wTH2iy8XsFNyc9LT+iTpWpOGSbx8djY/bgVWkaonxbNfZSXskDz+5pOZvVkprhNGRkEqiCbzSjY0dH8NOec5ioxyY8MI5ITfa21rzKYQ4cmcocGHmnl3d4KuS39e0r2/DuXXfg9hVtmA2Jf5t2JyZ4F8aHuRgQjd42duGB74sneWIvPBw4yvFkHjoOgBwaH8IOOok3766gsmI5ZkGVwnSjXfe1Y3Swjv37LmL8auJCAucbEmthjE8wNt+Z2MATy47pdJVVapL9PaZOKHCc1kT/cXbQWMT3uu5EZeWMO1LW040WixoPP74WDz+yFiWevFD3hcdqrh3bUuS27UPaV3B9xXp4b3ZdFF53XQzmlnuPXhjFV0dO4PzYOOYFwgApaTz6VAeeeGYdirzvxTqXmq0L5pofzNcFA0AbHiu8DgDoQFh3ryvFWjgezq845BnFp78dweDE1elEHChgFiSq8uATa1AfS3B43yAmeKtFj03Mo1VD2C0xUKThVMiqm4QXUcpneYUnjqzH1kmmTrHLTZJY5lM4OzyOn09fwEt3bsRURktASEg7Yw4rQB7qXouWlgj/nZ9IkyLyFkhZ3W/sg8sjkI17IZVPprhfvH+U9ScBvzx3c2cZ01jdIUX2zds3uEmJPbaSM9GPm5f65UczkAGuh3Bz0iH58Qd7O2xSNC0lbP5O/TqKi6euplGs0XlYh5Ym+zo7Hw3j2gYh4TlJz4fnd/f7tpyJJ+/rQGd5WTORdoUgds0EQqzFXz8M4+juIdRicrmFDydyuXLOOxu+KJdfq5DPhy+Nubj39h0rSuhoX5Y/3AMNmZ1c8AEXlSo3A0AM4Mzey6juGoEWe27Mq/PUznQarxtl5jYKMj+T2SUqEFqlAmd81tunSVSkTOJULhfRtWlVM+vU7xuhn/iCS88kAGz3z+29gmNfD0PXYPJs6TM+gs2i8oImljdN+sn7EWSxlQiWIHihYPuVSWdVtnvu/jUM4PVnN2Hd6qaqtNU3UnxkP1VVG3aDJzr74xUM7BjBVR87qckqk1cnr2JZYNgYHCbpqx40BpbS585E58YWPP/CRty6sWkQ+C1rzzuTdkJyVQYi6LYhgJgMJ1CXYF8UJEGyb4I75XReZeqkbf7sc3HtcuokCARtzk1pLh7m5xI43nJbK55+bj02bGjFFLQ1vGj2BrCPq25/HV8iHO/hqPJM3JAn+INNaajQGGb7l2ZpHpLLH7xRyF662f729SU89fI6rO5omcpLb+UF750JRIWrAwjUqj6SYOJ0PXjX6nj9takzE4uw3/8GT6JwDpWNS2vV2hJa26KpABxkAFswG5JQhJYeVWmuX474hl5aOiSv9a/tgyQtDSDXDmCJAKnSQn0S5oleo7n/Y2C+JJ+bK1hIkgm5fE+LQ724nkTWclXp+lAfLeZ/PRyYPpo/ycH9nOb6dTQghXmSWzn5NCBv1uUQlmdx2wBsFLqHy678h8S50rxB5ImsNREgFVdLGXDD/v9OC5pJ/g+ukFLnOSlhtQAAAABJRU5ErkJggg==","../assets/chain/100000.png":"/assets/png/100000-767bbc2b.png","../assets/chain/110000.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAxCAYAAACcXioiAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAa5SURBVHgBzVrbbxRVGP/O7La7pEs6b5hI2vqCiRcsD2pCFNsHSVBBfMBgjBETo0ZJxHDxEhJoQMRIYhGqRh+KUkOiD3LTB18o+AfQLTHxjS3xwTeW0GJLZ87x+76ZOTuzOzM7ly3wSzY7e/bMme93vus5ZwR0EKpsDtiGPShtOSCEMP3/CRA1BapWLBenRL1ehw5BQA4o0zTteXszKPUiKBjC0cwk9zEZBZNQhDPFWzdPQw5kIkAzLZX1PgqxLanQ0QI4ZApGYUTM12uQEqkIsIlIex8ItQ2WAkqcSEskMQG71IMzLvbnnfF2YI0IGCnO3zyRrH8bsJ3fssax52a4gxASRguLsx+07Rf3p2Pr9gWMHgNwF4DCTRmi+FKcSUUSuNvCeyCTMkRhOIpEKIF7RXgPTGJZYU1Y/gglYJcqlxXAoO7U3w/ii8MA165hKpoBmL7CH9W5fJQEk8WF2eHmxmJzg12u7MO4PBhoXPcUiE0v8KWfsZqeBqhdc76J1AxeV6dhiTB0u9Szo3thbtTfGNAAx3llXW251eyFwt9/8Xdb1G9oQkyGSF36EzoFWVRruufmprzfAQJ2afnVKLsXRw6Dsf29RgMKJg8eAujtBTHQD7D6URCrV0eS1NoiMvlMMGBKmoBVXr4Na5rxqLvEuqfB+ON3RxgUgn7TbMu33gF19nyjH5EY6GsQwmv+DoNfWzgmk8O2dsBEN9w1PzsZIBA3+x6IAAkuj48BnP0NjJ9P8YyTJtTBz6JvxD5Mgkh52qIJaAZpdf1zoGZmoA2CDr1YrgxZpYpq97F37lGM63VlrbhfWaseUhiVuEl+Nea0JRhHj/f4WiWrVRUAjmeverjtvSSzJmB1Lx9P9FAUkIQn2Lv2OG1IQguR8OEs/IqVSl68pCfE3rJVT0aScRZLlVEfgcr1xLN27Lgz4/hwf7s8NtZ4+BNr48dA4fzC0iR4kxEgET/O9VTmox/+7AatbboOkDhwqPGfp6Gw+10t8iQ0mx3+1holzcSQYDOi5JCGAAvqqp600SLgrj0NEgc+DfchEh41FjlJKLTWRAwJkh3w4te0BOw33w46c6nVObVzI1kyGc/0uG3Xh9oPSCNETP440erQ3kTsDNcmhv5xrnvSEgg4c9Ms64/fnt2+jOq0kmfOKVmrhQpLfQNEyEciopvdXblsYN0zAGlBCYxyAcLYuDG8D8Z0+8m1TpLzZ2fKAVhXiV6Tk5g6+ROgRkC+/ArIBx8B+76VjcRIY6zfEJncFO58CGICWUD10b//8CUnn4h6R7z2Khjff+skqWNjXNFC9UpkshLb3wXjyOd8jbbvlB0xMCArqAxwhRZ7P47u19/HX/LkBKjjX/PsRgqP2doTnjN7G+EJ2Ql4DwGnToqsVF0CcCO+xqE1h/HLKWdcJMqFYgIYtNqBjGANoGmwAKj6KMEY1ejZFKbpFIpEFmedfCIh6qgBlWtZRaZBCJTafriaUTEaEN994whPTrtlKySFUFAzbCGqkAOkbo4SVHGGVJiiz9VAlN2j//BqD8fgiONqNAmkgBkDlJyCPKCQOjGhhQmAZp8+RDAkFHLE2fuJIwyuK9IIT8Dyf9LAXeR8BAi4NmCBmpxZ23+IYM0Rx78oSgqS3eCVjYJcfqBXU9DkzG4EUjeCwwciDiWyhBEnMAYGH5Kdwygu0X6AnCBBCOzMnhb6XALTjZ2KQMSh5LY7ccQJPk/g9jx4eUBArj16HvDc+YYzb3S2YDQRn/0HIk5MmdD2eaB40pkAm5HLKDN89RGVD/z9mLuYd3OAjjgIDpcpndaDZz50rTMxFkQjkBMcUsFxZnboXlcDmAP8EUft/ihRmRD5HNGQVRPolBZ0Ubfp+UYZgabkjzhc1GXHpP/soHVnTlqX8xxi6P0j1x8YZCpIhkIllc15UBDFB/w71S2bu7eX9ewwpPgS8jyEyuzm4s5z2ox2T8C1y0jX7dn9/raWarT7v7lRqUSusOo5s0YHhEecbhaeEH4+AKYpS9YF/xZ7KvgWOwQymyyZ1gOf1CwrDoedDxjhN9TrxgLegDdCFvicOWuZ0JCFTmjwmCnicDz+jAw1YZcs2vBNfcDHoRRjforaPmQQPD8uRwvvdEkA3EDaj7X3PriDQPM92rUwu6Ndv8TnxLQLZigxvtTnZmQyUqg3vEzbvn9KkDaQyOsdJ4IVsTLgaLFcHE3zMkjmdyVssIfIrHITySi4h1xvqxB4gxVP8Q0JzyQNuxTdpAEXUfjTSU0lZqzOgV5LsOatQSEFFv1getrxdj6kLae6erpqnXxf6H/wTAJviDrqJwAAAABJRU5ErkJggg==","../assets/chain/56.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFMklEQVR4XtVbvW4TQRhMSWwipYYngCeACsp0pEsJFZTp8gapaXgD6F0gETsIWaRIARIopAAJJAcJCgq4s5M4/zE3l6y1nv253fXe2R5plOR2787f7PfN7u05c3MVIGksLiYbNx92W/XnaavWSFv1TrpZT7Kfg5xXv3fQhj7oi3P4OjOD7ub8ahZUexjguGzW271W/THfZ+qAkYsauMJaI3mzsMz3nThG0rky1jr8OSpHPuJ57fKHq4q1zkRKI9moP5nMqJtYoRBwZ/UDTAdLnzmma9RNLMkb8rRXbjadjF4OfINZIccRhFkaeebYmZCWNMV1390enOy9GAgc7j5T+kRkwnE5oUy3vzxLh8ELXPR/Kv1i0Xt2KCPte1t3OWYtyhLCqxzSyKl//GNdO+omQIQSysKtFGKO/tm/LY5tBEff1wenf17z4REcZ17B1w0llu4cr4I0wuizyelw9ndr2P+iv8fNI4iXDQWLpDRC8KApoMuzZND/uqb0Fzz59ZJPGSJiJphLQdM5mP3dpxxDlhm3lH7M3vs7fNpg/8OS0m8cctw5ktbCMnd0YT9LT8Dk3giIj4EHH5eGAeqEwXm64ygvAcws3O5CrRdc79UpnW1kkzvv7Th9KPYHV9c/+ramzCZBpdGst0eC93V+Dpyxv31POQfEqNrq3OYPmDFsOMxKjs+xsducXx0K4LuPZxKgyOQEdSbpMpI28XwFGMkCpbGALMB5d0c76vAHpCwWQrp6xqgeflpRju9v38/vgTWCrqRgsFwK3gK0JDPkhiKyAEdZgNxHNjnAZJJM2eQEdCJwFgULkLT9H3psAmCki6ALiAXTQe4fQ4D8Iel6Z1dptPEoq3MZsgAuDz3IBlxDnMOCmiB/BlkA/G6abm3Mp8Or11VqowsPPq/kN/cVIBTyvXFfmKLOW1yJ2IPmfyZMSfxelQCnWfD8ObzZrDWC1v+oVz4mWJUAMmGcOl8pZvZwFLLVjZrFqo+Pgy4mGAq+lyCmxBATTPFgpDlYSNm0TNOb7qEmBFhc8bVBni4DBRiMLQCgWweAwiRDgdWhyeSQgTLCBQgsARkmAQSLngEYLsGwsC7naJiXQEfTYKVNAJiR6ckOu0BFwPKYzxM7TPKxOALABAOmwSIBBE5+vxpxZ90mCUO+D2Yb+V5yWxQBMA2GLIRcBQBkk/QVgCG3xRAgXwiFLIV9BABE27QJsL9540H0h6FZEmD4xogbimgTAMTUJe/giOOhAug2RWMIEG0/AGbHfUAx9Ym/fQXAIkg3KyDL4m6IRNoSY9dn+grAxKwAU9XBWwB5Syz/YiN3sNAkgIBp9TaOANgms8FXAOVlqW8WgEUwZQPXLyC/KpOJrXAbcC0+p5CY/xkh06HLEtfkD7JJ6kwOPO9+ka6kQucPLuy9rT3i+HNwRx/a0pv7utIEk2Cu5LiHCHkwkmnKBtGOOjaVBcgbLQyku2+tq6zgDTGyQa5z+fhVIKOvwuQvUMjXEYA/hGx6qiwIHgjxAhMFxN9cJsgG8XJVgM8PMjkDFec3YdxSMJEF0IHPiUeH0RfwfVnqykkK4Dz6AiEPSS607RWaFlDj0vtrcgJlloJskjA53cvVOPRIfR3KKgfQ9C2QWPROexP4wrNCjmMslJkJsRlt5BlphEVS6dy0fA0uBsqaHWIw2O19cV0OHf4AE2M26qWlvQ2TF6LWyXd2J410EiKUXeshwEZDyJsmZzbr7akY8SJc/2NlWwkglFng2Lfk+8wM4M4YuW7T4d/nsz7oW5Wj/wdXGukMTSgLegAAAABJRU5ErkJggg==","../assets/chain/8453.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAxCAYAAACcXioiAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAoiSURBVHgBtVrbbx5XEZ85+13cpqQWLa1SRPKZW0mKFBdUUYSgibhUVEVyXoAnkgLiNYkEz2n+AZL+B414BKnmFRCYB8QTxVSoboOKnQZK1JTGTerG32XPdGbOZc+eXX+24/RIx7v77e45v9/MnJk5s0a4i23lfzQwY5i3ALNAdpDeQ4B1MmYZJrB2eA7X4C41hD201VWa3SxgwYB9CggXSIDvrK3xzMsE9rczZbE4N4frcIftjgisrNKgMHCagE7tAvRWANYBadGW5vydaGZXBETiIwMXBDh8BA2RXtwtkR0TuHyVTpOl56dJHP2frQYl/4dgalsjtOcPH+y8CDto2xJQqRcsdWqXugyA6E4MunPjrzEDbgV8cpxGRrTRK83Z7dbHVAJi62joT3w6aE5QgeX1AKYA6MjRd0fMD89o2TOBta6X0kt3DGSonckaWTw+zaRwt+ADcAEtvcPAuwK+g3oeCJhsZAXqwU9K6QRjOU7c9RQiU0ngbsELsE4HoMe9y6DlKNeBkAB7/zbAcExqHiJxAXVvn5/tAuybQf1twn3M4Mf83HDizsuESE6ib/HxNnPqtLIy9FIbeAHY5Tf6XekOkEh9cwzw3oaFd286qZaMIphKerT8e4/fu38fwtyBgkkxcNHc2BEejT0R2yAxGBaK6XgDa/7D61fpnHibOiFn3wJ+pofcQcHLJG+vW5Z4HbDlG2W4FkLkwJe1ZwAeecDAZx4pdNwRAx8OSYUxHjsN5ZowiBc/fxDPbknAm85qm+RF6vewGfR77nxjk7zESSdKpe06xcUqYEt+TolEQhWRIwMDhx4uVAObQ4DbI6eNFk2AXw9LkVRd0mr3NfAmk/wMg7/FEr9xy9m4ehx+MLjT2INs0C9OufRuk2rulOCVN0p4da1UwczMgM7T7TrBYWYjWNC5mlYS6Z+CFrsXGxfQwWxufkCwwQTQexoHnDyR9GVy9wKR4GX4OgUfFvnl/5Tw8r+YhAhLNC0EiqY34wGOrbw5OdUgwNI/l4MXCYiX6ffcghXVbo4pukmnIYznMlckFeejSuoePAXwQgQcGSHyxlusiSueBC92OZo2LYA5WSOwcpWO5dI3XvrB28gkt3mRVcB9AFPXikpEtIJyxJrEovSteicPnCrgYS1If+XfJbxz0+qcvZ6LMa1aWFXMjoCxcDKXfrD9rneVAr4QaXvQBSZBKxIR6VBcBzUOkUQgkoG3Fcm//HOic/fYxcpRTCnXginsyUiAX11ok74OUDiPEn4XaUciQQsmSSliKlFpQswlkLBqOtgA71yv086tDYIVNqVuEiSbWsAFydOMmE+aYQZvoimCZy/BJQcsJFz3UbhwZlQkawIyydddLCY5UVMjl/9rfeB0KUquAcG8CTDf4TeO1cIBVhqQHk0KnCsUMEjVsZZz+t9LU1981seJiY8Nk1q0ljiClUfypK9zgLz2roWP7zeVZj25CNXY+Q6iOZpGCwVb1BMyY6DhwzUGEKoLtTo4qv27Z1ADl4wV8iHJkQR4SBVq5iMkAPUYtcbHt/5P8InZxJ36WJJgPdrhpwepaoIrLIJXAXdOIamXiYiiKxSQCgKD3bt7Tu0OVEzcJlUmWlu4fqwgRz3yOO+8ZxlLER1GYxkQsgbYfVLGwCQmEMxHI6ofwngpR39uHJiwFpSUkBiRms1wJMma5DtOCzbbB1DULkEI3XL29g2bxBpqrANusx3KtoiYdZNGpahBrFRNWKUL3g2K9IXIaOzAS+oxHFXg1aw86jieF38IfLK+bmyQ29nhlhuXQSOdxuzil7/ZhJ22YKIxL+KjpNfob2L6QK1R/TTct9ngLa0zZSi9uPDrzTqyZKywZQyAK/dKmvw9uB9hcMDAA/cbzaeCy3WmiZVkMR3T7dzC+XaNCchWrVrIlPVDDxu4et3qgoYEeCplTIJYpyANgC71RjWh9zkBLPsur+oUIZr7tMRAIgSsAX+IiafFgJYKwBoPSfVtWura2L4fmyvUnaVSiskbBi/lpV+4yC27Lsmh5Dfx87KAjfdkpa4RjNEVrc+f/OSpVsKmiXyEbuKHdVY2/aOGP4macn7kUBFVHyJx2jXc+01910fvri5iJ2Hro21wo2M9p3guLnai3inZ1XkMn/ukiUEwLP608U9XZI7lTAG1LPErhzsOOFZViMJ3PecRAvgQvfW+t3UZr7TNKoQLbKTXablFg6BeI3zqIaME0/JL2gzQkiFrlts04CYBeOLRDjwZSJh6TqQLtkhLLD4/wiQXSgSi28qYSlR50CTLk+TZ/ft4DcwafWZiq6BXw8rYjewvUQqsqWooqN1NeOLr3Qo4tiRyJkutjctagzFTzP8xStPVgrCRXoeC1zeOdn0Ed/GjrdQi2I2TEl2CzI40b/G2+72v9uDIwcKl0x54MzuF2k4tLnpNEai+obEhwasqFaWm2W6xStnl6KeLuG5CYSBtnLIsOTNyqlhsaMDnLxJNhcwvfjgzfUPj02iT7JUhW1dBE2VCorYr8/0nz/RVeKORW+xt5sNV7EuRgJYpEJZyEvLycOz645/twM+/P1PtvFLQiMmODKqoC4nnyLNZgjoJ37/5pQ587F7UssowlB0ttJpPJKDjl3g+fSLUenSgkfPlPzjeg58920+AQyw3YtY9Dz8YNrJPG82q0sK3v9xlAt045zjUhjL0Un4P55FAmxbIewwBv+lJ/Pi7ffjpMz1PgFT6OfgQnauKShVG05qQC5bu+uknuvAtJpDOpYs3lz5jTL8d1HIhU+JZa+jvkQA4yYgpOUAuITr5dB8OcFnw0u+GnPJSixawLjZyqXhYC2FHJ3sIKfr+6DtdeOxQR0FL8WBzBJXtZ/jZUp6r88naa6vlGUZzofaQD2Ja6ui6Kp0UnmTD8avfj+APf5s4bST7ZZO52MKEgoC7vu8ehK99sYBnn+zpvncUJD9yddL2siLx56fi+akEpL3+pn2JX17IHwylFiXRlZKLK3sIkb++WsIfXx7D2rXSudoiqVTEZA81NTl8yKi5SPFKvc242vSEIEcNtwmLjx40J3KsrQSkXDF0ddL5/GE01UeNUGpPP27c5qLv6jXLpAiuM7H7+HuASPvBWdTMVrSXRvpRKKuX3t/b1qRtmb8PHG/7PrBlxj3t81Lw9yEfcl9opARfmUjqjVK3OfEpxdgTKEuobTNb2u6/0IS2lSbCi5gEMw1sRWUymGzC1Qcl7rL2ncBWe+IWdEv9Ek/MTfnQN5VAaK9dKS/yo6e3HASbe4RGISoLZFt8SqqapRe+MFecgW3ajghIk/K7r2APth0QmwMH8DtoYjLPpR8xtp1vp03/NwLsGd5BnYO73CQj5sD2AicrF+d28b8TuyIQmi5wsAtsN2JWA9hDu1Pgyft7a1Kn92SegpbFvkVbZhv/M4e+xZ2aylZtzwTS5kwM5tkBzVopmBk70BvWrMmBndQyh421uT38e03ePgTahINQ5kmF7gAAAABJRU5ErkJggg=="})[`../assets/chain/${e}.png`],self.location).href},p3=e=>{var t,n;return f3&&!f3.length&&(f3=JSON.parse(localStorage.getItem("chain_config_info")||"[]")),(null==(t=null==f3?void 0:f3.find((t=>t.chain_id==e)))?void 0:t.chain_name)||(null==(n=y3(Number(e)))?void 0:n.name)},m3=e=>lr()===ar.LIGHT?new URL(Object.assign({"../assets/scan/100000_light.svg":Q2,"../assets/scan/110000_light.svg":e3,"../assets/scan/196_light.svg":t3,"../assets/scan/1_light.svg":n3,"../assets/scan/56_light.svg":r3,"../assets/scan/8453_light.svg":i3})[`../assets/scan/${e}_light.svg`],self.location).href:new URL(Object.assign({"../assets/scan/1.svg":"/assets/svg/1-27a19b80.svg","../assets/scan/100000.svg":"/assets/svg/100000-ae78b464.svg","../assets/scan/100000_light.svg":Q2,"../assets/scan/110000.svg":"/assets/svg/110000-9af49ee1.svg","../assets/scan/110000_light.svg":e3,"../assets/scan/196.svg":"/assets/svg/196-5d1f88f3.svg","../assets/scan/196_light.svg":t3,"../assets/scan/1_light.svg":n3,"../assets/scan/56.svg":"/assets/svg/1-27a19b80.svg","../assets/scan/56_light.svg":r3,"../assets/scan/8453.svg":"/assets/svg/1-27a19b80.svg","../assets/scan/8453_light.svg":i3})[`../assets/scan/${e}.svg`],self.location).href;function g3(e){switch(e){case 1:return"Ethereum";case 1e5:return"Solana";case 8453:return"BASE";case 11e4:return"TRX";case 56:return"BNB";case 196:return"OKB"}}function v3(e){switch(e){case 1:return"Ethereum";case 1e5:return"Solana";case 8453:return"BASE";case 11e4:return"TRON";case 56:return"BSC";case 196:return"XLayer"}}function y3(e){switch(e){case 1:return{name:"ETH",logo:h3(1)};case 8453:return{name:"BASE",logo:h3(8453)};case 1e5:return{name:"SOL",logo:h3(1e5)};case 11e4:return{name:"TRON",logo:h3(11e4)};case196:return{name:"OKB",logo:h3(196)};case 56:return{name:"BSC",logo:h3(56)};case 0:return{name:"ALL",logo:h3(0)};default:return{name:"Unknown",logo:""}}}function b3(e){return/^https?:\/\//i.test(e)?e:`https://file.dexx.ai/${e}`}const x3=(e,t)=>{let n=Number(e),r=localStorage.getItem("i18nextLng")||"zh";switch(n){case 1:window.open(`https://etherscan.io/tx/${t}`);break;case 1e5:window.open(`https://solscan.io/tx/${t}`);break;case 8453:window.open(`https://basescan.org/tx/${t}`);break;case 11e4:window.open(`https://tronscan.org/#/transaction/${t}`);break;case 196:window.open(`https://www.oklink.com${"zh"===r?"/zh-hans":"en"===r?"":"uf"===r?"/zh-hant":"/ko"}/x-layer/tx/${t}`);break;case 56:window.open(`https://bscscan.com/tx/${t}`)}},_3=(e,t)=>{let n=Number(e),r=localStorage.getItem("i18nextLng")||"zh";switch(n){case 1:window.open(`https://etherscan.io/address/${t}`);break;case 1e5:window.open(`https://solscan.io/account/${t}`);break;case 8453:window.open(`https://basescan.org/address/${t}`);break;case 11e4:window.open(`https://tronscan.org/#/address/${t}`);break;case 196:window.open(`https://www.oklink.com${"zh"===r?"/zh-hans":"en"===r?"":"uf"===r?"/zh-hant":"/ko"}/x-layer/address/${t}`);break;case 56:window.open(`https://bscscan.com/address/${t}`)}},w3=e=>(null==f3?void 0:f3.length)?f3.find((t=>t.chain_id==e)):(f3=JSON.parse(localStorage.getItem("configData")||"{}")||[],void setTimeout((()=>{w3(e)}),1e3));function C3(e){if("string"!=typeof e)return"";const t=Array.from(e);return t.length<=4?e:t.slice(0,2).join("")+"..."+t.slice(-1).join("")}function k3(e){if("string"!=typeof e)return"";const t=Array.from(e);return t.length<=10?e:t.slice(0,4).join("")+"..."+t.slice(-4).join("")}function S3(e,t,n){const r=new Map(t.map((e=>[e.wallet_group_id,e])));return e.map((e=>r.get(e))).filter(Boolean).flatMap((e=>{var t;return(null==(t=e.user_wallets)?void 0:t.filter((e=>e.chain_id==n)).map((e=>e.user_wallet_address)))||[]}))}function E3(e){switch(Number(e)){case 1:case 8453:return"ETH";case 1e5:return"SOL";case 11e4:return"TRX";case 56:return"BNB";case 196:return"OKB"}}var A3={exports:{}};
  8. */function j5(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=F5(n)),o+=r;(n=7-(r=(s=e[t])+"").length)&&(o+=F5(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function O5(e,t,n){if(e!==~~e||e<t||e>n)throw Error(p5+e)}function N5(e,t,n,r){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=b5(10,7-t),a=e[i]%o|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(e[i+1]/o/100|0)==b5(10,t-2)-1||(a==o/2||0==a)&&!(e[i+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(r||n<4)&&9999==a||!r&&n>3&&4999==a):s=((r||n<4)&&a+1==o||!r&&n>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==b5(10,t-3)-1,s}function T5(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=l5.indexOf(e.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}A5.absoluteValue=A5.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),M5(e)},A5.ceil=function(){return M5(new this.constructor(this),this.e+1,2)},A5.clampedTo=A5.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(p5+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},A5.comparedTo=A5.cmp=function(e){var t,n,r,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!s||!a)return l&&c?l!==c?l:s===a?0:!s^l<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?l:a[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(t=0,n=(r=s.length)<(i=a.length)?r:i;t<n;++t)if(s[t]!==a[t])return s[t]>a[t]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1},A5.cosine=A5.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())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/X5(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=Z5(e,1,t.times(i),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}(r,K5(r,n)),r.precision=e,r.rounding=t,M5(2==$3||3==$3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},A5.cubeRoot=A5.cbrt=function(){var e,t,n,r,i,o,s,a,l,c,u=this,d=u.constructor;if(!u.isFinite()||u.isZero())return new d(u);for(f5=!1,(o=u.s*b5(u.s*u,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(n=j5(u.d),(o=((e=u.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=b5(n,1/3),e=y5((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),s=(e=d.precision)+3;;)if(c=(l=(a=r).times(a).times(a)).plus(u),r=P5(c.plus(u).times(a),c.plus(l),s+2,1),j5(a.d).slice(0,s)===(n=j5(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(M5(r,e+1,1),t=!r.times(r).times(r).eq(u));break}if(!i&&(M5(a,e+1,0),a.times(a).times(a).eq(u))){r=a;break}s+=4,i=1}return f5=!0,M5(r,e,d.rounding,t)},A5.decimalPlaces=A5.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-y5(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},A5.dividedBy=A5.div=function(e){return P5(this,new this.constructor(e))},A5.dividedToIntegerBy=A5.divToInt=function(e){var t=this.constructor;return M5(P5(this,new t(e),0,1,1),t.precision,t.rounding)},A5.equals=A5.eq=function(e){return 0===this.cmp(e)},A5.floor=function(){return M5(new this.constructor(this),this.e+1,3)},A5.greaterThan=A5.gt=function(e){return this.cmp(e)>0},A5.greaterThanOrEqualTo=A5.gte=function(e){var t=this.cmp(e);return 1==t||0===t},A5.hyperbolicCosine=A5.cosh=function(){var e,t,n,r,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/X5(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=Z5(s,1,o.times(t),new s(1),!0);for(var l,c=e,u=new s(8);c--;)l=o.times(o),o=a.minus(l.times(u.minus(l.times(u))));return M5(o,s.precision=n,s.rounding=r,!0)},A5.hyperbolicSine=A5.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=Z5(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=Z5(o,2,i=i.times(1/X5(5,e)),i,!0);for(var s,a=new o(5),l=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(c))))}return o.precision=t,o.rounding=n,M5(i,t,n,!0)},A5.hyperbolicTangent=A5.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,P5(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},A5.inverseCosine=A5.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return-1!==n?0===n?e.isNeg()?D5(t,r,i):new t(0):new t(NaN):e.isZero()?D5(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))},A5.inverseHyperbolicCosine=A5.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,f5=!1,n=n.times(n).minus(1).sqrt().plus(n),f5=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},A5.inverseHyperbolicSine=A5.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,f5=!1,n=n.times(n).plus(1).sqrt().plus(n),f5=!0,r.precision=e,r.rounding=t,n.ln())},A5.inverseHyperbolicTangent=A5.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?M5(new o(i),e,t,!0):(o.precision=n=r-i.e,i=P5(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},A5.inverseSine=A5.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=D5(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},A5.inverseTangent=A5.atan=function(){var e,t,n,r,i,o,s,a,l,c=this,u=c.constructor,d=u.precision,f=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);if(c.abs().eq(1)&&d+4<=E5)return(s=D5(u,d+4,f).times(.25)).s=c.s,s}else{if(!c.s)return new u(NaN);if(d+4<=E5)return(s=D5(u,d+4,f).times(.5)).s=c.s,s}for(u.precision=a=d+10,u.rounding=1,e=n=Math.min(28,a/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(f5=!1,t=Math.ceil(a/7),r=1,l=c.times(c),s=new u(c),i=c;-1!==e;)if(i=i.times(l),o=s.minus(i.div(r+=2)),i=i.times(l),void 0!==(s=o.plus(i.div(r+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<<n-1)),f5=!0,M5(s,u.precision=d,u.rounding=f,!0)},A5.isFinite=function(){return!!this.d},A5.isInteger=A5.isInt=function(){return!!this.d&&y5(this.e/7)>this.d.length-2},A5.isNaN=function(){return!this.s},A5.isNegative=A5.isNeg=function(){return this.s<0},A5.isPositive=A5.isPos=function(){return this.s>0},A5.isZero=function(){return!!this.d&&0===this.d[0]},A5.lessThan=A5.lt=function(e){return this.cmp(e)<0},A5.lessThanOrEqualTo=A5.lte=function(e){return this.cmp(e)<1},A5.logarithm=A5.log=function(e){var t,n,r,i,o,s,a,l,c=this,u=c.constructor,d=u.precision,f=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new u(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(f5=!1,s=G5(c,a=d+5),r=t?R5(u,a+10):G5(e,a),N5((l=P5(s,r,a,1)).d,i=d,f))do{if(s=G5(c,a+=10),r=t?R5(u,a+10):G5(e,a),l=P5(s,r,a,1),!o){+j5(l.d).slice(i+1,i+15)+1==1e14&&(l=M5(l,d+1,0));break}}while(N5(l.d,i+=10,f));return f5=!0,M5(l,d,f)},A5.minus=A5.sub=function(e){var t,n,r,i,o,s,a,l,c,u,d,f,h=this,p=h.constructor;if(e=new p(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new p(e.d||h.s!==e.s?h:NaN):e=new p(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,f=e.d,a=p.precision,l=p.rounding,!c[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!c[0])return new p(3===l?-0:0);e=new p(h)}return f5?M5(e,a,l):e}if(n=y5(e.e/7),u=y5(h.e/7),c=c.slice(),o=u-n){for((d=o<0)?(t=c,o=-o,s=f.length):(t=f,n=u,s=c.length),o>(r=Math.max(Math.ceil(a/7),s)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=c.length)<(s=f.length))&&(s=r),r=0;r<s;r++)if(c[r]!=f[r]){d=c[r]<f[r];break}o=0}for(d&&(t=c,c=f,f=t,e.s=-e.s),s=c.length,r=f.length-s;r>0;--r)c[s++]=0;for(r=f.length;r>o;){if(c[--r]<f[r]){for(i=r;i&&0===c[--i];)c[i]=9999999;--c[i],c[r]+=k5}c[r]-=f[r]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=L5(c,n),f5?M5(e,a,l):e):new p(3===l?-0:0)},A5.modulo=A5.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]?M5(new r(n),r.precision,r.rounding):(f5=!1,9==r.modulo?(t=P5(n,e.abs(),0,3,1)).s*=e.s:t=P5(n,e,0,r.modulo,1),t=t.times(e),f5=!0,n.minus(t))},A5.naturalExponential=A5.exp=function(){return U5(this)},A5.naturalLogarithm=A5.ln=function(){return G5(this)},A5.negated=A5.neg=function(){var e=new this.constructor(this);return e.s=-e.s,M5(e)},A5.plus=A5.add=function(e){var t,n,r,i,o,s,a,l,c,u,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return d.s&&e.s?d.d||(e=new f(e.d||d.s===e.s?d:NaN)):e=new f(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(c=d.d,u=e.d,a=f.precision,l=f.rounding,!c[0]||!u[0])return u[0]||(e=new f(d)),f5?M5(e,a,l):e;if(o=y5(d.e/7),r=y5(e.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,s=u.length):(n=u,r=o,s=c.length),i>(s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((s=c.length)-(i=u.length)<0&&(i=s,n=u,u=c,c=n),t=0;i;)t=(c[--i]=c[i]+u[i]+t)/k5|0,c[i]%=k5;for(t&&(c.unshift(t),++r),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=L5(c,r),f5?M5(e,a,l):e},A5.precision=A5.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(p5+e);return n.d?(t=B5(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},A5.round=function(){var e=this,t=e.constructor;return M5(new t(e),e.e+1,t.rounding)},A5.sine=A5.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())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Z5(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:0|n,t=t.times(1/X5(5,n)),t=Z5(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}(r,K5(r,n)),r.precision=e,r.rounding=t,M5($3>2?n.neg():n,e,t,!0)):new r(NaN)},A5.squareRoot=A5.sqrt=function(){var e,t,n,r,i,o,s=this,a=s.d,l=s.e,c=s.s,u=s.constructor;if(1!==c||!a||!a[0])return new u(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);for(f5=!1,0==(c=Math.sqrt(+s))||c==1/0?(((t=j5(a)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=y5((l+1)/2)-(l<0||l%2),r=new u(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new u(c.toString()),n=(l=u.precision)+3;;)if(r=(o=r).plus(P5(s,o,n+2,1)).times(.5),j5(o.d).slice(0,n)===(t=j5(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(M5(r,l+1,1),e=!r.times(r).eq(s));break}if(!i&&(M5(o,l+1,0),o.times(o).eq(s))){r=o;break}n+=4,i=1}return f5=!0,M5(r,l,u.rounding,e)},A5.tangent=A5.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()).s=1,n=P5(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,M5(2==$3||4==$3?n.neg():n,e,t,!0)):new r(NaN)},A5.times=A5.mul=function(e){var t,n,r,i,o,s,a,l,c,u=this,d=u.constructor,f=u.d,h=(e=new d(e)).d;if(e.s*=u.s,!(f&&f[0]&&h&&h[0]))return new d(!e.s||f&&!f[0]&&!h||h&&!h[0]&&!f?NaN:f&&h?0*e.s:e.s/0);for(n=y5(u.e/7)+y5(e.e/7),(l=f.length)<(c=h.length)&&(o=f,f=h,h=o,s=l,l=c,c=s),o=[],r=s=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)a=o[i]+h[r]*f[i-r-1]+t,o[i--]=a%k5|0,t=a/k5|0;o[i]=(o[i]+t)%k5|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=L5(o,n),f5?M5(e,d.precision,d.rounding):e},A5.toBinary=function(e,t){return Y5(this,2,e,t)},A5.toDecimalPlaces=A5.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(O5(e,0,a5),void 0===t?t=r.rounding:O5(t,0,8),M5(n,e+n.e+1,t))},A5.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=I5(r,!0):(O5(e,0,a5),void 0===t?t=i.rounding:O5(t,0,8),n=I5(r=M5(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},A5.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=I5(i):(O5(e,0,a5),void 0===t?t=o.rounding:O5(t,0,8),n=I5(r=M5(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},A5.toFraction=function(e){var t,n,r,i,o,s,a,l,c,u,d,f,h=this,p=h.d,m=h.constructor;if(!p)return new m(h);if(c=n=new m(1),r=l=new m(0),s=(o=(t=new m(r)).e=B5(p)-h.e-1)%7,t.d[0]=b5(10,s<0?7+s:s),null==e)e=o>0?t:c;else{if(!(a=new m(e)).isInt()||a.lt(c))throw Error(p5+a);e=a.gt(t)?o>0?t:c:a}for(f5=!1,a=new m(j5(p)),u=m.precision,m.precision=o=7*p.length*2;d=P5(a,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(d.times(i)),l=i,i=t,t=a.minus(d.times(i)),a=i;return i=P5(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=h.s,f=P5(c,r,o,1).minus(h).abs().cmp(P5(l,n,o,1).minus(h).abs())<1?[c,r]:[l,n],m.precision=u,f5=!0,f},A5.toHexadecimal=A5.toHex=function(e,t){return Y5(this,16,e,t)},A5.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:O5(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(f5=!1,n=P5(n,e,0,t,1).times(e),f5=!0,M5(n)):(e.s=n.s,n=e),n},A5.toNumber=function(){return+this},A5.toOctal=function(e,t){return Y5(this,8,e,t)},A5.toPower=A5.pow=function(e){var t,n,r,i,o,s,a=this,l=a.constructor,c=+(e=new l(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new l(b5(+a,c));if((a=new l(a)).eq(1))return a;if(r=l.precision,o=l.rounding,e.eq(1))return M5(a,r,o);if((t=y5(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=H5(l,a,n,r),e.s<0?new l(1).div(i):M5(i,r,o);if((s=a.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(t=0!=(n=b5(+a,c))&&isFinite(n)?new l(n+"").e:y5(c*(Math.log("0."+j5(a.d))/Math.LN10+a.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?s/0:0):(f5=!1,l.rounding=a.s=1,n=Math.min(12,(t+"").length),(i=U5(e.times(G5(a,r+n)),r)).d&&N5((i=M5(i,r+5,1)).d,r,o)&&(t=r+10,+j5((i=M5(U5(e.times(G5(a,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=M5(i,r+1,0))),i.s=s,f5=!0,l.rounding=o,M5(i,r,o))},A5.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=I5(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(O5(e,1,a5),void 0===t?t=i.rounding:O5(t,0,8),n=I5(r=M5(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},A5.toSignificantDigits=A5.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(O5(e,1,a5),void 0===t?t=n.rounding:O5(t,0,8)),M5(new n(this),e,t)},A5.toString=function(){var e=this,t=e.constructor,n=I5(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},A5.truncated=A5.trunc=function(){return M5(new this.constructor(this),this.e+1,1)},A5.valueOf=A5.toJSON=function(){var e=this,t=e.constructor,n=I5(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var P5=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s,a,l){var c,u,d,f,h,p,m,g,v,y,b,x,_,w,C,k,S,E,A,j,O=r.constructor,N=r.s==i.s?1:-1,T=r.d,P=i.d;if(!(T&&T[0]&&P&&P[0]))return new O(r.s&&i.s&&(T?!P||T[0]!=P[0]:P)?T&&0==T[0]||!P?0*N:N/0:NaN);for(l?(h=1,u=r.e-i.e):(l=k5,h=7,u=y5(r.e/h)-y5(i.e/h)),A=P.length,S=T.length,y=(v=new O(N)).d=[],d=0;P[d]==(T[d]||0);d++);if(P[d]>(T[d]||0)&&u--,null==o?(w=o=O.precision,s=O.rounding):w=a?o+(r.e-i.e)+1:o,w<0)y.push(1),p=!0;else{if(w=w/h+2|0,d=0,1==A){for(f=0,P=P[0],w++;(d<S||f)&&w--;d++)C=f*l+(T[d]||0),y[d]=C/P|0,f=C%P|0;p=f||d<S}else{for((f=l/(P[0]+1)|0)>1&&(P=e(P,f,l),T=e(T,f,l),A=P.length,S=T.length),k=A,x=(b=T.slice(0,A)).length;x<A;)b[x++]=0;(j=P.slice()).unshift(0),E=P[0],P[1]>=l/2&&++E;do{f=0,(c=t(P,b,A,x))<0?(_=b[0],A!=x&&(_=_*l+(b[1]||0)),(f=_/E|0)>1?(f>=l&&(f=l-1),1==(c=t(m=e(P,f,l),b,g=m.length,x=b.length))&&(f--,n(m,A<g?j:P,g,l))):(0==f&&(c=f=1),m=P.slice()),(g=m.length)<x&&m.unshift(0),n(b,m,x,l),-1==c&&(c=t(P,b,A,x=b.length))<1&&(f++,n(b,A<x?j:P,x,l)),x=b.length):0===c&&(f++,b=[0]),y[d++]=f,c&&b[0]?b[x++]=T[k]||0:(b=[T[k]],x=1)}while((k++<S||void 0!==b[0])&&w--);p=void 0!==b[0]}y[0]||y.shift()}if(1==h)v.e=u,Y3=p;else{for(d=1,f=y[0];f>=10;f/=10)d++;v.e=d+u*h-1,M5(v,a?o+v.e+1:o,s,p)}return v}}();function M5(e,t,n,r){var i,o,s,a,l,c,u,d,f,h=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,a=d[0];a>=10;a/=10)i++;if((o=t-i)<0)o+=7,s=t,l=(u=d[f=0])/b5(10,i-s-1)%10|0;else if((f=Math.ceil((o+1)/7))>=(a=d.length)){if(!r)break e;for(;a++<=f;)d.push(0);u=l=0,i=1,s=(o%=7)-7+1}else{for(u=a=d[f],i=1;a>=10;a/=10)i++;l=(s=(o%=7)-7+i)<0?0:u/b5(10,i-s-1)%10|0}if(r=r||t<0||void 0!==d[f+1]||(s<0?u:u%b5(10,i-s-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?s>0?u/b5(10,i-s):0:d[f-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=b5(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,a=1,f--):(d.length=f+1,a=b5(10,7-o),d[f]=s>0?(u/b5(10,i-s)%b5(10,s)|0)*a:0),c)for(;;){if(0==f){for(o=1,s=d[0];s>=10;s/=10)o++;for(s=d[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,d[0]==k5&&(d[0]=1));break}if(d[f]+=a,d[f]!=k5)break;d[f--]=0,a=1}for(o=d.length;0===d[--o];)d.pop()}return f5&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function I5(e,t,n){if(!e.isFinite())return W5(e);var r,i=e.e,o=j5(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+F5(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+F5(-i-1)+o,n&&(r=n-s)>0&&(o+=F5(r))):i>=s?(o+=F5(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+F5(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=F5(r))),o}function L5(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function R5(e,t,n){if(t>S5)throw f5=!0,n&&(e.precision=n),Error(m5);return M5(new e(c5),t,1,!0)}function D5(e,t,n){if(t>E5)throw Error(m5);return M5(new e(u5),t,n,!0)}function B5(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function F5(e){for(var t="";e--;)t+="0";return t}function H5(e,t,n,r){var i,o=new e(1),s=Math.ceil(r/7+4);for(f5=!1;;){if(n%2&&$5((o=o.times(t)).d,s)&&(i=!0),0===(n=y5(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}$5((t=t.times(t)).d,s)}return f5=!0,o}function z5(e){return 1&e.d[e.d.length-1]}function V5(e,t,n){for(var r,i,o=new e(t[0]),s=0;++s<t.length;){if(!(i=new e(t[s])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function U5(e,t){var n,r,i,o,s,a,l,c=0,u=0,d=0,f=e.constructor,h=f.rounding,p=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(null==t?(f5=!1,l=p):l=t,a=new f(.03125);e.e>-2;)e=e.times(a),d+=5;for(l+=r=Math.log(b5(2,d))/Math.LN10*2+5|0,n=o=s=new f(1),f.precision=l;;){if(o=M5(o.times(e),l,1),n=n.times(++u),j5((a=s.plus(P5(o,n,l,1))).d).slice(0,l)===j5(s.d).slice(0,l)){for(i=d;i--;)s=M5(s.times(s),l,1);if(null!=t)return f.precision=p,s;if(!(c<3&&N5(s.d,l-r,h,c)))return M5(s,f.precision=p,h,f5=!0);f.precision=l+=10,n=o=a=new f(1),u=0,c++}s=a}}function G5(e,t){var n,r,i,o,s,a,l,c,u,d,f,h=1,p=e,m=p.d,g=p.constructor,v=g.rounding,y=g.precision;if(p.s<0||!m||!m[0]||!p.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=p.s?NaN:m?0:p);if(null==t?(f5=!1,u=y):u=t,g.precision=u+=10,r=(n=j5(m)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=R5(g,u+2,y).times(o+""),p=G5(new g(r+"."+n.slice(1)),u-10).plus(c),g.precision=y,null==t?M5(p,y,v,f5=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=j5((p=p.times(e)).d)).charAt(0),h++;for(o=p.e,r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1)),d=p,l=s=p=P5(p.minus(1),p.plus(1),u,1),f=M5(p.times(p),u,1),i=3;;){if(s=M5(s.times(f),u,1),j5((c=l.plus(P5(s,new g(i),u,1))).d).slice(0,u)===j5(l.d).slice(0,u)){if(l=l.times(2),0!==o&&(l=l.plus(R5(g,u+2,y).times(o+""))),l=P5(l,new g(h),u,1),null!=t)return g.precision=y,l;if(!N5(l.d,u-10,v,a))return M5(l,g.precision=y,v,f5=!0);g.precision=u+=10,c=s=p=P5(d.minus(1),d.plus(1),u,1),f=M5(p.times(p),u,1),i=a=1}l=c,i+=2}}function W5(e){return String(e.s*e.s/0)}function q5(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;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),f5&&(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 Z5(e,t,n,r,i){var o,s,a,l,c=e.precision,u=Math.ceil(c/7);for(f5=!1,l=n.times(n),a=new e(r);;){if(s=P5(a.times(l),new e(t++*t++),c,1),a=i?r.plus(s):r.minus(s),r=P5(s.times(l),new e(t++*t++),c,1),void 0!==(s=a.plus(r)).d[u]){for(o=u;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=r,r=s,s=o}return f5=!0,s.d.length=u+1,s}function X5(e,t){for(var n=e;--t;)n*=e;return n}function K5(e,t){var n,r=t.s<0,i=D5(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return $3=r?4:1,t;if((n=t.divToInt(i)).isZero())$3=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return $3=z5(n)?r?2:3:r?4:1,t;$3=z5(n)?r?1:4:r?3:2}return t.minus(i).abs()}function Y5(e,t,n,r){var i,o,s,a,l,c,u,d,f,h=e.constructor,p=void 0!==n;if(p?(O5(n,1,a5),void 0===r?r=h.rounding:O5(r,0,8)):(n=h.precision,r=h.rounding),e.isFinite()){for(p?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(s=(u=I5(e)).indexOf("."))>=0&&(u=u.replace(".",""),(f=new h(1)).e=u.length-s,f.d=T5(I5(f),10,i),f.e=f.d.length),o=l=(d=T5(u,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(s<0?o--:((e=new h(e)).d=d,e.e=o,d=(e=P5(e,f,n,r,0,i)).d,o=e.e,c=Y3),s=d[n],a=i/2,c=c||void 0!==d[n+1],c=r<4?(void 0!==s||c)&&(0===r||r===(e.s<0?3:2)):s>a||s===a&&(4===r||c||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,c)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,u="";s<l;s++)u+=l5.charAt(d[s]);if(p){if(l>1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)u+="0";for(l=(d=T5(u,i,t)).length;!d[l-1];--l);for(s=1,u="1.";s<l;s++)u+=l5.charAt(d[s])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>l)for(o-=l;o--;)u+="0";else o<l&&(u=u.slice(0,o)+"."+u.slice(o))}else u=p?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=W5(e);return e.s<0?"-"+u:u}function $5(e,t){if(e.length>t)return e.length=t,!0}function J5(e){return new this(e).abs()}function Q5(e){return new this(e).acos()}function e4(e){return new this(e).acosh()}function t4(e,t){return new this(e).plus(t)}function n4(e){return new this(e).asin()}function r4(e){return new this(e).asinh()}function i4(e){return new this(e).atan()}function o4(e){return new this(e).atanh()}function s4(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?D5(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=D5(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(P5(e,t,o,1)),t=D5(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(P5(e,t,o,1)):(n=D5(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function a4(e){return new this(e).cbrt()}function l4(e){return M5(e=new this(e),e.e+1,2)}function c4(e,t,n){return new this(e).clamp(t,n)}function u4(e){if(!e||"object"!=typeof e)throw Error(h5+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,a5,"rounding",0,8,"toExpNeg",-s5,0,"toExpPos",0,s5,"maxE",0,s5,"minE",-s5,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=d5[n]),void 0!==(r=e[n])){if(!(y5(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(p5+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=d5[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(p5+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(g5);this[n]=!0}else this[n]=!1}return this}function d4(e){return new this(e).cos()}function f4(e){return new this(e).cosh()}function h4(e,t){return new this(e).div(t)}function p4(e){return new this(e).exp()}function m4(e){return M5(e=new this(e),e.e+1,3)}function g4(){var e,t,n=new this(0);for(f5=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return f5=!0,new this(1/0);n=t}return f5=!0,n.sqrt()}function v4(e){return e instanceof B4||e&&e.toStringTag===v5||!1}function y4(e){return new this(e).ln()}function b4(e,t){return new this(e).log(t)}function x4(e){return new this(e).log(2)}function _4(e){return new this(e).log(10)}function w4(){return V5(this,arguments,-1)}functionC4(){return V5(this,arguments,1)}function k4(e,t){return new this(e).mod(t)}function S4(e,t){return new this(e).mul(t)}function E4(e,t){return new this(e).pow(t)}function A4(e){var t,n,r,i,o=0,s=new this(1),a=[];if(void 0===e?e=this.precision:O5(e,1,a5),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(g5);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=r/4}else for(;o<r;)a[o++]=1e7*Math.random()|0;for(e%=7,(r=a[--o])&&e&&(i=b5(10,7-e),a[o]=(r/i|0)*i);0===a[o];o--)a.pop();if(o<0)n=0,a=[0];else{for(n=-1;0===a[0];n-=7)a.shift();for(r=1,i=a[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return s.e=n,s.d=a,s}function j4(e){return M5(e=new this(e),e.e+1,this.rounding)}function O4(e){return(e=newthis(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function N4(e){return new this(e).sin()}function T4(e){return new this(e).sinh()}function P4(e){return new this(e).sqrt()}function M4(e,t){return new this(e).sub(t)}function I4(){var e=0,t=arguments,n=newthis(t[e]);for(f5=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return f5=!0,M5(n,this.precision,this.rounding)}function L4(e){return new this(e).tan()}function R4(e){return new this(e).tanh()}function D4(e){return M5(e=new this(e),e.e+1,1)}A5[Symbol.for("nodejs.util.inspect.custom")]=A5.toString,A5[Symbol.toStringTag]="Decimal";var B4=A5.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,v4(e))return i.s=e.s,void(f5?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(f5?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):q5(i,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),C5.test(e)?q5(i,e):function(e,t){var n,r,i,o,s,a,l,c,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),C5.test(t))return q5(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_5.test(t))n=16,t=t.toLowerCase();else if(x5.test(t))n=2;else{if(!w5.test(t))throw Error(p5+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,r=e.constructor,s&&(o=(a=(t=t.replace(".","")).length)-o,i=H5(r,new r(n),o,2*o)),o=u=(c=T5(t,n,k5)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=L5(c,u),e.d=c,f5=!1,s&&(e=P5(e,i,4*a)),l&&(e=e.times(Math.abs(l)<54?b5(2,l):B4.pow(2,l))),f5=!0,e)}(i,e);if("bigint"===r)return e<0?(e=-e,i.s=-1):i.s=1,q5(i,e.toString());throw Error(p5+e)}if(o.prototype=A5,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=u4,o.clone=e,o.isDecimal=v4,o.abs=J5,o.acos=Q5,o.acosh=e4,o.add=t4,o.asin=n4,o.asinh=r4,o.atan=i4,o.atanh=o4,o.atan2=s4,o.cbrt=a4,o.ceil=l4,o.clamp=c4,o.cos=d4,o.cosh=f4,o.div=h4,o.exp=p4,o.floor=m4,o.hypot=g4,o.ln=y4,o.log=b4,o.log10=_4,o.log2=x4,o.max=w4,o.min=C4,o.mod=k4,o.mul=S4,o.pow=E4,o.random=A4,o.round=j4,o.sign=O4,o.sin=N4,o.sinh=T4,o.sqrt=P4,o.sub=M4,o.sum=I4,o.tan=L4,o.tanh=R4,o.trunc=D4,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(d5);c5=new B4(c5),u5=new B4(u5),B4.set({precision:20,rounding:4,toExpNeg:-40,toExpPos:40,maxE:9e15,minE:-9e15,modulo:1,crypto:!1});const F4=function(e,t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{decimalLength:r=4,min:i,max:o,commaSeparated:s}=n;if(e){if(Number.isNaN(e))return"".concat(e);if(i&&Math.abs(e)<i)return"<".concat(i);if(o&&Math.abs(e)>o)return">".concat(o);let t=z4(e).toDecimalPlaces(r);return s?t.toNumber().toLocaleString():t.toString()}return 0===e?n.nullShow?n.nullShow:0:"--"},H4=e=>!!Number.isNaN(e)||null===e||""===e,z4=e=>{try{return H4(e)?new B4(0):new B4(e)}catch(t){return new B4(0)}},V4=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;if(0==e||!e)return"0.00";if(H4(e))return"";let r=Math.abs(e),i=null;if(r&&r<.01)i=U4(e,n);else{let n=5,o=!1;r>=1e4&&r<1e5&&(n=2),r>=1e5&&(n=1,o=!0),i="".concat(e<0?"-":"").concat(function(e,t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";let r=Math.abs(e),{acronymMin:i=100}=n;if(!(r>=i)&&r>=1)return"".concat(F4(r,{decimalLength:2,acronymMin:2}));if(!(r>=i)&&r>=.01)return"".concat(F4(r,{decimalLength:4,acronymMin:2}));if(!(r>=i)&&r<=.01)return F4(e,n);if(r>=1e9){let t=Math.abs(e)/1e9;return"".concat(F4(t,h(f({},n),{decimalLength:2})),"B")}if(r>=1e6){let t=Math.abs(e)/1e6;return"".concat(F4(t,h(f({},n),{decimalLength:2})),"M")}if(r>=1e5){let t=Math.abs(e)/1e3;return"".concat(F4(t,h(f({},n),{decimalLength:2})),"K")}}(e,h(f({},t),{decimalLength:n,acronymMin:1e5,commaSeparated:o})))}return t.appendUSD&&(i="$".concat(i)),i},U4=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,r=Math.abs(e),i=(null===(t=(z4(r).toString()||"").split(".")[1])||void 0===t?void 0:t.split(""))||[],o=0;for(let a=0;a<i.length&&"0"===i[a];a++)o+=1;let s=i.slice(o,o+n).join("");return"".concat(e<0?"-":"","0.0").concat(["₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","₁₀","₁₁","₁₂","₁₃","₁₄","₁₅","₁₆","₁₇","₁₈","₁₉","₂₀","₂₁","₂₂","₂₃","₂₄","₂₅","₂₆","₂₇","₂₈","₂₉","₃₀","₃₁"][o]).concat(s)};function G4(e){let t=e.replace(/[^0-9.]/g,"");const n=t.indexOf(".");return-1!==n&&(t=t.substring(0,n+1)+t.substring(n+1).replace(/\./g,"")),t}function W4(e){if(H4(e))return;let t=e;return t=t.replace(/[^0-9.]/g,""),t=t.replace(/(\..*)\./g,"$1"),t=t.replace(/^0+([1-9])/,"$1"),t=t.replace(/^0{2,}$/,"0"),t}function q4(){const{t:e}=$2(),t=S(),n=k();return new URLSearchParams(n.search).get("chain_id"),G.jsxs("div",{className:"flex items-center cursor-pointer",children:[G.jsxs("div",{onClick:()=>{t("/")},className:"flex items-center",children:[G.jsx("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIGSURBVHgB7ZrbUcJAFIb/RXy3hPXRGXWwg1iBJUgHYgWMFagVqBU4VgBUIN7GR0IF8uIb5PifhDgo10niuJvJ98CGEIZ8nD3Zk80aFIC82TYmsMiLwRCCPrbRN3thuPnXCkBebIdNgGLpUujOHIa36w6swV0C/sU38moH8mybqw50WSJB2E0TmRt5t3bRIe5LpAiazLvOIhF/JBSNygIRvySUROReBnYn3eWfhCJo4BPt9K2fEoqgxfGpoZv+SigRLrXxW4JjieaG7xJgbjT9lxCc+C8BNMogUYKcwLQUz30/sIUe8iAcuCT779fj1yguewNkJWLdfxB2kRHej5yyschIKbpTJeEKlYQrVBKuUEm4QiXhCpWEK5RCoo5iaHPm+hRZMSzDBZkpSiLI9aQjh4BSqpwYwVcMwlRiCH/pJhI1PuzzlQi9ZLbjkXP9dXzAN9iVzH64G0fCHIWaE134xgR32sxenS7gE4wCu9Ktbn5LxPNGkph5QYQL9qBQN3+OExO0YkPXUYGZh/Rz4yyTvMFpyQ4/2YGLJKsMmrO75kZshqjPiBw7GpHr3wLK0oqHEbHYZkRyTPQWyIjncb5sncfask2ebIvd6+yfZPTSf40xrqbDwEI2rj3jRSIGWm4H+Fv0ZPtM3ge9hK46+ZRMBXSc/HUmfq3A6ETMwTFH4KPN1zmlfAG7sJn1vjcD+QAAAABJRU5ErkJggg==",alt:"logo",className:"h-24px mr-12px"}),G.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"58",height:"17",viewBox:"0 0 58 17",fill:"none",children:[G.jsx("path",{d:"M0 16.1641V0.164062H4.47712C6.0488 0.164062 7.38256 0.405821 8.47841 0.889337C9.57426 1.3582 10.461 1.99556 11.1387 2.80143C11.8164 3.59263 12.3067 4.47908 12.6095 5.46077C12.9267 6.4278 13.0853 7.40216 13.0853 8.38384C13.0853 9.58531 12.8762 10.6622 12.4581 11.6146C12.0399 12.567 11.4704 13.3875 10.7494 14.0761C10.0285 14.7501 9.19215 15.2703 8.2405 15.6366C7.30326 15.9882 6.30113 16.1641 5.23412 16.1641H0ZM2.53055 13.7025H4.77992C5.61623 13.7025 6.38044 13.5853 7.07255 13.3509C7.76467 13.1018 8.36306 12.7501 8.86773 12.2959C9.38681 11.8271 9.78334 11.2483 10.0573 10.5597C10.3457 9.8710210.4899 9.08714 10.4899 8.20802C10.4899 7.21168 10.3241 6.36187 9.99241 5.65857C9.67519 4.94062 9.24983 4.36187 8.71632 3.9223C8.19724 3.46809 7.62769 3.13842 7.00767 2.93329C6.38765 2.72816 5.77484 2.6256 5.16924 2.6256H2.53055V13.7025Z",fill:"#FFD320"}),G.jsx("path",{d:"M15.3457 0.164062H25.7923V2.6256H17.8762V6.88934H24.9272V9.37285H17.8762V13.7025H26.0951V16.1641H15.3457V0.164062Z",fill:"#FFD320"}),G.jsx("path",{d:"M28.5737 0.164062H31.7747L42.0483 16.1641H38.804L28.5737 0.164062ZM28.3574 16.1641L33.8943 7.35088L35.0839 9.87835L31.4719 16.1641H28.3574ZM35.2137 6.40582L38.804 0.164062H41.8537L36.533 8.60362L35.2137 6.40582Z",fill:"#FFD320"}),G.jsx("path",{d:"M44.5249 0.164062H47.7259L57.9995 16.1641H54.7552L44.5249 0.164062ZM44.3086 16.1641L49.8455 7.35088L51.0351 9.87835L47.4231 16.1641H44.3086ZM51.1649 6.40582L54.7552 0.164062H57.8048L52.4842 8.60362L51.1649 6.40582Z",fill:"#FFD320"})]})]}),G.jsxs("div",{className:"logo-btn ml-24px mr-24px pl-12px pr-12px flex",children:[G.jsx("span",{onClick:()=>{t("/")},className:"mr-16px "+("/"===n.pathname?"active":""),children:e("tabPane.hot_coin")}),G.jsx(bp,{className:"logo-popover",position:"bl",content:G.jsx("div",{className:"flex flex-col box-border",children:G.jsxs("div",{onClick:()=>{t("/smart")},className:"cursor-pointer box-border p-[12px] gap-16px h-[64px]flex items-center hover:bg-[var(--Split-line-100)] hover:rounded-[8px]",children:[G.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[G.jsx("path",{d:"M19 9C19 10.45 18.57 11.78 17.83 12.89C16.75 14.49 15.04 15.62 13.05 15.91C12.71 15.97 12.36 16 12 16C11.64 16 11.29 15.97 10.95 15.91C8.96 15.62 7.25 14.49 6.17 12.89C5.43 11.78 5 10.45 5 9C5 5.13 8.13 2 12 2C15.87 2 19 5.13 19 9Z",stroke:"var(--Gray-100)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),G.jsx("path",{d:"M21.2491 18.4699L19.5991 18.8599C19.2291 18.9499 18.9391 19.2299 18.8591 19.5999L18.5091 21.0699C18.3191 21.8699 17.2991 22.1099 16.7691 21.4799L11.9991 15.9999L7.2291 21.4899C6.6991 22.1199 5.6791 21.8799 5.4891 21.0799L5.1391 19.6099C5.0491 19.2399 4.7591 18.9499 4.3991 18.8699L2.7491 18.4799C1.9891 18.2999 1.7191 17.3499 2.2691 16.7999L6.1691 12.8999C7.2491 14.4999 8.9591 15.6299 10.9491 15.9199C11.2891 15.9799 11.6391 16.0099 11.9991 16.0099C12.3591 16.0099 12.7091 15.9799 13.0491 15.9199C15.0391 15.6299 16.7491 14.4999 17.8291 12.8999L21.7291 16.7999C22.2791 17.3399 22.0091 18.2899 21.2491 18.4699Z",stroke:"var(--Gray-100)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),G.jsx("path",{d:"M12.58 5.98L13.17 7.15999C13.25 7.31999 13.46 7.48 13.65 7.51L14.72 7.68999C15.4 7.79999 15.56 8.3 15.07 8.79L14.24 9.61998C14.1 9.75998 14.02 10.03 14.07 10.23L14.31 11.26C14.5 12.07 14.07 12.39 13.35 11.96L12.35 11.37C12.17 11.26 11.87 11.26 11.69 11.37L10.69 11.96C9.96997 12.38 9.53997 12.07 9.72997 11.26L9.96997 10.23C10.01 10.04 9.93997 9.75998 9.79997 9.61998L8.96997 8.79C8.47997 8.3 8.63997 7.80999 9.31997 7.68999L10.39 7.51C10.57 7.48 10.78 7.31999 10.86 7.15999L11.45 5.98C11.74 5.34 12.26 5.34 12.58 5.98Z",stroke:"#F4C91A","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),G.jsxs("div",{children:[G.jsx("div",{className:"text-[16px] text-[var(--Gray-100)] font-weight-700",children:e("tabPane.smart")}),G.jsx("div",{className:"text-[12px] text-[var(--Gray-200)] font-weight-400",children:e("tabPane.smart_desc")})]})]})}),children:G.jsxs("div",{className:(["/strategy","/smart"].includes(n.pathname)?"active":"")+" flex gap-[4px] items-center",children:[G.jsx("span",{children:e("tabPane.opportunity")}),G.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:G.jsx("path",{d:"M4.91438 6.40832C4.44919 6.97457 3.61591 6.97457 3.15072 6.40832L0.65287 3.36781C-0.00142156 2.57137 0.535254 1.33301 1.5347 1.33301L6.5304 1.33301C7.52985 1.33301 8.06653 2.57137 7.41224 3.36781L4.91438 6.40832Z",fill:"#868584"})})]})})]})]})}const Z4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALOSURBVHgB7VdLctpAEO0e2XuOQE4QfALDCWKfAIhNtkRhlWAKURSVlaNkG9sFnCBwAisniG8QjkCWKaPpdI8ghfhII0IRL/yqqAHR0/Omp7vnCeAZTwiYxbjr3xQVqFMCKgJBgR/ljBPECT+boMahUip471YnGdzakej5XwsEyueFizb2TGrAZDu2ZFSaQe/TbZ1I/TAEEKYE8IWQSg46L67eXaJ8EPUJIZyz+VDmEFFFU3jf9W/PwAKJkej5d2126BnHvHiIjue51WnSnI9+P68h9InAEFCOqnyovx7uROIvgWj31ZZ7OYIM6F7feByittkAR67l1gLIQkJ2E1L4M3IA51kJrBLhRSaP6Jxsi+LGnNCk7w0Bos6uBAStRk0iGXAk846evd1mt0ZCypDLLY8IE+PkH8G+OjJyROqe389ZkeDSKsuoNSUmky1MLnA0+GvuWOszKxJ8BAXzh6Kdj2ENmsbz1U7BhgTDkGi6bx5gT0BFgYx8NAVIIyFVYSZxNsMeoeDYVAUS2OXE/0CMxG8Aw5hgM+NdMYNZ3vjFzRGOkZBmgoBimJNLC/YE1FGecdb/gjQSAg1RJmuNVpePFRS+MmRQjaxIcPaMognbm0sWmGSfSwDuQQHYkFhuLkmt1hYhhH0ZRWNs0xcbq2Op1baljcOOkJtYoiBXgIicbXYbSUg05PIyRAi/2YqTVQILLaIB3CSVlShqljUBjx7vZpgm2YwMkCOY5wFvotpsXAyS5qRqzBgR6aSIgQY9DOHoYaEPZOEZhAUOa3mhqFbFkERTQVQlHJrvy8SshO7q7tIgSfgIyl2Q7F3fVVhd9WNGRO5Vo/ZZvh7ZOJ0fQUkamCZV4UR7CXLRUVzys+fxDI4GqwqKFJWlDccQ9Q57EgvMb9bMZcvhntLaM9OZIz5wEOA4/hOmyyV7EBJN92Igrwxmfe4ZCLqU9S3tGQfDH6QaQ+KPebF4AAAAAElFTkSuQmCC";function X4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X4(Object(n),!0).forEach((function(t){rs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y4(e,t){var n=v.useContext(is).prefixCls,r=void 0===n?"arco":n,i=e.spin,o=e.className,s=K4(K4({"aria-hidden":!0,focusable:!1,ref:t},e),{},{className:"".concat(o?o+" ":"").concat(r,"-icon ").concat(r,"-icon-arrow-right")});return i&&(s.className="".concat(s.className," ").concat(r,"-icon-loading")),delete s.spin,delete s.isIcon,w.createElement("svg",es({fill:"none",stroke:"currentColor",strokeWidth:"4",viewBox:"0 0 48 48"},s),w.createElement("path",{d:"m27.728 11.27 12.728 12.728-12.728 12.728M5 24h34.295"}))}var $4=w.forwardRef(Y4);$4.defaultProps={isIcon:!0},$4.displayName="IconArrowRight";const J4=$4,Q4=()=>G.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"127",height:"102",viewBox:"0 0 127 102",fill:"none",className:"w-120px m-auto",children:[G.jsx("path",{d:"M53.2393 30.2612H102.168L102.238 80.3423L101.349 80.3435L101.28 31.1501H54.1281V89.3901L101.807 89.3905V90.2794H53.2393V30.2612Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M79.5432 89.7879C80.3751 86.254 82.3174 84.5676 85.2837 84.8793C85.5278 84.905 85.7049 85.1237 85.6792 85.3678C85.6536 85.6119 85.4349 85.789 85.1908 85.7633C82.7106 85.5027 81.1452 86.8619 80.4084 89.9916C80.3522 90.2305 80.1129 90.3786 79.8739 90.3224C79.635 90.2661 79.4869 90.0269 79.5432 89.7879Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M87.7228 80.9368C87.8859 80.7533 88.1668 80.7368 88.3503 80.8998C88.5337 81.0629 88.5503 81.3438 88.3873 81.5273C87.5305 82.4914 86.9354 83.2716 86.6049 83.8591C86.2722 84.4504 85.8555 85.4707 85.362 86.9097C85.2824 87.1418 85.0296 87.2655 84.7975 87.1859C84.5653 87.1063 84.4416 86.8535 84.5212 86.6213L84.6583 86.2265C85.1092 84.9454 85.498 84.0136 85.8302 83.4232C86.1977 82.7701 86.8276 81.9442 87.7228 80.9368Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M90.2496 79.3853C91.9036 78.2883 93.6937 77.8189 95.6044 77.9831C97.4901 78.1451 99.2526 78.7773 100.886 79.8763C101.089 80.0133 101.143 80.2895 101.006 80.4931C100.869 80.6968 100.593 80.7508 100.389 80.6137C98.8802 79.5981 97.2619 79.0177 95.5283 78.8687C93.8198 78.7219 92.2292 79.139 90.7409 80.126C90.5364 80.2617 90.2605 80.2059 90.1249 80.0013C89.9892 79.7967 90.0451 79.5209 90.2496 79.3853Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M96.7062 81.6341C99.2858 80.1232 101.707 79.5078 103.964 79.8043C106.2 80.0982 108.347 81.0966 110.398 82.7904C110.587 82.9467 110.614 83.2269 110.457 83.4161C110.301 83.6054 110.021 83.6321 109.832 83.4758C107.904 81.8838 105.911 80.9567 103.848 80.6856C101.804 80.417199.5757 80.9835 97.1555 82.4011C96.9437 82.5251 96.6714 82.454 96.5473 82.2422C96.4233 82.0304 96.4944 81.7581 96.7062 81.6341Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M77.6418 67.1504C81.4214 67.1504 83.3774 69.2385 83.3774 73.2434C83.3774 73.4889 83.1784 73.6878 82.933 73.6878C82.6875 73.6878 82.4885 73.4889 82.4885 73.2434C82.4885 69.7169 80.9171 68.039377.6418 68.0393C74.3666 68.0393 72.7951 69.7169 72.7951 73.2434C72.7951 73.4889 72.5962 73.6878 72.3507 73.6878C72.1052 73.6878 71.9062 73.4889 71.9062 73.2434C71.9062 69.2385 73.8622 67.1504 77.6418 67.1504Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M101.826 30.2612H52.7539L67.2373 54.391H116.846L101.826 30.2612ZM101.333 31.1501L115.245 53.5021H67.7404L54.3239 31.1501H101.333Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M53.0385 89.3353H22.8223V31.2061H53.0385V89.3353Z",stroke:"var(--Gray-100)"}),G.jsx("path",{d:"M102.1 1.86279L102.778 2.43835C97.5521 8.58849 93.2129 11.8056 89.7848 11.9863L89.6979 11.9892L89.4662 12.2582C88.1387 13.7787 86.1061 15.8282 83.3322 18.4685L82.6811 19.0862L82.0703 18.4404L83.0229 17.5346C85.3354 15.3228 87.1298 13.5099 88.3788 12.1425L88.5824 11.9181L88.4716 11.8983C87.4407 11.6962 86.5055 11.1748 85.666910.3307L85.5532 10.2136C84.0416 8.62266 83.6404 6.42711 85.1441 5.62284C87.4559 4.38634 91.2478 6.06617 91.372 9.25236C91.3851 9.58881 91.1398 10.1061 90.6274 10.8191L90.5046 10.9866L90.6388 10.9606C93.5889 10.3504 97.3295 7.43015 101.879 2.12153L102.1 1.86279ZM90.4838 9.28699C90.3872 6.81018 87.3361 5.45849 85.5634 6.40666C84.749 6.84221 85.0283 8.3707 86.1976 9.60138C87.0744 10.5243 88.099 11.0179 89.2729 11.0758L89.3175 11.0772L89.4996 10.8586C90.1393 10.0803 90.4708 9.55829 90.4836 9.31129L90.4838 9.28699Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M110.093 17.1025L109.499 18.1252C108.54 19.7749 107.665 20.9008 106.889 21.4983C106.146 22.0711 104.928 22.5939 103.242 23.0539L101.809 23.4331L102.962 23.9469C104.739 24.7386 105.936 25.5149 106.546 26.254C107.155 26.9911 107.663 28.277 108.051 30.1041L108.285 31.2067L108.867 30.241C109.996 28.3641 110.89 27.1476 111.521 26.6099C112.135 26.087 113.152 25.6605 114.569 25.3465L115.64 25.1092L114.706 24.5341L114.354 24.3133C112.981 23.438 112.061 22.6605 111.597 21.9974C111.096 21.28 110.664 20.0314 110.32 18.2635L110.093 17.1025ZM109.686 19.5254L109.729 19.6959C110.045 20.9329 110.422 21.8681 110.869 22.5068L110.939 22.604C111.395 23.2183 112.134 23.8762 113.157 24.5858L113.377 24.7356L113.202 24.7898C112.237 25.0942 111.485 25.4732 110.945 25.9332L110.872 25.9972C110.306 26.5035 109.615 27.3962 108.787 28.6836L108.669 28.8681L108.665 28.8523C108.285 27.4432 107.811 26.3897 107.232 25.6881L107.15 25.5919C106.587 24.9511 105.704 24.3225 104.497 23.6971L104.389 23.6418L104.536 23.5951C105.794 23.1831 106.759 22.721 107.432 22.2025C108.102 21.686 108.804 20.8667 109.545 19.7426L109.686 19.5254Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M55.1634 11.386C55.0943 11.626 55.094 11.8805 55.1624 12.1206L57.5505 20.4979C57.7524 21.2061 58.4901 21.6165 59.1983 21.4147C59.415 21.3529 59.6125 21.2372 59.7723 21.0785L65.7742 15.1177C66.2967 14.5988 66.2996 13.7545 65.7807 13.2321C65.6206 13.0709 65.422 12.9533 65.2037 12.8904L56.8137 10.4738C56.1061 10.27 55.3672 10.6784 55.1634 11.386ZM56.5677 11.328L64.9576 13.7445C65.0304 13.7655 65.0966 13.8047 65.15 13.8584C65.3229 14.0326 65.322 14.314 65.1478 14.487L59.146 20.4478C59.0927 20.5007 59.0268 20.5392 58.9546 20.5598C58.7186 20.6271 58.4726 20.4903 58.4054 20.2543L56.0172 11.8769C55.9944 11.7969 55.9945 11.712 56.0176 11.6321C56.0855 11.3962 56.3318 11.26 56.5677 11.328Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M45.0964 0.891602C46.5691 0.891602 47.763 2.08551 47.763 3.55827C47.763 5.03103 46.5691 6.22494 45.0964 6.22494C43.6236 6.22494 42.4297 5.03103 42.4297 3.55827C42.4297 2.08551 43.6236 0.891602 45.0964 0.891602ZM45.0964 1.78049C44.1145 1.78049 43.3186 2.57643 43.3186 3.55827C43.3186 4.54011 44.1145 5.33605 45.0964 5.33605C46.0782 5.33605 46.8741 4.54011 46.8741 3.55827C46.8741 2.57643 46.0782 1.78049 45.0964 1.78049Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M29.6069 10.1184C29.794 9.95951 30.0745 9.98233 30.2334 10.1694C31.1485 11.2467 31.7207 12.1281 31.9502 12.8354C32.1848 13.5579 32.1848 14.4699 31.9633 15.5753C31.9151 15.816 31.6809 15.972 31.4402 15.9237C31.1995 15.8755 31.0435 15.6413 31.0917 15.4006C31.2858 14.4323 31.2858 13.6674 31.1048 13.1098C30.9188 12.5369 30.4024 11.7413 29.5559 10.7449C29.397 10.5578 29.4198 10.2773 29.6069 10.1184Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M23.7861 14.9379C23.8901 14.7156 24.1546 14.6196 24.377 14.7236L24.7537 14.9031C25.7885 15.4057 26.5468 15.8588 27.0349 16.2703C27.5883 16.7369 28.1282 17.43 28.6617 18.35C28.7848 18.5623 28.7125 18.8343 28.5002 18.9574C28.2878 19.0806 28.0159 19.0082 27.8927 18.7959C27.4066 17.9576 26.9273 17.3422 26.4619 16.9499C25.9885 16.5508 25.1651 16.0734 24.0004 15.5288C23.7781 15.4248 23.6821 15.1603 23.7861 14.9379Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M25.4802 20.8843C26.2055 20.8843 27.0318 21.092 27.9635 21.5011C28.1882 21.5998 28.2904 21.862 28.1917 22.0868C28.093 22.3115 27.8308 22.4137 27.6061 22.315C26.7787 21.9517 26.0686 21.7732 25.4802 21.7732C24.8743 21.7732 23.9049 21.9596 22.5901 22.3354C22.3541 22.4029 22.1081 22.2662 22.0407 22.0302C21.9732 21.7942 22.1098 21.5482 22.3459 21.4807C23.7337 21.0841 24.7724 20.8843 25.4802 20.8843Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M54.3251 30.2612H22.0709L7.56445 54.391H39.7893L54.3251 30.2612ZM52.752 31.1501L39.2871 53.5021H9.136L22.5733 31.1501H52.752Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M116.992 89.3901C117.238 89.3901 117.437 89.5891 117.437 89.8346C117.437 90.08 117.238 90.279 116.992 90.279H8.7755C8.53004 90.279 8.33105 90.08 8.33105 89.8346C8.33105 89.5891 8.53004 89.3901 8.7755 89.3901H116.992Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M81.4431 95.272C81.6886 95.272 81.8875 95.471 81.8875 95.7164C81.8875 95.9619 81.6886 96.1609 81.4431 96.1609H45.3839C45.1384 96.1609 44.9395 95.9619 44.9395 95.7164C44.9395 95.471 45.1384 95.272 45.3839 95.272H81.4431Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M90.0668 95.272C90.3122 95.272 90.5112 95.471 90.5112 95.7164C90.5112 95.9619 90.3122 96.1609 90.0668 96.1609H84.9982C84.7527 96.1609 84.5537 95.9619 84.5537 95.7164C84.5537 95.471 84.7527 95.272 84.9982 95.272H90.0668Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M70.9554 101.05C71.2009 101.05 71.3999 101.249 71.3999 101.494C71.3999 101.74 71.2009 101.939 70.9554 101.939H65.8868C65.6414 101.939 65.4424 101.74 65.4424 101.494C65.4424 101.249 65.6414 101.05 65.8868 101.05H70.9554Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M61.6224 101.05C61.8679 101.05 62.0669 101.249 62.0669 101.494C62.0669 101.74 61.8679 101.939 61.6224 101.939H56.5538C56.3084 101.939 56.1094 101.74 56.1094 101.494C56.1094 101.249 56.3084 101.05 56.5538 101.05H61.6224Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M41.8684 95.272C42.1138 95.272 42.3128 95.471 42.3128 95.7164C42.3128 95.9619 42.1138 96.1609 41.8684 96.1609H37.0323C36.7869 96.1609 36.5879 95.9619 36.5879 95.7164C36.5879 95.471 36.7869 95.272 37.0323 95.272H41.8684Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M126.055 89.3901C126.3 89.3901 126.499 89.5891 126.499 89.8346C126.499 90.08 126.3 90.279 126.055 90.279H119.605C119.359 90.279 119.16 90.08 119.16 89.8346C119.16 89.5891 119.359 89.3901 119.605 89.3901H126.055Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M5.01151 89.3901C5.25697 89.3901 5.45596 89.5891 5.45596 89.8346C5.45596 90.08 5.25697 90.279 5.01151 90.279H1.14366C0.898203 90.279 0.699219 90.08 0.699219 89.8346C0.699219 89.5891 0.898203 89.3901 1.14366 89.3901H5.01151Z",fill:"var(--Gray-100)"})]});function e6(e){const{t:t}=$2();return G.jsxs("div",{className:"flex flex-col p-[120px_0px] text-center",style:e.style,children:[Q4(),G.jsx("span",{className:"text-14px color-[var(--Gray-500)]",children:t("tableHeaders.empty")})]})}function t6(e){if("undefined"==typeof window)return null;if("undefined"!=typeof URLSearchParams){return new URLSearchParams(window.location.search).get(e)}{const t=window.location.search.substring(1).split("&");for(let n=0;n<t.length;n++){const r=t[n].split("=");if(decodeURIComponent(r[0])===e)return decodeURIComponent(r[1]||"")}return null}}const n6=t6("ref"),r6=Ee();if(n6){const e=t6("token_ca");if(!r6||r6&&r6.token_ca.toLowerCase()!=(null==e?void 0:e.toLowerCase())){const t={ref_code:n6,token_ca:FV(e)};i6=t,sessionStorage.setItem("refInfo",JSON.stringify(i6))}}var i6;function o6(e){const t=t6("ref"),n=t6("token_ca"),r=Ee();if(t||r&&r.token_ca.toLowerCase()==(null==n?void 0:n.toLowerCase())){const n=t||r.ref_code;e.ref_code=n}return GV({url:"/v1/swap/buy_token_fast",method:"post",data:e}).then((e=>(1e3===e.code&&r&&r.token_ca.toLowerCase()!=(null==n?void 0:n.toLowerCase())&&sessionStorage.removeItem("refInfo"),e)))}function s6(e){const t=t6("ref"),n=t6("token_ca"),r=Ee();if(t||r&&r.token_ca.toLowerCase()==(null==n?void 0:n.toLowerCase())){const n=t||r.ref_code;e.ref_code=n}return GV({url:"/v1/swap/sell_token_fast",method:"post",data:e}).then((e=>(1e3===e.code&&r&&r.token_ca.toLowerCase()!=(null==n?void 0:n.toLowerCase())&&sessionStorage.removeItem("refInfo"),e)))}function a6(e){return GV({url:"/v2/data/get_kline",method:"get",data:e})}function l6(e){return GV({url:"/v1/data/get_pair_info",method:"get",data:e})}function c6(e){return GV({url:"/v1/data/get_market_info",method:"get",data:e})}function u6(e){const t=t6("ref"),n=t6("token_ca"),r=Ee();if(t||r&&r.token_ca.toLowerCase()==(null==n?void 0:n.toLowerCase())){const n=t||r.ref_code;e.ref_code=n}return GV({url:"/v1/swap/buy_token_limit",method:"post",data:e}).then((e=>(1e3===e.code&&r&&r.token_ca.toLowerCase()!=(null==n?void 0:n.toLowerCase())&&sessionStorage.removeItem("refInfo"),e)))}function d6(e){const t=t6("ref"),n=t6("token_ca"),r=Ee();if(t||r&&r.token_ca.toLowerCase()==(null==n?void 0:n.toLowerCase())){const n=t||r.ref_code;e.ref_code=n}return GV({url:"/v1/swap/sell_token_limit",method:"post",data:e}).then((e=>(1e3===e.code&&r&&r.token_ca.toLowerCase()!=(null==n?void 0:n.toLowerCase())&&sessionStorage.removeItem("refInfo"),e)))}function f6(e){return GV({url:"/v1/swap/get_token_limit_list",method:"get",data:e})}function h6(e){return GV({url:"/v1/order/history",method:"get",data:e})}function p6(e){return GV({url:"/v1/swap/get_my_holding_token",method:"get",data:e})}function m6(e){return GV({url:"/v2/data/hold_token_users",method:"get",data:e})}function g6(e){return GV({url:"v2/data/history_trades",method:"get",data:e})}function v6(e){return GV({url:"/v1/data/get_pair_share",method:"get",data:e})}function y6(e){return GV({url:"/v1/swap/delete_token_limit_list",method:"post",data:e})}function b6(e){return GV({url:"/v1/swap/buy_tx_status_query",method:"post",data:e})}function x6(e){return GV({url:"/v1/swap/sell_tx_status_query",method:"post",data:e})}function _6(e){return GV({url:"/v2/data/maker_trades",method:"get",data:e})}function w6(e){return GV({url:"/v1/data/audit_token",method:"post",data:e})}function C6(e){return GV({url:"/v1/data/get_kline_tag",method:"get",data:e})}function k6(e){return GV({url:"/v1/swap/new_float_token_limit",method:"post",data:e})}function S6(e){return GV({url:"/v1/trade/user_setting",method:"get",data:e})}function E6(e){return GV({url:"/v1/trade/update_setting",method:"post",data:e})}functionA6(e){return GV({url:"/v1/data/gas_price",method:"post",data:e})}function j6(e){return GV({url:"/v2/set_client_config",method:"post",data:e})}function O6(e){return GV({url:"/v2/get_client_config",method:"post",data:e})}function N6(e){return GV({url:"/v2/swap/market_buy",method:"post",data:e})}function T6(e){return GV({url:"/v2/swap/market_sell",method:"post",data:e})}function P6(e){return GV({url:"/v2/account/get_token_amount_by_addr",method:"post",data:e})}function M6(e){returnGV({url:`/v1/data/get_token_narration?token_ca=${e.token_ca}&chain_id=${e.chain_id}`,method:"get"})}const I6="/assets/png/bitcoin-5b15e449.png",L6=e=>{const{text:t,className:n,childrenNode:r}=e,{t:i}=$2();return G.jsx("div",{className:j3("copy cursor-pointer h-full flex items-center",n),onClick:e=>g(void 0,null,(function*(){if(e.stopPropagation(),navigator.clipboard)try{yield navigator.clipboard.writeText(t),hc.success(i("message.copied"))}catch(n){hc.error(i("message.copy_failed"))}else hc.error(i("message.copy_unsupported"))})),role:"button",tabIndex:0,children:r||G.jsx("img",{src:"/assets/svg/copy-df95f964.svg",alt:"copy",className:"w-16px h-16px color-[var(--Gray-200)]"})})},R6="/assets/svg/succeed-ae4a9dbd.svg",D6="/assets/svg/fail-5df181ea.svg",B6="/assets/svg/circle-5d7aaacf.svg",F6=[{name:"zh",title:"中文"},{name:"en",title:"English"},{name:"uf",title:"繁體中文"},{name:"ko",title:"한국어"}],H6={zh:{tutorial:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/",privacy_terms:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/yin-si-yu-tiao-kuan/yin-si-xie-yi",protocol_n2:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/yin-si-yu-tiao-kuan/yin-si-xie-yi",protocol_n1:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/yin-si-yu-tiao-kuan/fu-wu-tiao-kuan",security_audit:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/an-quan-shen-ji/jie-guo-gong-shi",law_enforcement:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/zhi-fa-qing-qiu/zhi-fa-qing-qiu-zhi-nan",google_microsoft:"https://dexx.gitbook.io/dexx-zhong-wen-jiao-cheng/xin-yong-hu-jiao-cheng/qian-bao-she-zhi/gu-ge-wei-ruan-yan-zheng-qi",teregram:"https://t.me/DEXX_cn",twitter:"https://x.com/DEXXai_CN"},en:{tutorial:"https://dexx.gitbook.io/dexx-tutorial-book/",privacy_terms:"https://dexx.gitbook.io/dexx-tutorial-book/privacy-and-terms/privacy-policy",protocol_n2:"https://dexx.gitbook.io/dexx-tutorial-book/privacy-and-terms/privacy-policy",protocol_n1:"https://dexx.gitbook.io/dexx-tutorial-book/privacy-and-terms/terms-of-use",security_audit:"https://dexx.gitbook.io/dexx-tutorial-book/security-audit/result",law_enforcement:"https://dexx.gitbook.io/dexx-tutorial-book/law-enforcement/law-enforcement",google_microsoft:"https://dexx.gitbook.io/dexx-tutorial-book/for-beginner/wallet-settings/google-microsoft-authenticator",teregram:"https://t.me/DEXX_en",twitter:"https://x.com/DEXXai_EN"},uf:{tutorial:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/",privacy_terms:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/yin-si-quan-yu-tiao-kuan/yin-si-xie-yi",protocol_n2:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/yin-si-quan-yu-tiao-kuan/yin-si-xie-yi",protocol_n1:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/yin-si-quan-yu-tiao-kuan/fu-wu-tiao-kuan",security_audit:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/an-quan-shen-ji/jie-guo-gong-shi",law_enforcement:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/zhi-fa-qing-qiu/zhi-fa-qing-qiu-zhi-nan",google_microsoft:"https://dexx.gitbook.io/dexx-fan-ti-zhong-wen-jiao-cheng/xin-yong-hu-jiao-xue/qian-bao-she-zhi/gu-ge-wei-ruan-yan-zheng-qi",teregram:"https://t.me/DEXX_cn",twitter:"https://x.com/DEXXai_CN"}},z6=[{key:"light",label:"日间模式"},{key:"dark",label:"夜晚模式"}],V6={1:"ETH",56:"BNB",8453:"ETH",1e5:"SOL",11e4:"TRX",196:"OKB"};var U6={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var l,c,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,s),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var l=0,c=[],u=a.length;l<u;l++)(a[l].fn!==t||i&&!a[l].once||r&&a[l].context!==r)&&c.push(a[l]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a}(U6);const G6=_(U6.exports),W6=new G6;let q6={};function Z6(e){const{setFocus:t,setValue:n}=e,{t:r}=$2(),[i,o]=v.useState(!1),s=S(),a=HU(),[l,c]=v.useState(e.tableData||[]);v.useEffect((()=>{c(e.tableData||[])}),[e.tableData]);const u=(e,t)=>g(this,null,(function*(){try{let n={chain_id:Number(e.chain_id),pair_ca:e.pair_ca,buy_eth_amount:String(t),fast_type:0,buy_type:1},i=Date.now()+Math.floor(1e3*Math.random());N3({id:i,title:`W1:${r("message.buy_deal_pending")}`,type:"buy",changeBack(e){q6[i]=e},dealType:{label:r("message.purchase"),value:`${V4(n.buy_eth_amount)} ${V6[e.chain_id]}`},dealMark:{label:r("message.deal_fdv"),value:`${V4(e.fdv)}`},chain_id:n.chain_id});let s=yield o6(n),l=s.data;if(1e3!==s.code)return o(!1),1601==s.code?(kc.clear(),void(yield a({type:"login/setIsCodeSubmitModal",payload:{codeMsgType:"mark",modal:!0}}))):1038===s.code?(kc.clear(),void a({type:"tradeSetting/setPumpToast",payload:{show:!0,chain_id:n.chain_id}})):void T3({id:i,type:"buy",title:`${e.token_symbol}:${r("message.buy_deal_fail")}`,chain_id:n.chain_id,errorMsg:s.message,changeBack:()=>{q6[i]=!1,u(e,t)}});q6[i]=!1,N3({id:i,type:"buy",title:`${e.token_symbol}:${r("message.buy_deal_pending")}`,changeBack(e){q6[i]=e},dealType:{label:r("message.buy_label"),value:`${V4(l.buy_baseToken_amount)} ${V6[e.chain_id]}`},dealMark:{label:r("message.deal_fdv"),value:`${V4(l.buy_fdv)}`},chain_id:n.chain_id}),d({chain_id:n.chain_id,bind_trade_id:i,tx_hash:l.buy_tx_hash},"buy",0,e,t)}catch(n){}})),d=(e,t,n,i,o)=>g(this,null,(function*(){try{let s=yield b6(e),a=s.data;if(1011==s.code)return T3({type:t,id:e.bind_trade_id,errorMsg:s.message,title:`${i.token_symbol}:${r("buy"==t?"message.buy_deal_pending":"message.sell_deal_pending")}`,chain_id:e.chain_id,changeBack:()=>{}}),void setTimeout((()=>{n>=2?n=0:(++n,d(e,t,n,i,o))}),3e3);if(1e3==s.code)return void P3({type:t,id:e.bind_trade_id,title:`${i.token_symbol}:${r("buy"==t?"message.buy_deal_success":"message.sell_deal_success")}`,dealType:{label:`${r("buy"==t?"message.purchase":"message.sell_label")}`,value:`${V4("buy"==t?a.buy_baseToken_amount:a.sell_token_amount)}${"buy"==t?V6[i.chain_id]:i.token_symbol}`},dealMark:{label:r("message.deal_fdv"),value:`${V4("buy"==t?a.buy_fdv:a.sell_fdv)}`},dealGet:{label:r("message.get"),value:`${V4("buy"==t?a.get_token_amount:a.get_baseToken_amount)}${"buy"==t?i.token_symbol:V6[i.chain_id]}`},reward:{reward_point:a.reward_point,reward_multiple:a.reward_multiple},chain_id:e.chain_id});T3({type:t,id:e.bind_trade_id,errorMsg:s.message,title:`${i.token_symbol}:${r("buy"==t?"message.buy_deal_fail":"message.sell_deal_fail")}`,chain_id:e.chain_id,changeBack:()=>{q6[e.bind_trade_id]=!1,u(i,o)}})}catch(s){}})),f=(e,r)=>{e.stopPropagation(),(e=>{let t=ee();if(t.length)t.some((t=>t.token_symbol.toLowerCase()===e.token_symbol.toLowerCase()))||(t.length>=6&&t.pop(),t.unshift(e),Q(t));else{let t=[];t.push(e),Q(t)}})(r),Se({url:`/deal?pair_ca=${r.pair_ca}&chain_id=${r.chain_id}&token_ca=${r.token_ca}&base_token_ca=${r.base_token_ca||""}&token_symbol=${r.token_symbol}&token_icon=${r.token_icon}&token_price=${r.token_price}&kline_24h=${r.kline_24h}`,chain_id:r.chain_id,pair_ca:r.pair_ca,token_ca:r.token_ca,base_token_ca:r.base_token_ca}),s(`/deal?pair_ca=${r.pair_ca}&chain_id=${r.chain_id}&token_ca=${r.token_ca}&base_token_ca=${r.base_token_ca||""}&token_symbol=${r.token_symbol}&token_icon=${r.token_icon}&token_price=${r.token_price}&kline_24h=${r.kline_24h}`),W6.emit("setBiName",{data:{token_symbol:r.token_symbol,token_icon:r.token_icon}}),setTimeout((()=>{t(!1),n("")}),100)};return G.jsx(v.Fragment,{children:G.jsxs("div",{className:"overflow-hidden max-h-550px accurate-search relative",children:[e.loading&&G.jsx("div",{className:"absolute inset-0 z-20 flex justify-center items-center",style:{backgroundColor:"var(--Card-100)",opacity:.5},children:G.jsx(ES,{dot:!0,className:"z-30"})}),G.jsx(mD,{split:!1,bordered:!1,style:{width:"100%",height:l.length>1?"450px":"340px"},dataSource:l,noDataElement:i?G.jsx(iB,{animation:!0,text:{rows:3,width:"100%",className:"pump-ske"}}):G.jsx(e6,{}),render:(e,t)=>(e=>G.jsx(G.Fragment,{children:G.jsxs("div",{className:"accurate-search_box",children:[G.jsxs("div",{className:"flex-col flex w-100% gap-8px",children:[G.jsxs("div",{className:"flex justify-between items-center gap-13px w-100%",children:[G.jsxs("div",{className:"flex items-center gap-12px",children:[G.jsxs("div",{className:"relative cursor-pointer",children:[G.jsx(bp,{position:"bottom",className:"image-popover",content:G.jsx("img",{className:"w-180px h-180px rounded-180px",src:e.token_icon}),children:G.jsx($z,{preview:!1,src:e.token_icon,width:"40",height:"40",className:"b-rd-40px!",error:G.jsx(bp,{position:"bottom",className:"image-popover",content:G.jsx("img",{className:"w-180px h-180px rounded-180px",src:I6}),children:G.jsx("img",{src:I6,className:"w-40px h-40px v-middle b-rd-40px"})})})}),G.jsx("img",{src:h3(e.chain_id),alt:"",className:"w-22px h-22px absolute right-[-5px] bottom-[-5px]"})]}),G.jsxs("div",{className:"text-12px color-[var(--Gray-400)]",children:[G.jsx("div",{className:"flex items-center cursor-pointer",onClick:t=>{f(t,e)},children:G.jsx("span",{className:"text-16px color-[var(--Gray-100)]",children:e.token_symbol})}),G.jsxs("div",{className:"color-[var(--Gray-200)] text-10px flex gap-4px items-center",children:[G.jsx("span",{children:c3(e.token_ca)}),G.jsx("span",{children:G.jsx(L6,{text:e.token_ca,className:"v-bottom cursor-pointer color-[var(--Gray-200)] ml-2px"})})]})]})]}),G.jsxs(ef,{className:"color-[var(--Primary-100)] cursor-pointer b-[var(--Gray-100)]! color-[var(--Gray-100)]! hover:bg-[var(--Primary-100)]! hover:color-[#000]!",shape:"round",type:"outline",onClick:t=>{f(t,e)},children:[G.jsx("span",{className:"text-12px",children:r("tableHeaders.deal")}),G.jsx(J4,{})]})]}),G.jsx("div",{className:"bg-[var(--Green-700)] lh-28px flex justify-left gap-16px items-center w-100% text-center text-12px",children:e.token_ca_list.map(((e,t)=>G.jsxs("span",{className:"flex items-center gap-4px justify-center",children:[G.jsx("img",{src:e.ok?R6:4===e.status?B6:D6,alt:"",className:"w-16px h-16px"}),e.name]})))})]}),G.jsx(OO,{className:"m-0px!"}),G.jsx("div",{className:"w-100%",children:G.jsxs("div",{className:"flex justify-between text-12px p-[0_16px]",children:[G.jsxs("div",{className:"grid grid-cols-[1fr_auto]",children:[G.jsx("span",{className:"pr-40px color-[var(--Gray-200)]",children:r("deal.current_fdv")}),G.jsxs("span",{className:"text-14px",children:["$",V4(e.fdv)]}),G.jsx("span",{className:"color-[var(--Gray-200)]",children:r("tableHeaders.price")}),G.jsxs("span",{className:"text-14px",children:["$",V4(e.token_price)]})]}),G.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-[8px_0px] text-left",children:[G.jsx("span",{className:"pr-40px color-[var(--Gray-200)] ",children:r("tableHeaders.pond")}),G.jsxs("span",{className:"text-14px",children:[V4(e.base_token_amount),e.base_token_symbol,G.jsxs("span",{className:"color-[var(--Gray-200)] text-12px",children:["≈$",V4(e.base_token_amount*e.base_token_price)]})]}),G.jsx("span",{className:"pr-40px color-[var(--Gray-200)]",children:r("tableHeaders.mkt_cap")}),G.jsxs("span",{className:"text-14px",children:["$",V4(e.mkt_cap)]})]})]})}),G.jsx(OO,{className:"m-0px!"}),G.jsxs("div",{className:"coin-hand w-100%",children:[G.jsxs("div",{className:"hand-time flex justify-between gap-12px",children:[G.jsxs("div",{children:[G.jsxs("p",{className:e.kline_5min>0?"green":"danger",children:[e.kline_5min>0?"+":"",(100*e.kline_5min||0).toFixed(2),"%"]}),G.jsx("span",{children:"5m"})]}),G.jsxs("div",{children:[G.jsxs("p",{className:e.kline_1h>0?"green":"danger",children:[e.kline_1h>0?"+":"",(100*e.kline_1h||0).toFixed(2),"%"]}),G.jsx("span",{children:"1h"})]}),G.jsxs("div",{children:[G.jsxs("p",{className:e.kline_6h>0?"green":"danger",children:[e.kline_6h>0?"+":"",(100*e.kline_6h||0).toFixed(2),"%"]}),G.jsx("span",{children:"6h"})]}),G.jsxs("div",{children:[G.jsxs("p",{className:e.kline_24h>0?"green":"danger",children:[e.kline_24h>0?"+":"",(100*e.kline_24h||0).toFixed(2),"%"]}),G.jsx("span",{children:"24h"})]})]}),G.jsx(OO,{className:"m-0px!"})]}),e.quick_operation_enum&&e.quick_operation_enum.length>0&&G.jsx("div",{className:"mt--12px hand-button p-[16px_16px_0_16px]! flex justify-between w-100% gap-8px b-t b-t-[var(--Split-line-100)] green",children:e.quick_operation_enum.map((t=>G.jsxs(ef,{type:"primary",className:"btn",status:"success",shape:"round",onClick:()=>{u(e,t)},children:[r("smart.buy"),t," ",V6[e.chain_id]]})))})]})}))(e)})]})})}var X6={exports:{}},K6={},Y6=60103,$6=60106,J6=60107,Q6=60108,e8=60114,t8=60109,n8=60110,r8=60112,i8=60113,o8=60120,s8=60115,a8=60116,l8=60121,c8=60122,u8=60117,d8=60129,f8=60131;if("function"==typeof Symbol&&Symbol.for){var h8=Symbol.for;Y6=h8("react.element"),$6=h8("react.portal"),J6=h8("react.fragment"),Q6=h8("react.strict_mode"),e8=h8("react.profiler"),t8=h8("react.provider"),n8=h8("react.context"),r8=h8("react.forward_ref"),i8=h8("react.suspense"),o8=h8("react.suspense_list"),s8=h8("react.memo"),a8=h8("react.lazy"),l8=h8("react.block"),c8=h8("react.server.block"),u8=h8("react.fundamental"),d8=h8("react.debug_trace_mode"),f8=h8("react.legacy_hidden")}functionp8(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Y6:switch(e=e.type){case J6:case e8:case Q6:case i8:case o8:return e;default:switch(e=e&&e.$$typeof){case n8:case r8:case a8:case s8:case t8:return e;default:return t}}case $6:return t}}}var m8=t8,g8=Y6,v8=r8,y8=J6,b8=a8,x8=s8,_8=$6,w8=e8,C8=Q6,k8=i8;K6.ContextConsumer=n8,K6.ContextProvider=m8,K6.Element=g8,K6.ForwardRef=v8,K6.Fragment=y8,K6.Lazy=b8,K6.Memo=x8,K6.Portal=_8,K6.Profiler=w8,K6.StrictMode=C8,K6.Suspense=k8,K6.isAsyncMode=function(){return!1},K6.isConcurrentMode=function(){return!1},K6.isContextConsumer=function(e){return p8(e)===n8},K6.isContextProvider=function(e){return p8(e)===t8},K6.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Y6},K6.isForwardRef=function(e){return p8(e)===r8},K6.isFragment=function(e){return p8(e)===J6},K6.isLazy=function(e){return p8(e)===a8},K6.isMemo=function(e){return p8(e)===s8},K6.isPortal=function(e){return p8(e)===$6},K6.isProfiler=function(e){return p8(e)===e8},K6.isStrictMode=function(e){return p8(e)===Q6},K6.isSuspense=function(e){return p8(e)===i8},K6.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===J6||e===e8||e===d8||e===Q6||e===i8||e===o8||e===f8||"object"==typeof e&&null!==e&&(e.$$typeof===a8||e.$$typeof===s8||e.$$typeof===t8||e.$$typeof===n8||e.$$typeof===r8||e.$$typeof===u8||e.$$typeof===l8||e[0]===c8)},K6.typeOf=p8,X6.exports=K6;var S8=X6.exports,E8=!("undefined"==typeof window||!window.document||!window.document.createElement);var A8={},j8=["Webkit","ms","Moz","O"],O8=new RegExp("^("+j8.join("|")+")"),N8=E8?document.createElement("div").style:{};function T8(e){var t=e.replace(/\-(\w)/g,(function(e){return e.slice(1).toUpperCase()}));if(void 0===A8[t]){var n=t.charAt(0).toUpperCase()+t.slice(1);if(O8.test(n))throw new Error("getVendorPrefixedName must only be called with unprefixed\n CSS property names. It was called with "+e);A8[t]=t in N8?t:function(e){for(var t=0;t<j8.length;t+=1){var n=j8[t]+e;if(n in N8)return n}return null}(n)}return A8[t]||t}const P8=function(){return!!T8("transform")},M8=function(){return!!T8("perspective")};function I8(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;throw new Error("unable to locate global object")}var L8=I8(),R8=T8("transform"),D8=T8("backfaceVisibility"),B8=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),e.left=t+"px",e.top=n+"px",e},F8=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),e[R8]="translate("+t+"px,"+n+"px)",e},H8=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),e[R8]="translate3d("+t+"px,"+n+"px,0)",e[D8]="hidden",e},z8=function(e){var t=e||{},n=t.enableTransform,r=void 0===n||n,i=t.enable3DTransform,o=void 0===i||i;if(t.forceUseTransform)return e.enable3DTransform?H8:F8;if(P8()&&r){vars=L8.window?L8.window.navigator.userAgent:"UNKNOWN";return!(/Safari\//.test(s)&&!/Chrome\//.test(s))&&M8()&&o?H8:F8}return B8};z8();var V8=SE&&new SE,U8=V8,G8=U8?function(e,t){return U8.set(e,t),e}:ZC,W8=G8,q8=tw,Z8=Ic;var X8=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=q8(e.prototype),r=e.apply(n,t);return Z8(r)?r:n}},K8=X8,Y8=Bc;var $8=function(e,t,n){var r=1&t,i=K8(e);return function t(){return(this&&this!==Y8&&this instanceof t?i:e).apply(r?n:this,arguments)}},J8=Math.max;var Q8=function(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,l=t.length,c=J8(o-s,0),u=Array(l+c),d=!r;++a<l;)u[a]=t[a];for(;++i<s;)(d||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[a++]=e[i++];return u},e9=Math.max;var t9=function(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,l=-1,c=t.length,u=e9(o-a,0),d=Array(u+c),f=!r;++i<u;)d[i]=e[i];for(var h=i;++l<c;)d[h+l]=t[l];for(;++s<a;)(f||i<o)&&(d[h+n[s]]=e[i++]);return d};var n9=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r};var r9=function(){},i9=tw,o9=r9;function s9(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}s9.prototype=i9(o9.prototype),s9.prototype.constructor=s9;var a9=s9;var l9=V8,c9=l9?function(e){return l9.get(e)}:function(){},u9={},d9=Object.prototype.hasOwnProperty;var f9=function(e){for(var t=e.name+"",n=u9[t],r=d9.call(u9,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t},h9=tw,p9=r9;function m9(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}m9.prototype=h9(p9.prototype),m9.prototype.constructor=m9;var g9=a9,v9=m9,y9=J_;var b9=a9,x9=m9,_9=r9,w9=xm,C9=ru,k9=function(e){if(e instanceof g9)return e.clone();var t=new v9(e.__wrapped__,e.__chain__);return t.__actions__=y9(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},S9=Object.prototype.hasOwnProperty;function E9(e){if(C9(e)&&!w9(e)&&!(e instanceof b9)){if(e instanceof x9)return e;if(S9.call(e,"__wrapped__"))return k9(e)}return new x9(e)}E9.prototype=_9.prototype,E9.prototype.constructor=E9;var A9=a9,j9=c9,O9=f9,N9=E9;var T9=function(e){var t=O9(e),n=N9[t];if("function"!=typeof n||!(t in A9.prototype))return!1;if(e===n)return!0;var r=j9(n);return!!r&&e===r[0]},P9=nk(W8),M9=/\{\n\/\* \[wrapped with (.+)\] \*/,I9=/,? & /;var L9=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var R9=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(L9,"{\n/* [wrapped with "+t+"] */\n")};var D9=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1};var B9=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},F9=D9,H9=function(e){return e!=e},z9=B9;var V9=function(e,t,n){return t==t?z9(e,t,n):F9(e,H9,n)};var U9=rP,G9=function(e,t){return!!(null==e?0:e.length)&&V9(e,t,0)>-1},W9=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var q9=function(e){var t=e.match(M9);return t?t[1].split(I9):[]},Z9=R9,X9=rk,K9=function(e,t){return U9(W9,(function(n){var r="_."+n[0];t&n[1]&&!G9(e,r)&&e.push(r)})),e.sort()};var Y9=function(e,t,n){var r=t+"";return X9(e,Z9(r,K9(q9(r),n)))},$9=T9,J9=P9,Q9=Y9;var e7=function(e,t,n,r,i,o,s,a,l,c){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],f=n.apply(void 0,d);return $9(e)&&J9(f,d),f.placeholder=r,Q9(f,e,t)};var t7=function(e){return e.placeholder},n7=J_,r7=oC,i7=Math.min;var o7=function(e,t){for(var n=e.length,r=i7(t.length,n),i=n7(e);r--;){var o=t[r];e[r]=r7(o,n)?i[o]:void 0}return e},s7="__lodash_placeholder__";var a7=function(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==s7||(e[n]=s7,o[i++]=n)}return o},l7=Q8,c7=t9,u7=n9,d7=X8,f7=e7,h7=t7,p7=o7,m7=a7,g7=Bc;var v7=function e(t,n,r,i,o,s,a,l,c,u){var d=128&n,f=1&n,h=2&n,p=24&n,m=512&n,g=h?void 0:d7(t);returnfunction v(){for(var y=arguments.length,b=Array(y),x=y;x--;)b[x]=arguments[x];if(p)var _=h7(v),w=u7(b,_);if(i&&(b=l7(b,i,o,p)),s&&(b=c7(b,s,a,p)),y-=w,p&&y<u){var C=m7(b,_);return f7(t,n,e,v.placeholder,r,b,C,l,c,u-y)}var k=f?r:this,S=h?k[t]:t;return y=b.length,l?b=p7(b,l):m&&y>1&&b.reverse(),d&&c<y&&(b.length=c),this&&this!==g7&&this instanceof v&&(S=g||d7(S)),S.apply(k,b)}},y7=XC,b7=X8,x7=v7,_7=e7,w7=t7,C7=a7,k7=Bc;var S7=function(e,t,n){var r=b7(e);return function i(){for(varo=arguments.length,s=Array(o),a=o,l=w7(i);a--;)s[a]=arguments[a];var c=o<3&&s[0]!==l&&s[o-1]!==l?[]:C7(s,l);return(o-=c.length)<n?_7(e,t,x7,i.placeholder,void 0,s,c,void 0,void 0,n-o):y7(this&&this!==k7&&this instanceof i?r:e,this,s)}},E7=XC,A7=X8,j7=Bc;var O7=function(e,t,n,r){var i=1&t,o=A7(e);return function t(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=Array(c+a),d=this&&this!==j7&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return E7(d,i?n:this,u)}},N7=Q8,T7=t9,P7=a7,M7="__lodash_placeholder__",I7=128,L7=Math.min;var R7=function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==I7&&8==n||r==I7&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var a=t[3];if(a){var l=e[3];e[3]=l?N7(l,a,t[4]):a,e[4]=l?P7(e[3],M7):t[4]}return(a=t[5])&&(l=e[5],e[5]=l?T7(l,a,t[6]):a,e[6]=l?P7(e[5],M7):t[6]),(a=t[7])&&(e[7]=a),r&I7&&(e[8]=null==e[8]?t[8]:L7(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e},D7=pu,B7=1/0;var F7=function(e){return e?(e=D7(e))===B7||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var H7=W8,z7=$8,V7=S7,U7=v7,G7=O7,W7=c9,q7=R7,Z7=P9,X7=Y9,K7=function(e){var t=F7(e),n=t%1;return t==t?n?t-n:t:0},Y7=Math.max;var $7=function(e,t,n,r,i,o,s,a){var l=2&t;if(!l&&"function"!=typeof e)throw new TypeError("Expected a function");var c=r?r.length:0;if(c||(t&=-97,r=i=void 0),s=void 0===s?s:Y7(K7(s),0),a=void 0===a?a:K7(a),c-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=l?void 0:W7(e),h=[e,t,n,r,i,u,d,o,s,a];if(f&&q7(h,f),e=h[0],t=h[1],n=h[2],r=h[3],i=h[4],!(a=h[9]=void 0===h[9]?l?0:e.length:Y7(h[9]-c,0))&&24&t&&(t&=-25),t&&1!=t)p=8==t||16==t?V7(e,t,a):32!=t&&33!=t||i.length?U7.apply(void 0,h):G7(e,t,n,r);else var p=z7(e,t,n);return X7((f?H7:Z7)(p,h),e,t)},J7=$7;function Q7(e,t,n){varr=J7(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=Q7.placeholder,r}Q7.placeholder={};function eee(e,t){return e&&t?Array.isArray(t)?j3(t.filter((function(e){return!!e})).map((function(t){return e+"-"+t}))):"-"===e[e.length-1]?""+e+t:e+"-"+t:""}function tee(e){var t,n,r;return es({},(null===(t=e.type)||void 0===t||null===(n=t.render)||void 0===n||null===(r=n.call(t))||void 0===r?void 0:r.props)||{},null==e?void 0:e.props)}_(Q7)(eee);const nee=_((function(e){return null==e}));var ree=["header","className","children","classPrefix","headerHeight","verticalAlign","align","width","groupHeaderHeight"],iee=w.forwardRef((function(e,t){var n=e.header,r=e.className,i=e.children,o=e.classPrefix,s=void 0===o?"column-group":o,a=e.headerHeight,l=void 0===a?80:a,c=e.verticalAlign,u=e.align,d=e.width,f=e.groupHeaderHeight,h=xa(e,ree),p=void 0!==f?l-f:l/2,m={height:void 0!==f?f:l/2,width:d},g=Dte(s),v=g.withClassPrefix,y=g.merge,b=g.prefix,x=y(r,v()),_=es({},Ote({verticalAlign:c,align:u}),m);return w.createElement("div",es({ref:t,className:x},h),w.createElement("div",{className:b("header"),style:m},w.createElement("div",{className:b("header-content"),style:_},n)),i?w.Children.map(i,(function(e){return w.cloneElement(e,{className:b("cell"),predefinedStyle:{height:p,top:m.height},headerHeight:p,verticalAlign:e.props.verticalAlign||c,children:w.createElement("span",{className:b("cell-content")},e.props.children)})})):null)}));iee.displayName="Table.ColumnGroup",iee.propTypes={header:Aa.node,classPrefix:Aa.string,groupHeaderHeight:Aa.number,verticalAlign:Aa.oneOf(["top","middle","bottom"])};var oee=v.createContext({});function see(){var e=v.useContext(oee)||{},t=e.classPrefix,n=void 0===t?"rs-":t,r=e.csp,i=e.disableInlineStyles;return{classPrefix:n,csp:r,disableInlineStyles:void 0!==i&&i}}oee.Provider;var aee=[],lee=[];function cee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!0===t.prepend?"prepend":"append",r=t.container||document.querySelector("head");if(!r)throw new Error("No container found to insert CSS.");var i,o=aee.indexOf(r);return-1===o&&(o=aee.push(r)-1,lee[o]={}),lee[o][n]?i=lee[o][n]:(i=function(e){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.setAttribute("data-insert-css","rsuite-icons"),e&&t.setAttribute("nonce",e),t}(t.nonce),lee[o][n]=i,"prepend"===n?r.insertBefore(i,r.firstChild):r.appendChild(i)),65279===e.charCodeAt(0)&&(e=e.slice(1)),i.styleSheet?i.styleSheet.cssText+=e:i.textContent+=e,i}var uee=!1;const dee=function(){var e=see(),t=e.csp,n=e.classPrefix,r=e.disableInlineStyles;v.useEffect((function(){uee||r||(cee(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rs-";return".".concat(e,"icon {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n vertical-align: middle;\n}\n.").concat(e,"icon[tabindex] {\n cursor: pointer;\n}\n.").concat(e,"icon-spin {\n -webkit-animation: icon-spin 2s infinite linear;\n animation: icon-spin 2s infinite linear;\n}\n.").concat(e,"icon-pulse {\n -webkit-animation: icon-spin 1s infinite steps(8);\n animation: icon-spin1s infinite steps(8);\n}\n.").concat(e,"icon-flip-horizontal {\n -webkit-transform: scaleX(-1);\n -ms-transform: scaleX(-1);\n transform: scaleX(-1);\n}\n.").concat(e,"icon-flip-vertical {\n -webkit-transform: scaleY(-1);\n -ms-transform: scaleY(-1);\n transform: scaleY(-1);\n}\n@-webkit-keyframes icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@keyframes icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}")}(n),{prepend:!0,nonce:null==t?void 0:t.nonce}),uee=!0)}),[])};function fee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pee(e){for(var t=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){hee(e,t,n[t])}))}return e}function mee(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(MJe){a=!0,i=MJe}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(!e)return;if("string"==typeofe)return fee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var vee=w.forwardRef((function(e,t){var n,r=e.as,i=e.spin,o=e.pulse,s=e.flip,a=e.fill,l=e.className,c=e.rotate,u=e.children,d=e.viewBox,f=e.width,h=e.height,p=e.style,m=mee(e,["as","spin","pulse","flip","fill","className","rotate","children","viewBox","width","height","style"]),g=gee(function(){var e,t=see().classPrefix,n="".concat(t,"icon");return[n,(e=n,function(t){return e&&t?Array.isArray(t)?j3(t.filter((function(e){return!!e})).map((function(t){return"".concat(e,"-").concat(t)}))):"".concat(e,"-").concat(t):""})]}(),2),v=g[0],y=g[1],b=j3(l,v,(hee(n={},y("spin"),i),hee(n,y("pulse"),o),hee(n,y("flip-".concat(s)),!!s),n)),x={msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")};dee();var _=function(e){var t={};return Object.entries(e).forEach((function(e){var n=gee(e,2),r=n[0],i=n[1];void 0!==i&&(t[r]=i)})),t}({width:f,height:h,fill:a,viewBox:d,className:b,style:c?pee({},x,p):p});return w.createElement(r,pee({"aria-hidden":!0,focusable:!1,ref:t},_,m),u)}));vee.displayName="Icon",vee.defaultProps={as:"svg",fill:"currentColor",width:"1em",height:"1em"},vee.propTypes={spin:Aa.bool,pulse:Aa.bool,rotate:Aa.number,viewBox:Aa.string,as:Aa.oneOfType([Aa.elementType,Aa.string]),flip:Aa.oneOf(["horizontal","vertical"]),fill:Aa.string};const yee=vee;function bee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xee(e){var t=e.as,n=e.ariaLabel,r=e.displayName,i=e.category,o=w.forwardRef((function(e,r){return w.createElement(yee,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){bee(e,t,n[t])}))}return e}({"aria-label":n,"data-category":i,ref:r,as:t},e))}));return o.displayName=r,o}function _ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wee=function(e,t){return v.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_ee(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",ref:t},e),v.createElement("path",{d:"M7.616 3.18a.5.5 0 0 1 .696-.071l.072.071 2.5 3a.5.5 0 0 1-.704.704l-.064-.064L8 4.281 5.884 6.82a.5.5 0 0 1-.63.115l-.074-.051a.5.5 0 0 1-.115-.63l.051-.074zM7.616 12.82a.5.5 0 0 0 .696.071l.072-.071 2.5-3a.5.5 0 0 0-.704-.704l-.064.064L8 11.719 5.884 9.18a.5.5 0 0 0-.63-.115l-.074.051a.5.5 0 0 0-.115.63l.051.074z"}))};const Cee=xee({as:v.forwardRef(wee),ariaLabel:"sort",category:"direction",displayName:"Sort"});function kee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var See=function(e,t){return v.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kee(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",ref:t},e),v.createElement("path",{d:"M8.5 2a.5.5 0 0 1 .394.192l3.996 4.996a.5.5 0 1 1-.781.625l-3.11-3.887v9.575a.5.5 0 0 1-1 0V3.926l-3.11 3.887a.5.5 0 1 1-.781-.625l3.998-4.997.013-.015a.5.5 0 01 .38-.175z"}))};const Eee=xee({as:v.forwardRef(See),ariaLabel:"sort up",category:"direction",displayName:"SortUp"});function Aee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jee=function(e,t){return v.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Aee(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",ref:t},e),v.createElement("path",{d:"M8.5 14a.5.5 0 0 0 .394-.192l3.996-4.996a.5.5 0 1 0-.781-.625l-3.11 3.887V2.499a.5.5 0 0 0-1 0v9.575l-3.11-3.887a.5.5 0 1 0-.781.625l3.998 4.997.013.015a.5.5 0 0 0 .38.175z"}))};const Oee=xee({as:v.forwardRef(jee),ariaLabel:"sort down",category:"direction",displayName:"SortDown"});var Nee=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e},Tee=pu;const Pee=_((function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Tee(n))==n?n:0),void 0!==t&&(t=(t=Tee(t))==t?t:0),Nee(Tee(e),t,n)}));function Mee(e,t,n,r){return void 0===r&&(r=!1),e.addEventListener(t,n,r),{off:function(){e.removeEventListener(t,n,r)}}}var Iee=I8(),Lee=Iee.cancelAnimationFrame||Iee.clearTimeout,Ree=I8(),Dee=0;var Bee=Ree.requestAnimationFrame||function(e){var t=Date.now(),n=Math.max(0,16-(t-Dee));return Dee=t+n,Ree.setTimeout((function(){e(Date.now())}),n)},Fee=function(){function e(e,t,n){var r=this;this.isDraggingStatus=!1,this.animationFrameID=null,this.domNode=void 0,this.onMove=null,this.onMoveEnd=null,this.eventMoveToken=null,this.eventUpToken=null,this.moveEvent=null,this.deltaX=0,this.deltaY=0,this.x=0,this.y=0,this.isDragging=function(){returnr.isDraggingStatus},this.onMouseMove=function(e){var t=e.clientX,n=e.clientY;r.deltaX+=t-r.x,r.deltaY+=n-r.y,null===r.animationFrameID&&(r.animationFrameID=Bee(r.didMouseMove)),r.x=t,r.y=n,r.moveEvent=e,e.preventDefault()},this.didMouseMove=function(){r.animationFrameID=null,r.onMove(r.deltaX,r.deltaY,r.moveEvent),r.deltaX=0,r.deltaY=0},this.onMouseUp=function(e){r.animationFrameID&&r.didMouseMove(),r.onMoveEnd&&r.onMoveEnd(e)},this.domNode=n,this.onMove=e,this.onMoveEnd=t}var t=e.prototype;return t.captureMouseMoves=function(e){this.eventMoveToken||this.eventUpToken||(this.eventMoveToken=Mee(this.domNode,"mousemove",this.onMouseMove),this.eventUpToken=Mee(this.domNode,"mouseup",this.onMouseUp)),this.isDraggingStatus||(this.deltaX=0,this.deltaY=0,this.isDraggingStatus=!0,this.x=e.clientX,this.y=e.clientY),e.preventDefault()},t.releaseMouseMoves=function(){this.eventMoveToken&&(this.eventMoveToken.off(),this.eventMoveToken=null),this.eventUpToken&&(this.eventUpToken.off(),this.eventUpToken=null),null!==this.animationFrameID&&(Lee(this.animationFrameID),this.animationFrameID=null),this.isDraggingStatus&&(this.isDraggingStatus=!1,this.x=0,this.y=0)},e}(),Hee=z8({enable3DTransform:!0});functionzee(){return"undefined"!=typeof window&&"rtl"===(document.body.getAttribute("dir")||document.dir)}var Vee=w.createContext({rtl:zee(),isTree:!1,hasCustomTreeCol:!1,translateDOMPositionXY:Hee}),Uee=10,Gee="desc",Wee="asc",qee="cubic-bezier(0, 0, .58, 1)",Zee=Symbol("expanded"),Xee=Symbol("parent"),Kee=Symbol("treeDepth"),Yee=["columnLeft","classPrefix","height","className","style","columnFixed","defaultColumnWidth","minWidth","onColumnResizeStart","onColumnResizeMove","onColumnResizeEnd"],$ee=w.forwardRef((function(e,t){var n,r=e.columnLeft,i=void 0===r?0:r,o=e.classPrefix,s=void 0===o?"column-resize-spanner":o,a=e.height,l=e.className,c=e.style,u=e.columnFixed,d=e.defaultColumnWidth,f=e.minWidth,h=e.onColumnResizeStart,p=e.onColumnResizeMove,m=e.onColumnResizeEnd,g=xa(e,Yee),y=v.useContext(Vee).rtl,b=Dte(s),x=b.withClassPrefix,_=(0,b.merge)(l,x()),C=v.useRef(d||0),k=v.useRef(),S=v.useRef(),E=v.useRef(0),A=v.useCallback((function(e){S.current&&(E.current+=e,C.current=Pee((d||0)+(y?-E.current:E.current),f?Math.max(f,20):20,2e4),null==p||p(C.current,i,u))}),[u,i,d,f,p,y]),j=v.useCallback((function(){var e,t;S.current=!1,null==m||m(C.current,E.current),null===(e=k.current)||void 0===e||null===(t=e.releaseMouseMoves)||void 0===t||t.call(e),k.current=null}),[m]),O=v.useCallback((function(){return k.current||new Fee(A,j,document.body)}),[j,A]),N=v.useCallback((function(e){k.current=O(),k.current.captureMouseMoves(e),S.current=!0,E.current=0;var t={clientX:e.clientX,clientY:e.clientY,preventDefault:Function()};null==h||h(t)}),[O,h]);if(v.useEffect((function(){return function(){var e;null===(e=k.current)||void 0===e||e.releaseMouseMoves(),k.current=null}}),[]),"right"===u)return null;var T=es(((n={})[y?"right":"left"]=C.current+i-2,n.height=a,n),c);return w.createElement("div",es({tabIndex:-1,role:"button",ref:t},g,{className:_,style:T,onMouseDown:N}))}));function Jee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}$ee.displayName="Table.ColumnResizeHandler";var Qee=function(e,t){return v.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Jee(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",ref:t},e),v.createElement("path",{d:"m6 12 4-4-4-4z"}))};const ete=xee({as:v.forwardRef(Qee),ariaLabel:"arrow right",category:"direction",displayName:"ArrowRight"});function tte(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nte=function(e,t){return v.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tte(e,t,n[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",ref:t},e),v.createElement("path",{d:"m4 6 4 4 4-4z"}))};const rte=xee({as:v.forwardRef(nte),ariaLabel:"arrow down",category:"direction",displayName:"ArrowDown"});function ite(e){return w.createElement(w.Fragment,null)}var ote={align:Aa.string,verticalAlign:Aa.string,width:Aa.number,fixed:Aa.oneOfType([Aa.bool,Aa.oneOf(["left","right"])]),resizable:Aa.bool,sortable:Aa.bool,flexGrow:Aa.number,minWidth:Aa.number,colSpan:Aa.number,rowSpan:Aa.func,treeCol:Aa.bool,onResize:Aa.func,children:Aa.node,fullText:Aa.bool};ite.displayName="Table.Column",ite.defaultProps={width:100},ite.propTypes=ote;var ste=Object.keys(ote),ate=["classPrefix","width","left","headerHeight","depth","height","style","className","fullText","firstColumn","lastColumn","isHeaderCell","align","children","rowData","dataKey","rowIndex","removed","rowKey","rowSpan","wordWrap","verticalAlign","expanded","treeCol","hasChildren","predefinedStyle","renderCell","renderTreeToggle","onClick","onTreeToggle"],lte=["groupCount","groupHeader","groupHeaderHeight","groupAlign","groupVerticalAlign","renderSortIcon"],cte=w.forwardRef((function(e,t){var n,r,i=e.classPrefix,o=void 0===i?"cell":i,s=e.width,a=void 0===s?0:s,l=e.left,c=void 0===l?0:l,u=e.headerHeight,d=void 0===u?40:u,f=e.depth,h=void 0===f?0:f,p=e.height,m=void 0===p?46:p,g=e.style,y=e.className,b=e.fullText,x=e.firstColumn,_=e.lastColumn,C=e.isHeaderCell,k=e.align,S=e.children,E=e.rowData,A=e.dataKey,j=e.rowIndex,O=e.removed,N=e.rowKey,T=e.rowSpan,P=e.wordWrap,M=e.verticalAlign,I=e.expanded,L=e.treeCol,R=e.hasChildren,D=e.predefinedStyle,B=e.renderCell,F=e.renderTreeToggle,H=e.onClick,z=e.onTreeToggle,V=xa(e,ate),U=w.useContext(Vee),G=U.rtl,W=U.hasCustomTreeCol,q=U.isTree,Z=L||!W&&x&&q,X="function"==typeof m?E?m(E):46:m;if(Z&&!C&&!E)throw new Error("[Table.Cell]: `rowData` is required for tree column");var K=v.useCallback((function(e){null==z||z(N,j,E,e)}),[z,E,j,N]),Y=Dte(o),$=Y.withClassPrefix,J=Y.merge,Q=Y.prefix,ee=J(y,$({expanded:I&&Z,first:x,last:_,rowspan:T&&!C,"full-text":b})),te=C?d:X,ne=es({},D,((n={})[b?"minWidth":"width"]=a,n.height=te,n.zIndex=h,n[G?"right":"left"]=c,n)),re=G?"paddingRight":"paddingLeft",ie=es({},Ote({align:k,verticalAlign:M}),g,((r={width:b?a-1:a,height:te})[re]=Z?30*h+10:(null==g?void 0:g[re])||(null==g?void 0:g.padding),r));P&&(ie.wordBreak="boolean"==typeof P?"break-all":P,ie.overflowWrap="break-word"===P?P:void 0);var oe=null;"function"==typeof S?oe=E?S(E,j):null:nee(S)?E&&A&&(oe=Cv(E,A)):oe=S;var se=function(){var e=I?rte:ete,t=w.createElement(e,{className:Q("expand-icon")});return Z&&R?w.createElement("span",{role:"button",tabIndex:-1,className:Q("expand-wrapper"),onClick:K},F?F(t,E,I):t):null},ae=P?w.createElement("div",{className:Q("wrap")},se(),B?B(oe):oe):w.createElement(w.Fragment,null,se(),B?B(oe):oe);return O?null:w.createElement("div",es({ref:t,role:C?"columnheader":"gridcell"},tI(V,[].concat(lte,ste)),{onClick:H,className:ee,style:ne}),w.createElement("div",{className:Q("content"),style:ie},ae))}));cte.displayName="Table.Cell",cte.propTypes={align:Aa.string,verticalAlign:Aa.string,className:Aa.string,classPrefix:Aa.string,dataKey:Aa.string,isHeaderCell:Aa.bool,width:Aa.number,height:Aa.oneOfType([Aa.number,Aa.func]),left:Aa.number,headerHeight:Aa.number,style:Aa.object,firstColumn:Aa.bool,lastColumn:Aa.bool,hasChildren:Aa.bool,children:Aa.any,rowKey:Aa.oneOfType([Aa.string,Aa.number]),rowIndex:Aa.number,rowData:Aa.object,depth:Aa.number,onTreeToggle:Aa.func,renderTreeToggle:Aa.func,renderCell:Aa.func,wordWrap:Aa.any,removed:Aa.bool,treeCol:Aa.bool,expanded:Aa.bool,fullText:Aa.bool};var ute=["className","classPrefix","width","dataKey","headerHeight","children","left","sortable","sortColumn","sortType","groupHeader","resizable","fixed","minWidth","index","flexGrow","align","verticalAlign","onColumnResizeEnd","onResize","onColumnResizeStart","onColumnResizeMove","onSortColumn","renderSortIcon"],dte={desc:Oee,asc:Eee},fte=w.forwardRef((function(e,t){var n=e.className,r=e.classPrefix,i=void 0===r?"cell-header":r,o=e.width,s=e.dataKey,a=e.headerHeight,l=e.children,c=e.left,u=e.sortable,d=e.sortColumn,f=e.sortType,h=e.groupHeader,p=e.resizable,m=e.fixed,g=e.minWidth,y=e.index,b=e.flexGrow,x=e.align,_=e.verticalAlign,C=e.onColumnResizeEnd,k=e.onResize,S=e.onColumnResizeStart,E=e.onColumnResizeMove,A=e.onSortColumn,j=e.renderSortIcon,O=xa(e,ute),N=v.useState(nee(b)?o:0),T=N[0],P=N[1];Mte((function(){P(nee(b)?o:0)}),[b,o]);var M,I=Dte(i),L=I.withClassPrefix,R=I.merge,D=I.prefix,B=R(n,L({sortable:u}));d===s&&(M="other","asc"===f?M="ascending":"desc"===f&&(M="descending"));var F=v.useCallback((function(){u&&(null==A||A(s))}),[s,A,u]),H=v.useCallback((function(){null==S||S(T,c,!!m)}),[T,m,c,S]),z=v.useCallback((function(e,t){P(e),null==C||C(e,t,s,y),null==k||k(e,s)}),[s,y,C,k]);return w.createElement("div",{ref:t,className:B},w.createElement(cte,es({"aria-sort":M},O,{width:o,dataKey:s,left:c,headerHeight:a,isHeaderCell:!0,align:h?void 0:x,verticalAlign:h?void 0:_,onClick:h?void 0:F}),l,function(){if(u&&!h){var e,t=d===s&&f?dte[f]:Cee,n=j3(D("icon-sort"),((e={})[D("icon-sort-"+f)]=d===s,e)),r=j?j(d===s?f:void 0):w.createElement(t,{className:n});return w.createElement("span",{className:D("sort-wrapper")},r)}return null}()),p?w.createElement($ee,{defaultColumnWidth:T,key:T,columnLeft:c,columnFixed:m,height:a?a-1:void 0,minWidth:g,onColumnResizeMove:E,onColumnResizeStart:H,onColumnResizeEnd:z}):null)}));function hte(e,t){return w.cloneElement(e,t)}function pte(e){for(var t=[],n=0;n<e.length;n+=1){var r=e[n].props,i=r.width,o=r.colSpan,s=r.groupCount,a=r.groupHeader,l=r.groupAlign,c=r.groupVerticalAlign,u=r.isHeaderCell,d=r.headerHeight,f=r.groupHeaderHeight,h=[];if(s&&u){for(var p=i,m=0,g=0;g<s;g+=1){var v=e[n+g],y=v.props,b=y.width,x=y.sortable,_=y.children,C=y.dataKey,k=y.onSortColumn,S=y.sortColumn,E=y.sortType,A=y.align,j=y.verticalAlign,O=y.renderSortIcon;0!==g&&(p+=b,m+=e[n+g-1].props.width,e[n+g]=hte(v,{removed:!0})),h.push(w.createElement(fte,{key:g,left:m,align:A,verticalAlign:j,dataKey:C,width:b,sortable:x,sortColumn:S,sortType:E,onSortColumn:k,renderSortIcon:O},_))}t.push(hte(e[n],{width:p,children:w.createElement(iee,{width:p,headerHeight:d,header:a,align:l,verticalAlign:c,groupHeaderHeight:f},h)}))}else if(o){for(var N=i,T=0;T<o;T+=1){var P=e[n+T];if(P){var M=P.props,I=M.rowData,L=M.rowIndex,R=M.children,D=M.width,B=M.isHeaderCell,F=M.dataKey,H=Om(R)?R(I,L):Cv(I,F);(I&&nee(H)||B&&nee(R))&&(N+=D,e[n+T]=hte(P,{removed:!0}))}}t.push(hte(e[n],{width:N,"aria-colspan":N>i?o:void 0}))}else t.push(e[n])}return t}function mte(e,t){return t&&(e.classList?e.classList.add(t):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+e.className+" ").indexOf(" "+t+" ")}(e,t)||(e.className=e.className+" "+t)),e}function gte(e,t){return t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")),e}fte.displayName="HeaderCell",fte.propTypes={index:Aa.number,sortColumn:Aa.string,sortType:Aa.oneOf(["desc","asc"]),sortable:Aa.bool,resizable:Aa.bool,minWidth:Aa.number,onColumnResizeStart:Aa.func,onColumnResizeEnd:Aa.func,onResize:Aa.func,onColumnResizeMove:Aa.func,onSortColumn:Aa.func,flexGrow:Aa.number,fixed:Aa.any,children:Aa.node,renderSortIcon:Aa.func};var vte=function(e,t,n){n?mte(e,t):gte(e,t)};const yte=function(e,t,n){e&&(Array.isArray(e)||Object.getPrototypeOf(e).hasOwnProperty("length")?Array.from(e).forEach((function(e){vte(e,t,n)})):vte(e,t,n))};function bte(e,t){return e.reduce((function(e,n){var r,i=es({},n,((r={})[Xee]=t,r));return e.push.apply(e,[i].concat(n.children?bte(n.children,i):[])),e}),[])}function xte(e,t,n){var r=[];if(!t)return r;for(var i=0;i<e.length;i++){var o=e[i];o.children?(r.push(o[t]),r=[].concat(r,xte(o.children,t))):n&&r.push(o[t])}return r}function _te(e,t){for(var n=0,r=[],i=0;i<e.length;i++){var o=e[i],s=w.cloneElement(o,{left:n,width:i===e.length-1&&t?o.props.width+t:o.props.width});n+=o.props.width,r.push(s)}return r}function wte(e){return void 0!==e&&(!!e||0===e)}var Cte=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};function kte(){return E8&&"ontouchstart"in window}var Ste={top:"flex-start",middle:"center",bottom:"flex-end"},Ete={left:"flex-start",center:"center",right:"flex-end"};function Ate(e){return Ste[e]||e}function jte(e){return Ete[e]||e}function Ote(e){var t=e.verticalAlign,n=e.align;return t||n?{display:"flex",flexWrap:"wrap",alignItems:Ate(t),justifyContent:jte(n)}:{}}var Nte=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)};const Tte=_(ak((function(e,t){return Nte(e,1,t)}))),Pte=function(e){Tte(e,"deferred")};var Mte=function(e,t){var n=v.useRef(!0);v.useEffect((function(){n.current?n.current=!1:e()}),t)},Ite=E8?v.useLayoutEffect:v.useEffect,Lte=function(e,t){var n=v.useRef(!0);Ite((function(){n.current?n.current=!1:e()}),t)},Rte=function(e){Ite(e,[])};function Dte(e,t){var n=(v.useContext(Vee)||{}).classPrefix,r=void 0===n?"rs":n,i=t?e:eee(r,e),o=v.useCallback((function(){return(arguments.length?j3.apply(void 0,arguments).split(" ").map((function(e){return eee(i,e)})):[]).filter((function(e){return e})).join(" ")}),[i]),s=v.useCallback((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o(t);return r?i+" "+r:i}),[i,o]);return{withClassPrefix:s,merge:j3,prefix:o,rootPrefix:function(){return(arguments.length?j3.apply(void 0,arguments).split(" ").map((function(e){return eee(r,e)})):[]).filter((function(e){return e})).join(" ")}}}function Bte(e,t){var n=v.useRef(!1);n.current=void 0!==e;var r=v.useState(t),i=r[0],o=r[1];return[n.current?e:i,v.useCallback((function(e){n.current||o(e)}),[n]),n.current]}function Fte(e){var t=Array.isArray(e)?e:[e],n=UM(t).map((function(e){if((null==e?void 0:e.type)===iee){var t=null==e?void 0:e.props,n=t.header,r=t.children,i=t.align,o=t.fixed,s=t.verticalAlign,a=t.groupHeaderHeight,l=Fte(r);return l.map((function(e,t){var r=es({},null==e?void 0:e.props,{groupHeaderHeight:a,fixed:o,align:(null==e?void 0:e.props.align)||i,verticalAlign:(null==e?void 0:e.props.verticalAlign)||s});return 0===t&&(r.groupAlign=i,r.groupVerticalAlign=s,r.groupCount=l.length,r.groupHeader=n,r.resizable=!1),w.cloneElement(e,r)}))}var c;return S8.isFragment(e)?Fte(null===(c=e.props)||void 0===c?void 0:c.children):Array.isArray(e)?Fte(e):e}));return UM(n).filter(Boolean)}var Hte=/^ms-/;const zte=function(e){return function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}(e).replace(Hte,"-ms-")};function Vte(e,t){var n,r;null===(n=e.style)||void 0===n||null===(r=n.removeProperty)||void 0===r||r.call(n,t)}function Ute(e,t){"string"==typeof t?Vte(e,t):Array.isArray(t)&&t.forEach((function(t){return Vte(e,t)}))}function Gte(e,t,n){var r="",i=t;if("string"==typeof t){if(void 0===n)throw new Error("value is undefined");(i={})[t]=n}if("object"==typeof i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(i[o]||0===i[o]?r+=zte(o)+":"+i[o]+";":Ute(e,zte(o)));e.style.cssText+=";"+r}var Wte=parseInt(C.version),qte=function(e){var t;Wte>=18?null===(t=C.flushSync)||void 0===t||t.call(C,e):e()},Zte=function(e){var t=e.children,n=e.rtl,r=e.mouseAreaRef,i=e.tableRef,o=e.minScrollX,s=e.scrollX,a=e.tableWidth,l=e.headerHeight,c=e.showHeader,u=e.sortType,d=e.defaultSortType,f=e.sortColumn,h=e.rowHeight,p=e.onSortColumn,m=e.onHeaderCellResize,g=e.prefix,y=Bte(u,d),b=y[0],x=y[1],_=v.useState(),C=_[0],k=_[1],S=v.useCallback((function(){k(null)}),[]),E=v.useCallback((function(e){i.current&&(e?mte(i.current,g("column-resizing")):gte(i.current,g("column-resizing")))}),[g,i]),A=v.useRef({}),j=v.useRef({});Rte((function(){S()})),Mte((function(){S()}),[t,f,b,a.current,s.current,o.current]);var O=v.useCallback((function(e,t,n,i){j.current[n+"_"+i+"_width"]=e,E(!1),r.current&&Gte(r.current,{display:"none"}),qte((function(){return S()})),null==m||m(e,n)}),[S,r,m,E]),N=v.useCallback((function(e,t,i){var a,l=e+t,c=l,u="left";(n&&(l+=o.current+Uee,u="right"),i||(c=l+(n?-s.current:s.current)),r.current)&&Gte(r.current,((a={display:"block"})[u]=c+"px",a))}),[o,r,n,s]),T=v.useCallback((function(e,t,n){E(!0),N(e,t,n)}),[N,E]),P=v.useCallback((function(e){var t=b;f===e&&x(t=b===Wee?Gee:Wee),null==p||p(e,t)}),[p,x,f,b]);if(C)return C;var M=!1,I=0,L=[],R=[];if(!t){var D={columns:[],headerCells:L,bodyCells:R,hasCustomTreeCol:M,allColumnsWidth:I};return k(D),D}var B=Fte(t),F=B.length,H=function(e){var t=0,n=0,r=function(e){Array.from(e).forEach((function(e){if(w.isValidElement(e)){var i=tee(e),o=i.flexGrow,s=i.width;t+=o||0,n+=o||void 0===s?0:s}else Array.isArray(e)&&r(e)}))};if(Array.isArray(e))r(e);else if(Dw(e)){var i=null==e?void 0:e.props,o=i.flexGrow,s=i.width;t=o||0,n=o||void 0===s?0:s}return{totalFlexGrow:t,totalWidth:n}}(B),z=H.totalFlexGrow,V=H.totalWidth;w.Children.forEach(B,(function(e,t){if(w.isValidElement(e)){var n,r,i=e.props.children,o=tee(e),s=o.width,u=o.resizable,d=o.flexGrow,p=o.minWidth,m=o.onResize;if(o.treeCol&&(M=!0),2!==i.length)throw new Error("Component <HeaderCell> and <Cell> is required, column index: "+t+" ");var g=i[0],v=i[1],y=v.props.dataKey+"_"+t+"_width",x=null===(n=A.current)||void 0===n?void 0:n[y],_=null===(r=j.current)||void 0===r?void 0:r[y],C=_||s||0,k="number"==typeof s&&"function"==typeof m;if(u&&(x||s)&&x!==s&&(A.current[y]=s,_&&(j.current[y]=s,C=s)),a.current&&d&&z){var S=Math.max((a.current-V)/z*d,p||60);C=u&&_||S}var E=es({},tI(o,["children"]),{"aria-colindex":t+1,left:I,headerHeight:l,key:t,width:k?s:C,height:"function"==typeof h?h():h,firstColumn:0===t,lastColumn:t===F-1});if(c&&l){var D={index:t,dataKey:v.props.dataKey,isHeaderCell:!0,minWidth:o.minWidth,sortable:o.sortable,onSortColumn:P,sortType:b,sortColumn:f,flexGrow:u?void 0:d};u&&gk(D,{onResize:m,onColumnResizeEnd:O,onColumnResizeStart:T,onColumnResizeMove:N}),L.push(w.cloneElement(g,es({},E,D)))}R.push(w.cloneElement(v,E)),I+=C}}));var U={columns:B,headerCells:L,bodyCells:R,allColumnsWidth:I,hasCustomTreeCol:M};return k(U),U};function Xte(e){return e===(null==e?void 0:e.window)?e:9===(null==e?void 0:e.nodeType)?(null==e?void 0:e.defaultView)||(null==e?void 0:e.parentWindow):null}var Kte=function(e,t){if(!t)return!1;do{if(t===e)return!0}while(t.parentNode&&(t=t.parentNode));return!1};const Yte=E8?function(e,t){return!!t&&(e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):Kte(e,t))}:Kte;function $te(e){var t=function(e){return e&&e.ownerDocument||document}(e),n=Xte(t),r=t&&t.documentElement,i={top:0,left:0,height:0,width:0};return t?Yte(r,e)?(void 0!==(null==e?void 0:e.getBoundingClientRect)&&(i=e.getBoundingClientRect()),(i.width||i.height)&&r&&n&&(i={top:i.top+(n.pageYOffset||r.scrollTop)-(r.clientTop||0),left:i.left+(n.pageXOffset||r.scrollLeft)-(r.clientLeft||0),width:(null===i.width?e.offsetWidth:i.width)||0,height:(null===i.height?e.offsetHeight:i.height)||0}),i):i:null}function Jte(e,t){var n=Xte(e);if(n)return n.innerWidth;if(t)return e.clientWidth;var r=$te(e);return r?r.width:0}function Qte(e,t){var n=Xte(e);return n?n.innerHeight:t?e.clientHeight:$te(e).height}var ene,tne,nne=[],rne="ResizeObserver loop completed with undelivered notifications.";(tne=ene||(ene={})).BORDER_BOX="border-box",tne.CONTENT_BOX="content-box",tne.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var ine,one=function(e){return Object.freeze(e)},sne=function(e,t){this.inlineSize=e,this.blockSize=t,one(this)},ane=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,one(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),lne=function(e){return e instanceof SVGElement&&"getBBox"in e},cne=function(e){if(lne(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||e.getClientRects().length)},une=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},dne="undefined"!=typeof window?window:{},fne=new WeakMap,hne=/auto|scroll/,pne=/^tb|vertical/,mne=/msie|trident/i.test(dne.navigator&&dne.navigator.userAgent),gne=function(e){return parseFloat(e||"0")},vne=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new sne((n?t:e)||0,(n?e:t)||0)},yne=one({devicePixelContentBoxSize:vne(),borderBoxSize:vne(),contentBoxSize:vne(),contentRect:new ane(0,0,0,0)}),bne=function(e,t){if(void 0===t&&(t=!1),fne.has(e)&&!t)return fne.get(e);if(cne(e))return fne.set(e,yne),yne;var n=getComputedStyle(e),r=lne(e)&&e.ownerSVGElement&&e.getBBox(),i=!mne&&"border-box"===n.boxSizing,o=pne.test(n.writingMode||""),s=!r&&hne.test(n.overflowY||""),a=!r&&hne.test(n.overflowX||""),l=r?0:gne(n.paddingTop),c=r?0:gne(n.paddingRight),u=r?0:gne(n.paddingBottom),d=r?0:gne(n.paddingLeft),f=r?0:gne(n.borderTopWidth),h=r?0:gne(n.borderRightWidth),p=r?0:gne(n.borderBottomWidth),m=d+c,g=l+u,v=(r?0:gne(n.borderLeftWidth))+h,y=f+p,b=a?e.offsetHeight-y-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,_=i?m+v:0,w=i?g+y:0,C=r?r.width:gne(n.width)-_-x,k=r?r.height:gne(n.height)-w-b,S=C+m+x+v,E=k+g+b+y,A=one({devicePixelContentBoxSize:vne(Math.round(C*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:vne(S,E,o),contentBoxSize:vne(C,k,o),contentRect:new ane(d,l,C,k)});return fne.set(e,A),A},xne=function(e,t,n){var r=bne(e,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case ene.DEVICE_PIXEL_CONTENT_BOX:return s;case ene.BORDER_BOX:return i;default:return o}},_ne=function(e){var t=bne(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=one([t.borderBoxSize]),this.contentBoxSize=one([t.contentBoxSize]),this.devicePixelContentBoxSize=one([t.devicePixelContentBoxSize])},wne=function(e){if(cne(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Cne=function(){var e=1/0,t=[];nne.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new _ne(t.target),i=wne(t.target);r.push(n),t.lastReportedSize=xne(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},kne=function(e){nne.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(wne(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Sne=function(){var e,t=0;for(kne(t);nne.some((function(e){return e.activeTargets.length>0}));)t=Cne(),kne(t);return nne.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:rne}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=rne),window.dispatchEvent(e)),t>0},Ene=[],Ane=function(e){if(!ine){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Ene.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),ine=function(){n.textContent="".concat(t?t--:t++)}}Ene.push(e),ine()},jne=0,One={attributes:!0,characterData:!0,childList:!0,subtree:!0},Nne=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Tne=function(e){return void 0===e&&(e=0),Date.now()+e},Pne=!1,Mne=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Pne){Pne=!0;var n,r=Tne(e);n=function(){var n=!1;try{n=Sne()}finally{if(Pne=!1,e=r-Tne(),!jne)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Ane((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,One)};document.body?t():dne.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Nne.forEach((function(t){return dne.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Nne.forEach((function(t){return dne.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Ine=function(e){!jne&&e>0&&Mne.start(),!(jne+=e)&&Mne.stop()},Lne=function(){function e(e,t){this.target=e,this.observedBox=t||ene.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=xne(this.target,this.observedBox,!0);return e=this.target,lne(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Rne=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Dne=new WeakMap,Bne=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Fne=function(){function e(){}return e.connect=function(e,t){var n=new Rne(e,t);Dne.set(e,n)},e.observe=function(e,t,n){var r=Dne.get(e),i=0===r.observationTargets.length;Bne(r.observationTargets,t)<0&&(i&&nne.push(r),r.observationTargets.push(new Lne(t,n&&n.box)),Ine(1),Mne.schedule())},e.unobserve=function(e,t){var n=Dne.get(e),r=Bne(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&nne.splice(nne.indexOf(n),1),n.observationTargets.splice(r,1),Ine(-1))},e.disconnect=function(e){var t=this,n=Dne.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Hne=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Fne.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!une(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Fne.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!une(e))thrownew TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Fne.unobserve(this,e)},e.prototype.disconnect=function(){Fne.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),zne=function(e){var t=e.data,n=e.rowHeight,r=e.tableRef,i=e.headerWrapperRef,o=e.prefix,s=e.width,a=e.affixHeader,l=e.affixHorizontalScrollbar,c=e.headerHeight,u=e.height,d=e.autoHeight,f=e.minHeight,h=e.maxHeight,p=e.fillHeight,m=e.children,g=e.expandedRowKeys,y=e.showHeader,b=e.bordered,x=e.onTableResizeChange,_=e.onTableScroll,w=v.useRef(0),C=v.useRef(0),k=v.useRef(0),S=v.useRef(0),E=v.useRef(0),A=v.useRef(0),j=v.useRef(s||0),O=v.useRef(u||0),N=v.useRef(0),T=v.useRef(),P=v.useRef(),M=v.useRef(null),I=v.useRef(null),L=v.useMemo((function(){return d&&!h}),[d,h]),R=v.useCallback((function(e){return"function"==typeof n?n(e):n}),[n]),D=v.useCallback((function(){var e,n=w.current,i=null==r?void 0:r.current,s=(null==i?void 0:i.querySelectorAll("."+(null==o?void 0:o("row"))))||[],l=(null==i||null===(e=i.querySelectorAll(".virtualized"))||void 0===e?void 0:e.length)>0,d=s.length?Array.from(s).map((function(e,n){return Qte(e)||R(null==t?void 0:t[n])})).reduce((function(e,t){return e+t})):0;w.current=Math.round(d-(a?2*c:c));var f=C.current>j.current;L&&f&&(w.current+=Uee);var m=p?O.current:Math.max(u,h||0),g=y?m-c:m;L||(k.current=-(d-m)-(f?Uee:0)),d<m&&(null==_||_({y:0}));var v=Math.abs(S.current),b=d+Uee-g;b>0&&v>b&&(l?null==_||_({y:((null==t?void 0:t.length)||0)*R()-g}):null==_||_({y:b})),n!==w.current&&(null==x||x(n,"bodyHeightChanged"))}),[r,o,a,c,L,h,p,u,y,R,t,_,x]),B=v.useCallback((function(){var e=null==i?void 0:i.current;wte(a)&&e&&(M.current=$te(e)),wte(l)&&null!=r&&r.current&&(I.current=$te(null==r?void 0:r.current))}),[a,l,i,r]),F=v.useCallback((function(){var e=C.current,t=N.current,n=null==r?void 0:r.current,i=null==n?void 0:n.querySelector("."+o("row")+":not(.virtualized)"),s=i?Jte(i):0,a=C.current>j.current?0:Uee;C.current=s-(L?a:0),N.current=(null==i?void 0:i.querySelectorAll("."+o("cell")).length)||0;var l=-(s-j.current)-(L?0:a);A.current!==l&&(A.current=l,E.current<l&&(E.current=l)),(e>0&&e!==C.current||t>0&&t!==N.current)&&(null==x||x(e,"bodyWidthChanged"))}),[L,x,o,r]),H=v.useCallback((function(e){var t=j.current;null!=r&&r.current&&(j.current=e||Jte(null==r?void 0:r.current)),t&&t!==j.current&&(E.current=0,null==x||x(t,"widthChanged")),B()}),[x,B,r]),z=v.useCallback((function(e){var t=O.current;e?O.current=e:null!=r&&r.current&&(O.current=Qte(r.current.parentNode)),t&&t!==O.current&&(null==x||x(t,"heightChanged"))}),[x,r]);Rte((function(){var e;D(),F(),H(),z(),B(),P.current=new Hne((function(e){z(e[0].contentRect.height)})),P.current.observe(null==r||null===(e=r.current)||void 0===e?void 0:e.parentNode);var t=_u((function(e){var t=e[0].contentRect.width;H(b?t+2:t)}),20);return T.current=new Hne(t),T.current.observe(null==r?void 0:r.current),function(){var e,t;null===(e=T.current)||void 0===e||e.disconnect(),null===(t=P.current)||void 0===t||t.disconnect()}})),Lte((function(){z(),D()}),[p]),Lte((function(){H(),F(),D()}),[t,u,w.current,g,m,D,F]);var V=function(e){var t=v.useState(!1),n=t[0],r=t[1];return v.useEffect((function(){if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e){e.forEach((function(e){r(e.isIntersecting)}))})),n=null==e?void 0:e.current;return n&&t.observe(n),function(){n&&t.unobserve(n)}}r(!0)}),[e]),n}(r);Lte((function(){V&&(H(),F())}),[V]);var U=v.useCallback((function(e){S.current=e}),[]),G=v.useCallback((function(e){E.current=e}),[]);return{contentHeight:w,contentWidth:C,minScrollY:k,minScrollX:A,scrollY:S,scrollX:E,tableWidth:j,headerOffset:M,tableOffset:I,getTableHeight:function(){if(p)return O.current;if(0===(null==t?void 0:t.length)&&L)return u;var e=d?c+w.current:u;return h&&e>h?h:f&&e<f?f:e},setScrollY:U,setScrollX:G}},Vne=uE,Une=GE,Gne=vw,Wne=xm,qne=_w,Zne=Aw,Xne=ow,Kne=Kw,Yne=Object.prototype.hasOwnProperty;const $ne=_((function(e){if(null==e)return!0;if(qne(e)&&(Wne(e)||"string"==typeof e||"function"==typeofe.splice||Zne(e)||Kne(e)||Gne(e)))return!e.length;var t=Une(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Xne(e))return!Vne(e).length;for(var n in e)if(Yne.call(e,n))return!1;return!0}));var Jne=globalThis;function Qne(e){return function(){return e}}function ere(){}ere.thatReturns=Qne,ere.thatReturnsFalse=Qne(!1),ere.thatReturnsTrue=Qne(!0),ere.thatReturnsNull=Qne(null),ere.thatReturnsThis=function(){return Jne},ere.thatReturnsArgument=function(e){return e};var tre,nre,rre,ire,ore,sre,are,lre,cre,ure,dre,fre,hre,pre,mre,gre=!1;function vre(){if(!gre){gre=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(fre=/\b(iPhone|iP[ao]d)/.exec(e),hre=/\b(iP[ao]d)/.exec(e),ure=/Android/i.exec(e),pre=/FBAN\/\w+;/i.exec(e),mre=/Mobile/i.exec(e),dre=!!/Win64/.exec(e),t){(tre=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(tre=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);sre=r?parseFloat(r[1])+4:tre,nre=t[2]?parseFloat(t[2]):NaN,rre=t[3]?parseFloat(t[3]):NaN,(ire=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),ore=t&&t[1]?parseFloat(t[1]):NaN):ore=NaN}else tre=NaN,nre=NaN,rre=NaN,ore=NaN,ire=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);are=!i||parseFloat(i[1].replace("_","."))}else are=!1;lre=!!n[2],cre=!!n[3]}else are=!1,lre=!1,cre=!1}}var yre,bre={ie:function(){return vre()||tre},ieCompatibilityMode:function(){return vre()||sre>tre},ie64:function(){return bre.ie()&&dre},firefox:function(){return vre()||nre},opera:function(){return vre()||rre},webkit:function(){return vre()||ire},safari:function(){return bre.webkit()},chrome:function(){return vre()||ore},windows:function(){return vre()||lre},osx:function(){return vre()||are},linux:function(){return vre()||cre},iphone:function(){return vre()||fre},mobile:function(){return vre()||fre||hre||ure||mre},nativeApp:function(){return vre()||pre},android:function(){return vre()||ure},ipad:function(){return vre()||hre}};E8&&(yre=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));function xre(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1===e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}xre.getEventType=function(){return bre.firefox()?"DOMMouseScroll":function(e,t){if(!E8||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&yre&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}("wheel")?"wheel":"mousewheel"};var _re=function(){function e(e,t,n,r){this.animationFrameID=null,this.deltaX=0,this.deltaY=0,this.handleScrollX=null,this.handleScrollY=null,this.stopPropagation=null,this.onWheelCallback=null,this.didWheel=this.didWheel.bind(this),"function"!=typeof t&&(t=t?ere.thatReturnsTrue:ere.thatReturnsFalse),"function"!=typeof n&&(n=n?ere.thatReturnsTrue:ere.thatReturnsFalse),"function"!=typeof r&&(r=r?ere.thatReturnsTrue:ere.thatReturnsFalse),this.handleScrollX=t,this.handleScrollY=n,this.stopPropagation=r,this.onWheelCallback=e,this.onWheel=this.onWheel.bind(this)}var t=e.prototype;return t.onWheel=function(e){var t=xre(e);"MacIntel"!==navigator.platform&&e.shiftKey&&(t=function(e){return{spinX:e.spinY,spinY:e.spinX,pixelX:e.pixelY,pixelY:e.pixelX}}(t));var n,r=this.deltaX+t.pixelX,i=this.deltaY+t.pixelY,o=this.handleScrollX(r,i),s=this.handleScrollY(i,r);(o||s)&&(this.deltaX+=o?t.pixelX:0,this.deltaY+=s?t.pixelY:0,e.preventDefault(),0===this.deltaX&&0===this.deltaY||(this.stopPropagation()&&e.stopPropagation(),n=!0),!0===n&&null===this.animationFrameID&&(this.animationFrameID=Bee(this.didWheel)))},t.didWheel=function(){this.animationFrameID=null,this.onWheelCallback(this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0},e}();function wre(e,t){var n=Xte(e),r=e.scrollLeft,i=0;return n&&(r=n.pageXOffset,i=n.pageYOffset),void 0!==t&&(n?n.scrollTo(t,i):e.scrollLeft=t),r}function Cre(e,t){var n=Xte(e),r=e.scrollTop,i=0;return n&&(r=n.pageYOffset,i=n.pageXOffset),void 0!==t&&(n?n.scrollTo(i,t):e.scrollTop=t),r}var kre=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sre=function(e){var t=e.data,n=e.autoHeight,r=e.tableBodyRef,i=e.scrollbarXRef,o=e.scrollbarYRef,s=e.disabledScroll,a=e.loading,l=e.tableRef,c=e.contentWidth,u=e.tableWidth,d=e.scrollY,f=e.minScrollY,h=e.minScrollX,p=e.scrollX,m=e.setScrollX,g=e.setScrollY,y=e.virtualized,b=e.forceUpdatePosition,x=e.deferUpdatePosition,_=e.onScroll,w=e.onTouchMove,C=e.onTouchStart,k=e.onTouchEnd,S=e.height,E=e.getTableHeight,A=e.contentHeight,j=e.headerHeight,O=e.rtl,N=v.useRef(),T=v.useRef(),P=v.useRef(),M=v.useRef(),I=v.useState(!1),L=I[0],R=I[1],D=v.useRef(0),B=v.useRef(0),F=v.useRef(null),H=v.useRef(!1),z=v.useRef(0),V=v.useRef(0),U=v.useCallback((function(e){return 0!==e&&!s&&!a}),[s,a]),G=v.useCallback((function(e){return!(0===e||s||a||n)&&("number"==typeof d.current&&"number"==typeof f.current?e>=0&&d.current>f.current||e<0&&d.current<0:void 0)}),[n,s,a,f,d]),W=v.useCallback((function(){F.current=null,qte((function(){return R(!1)}))}),[]),q=v.useCallback((function(e,t,n,r){if(l.current){var i,o=c.current<=u.current?0:p.current-e,s=d.current-t,a=Math.min(0,s<f.current?f.current:s),v=Math.min(0,o<h.current?h.current:o);m(v),g(a),null==_||_(Math.abs(v),Math.abs(a)),y&&(qte((function(){return R(!0)})),F.current&&(i=F.current,Lee(i.id)),F.current=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={},i=function(){Date.now()-n>=t?e.call(null):r.id=Bee(i)};return r={id:Bee(i)}}(W,null!=n&&n.duration?50:0)),"click"!==(null==r?void 0:r.type)?b(null==n?void 0:n.duration,null==n?void 0:n.bezier):x(null==n?void 0:n.duration,null==n?void0:n.bezier)}}),[l,c,u,p,d,f,h,m,g,_,b,x,y,W]),Z=v.useCallback((function(e,t,n){var r,s,a,l;q(e,t,n),null===(r=i.current)||void 0===r||null===(s=r.onWheelScroll)||void 0===s||s.call(r,e),null===(a=o.current)||void 0===a||null===(l=a.onWheelScroll)||void 0===l||l.call(a,t,!(null==n||!n.duration))}),[q,i,o]),X=v.useRef(),K=v.useCallback((function(){var e,t,n=null===(e=r.current)||void 0===e?void 0:e.querySelector(".rs-table-body-wheel-area"),i=null===(t=o.current)||void 0===t?void 0:t.handle,s=["transition-duration","transition-timing-function"];if(!y&&n){var a=window.getComputedStyle(n).getPropertyValue("transform"),l=Math.round(+a.split(")")[0].split(", ")[5]);g(l)}n&&Ute(n,s),i&&Ute(i,s)}),[o,g,r,y]),Y=v.useCallback((function(e){var t=e.touches[0],n=t.pageX,r=t.pageY;D.current=n,B.current=r,z.current=(new Date).getTime(),V.current=d.current,H.current=!0,null==C||C(e),K()}),[C,d,K]),$=v.useCallback((function(e){if(H.current){var t=e.touches[0],r=t.pageX,i=t.pageY,o=D.current-r,s=n?0:B.current-i;if(G(s)||U(o)){var a;if(!n&&G(s))null===(a=e.preventDefault)||void 0===a||a.call(e);var l=(new Date).getTime();Z(o,s),D.current=r,B.current=i,l-z.current>300&&(V.current=d.current,z.current=l),null==w||w(e)}}}),[n,Z,w,d,U,G]),J=v.useCallback((function(e){if(H.current){H.current=!1;var t=(new Date).getTime()-z.current,n=Math.abs(d.current-V.current);if(t<300&&n>15){var r=function(e,t,n){var r=e-t;return{delta:e-(e+2*Math.abs(r)/n/.003*(r<0?-1:1)),duration:1e3,bezier:qee}}(d.current,V.current,t),i=r.delta,o=r.duration,s=r.bezier;Z(0,i,{duration:o,bezier:s}),null==k||k(e)}}}),[Z,k,d]),Q=v.useCallback((function(e){if(e.target===r.current){var t=wre(e.target),n=Cre(e.target);0===n&&0===t||(Z(t,n),wre(e.target,0),Cre(e.target,0))}}),[Z,r]),ee=v.useCallback((function(e){if(n)return[0,0];var t=E();return[-(e=Math.min(e,Math.max(0,A.current-(t-j)))),e/A.current*(t-j)]}),[n,A,E,j]),te=function(e){var t,n;void 0===e&&(e=0);var i=ee(e),s=i[0],l=i[1],c=E();a||s===d.current||null==_||_(Math.abs(p.current),Math.abs(s)),g(s),null==o||null===(t=o.current)||void 0===t||null===(n=t.resetScrollBarPosition)||void 0===n||n.call(t,l),x(),y&&A.current>c&&(R(!0),Pte((function(){r.current&&R(!1)})))},ne=function(e){var t,n;void 0===e&&(e=0);var r,o=(r=e,[-(r=Math.min(r,Math.max(0,c.current-u.current))),r/c.current*u.current]),s=o[0],l=o[1];m(s),!a&&(null==_||_(Math.abs(s),Math.abs(d.current))),null==i||null===(t=i.current)||void 0===t||null===(n=t.resetScrollBarPosition)||void 0===n||n.call(t,l),x()};Mte((function(){0!==d.current&&te(Math.abs(d.current)),x()}),[S,t]);var re=v.useCallback((function(){var e,t,n,r;X.current=null,null===(e=N.current)||void 0===e||e.off(),null===(t=T.current)||void 0===t||t.off(),null===(n=P.current)||void 0===n||n.off(),null===(r=M.current)||void 0===r||r.off()}),[]);v.useEffect((function(){var e={passive:!1},t=r.current;return t&&(re(),X.current=new _re(Z,U,G,!1),N.current=Mee(t,"wheel",X.current.onWheel,e),kte()&&(T.current=Mee(t,"touchstart",Y,e),P.current=Mee(t,"touchmove",$,e),M.current=Mee(t,"touchend",J,e))),re}),[J,$,Y,Z,re,U,G,r]);var ie=v.useCallback((function(e){if(e.currentTarget===e.target&&kre.indexOf(e.key)>-1){e.preventDefault();switch(e.key){case"ArrowUp":Z(0,-40);break;case"ArrowDown":Z(0,40);break;case"ArrowLeft":Z(-40,0);break;case"ArrowRight":Z(40,0)}}}),[Z]);return Rte((function(){var e,t;O&&(m(u.current-c.current-Uee),null==i||null===(e=i.current)||void 0===e||null===(t=e.resetScrollBarPosition)||void 0===t||t.call(e,-p.current),b())})),{isScrolling:L,onScrollHorizontal:v.useCallback((function(e){return q(e,0)}),[q]),onScrollVertical:v.useCallback((function(e,t){return q(0,e,void 0,t)}),[q]),onScrollBody:Q,onScrollTop:te,onScrollLeft:ne,onScrollTo:function(e){var t=e||{},n=t.x,r=t.y;"number"==typeof n&&ne(n),"number"==typeof r&&te(r)},onScrollByKeydown:ie}},Ere=function(e,t,n){return bte(e).filter((function(e){if(n){var r=function(e,t){for(var n=[],r=e[Xee];r;)n.push(r[t]),r=r[Xee];return n}(e,n),i=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);for(var n=0;n<(null===(r=t)||void 0===r?void 0:r.length);n++){var r,i;if(-1===(null===(i=e)||void 0===i?void 0:i.indexOf(t[n])))return!1}return!0}(t,r);return e[Zee]=i,e[Kee]=r.length,i}}))};varAre=["classPrefix","height","headerHeight","className","width","top","style","isHeaderRow","rowRef","children","rowSpan"],jre=w.forwardRef((function(e,t){var n,r,i,o,s=e.classPrefix,a=void 0===s?"row":s,l=e.height,c=void 0===l?46:l,u=e.headerHeight,d=void 0===u?40:u,f=e.className,h=e.width,p=e.top,m=e.style,g=e.isHeaderRow,y=e.rowRef,b=e.children,x=e.rowSpan,_=xa(e,Are),C=v.useContext(Vee).translateDOMPositionXY,k=Dte(a),S=k.withClassPrefix,E=(0,k.merge)(f,S({header:g,rowspan:x})),A=es({minWidth:h,height:g?d:c},m);return null==C||C(A,0,p),w.createElement("div",es({role:"row"},_,{ref:(n=y,r=t,i=Cte(n),o=Cte(r),function(e){"function"==typeof i&&i(e),"function"==typeof o&&o(e)}),className:E,style:A}),b)}));jre.displayName="Table.Row";var Ore=["fixed","width","left","height","style","classPrefix","className","children"],Nre=w.forwardRef((function(e,t){var n,r=e.fixed,i=e.width,o=e.left,s=e.height,a=e.style,l=e.classPrefix,c=void 0===l?"cell-group":l,u=e.className,d=e.children,f=xa(e,Ore),h=v.useContext(Vee).translateDOMPositionXY,p=Dte(c),m=p.withClassPrefix,g=(0,p.merge)(u,m(((n={})["fixed-"+r]=r,n.scroll=!r,n))),y=es({width:i,height:s},a);return null==h||h(y,o,0),w.createElement("div",es({},f,{ref:t,className:g,style:y}),d)}));Nre.displayName="Table.CellGroup";var Tre=["length","scrollLength","classPrefix","vertical","className","tableId","onMouseDown","onScroll"],Pre=w.forwardRef((function(e,t){var n,r,i=e.length,o=void 0===i?1:i,s=e.scrollLength,a=void 0===s?1:s,l=e.classPrefix,c=void 0===l?"scrollbar":l,u=e.vertical,d=e.className,f=e.tableId,h=e.onMouseDown,p=e.onScroll,m=xa(e,Tre),g=w.useContext(Vee).translateDOMPositionXY,y=v.useState(!1),b=y[0],x=y[1],_=v.useState({top:0,left:0}),C=_[0],k=_[1],S=v.useRef(0),E=v.useRef(a),A=v.useRef(null),j=v.useRef(null),O=v.useRef(),N=Dte(c),T=N.withClassPrefix,P=N.merge,M=N.prefix,I=P(d,T({vertical:u,horizontal:!u,pressed:b}),(null===(n=A.current)||void 0===n?void 0:n.classList.contains("fixed"))&&"fixed"),L=o/a*100,R=((r={})[u?"height":"width"]=L+"%",r[u?"minHeight":"minWidth"]=14,r),D=S.current/o*100+L;Rte((function(){return Pte((function(){A.current&&k($te(A.current))})),function(){z()}})),Mte((function(){S.current&&(S.current=E.current/a*S.current,B(0)),E.current=a}),[a]),v.useImperativeHandle(t,(function(){return{get root(){return A.current},get handle(){return j.current},onWheelScroll:function(e,t){B(e/(a/o),void 0,t)},resetScrollBarPosition:function(e){void 0===e&&(e=0),S.current=0,B(0,e)}}}));var B=v.useCallback((function(e,t,n){var r=a&&o?o-Math.max(o/a*o,16):0,i=n?{"transition-duration":"1000ms","transition-timing-function":qee}:{},s=function(e){return void 0===e&&(e=0),Math.min(Math.max(e,0),r)};void 0===t?(S.current+=e,S.current=s(S.current)):S.current=s(t),u?null==g||g(i,0,S.current):null==g||g(i,S.current,0),j.current&&Gte(j.current,i)}),[o,a,g,u]),F=v.useCallback((function(e,t){var n=e*(a/o);B(e),null==p||p(n,t)}),[o,p,a,B]),H=v.useCallback((function(e){var t;if(!(j.current&&null!==(t=j.current)&&void 0!==t&&t.contains(e.target)||"number"!=typeof(null==C?void 0:C.top)||"number"!=typeof(null==C?void 0:C.left))){var n=u?e.pageY-(null==C?void 0:C.top):e.pageX-C.left,r=n-o/a*o,i=n>S.current?r-S.current:n-S.current;F(i,e)}}),[C,F,o,a,u]),z=v.useCallback((function(){var e,t;null===(e=O.current)||void 0===e||null===(t=e.releaseMouseMoves)||void 0===t||t.call(e),O.current=null}),[]),V=v.useCallback((function(e,t,n){var r,i;O.current&&O.current.isDragging()&&(0!==(null==n?void 0:n.buttons)&&0!==(null===(r=window)||void 0===r||null===(i=r.event)||void 0===i?void 0:i.buttons)?F(u?t:e,n):z())}),[F,z,u]),U=v.useCallback((function(){z(),x(!1)}),[z]),G=v.useCallback((function(){return O.current||new Fee(V,U,document.body)}),[U,V]),W=v.useCallback((function(e){var t;O.current=G(),null==O||null===(t=O.current)||void 0===t||t.captureMouseMoves(e),x(!0),null==h||h(e)}),[G,h]);return w.createElement("div",es({role:"scrollbar","aria-controls":f,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":D,"aria-orientation":u?"vertical":"horizontal"},m,{ref:A,className:I,onClick:H}),w.createElement("div",{ref:j,className:M("handle"),style:R,onMouseDown:W,role:"button",tabIndex:-1}))}));Pre.displayName="Table.Scrollbar";var Mre=w.forwardRef((function(e,t){var n=e.addPrefix,r=e.headerHeight,i={height:e.height},o={height:r-1};return w.createElement("div",{ref:t,className:n("mouse-area"),style:i},w.createElement("span",{style:o}))}));Mre.displayName="Table.MouseArea";var Ire=w.forwardRef((function(e,t){var n=e.loadAnimation,r=e.loading,i=e.locale,o=e.addPrefix,s=e.renderLoading,a=w.createElement("div",{ref:t,className:o("loader-wrapper")},w.createElement("div",{className:o("loader")},w.createElement("i",{className:o("loader-icon")}),w.createElement("span",{className:o("loader-text")},null==i?void 0:i.loading)));return"function"==typeof s?r?s(a):null:r||n?a:null}));Ire.displayName="Table.Loader";var Lre=w.forwardRef((function(e,t){var n=e.addPrefix,r=e.locale,i=e.renderEmpty;if(e.loading)return null;var o=w.createElement("div",{ref:t,className:n("body-info")},null==r?void 0:r.emptyMessage);return i?i(o):o}));function Rre(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Dre(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dre(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Dre(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Lre.displayName="Table.EmptyMessage";var Bre=function(e,t){void 0===t&&(t=[]);for(var n,r=Rre(w.Children.toArray(e));!(n=r()).done;){var i=n.value;if(S8.isFragment(i)){var o,s=i;null!==(o=s.props)&&void 0!==o&&o.children&&Bre(s.props.children,t)}else t.push(i)}return t},Fre=["affixHeader","children","classPrefix","className","data","defaultSortType","width","expandedRowKeys","defaultExpandAllRows","defaultExpandedRowKeys","style","id","isTree","hover","bordered","cellBordered","wordWrap","loading","locale","showHeader","sortColumn","rowHeight","sortType","headerHeight","minHeight","maxHeight","height","autoHeight","fillHeight","rtl","translate3d","rowKey","virtualized","rowClassName","rowExpandedHeight","disabledScroll","affixHorizontalScrollbar","loadAnimation","shouldUpdateScroll","renderRow","renderRowExpanded","renderLoading","renderEmpty","onSortColumn","onScroll","renderTreeToggle","onRowClick","onRowContextMenu","onExpandChange","onTouchStart","onTouchMove","onTouchEnd"],Hre=["depth","rowIndex"],zre=["cellHeight"],Vre=[],Ure={Cell:cte,HeaderCell:fte,Column:ite,ColumnGroup:iee},Gre=w.forwardRef((function(e,t){var n=e.affixHeader,r=e.children,i=e.classPrefix,o=void 0===i?"rs-table":i,s=e.className,a=e.data,l=void 0===a?Vre:a,c=e.defaultSortType,u=void 0===c?Gee:c,d=e.width,f=e.expandedRowKeys,h=e.defaultExpandAllRows,p=e.defaultExpandedRowKeys,m=e.style,g=e.id,y=e.isTree,b=e.hover,x=void 0===b||b,_=e.bordered,C=e.cellBordered,k=e.wordWrap,S=e.loading,E=e.locale,A=void 0===E?{emptyMessage:"No data found",loading:"Loading..."}:E,j=e.showHeader,O=void 0===j||j,N=e.sortColumn,T=e.rowHeight,P=void 0===T?46:T,M=e.sortType,I=e.headerHeight,L=void 0===I?40:I,R=e.minHeight,D=void 0===R?0:R,B=e.maxHeight,F=e.height,H=void 0===F?200:F,z=e.autoHeight,V=e.fillHeight,U=e.rtl,G=e.translate3d,W=e.rowKey,q=e.virtualized,Z=e.rowClassName,X=e.rowExpandedHeight,K=void 0===X?100:X,Y=e.disabledScroll,$=e.affixHorizontalScrollbar,J=e.loadAnimation,Q=e.shouldUpdateScroll,ee=void 0===Q||Q,te=e.renderRow,ne=e.renderRowExpanded,re=e.renderLoading,ie=e.renderEmpty,oe=e.onSortColumn,se=e.onScroll,ae=e.renderTreeToggle,le=e.onRowClick,ce=e.onRowContextMenu,ue=e.onExpandChange,de=e.onTouchStart,fe=e.onTouchMove,he=e.onTouchEnd,pe=xa(e,Fre),me=v.useMemo((function(){return Bre(Om(r)?r(Ure):r)}),[r]),ge=v.useMemo((function(){return z&&!B}),[z,B]),ve=Dte(o,void 0!==o),ye=ve.withClassPrefix,be=ve.merge,xe=ve.prefix,_e=v.useReducer((function(e){return e+1}),0),we=_e[1],Ce=Bte(f,h?xte(l,W,Om(ne)):p||[]),ke=Ce[0],Se=Ce[1],Ee=function(e){var t=e.data,n=e.isTree,r=e.expandedRowKeys,i=e.rowKey,o=v.useState((function(){return n?Ere(t,r,i):t})),s=o[0],a=o[1];return Mte((function(){a(n?Ere(t,r,i):t)}),[t,r,i,n]),s}({data:l,isTree:y,expandedRowKeys:ke,rowKey:W});if(y){if(!W)throw new Error("The `rowKey` is required when set isTree");if(Ee.length>0&&!Ee[0].hasOwnProperty(W))throw new Error("The `rowKey` is not found in data")}var Ae=function(e){var t=e.prefix,n=e.wordWrap,r=e.data,i=e.expandedRowKeys,o=v.useState([]),s=o[0],a=o[1],l=v.useRef({}),c=v.useCallback((function(){if(n){for(var e=[],r=Object.values(l.current),i=0;i<r.length;i++){var o=r[i][0];if(o){for(var s=o.querySelectorAll("."+t("cell-wrap"))||[],c=Array.from(s),u=0,d=0;d<c.length;d++){var f=Qte(c[d]);u=Math.max(u,f)}e.push(u)}}$ne(l.current)||a(e)}}),[t,n]);return Rte((function(){Pte(c)})),Lte((function(){Pte(c)}),[r,i]),{bindTableRowsRef:function(e,t){return function(n){n&&(l.current[e]=[n,t])}},tableRowsMaxHeight:s,tableRows:l}}({data:l,expandedRowKeys:ke,wordWrap:k,prefix:xe}),je=Ae.tableRowsMaxHeight,Oe=Ae.bindTableRowsRef,Ne=O?L:0,Te=U||zee(),Pe=function(){return"function"==typeof P?P():P},Me=v.useRef(z8({forceUseTransform:!0,enable3DTransform:G})),Ie=me.some((function(e){var t;return S8.isElement(e)&&(null==e||null===(t=e.props)||void 0===t?void 0:t.fixed)})),Le=me.some((function(e){var t;return S8.isElement(e)&&(null==e||null===(t=e.props)||void 0===t?void 0:t.rowSpan)})),Re=v.useRef([]),De=v.useRef(null),Be=v.useRef(null),Fe=v.useRef(null),He=v.useRef(null),ze=v.useRef(null),Ve=v.useRef(null),Ue=v.useRef(null),Ge=v.useRef(null),We=v.useRef(null),qe=zne({data:Ee,width:d,rowHeight:P,tableRef:Be,headerWrapperRef:ze,prefix:xe,affixHeader:n,affixHorizontalScrollbar:$,headerHeight:Ne,height:H,minHeight:D,maxHeight:B,autoHeight:z,fillHeight:V,children:me,expandedRowKeys:ke,showHeader:O,bordered:_,onTableScroll:_u((function(e){return mt(e)}),100),onTableResizeChange:function(e,t){if(we(),"function"==typeof ee)mt(ee(t));else if(ee){"bodyHeightChanged"===t?ht(0):pt(0)}"bodyWidthChanged"===t&&at()}}),Ze=qe.contentHeight,Xe=qe.contentWidth,Ke=qe.minScrollY,Ye=qe.minScrollX,$e=qe.scrollY,Je=qe.scrollX,Qe=qe.tableWidth,et=qe.tableOffset,tt=qe.headerOffset,nt=qe.setScrollY,rt=qe.setScrollX,it=qe.getTableHeight;!function(e){var t=e.getTableHeight,n=e.contentHeight,r=e.affixHorizontalScrollbar,i=e.affixHeader,o=e.tableOffset,s=e.headerOffset,a=e.headerHeight,l=e.scrollbarXRef,c=e.affixHeaderWrapperRef,u=v.useRef(),d=v.useCallback((function(){var e,n,i=window.scrollY||window.pageYOffset,s=Qte(window),c=t(),u="number"==typeof r?r:0,d=(null===(e=o.current)||void 0===e?void 0:e.top)||0,f=i+s<c+(d+u)&&i+s-a>d+u;null!=l&&null!==(n=l.current)&&void 0!==n&&n.root&&(yte(l.current.root,"fixed",f),f?Gte(l.current.root,"bottom",u+"px"):Ute(l.current.root,"bottom"))}),[r,a,l,t,o]),f=v.useCallback((function(){var e,t="number"==typeof i?i:0,r=window.scrollY||window.pageYOffset,o=(null===(e=s.current)||void 0===e?void 0:e.top)||0,a=r-(o-t)>=0&&r<o-t+n.current;c.current&&yte(c.current,"fixed",a)}),[i,c,n,s]),h=v.useCallback((function(){wte(i)&&f(),wte(r)&&d()}),[i,r,f,d]);Mte(h,[t]),v.useEffect((function(){return(wte(i)||wte(r))&&(u.current=Mee(window,"scroll",h)),function(){var e;null===(e=u.current)||void 0===e||e.off()}}),[i,r,h])}({getTableHeight:it,contentHeight:Ze,affixHorizontalScrollbar:$,affixHeader:n,tableOffset:et,headerOffset:tt,headerHeight:Ne,scrollbarXRef:Ge,affixHeaderWrapperRef:He});var ot=function(e){var t=e.data,n=e.height,r=e.tableWidth,i=e.tableRef,o=e.prefix,s=e.translateDOMPositionXY,a=e.wheelWrapperRef,l=e.headerWrapperRef,c=e.affixHeaderWrapperRef,u=e.tableHeaderRef,d=e.scrollX,f=e.scrollY,h=e.contentWidth,p=e.shouldFixedColumn,m=v.useRef(0),g=v.useRef("linear"),y=v.useCallback((function(){var e;return(null===(e=i.current)||void 0===e?void 0:e.querySelectorAll("."+o("cell-group-scroll")))||[]}),[o,i]),b=v.useCallback((function(){var e;return null===(e=i.current)||void 0===e?void0:e.querySelectorAll("."+o("cell-group-fixed-left"))}),[o,i]),x=v.useCallback((function(){var e;return null===(e=i.current)||void 0===e?void 0:e.querySelectorAll("."+o("cell-group-fixed-right"))}),[o,i]),_=v.useCallback((function(e){if(null!=a&&a.current){var t=kte()?{"transition-duration":m.current+"ms","transition-timing-function":g.current}:{};s.current(t,e?0:d.current,f.current),Gte(a.current,t)}}),[d,f,s,a]),w=v.useCallback((function(){var e={},t=y(),n=b(),i=x();s.current(e,d.current,0);for(var a=Array.from(t),l=0;l<a.length;l++)Gte(a[l],e);_(!0);var c=h.current>r.current?0:Uee,u=o("cell-group-left-shadow"),f=o("cell-group-right-shadow"),p=d.current<0,m=r.current-h.current-c!==d.current;yte(n,u,p),yte(i,f,m)}),[h,b,x,y,_,o,d,r,s]),C=v.useCallback((function(e,t){if(e&&(m.current=e),t&&(g.current=t),p)w();else{var n,r={};s.current(r,d.current,0);var i=null==l?void 0:l.current,a=null==c?void 0:c.current;_(),i&&Gte(i,r),null!=a&&null!==(n=a.hasChildNodes)&&void 0!==n&&n.call(a)&&Gte(null==a?void 0:a.firstChild,r)}null!=u&&u.current&&yte(u.current,o("cell-group-shadow"),f.current<0)}),[c,_,l,o,d,f,p,u,s,w]);return Mte((function(){0!==f.current&&C()}),[n,t]),{forceUpdatePosition:C,deferUpdatePosition:function(e,t){Pte((function(){C(e,t)}))}}}({data:l,height:H,tableWidth:Qe,tableRef:Be,prefix:xe,translateDOMPositionXY:Me,wheelWrapperRef:Ue,headerWrapperRef:ze,affixHeaderWrapperRef:He,tableHeaderRef:Fe,scrollX:Je,scrollY:$e,contentWidth:Xe,shouldFixedColumn:Ie}),st=ot.forceUpdatePosition,at=ot.deferUpdatePosition,lt=Sre({rtl:Te,data:l,height:H,virtualized:q,getTableHeight:it,contentHeight:Ze,headerHeight:Ne,autoHeight:ge,maxHeight:B,tableBodyRef:Ve,scrollbarXRef:Ge,scrollbarYRef:We,disabledScroll:Y,loading:S,tableRef:Be,contentWidth:Xe,tableWidth:Qe,scrollY:$e,minScrollY:Ke,minScrollX:Ye,scrollX:Je,setScrollX:rt,setScrollY:nt,forceUpdatePosition:st,deferUpdatePosition:at,onScroll:se,onTouchStart:de,onTouchMove:fe,onTouchEnd:he}),ct=lt.isScrolling,ut=lt.onScrollHorizontal,dt=lt.onScrollVertical,ft=lt.onScrollBody,ht=lt.onScrollTop,pt=lt.onScrollLeft,mt=lt.onScrollTo,gt=lt.onScrollByKeydown,vt=Zte({children:me,rtl:Te,mouseAreaRef:De,tableRef:Be,minScrollX:Ye,scrollX:Je,tableWidth:Qe,headerHeight:Ne,showHeader:O,sortType:M,defaultSortType:u,sortColumn:N,prefix:xe,onSortColumn:oe,onHeaderCellResize:we,rowHeight:P}),yt=vt.headerCells,bt=vt.bodyCells,xt=vt.allColumnsWidth,_t=vt.hasCustomTreeCol,wt=v.useRef((null==yt?void 0:yt.length)||0);Mte((function(){(null==yt?void 0:yt.length)!==wt.current&&(pt(0),wt.current=(null==yt?void 0:yt.length)||0)}),[me]),v.useImperativeHandle(t,(function(){return{get root(){return Be.current},get body(){return Ue.current},get scrollPosition(){return{top:Math.abs($e.current),left:Math.abs(Je.current)}},scrollTop:ht,scrollLeft:pt}}));var Ct,kt,St,Et,At,jt=xt>Qe.current?xt:Qe.current,Ot=!ge&&Ze.current>it()-Ne,Nt=Xe.current>Qe.current,Tt=be(s,ye({bordered:_,loading:S,treetable:y,hover:x&&!Le,"has-rowspan":Le,"word-wrap":k,"cell-bordered":C})),Pt=es({width:d||"auto",height:it()},m),Mt=v.useCallback((function(e){var t={height:"function"==typeof K?K(e):K};return"function"==typeof ne?w.createElement("div",{className:xe("row-expanded"),style:t},ne(e)):null}),[xe,ne,K]),It=function(e,t,n,r){vari=e.depth,o=e.rowIndex,s=xa(e,Hre);s.className="function"==typeof Z?Z(r,o):Z;var a=es({},null==e?void 0:e.style),l=0;Te&&Xe.current>Qe.current&&(l=Qe.current-Xe.current,a.right=l);var c=null;if(Ie&&Xe.current>Qe.current){for(var u=[],d=[],f=[],h=0,p=0,m=0;m<t.length;m++){var g=t[m],v=g.props,y=v.fixed,b=v.width,x="left"===y||!0===y,_="right"===y;Te&&(x="right"===y,_="left"===y||!0===y),x?(u.push(g),h+=b):_?(d.push(g),p+=b):f.push(g)}Ot&&p&&(p+=Uee),c=w.createElement(w.Fragment,null,h?w.createElement(Nre,{fixed:"left",height:e.isHeaderRow?e.headerHeight:e.height,width:h,style:Te?{right:Qe.current-h-l}:void 0},pte(_te(u))):null,w.createElement(Nre,null,pte(f)),p?w.createElement(Nre,{fixed:"right",style:Te?{right:0-l}:{left:Qe.current-p},height:e.isHeaderRow?e.headerHeight:e.height,width:p},pte(_te(d,Ot?Uee:0))):null,n&&Mt(r))}else c=w.createElement(w.Fragment,null,w.createElement(Nre,null,pte(t)),n&&Mt(r));return w.createElement(jre,es({},s,{"data-depth":i,style:a}),te?te(c,r):c)},Lt=v.useCallback((function(e){return!(!Om(ne)||y||!W||!ke.some((function(t){return t===e[W]})))}),[ke,y,ne,W]),Rt=v.useCallback((function(e){return function(t){null==le||le(e,t)}}),[le]),Dt=v.useCallback((function(e){return function(t){null==ce||ce(e,t)}}),[ce]),Bt=v.useCallback((function(e,t,n){for(var r=!1,i=[],o=0;o<ke.length;o++){var s=ke[o];s===e?r=!0:i.push(s)}r||i.push(e),Se(i),null==ue||ue(!r,n)}),[ke,ue,Se]),Ft=v.useRef({}),Ht=function(e,t,n,r){for(var i=y&&t.children&&Array.isArray(t.children),o=W&&void 0!==t[W]?t[W]:n.key,s=n.cellHeight,a=es({},xa(n,zre),{key:o,"aria-rowindex":n.key+2,rowRef:Oe(n.key,t),onClick:Rt(t),onContextMenu:Dt(t)}),l=ke.some((function(e){return W&&e===t[W]})),c=[],u=0;u<e.length;u++){var d,f,h,p,m,g,v=e[u],b=null===(d=v.props)||void 0===d||null===(f=(h=d).rowSpan)||void 0===f?void 0:f.call(h,t),x=b?b*(s||46):s,_=v.props.dataKey||u;(null===(p=Ft.current[_])||void 0===p?void 0:p[1])>0&&(Ft.current[_][1]-=1,0===Ft.current[_][1]&&(Ft.current[_][0]=0)),b&&(Ft.current[_]=[b,b],a.rowSpan=b,a.style={overflow:"inherit"});var C=!(null===(m=v.props)||void 0===m||!m.rowSpan||b||0===(null===(g=Ft.current[_])||void 0===g?void 0:g[0]));c.push(w.cloneElement(v,{"aria-rowspan":b||void 0,hasChildren:i,rowData:t,rowIndex:n.rowIndex,wordWrap:k,height:x,depth:n.depth,renderTreeToggle:ae,onTreeToggle:Bt,rowKey:o,expanded:l,rowSpan:b,removed:C}))}return It(a,c,r,t)},zt=w.useMemo((function(){return{classPrefix:o,translateDOMPositionXY:Me.current,rtl:Te,isTree:y,hasCustomTreeCol:_t}}),[o,_t,y,Te]);return w.createElement(Vee.Provider,{value:zt},w.createElement("div",es({role:y?"treegrid":"grid","aria-rowcount":Ee.length+1,"aria-colcount":wt.current,"aria-busy":S},pe,{className:Tt,style:Pt,ref:Be,tabIndex:-1,onKeyDown:gt}),O&&(Ct=yt,kt="number"==typeof n?n:0,St={"aria-rowindex":1,rowRef:Fe,width:jt,height:Pe(),headerHeight:Ne,isHeaderRow:!0,top:0,rowIndex:-1},Et={position:"fixed",overflow:"hidden",height:Ne,width:Qe.current,top:kt},At=w.createElement("div",{className:xe("affix-header"),style:Et,ref:He},It(St,Ct)),w.createElement(w.Fragment,null,(0===n||n)&&At,w.createElement("div",{role:"rowgroup",className:xe("header-row-wrapper"),ref:ze},It(St,Ct)))),me&&function(e,t){var n,r=it(),i=r-Ne,o={top:Ne,height:i},s=0,a=0,l=0;if(Re.current=[],Ee){var c=0,u=Math.abs($e.current),d=u+r+("function"==typeof K?Ee.length?K(Ee[0]):100:K);if((!!ne||"function"==typeof P||k)&&q||!q){if(kte()){var f=3*r;u=Math.max(u-f,0),d+=f}for(var h=0;h<Ee.length;h++){var p=Ee[h],m=je[h],v=Lt(p),y=0,b=0;"function"==typeof P?b=y=P(p):(b=y=m?Math.max(m+26,P):P,v&&(y+="function"==typeof K?K(p):K)),s+=y;var x={key:h,top:c,rowIndex:h,width:t,depth:p[Kee],height:y,cellHeight:b};if(c+=y,q&&!k){if(c+y<u){a+=y;continue}if(c>d){l+=y;continue}}Re.current.push(Ht(e,p,x,v))}}else{var _=Pe(),C=Math.max(Math.floor(u/_),0),E=Math.min(C+Math.ceil(i/_)+5,Ee.length);if(kte()){var j=Math.floor(r/_*3);C=Math.max(C-j,0),E=Math.min(E+j,Ee.length)}s=Ee.length*_,a=C*_,l=(Ee.length-E)*_;for(var O=C;O<E;O++){var N=Ee[O],T={key:O,rowIndex:O,depth:N[Kee],top:O*_,width:t,height:_,cellHeight:_};Re.current.push(Ht(e,N,T,!1))}}}var M={position:"absolute",height:s,minHeight:r,pointerEvents:ct?"none":void 0},I={height:a},L={height:l};return w.createElement("div",{ref:Ve,role:"rowgroup",className:xe("body-row-wrapper"),style:o,onScroll:ft},w.createElement("div",{style:M,className:xe("body-wheel-area"),ref:Ue},a?w.createElement(jre,{style:I,className:"virtualized"}):null,Re.current,l?w.createElement(jre,{style:L,className:"virtualized"}):null),w.createElement(Lre,{locale:A,renderEmpty:ie,addPrefix:xe,loading:!(null===(n=Re.current)||void 0===n||!n.length)||S}),function(){var e=it();if(Y)return null;var t=[];return Nt&&t.push(w.createElement(Pre,{key:"scrollbar",tableId:g,style:{width:Qe.current},length:Qe.current,onScroll:ut,scrollLength:Xe.current,ref:Ge})),Ot&&t.push(w.createElement(Pre,{vertical:!0,key:"vertical-scrollbar",tableId:g,length:e-Ne,onScroll:dt,scrollLength:Ze.current,ref:We})),t}(),w.createElement(Ire,{locale:A,loadAnimation:J,loading:S,addPrefix:xe,renderLoading:re}))}(bt,jt),O&&w.createElement(Mre,{ref:De,addPrefix:xe,headerHeight:Ne,height:it()})))}));function Wre(e){return GV({url:"/v2/account/get_wallet_info",method:"get",data:e})}function qre(e){return GV({url:"/v2/account/get_token_amount",method:"get",data:e})}Gre.displayName="Table",Gre.propTypes={autoHeight:Aa.bool,fillHeight:Aa.bool,affixHeader:Aa.oneOfType([Aa.bool,Aa.number]),affixHorizontalScrollbar:Aa.oneOfType([Aa.bool,Aa.number]),bordered:Aa.bool,className:Aa.string,classPrefix:Aa.string,children:Aa.any,cellBordered:Aa.bool,data:Aa.array,defaultExpandAllRows:Aa.bool,defaultExpandedRowKeys:Aa.array,defaultSortType:Aa.any,disabledScroll:Aa.bool,expandedRowKeys:Aa.array,hover:Aa.bool,height:Aa.number,headerHeight:Aa.number,locale:Aa.object,loading:Aa.bool,loadAnimation:Aa.bool,minHeight:Aa.number,maxHeight:Aa.number,rowKey:Aa.oneOfType([Aa.string,Aa.number]),rowHeight:Aa.oneOfType([Aa.number,Aa.func]),renderTreeToggle:Aa.func,renderRowExpanded:Aa.func,renderRow:Aa.func,rowExpandedHeight:Aa.oneOfType([Aa.func,Aa.number]),renderEmpty:Aa.func,renderLoading:Aa.func,rowClassName:Aa.oneOfType([Aa.func,Aa.string]),rtl:Aa.bool,style:Aa.object,sortColumn:Aa.string,sortType:Aa.any,showHeader:Aa.bool,shouldUpdateScroll:Aa.oneOfType([Aa.func,Aa.bool]),translate3d:Aa.bool,wordWrap:Aa.any,width:Aa.number,virtualized:Aa.bool,isTree:Aa.bool,onRowClick:Aa.func,onRowContextMenu:Aa.func,onScroll:Aa.func,onSortColumn:Aa.func,onExpandChange:Aa.func,onTouchStart:Aa.func,onTouchMove:Aa.func,onTouchEnd:Aa.func};function Zre(e){const t=e.value,n=e.width,r=e.height,[i,o]=v.useState(!1),[s,a]=v.useState(!1);v.useEffect((()=>{o(1==(null==t?void 0:t.is_collect))}),[t]);const l=()=>g(this,null,(function*(){try{let e;a(!0),e=i?yield function(e){return GV({url:"/v1/account/delete_token_like",method:"post",data:e})}({token_ca:t.token_ca,chain_id:t.chain_id,pair_ca:t.pair_ca}):yield function(e){return GV({url:"/v1/account/add_token_like",method:"post",data:e})}({token_ca:t.token_ca,chain_id:t.chain_id,pair_ca:t.pair_ca}),a(!1),1e3==e.code&&o(!i)}catch(e){}}));return G.jsx(v.Fragment,{children:G.jsx(ef,{type:"text",size:"small",className:"w-20px h-20px! p-0px! b-none hover-none",loading:s,onClick:e=>{e.stopPropagation(),e.preventDefault(),l()},children:!s&&i?G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:n||"17",height:r||"17",viewBox:"0 0 20 20",fill:"none",children:G.jsx("path",{d:"M9.18335 3.46084C9.61421 2.59508 10.8591 2.59508 11.29 3.46084L12.9551 6.80682C13.1262 7.15061 13.457 7.3889 13.8395 7.44403L17.563 7.98058C18.5264 8.11941 18.9111 9.29353 18.214 9.96743L15.5197 12.5719C15.2428 12.8395 15.1165 13.2251 15.1819 13.6029L15.8179 17.2805C15.9825 18.2321 14.9753 18.9577 14.1136 18.5085L10.7832 16.7721C10.4411 16.5937 10.0323 16.5937 9.6900716.7721L6.35969 18.5085C5.49798 18.9577 4.49084 18.2321 4.65541 17.2805L5.29146 13.6029C5.35681 13.2251 5.23048 12.8395 4.95365 12.5719L2.25932 9.96743C1.56217 9.29353 1.94687 8.11941 2.9103 7.98058L6.63376 7.44403C7.01634 7.3889 7.34707 7.15061 7.51816 6.80682L9.18335 3.46084Z",fill:"#FFD320"})}):s?G.jsx(G.Fragment,{}):G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:n||"17",height:r||"17",viewBox:"0 0 17 17",fill:"none",children:G.jsx("path",{d:"M7.8748 2.9362C8.21949 2.2436 9.21541 2.2436 9.56009 2.9362L10.8922 5.61298C11.0291 5.88802 11.2937 6.07865 11.5998 6.12275L14.5785 6.552C15.3493 6.66306 15.657 7.60236 15.0993 8.14147L12.9439 10.2251C12.7224 10.4391 12.6213 10.7476 12.6736 11.0499L13.1824 13.992C13.3141 14.7532 12.5084 15.3337 11.819 14.9743L9.15472 13.5852C8.88097 13.4425 8.55393 13.4425 8.28018 13.5852L5.61588 14.9743C4.92651 15.3337 4.1208 14.7532 4.25245 13.992L4.76129 11.0499C4.81357 10.7476 4.71251 10.4391 4.49104 10.2251L2.33558 8.14147C1.77786 7.60236 2.08562 6.66306 2.85636 6.552L5.83514 6.12275C6.1412 6.07865 6.40578 5.88802 6.54266 5.61299L7.8748 2.9362Z",fill:"var(--Card-color)"})})})})}const Xre=new URL("/assets/svg/fire-580a31f6.svg",self.location).href;function Kre(e){const{t:t}=$2(),n=S(),[r,i]=v.useState(ee()||[]),[o,s]=v.useState(e.tableData||[]),[a,l]=v.useState(!1);v.useEffect((()=>{l(e.loading),s(e.tableData||[])}),[e.tableData]);const c=t=>{e.setFocus(!1),(e=>{let t=ee();if(t.length)t.some((t=>t.token_symbol.toLowerCase()===e.token_symbol.toLowerCase()))||(t.length>=6&&t.pop(),t.unshift(e),Q(t),i(t));else{lett=[];t.push(e),Q(t),i(t)}})(t),Se({url:`/deal?pair_ca=${t.pair_ca}&chain_id=${t.chain_id}&token_ca=${t.token_ca}&base_token_ca=${t.base_token_ca||""}&token_symbol=${t.token_symbol}&token_icon=${t.token_icon}&token_price=${t.token_price}&kline_24h=${t.kline_24h}`,chain_id:t.chain_id,pair_ca:t.pair_ca,token_ca:t.token_ca,base_token_ca:t.base_token_ca}),n(`/deal?pair_ca=${t.pair_ca}&chain_id=${t.chain_id}&token_ca=${t.token_ca}&base_token_ca=${t.base_token_ca||""}&token_symbol=${t.token_symbol}&token_icon=${t.token_icon}&token_price=${t.token_price}&kline_24h=${t.kline_24h}`)};return G.jsx(v.Fragment,{children:G.jsxs("div",{className:"search-table box-outside relative rounded-[3px] bg-[var(--Card-100)] p-[12px_0]",children:[e.loading&&G.jsx(ES,{dot:!0,className:"w-full h-full absolute top-0 left-0 right-0 bottom-0 z-10"}),r.length>0&&G.jsxs("div",{className:"pb-4px pl-16px pr-16px",children:[G.jsxs("div",{className:"flex gap-8px items-center justify-between",children:[t("search.record"),G.jsx("span",{className:"cursor-pointer",onClick:()=>{Q([]),i([])},children:G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.49479 5.12508V4.08341C6.49479 3.47563 6.73624 2.89273 7.16601 2.46296C7.59578 2.03319 8.17867 1.79175 8.78646 1.79175H12.1198C12.7276 1.79175 13.3105 2.03319 13.7402 2.46296C14.17 2.89273 14.4115 3.47563 14.4115 4.08341V5.12508H17.9531C18.2983 5.12508 18.5781 5.4049 18.5781 5.75008C18.5781 6.09526 18.2983 6.37508 17.9531 6.37508H16.9115L16.0781 17.4167C16.0781 18.0245 15.8367 18.6074 15.4069 19.0372C14.9771 19.467 14.3942 19.7084 13.7865 19.7084H7.11979C6.512 19.7084 5.92911 19.467 5.49934 19.0372C5.06957 18.6074 4.82812 18.0245 4.82812 17.4167L3.99479 6.37508H2.95312C2.60795 6.37508 2.32812 6.09526 2.32812 5.75008C2.32812 5.4049 2.60795 5.12508 2.95312 5.12508H6.49479ZM8.04989 3.34685C8.24524 3.15149 8.51019 3.04175 8.78646 3.04175H12.1198C12.3961 3.04175 12.661 3.15149 12.8564 3.34685C13.0517 3.5422 13.1615 3.80715 13.1615 4.08341V5.12508H7.74479V4.08341C7.74479 3.80715 7.85454 3.5422 8.04989 3.34685ZM5.24479 6.37508L6.07812 17.4167C6.07812 17.693 6.18787 17.958 6.38322 18.1533C6.57857 18.3487 6.84352 18.4584 7.11979 18.4584H13.7865C14.0627 18.4584 14.3277 18.3487 14.523 18.1533C14.7184 17.958 14.8281 17.693 14.8281 17.4167L15.6615 6.37508H5.24479Z",fill:"#848E9C"})})})]}),G.jsx("div",{className:"p-[12px_0] flex items-center gap-12px flex-wrap",children:r.map(((t,n)=>G.jsx(ef,{className:"p-[4px_12px] lh-16px",style:{backgroundColor:"var(--Split-line-100)"},shape:"round",onClick:()=>{(t=>{e.onHistoryList(t)})(t)},children:(t.token_type,G.jsx("span",{className:"color-[var(--Gray-100)]",children:t.token_symbol}))},n)))})]}),G.jsxs("div",{className:"flex gap-4px items-center pb-10px pl-16px",children:[t("search.hotSearch"),G.jsx("img",{src:Xre,alt:""})]}),G.jsx("div",{className:"h-300px relative",children:G.jsxs(Gre,{virtualized:!0,data:o,fillHeight:!0,rowHeight:56,rowKey:"pair_ca",className:"search-table-box",headerHeight:32,bordered:!1,affixHorizontalScrollbar:!0,cellBordered:!1,onRowClick:(e,t)=>{t.preventDefault(),t.stopPropagation(),c(e)},renderEmpty:()=>{if(!a)return G.jsx(e6,{style:{padding:"10px 0",backgroundColor:"var(--Card-100)"}})},children:[G.jsxs(ite,{width:180,resizable:!0,children:[G.jsx(fte,{children:t("tableHeaders.symbol")}),G.jsx(cte,{dataKey:"rowData",className:"lh-40px",children:e=>G.jsxs("div",{className:"flex gap-8px items-center pl-4px",children:[G.jsxs("span",{className:"relative w-20px h-20px lh-20px",children:[G.jsx(bp,{position:"bottom",className:"image-popover",content:G.jsx("img",{className:"w-180px h-180px rounded-180px",src:b3(e.token_icon)}),children:G.jsx($z,{preview:!1,src:b3(e.token_icon),width:"20",height:"20",className:"mr-8px b-rd-24px! ",error:G.jsx(bp,{position:"bottom",className:"image-popover",content:G.jsx("img",{className:"w-180px h-180px rounded-180px",src:I6}),children:G.jsx("img",{src:I6,className:"w-20px h-20px b-rd-24px"})})})}),G.jsx("img",{src:h3(e.chain_id),className:"w-10px h-10px absolute right-[-3px] bottom-[-3px] block b b-rd-16px"})]}),G.jsxs("span",{className:"text-14px",children:[e.token_symbol,G.jsxs("span",{className:"text-10px color-[var(--Gray-500)]",children:["(*",c3(e.token_ca,!0),")"]})]})]})})]}),G.jsxs(ite,{minWidth:100,flexGrow:1,children:[G.jsx(fte,{children:t("tableHeaders.mkt_cap")}),G.jsx(cte,{dataKey:"mkt_cap",className:"lh-40px",children:e=>`${V4(e.mkt_cap)}`})]}),G.jsxs(ite,{minWidth:100,flexGrow:1,children:[G.jsx(fte,{children:t("tableHeaders.price")}),G.jsx(cte,{dataKey:"token_price",className:"lh-40px",children:e=>`${V4(e.token_price)}`})]}),G.jsxs(ite,{minWidth:100,flexGrow:1,children:[G.jsx(fte,{children:t("tableHeaders.kline_24h")}),G.jsx(cte,{dataKey:"kline_24h",className:"lh-40px",children:e=>G.jsxs("span",{className:""+(e.kline_24h>0?"green":"danger"),children:[(100*e.kline_24h).toFixed(2),"%"]})})]}),G.jsxs(ite,{width:80,align:"right",children:[G.jsx(fte,{children:t("tableHeaders.collect")}),G.jsx(cte,{dataKey:"rowData",className:"lh-40px",children:e=>G.jsx(Zre,{value:e})})]})]})})]})})}const Yre=dh.Search;let $re=[];function Jre(){var e;const{t:t}=$2(),n=v.useRef(null),{chainMode:r}=Wr((e=>e.chainConfig)),[i,o]=v.useState([]),[s,a]=v.useState([]),[l,c]=v.useState(!1),[u,d]=v.useState(!1),[f,h]=v.useState(""),p=v.useRef(_u((e=>g(this,null,(function*(){if(e){c(!0);try{const t=yield XV({content:e.trim()});1e3===t.code&&o(JSON.parse(JSON.stringify(t.data))||[])}catch(t){}finally{c(!1)}}else o($re)}))),500)).current;v.useEffect((()=>{(()=>{g(this,null,(function*(){var e;try{let t={list_type:0,time_dime:"24h",chain_id:(null==r?void 0:r.chain_id)||1,list_page:1};const n=(null==(e=(yield ZV(t)).data)?void 0:e.list)||[];$re=n,o(n)}catch(t){}}))})()}),[]);const m=e=>{n.current&&!n.current.contains(null==e?void 0:e.target)&&(d(!1),h(""))};v.useEffect((()=>{a(JSON.parse(JSON.stringify(i)))}),[i]),v.useEffect((()=>(document.addEventListener("mousedown",m,!0),()=>{document.removeEventListener("mousedown",m,!0)})),[]),v.useEffect((()=>{p(f)}),[f]);const y=e=>{d(e)};return G.jsxs(v.Fragment,{children:[G.jsxs("div",{className:"relative flex-1 min-w-200px box-outside bg-[var(--Split-line-100)] b-rd-6px",ref:n,onClick:e=>{e.preventDefault(),d(!0)},children:[G.jsx(Yre,{prefix:G.jsx("img",{src:Z4,alt:"search",className:"w-16px h-16px"}),suffix:null,style:{width:"100%",height:"32px",flex:"1"},placeholder:t("search.placeholder"),className:"b-rd-6px! a-input b-none!",allowClear:!0,value:f,onChange:e=>h(e),onFocus:()=>d(!0)}),u?G.jsx(G.Fragment,{children:G.jsx("div",{className:"box-outside z-122 absolute right-0 left-0 z-10 top-[48px] rounded-[3px]",children:2===(null==(e=s[0])?void 0:e.token_type)?G.jsx(Z6,{tableData:s,loading:l,setFocus:y,setValue:e=>{h(e)}}):G.jsx(Kre,{tableData:s,loading:l,setFocus:y,onHistoryList:e=>{p(2===e.token_type?e.token_ca:e.token_symbol),h(2===e.token_type?e.token_ca:e.token_symbol)}})})}):null]}),u?G.jsx("div",{className:"fixed top-50px left-0 w-full h-full z-1"}):null]})}class Qre{constructor(){m(this,"serverPublicKey",null),m(this,"clientKeyPair",null),m(this,"sharedSecret",null)}getServerPublicKey(e=1){return g(this,null,(function*(){try{const t=yield GV({url:"/v2/public/encrypt",method:"post",data:{type:e}});if(1e3===(null==t?void 0:t.code))return this.serverPublicKey=t.data.pk,this.serverPublicKey;throw new Error("获取服务端公钥失败")}catch(t){throw hc.error(t instanceof Error?t.message:"error"),t}}))}generateClientKeyPair(){return g(this,null,(function*(){try{const e=yield window.crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey","deriveBits"]),t=yield window.crypto.subtle.exportKey("spki",e.publicKey),n=yield window.crypto.subtle.exportKey("pkcs8",e.privateKey);return this.clientKeyPair={publicKey:e.publicKey,privateKey:e.privateKey,publicKeyHex:this.arrayBufferToHex(t),privateKeyHex:this.arrayBufferToHex(n)},this.clientKeyPair}catch(e){throw e}}))}importServerPublicKey(){return g(this,null,(function*(){if(!this.serverPublicKey)throw new Error("服务端公钥未获取");try{const e=this.hexToArrayBuffer(this.serverPublicKey);return yield window.crypto.subtle.importKey("spki",e,{name:"ECDH",namedCurve:"P-256"},!0,[])}catch(e){throw e}}))}deriveSharedSecret(){return g(this,null,(function*(){if(!this.clientKeyPair||!this.serverPublicKey)throw new Error("客户端密钥对或服务端公钥未准备好");try{const e=yield this.importServerPublicKey(),t=yield window.crypto.subtle.deriveBits({name:"ECDH",public:e},this.clientKeyPair.privateKey,256),n=yield window.crypto.subtle.digest("SHA-256",t);return this.sharedSecret=this.arrayBufferToHex(n),this.sharedSecret}catch(e){throw e}}))}generateNonce(){const e=new Uint8Array(12);return window.crypto.getRandomValues(e),this.arrayBufferToHex(e)}encryptData(e,t){return g(this,null,(function*(){if(!this.sharedSecret)throw new Error("共享密钥未生成");try{const n=JSON.stringify(e),r=this.generateNonce(),i=this.hexToArrayBuffer(r),o=yield window.crypto.subtle.importKey("raw",this.hexToArrayBuffer(this.sharedSecret),{name:"AES-GCM"},!1,["encrypt"]),s=(new TextEncoder).encode(n),a=yield window.crypto.subtle.encrypt({name:"AES-GCM",iv:i,tagLength:128},o,s);return{nonce:r,type:t,pk:this.clientKeyPair.publicKeyHex,ciphertext:this.arrayBufferToHex(a)}}catch(n){throw n}}))}encrypt(e,t=1){return g(this,null,(function*(){return yield this.getServerPublicKey(t),yield this.generateClientKeyPair(),yield this.deriveSharedSecret(),yield this.encryptData(e,t)}))}arrayBufferToHex(e){return Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")}hexToArrayBuffer(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.substring(n,n+2),16);return t.buffer}}function eie(e,t,n){return g(this,null,(function*(){try{const r=new Qre,i=yield r.encrypt(t,n);return yield GV({url:`${e}`,method:"post",data:i})}catch(r){throw r}}))}function tie(e){return GV({url:"/v2/account/set_wallet_info",method:"post",data:e})}function nie(e){return GV({url:"/v1/data/get_gas_type_detail_infos",method:"get",data:e})}function rie(e){return GV({url:"/v1/account/get_commission_info",method:"get",data:e})}function iie(e){if(Array.isArray(e.chain_ids)){let t=e.chain_ids.map((e=>`chain_ids=${e}`)).join("&");return GV({url:`/v1/data/get_chain_token_price?${t}`,method:"get"})}return GV({url:`/v1/data/get_chain_token_price?chain_ids=${e.chain_ids}`,method:"get"})}function oie(e){return GV({url:"/v1/account/get_account_info",method:"get",data:e})}function sie(e){return GV({url:"/v2/account/get_account_info",method:"get",data:e})}function aie(e){return GV({url:"/v2/account/get_wallet_secret_info",method:"post",data:e})}function lie(e,t){return eie("/v2/account/add_wallet_new",e,t)}function cie(e){return GV({url:"/v2/account/delete_wallet",method:"post",data:e})}function uie(e){return GV({url:"/v1/account/get_email_code",method:"get",data:e})}function die(e){return GV({url:"/v1/account/export_wallet_new",method:"post",data:e})}function fie(e){return GV({url:"/v1/account/get_compensation",method:"get",data:e})}function hie(e){return GV({url:"/v1/account/confirm_compensation",method:"post",data:e})}function pie(e){return GV({url:"/v1/account/confirm_compensation_address",method:"post",data:e})}function mie(e){return GV({url:"/v2/account/nft_transfer",method:"post",data:e})}function gie(e){return GV({url:"/v1/data/update_popup",method:"get",data:e})}const vie="/assets/svg/walletyes-e8f66b51.svg";function yie(){const{t:e}=$2(),t=HU(),{isShowRegWallet:n}=zU((e=>e.login)),r=()=>g(this,null,(function*(){try{const e=yield aie({});1e3===e.code?e.data.is_set?t({type:"login/setIsCodeSubmitModal",payload:{codeMsgType:"add",modal:!0}}):(t({type:"login/setIsShowRegWallet",payload:!1}),t({type:"login/setIsAuthorizationModal",payload:!0})):1600===e.code&&(t({type:"login/setIsShowRegWallet",payload:!1}),t({type:"login/setIsAuthorizationModal",payload:!0}))}catch(e){}}));return G.jsx(G.Fragment,{children:n&&G.jsx(TD,{visible:n,footer:null,className:"modal-border-12 w-480px! wallet-reg-modal bg-[var(--Card-100)]!",closable:!1,title:null,children:G.jsx("div",{className:"p-[36px_0_0]",children:G.jsxs("div",{className:"flex flex-col gap-24px",children:[G.jsxs("div",{children:[G.jsx("h3",{className:"text-center text-24px mb-8px",children:e("wallet.create_chain_wallet")}),G.jsx("p",{className:"color-[var(-Gray-200)] text-center",children:e("wallet.security_upgraded")})]}),G.jsx("div",{children:G.jsx("img",{src:"/assets/png/image481-590adce5.png",alt:"",className:"w-200px m-auto block"})}),G.jsx("div",{children:e("wallet.upgraded_msg")}),G.jsx("div",{children:e("wallet.upgraded_msg2")}),G.jsx("div",{children:G.jsx(ef,{className:"w-100% h-46px! b-rd-46px!",type:"primary",onClick:()=>{r()},children:G.jsx("span",{className:"font-black",children:e("wallet.create_wallet")})})})]})})})})}const bie=AA.Item;function xie(){var e,t,n;const{t:r}=$2(),i=v.useRef(null),o=v.useRef(null),s=zr(),{chainMode:a}=Wr((e=>e.chainConfig)),[l,c]=v.useState((null==(e=ie())?void 0:e.allWalletGroups)||[]),[u,d]=v.useState((null==(t=ie())?void 0:t.activeWallet)||{}),[p,m]=v.useState((null==(n=ie())?void 0:n.chainWallet)||{}),{walletAll:y}=zU((e=>e.account)),{newTokenTransferNotice:b}=zU((e=>e.login)),{isRefreshWallet:x}=zU((e=>e.login)),[_,w]=v.useState(!1),[C,k]=v.useState(!1),S=()=>g(this,null,(function*(){var e,t,n,r,i,o,l,u;s({type:"login/setIsShowRegWallet",payload:!1}),s({type:"login/setIsAuthorizationModal",payload:!1});let p=yield sie({});if(1e3===p.code){if(!(null==(n=null==(t=null==(e=p.data)?void 0:e.user_wallets_info)?void 0:t.user_wallet_groups)?void 0:n.length))return s({type:"login/setIsShowRegWallet",payload:!0}),d({}),void localStorage.removeItem("walletInfo");const m=(null==(i=null==(r=p.data)?void 0:r.user_wallets_info)?void 0:i.user_wallet_groups)||[],g=null==(o=p.data)?void 0:o.user_wallets_info,v=m.filter((e=>{var t,n;return e.wallet_group_id==((null==(t=null==g?void 0:g.using_wallet_group_id)?void 0:t[0])||(null==(n=m[0])?void 0:n.wallet_group_id))}));v[0]||E(m[0].wallet_group_id);const y=null==(l=v[0].user_wallets)?void 0:l.filter((e=>e.chain_id==((null==a?void 0:a.chain_id)||1))),b=null==(u=v[0])?void 0:u.group_tag,x=null==y?void 0:y.map((e=>h(f({},e),{group_tag:b})));re({allWalletGroups:m,chainWallet:x[0]||{},activeWallet:v[0]}),c(m||[]),d(v[0]),yield s({type:"login/setUserInfo",payload:p.data}),yield s({type:"account/setChainWallet",payload:(null==x?void 0:x[0])||{}}),yield s({type:"account/setWalletGrouos",payload:v}),yield s({type:"account/setTotalChainGasType",payload:p.data.total_chain_gas_type})}}));function E(e){return g(this,null,(function*(){var t,n;try{if(1e3==(yield tie({set_type:[4],wallet_groups:[e]})).code){const i=l.filter((t=>t.wallet_group_id==e)),o=null==(t=i[0].user_wallets)?void 0:t.filter((e=>e.chain_id==((null==a?void 0:a.chain_id)||1))),c=null==(n=i[0])?void 0:n.group_tag,u=null==o?void 0:o.map((e=>h(f({},e),{group_tag:c})));d(i[0]);const p=l.find((e=>e.wallet_group_id===o[0].wallet_group_id))||{};m(h(f({},o[0]),{wall_group_values:null==p?void 0:p.wall_group_values})),re({chainWallet:(null==o?void 0:o[0])||{},activeWallet:null==i?void 0:i[0]}),i[0].risk_level&&"1"!==localStorage.getItem("checkedRisk")&&w(!0),hc.success(r("reset_auth_code.wallet_switch_success")),s({type:"account/setChainWallet",payload:(null==u?void 0:u[0])||{}}),s({type:"account/setWalletGrouos",payload:i})}}catch(i){}}))}v.useEffect((()=>{S()}),[y,Mn.language]),v.useEffect((()=>{x&&(S(),s(qn()))}),[x]),v.useEffect((()=>{b&&(S(),s(Gn()))}),[b]),v.useEffect((()=>{var e;if(!(null==u?void 0:u.user_wallets))return;const t=null==(e=u.user_wallets)?void 0:e.filter((e=>e.chain_id==(null==a?void 0:a.chain_id)));re({chainWallet:(null==t?void 0:t[0])||{}}),p.chain_id!=a.chain_id&&s({type:"account/setChainWallet",payload:(null==t?void 0:t[0])||{}})}),[a]);const A=e=>G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:"flex items-center gap-2px",children:[u.wallet_group_id==e.wallet_group_id?G.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[G.jsx("path",{d:"M16 21.366C18.8 21.366 20.73 19.616 20.97 16.946C21 16.656 20.76 16.416 20.47 16.416H19.04C17.1416.416 15.54 14.986 15.38 13.166C15.29 12.126 15.67 11.086 16.43 10.346C17.07 9.68597 17.96 9.31597 18.92 9.31597H20.47C20.76 9.31597 21 9.07597 20.97 8.78597C20.76 6.36597 19.14 4.69597 16.75 4.41597C16.51 4.37597 16.26 4.36597 16 4.36597H7C6.72 4.36597 6.45 4.38597 6.19 4.42597C3.64 4.74597 2 6.64597 2 9.36597V16.366C2 19.126 4.24 21.366 7 21.366H16Z",fill:"var(--Primary-100)"}),G.jsx("path",{d:"M22 13.8959V11.8359C22 11.2859 21.56 10.8359 21 10.8159H18.92C18.36 10.8159 17.85 11.0359 17.48 11.4159C17.06 11.8259 16.82 12.4159 16.88 13.0459C16.97 14.1259 17.96 14.9159 19.04 14.9159H21C21.56 14.8959 22 14.4459 22 13.8959Z",fill:"var(--Primary-100)"})]}):G.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[G.jsx("path",{d:"M16 21.366C18.8 21.366 20.73 19.616 20.97 16.946C21 16.656 20.76 16.416 20.47 16.416H19.04C17.14 16.416 15.54 14.986 15.38 13.166C15.29 12.126 15.67 11.086 16.43 10.346C17.07 9.68597 17.96 9.31597 18.92 9.31597H20.47C20.76 9.31597 21 9.07597 20.97 8.78597C20.76 6.36597 19.14 4.69597 16.75 4.41597C16.51 4.37597 16.26 4.36597 16 4.36597H7C6.72 4.36597 6.45 4.38597 6.19 4.42597C3.64 4.74597 2 6.64597 2 9.36597V16.366C2 19.126 4.24 21.366 7 21.366H16Z",fill:"var(--Gray-100)"}),G.jsx("path",{d:"M22 13.8959V11.8359C22 11.2859 21.56 10.8359 21 10.8159H18.92C18.36 10.8159 17.85 11.0359 17.48 11.4159C17.06 11.8259 16.82 12.4159 16.88 13.0459C16.97 14.1259 17.96 14.9159 19.04 14.9159H21C21.56 14.8959 22 14.4459 22 13.8959Z",fill:"var(--Gray-100)"})]}),G.jsx("strong",{className:"font-bold color-[var(--Gray-100)] ml-4px text-16px "+(u.wallet_group_id==e.wallet_group_id?"color-[var(--Primary-100)]!":""),children:e.group_tag?C3(e.group_tag):`${r("wallet.index")} ${Number(e.wallet_group_id)>=10?null==e?void 0:e.wallet_group_id:`0${(null==e?void 0:e.wallet_group_id)||""}`}`}),(null==e?void 0:e.risk_text)?0==(null==e?void 0:e.risk_level)?G.jsxs("svg",{className:"ml-4px",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",children:[G.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.8585 3.26287C13.8585 2.93892 13.6212 2.65788 13.2816 2.57675L10.4392 1.89785C9.41629 1.65354 8.3434 1.64993 7.31863 1.88734L4.33064 2.57958C3.98822 2.65892 3.74814 2.94153 3.74822 3.26749C3.74846 4.28393 3.74839 6.63592 3.74805 8.55835C3.74787 9.52935 3.94198 10.3985 4.51609 11.2121C5.38349 12.4412 6.216 12.7222 8.52006 13.9299C8.74291 14.0467 9.01651 14.0451 9.23767 13.9256C11.4699 12.7194 12.3194 12.4376 13.1594 11.2516C13.7284 10.4482 13.8585 9.54083 13.8585 8.58092C13.8585 6.59578 13.8585 4.29373 13.8585 3.26287Z",fill:"#FFD320"}),G.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5261 1.23737L10.5185 1.23556C9.40025 0.968472 8.2274 0.96413 7.10691 1.22289L3.55871 2.09321C3.22027 2.17623 2.98648 2.4573 2.98655 2.77863C2.98686 4.21301 2.98728 6.80501 2.9868 8.97808C2.9866 9.86528 3.17418 10.697 3.63473 11.3656C4.50891 12.6347 5.2723 13.2002 7.17405 14.1618C7.62296 14.3889 8.13403 14.6473 8.72308 14.956C8.75565 14.9731 8.79556 14.9727 8.82736 14.9555C9.40845 14.6415 9.9119 14.3793 10.3537 14.1492C12.1924 13.1915 12.987 12.6217 13.8458 11.3578C14.2968 10.6941 14.4806 9.87183 14.4806 8.99511V2.66388C14.4806 2.33519 14.2362 2.04958 13.8884 1.97345L10.5261 1.23737ZM6.91454 0.534735C8.16138 0.245875 9.46676 0.25027 10.7113 0.547519L14.066 1.28193C14.7602 1.43389 15.2503 2.0052 15.2503 2.66388V8.99511C15.2503 9.95502 15.0503 10.9224 14.4978 11.7355C13.5283 13.1623 12.548 13.8273 10.6755 14.7997C10.242 15.0248 9.75936 15.2754 9.21618 15.5689C8.94709 15.7143 8.6142 15.7162 8.34306 15.5741C7.79135 15.2849 7.30087 15.0377 6.86013 14.8155C4.92587 13.8405 3.97272 13.1806 2.98521 11.747C2.42081 10.9277 2.21683 9.94894 2.21704 8.97794C2.21753 6.80502 2.21711 4.21313 2.2168 2.77877C2.21666 2.13417 2.68631 1.57185 3.36107 1.40635L6.91454 0.534735Z",fill:"#FFD320"}),G.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.5518 5.55309C12.7706 5.76726 12.7599 6.10461 12.5279 6.30656L9.04202 9.34137C8.47695 9.83332 7.57956 9.78335 7.08262 9.23226L5.53014 7.51058C5.32613 7.28435 5.3594 6.94826 5.60443 6.75991C5.84947 6.57156 6.21349 6.60227 6.41749 6.8285L7.96997 8.55018C8.04097 8.6289 8.16916 8.63604 8.24989 8.56576L11.7358 5.53096C11.9677 5.329 12.3331 5.33891 12.5518 5.55309Z",fill:"black"})]}):G.jsx("span",{className:"inline-block p-[2px_8px] text-12px ml-4px b-rd-2px lh-16px bg-[var(--Danger-200)]color-[var(--Danger-100)]",children:null==e?void 0:e.risk_text}):null]}),G.jsxs("div",{className:"text-14px font-500",children:["$",V4(null==e?void 0:e.wall_group_values)]})]});return G.jsxs(v.Fragment,{children:[G.jsx("div",{className:"wallet-content bg-[var(--Split-line-100)]! pl-8px pr-8px",children:G.jsx(gy,{ref:i,droplist:(e=>G.jsx("div",{className:j3("dialog-wallet-content max-h-600px overflow-y-auto"),children:G.jsx(AA,{className:"bg-[var(--Card-100)]!",defaultActiveKey:[null==u?void 0:u.wallet_group_id],expandIconPosition:"right",accordion:!0,onChange:e=>{e!==(null==u?void 0:u.wallet_group_id)&&(o.current&&clearTimeout(o.current),o.current=setTimeout((()=>{E(e)}),300))},children:e.map((e=>G.jsx(bie,{expandIcon:G.jsx("svg",{className:"w-24px h-24px rotate-180 expand-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5303 16.3963C18.2374 16.6892 17.7626 16.6892 17.4697 16.3963L12 10.9266L6.53033 16.3963C6.23744 16.6892 5.76256 16.6892 5.46967 16.3963C5.17678 16.1034 5.17678 15.6285 5.46967 15.3356L11.4697 9.33564C11.7626 9.04274 12.2374 9.04274 12.5303 9.33563L18.5303 15.3356C18.8232 15.6285 18.8232 16.1034 18.5303 16.3963Z",fill:"var(--Gray-100)"})}),name:e.wallet_group_id,header:A(e),className:"bg-[var(--Split-line-100)]!",children:G.jsx("div",{className:"flex flex-col gap-16px ",children:e.user_wallets.map((e=>{var t;return G.jsxs("div",{className:"flex items-center justify-between h-36px pt-4px pb-4px ",children:[G.jsxs("div",{className:"flex items-center gap-8px",children:[G.jsx($z,{width:24,height:24,src:h3(e.chain_id),alt:"wallet",preview:!1}),G.jsxs("div",{className:"lh-16px",children:[G.jsx("h3",{className:"mt-0 mb-0 color-[var(--Gray-100)] text-12px",children:null==(t=w3(e.chain_id))?void 0:t.chain_name}),G.jsxs("span",{className:"color-[var(--Gray-200)] text-12px",children:["≈$",V4(e.token_value)]})]})]}),G.jsxs("div",{className:"flex items-center",children:[G.jsx("span",{className:"mr-8px color-[var(--Gray-200)] text-12px",children:c3(e.user_wallet_address)}),G.jsx(L6,{text:e.user_wallet_address,className:"w-16px h-16px cursor-pointer"})]})]},e.wallet_id)}))})},e.wallet_group_id)))})}))(l),position:"br",trigger:"click",className:"select-wallet-dropdown",children:G.jsxs("div",{className:"flex items-center justify-between login-content",children:[G.jsxs("div",{className:"wallet-left cursor-pointer flex ",children:[G.jsxs("div",{className:"flex items-center",children:[G.jsx("img",{src:vie,alt:"",className:"w-22px h-22px mr-4px"}),G.jsxs("span",{className:"color-[var(--Gray-100)] font-500flex items-center",children:[(null==u?void 0:u.group_tag)?C3(null==u?void 0:u.group_tag):`${r("wallet.index")} ${Number(u.wallet_group_id)>=10?null==u?void 0:u.wallet_group_id:`0${(null==u?void 0:u.wallet_group_id)||""}`}`,(null==u?void 0:u.risk_text)?0==(null==u?void 0:u.risk_level)?G.jsxs("svg",{className:"ml-4px",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",children:[G.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.8585 3.26287C13.8585 2.93892 13.6212 2.65788 13.2816 2.57675L10.4392 1.89785C9.41629 1.65354 8.3434 1.64993 7.31863 1.88734L4.33064 2.57958C3.98822 2.65892 3.74814 2.94153 3.74822 3.26749C3.74846 4.28393 3.74839 6.63592 3.74805 8.55835C3.74787 9.52935 3.94198 10.3985 4.51609 11.2121C5.38349 12.4412 6.216 12.7222 8.52006 13.9299C8.74291 14.0467 9.01651 14.0451 9.23767 13.9256C11.4699 12.7194 12.3194 12.4376 13.1594 11.2516C13.7284 10.4482 13.8585 9.54083 13.8585 8.58092C13.8585 6.59578 13.8585 4.29373 13.8585 3.26287Z",fill:"#FFD320"}),G.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5261 1.23737L10.5185 1.23556C9.40025 0.968472 8.2274 0.96413 7.10691 1.22289L3.55871 2.09321C3.22027 2.17623 2.98648 2.4573 2.98655 2.77863C2.98686 4.21301 2.98728 6.80501 2.9868 8.97808C2.9866 9.86528 3.17418 10.697 3.63473 11.3656C4.50891 12.6347 5.2723 13.2002 7.17405 14.1618C7.62296 14.3889 8.13403 14.6473 8.72308 14.956C8.75565 14.9731 8.79556 14.9727 8.82736 14.9555C9.40845 14.6415 9.9119 14.3793 10.3537 14.1492C12.1924 13.1915 12.987 12.6217 13.8458 11.3578C14.2968 10.6941 14.4806 9.87183 14.4806 8.99511V2.66388C14.4806 2.33519 14.2362 2.04958 13.8884 1.97345L10.5261 1.23737ZM6.91454 0.534735C8.16138 0.245875 9.46676 0.25027 10.7113 0.547519L14.066 1.28193C14.7602 1.43389 15.2503 2.0052 15.2503 2.66388V8.99511C15.2503 9.95502 15.0503 10.9224 14.4978 11.7355C13.5283 13.1623 12.548 13.8273 10.6755 14.7997C10.242 15.0248 9.75936 15.2754 9.21618 15.5689C8.94709 15.7143 8.6142 15.7162 8.34306 15.5741C7.79135 15.2849 7.30087 15.0377 6.86013 14.8155C4.92587 13.8405 3.97272 13.1806 2.98521 11.747C2.42081 10.9277 2.21683 9.94894 2.21704 8.97794C2.21753 6.80502 2.21711 4.21313 2.2168 2.77877C2.21666 2.13417 2.68631 1.57185 3.36107 1.40635L6.91454 0.534735Z",fill:"#FFD320"}),G.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.5518 5.55309C12.7706 5.76726 12.7599 6.10461 12.5279 6.30656L9.04202 9.34137C8.47695 9.83332 7.57956 9.78335 7.08262 9.23226L5.53014 7.51058C5.32613 7.28435 5.3594 6.94826 5.60443 6.75991C5.84947 6.57156 6.21349 6.60227 6.41749 6.8285L7.96997 8.55018C8.04097 8.6289 8.16916 8.63604 8.24989 8.56576L11.7358 5.53096C11.9677 5.329 12.3331 5.33891 12.5518 5.55309Z",fill:"black"})]}):G.jsx("span",{className:"inline-block p-[2px_8px] text-12px ml-4px b-rd-2px lh-16px bg-[var(--Danger-200)] color-[var(--Danger-100)]",children:null==u?void 0:u.risk_text}):null]})]}),G.jsx("span",{className:"color-[var(--Gray-200)] w-1px h-16px ml-12px mr-12px",children:"|"}),G.jsx("div",{className:"flex items-center",children:G.jsxs("span",{className:"color-[var(--Gray-100)] font-500",children:["$",V4(null==u?void 0:u.wall_group_values)]})})]}),G.jsx("div",{className:"wallet-right ml-12px flex cursor-pointer",children:G.jsx(ep,{className:"text-base"})})]})})}),G.jsx(TD,{visible:_,footer:null,title:null,className:"modal-border-12 w-292px! modal-no-title modal-close-icon risk-modal",onCancel:()=>{w(!1)},children:G.jsxs("div",{className:"flex flex-col gap-16px",children:[G.jsx("div",{className:"text-center text-16px",children:r("secure.notice")}),G.jsx("div",{children:r("secure.current_wallet_risk")}),G.jsx("div",{children:G.jsx(Vh,{checked:C,onChange:e=>{e?(k(!0),localStorage.setItem("checkedRisk","1")):(k(!1),localStorage.removeItem("checkedRisk"))},children:G.jsx("span",{className:"color-[var(--Gray-400)]",children:r("secure.not_msg")})})}),G.jsx("div",{children:G.jsx(ef,{type:"primary",className:"w-100% h-44px! b-rd-44px!",onClick:()=>{w(!1)},children:G.jsx("div",{className:"text-16px",children:r("deal.got_it")})})})]})}),G.jsx(yie,{})]})}var _ie={},wie={L:1,M:0,Q:3,H:2},Cie={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},kie=Cie;function Sie(e){this.mode=kie.MODE_8BIT_BYTE,this.data=e}Sie.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var Eie=Sie,Aie=wie;function jie(e,t){this.totalCount=e,this.dataCount=t}jie.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],jie.getRSBlocks=function(e,t){varn=jie.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,o=0;o<r;o++)for(var s=n[3*o+0],a=n[3*o+1],l=n[3*o+2],c=0;c<s;c++)i.push(new jie(a,l));return i},jie.getRsBlockTable=function(e,t){switch(t){case Aie.L:return jie.RS_BLOCK_TABLE[4*(e-1)+0];case Aie.M:return jie.RS_BLOCK_TABLE[4*(e-1)+1];case Aie.Q:return jie.RS_BLOCK_TABLE[4*(e-1)+2];case Aie.H:return jie.RS_BLOCK_TABLE[4*(e-1)+3];default:return}};var Oie=jie;function Nie(){this.buffer=new Array,this.length=0}Nie.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};for(var Tie=Nie,Pie={glog:function(e){if(e<1)throw newError("glog("+e+")");return Pie.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return Pie.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},Mie=0;Mie<8;Mie++)Pie.EXP_TABLE[Mie]=1<<Mie;for(Mie=8;Mie<256;Mie++)Pie.EXP_TABLE[Mie]=Pie.EXP_TABLE[Mie-4]^Pie.EXP_TABLE[Mie-5]^Pie.EXP_TABLE[Mie-6]^Pie.EXP_TABLE[Mie-8];for(Mie=0;Mie<255;Mie++)Pie.LOG_TABLE[Pie.EXP_TABLE[Mie]]=Mie;var Iie=Pie,Lie=Iie;function Rie(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}Rie.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<e.getLength();r++)t[n+r]^=Lie.gexp(Lie.glog(this.get(n))+Lie.glog(e.get(r)));return new Rie(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=Lie.glog(this.get(0))-Lie.glog(e.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<e.getLength();r++)n[r]^=Lie.gexp(Lie.glog(e.get(r))+t);return new Rie(n,0).mod(e)}};var Die=Cie,Bie=Rie,Fie=Iie,Hie=0,zie=1,Vie=2,Uie=3,Gie=4,Wie=5,qie=6,Zie=7,Xie={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;Xie.getBCHDigit(t)-Xie.getBCHDigit(Xie.G15)>=0;)t^=Xie.G15<<Xie.getBCHDigit(t)-Xie.getBCHDigit(Xie.G15);return(e<<10|t)^Xie.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;Xie.getBCHDigit(t)-Xie.getBCHDigit(Xie.G18)>=0;)t^=Xie.G18<<Xie.getBCHDigit(t)-Xie.getBCHDigit(Xie.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return Xie.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case Hie:return(t+n)%2==0;case zie:return t%2==0;case Vie:return n%3==0;case Uie:return(t+n)%3==0;case Gie:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case Wie:return t*n%2+t*n%3==0;case qie:return(t*n%2+t*n%3)%2==0;case Zie:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new Bie([1],0),n=0;n<e;n++)t=t.multiply(new Bie([1,Fie.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case Die.MODE_NUMBER:return 10;case Die.MODE_ALPHA_NUM:return 9;case Die.MODE_8BIT_BYTE:case Die.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case Die.MODE_NUMBER:return 12;case Die.MODE_ALPHA_NUM:return 11;case Die.MODE_8BIT_BYTE:return 16;case Die.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case Die.MODE_NUMBER:return 14;case Die.MODE_ALPHA_NUM:return 13;case Die.MODE_8BIT_BYTE:return 16;case Die.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var i=0;i<t;i++){for(var o=0,s=e.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||t<=r+a))for(var l=-1;l<=1;l++)i+l<0||t<=i+l||0==a&&0==l||s==e.isDark(r+a,i+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var c=0;e.isDark(r,i)&&c++,e.isDark(r+1,i)&&c++,e.isDark(r,i+1)&&c++,e.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var u=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}},Kie=Eie,Yie=Oie,$ie=Tie,Jie=Xie,Qie=Rie;function eoe(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var toe=eoe.prototype;toe.addData=function(e){var t=new Kie(e);this.dataList.push(t),this.dataCache=null},toe.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},toe.getModuleCount=function(){return this.moduleCount},toe.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=Yie.getRSBlocks(e,this.errorCorrectLevel),n=new $ie,r=0,i=0;i<t.length;i++)r+=t[i].dataCount;for(i=0;i<this.dataList.length;i++){var o=this.dataList[i];n.put(o.mode,4),n.put(o.getLength(),Jie.getLengthInBits(o.mode,e)),o.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},toe.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=eoe.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},toe.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},toe.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=Jie.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},toe.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,s=0;s<this.modules[i].length;s++){var a=1*s;this.modules[i][s]&&(r.beginFill(0,100),r.moveTo(a,o),r.lineTo(a+1,o),r.lineTo(a+1,o+1),r.lineTo(a,o+1),r.endFill())}return r},toe.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},toe.setupPositionAdjustPattern=function(){for(var e=Jie.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],i=e[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},toe.setupTypeNumber=function(e){for(var t=Jie.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},toe.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=Jie.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},toe.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[r][s-a]){var l=!1;o<e.length&&(l=1==(e[o]>>>i&1)),Jie.getMask(t,r,s-a)&&(l=!l),this.modules[r][s-a]=l,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},eoe.PAD0=236,eoe.PAD1=17,eoe.createData=function(e,t,n){for(var r=Yie.getRSBlocks(e,t),i=new $ie,o=0;o<n.length;o++){var s=n[o];i.put(s.mode,4),i.put(s.getLength(),Jie.getLengthInBits(s.mode,e)),s.write(i)}var a=0;for(o=0;o<r.length;o++)a+=r[o].dataCount;if(i.getLengthInBits()>8*a)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*a+")");for(i.getLengthInBits()+4<=8*a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*a||(i.put(eoe.PAD0,8),i.getLengthInBits()>=8*a));)i.put(eoe.PAD1,8);return eoe.createBytes(i,r)},eoe.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),s=new Array(t.length),a=0;a<t.length;a++){var l=t[a].dataCount,c=t[a].totalCount-l;r=Math.max(r,l),i=Math.max(i,c),o[a]=new Array(l);for(var u=0;u<o[a].length;u++)o[a][u]=255&e.buffer[u+n];n+=l;var d=Jie.getErrorCorrectPolynomial(c),f=new Qie(o[a],d.getLength()-1).mod(d);s[a]=new Array(d.getLength()-1);for(u=0;u<s[a].length;u++){var h=u+f.getLength()-s[a].length;s[a][u]=h>=0?f.get(h):0}}var p=0;for(u=0;u<t.length;u++)p+=t[u].totalCount;var m=new Array(p),g=0;for(u=0;u<r;u++)for(a=0;a<t.length;a++)u<o[a].length&&(m[g++]=o[a][u]);for(u=0;u<i;u++)for(a=0;a<t.length;a++)u<s[a].length&&(m[g++]=s[a][u]);return m};var noe=eoe,roe={};Object.defineProperty(roe,"__esModule",{value:!0});var ioe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}returne},ooe=loe(Ea),soe=v,aoe=loe(soe);function loe(e){return e&&e.__esModule?e:{default:e}}var coe={bgColor:ooe.default.oneOfType([ooe.default.object,ooe.default.string]).isRequired,bgD:ooe.default.string.isRequired,fgColor:ooe.default.oneOfType([ooe.default.object,ooe.default.string]).isRequired,fgD:ooe.default.string.isRequired,size:ooe.default.number.isRequired,title:ooe.default.string,viewBoxSize:ooe.default.number.isRequired,xmlns:ooe.default.string},uoe=(0,soe.forwardRef)((function(e,t){var n=e.bgColor,r=e.bgD,i=e.fgD,o=e.fgColor,s=e.size,a=e.title,l=e.viewBoxSize,c=e.xmlns,u=void 0===c?"http://www.w3.org/2000/svg":c,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return aoe.default.createElement("svg",ioe({},d,{height:s,ref:t,viewBox:"0 0 "+l+" "+l,width:s,xmlns:u}),a?aoe.default.createElement("title",null,a):null,aoe.default.createElement("path",{d:r,fill:n}),aoe.default.createElement("path",{d:i,fill:o}))}));uoe.displayName="QRCodeSvg",uoe.propTypes=coe,roe.default=uoe,Object.defineProperty(_ie,"__esModule",{value:!0}),_ie.QRCode=void 0;vardoe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},foe=yoe(Ea),hoe=yoe(wie),poe=yoe(noe),moe=v,goe=yoe(moe),voe=yoe(roe);function yoe(e){return e&&e.__esModule?e:{default:e}}var boe={bgColor:foe.default.oneOfType([foe.default.object,foe.default.string]),fgColor:foe.default.oneOfType([foe.default.object,foe.default.string]),level:foe.default.string,size:foe.default.number,value:foe.default.string.isRequired},xoe=(0,moe.forwardRef)((function(e,t){var n=e.bgColor,r=void 0===n?"#FFFFFF":n,i=e.fgColor,o=void 0===i?"#000000":i,s=e.level,a=void 0===s?"L":s,l=e.size,c=void 0===l?256:l,u=e.value,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["bgColor","fgColor","level","size","value"]),f=new poe.default(-1,hoe.default[a]);f.addData(u),f.make();var h=f.modules;return goe.default.createElement(voe.default,doe({},d,{bgColor:r,bgD:h.map((function(e,t){return e.map((function(e,n){return e?"":"M "+n+" "+t+" l 1 0 0 1 -1 0 Z"})).join(" ")})).join(" "),fgColor:o,fgD:h.map((function(e,t){return e.map((function(e,n){return e?"M "+n+" "+t+" l 1 0 0 1 -1 0 Z":""})).join(" ")})).join(" "),ref:t,size:c,viewBoxSize:h.length}))}));_ie.QRCode=xoe,xoe.displayName="QRCode",xoe.propTypes=boe;var _oe,woe,Coe,koe,Soe=_ie.default=xoe;(woe=_oe||(_oe={})).NUMBER="NUMBER_NUMBER",woe.HEX="NUMBER_HEX",woe.STR="NUMBER_STR",woe.BIGINT="NUMBER_BIGINT",(koe=Coe||(Coe={})).HEX="BYTES_HEX",koe.UINT8ARRAY="BYTES_UINT8ARRAY";const Eoe={number:_oe.BIGINT,bytes:Coe.HEX},Aoe={number:_oe.HEX,bytes:Coe.HEX};var joe,Ooe,Noe,Toe;(Ooe=joe||(joe={})).EARLIEST="earliest",Ooe.LATEST="latest",Ooe.PENDING="pending",Ooe.SAFE="safe",Ooe.FINALIZED="finalized",Ooe.COMMITTED="committed",(Toe=Noe||(Noe={})).chainstart="chainstart",Toe.frontier="frontier",Toe.homestead="homestead",Toe.dao="dao",Toe.tangerineWhistle="tangerineWhistle",Toe.spuriousDragon="spuriousDragon",Toe.byzantium="byzantium",Toe.constantinople="constantinople",Toe.petersburg="petersburg",Toe.istanbul="istanbul",Toe.muirGlacier="muirGlacier",Toe.berlin="berlin",Toe.london="london",Toe.altair="altair",Toe.arrowGlacier="arrowGlacier",Toe.grayGlacier="grayGlacier",Toe.bellatrix="bellatrix",Toe.merge="merge",Toe.capella="capella",Toe.shanghai="shanghai";const Poe=Object.getPrototypeOf(Uint8Array);var Moe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){functions(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Ioe=Symbol.for("web3/base-provider");class Loe{static isWeb3Provider(e){return e instanceof Loe||Boolean(e&&e[Ioe])}get[Ioe](){return!0}send(e,t){this.request(e).then((e=>{t(null,e)})).catch((e=>{t(e)}))}sendAsync(e){return Moe(this,void 0,void 0,(function*(){return this.request(e)}))}asEIP1193Provider(){const e=Object.create(this),t=e.request;return e.request=function(e){return Moe(this,void 0,void 0,(function*(){return(yield t(e)).result}))},e.asEIP1193Provider=void 0,e}}class Roe extends Array{constructor(e){super(),this._accountProvider=e}}const Doe=4001,Boe=4100,Foe=4200,Hoe=4900,zoe=4901,Voe=-32700,Uoe=-32600,Goe=-32601,Woe=-32602,qoe=-32603,Zoe=-32e3,Xoe=-32001,Koe=-32002,Yoe=-32003,$oe=-32004,Joe=-32005,Qoe=-32006;class ese extends Error{get innerError(){return this.cause instanceof tse?this.cause.errors:this.cause}set innerError(e){Array.isArray(e)?this.cause=new tse(e):this.cause=e}constructor(e,t){super(e),Array.isArray(t)?this.cause=new tse(t):this.cause=t,this.name=this.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(new.target.constructor):this.stack=(new Error).stack}static convertToString(e,t=!1){if(null==e)return"undefined";const n=JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString():t));return t&&["bigint","string"].includes(typeof e)?n.replace(/['\\"]+/g,""):n}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:this.cause,innerError:this.cause}}}class tse extends ese{constructor(e){super(`Multiple errors occurred: [${e.map((e=>e.message)).join("], [")}]`),this.code=208,this.errors=e}}class nse extends ese{constructor(e,t){super(`Invalid value given "${ese.convertToString(e,!0)}". Error: ${t}.`),this.name=this.constructor.name}}class rse extends ese{constructor(){super("Private key must be 32 bytes."),this.code=701}}class ise extends ese{constructor(){super("Invalid Private Key, Not a valid string or uint8Array"),this.code=702}}classose extends ese{constructor(e){super(`"${e}"`),this.code=802}}class sse extends ese{constructor(){super("Invalid key derivation function"),this.code=703}}class ase extends ese{constructor(){super("Key derivation failed - possibly wrong password"),this.code=704}}class lse extends ese{constructor(){super("Unsupported key store version"),this.code=705}}class cse extends ese{constructor(){super("Password cannot be empty"),this.code=706}}class use extends ese{constructor(){super("Initialization vector must be 16 bytes"),this.code=707}}class dse extends ese{constructor(){super("c > 1000, pbkdf2 is less secure with less iterations"),this.code=709}}class fse extends ese{constructor(e,t){super(e),this.code=500,t&&(this.errorCode=t.code,this.errorReason=t.reason)}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{errorCode:this.errorCode,errorReason:this.errorReason})}}class hse extends fse{constructor(e){super("Connection not open",e),this.code=503}}class pse extends fse{constructor(e){super(`Maximum number of reconnect attempts reached! (${e})`),this.code=505}}class mse extends fse{constructor(){super("CONNECTION ERROR: Provider started to reconnect before the response got received!"),this.code=506}}class gse extends fse{constructor(e){super(`Request already sent with following id: ${e}`),this.code=507}}class vse extends ese{constructor(e,t){super(e),this.code=300,this.receipt=t}}class yse extends ese{constructor(e,t){super(`The resolver at ${e} does not implement requested method: "${t}".`),this.address=e,this.name=t,this.code=301}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{address:this.address,name:this.name})}}class bse extends vse{constructor(e){if(super(e.message||"Error"),this.name="name"in e&&e.name||this.constructor.name,this.stack="stack"in e&&e.stack||void 0,this.code=e.code,"object"==typeof e.data){let t;t=e.data&&"originalError"in e.data?e.data.originalError:e.data,this.data=t.data,this.cause=new bse(t)}else this.data=e.data}setDecodedProperties(e,t,n){this.errorName=e,this.errorSignature=t,this.errorArgs=n}toJSON(){let e=Object.assign(Object.assign({},super.toJSON()),{data:this.data});return this.errorName&&(e=Object.assign(Object.assign({},e),{errorName:this.errorName,errorSignature:this.errorSignature,errorArgs:this.errorArgs})),e}}class xse extends vse{constructor(e){super("Error happened while trying to execute a function inside a smart contract"),this.code=310,this.cause=new bse(e)}}class _se extends nse{constructor(e){var t,n;super(`data: ${null!==(t=e.data)&&void 0!==t?t:"undefined"}, input: ${null!==(n=e.input)&&void 0!==n?n:"undefined"}`,'You can\'t have "data" and "input" as properties of a contract at the same time, please use either "data" or "input" instead.'),this.code=311}}class wse extends ese{constructor(e){super(`ENS is not supported on network ${e}`),this.code=902}}class Cse extends ese{constructor(){super("Network not synced"),this.code=903}}class kse extends ese{constructor(e){super(`Invalid parameters passed. "${void 0!==e?e:""}"`),this.hint=e,this.code=207}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{hint:this.hint})}}class Sse extends ese{constructor(){super(...arguments),this.code=201}}class Ese extends ese{constructor(){super("The method you're trying to call is not implemented."),this.code=202}}class Ase extends ese{constructor(){super(...arguments),this.code=203}}class jse extends ese{constructor(){super(...arguments),this.code=204}}class Ose extends ese{constructor(e,t){super(e),this.code=205,this.props=null!=t?t:{}}}class Nse extends ese{constructor(e){super(`A plugin with the namespace: ${e} has already been registered.`),this.code=206}}class Tse extends ese{constructor(){super(...arguments),this.code=600}}class Pse extends ese{constructor(e){super(`Client URL "${e}" is invalid.`),this.code=602}}class Mse extends ese{constructor(){super(...arguments),this.code=603}}class Ise extends ese{constructor(){super(...arguments),this.code=604}}class Lse extends nse{constructor(){super(...arguments),this.code=801}}class Rse extends ese{constructor(e,t){super(e),this.receipt=t,this.code=400}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class Dse extends ese{constructor(e,t,n,r){super("Transaction has been reverted by the EVM"+(void 0===n?"":`:\n ${ese.convertToString(n)}`)),this.reason=e,this.signature=t,this.receipt=n,this.data=r,this.code=402}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature,receipt:this.receipt,data:this.data})}}class Bse extends Dse{constructor(e,t,n,r,i,o,s){super(e),this.reason=e,this.customErrorName=t,this.customErrorDecodedSignature=n,this.customErrorArguments=r,this.signature=i,this.receipt=o,this.data=s,this.code=438}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,customErrorName:this.customErrorName,customErrorDecodedSignature:this.customErrorDecodedSignature,customErrorArguments:this.customErrorArguments,signature:this.signature,receipt:this.receipt,data:this.data})}}class Fse extends Rse{constructor(e){super("Transaction has been reverted by the EVM"+(void 0===e?"":`:\n ${ese.convertToString(e)}`),e),this.code=405}}class Hse extends Rse{constructor(){super("Raw transaction undefined"),this.code=407}}class zse extends Rse{constructor(){super("Transaction not found"),this.code=430}}class Vse extends nse{constructor(e){super(e,"invalid transaction with invalid sender"),this.code=408}}class Use extends nse{constructor(e){super(e,"invalid transaction with invalid receiver"),this.code=437}}class Gse extends nse{constructor(){super("MissingCustomChainError","If tx.common is provided it must have tx.common.customChain"),this.code=410}}class Wse extends nse{constructor(){super("MissingCustomChainIdError","If tx.common is provided it must have tx.common.customChain and tx.common.customChain.chainId"),this.code=411}}class qse extends nse{constructor(e){super(JSON.stringify(e),"Chain Id doesnt match in tx.chainId tx.common.customChain.chainId"),this.code=412}}class Zse extends nse{constructor(e){super(JSON.stringify(e),"Chain doesnt match in tx.chain tx.common.basechain"),this.code=435}}class Xse extends nse{constructor(e){super(JSON.stringify(e),"hardfork doesnt match in tx.hardfork tx.common.hardfork"),this.code=436}}class Kse extends nse{constructor(){super("CommonOrChainAndHardforkError","Please provide the common object or the chain and hardfork property but not all together."),this.code=413}}class Yse extends nse{constructor(e){var t,n;super("MissingChainOrHardforkError",`When specifying chain andhardfork, both values must be defined. Received "chain": ${null!==(t=e.chain)&&void 0!==t?t:"undefined"}, "hardfork": ${null!==(n=e.hardfork)&&void 0!==n?n:"undefined"}`),this.code=414}}class $se extends ese{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'),this.code=440}}class Jse extends nse{constructor(e){var t,n,r,i;super(`gas: ${null!==(t=e.gas)&&void 0!==t?t:"undefined"}, gasPrice: ${null!==(n=e.gasPrice)&&void 0!==n?n:"undefined"}, maxPriorityFeePerGas: ${null!==(r=e.maxPriorityFeePerGas)&&void 0!==r?r:"undefined"}, maxFeePerGas: ${null!==(i=e.maxFeePerGas)&&void 0!==i?i:"undefined"}`,'"gas" is missing'),this.code=415,this.cause=new $se}}class Qse extends ese{constructor(){super('Missingproperties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'),this.code=441}}class eae extends nse{constructor(e){var t,n,r,i;super(`gas: ${null!==(t=e.gas)&&void 0!==t?t:"undefined"}, gasPrice: ${null!==(n=e.gasPrice)&&void 0!==n?n:"undefined"}, maxPriorityFeePerGas: ${null!==(r=e.maxPriorityFeePerGas)&&void 0!==r?r:"undefined"}, maxFeePerGas: ${null!==(i=e.maxFeePerGas)&&void 0!==i?i:"undefined"}`,"transaction must specify legacy or fee market gas properties, not both"),this.code=434,this.cause=new Qse}}class tae extends nse{constructor(e){var t,n;super(`gas: ${null!==(t=e.gas)&&void 0!==t?t:"undefined"}, gasPrice: ${null!==(n=e.gasPrice)&&void 0!==n?n:"undefined"}`,"Gas or gasPrice is lower than 0"),this.code=416}}class nae extends nse{constructor(e){var t,n;super(`maxPriorityFeePerGas: ${null!==(t=e.maxPriorityFeePerGas)&&void 0!==t?t:"undefined"}, maxFeePerGas: ${null!==(n=e.maxFeePerGas)&&void 0!==n?n:"undefined"}`,"maxPriorityFeePerGas or maxFeePerGas is lower than 0"),this.code=417}}class rae extends nse{constructor(e){super(e,"eip-1559 transactions don't support gasPrice"),this.code=418}}class iae extends nse{constructor(e){var t,n;super(`maxPriorityFeePerGas: ${null!==(t=e.maxPriorityFeePerGas)&&void 0!==t?t:"undefined"}, maxFeePerGas: ${null!==(n=e.maxFeePerGas)&&void 0!==n?n:"undefined"}`,"pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas"),this.code=419}}class oae extends nse{constructor(e){super(e,"invalid transaction object"),this.code=420}}class sae extends nse{constructor(e){var t,n;super(`nonce: ${null!==(t=e.nonce)&&void 0!==t?t:"undefined"}, chainId: ${null!==(n=e.chainId)&&void 0!==n?n:"undefined"}`,"Nonce or chainId is lower than0"),this.code=421}}class aae extends nse{constructor(){super("UnableToPopulateNonceError","unable to populate nonce, no from address available"),this.code=422}}class lae extends nse{constructor(){super("Eip1559NotSupportedError","Network doesn't support eip-1559"),this.code=423}}class cae extends nse{constructor(e){super(e,"unsupported transaction type"),this.code=424}}class uae extends nse{constructor(e){var t,n;super(`data: ${null!==(t=e.data)&&void 0!==t?t:"undefined"}, input: ${null!==(n=e.input)&&void 0!==n?n:"undefined"}`,'You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.'),this.code=425}}class dae extends ese{constructor(e){super(`The connected Ethereum Node did not respond within ${e.numberOfSeconds} seconds, please make sure your transaction was properly sent and you are connected to a healthy Node. Be aware that transaction might still be pending or mined!\n\tTransaction Hash: ${e.transactionHash?e.transactionHash.toString():"not available"}`),this.code=431}}function fae(e){return`Please make sure your transaction was properly sent and there are no previous pending transaction for the same account. However, be aware that it might still be mined!\n\tTransaction Hash: ${e?e.toString():"not available"}`}class hae extends ese{constructor(e){super(`Transaction was not mined within ${e.numberOfSeconds} seconds. ${fae(e.transactionHash)}`),this.code=426}}class pae extends ese{constructor(e){super(`Transaction started at ${e.starterBlockNumber} but was not mined within ${e.numberOfBlocks} blocks. ${fae(e.transactionHash)}`),this.code=432}}class mae extends nse{constructor(e){var t,n;super(`receipt: ${JSON.stringify(e.receipt)}, blockHash: ${null===(t=e.blockHash)||void 0===t?void 0:t.toString()}, transactionHash: ${null===(n=e.transactionHash)||void 0===n?void 0:n.toString()}`,"Receipt missing or blockHash null"),this.code=427}}class gae extends nse{constructor(e){super(`receipt: ${JSON.stringify(e.receipt)}`,"Receipt missing block number"),this.code=428}}class vae extends ese{constructor(e){super(`Invalid signature. "${e}"`),this.code=433}}class yae extends nse{constructor(){super("LocalWalletNotAvailableError","Attempted to index account in local wallet, but no wallet is available"),this.code=429}}class bae extends ese{constructor(e,t){const n=[];e.forEach((e=>n.push(e.keyword))),super(`The following properties are invalid for the transaction type ${t}: ${n.join(", ")}`),this.code=439}}class xae extends nse{constructor(e){super(e,"can not parse as byte data"),this.code=1002}}class _ae extends nse{constructor(e){super(e,"can not parseas number data"),this.code=1003}}class wae extends nse{constructor(e){super(e,"invalid ethereum address"),this.code=1005}}class Cae extends nse{constructor(e){super(e,"not a valid string"),this.code=1001}}class kae extends nse{constructor(e){super(e,"invalid unit"),this.code=1004}}class Sae extends nse{constructor(e){super(e,"not a valid unit. Must be a positive integer"),this.code=1015}}class Eae extends nse{constructor(e){super(e,"can not be converted to hex"),this.code=1006}}class Aae extends nse{constructor(e){super(e,"value greater than the nibble width"),this.code=1014}}class jae extends nse{constructor(e){super(e,"not a valid boolean."),this.code=1008}}class Oae extends nse{constructor(e){super(e,"not a validunsigned integer."),this.code=1009}}class Nae extends nse{constructor(e){super(e,"invalid size given."),this.code=1010}}class Tae extends nse{constructor(e){super(e,"value is larger than size."),this.code=1011}}class Pae extends nse{constructor(e){super(e,"invalid string given"),this.code=1012}}const Mae=e=>(e=>!(Array.isArray(e)||"2.0"!==e.jsonrpc||!e||void 0!==e.result&&null!==e.result||!("error"in e)||"number"!=typeof e.id&&"string"!=typeof e.id))(e)?e.error.message:"";class Iae extends ese{constructor(e,t,n,r){var i;let o;super(null!=t?t:`Returned error: ${Array.isArray(e)?e.map((e=>Mae(e))).join(","):Mae(e)}`),this.code=100,t||(this.data=Array.isArray(e)?e.map((e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.data})):null===(i=null==e?void 0:e.error)||void 0===i?void 0:i.data),this.statusCode=r,this.request=n,"error"in e?o=e.error:e instanceof Array&&(o=e.filter((e=>e.error)).map((e=>e.error))),Array.isArray(o)&&o.length>0?this.cause=new tse(o):this.cause=o}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{data:this.data,request:this.request,statusCode:this.statusCode})}}class Lae extends Iae{constructor(e,t){let n;super(e,void 0,t),this.code=101,"error"in e?n=e.error:e instanceof Array&&(n=e.map((e=>e.error))),Array.isArray(n)?this.cause=new tse(n):this.cause=n}}class Rae extends ese{constructor(e,t){super(`Web3Config hardfork doesnt match in defaultHardfork ${e} and common.hardfork ${t}`),this.code=1101}}class Dae extends ese{constructor(e,t){super(`Web3Config chain doesnt match in defaultHardfork ${e} and common.hardfork ${t}`),this.code=1101}}const Bae="An Rpc error has occured with a code of *code*",Fae={[Voe]:{message:"Parse error",description:"Invalid JSON"},[Uoe]:{message:"Invalid request",description:"JSON is not a valid request object\t"},[Goe]:{message:"Method not found",description:"Method does not exist\t"},[Woe]:{message:"Invalid params",description:"Invalid method parameters"},[qoe]:{message:"Internal error",description:"Internal JSON-RPC error"},[Zoe]:{message:"Invalid input",description:"Missing or invalid parameters"},[Xoe]:{message:"Resource not found",description:"Requested resource not found"},[Koe]:{message:"Resource unavailable",description:"Requested resource not available"},[Yoe]:{message:"Transaction rejected",description:"Transaction creation failed"},[$oe]:{message:"Method not supported",description:"Method is not implemented"},[Joe]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[Qoe]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[Doe]:{name:"User Rejected Request",message:"The user rejected the request."},[Boe]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[Foe]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[Hoe]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[zoe]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"Theendpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class Hae extends ese{constructor(e,t){super(null!=t?t:Bae.replace("*code*",e.error.code.toString())),this.code=e.error.code,this.id=e.id,this.jsonrpc=e.jsonrpc,this.jsonRpcError=e.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class zae extends ese{constructor(e,t){var n,r,i,o;if(e)if(null===(n=Fae[e])||void 0===n?void 0:n.message)super(Fae[e].message);else{const t=Object.keys(Fae).find((t=>"string"==typeof t&&e>=parseInt(t.split("-")[0],10)&&e<=parseInt(t.split("-")[1],10)));super(null!==(i=null===(r=Fae[null!=t?t:""])||void 0===r?void 0:r.message)&&void 0!==i?i:Bae.replace("*code*",null!==(o=null==e?void 0:e.toString())&&void 0!==o?o:'""'))}else super();this.code=e,this.data=t}}const Vae=new Map;Vae.set(Voe,{error:class extends Hae{constructor(e){super(e,Fae[-32700].message),this.code=Voe}}}),Vae.set(Uoe,{error:class extends Hae{constructor(e){super(e,Fae[-32600].message),this.code=Uoe}}}),Vae.set(Goe,{error:class extends Hae{constructor(e){super(e,Fae[-32601].message),this.code=Goe}}}),Vae.set(Woe,{error:class extends Hae{constructor(e){super(e,Fae[-32602].message),this.code=Woe}}}),Vae.set(qoe,{error:class extends Hae{constructor(e){super(e,Fae[-32603].message),this.code=qoe}}}),Vae.set(Zoe,{error:class extends Hae{constructor(e){super(e,Fae[-32e3].message),this.code=Zoe}}}),Vae.set($oe,{error:class extends Hae{constructor(e){super(e,Fae[-32004].message),this.code=$oe}}}),Vae.set(Koe,{error:class extends Hae{constructor(e){super(e,Fae[-32002].message),this.code=Koe}}}),Vae.set(Yoe,{error:class extends Hae{constructor(e){super(e,Fae[-32003].message),this.code=Yoe}}}),Vae.set(Xoe,{error:class extends Hae{constructor(e){super(e,Fae[-32001].message),this.code=Xoe}}}),Vae.set(Qoe,{error:class extends Hae{constructor(e){super(e,Fae[-32006].message),this.code=Qoe}}}),Vae.set(Joe,{error:class extends Hae{constructor(e){super(e,Fae[-32005].message),this.code=Joe}}});class Uaeextends ese{constructor(e){super(`Format for the type ${e} is unsupported`),this.type=e,this.code=1200}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}}function Gae(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Wae(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function qae(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Gae(e.outputLen),Gae(e.blockLen)}function Zae(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Xae(e,t){Wae(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Kae={number:Gae,bool:function(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)},bytes:Wae,hash:qae,exists:Zae,output:Xae},Yae=BigInt(u(2,32)-1),$ae=BigInt(32);function Jae(e,t=!1){return t?{h:Number(e&Yae),l:Number(e>>$ae&Yae)}:{h:0|Number(e>>$ae&Yae),l:0|Number(e&Yae)}}function Qae(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=Jae(e[i],t);[n[i],r[i]]=[o,s]}return[n,r]}const ele=(e,t,n)=>e<<n|t>>>32-n,tle=(e,t,n)=>t<<n|e>>>32-n,nle=(e,t,n)=>t<<n-32|e>>>64-n,rle=(e,t,n)=>e<<n-32|t>>>64-n;const ile={fromBig:Jae,split:Qae,toBig:(e,t)=>BigInt(e>>>0)<<$ae|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:ele,rotlSL:tle,rotlBH:nle,rotlBL:rle,add:function(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/u(2,32)|0)|0,l:0|i}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/u(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/u(2,32)|0)|0,add5H:(e,t,n,r,i,o)=>t+n+r+i+o+(e/u(2,32)|0)|0,add5L:(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)},ole="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,sle=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ale=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),lle=(e,t)=>e<<32-t|e>>>t,cle=(e,t)=>e<<t|e>>>32-t>>>0,ule=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function dle(e){for(let n=0;n<e.length;n++)e[n]=(t=e[n])<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;var t}function fle(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function hle(e){return"string"==typeof e&&(e=fle(e)),Wae(e),e}function ple(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Wae(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const t=e[r];n.set(t,i),i+=t.length}return n}let mle=class{clone(){return this._cloneInto()}};const gle={}.toString;function vle(e,t){if(void 0!==t&&"[object Object]"!==gle.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)}function yle(e){const t=t=>e().update(hle(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ble(e=32){if(ole&&"function"==typeof ole.getRandomValues)return ole.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const xle=[],_le=[],wle=[],Cle=BigInt(0),kle=BigInt(1),Sle=BigInt(2),Ele=BigInt(7),Ale=BigInt(256),jle=BigInt(113);for(let LJe=0,RJe=kle,DJe=1,BJe=0;LJe<24;LJe++){[DJe,BJe]=[BJe,(2*DJe+3*BJe)%5],xle.push(2*(5*BJe+DJe)),_le.push((LJe+1)*(LJe+2)/2%64);let e=Cle;for(let t=0;t<7;t++)RJe=(RJe<<kle^(RJe>>Ele)*jle)%Ale,RJe&Sle&&(e^=kle<<(kle<<BigInt(t))-kle);wle.push(e)}const[Ole,Nle]=Qae(wle,!0),Tle=(e,t,n)=>n>32?nle(e,t,n):ele(e,t,n),Ple=(e,t,n)=>n>32?rle(e,t,n):tle(e,t,n);class Mle extends mle{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,Gae(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=sle(this.state)}keccak(){ule||dle(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,o=n[i],s=n[i+1],a=Tle(o,s,1)^n[t],l=Ple(o,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=l}lett=e[2],i=e[3];for(let n=0;n<24;n++){const r=_le[n],o=Tle(t,i,r),s=Ple(t,i,r),a=xle[n];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=Ole[r],e[1]^=Nle[r]}n.fill(0)}(this.state32,this.rounds),ule||dle(this.state32),this.posOut=0,this.pos=0}update(e){Zae(this);const{blockLen:t,state:n}=this,r=(e=hle(e)).length;for(let i=0;i<r;){const o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Zae(this,!1),Wae(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Gae(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Xae(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new Mle(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Ile=((e,t,n)=>yle((()=>new Mle(t,e,n))))(1,136,32);Kae.bool;const Lle=Kae.bytes;function Rle(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)}(()=>{const e="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);t&&!e&&t("crypto")})();const Dle=(()=>{const e=(t=Ile,e=>(Kae.bytes(e),t(e)));var t;return e.create=Ile.create,e})();var Ble,Fle,Hle;(Fle=Ble||(Ble={})).assertEqual=e=>e,Fle.assertIs=function(e){},Fle.assertNever=function(e){throw new Error},Fle.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},Fle.getValidEnumValues=e=>{const t=Fle.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),n={};for(const r of t)n[r]=e[r];return Fle.objectValues(n)},Fle.objectValues=e=>Fle.objectKeys(e).map((function(t){return e[t]})),Fle.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},Fle.find=(e,t)=>{for(const nof e)if(t(n))return n},Fle.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,Fle.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},Fle.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(Hle||(Hle={})).mergeShapes=(e,t)=>f(f({},e),t);const zle=Ble.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vle=e=>{switch(typeof e){case"undefined":return zle.undefined;case"string":return zle.string;case"number":return isNaN(e)?zle.nan:zle.number;case"boolean":return zle.boolean;case"function":return zle.function;case"bigint":return zle.bigint;case"symbol":return zle.symbol;case"object":return Array.isArray(e)?zle.array:null===e?zle.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?zle.promise:"undefined"!=typeof Map&&e instanceof Map?zle.map:"undefined"!=typeof Set&&e instanceof Set?zle.set:"undefined"!=typeof Date&&e instanceof Date?zle.date:zle.object;default:return zle.unknown}},Ule=Ble.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Gle extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){const n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof Gle))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ble.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Gle.create=e=>newGle(e);const Wle=(e,t)=>{let n;switch(e.code){case Ule.invalid_type:n=e.received===zle.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ule.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ble.jsonStringifyReplacer)}`;break;case Ule.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ble.joinValues(e.keys,", ")}`;break;case Ule.invalid_union:n="Invalid input";break;case Ule.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ble.joinValues(e.options)}`;break;case Ule.invalid_enum_value:n=`Invalid enum value. Expected ${Ble.joinValues(e.options)}, received '${e.received}'`;break;case Ule.invalid_arguments:n="Invalid function arguments";break;case Ule.invalid_return_type:n="Invalid function return type";break;case Ule.invalid_date:n="Invalid date";break;case Ule.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ble.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ule.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ule.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"}${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ule.custom:n="Invalid input";break;case Ule.invalid_intersection_types:n="Intersection results could not be merged";break;case Ule.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ule.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ble.assertNever(e)}return{message:n}};let qle=Wle;function Zle(){return qle}const Xle=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],s=h(f({},i),{path:o});if(void 0!==i.message)return h(f({},i),{path:o,message:i.message});let a="";const l=r.filter((e=>!!e)).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return h(f({},i),{path:o,message:a})};function Kle(e,t){const n=Zle(),r=Xle({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wle?void 0:Wle].filter((e=>!!e))});e.common.issues.push(r)}class Yle{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return $le;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static mergeObjectAsync(e,t){return g(this,null,(function*(){const n=[];for(const e of t){const t=yield e.key,r=yield e.value;n.push({key:t,value:r})}return Yle.mergeObjectSync(e,n)}))}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:i}=r;if("aborted"===t.status)return $le;if("aborted"===i.status)return$le;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"===t.value||void 0===i.value&&!r.alwaysSet||(n[t.value]=i.value)}return{status:e.value,value:n}}}const $le=Object.freeze({status:"aborted"}),Jle=e=>({status:"dirty",value:e}),Qle=e=>({status:"valid",value:e}),ece=e=>"aborted"===e.status,tce=e=>"dirty"===e.status,nce=e=>"valid"===e.status,rce=e=>"undefined"!=typeof Promise&&e instanceof Promise;function ice(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function oce(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}var sce,ace,lce,cce;"function"==typeof SuppressedError&&SuppressedError,(ace=sce||(sce={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},ace.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class uce{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dce=(e,t)=>{if(nce(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Gle(e.common.issues);return this._error=t,this._error}}};function fce(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:i};return{errorMap:(t,i)=>{var o,s;const{message:a}=e;return"invalid_enum_value"===t.code?{message:null!=a?a:i.defaultError}:void 0===i.data?{message:null!==(o=null!=a?a:r)&&void 0!==o?o:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(s=null!=a?a:n)&&void 0!==s?s:i.defaultError}},description:i}}class hce{get description(){return this._def.description}_getType(e){return Vle(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Vle(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Yle,ctx:{common:e.parent.common,data:e.data,parsedType:Vle(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(rce(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vle(e)},i=this._parseSync({data:e,path:r.path,parent:r});return dce(r,i)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vle(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return nce(t)?{value:t.value}:{issues:r.common.issues}}catch(MJe){(null===(n=null===(t=null==MJe?void 0:MJe.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>nce(e)?{value:e.value}:{issues:r.common.issues}))}parseAsync(e,t){return g(this,null,(function*(){const n=yield this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}))}safeParseAsync(e,t){return g(this,null,(function*(){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vle(e)},r=this._parse({data:e,path:n.path,parent:n}),i=yield rce(r)?r:Promise.resolve(r);return dce(n,i)}))}refine(e,t){return this._refinement(((n,r)=>{const i=e(n),o=()=>r.addIssue(f({code:Ule.custom},(e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t)(n)));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((e=>!!e||(o(),!1))):!!i||(o(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new hue({schema:this,typeName:Eue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return pue.create(this,this._def)}nullable(){return mue.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xce.create(this)}promise(){return fue.create(this,this._def)}or(e){return $ce.create([this,e],this._def)}and(e){return tue.create(this,e,this._def)}transform(e){return new hue(h(f({},fce(this._def)),{schema:this,typeName:Eue.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){const t="function"==typeof e?e:()=>e;return new gue(h(f({},fce(this._def)),{innerType:this,defaultValue:t,typeName:Eue.ZodDefault}))}brand(){return new xue(f({typeName:Eue.ZodBranded,type:this},fce(this._def)))}catch(e){const t="function"==typeof e?e:()=>e;return new vue(h(f({},fce(this._def)),{innerType:this,catchValue:t,typeName:Eue.ZodCatch}))}describe(e){return new(0,this.constructor)(h(f({},this._def),{description:e}))}pipe(e){return _ue.create(this,e)}readonly(){return wue.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const pce=/^c[^\s-]{8,}$/i,mce=/^[0-9a-z]+$/,gce=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vce=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yce=/^[a-z0-9_-]{21}$/i,bce=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xce=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_ce=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let wce;const Cce=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kce=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Sce=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ece=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ace=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Oce="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nce=new RegExp(`^${Oce}$`);function Tce(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function Pce(e){let t=`${Oce}T${Tce(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Mce(e,t){if(!bce.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return"object"==typeof i&&null!==i&&(!(!i.typ||!i.alg)&&(!t||i.alg===t))}catch(n){return!1}}function Ice(e,t){return!("v4"!==t&&t||!kce.test(e))||!("v6"!==t&&t||!Ece.test(e))}class Lce extends hce{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==zle.string){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.string,received:t.parsedType}),$le}const t=new Yle;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,i=e.data.length<s.value;(r||i)&&(n=this._getOrReturnCtx(e,n),r?Kle(n,{code:Ule.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&Kle(n,{code:Ule.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)_ce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"email",code:Ule.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)wce||(wce=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),wce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"emoji",code:Ule.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)vce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"uuid",code:Ule.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)yce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"nanoid",code:Ule.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)pce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"cuid",code:Ule.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)mce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"cuid2",code:Ule.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)gce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"ulid",code:Ule.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(o){n=this._getOrReturnCtx(e,n),Kle(n,{validation:"url",code:Ule.invalid_string,message:s.message}),t.dirty()}else if("regex"===s.kind){s.regex.lastIndex=0;s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"regex",code:Ule.invalid_string,message:s.message}),t.dirty())}else if("trim"===s.kind)e.data=e.data.trim();else if("includes"===s.kind)e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty());else if("toLowerCase"===s.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===s.kind)e.data=e.data.toUpperCase();else if("startsWith"===s.kind)e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty());else if("endsWith"===s.kind)e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty());else if("datetime"===s.kind){Pce(s).test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.invalid_string,validation:"datetime",message:s.message}),t.dirty())}else if("date"===s.kind){Nce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.invalid_string,validation:"date",message:s.message}),t.dirty())}else if("time"===s.kind){new RegExp(`^${Tce(s)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.invalid_string,validation:"time",message:s.message}),t.dirty())}else"duration"===s.kind?xce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"duration",code:Ule.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(r=e.data,("v4"!==(i=s.version)&&i||!Cce.test(r))&&("v6"!==i&&i||!Sce.test(r))&&(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"ip",code:Ule.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?Mce(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"jwt",code:Ule.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?Ice(e.data,s.version)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"cidr",code:Ule.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?Ace.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"base64",code:Ule.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?jce.test(e.data)||(n=this._getOrReturnCtx(e,n),Kle(n,{validation:"base64url",code:Ule.invalid_string,message:s.message}),t.dirty()):Ble.assertNever(s);var r,i;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),f({validation:t,code:Ule.invalid_string},sce.errToObj(n)))}_addCheck(e){return new Lce(h(f({},this._def),{checks:[...this._def.checks,e]}))}email(e){return this._addCheck(f({kind:"email"},sce.errToObj(e)))}url(e){return this._addCheck(f({kind:"url"},sce.errToObj(e)))}emoji(e){return this._addCheck(f({kind:"emoji"},sce.errToObj(e)))}uuid(e){return this._addCheck(f({kind:"uuid"},sce.errToObj(e)))}nanoid(e){return this._addCheck(f({kind:"nanoid"},sce.errToObj(e)))}cuid(e){return this._addCheck(f({kind:"cuid"},sce.errToObj(e)))}cuid2(e){return this._addCheck(f({kind:"cuid2"},sce.errToObj(e)))}ulid(e){return this._addCheck(f({kind:"ulid"},sce.errToObj(e)))}base64(e){return this._addCheck(f({kind:"base64"},sce.errToObj(e)))}base64url(e){return this._addCheck(f({kind:"base64url"},sce.errToObj(e)))}jwt(e){return this._addCheck(f({kind:"jwt"},sce.errToObj(e)))}ip(e){return this._addCheck(f({kind:"ip"},sce.errToObj(e)))}cidr(e){return this._addCheck(f({kind:"cidr"},sce.errToObj(e)))}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(f({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n},sce.errToObj(null==e?void 0:e.message)))}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(f({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},sce.errToObj(null==e?void 0:e.message)))}duration(e){return this._addCheck(f({kind:"duration"},sce.errToObj(e)))}regex(e,t){return this._addCheck(f({kind:"regex",regex:e},sce.errToObj(t)))}includes(e,t){return this._addCheck(f({kind:"includes",value:e,position:null==t?void 0:t.position},sce.errToObj(null==t?void 0:t.message)))}startsWith(e,t){return this._addCheck(f({kind:"startsWith",value:e},sce.errToObj(t)))}endsWith(e,t){return this._addCheck(f({kind:"endsWith",value:e},sce.errToObj(t)))}min(e,t){return this._addCheck(f({kind:"min",value:e},sce.errToObj(t)))}max(e,t){return this._addCheck(f({kind:"max",value:e},sce.errToObj(t)))}length(e,t){return this._addCheck(f({kind:"length",value:e},sce.errToObj(t)))}nonempty(e){return this.min(1,sce.errToObj(e))}trim(){return new Lce(h(f({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new Lce(h(f({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){returnnew Lce(h(f({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Rce(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}Lce.create=e=>{var t;return new Lce(f({checks:[],typeName:Eue.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},fce(e)))};class Dce extends hce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==zle.number){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.number,received:t.parsedType}),$le}let t;const n=new Yle;for(const r of this._def.checks)if("int"===r.kind)Ble.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==Rce(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.not_finite,message:r.message}),n.dirty()):Ble.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,sce.toString(t))}gt(e,t){return this.setLimit("min",e,!1,sce.toString(t))}lte(e,t){return this.setLimit("max",e,!0,sce.toString(t))}lt(e,t){return this.setLimit("max",e,!1,sce.toString(t))}setLimit(e,t,n,r){return new Dce(h(f({},this._def),{checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:sce.toString(r)}]}))}_addCheck(e){return new Dce(h(f({},this._def),{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:sce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:sce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:sce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:sce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:sce.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:sce.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:sce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:sce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:sce.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&Ble.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Dce.create=e=>new Dce(f({checks:[],typeName:Eue.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},fce(e)));class Bce extends hce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(r){return this._getInvalidInput(e)}if(this._getType(e)!==zle.bigint)return this._getInvalidInput(e);let t;const n=new Yle;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Kle(t,{code:Ule.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ble.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.bigint,received:t.parsedType}),$le}gte(e,t){return this.setLimit("min",e,!0,sce.toString(t))}gt(e,t){return this.setLimit("min",e,!1,sce.toString(t))}lte(e,t){return this.setLimit("max",e,!0,sce.toString(t))}lt(e,t){return this.setLimit("max",e,!1,sce.toString(t))}setLimit(e,t,n,r){return new Bce(h(f({},this._def),{checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:sce.toString(r)}]}))}_addCheck(e){return new Bce(h(f({},this._def),{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:sce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:sce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:sce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:sce.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:sce.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Bce.create=e=>{var t;return new Bce(f({checks:[],typeName:Eue.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},fce(e)))};class Fce extends hce{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==zle.boolean){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.boolean,received:t.parsedType}),$le}return Qle(e.data)}}Fce.create=e=>new Fce(f({typeName:Eue.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},fce(e)));class Hce extends hce{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==zle.date){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.date,received:t.parsedType}),$le}if(isNaN(e.data.getTime())){return Kle(this._getOrReturnCtx(e),{code:Ule.invalid_date}),$le}const t=new Yle;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),Kle(n,{code:Ule.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):Ble.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Hce(h(f({},this._def),{checks:[...this._def.checks,e]}))}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:sce.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:sce.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Hce.create=e=>new Hce(f({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Eue.ZodDate},fce(e)));class zce extends hce{_parse(e){if(this._getType(e)!==zle.symbol){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.symbol,received:t.parsedType}),$le}return Qle(e.data)}}zce.create=e=>new zce(f({typeName:Eue.ZodSymbol},fce(e)));class Vce extends hce{_parse(e){if(this._getType(e)!==zle.undefined){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.undefined,received:t.parsedType}),$le}return Qle(e.data)}}Vce.create=e=>new Vce(f({typeName:Eue.ZodUndefined},fce(e)));class Uce extends hce{_parse(e){if(this._getType(e)!==zle.null){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.null,received:t.parsedType}),$le}return Qle(e.data)}}Uce.create=e=>new Uce(f({typeName:Eue.ZodNull},fce(e)));class Gce extends hce{constructor(){super(...arguments),this._any=!0}_parse(e){return Qle(e.data)}}Gce.create=e=>new Gce(f({typeName:Eue.ZodAny},fce(e)));class Wce extends hce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Qle(e.data)}}Wce.create=e=>new Wce(f({typeName:Eue.ZodUnknown},fce(e)));class qce extends hce{_parse(e){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.never,received:t.parsedType}),$le}}qce.create=e=>new qce(f({typeName:Eue.ZodNever},fce(e)));class Zce extends hce{_parse(e){if(this._getType(e)!==zle.undefined){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.void,received:t.parsedType}),$le}return Qle(e.data)}}Zce.create=e=>new Zce(f({typeName:Eue.ZodVoid},fce(e)));class Xce extends hce{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==zle.array)return Kle(t,{code:Ule.invalid_type,expected:zle.array,received:t.parsedType}),$le;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(Kle(t,{code:e?Ule.too_big:Ule.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(Kle(t,{code:Ule.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(Kle(t,{code:Ule.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new uce(t,e,t.path,n))))).then((e=>Yle.mergeArray(n,e)));const i=[...t.data].map(((e,n)=>r.type._parseSync(new uce(t,e,t.path,n))));return Yle.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new Xce(h(f({},this._def),{minLength:{value:e,message:sce.toString(t)}}))}max(e,t){return new Xce(h(f({},this._def),{maxLength:{value:e,message:sce.toString(t)}}))}length(e,t){return new Xce(h(f({},this._def),{exactLength:{value:e,message:sce.toString(t)}}))}nonempty(e){return this.min(1,e)}}function Kce(e){if(e instanceof Yce){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=pue.create(Kce(r))}return new Yce(h(f({},e._def),{shape:()=>t}))}return e instanceof Xce?new Xce(h(f({},e._def),{type:Kce(e.element)})):e instanceof pue?pue.create(Kce(e.unwrap())):e instanceof mue?mue.create(Kce(e.unwrap())):e instanceof nue?nue.create(e.items.map((e=>Kce(e)))):e}Xce.create=(e,t)=>new Xce(f({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Eue.ZodArray},fce(t)));class Yce extends hce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=Ble.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==zle.object){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.object,received:t.parsedType}),$le}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof qce&&"strip"===this._def.unknownKeys))for(const a in n.data)i.includes(a)||o.push(a);const s=[];for(const a of i){const e=r[a],t=n.data[a];s.push({key:{status:"valid",value:a},value:e._parse(new uce(n,t,n.path,a)),alwaysSet:a in n.data})}if(this._def.catchall instanceof qce){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of o)s.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)o.length>0&&(Kle(n,{code:Ule.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const r=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new uce(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((()=>g(this,null,(function*(){const e=[];for(const t of s){const n=yield t.key,r=yield t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})))).then((e=>Yle.mergeObjectSync(t,e))):Yle.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return sce.errToObj,new Yce(f(h(f({},this._def),{unknownKeys:"strict"}),void 0!==e?{errorMap:(t,n)=>{var r,i,o,s;const a=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=sce.errToObj(e).message)&&void 0!==s?s:a}:{message:a}}}:{}))}strip(){return new Yce(h(f({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Yce(h(f({},this._def),{unknownKeys:"passthrough"}))}extend(e){return new Yce(h(f({},this._def),{shape:()=>f(f({},this._def.shape()),e)}))}merge(e){return new Yce({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>f(f({},this._def.shape()),e._def.shape()),typeName:Eue.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Yce(h(f({},this._def),{catchall:e}))}pick(e){const t={};return Ble.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new Yce(h(f({},this._def),{shape:()=>t}))}omit(e){const t={};return Ble.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new Yce(h(f({},this._def),{shape:()=>t}))}deepPartial(){return Kce(this)}partial(e){const t={};return Ble.objectKeys(this.shape).forEach((n=>{constr=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new Yce(h(f({},this._def),{shape:()=>t}))}required(e){const t={};return Ble.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof pue;)e=e._def.innerType;t[n]=e}})),new Yce(h(f({},this._def),{shape:()=>t}))}keyof(){return cue(Ble.objectKeys(this.shape))}}Yce.create=(e,t)=>new Yce(f({shape:()=>e,unknownKeys:"strip",catchall:qce.create(),typeName:Eue.ZodObject},fce(t))),Yce.strictCreate=(e,t)=>new Yce(f({shape:()=>e,unknownKeys:"strict",catchall:qce.create(),typeName:Eue.ZodObject},fce(t))),Yce.lazycreate=(e,t)=>new Yce(f({shape:e,unknownKeys:"strip",catchall:qce.create(),typeName:Eue.ZodObject},fce(t)));class $ce extends hce{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((e=>g(this,null,(function*(){const n=h(f({},t),{common:h(f({},t.common),{issues:[]}),parent:null});return{result:yield e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new Gle(e.ctx.common.issues)));return Kle(t,{code:Ule.invalid_union,unionErrors:n}),$le}));{let e;const r=[];for(const o of n){const n=h(f({},t),{common:h(f({},t.common),{issues:[]}),parent:null}),i=o._parseSync({data:t.data,path:t.path,parent:n});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=r.map((e=>new Gle(e)));return Kle(t,{code:Ule.invalid_union,unionErrors:i}),$le}}get options(){return this._def.options}}$ce.create=(e,t)=>new $ce(f({options:e,typeName:Eue.ZodUnion},fce(t)));const Jce=e=>e instanceof aue?Jce(e.schema):e instanceofhue?Jce(e.innerType()):e instanceof lue?[e.value]:e instanceof uue?e.options:e instanceof due?Ble.objectValues(e.enum):einstanceof gue?Jce(e._def.innerType):e instanceof Vce?[void 0]:e instanceof Uce?[null]:e instanceof pue?[void 0,...Jce(e.unwrap())]:e instanceof mue?[null,...Jce(e.unwrap())]:e instanceof xue||e instanceof wue?Jce(e.unwrap()):e instanceof vue?Jce(e._def.innerType):[];class Qce extends hce{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==zle.object)return Kle(t,{code:Ule.invalid_type,expected:zle.object,received:t.parsedType}),$le;const n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Kle(t,{code:Ule.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),$le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const i of t){const t=Jce(i.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const nof t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,i)}}return new Qce(f({typeName:Eue.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r},fce(n)))}}function eue(e,t){const n=Vle(e),r=Vle(t);if(e===t)return{valid:!0,data:e};if(n===zle.object&&r===zle.object){const n=Ble.objectKeys(t),r=Ble.objectKeys(e).filter((e=>-1!==n.indexOf(e))),i=f(f({},e),t);for(const o of r){const n=eue(e[o],t[o]);if(!n.valid)return{valid:!1};i[o]=n.data}return{valid:!0,data:i}}if(n===zle.array&&r===zle.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const i=eue(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===zle.date&&r===zle.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class tue extends hce{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(ece(e)||ece(r))return $le;const i=eue(e.value,r.value);return i.valid?((tce(e)||tce(r))&&t.dirty(),{status:t.value,value:i.data}):(Kle(n,{code:Ule.invalid_intersection_types}),$le)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}tue.create=(e,t,n)=>new tue(f({left:e,right:t,typeName:Eue.ZodIntersection},fce(n)));class nue extends hce{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zle.array)return Kle(n,{code:Ule.invalid_type,expected:zle.array,received:n.parsedType}),$le;if(n.data.length<this._def.items.length)return Kle(n,{code:Ule.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$le;!this._def.rest&&n.data.length>this._def.items.length&&(Kle(n,{code:Ule.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new uce(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>Yle.mergeArray(t,e))):Yle.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new nue(h(f({},this._def),{rest:e}))}}nue.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new nue(f({items:e,typeName:Eue.ZodTuple,rest:null},fce(t)))};class rue extends hce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zle.object)return Kle(n,{code:Ule.invalid_type,expected:zle.object,received:n.parsedType}),$le;const r=[],i=this._def.keyType,o=this._def.valueType;for(const s in n.data)r.push({key:i._parse(new uce(n,s,n.path,s)),value:o._parse(new uce(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Yle.mergeObjectAsync(t,r):Yle.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new rue(t instanceof hce?f({keyType:e,valueType:t,typeName:Eue.ZodRecord},fce(n)):f({keyType:Lce.create(),valueType:e,typeName:Eue.ZodRecord},fce(t)))}}class iue extends hce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zle.map)return Kle(n,{code:Ule.invalid_type,expected:zle.map,received:n.parsedType}),$le;const r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map((([e,t],o)=>({key:r._parse(new uce(n,e,n.path,[o,"key"])),value:i._parse(new uce(n,t,n.path,[o,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((()=>g(this,null,(function*(){for(const n of o){const r=yield n.key,i=yield n.value;if("aborted"===r.status||"aborted"===i.status)return $le;"dirty"!==r.status&&"dirty"!==i.status||t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}))))}{const e=new Map;for(const n of o){const r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return $le;"dirty"!==r.status&&"dirty"!==i.status||t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}iue.create=(e,t,n)=>new iue(f({valueType:t,keyType:e,typeName:Eue.ZodMap},fce(n)));class oue extends hce{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zle.set)return Kle(n,{code:Ule.invalid_type,expected:zle.set,received:n.parsedType}),$le;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(Kle(n,{code:Ule.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(Kle(n,{code:Ule.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const i=this._def.valueType;function o(e){const n=new Set;for(const r of e){if("aborted"===r.status)return $le;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const s=[...n.data.values()].map(((e,t)=>i._parse(new uce(n,e,n.path,t))));return n.common.async?Promise.all(s).then((e=>o(e))):o(s)}min(e,t){return new oue(h(f({},this._def),{minSize:{value:e,message:sce.toString(t)}}))}max(e,t){return new oue(h(f({},this._def),{maxSize:{value:e,message:sce.toString(t)}}))}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}oue.create=(e,t)=>new oue(f({valueType:e,minSize:null,maxSize:null,typeName:Eue.ZodSet},fce(t)));class sue extends hce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==zle.function)return Kle(t,{code:Ule.invalid_type,expected:zle.function,received:t.parsedType}),$le;function n(e,n){return Xle({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zle(),Wle].filter((e=>!!e)),issueData:{code:Ule.invalid_arguments,argumentsError:n}})}function r(e,n){return Xle({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zle(),Wle].filter((e=>!!e)),issueData:{code:Ule.invalid_return_type,returnTypeError:n}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof fue){const e=this;return Qle((function(...t){return g(this,null,(function*(){const s=new Gle([]),a=yield e._def.args.parseAsync(t,i).catch((e=>{throw s.addIssue(n(t,e)),s})),l=yield Reflect.apply(o,this,a),c=yield e._def.returns._def.type.parseAsync(l,i).catch((e=>{throw s.addIssue(r(l,e)),s}));return c}))}))}{const e=this;return Qle((function(...t){const s=e._def.args.safeParse(t,i);if(!s.success)throw new Gle([n(t,s.error)]);const a=Reflect.apply(o,this,s.data),l=e._def.returns.safeParse(a,i);if(!l.success)throw new Gle([r(a,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new sue(h(f({},this._def),{args:nue.create(e).rest(Wce.create())}))}returns(e){return new sue(h(f({},this._def),{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){returnnew sue(f({args:e||nue.create([]).rest(Wce.create()),returns:t||Wce.create(),typeName:Eue.ZodFunction},fce(n)))}}class aue extends hce{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}aue.create=(e,t)=>new aue(f({getter:e,typeName:Eue.ZodLazy},fce(t)));class lue extends hce{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Kle(t,{received:t.data,code:Ule.invalid_literal,expected:this._def.value}),$le}return{status:"valid",value:e.data}}get value(){return this._def.value}}function cue(e,t){return new uue(f({values:e,typeName:Eue.ZodEnum},fce(t)))}lue.create=(e,t)=>new lue(f({value:e,typeName:Eue.ZodLiteral},fce(t)));class uue extends hce{constructor(){super(...arguments),lce.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Kle(t,{expected:Ble.joinValues(n),received:t.parsedType,code:Ule.invalid_type}),$le}if(ice(this,lce,"f")||oce(this,lce,new Set(this._def.values),"f"),!ice(this,lce,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Kle(t,{received:t.data,code:Ule.invalid_enum_value,options:n}),$le}return Qle(e.data)}get options(){return this._def.values}get enum(){const e={};for(constt of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return uue.create(e,f(f({},this._def),t))}exclude(e,t=this._def){return uue.create(this.options.filter((t=>!e.includes(t))),f(f({},this._def),t))}}lce=new WeakMap,uue.create=cue;class due extends hce{constructor(){super(...arguments),cce.set(this,void 0)}_parse(e){const t=Ble.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==zle.string&&n.parsedType!==zle.number){const e=Ble.objectValues(t);return Kle(n,{expected:Ble.joinValues(e),received:n.parsedType,code:Ule.invalid_type}),$le}if(ice(this,cce,"f")||oce(this,cce,new Set(Ble.getValidEnumValues(this._def.values)),"f"),!ice(this,cce,"f").has(e.data)){conste=Ble.objectValues(t);return Kle(n,{received:n.data,code:Ule.invalid_enum_value,options:e}),$le}return Qle(e.data)}get enum(){return this._def.values}}cce=new WeakMap,due.create=(e,t)=>new due(f({values:e,typeName:Eue.ZodNativeEnum},fce(t)));class fue extends hce{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==zle.promise&&!1===t.common.async)return Kle(t,{code:Ule.invalid_type,expected:zle.promise,received:t.parsedType}),$le;const n=t.parsedType===zle.promise?t.data:Promise.resolve(t.data);return Qle(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}fue.create=(e,t)=>new fue(f({type:e,typeName:Eue.ZodPromise},fce(t)));class hue extends hce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Eue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Kle(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){const e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then((e=>g(this,null,(function*(){if("aborted"===t.value)return $le;const r=yield this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?$le:"dirty"===r.status||"dirty"===t.value?Jle(r.value):r}))));{if("aborted"===t.value)return $le;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?$le:"dirty"===r.status||"dirty"===t.value?Jle(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?$le:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?$le:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!nce(e))return e;const o=r.transform(e.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>nce(e)?Promise.resolve(r.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}Ble.assertNever(r)}}hue.create=(e,t,n)=>new hue(f({schema:e,typeName:Eue.ZodEffects,effect:t},fce(n))),hue.createWithPreprocess=(e,t,n)=>new hue(f({schema:t,effect:{type:"preprocess",transform:e},typeName:Eue.ZodEffects},fce(n)));class pue extends hce{_parse(e){return this._getType(e)===zle.undefined?Qle(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}pue.create=(e,t)=>new pue(f({innerType:e,typeName:Eue.ZodOptional},fce(t)));class mue extends hce{_parse(e){returnthis._getType(e)===zle.null?Qle(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}mue.create=(e,t)=>new mue(f({innerType:e,typeName:Eue.ZodNullable},fce(t)));class gue extends hce{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===zle.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}gue.create=(e,t)=>new gue(f({innerType:e,typeName:Eue.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default},fce(t)));class vue extends hce{_parse(e){const{ctx:t}=this._processInputParams(e),n=h(f({},t),{common:h(f({},t.common),{issues:[]})}),r=this._def.innerType._parse({data:n.data,path:n.path,parent:f({},n)});return rce(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Gle(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new Gle(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}vue.create=(e,t)=>new vue(f({innerType:e,typeName:Eue.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch},fce(t)));class yue extends hce{_parse(e){if(this._getType(e)!==zle.nan){const t=this._getOrReturnCtx(e);return Kle(t,{code:Ule.invalid_type,expected:zle.nan,received:t.parsedType}),$le}return{status:"valid",value:e.data}}}yue.create=e=>new yue(f({typeName:Eue.ZodNaN},fce(e)));const bue=Symbol("zod_brand");class xue extends hce{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){returnthis._def.type}}class _ue extends hce{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(()=>g(this,null,(function*(){const e=yield this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?$le:"dirty"===e.status?(t.dirty(),Jle(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})))()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?$le:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new _ue({in:e,out:t,typeName:Eue.ZodPipeline})}}class wue extends hce{_parse(e){const t=this._def.innerType._parse(e),n=e=>(nce(e)&&(e.value=Object.freeze(e.value)),e);return rce(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Cue(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function kue(e,t={},n){return e?Gce.create().superRefine(((r,i)=>{var o,s;const a=e(r);if(a instanceof Promise)return a.then((e=>{var o,s;if(!e){const e=Cue(t,r),a=null===(s=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===s||s;i.addIssue(h(f({code:"custom"},e),{fatal:a}))}}));if(!a){const e=Cue(t,r),a=null===(s=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===s||s;i.addIssue(h(f({code:"custom"},e),{fatal:a}))}})):Gce.create()}wue.create=(e,t)=>new wue(f({innerType:e,typeName:Eue.ZodReadonly},fce(t)));const Sue={object:Yce.lazycreate};var Eue,Aue;(Aue=Eue||(Eue={})).ZodString="ZodString",Aue.ZodNumber="ZodNumber",Aue.ZodNaN="ZodNaN",Aue.ZodBigInt="ZodBigInt",Aue.ZodBoolean="ZodBoolean",Aue.ZodDate="ZodDate",Aue.ZodSymbol="ZodSymbol",Aue.ZodUndefined="ZodUndefined",Aue.ZodNull="ZodNull",Aue.ZodAny="ZodAny",Aue.ZodUnknown="ZodUnknown",Aue.ZodNever="ZodNever",Aue.ZodVoid="ZodVoid",Aue.ZodArray="ZodArray",Aue.ZodObject="ZodObject",Aue.ZodUnion="ZodUnion",Aue.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Aue.ZodIntersection="ZodIntersection",Aue.ZodTuple="ZodTuple",Aue.ZodRecord="ZodRecord",Aue.ZodMap="ZodMap",Aue.ZodSet="ZodSet",Aue.ZodFunction="ZodFunction",Aue.ZodLazy="ZodLazy",Aue.ZodLiteral="ZodLiteral",Aue.ZodEnum="ZodEnum",Aue.ZodEffects="ZodEffects",Aue.ZodNativeEnum="ZodNativeEnum",Aue.ZodOptional="ZodOptional",Aue.ZodNullable="ZodNullable",Aue.ZodDefault="ZodDefault",Aue.ZodCatch="ZodCatch",Aue.ZodPromise="ZodPromise",Aue.ZodBranded="ZodBranded",Aue.ZodPipeline="ZodPipeline",Aue.ZodReadonly="ZodReadonly";const jue=Lce.create,Oue=Dce.create,Nue=yue.create,Tue=Bce.create,Pue=Fce.create,Mue=Hce.create,Iue=zce.create,Lue=Vce.create,Rue=Uce.create,Due=Gce.create,Bue=Wce.create,Fue=qce.create,Hue=Zce.create,zue=Xce.create,Vue=Yce.create,Uue=Yce.strictCreate,Gue=$ce.create,Wue=Qce.create,que=tue.create,Zue=nue.create,Xue=rue.create,Kue=iue.create,Yue=oue.create,$ue=sue.create,Jue=aue.create,Que=lue.create,ede=uue.create,tde=due.create,nde=fue.create,rde=hue.create,ide=pue.create,ode=mue.create,sde=hue.createWithPreprocess,ade=_ue.create,lde={string:e=>Lce.create(h(f({},e),{coerce:!0})),number:e=>Dce.create(h(f({},e),{coerce:!0})),boolean:e=>Fce.create(h(f({},e),{coerce:!0})),bigint:e=>Bce.create(h(f({},e),{coerce:!0})),date:e=>Hce.create(h(f({},e),{coerce:!0}))},cde=$le;var ude=Object.freeze({__proto__:null,defaultErrorMap:Wle,setErrorMap:function(e){qle=e},getErrorMap:Zle,makeIssue:Xle,EMPTY_PATH:[],addIssueToContext:Kle,ParseStatus:Yle,INVALID:$le,DIRTY:Jle,OK:Qle,isAborted:ece,isDirty:tce,isValid:nce,isAsync:rce,get util(){return Ble},get objectUtil(){return Hle},ZodParsedType:zle,getParsedType:Vle,ZodType:hce,datetimeRegex:Pce,ZodString:Lce,ZodNumber:Dce,ZodBigInt:Bce,ZodBoolean:Fce,ZodDate:Hce,ZodSymbol:zce,ZodUndefined:Vce,ZodNull:Uce,ZodAny:Gce,ZodUnknown:Wce,ZodNever:qce,ZodVoid:Zce,ZodArray:Xce,ZodObject:Yce,ZodUnion:$ce,ZodDiscriminatedUnion:Qce,ZodIntersection:tue,ZodTuple:nue,ZodRecord:rue,ZodMap:iue,ZodSet:oue,ZodFunction:sue,ZodLazy:aue,ZodLiteral:lue,ZodEnum:uue,ZodNativeEnum:due,ZodPromise:fue,ZodEffects:hue,ZodTransformer:hue,ZodOptional:pue,ZodNullable:mue,ZodDefault:gue,ZodCatch:vue,ZodNaN:yue,BRAND:bue,ZodBranded:xue,ZodPipeline:_ue,ZodReadonly:wue,custom:kue,Schema:hce,ZodSchema:hce,late:Sue,get ZodFirstPartyTypeKind(){return Eue},coerce:lde,any:Due,array:zue,bigint:Tue,boolean:Pue,date:Mue,discriminatedUnion:Wue,effect:rde,enum:ede,function:$ue,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>kue((t=>t instanceof e),t),intersection:que,lazy:Jue,literal:Que,map:Kue,nan:Nue,nativeEnum:tde,never:Fue,null:Rue,nullable:ode,number:Oue,object:Vue,oboolean:()=>Pue().optional(),onumber:()=>Oue().optional(),optional:ide,ostring:()=>jue().optional(),pipeline:ade,preprocess:sde,promise:nde,record:Xue,set:Yue,strictObject:Uue,string:jue,symbol:Iue,transformer:rde,tuple:Zue,undefined:Lue,union:Gue,unknown:Bue,void:Hue,NEVER:cde,ZodIssueCode:Ule,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:Gle});const dde=e=>e.message?e.message:"unspecified error";class fde extends ese{constructor(e){super(),this.code=1100,this.errors=e,super.message=`Web3 validator found ${e.length} error[s]:\n${this._compileErrors().join("\n")}`}_compileErrors(){return this.errors.map(dde)}}const hde=["bool","int","uint","bytes","string","address","tuple"],pde=e=>"object"==typeof e&&"type"in e&&"name"in e,mde=e=>"string"==typeof e,gde=e=>"string"==typeof e&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e);function vde(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==t&&t>0&&e.length!==2+2*t)}const yde=e=>"number"==typeof e||"bigint"==typeof e||"string"==typeof e&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(e);function bde(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string',received type "+typeof e);return e.startsWith("0x")}const xde=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString()}`)},_de=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],wde=e=>{let t,n=e.replace(/ /,""),r=!1,i=[];if(e.includes("[")&&(n=n.slice(0,n.indexOf("[")),i=[...e.matchAll(/(?:\[(\d*)\])/g)].map((e=>parseInt(e[1],10))).map((e=>Number.isNaN(e)?-1:e)),r=i.length>0),hde.includes(n))return{baseType:n,isArray:r,baseTypeSize:t,arraySizes:i};if(n.startsWith("int"))t=parseInt(n.substring(3),10),n="int";else if(n.startsWith("uint"))t=parseInt(e.substring(4),10),n="uint";else{if(!n.startsWith("bytes"))return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};t=parseInt(n.substring(5),10),n="bytes"}return{baseType:n,isArray:r,baseTypeSize:t,arraySizes:i}},Cde=(e,t={})=>{if(Object.keys(t).includes("type"))throw new fde([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);const{baseType:n,baseTypeSize:r}=wde(e);if(!n&&!_de.includes(e))throw new fde([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(n){if("tuple"===n)throw new Error('"tuple" type is not implemented directly.');return{format:`${n}${null!=r?r:""}`,required:!0}}return e?{format:e,required:!0}:{}},kde=(e,t="/0")=>{const n={type:"array",items:[],maxItems:e.length,minItems:e.length};for(const[r,i]of e.entries()){let e,o,s=[];pde(i)?(e=i.type,o=i.name||`${t}/${r}`,s=i.components):"string"==typeof i?(e=i,o=`${t}/${r}`):Array.isArray(i)&&(i[0]&&"string"==typeof i[0]&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(e=i[0],o=`${t}/${r}`,s=i[1]):(e="tuple",o=`${t}/${r}`,s=i));const{baseType:a,isArray:l,arraySizes:c}=wde(e);let u,d=n;for(let t=c.length-1;t>0;t-=1)u={type:"array",$id:o,items:[],maxItems:c[t],minItems:c[t]},c[t]<0&&(delete u.maxItems,delete u.minItems),Array.isArray(d.items)?0===d.items.length?d.items=[u]:d.items.push(u):d.items=[d.items,u],d=u;if("tuple"!==a||l)if("tuple"===a&&l){const e=c[0],t=Object.assign({type:"array",$id:o,items:kde(s,o)},e>=0&&{minItems:e,maxItems:e});d.items.push(t)}else if(l){const t=c[0],n=Object.assign({type:"array",$id:o,items:Cde(e)},t>=0&&{minItems:t,maxItems:t});d.items.push(n)}else Array.isArray(d.items),d.items.push(Object.assign({$id:o},Cde(e)));else{const e=kde(s,o);e.$id=o,d.items.push(e)}d=n}return n},Sde=e=>kde(e),Ede=(e,t)=>1===t?e:Ede(e[0],t-1),Ade=(e,t,n)=>{const r=[];for(const[i,o]of e.entries()){let e,s,a=[];pde(o)?(e=o.type,s=o.name,a=o.components):"string"==typeof o?e=o:Array.isArray(o)&&(o[1]&&Array.isArray(o[1])?(e=o[0],a=o[1]):(e="tuple",a=o));const{baseType:l,isArray:c,arraySizes:u}=wde(e),d=Array.isArray(t)?t[i]:t[s];if("tuple"!==l||c)if("tuple"===l&&c){const e=[];for(const t of d)if(u.length>1){const r=Ede(t,u.length-1),i=[];for(const e of r)i.push(Ade(a,e,n));e.push(i)}else e.push(Ade(a,t,n));r.push(e)}else r.push(d);else r.push(Ade(a,d,n))}return(n=null!=n?n:[]).push(...r),n},jde=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},Ode=e=>{if(!gde(e))throw new Error("Invalid hex string");const[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],r=BigInt(n);return r>Number.MAX_SAFE_INTEGER?t?-r:r:r<Number.MIN_SAFE_INTEGER?r:t?-1*Number(r):Number(r)},Nde=e=>{if(("number"==typeof e||"bigint"==typeof e)&&e<0)return`-0x${e.toString(16).slice(1)}`;if(("number"==typeof e||"bigint"==typeof e)&&e>=0)return`0x${e.toString(16)}`;if("string"==typeof e&&gde(e)){const[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e];return`${t?"-":""}0x${n.split(/^(-)?0(x|X)/).slice(-1)[0].replace(/^0+/,"").toLowerCase()}`}if("string"==typeof e&&!gde(e))return Nde(BigInt(e));throw new _ae(e)},Tde=(e,t,n="0")=>{if("string"==typeof e&&!gde(e))return e.padStart(t,n);const r="string"==typeof e&&gde(e)?e:Nde(e),[i,o]=r.startsWith("-")?["-0x",r.slice(3)]:["0x",r.slice(2)];return`${i}${o.padStart(t,n)}`};function Pde(e){let t="0x";for(const n of e){const e=n.toString(16);t+=1===e.length?`0${e}`:e}return t}const Mde=48,Ide=57,Lde=65,Rde=70,Dde=97,Bde=102;function Fde(e){return e>=Mde&&e<=Ide?e-Mde:e>=Lde&&e<=Rde?e-(Lde-10):e>=Dde&&e<=Bde?e-(Dde-10):void 0}function Hde(e){let t=0;if(!e.startsWith("0")||"x"!==e[1]&&"X"!==e[1]||(t=2),e.length%2!=0)throw new xae(`hex string has odd length: ${e}`);const n=(e.length-t)/2,r=new Uint8Array(n);for(let i=0,o=t;i<n;i+=1){const t=Fde(e.charCodeAt(o++)),n=Fde(e.charCodeAt(o++));if(void 0===t||void 0===n)throw new xae(`Invalid byte sequence ("${e[o-2]}${e[o-1]}" in "${e}").`);r[i]=16*t+n}return r}function zde(e){var t;return e instanceof Uint8Array||"Uint8Array"!==(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)?e:Uint8Array.from(e)}const Vde=Object.freeze(Object.defineProperty({__proto__:null,abiSchemaToJsonSchema:kde,codePointToInt:jde,ensureIfUint8Array:zde,ethAbiToJsonSchema:Sde,fetchArrayElement:Ede,hexToNumber:Ode,hexToUint8Array:Hde,numberToHex:Nde,padLeft:Tde,parseBaseType:wde,transformJsonDataToAbiFormat:Ade,uint8ArrayToHexString:Pde},Symbol.toStringTag,{value:"Module"})),Ude=e=>{var t,n;return e instanceof Uint8Array||"Uint8Array"===(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)||"Buffer"===(null===(n=null==e?void 0:e.constructor)||void 0===n?void 0:n.name)},Gde=(e,t={abiType:"bytes"})=>{if("string"!=typeof e&&!Array.isArray(e)&&!Ude(e))return!1;if("string"==typeof e&&gde(e)&&e.startsWith("-"))return!1;if("string"==typeof e&&!gde(e))return!1;let n;if("string"==typeof e){if(e.length%2!=0)return!1;n=Hde(e)}else if(Array.isArray(e)){if(e.some((e=>e<0||e>255||!Number.isInteger(e))))return!1;n=new Uint8Array(e)}else n=e;if(null==t?void 0:t.abiType){const{baseTypeSize:e}=wde(t.abiType);return!e||n.length===e}return!(null==t?void 0:t.size)||n.length===(null==t?void 0:t.size)},Wde=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;const t=e.slice(2),n=fle(t.toLowerCase()),r=Pde(Dle(zde(n))).slice(2);for(let i=0;i<40;i+=1)if(parseInt(r[i],16)>7&&t[i].toUpperCase()!==t[i]||parseInt(r[i],16)<=7&&t[i].toLowerCase()!==t[i])return!1;return!0},qde=(e,t=!0)=>{if("string"!=typeof e&&!Ude(e))return!1;let n;return n=Ude(e)?Pde(e):"string"!=typeof e||gde(e)||e.toLowerCase().startsWith("0x")?e:`0x${e}`,!!/^(0x)?[0-9a-f]{40}$/i.test(n)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(n)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(n))||(!t||Wde(n)))},Zde=(e,t)=>{if(t===BigInt(0))return BigInt(1);let n=e;for(let r=1;r<t;r+=1)n*=e;return n},Xde=(e,t={abiType:"uint"})=>{if(!["number","string","bigint"].includes(typeof e)||"string"==typeof e&&0===e.length)return!1;let n;if(null==t?void 0:t.abiType){const{baseTypeSize:e}=wde(t.abiType);e&&(n=e)}else t.bitSize&&(n=t.bitSize);const r=Zde(BigInt(2),BigInt(null!=n?n:256))-BigInt(1);try{const t="string"==typeof e&&gde(e)?BigInt(Ode(e)):BigInt(e);return t>=0&&t<=r}catch(i){return!1}},Kde=(e,t={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof e))return!1;if("number"==typeof e&&e>Number.MAX_SAFE_INTEGER)return!1;let n;if(null==t?void 0:t.abiType){const{baseTypeSize:e,baseType:r}=wde(t.abiType);if("int"!==r)return!1;e&&(n=e)}else t.bitSize&&(n=t.bitSize);const r=Zde(BigInt(2),BigInt((null!=n?n:256)-1)),i=BigInt(-1)*Zde(BigInt(2),BigInt((null!=n?n:256)-1));try{const t="string"==typeof e&&gde(e)?BigInt(Ode(e)):BigInt(e);return t>=i&&t<=r}catch(o){return!1}},Yde=e=>!!Kde(e)||(!("string"!=typeof e||!/[0-9.]/.test(e)||e.indexOf(".")!==e.lastIndexOf("."))||"number"==typeof e),$de=e=>Xde(e),Jde=e=>Object.values(joe).includes(e),Qde=e=>Jde(e)||$de(e),efe=e=>"string"==typeof e&&(!!/^(0x)?[0-9a-f]{512}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))),tfe=(e,t)=>{if("string"==typeof t&&!gde(t))return!1;if(!efe(e))return!1;const n="string"==typeof t?Hde(t):t,r=Pde(Dle(n)).slice(2);for(let i=0;i<12;i+=4){const t=(parseInt(r.slice(i,i+2),16)<<8)+parseInt(r.slice(i+2,i+4),16)&2047,n=1<<t%4;if((jde(e.charCodeAt(e.length-1-Math.floor(t/4)))&n)!==n)return!1}return!0},nfe=e=>null==e,rfe=e=>!("object"!=typeof e||nfe(e)||Array.isArray(e)||e instanceof Poe),ife=e=>"string"==typeof e&&(!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))),ofe={address:e=>qde(e),bloom:e=>efe(e),blockNumber:e=>$de(e),blockTag:e=>Jde(e),blockNumberOrTag:e=>Qde(e),bool:e=>{return!!["number","string","boolean"].includes(typeof(t=e))&&("boolean"==typeof t||("string"!=typeof t||gde(t)?"string"==typeof t&&gde(t)?"0x1"===t||"0x0"===t:1===t||0===t:"1"===t||"0"===t));var t},bytes:e=>Gde(e),filter:e=>(e=>{const t=["fromBlock","toBlock","address","topics","blockHash"];if(nfe(e)||"object"!=typeof e)return!1;if(!Object.keys(e).every((e=>t.includes(e))))return!1;if(!nfe(e.fromBlock)&&!Qde(e.fromBlock)||!nfe(e.toBlock)&&!Qde(e.toBlock))return!1;if(!nfe(e.address))if(Array.isArray(e.address)){if(!e.address.every((e=>qde(e))))return!1}else if(!qde(e.address))return!1;return!(!nfe(e.topics)&&!e.topics.every((e=>!!nfe(e)||(Array.isArray(e)?e.every((e=>ife(e))):!!ife(e)))))})(e),hex:e=>gde(e),uint:e=>Xde(e),int:e=>Kde(e),number:e=>Yde(e),string:e=>mde(e)};for(let LJe=8;LJe<=256;LJe+=8)ofe[`int${LJe}`]=e=>Kde(e,{bitSize:LJe}),ofe[`uint${LJe}`]=e=>Xde(e,{bitSize:LJe});for(let LJe=1;LJe<=32;LJe+=1)ofe[`bytes${LJe}`]=e=>Gde(e,{size:LJe});ofe.bytes256=ofe.bytes;const sfe=e=>{if((!(null==e?void 0:e.type)||"object"===(null==e?void 0:e.type))&&(null==e?void 0:e.properties)){const t={};for(const n of Object.keys(e.properties)){const r=sfe(e.properties[n]);r&&(t[n]=r)}return Array.isArray(e.required)?ude.object(t).partial().required(e.required.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:!0})),{})):ude.object(t).partial()}if("array"===(null==e?void 0:e.type)&&(null==e?void 0:e.items)){if(Array.isArray(e.items)&&e.items.length>1&&void 0!==e.maxItems&&new Set(e.items.map((e=>e.$id))).size===e.items.length){const t=[];for(const n of e.items){const e=sfe(n);e&&t.push(e)}return ude.tuple(t)}const t=Array.isArray(e.items)?e.items[0]:e.items;let n=ude.array(sfe(t));return n=void 0!==e.minItems?n.min(e.minItems):n,n=void 0!==e.maxItems?n.max(e.maxItems):n,n}if(e.oneOf&&Array.isArray(e.oneOf))return ude.union(e.oneOf.map((e=>sfe(e))));if(null==e?void 0:e.format){if(!ofe[e.format])throw new Uae(e.format);return ude.any().refine(ofe[e.format],(t=>({params:{value:t,format:e.format}})))}return(null==e?void 0:e.type)&&"object"!==(null==e?void 0:e.type)&&"function"==typeof ude[String(e.type)]?ude[String(e.type)]():ude.object({data:ude.any()}).partial()};class afe{static factory(){return afe.validatorInstance||(afe.validatorInstance=new afe),afe.validatorInstance}validate(e,t,n){var r,i;const o=sfe(e).safeParse(t);if(!o.success){const e=this.convertErrors(null!==(i=null===(r=o.error)||void 0===r?void 0:r.issues)&&void 0!==i?i:[]);if(e){if(null==n?void 0:n.silent)return e;throw new fde(e)}}}convertErrors(e){if(e&&Array.isArray(e)&&e.length>0)return e.map((e=>{var t;let n,r,i,o;o=e.path.join("/");const s=String(e.path[e.path.length-1]),a=e.path.join("/");if(e.code===Ule.too_big)r="maxItems",o=`${a}/maxItems`,i={limit:e.maximum},n=`must NOT have more than ${e.maximum} items`;else if(e.code===Ule.too_small)r="minItems",o=`${a}/minItems`,i={limit:e.minimum},n=`must NOT have fewer than ${e.minimum} items`;else if(e.code===Ule.custom){const{value:r,format:s}=null!==(t=e.params)&&void 0!==t?t:{};n=void 0===r?`value at "/${o}" is required`:`value "${"object"==typeof r?JSON.stringify(r):r}" at "/${o}" must pass "${s}" validation`,i={value:r}}return{keyword:null!=r?r:s,instancePath:a?`/${a}`:"",schemaPath:o?`#${o}`:"#",params:null!=i?i:{value:e.message},message:null!=n?n:e.message}}))}}const lfe=new class{constructor(){this._validator=afe.factory()}validateJSONSchema(e,t,n){return this._validator.validate(e,t,n)}validate(e,t,n={silent:!1}){var r,i;const o=Sde(e);if(!Array.isArray(o.items)||0!==(null===(r=o.items)||void 0===r?void 0:r.length)||0!==t.length){if(Array.isArray(o.items)&&0===(null===(i=o.items)||void 0===i?void 0:i.length)&&0!==t.length)throw new fde([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:t}]);return this._validator.validate(o,t,n)}}};function cfe(e){var t,n;return e instanceof Uint8Array||"Uint8Array"===(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)||"Buffer"===(null===(n=null==e?void 0:e.constructor)||void 0===n?void 0:n.name)}function ufe(...e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function dfe(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n+=1)if(e[n]!==t[n])return!1;return!0}const ffe={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},hfe=e=>{if(lfe.validate(["bytes"],[e]),cfe(e))return e;if(Array.isArray(e))return new Uint8Array(e);if("string"==typeof e)return Hde(e);throw new xae(e)},{uint8ArrayToHexString:pfe}=Vde,mfe=e=>pfe(hfe(e)),gfe=e=>"string"==typeof e&&"0x"!==e.slice(0,2).toLowerCase()?hfe(`0x${e}`):hfe(e),vfe=e=>(lfe.validate(["hex"],[e]),Ode(e)),yfe=vfe,bfe=(e,t)=>{"bigint"!=typeof e&&lfe.validate(["int"],[e]);let n=Nde(e);return t&&(n.startsWith("-")||n.length%2!=1?n.length%2==0&&n.startsWith("-")&&(n="-0x0".concat(n.slice(3))):n="0x0".concat(n.slice(2))),n},xfe=bfe,_fe=e=>{lfe.validate(["string"],[e]);let t=e.replace(/^(?:\u0000)/,"");return t=t.replace(/(?:\u0000)$/,""),mfe((new TextEncoder).encode(t))},wfe=_fe,Cfe=_fe,kfe=e=>Rle(gfe(e)),Sfe=fle,Efe=kfe,Afe=e=>{lfe.validate(["string"],[e]);let t="";for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n).toString(16);t+=r.length%2!=0?`0${r}`:r}return`0x${t}`},jfe=Afe,Ofe=e=>new TextDecoder("ascii").decode(gfe(e)),Nfe=Ofe,Tfe=(e,t)=>{if("string"==typeof e&&qde(e))return t?"address":`0x${e.toLowerCase().replace(/^0x/i,"")}`;if("boolean"==typeof e)return t?"bool":e?"0x01":"0x00";if("number"==typeof e)return t?e<0?"int256":"uint256":bfe(e);if("bigint"==typeof e)return t?"bigint":bfe(e);if(cfe(e))return t?"bytes":mfe(e);if("object"==typeof e&&e)return t?"string":_fe(JSON.stringify(e));if("string"==typeof e){if(e.startsWith("-0x")||e.startsWith("-0X"))return t?"int256":bfe(e);if(gde(e))return t?"bytes":e;if(yde(e)&&!Kde(e)&&!Xde(e))return t?"bytes":`0x${e}`;if(yde(e)&&!Kde(e)&&Xde(e))return t?"uint":bfe(e);if(!Number.isFinite(e))returnt?"string":_fe(e)}throw new Eae(e)},Pfe=e=>{if("number"==typeof e)return e>1e20?BigInt(e):e;if("bigint"==typeof e)returne>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER?Number(e):e;if("string"==typeof e&&gde(e))return vfe(e);try{return Pfe(BigInt(e))}catch(t){throw new _ae(e)}},Mfe=e=>{if("number"==typeof e)return BigInt(e);if("bigint"==typeof e)return e;if("string"==typeof e&&yde(e))return e.startsWith("-")?-BigInt(e.substring(1)):BigInt(e);throw new _ae(e)},Ife=e=>{if(!qde(e,!1))throw new wae(e);const t=e.toLowerCase().replace(/^0x/i,""),n=Pde(Dle(zde(Sfe(t))));if(nfe(n)||"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===n)return"";let r="0x";const i=n.replace(/^0x/i,"");for(let o=0;o<t.length;o+=1)parseInt(i[o],16)>7?r+=t[o].toUpperCase():r+=t[o];return r},Lfe=e=>{if("boolean"==typeof e)return e;if("number"==typeof e&&(0===e||1===e))return Boolean(e);if("bigint"==typeof e&&(e===BigInt(0)||e===BigInt(1)))return Boolean(e);if("string"==typeof e&&!gde(e)&&("1"===e||"0"===e||"false"===e||"true"===e))return"true"===e||"false"!==e&&Boolean(Number(e));if("string"==typeof e&&gde(e)&&("0x1"===e||"0x0"===e))return Boolean(Pfe(e));throw new jae(e)};class Rfe extends G6{constructor(){super(...arguments),this.maxListeners=Number.MAX_SAFE_INTEGER}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}}const Dfe=gde,Bfe=yde,Ffe=Wde,Hfe=qde,zfe=efe,Vfe=tfe,Ufe=(e,t)=>{if(!efe(e))return!1;if(!qde(t))return!1;const n=Tde(t,64);return tfe(e,n)},Gfe=(e,t)=>!!efe(e)&&(!!qde(t)&&tfe(e,t)),Wfe=ife,qfe=(e,t)=>!!efe(e)&&(!!ife(t)&&tfe(e,t)),Zfe=e=>"object"==typeof e&&!nfe(e)&&0!==Object.keys(e).length&&["input","data","from","gas","gasPrice","gasLimit","address","jsonInterface","syncWithContext","dataInputFill"].some((t=>t in e)),Xfe=nfe,Kfe=e=>!("object"!=typeof e||nfe(e)||Array.isArray(e)||e instanceof Poe),Yfe=(e,...t)=>{if(!Kfe(e))return e;const n=Object.assign({},e);for(const r of t)for(const e in r)Kfe(r[e])?(n[e]||(n[e]={}),n[e]=Yfe(n[e],r[e])):!nfe(r[e])&&Object.hasOwnProperty.call(r,e)&&(Array.isArray(r[e])||r[e]instanceof Poe?n[e]=r[e].slice(0):n[e]=r[e]);return n},$fe=(e,t,n="0")=>"string"==typeof e?gde(e)?Tde(e,t,n):e.padStart(t,n):(lfe.validate(["int"],[e]),Tde(e,t,n)),Jfe=(e,t,n="0")=>{if("string"==typeof e&&!gde(e))return e.padEnd(t,n);const r="string"==typeof e&&gde(e)?e:bfe(e),i=r.startsWith("-")?3:2;return lfe.validate([r.startsWith("-")?"int":"uint"],[e]),r.padEnd(t+i,n)},Qfe=Jfe,ehe=$fe,the=(e,t=64)=>{lfe.validate(["int"],[e]);const n=Pfe(e);if(n>=0)return $fe(Tfe(n),t);const r=Zde(BigInt(2),BigInt(4*t));if(-n>=r)throw new Aae(`value: ${e}, nibbleWidth: ${t}`);const i=BigInt(n);return $fe(bfe(i+r),t)},{parseBaseType:nhe}=Vde,rhe=e=>"object"==typeof e&&!nfe(e)&&"number"in e&&"bytes"in e,ihe=(e,t,n=[])=>{let r,i=Object.assign({},e);for(const o of t){if(i.oneOf&&r){const e=r,t=n.find((([t])=>t===e));t&&t[0]===r&&(i=i.oneOf[t[1]])}if(!i.properties&&!i.items)return;if(i.properties)i=i.properties[o];else if(i.items&&i.items.properties){i=i.items.properties[o]}else i.items&&rfe(i.items)?i=i.items:i.items&&Array.isArray(i.items)&&(i=i.items[parseInt(o,10)]);i&&o&&(r=o)}return i},ohe=(e,t,n)=>{try{const{baseType:r,baseTypeSize:i}=nhe(t);if("int"===r||"uint"===r)switch(n.number){case _oe.NUMBER:return Number(Mfe(e));case _oe.HEX:return bfe(Mfe(e));case _oe.STR:return Mfe(e).toString();case _oe.BIGINT:return Mfe(e);default:throw new Sse(`Invalid format: ${String(n.number)}`)}if("bytes"===r){let t;switch(i?"string"==typeof e?t=$fe(e,2*i):cfe(e)&&(t=ufe(new Uint8Array(i-e.length),e)):t=e,n.bytes){case Coe.HEX:return mfe(hfe(t));case Coe.UINT8ARRAY:return hfe(t);default:throw new Sse(`Invalid format: ${String(n.bytes)}`)}}if("string"===r)return String(e)}catch(r){return e}return e},she=({value:e,schemaProp:t,schema:n,object:r,key:i,dataPath:o,format:s,oneOfPath:a=[]})=>{var l,c;if(Array.isArray(e)){let u=t;if(void 0!==(null==t?void 0:t.oneOf)&&t.oneOf.forEach(((n,r)=>{var o,s;!Array.isArray(null==t?void 0:t.items)&&("object"==typeof e[0]&&"object"===(null===(o=null==n?void 0:n.items)||void 0===o?void 0:o.type)||"string"==typeof e[0]&&"object"!==(null===(s=null==n?void 0:n.items)||void 0===s?void 0:s.type))&&(u=n,a.push([i,r]))})),nfe(null==u?void 0:u.items))return delete r[i],o.pop(),!0;if(rfe(u.items)&&!nfe(u.items.format)){for(let t=0;t<e.length;t+=1)r[i][t]=ohe(e[t],null===(l=null==u?void 0:u.items)||void 0===l?void 0:l.format,s);return o.pop(),!0}if(!Array.isArray(null==u?void 0:u.items)&&"object"===(null===(c=null==u?void 0:u.items)||void 0===c?void 0:c.type)){for(const t of e)ahe(t,n,o,s,a);return o.pop(),!0}if(Array.isArray(null==u?void 0:u.items)){for(let t=0;t<e.length;t+=1)r[i][t]=ohe(e[t],u.items[t].format,s);return o.pop(),!0}}return!1},ahe=(e,t,n,r,i=[])=>{var o;if(!rfe(e)&&!Array.isArray(e))return ohe(e,null==t?void 0:t.format,r);const s=e;if(Array.isArray(s)&&"array"===(null==t?void 0:t.type)&&"object"===(null===(o=null==t?void 0:t.items)||void 0===o?void 0:o.type))she({value:s,schemaProp:t,schema:t,object:s,key:"",dataPath:n,format:r,oneOfPath:i});else for(const[a,l]of Object.entries(s)){n.push(a);let e=ihe(t,n,i);if(nfe(e))delete s[a],n.pop();else if(rfe(l))ahe(l,t,n,r,i),n.pop();else if(!she({value:l,schemaProp:e,schema:t,object:s,key:a,dataPath:n,format:r,oneOfPath:i})){if(void 0===(null==e?void 0:e.format)&&void 0!==(null==e?void 0:e.oneOf))for(const[t,n]of e.oneOf.entries())if(void 0!==(null==n?void 0:n.format)){e=n;break}s[a]=ohe(l,e.format,r),n.pop()}}return s},lhe=(e,t,n=Eoe)=>{let r;r=rfe(t)?Yfe({},t):Array.isArray(t)?[...t]:t;const i=rfe(e)?e:Sde(e);if(!i.properties&&!i.items&&!i.format)throw new Sse("Invalid json schema for formatting");return ahe(r,i,[],n)},che="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",uhe=e=>{let t;return t="bigint"==typeof e||"number"==typeof e?fle(e.toString()):Array.isArray(e)?new Uint8Array(e):"string"!=typeof e||gde(e)?hfe(e):fle(e),mfe(Dle(zde(t)))},dhe=e=>{let t;t="string"==typeof e?e.startsWith("0x")&&gde(e)?gfe(e):fle(e):e;const n=uhe(t);return n===che?void 0:n},fhe=e=>{const t=dhe(e);return nfe(t)?che:t},hhe=(e,t)=>{const n=/^(\d+).*$/.exec(e.slice(t));return n?parseInt(n[1],10):0},phe=e=>e.toString(2).length,mhe=(e,t)=>{const n=t.toString();if("string"===e){if("string"==typeof t)return _fe(t);throw new Cae(t)}if("bool"===e||"boolean"===e){if("boolean"==typeoft)return t?"01":"00";throw new jae(t)}if("address"===e){if(!qde(n))throw new wae(n);return n}const r=(e=>e.startsWith("int[")?`int256${e.slice(3)}`:"int"===e?"int256":e.startsWith("uint[")?`uint256'${e.slice(4)}`:"uint"===e?"uint256":e)(e);if(e.startsWith("uint")){const e=hhe(r,4);if(e%8||e<8||e>256)throw new Nae(n);const t=Pfe(n);if(phe(t)>e)throw new Tae(n);if(t<BigInt(0))throw new Oae(n);return e?ehe(t.toString(16),e/8*2):t.toString(16)}if(e.startsWith("int")){const t=hhe(r,3);if(t%8||t<8||t>256)throw new Nae(e);const i=Pfe(n);if(phe(i)>t)throw new Tae(n);return i<BigInt(0)?the(i.toString(),t/8*2):t?ehe(i.toString(16),t/4):i.toString(16)}if("bytes"===r){if(n.replace(/^0x/i,"").length%2!=0)throw new xae(n);return n}if(e.startsWith("bytes")){if(n.replace(/^0x/i,"").length%2!=0)throw new xae(n);const t=hhe(e,5);if(!t||t<1||t>64||t<n.replace(/^0x/i,"").length/2)throw new xae(n);return Qfe(n,2*t)}return""},ghe=e=>{const[t,n]=(e=>{if(Array.isArray(e))thrownew Error("Autodetection of array types is not supported.");let t,n;if("object"==typeof e&&("t"in e||"type"in e)&&("v"ine||"value"in e))t="t"in e?e.t:e.type,n="v"in e?e.v:e.value,t="bigint"===t.toLowerCase()?"int":t;else{if("bigint"==typeofe)return["int",e];t=Tfe(e,!0),n=Tfe(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")}return!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof n||/^(-)?0x/i.test(n)||(n=Mfe(n)),[t,n]})(e);if(Array.isArray(n)){return n.map((e=>mhe(t,e).replace("0x",""))).join("")}return mhe(t,n).replace("0x","")},vhe=(...e)=>`0x${e.map(ghe).join("").toLowerCase()}`;const yhe=e=>ble(e);var bhe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};function xhe(e){return("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function _he(e,t,n){return bhe(this,void 0,void 0,(function*(){let r;const i=yield Promise.race([e instanceof Promise?e:e(),new Promise(((e,i)=>{r=setTimeout((()=>n?i(n):e(void 0)),t)}))]);if(r&&clearTimeout(r),i instanceof Error)throw i;return i}))}function whe(e,t){let n;return[new Promise(((r,i)=>{n=setInterval(function o(){return(()=>{bhe(this,void 0,void 0,(function*(){try{const i=yield _he(e,t);nfe(i)||(clearInterval(n),r(i))}catch(o){clearInterval(n),i(o)}}))})(),o}(),t)})),n]}function Che(e,t){let n;const r=new Promise(((r,i)=>{n=setTimeout((()=>{i(t)}),e)}));return[n,r]}function khe(e,t){let n;const r=new Promise(((r,i)=>{n=setInterval((()=>{(()=>{bhe(this,void 0,void 0,(function*(){const t=yield e();t&&(clearInterval(n),i(t))}))})()}),t)}));return[n,r]}const She=()=>{const e=yhe(16);e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=mfe(e);return[t.substring(2,10),t.substring(10,14),t.substring(14,18),t.substring(18,22),t.substring(22,34)].join("-")},Ehe=e=>{const t=e.error.code;return Vae.has(t)||t>=-32099&&t<=-32e3},Ahe=e=>!Array.isArray(e)&&!!e&&"2.0"===e.jsonrpc&&"result"in e&&nfe(e.error)&&("number"==typeof e.id||"string"==typeof e.id),jhe=e=>!Array.isArray(e)&&"2.0"===e.jsonrpc&&!!e&&nfe(e.result)&&"error"in e&&("number"==typeof e.id||"string"==typeof e.id),Ohe=e=>!(Array.isArray(e)||!e||"2.0"!==e.jsonrpc||nfe(e.params)||nfe(e.method)),Nhe=e=>!Array.isArray(e)&&!!e&&"2.0"===e.jsonrpc&&"id"in e&&"result"in e,The=e=>Ahe(e)||jhe(e),Phe=e=>Array.isArray(e)?e.every(The):The(e),Mhe=e=>Array.isArray(e)&&e.length>0&&Phe(e);let Ihe;const Lhe=e=>{Ihe=e},Rhe=e=>{var t,n,r,i;return void 0!==Ihe&&(Ihe+=1),{jsonrpc:null!==(t=e.jsonrpc)&&void 0!==t?t:"2.0",id:null!==(r=null!==(n=e.id)&&void 0!==n?n:Ihe)&&void 0!==r?r:She(),method:e.method,params:null!==(i=e.params)&&void 0!==i?i:void 0}},Dhe=e=>e.map((e=>Rhe(e))),Bhe=e=>Array.isArray(e)&&e.length>0,Fhe=Object.freeze(Object.defineProperty({__proto__:null,isBatchRequest:Bhe,isBatchResponse:Mhe,isResponseRpcError:Ehe,isResponseWithError:jhe,isResponseWithNotification:Ohe,isResponseWithResult:Ahe,isSubscriptionResult:Nhe,isValidResponse:Phe,setRequestIdStart:Lhe,toBatchPayload:Dhe,toPayload:Rhe,validateResponse:The},Symbol.toStringTag,{value:"Module"}));var Hhe,zhe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class Vhe{constructor({timeout:e,eagerStart:t,timeoutMessage:n}={timeout:0,eagerStart:!1,timeoutMessage:"DeferredPromise timed out"}){this[Hhe]="Promise",this._state="pending",this._promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t})),this._timeoutMessage=n,this._timeoutInterval=e,t&&this.startTimer()}get state(){return this._state}then(e,t){return zhe(this,void 0,void 0,(function*(){return this._promise.then(e,t)}))}catch(e){return zhe(this,void 0,void 0,(function*(){return this._promise.catch(e)}))}finally(e){return zhe(this,void 0,void 0,(function*(){return this._promise.finally(e)}))}resolve(e){this._resolve(e),this._state="fulfilled",this._clearTimeout()}reject(e){this._reject(e),this._state="rejected",this._clearTimeout()}startTimer(){this._timeoutInterval&&this._timeoutInterval>0&&(this._timeoutId=setTimeout(this._checkTimeout.bind(this),this._timeoutInterval))}_checkTimeout(){"pending"===this._state&&this._timeoutId&&this.reject(newAse(this._timeoutMessage))}_clearTimeout(){this._timeoutId&&clearTimeout(this._timeoutId)}}Hhe=Symbol.toStringTag;class Uhe{constructor(e,t){this.eventEmitter=e,this.autoReconnect=t,this.chunkTimeout=15e3}clearQueues(){"function"==typeof this._clearQueues&&this._clearQueues()}onError(e){this._clearQueues=e}parseResponse(e){const t=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((e=>{let n,r=e;this.lastChunk&&(r=this.lastChunk+r);try{n=JSON.parse(r)}catch(_k){return this.lastChunk=r,this.lastChunkTimeout&&clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.autoReconnect||(this.clearQueues(),this.eventEmitter.emit("error",new Lae({id:1,jsonrpc:"2.0",error:{code:2,message:"Chunk timeout"}})))}),this.chunkTimeout))}clearTimeout(this.lastChunkTimeout),this.lastChunk=void 0,n&&t.push(n)})),t}}var Ghe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class Whe extends Loe{constructor(){super(...arguments),this._eventEmitter=new G6,this._chainId="",this._accounts=[]}_getChainId(){return Ghe(this,void 0,void 0,(function*(){var e;const t=yield this.request(Rhe({method:"eth_chainId",params:[]}));return null!==(e=null==t?void 0:t.result)&&void 0!==e?e:""}))}_getAccounts(){return Ghe(this,void 0,void 0,(function*(){var e;const t=yield this.request(Rhe({method:"eth_accounts",params:[]}));return null!==(e=null==t?void 0:t.result)&&void 0!==e?e:[]}))}_onConnect(){Promise.all([this._getChainId().then((e=>{e!==this._chainId&&(this._chainId=e,this._eventEmitter.emit("chainChanged",this._chainId))})).catch((e=>{})),this._getAccounts().then((e=>{this._accounts.length===e.length&&e.every((t=>e.includes(t)))||(this._accounts=e,this._onAccountsChanged())})).catch((e=>{}))]).then((()=>this._eventEmitter.emit("connect",{chainId:this._chainId}))).catch((e=>{}))}_onDisconnect(e,t){this._eventEmitter.emit("disconnect",new zae(e,t))}_onAccountsChanged(){this._eventEmitter.emit("accountsChanged",this._accounts)}}var qhe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Zhe={autoReconnect:!0,delay:5e3,maxAttempts:5};class Xhe extends Whe{get SocketConnection(){return this._socketConnection}constructor(e,t,n){if(super(),this._connectionStatus="connecting",this._onMessageHandler=this._onMessage.bind(this),this._onOpenHandler=this._onConnect.bind(this),this._onCloseHandler=this._onCloseEvent.bind(this),this._onErrorHandler=this._onError.bind(this),!this._validateProviderPath(e))throw new Pse(e);this._socketPath=e,this._socketOptions=t,this._reconnectOptions=Object.assign(Object.assign({},Zhe),null!=n?n:{}),this._pendingRequestsQueue=new Map,this._sentRequestsQueue=new Map,this._init(),this.connect(),this.chunkResponseParser=new Uhe(this._eventEmitter,this._reconnectOptions.autoReconnect),this.chunkResponseParser.onError((()=>{this._clearQueues()})),this.isReconnecting=!1}_init(){this._reconnectAttempts=0}connect(){try{this._openSocketConnection(),this._connectionStatus="connecting",this._addSocketListeners()}catch(_k){if(!this.isReconnecting)throw this._connectionStatus="disconnected",_k&&_k.message?new fse(`Error while connecting to ${this._socketPath}. Reason: ${_k.message}`):new Pse(this._socketPath);setImmediate((()=>{this._reconnect()}))}}_validateProviderPath(e){return!!e}getPendingRequestQueueSize(){return this._pendingRequestsQueue.size}getSentRequestsQueueSize(){return this._sentRequestsQueue.size}supportsSubscriptions(){return!0}on(e,t){this._eventEmitter.on(e,t)}once(e,t){this._eventEmitter.once(e,t)}removeListener(e,t){this._eventEmitter.removeListener(e,t)}_onDisconnect(e,t){this._connectionStatus="disconnected",super._onDisconnect(e,t)}disconnect(e,t){const n=null!=e?e:1e3;this._removeSocketListeners(),"disconnected"!==this.getStatus()&&this._closeSocketConnection(n,t),this._onDisconnect(n,t)}safeDisconnect(e,t){return qhe(this,arguments,void 0,(function*(e,t,n=!1,r=1e3){let i=0;yield(()=>qhe(this,void 0,void 0,(function*(){return new Promise((e=>{const t=setInterval((()=>{n&&i>=5&&this.clearQueues(),0===this.getPendingRequestQueueSize()&&0===this.getSentRequestsQueueSize()&&(clearInterval(t),e(!0)),i+=1}),r)}))})))(),this.disconnect(e,t)}))}removeAllListeners(e){this._eventEmitter.removeAllListeners(e)}_onError(e){this.isReconnecting?this._reconnect():this._eventEmitter.emit("error",e)}reset(){this._sentRequestsQueue.clear(),this._pendingRequestsQueue.clear(),this._init(),this._removeSocketListeners(),this._addSocketListeners()}_reconnect(){this.isReconnecting||(this.isReconnecting=!0,this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach(((e,t)=>{e.deferredPromise.reject(new mse),this._sentRequestsQueue.delete(t)})),this._reconnectAttempts<this._reconnectOptions.maxAttempts?(this._reconnectAttempts+=1,setTimeout((()=>{this._removeSocketListeners(),this.connect(),this.isReconnecting=!1}),this._reconnectOptions.delay)):(this.isReconnecting=!1,this._clearQueues(),this._removeSocketListeners(),this._eventEmitter.emit("error",new pse(this._reconnectOptions.maxAttempts))))}request(e){return qhe(this,void 0,void 0,(function*(){if(Xfe(this._socketConnection))throw new Error("Connection is undefined");"disconnected"===this.getStatus()&&this.connect();const t=Bhe(e)?e[0].id:e.id;if(!t)throw new Ise("Request Id not defined");if(this._sentRequestsQueue.has(t))throw new gse(t);const n=new Vhe;n.catch((e=>{this._eventEmitter.emit("error",e)}));const r={payload:e,deferredPromise:n};if("connecting"===this.getStatus())return this._pendingRequestsQueue.set(t,r),r.deferredPromise;this._sentRequestsQueue.set(t,r);try{this._sendToSocket(r.payload)}catch(i){this._sentRequestsQueue.delete(t),this._eventEmitter.emit("error",i)}return n}))}_onConnect(){this._connectionStatus="connected",this._reconnectAttempts=0,super._onConnect(),this._sendPendingRequests()}_sendPendingRequests(){for(const[t,n]of this._pendingRequestsQueue.entries())try{this._sendToSocket(n.payload),this._pendingRequestsQueue.delete(t),this._sentRequestsQueue.set(t,n)}catch(e){this._pendingRequestsQueue.delete(t),this._eventEmitter.emit("error",e)}}_onMessage(e){const t=this._parseResponses(e);if(!Xfe(t)&&0!==t.length)for(const n of t){if(Ohe(n)&&n.method.endsWith("_subscription"))return void this._eventEmitter.emit("message",n);const e=Mhe(n)?n[0].id:n.id,t=this._sentRequestsQueue.get(e);if(!t)return;(Mhe(n)||Ahe(n)||jhe(n))&&(this._eventEmitter.emit("message",n),t.deferredPromise.resolve(n)),this._sentRequestsQueue.delete(e)}}clearQueues(e){this._clearQueues(e)}_clearQueues(e){this._pendingRequestsQueue.size>0&&this._pendingRequestsQueue.forEach(((t,n)=>{t.deferredPromise.reject(new hse(e)),this._pendingRequestsQueue.delete(n)})),this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach(((t,n)=>{t.deferredPromise.reject(new hse(e)),this._sentRequestsQueue.delete(n)})),this._removeSocketListeners()}}const Khe=Object.freeze(Object.defineProperty({__proto__:null,ChunkResponseParser:Uhe,Eip1193Provider:Whe,EventEmitter:Rfe,SocketProvider:Xhe,Web3DeferredPromise:Vhe,asciiToHex:Afe,bytesToHex:mfe,bytesToUint8Array:hfe,checkAddressCheckSum:Ffe,compareBlockNumbers:(e,t)=>{const n="string"==typeof e&&Jde(e),r="string"==typeof t&&Jde(t);if(e===t||("earliest"===e||0===e)&&("earliest"===t||0===t))return 0;if("earliest"===e)return-1;if("earliest"===t)return 1;if(n&&r){const n={[joe.EARLIEST]:1,[joe.FINALIZED]:2,[joe.SAFE]:3,[joe.LATEST]:4,[joe.PENDING]:5};return n[e]<n[t]?-1:1}if(n&&!r||!n&&r)throw new Pae("Cannot compare blocktag with provided non-blocktag input.");const i=BigInt(e),o=BigInt(t);return i<o?-1:i===o?0:1},convert:ahe,convertScalarValue:ohe,encodePacked:vhe,ethUnitMap:ffe,format:lhe,fromAscii:jfe,fromDecimal:xfe,fromTwosComplement:(e,t=64)=>{lfe.validate(["int"],[e]);const n=Pfe(e);if(n<0)return n;const r=Math.ceil(Math.log(Number(n))/Math.log(2));if(r>4*t)throw new Aae(`value: "${e}", nibbleWidth: "${t}"`);if(4*t!==r)return n;const i=Zde(BigInt(2),BigInt(t)*BigInt(4));return Pfe(BigInt(n)-i)},fromUtf8:wfe,fromWei:(e,t)=>{let n;if("string"==typeof t){if(n=ffe[t],!n)throw new kae(t)}else{if(t<0||!Number.isInteger(t))throw new Sae(t);n=Zde(BigInt(10),BigInt(t))}const r=String(Pfe(e)),i=n.toString().length-1;if(i<=0)return r.toString();const o=r.padStart(i,"0"),s=o.slice(0,-i),a=o.slice(-i).replace(/\.?0+$/,"");if(""===s)return a?`0.${a}`:"0";if(""===a)return s;return`${s}.${a}`.slice(0,s.length+i+1)},getStorageSlotNumForLongString:e=>dhe(`0x${("number"==typeof e?e.toString():e).padStart(64,"0")}`),hexToAscii:Ofe,hexToBytes:gfe,hexToNumber:vfe,hexToNumberString:e=>vfe(e).toString(),hexToString:Efe,hexToUtf8:kfe,isAddress:Hfe,isBatchRequest:Bhe,isBatchResponse:Mhe,isBloom:zfe,isContractAddressInBloom:Gfe,isContractInitOptions:Zfe,isDataFormat:rhe,isHex:Bfe,isHexStrict:Dfe,isInBloom:Vfe,isNullish:Xfe,isPromise:xhe,isResponseRpcError:Ehe,isResponseWithError:jhe,isResponseWithNotification:Ohe,isResponseWithResult:Ahe,isSubscriptionResult:Nhe,isTopic:Wfe,isTopicInBloom:qfe,isUint8Array:cfe,isUserEthereumAddressInBloom:Ufe,isValidResponse:Phe,jsonRpc:Fhe,keccak256:uhe,keccak256Wrapper:uhe,leftPad:ehe,mergeDeep:Yfe,numberToHex:bfe,padLeft:$fe,padRight:Jfe,pollTillDefined:function(e,t){return bhe(this,void 0,void 0,(function*(){return whe(e,t)[0]}))},pollTillDefinedAndReturnIntervalId:whe,processSolidityEncodePackedArgs:ghe,randomBytes:yhe,randomHex:e=>mfe(yhe(e)),rejectIfConditionAtInterval:khe,rejectIfTimeout:Che,rightPad:Qfe,setRequestIdStart:Lhe,sha3:dhe,sha3Raw:fhe,soliditySha3:(...e)=>dhe(vhe(...e)),soliditySha3Raw:(...e)=>fhe(vhe(...e)),stringToHex:Cfe,toAscii:Nfe,toBatchPayload:Dhe,toBigInt:Mfe,toBool:Lfe,toChecksumAddress:Ife,toDecimal:yfe,toHex:Tfe,toNumber:Pfe,toPayload:Rhe,toTwosComplement:the,toUtf8:e=>"string"==typeof e?kfe(e):(lfe.validate(["bytes"],[e]),Rle(e)),toWei:(e,t)=>{let n;if(lfe.validate(["number"],[e]),"string"==typeof t){if(n=ffe[t],!n)throw new kae(t)}else{if(t<0||!Number.isInteger(t))throw new Sae(t);n=Zde(BigInt(10),BigInt(t))}let r=e;"number"==typeof r&&(r=r>1e20?BigInt(r):r.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20}));const[i,o]=String("string"!=typeof r||gde(r)?Pfe(r):r).split(".").concat(""),s=BigInt(`${i}${o}`)*n,a=o.length;return 0===a?s.toString():s.toString().slice(0,-a)},uint8ArrayConcat:ufe,uint8ArrayEquals:dfe,utf8ToBytes:Sfe,utf8ToHex:_fe,uuidV4:She,validateResponse:The,waitWithTimeout:_he},Symbol.toStringTag,{value:"Module"}));class Yhe{constructor(){this._emitter=new Rfe}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,t){this._emitter.emit(e,t)}listenerCount(e){return this._emitter.listenerCount(e)}listeners(e){return this._emitter.listeners(e)}eventNames(){return this._emitter.eventNames()}removeAllListeners(){return this._emitter.removeAllListeners()}setMaxListenerWarningThreshold(e){this._emitter.setMaxListeners(e)}getMaxListeners(){return this._emitter.getMaxListeners()}}var $he;($he||($he={})).CONFIG_CHANGE="CONFIG_CHANGE";class Jhe extends Yhe{constructor(e){super(),this.config={handleRevert:!1,defaultAccount:void 0,defaultBlock:"latest",transactionBlockTimeout:50,transactionConfirmationBlocks:24,transactionPollingInterval:1e3,transactionPollingTimeout:75e4,transactionReceiptPollingInterval:void 0,transactionSendTimeout:75e4,transactionConfirmationPollingInterval:void 0,blockHeaderTimeout:10,maxListenersWarningThreshold:100,contractDataInputFill:"data",defaultNetworkId:void 0,defaultChain:"mainnet",defaultHardfork:"london",defaultCommon:void 0,defaultTransactionType:"0x2",defaultMaxPriorityFeePerGas:Tfe(25e8),enableExperimentalFeatures:{useSubscriptionWhenCheckingBlockTimeout:!1,useRpcCallSpecification:!1},transactionBuilder:void 0,transactionTypeParser:void 0,customTransactionSchema:void 0,defaultReturnFormat:Eoe,ignoreGasPricing:!1},this.setConfig(null!=e?e:{})}setConfig(e){const t=Object.keys(e);for(const n of t)this._triggerConfigChange(n,e[n]),Xfe(e[n])||"number"!=typeof e[n]||"maxListenersWarningThreshold"!==n||this.setMaxListenerWarningThreshold(Number(e[n]));Object.assign(this.config,e)}get handleRevert(){return this.config.handleRevert}set handleRevert(e){this._triggerConfigChange("handleRevert",e),this.config.handleRevert=e}get contractDataInputFill(){return this.config.contractDataInputFill}set contractDataInputFill(e){this._triggerConfigChange("contractDataInputFill",e),this.config.contractDataInputFill=e}get defaultAccount(){return this.config.defaultAccount}set defaultAccount(e){this._triggerConfigChange("defaultAccount",e),this.config.defaultAccount=e}get defaultBlock(){return this.config.defaultBlock}set defaultBlock(e){this._triggerConfigChange("defaultBlock",e),this.config.defaultBlock=e}get transactionSendTimeout(){return this.config.transactionSendTimeout}set transactionSendTimeout(e){this._triggerConfigChange("transactionSendTimeout",e),this.config.transactionSendTimeout=e}get transactionBlockTimeout(){return this.config.transactionBlockTimeout}set transactionBlockTimeout(e){this._triggerConfigChange("transactionBlockTimeout",e),this.config.transactionBlockTimeout=e}get transactionConfirmationBlocks(){return this.config.transactionConfirmationBlocks}set transactionConfirmationBlocks(e){this._triggerConfigChange("transactionConfirmationBlocks",e),this.config.transactionConfirmationBlocks=e}get transactionPollingInterval(){return this.config.transactionPollingInterval}set transactionPollingInterval(e){this._triggerConfigChange("transactionPollingInterval",e),this.config.transactionPollingInterval=e,this.transactionReceiptPollingInterval=e,this.transactionConfirmationPollingInterval=e}get transactionPollingTimeout(){return this.config.transactionPollingTimeout}set transactionPollingTimeout(e){this._triggerConfigChange("transactionPollingTimeout",e),this.config.transactionPollingTimeout=e}get transactionReceiptPollingInterval(){return this.config.transactionReceiptPollingInterval}set transactionReceiptPollingInterval(e){this._triggerConfigChange("transactionReceiptPollingInterval",e),this.config.transactionReceiptPollingInterval=e}get transactionConfirmationPollingInterval(){return this.config.transactionConfirmationPollingInterval}set transactionConfirmationPollingInterval(e){this._triggerConfigChange("transactionConfirmationPollingInterval",e),this.config.transactionConfirmationPollingInterval=e}get blockHeaderTimeout(){return this.config.blockHeaderTimeout}set blockHeaderTimeout(e){this._triggerConfigChange("blockHeaderTimeout",e),this.config.blockHeaderTimeout=e}get enableExperimentalFeatures(){return this.config.enableExperimentalFeatures}set enableExperimentalFeatures(e){this._triggerConfigChange("enableExperimentalFeatures",e),this.config.enableExperimentalFeatures=e}get maxListenersWarningThreshold(){return this.config.maxListenersWarningThreshold}set maxListenersWarningThreshold(e){this._triggerConfigChange("maxListenersWarningThreshold",e),this.setMaxListenerWarningThreshold(e),this.config.maxListenersWarningThreshold=e}get defaultReturnFormat(){return this.config.defaultReturnFormat}set defaultReturnFormat(e){this._triggerConfigChange("defaultReturnFormat",e),this.config.defaultReturnFormat=e}get defaultNetworkId(){return this.config.defaultNetworkId}set defaultNetworkId(e){this._triggerConfigChange("defaultNetworkId",e),this.config.defaultNetworkId=e}get defaultChain(){return this.config.defaultChain}set defaultChain(e){if(!Xfe(this.config.defaultCommon)&&!Xfe(this.config.defaultCommon.baseChain)&&e!==this.config.defaultCommon.baseChain)throw new Dae(this.config.defaultChain,e);this._triggerConfigChange("defaultChain",e),this.config.defaultChain=e}get defaultHardfork(){return this.config.defaultHardfork}set defaultHardfork(e){if(!Xfe(this.config.defaultCommon)&&!Xfe(this.config.defaultCommon.hardfork)&&e!==this.config.defaultCommon.hardfork)throw new Rae(this.config.defaultCommon.hardfork,e);this._triggerConfigChange("defaultHardfork",e),this.config.defaultHardfork=e}get defaultCommon(){return this.config.defaultCommon}set defaultCommon(e){if(!Xfe(this.config.defaultHardfork)&&!Xfe(e)&&!Xfe(e.hardfork)&&this.config.defaultHardfork!==e.hardfork)throw new Rae(this.config.defaultHardfork,e.hardfork);if(!Xfe(this.config.defaultChain)&&!Xfe(e)&&!Xfe(e.baseChain)&&this.config.defaultChain!==e.baseChain)throw new Dae(this.config.defaultChain,e.baseChain);this._triggerConfigChange("defaultCommon",e),this.config.defaultCommon=e}get ignoreGasPricing(){return this.config.ignoreGasPricing}set ignoreGasPricing(e){this._triggerConfigChange("ignoreGasPricing",e),this.config.ignoreGasPricing=e}get defaultTransactionType(){return this.config.defaultTransactionType}set defaultTransactionType(e){this._triggerConfigChange("defaultTransactionType",e),this.config.defaultTransactionType=e}get defaultMaxPriorityFeePerGas(){return this.config.defaultMaxPriorityFeePerGas}set defaultMaxPriorityFeePerGas(e){this._triggerConfigChange("defaultMaxPriorityFeePerGas",e),this.config.defaultMaxPriorityFeePerGas=e}get transactionBuilder(){return this.config.transactionBuilder}set transactionBuilder(e){this._triggerConfigChange("transactionBuilder",e),this.config.transactionBuilder=e}get transactionTypeParser(){return this.config.transactionTypeParser}set transactionTypeParser(e){this._triggerConfigChange("transactionTypeParser",e),this.config.transactionTypeParser=e}get customTransactionSchema(){return this.config.customTransactionSchema}set customTransactionSchema(e){this._triggerConfigChange("customTransactionSchema",e),this.config.customTransactionSchema=e}_triggerConfigChange(e,t){this.emit($he.CONFIG_CHANGE,{name:e,oldValue:this.config[e],newValue:t})}}var Qhe={exports:{}};!function(e,t){var n,r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==x&&x,i=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==x&&x||{},r="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,o="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(_k){return!1}}(),s="FormData"in t,a="ArrayBuffer"in t;if(a)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid characterin header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function m(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=p(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(o)return this.blob().then(g);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,r,i,o=p(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=m(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=d(t)},h.prototype.forEach=function(e,t){for(var n inthis.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(e,n){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,i,o=(n=n||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new h(n.headers)),this.method=(r=n.method||this.method||"GET",i=r.toUpperCase(),b.indexOf(i)>-1?i:r),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function C(e,t){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},C.error=function(){var e=new C(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var k=[301,302,303,307,308];C.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new C(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(MJe){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(n,r){return new Promise((function(i,s){var l=new _(n,r);if(l.signal&&l.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function f(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{t.append(r,i)}catch(o){}}})),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var r="response"in c?c.response:c.responseText;setTimeout((function(){i(new C(r,n))}),0)},c.onerror=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){s(new TypeError("Network request timed out"))}),0)},c.onabort=function(){setTimeout((function(){s(new e.DOMException("Aborted","AbortError"))}),0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(_k){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(o?c.responseType="blob":a&&(c.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof h||t.Headers&&r.headers instanceof t.Headers)){var p=[];Object.getOwnPropertyNames(r.headers).forEach((function(e){p.push(u(e)),c.setRequestHeader(e,d(r.headers[e]))})),l.headers.forEach((function(e,t){-1===p.indexOf(t)&&c.setRequestHeader(t,e)}))}else l.headers.forEach((function(e,t){c.setRequestHeader(t,e)}));l.signal&&(l.signal.addEventListener("abort",f),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",f)}),c.send(void 0===l._bodyInit?null:l._bodyInit)}))}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=_,t.Response=C),e.Headers=h,e.Request=_,e.Response=C,e.fetch=S}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=r.fetch?r:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(Qhe,Qhe.exports);const epe=_(Qhe.exports);var tpe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class npe extends Loe{constructor(e,t){if(super(),!npe.validateClientUrl(e))throw new Pse(e);this.clientUrl=e,this.httpProviderOptions=t}static validateClientUrl(e){return"string"==typeof e&&/^http(s)?:\/\//i.test(e)}getStatus(){throw new Ese}supportsSubscriptions(){return!1}request(e,t){var n;return tpe(this,void 0,void 0,(function*(){const r=Object.assign(Object.assign({},null===(n=this.httpProviderOptions)||void 0===n?void 0:n.providerOptions),t),i=yield epe(this.clientUrl,Object.assign(Object.assign({},r),{method:"POST",headers:Object.assign(Object.assign({},r.headers),{"Content-Type":"application/json"}),body:JSON.stringify(e)}));if(!i.ok)throw new Iae(yield i.json(),void 0,void 0,i.status);return yield i.json()}))}on(){throw new Ese}removeListener(){throw new Ese}once(){throw new Ese}removeAllListeners(){throw new Ese}connect(){throw new Ese}disconnect(){throw new Ese}reset(){throw new Ese}reconnect(){throw new Ese}}var rpe=null;"undefined"!=typeof WebSocket?rpe=WebSocket:"undefined"!=typeof MozWebSocket?rpe=MozWebSocket:"undefined"!=typeof global?rpe=global.WebSocket||global.MozWebSocket:"undefined"!=typeof window?rpe=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(rpe=self.WebSocket||self.MozWebSocket);const ipe=rpe;class ope extends Xhe{constructor(e,t,n){super(e,t,n)}_validateProviderPath(e){return"string"==typeof e&&/^ws(s)?:\/\//i.test(e)}getStatus(){if(this._socketConnection&&!Xfe(this._socketConnection))switch(this._socketConnection.readyState){case this._socketConnection.CONNECTING:return"connecting";case this._socketConnection.OPEN:return"connected";default:return"disconnected"}return"disconnected"}_openSocketConnection(){this._socketConnection=new ipe(this._socketPath,void0,this._socketOptions&&0===Object.keys(this._socketOptions).length?void 0:this._socketOptions)}_closeSocketConnection(e,t){var n;null===(n=this._socketConnection)||void 0===n||n.close(e,t)}_sendToSocket(e){var t;if("disconnected"===this.getStatus())throw new hse;null===(t=this._socketConnection)||void 0===t||t.send(JSON.stringify(e))}_parseResponses(e){return this.chunkResponseParser.parseResponse(e.data)}_addSocketListeners(){var e,t,n,r;null===(e=this._socketConnection)||void 0===e||e.addEventListener("open",this._onOpenHandler),null===(t=this._socketConnection)||void 0===t||t.addEventListener("message",this._onMessageHandler),null===(n=this._socketConnection)||void 0===n||n.addEventListener("close",(e=>this._onCloseHandler(e))),null===(r=this._socketConnection)||void 0===r||r.addEventListener("error",this._onErrorHandler)}_removeSocketListeners(){var e,t,n;null===(e=this._socketConnection)||void 0===e||e.removeEventListener("message",this._onMessageHandler),null===(t=this._socketConnection)||void 0===t||t.removeEventListener("open",this._onOpenHandler),null===(n=this._socketConnection)||void 0===n||n.removeEventListener("close",this._onCloseHandler)}_onCloseEvent(e){var t;!this._reconnectOptions.autoReconnect||[1e3,1001].includes(e.code)&&e.wasClean?(this._clearQueues(e),this._removeSocketListeners(),this._onDisconnect(e.code,e.reason),null===(t=this._socketConnection)||void 0===t||t.removeEventListener("error",this._onErrorHandler)):this._reconnect()}}const spe=e=>Loe.isWeb3Provider(e),ape=e=>"string"!=typeof e&&"request"in e&&"Function"===e.request.constructor.name,lpe=e=>"string"!=typeof e&&"request"in e&&"AsyncFunction"===e.request.constructor.name,cpe=e=>"string"!=typeof e&&"send"in e,upe=e=>"string"!=typeof e&&"sendAsync"in e,dpe=e=>e&&(spe(e)||lpe(e)||ape(e)||upe(e)||cpe(e));var fpe,hpe,ppe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};(hpe=fpe||(fpe={})).PROVIDER_CHANGED="PROVIDER_CHANGED",hpe.BEFORE_PROVIDER_CHANGE="BEFORE_PROVIDER_CHANGE";const mpe={HttpProvider:npe,WebsocketProvider:ope};class gpe extends Yhe{constructor(e,t,n){super(),Xfe(e)||this.setProvider(e),this.useRpcCallSpecification=t,Xfe(n)||(this.middleware=n)}static get providers(){return mpe}get provider(){return this._provider}get providers(){return mpe}setProvider(e){let t;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))t=new this.providers.HttpProvider(e);else{if(!/^ws(s)?:\/\//i.test(e))throw new Tse(`Can't autodetect provider for "${e}"`);t=new this.providers.WebsocketProvider(e)}else t=Xfe(e)?void 0:e;return this.emit(fpe.BEFORE_PROVIDER_CHANGE,this._provider),this._provider=t,this.emit(fpe.PROVIDER_CHANGED,this._provider),!0}setMiddleware(e){this.middleware=e}send(e){return ppe(this,void 0,void 0,(function*(){const t=Object.assign({},e);let n=yield this._sendRequest(t);if(Xfe(this.middleware)||(n=yield this.middleware.processResponse(n)),Ahe(n))return n.result;throw new Iae(n)}))}sendBatch(e){return ppe(this,void 0,void 0,(function*(){return yield this._sendRequest(e)}))}_sendRequest(e){return ppe(this,void 0,void 0,(function*(){const{provider:t}=this;if(Xfe(t))throw new Tse("Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.");let n=Bhe(e)?Dhe(e):Rhe(e);if(Xfe(this.middleware)||(n=yield this.middleware.processRequest(n)),spe(t)){let e;try{e=yield t.request(n)}catch(r){e=r}return this._processJsonRpcResponse(n,e,{legacy:!1,error:!1})}if(lpe(t))return t.request(n).then((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!1}))).catch((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!0})));if(ape(t))return new Promise(((e,r)=>{const i=e=>{r(this._processJsonRpcResponse(n,e,{legacy:!0,error:!0}))},o=t=>e(this._processJsonRpcResponse(n,t,{legacy:!0,error:!1})),s=t.request(n,((e,t)=>e?i(e):o(t)));if(xhe(s)){s.then(o).catch((e=>{try{const t=this._processJsonRpcResponse(n,e,{legacy:!0,error:!0});r(t)}catch(t){r(t)}}))}}));if(cpe(t))returnnew Promise(((e,r)=>{t.send(n,((t,i)=>{if(t)return r(this._processJsonRpcResponse(n,t,{legacy:!0,error:!0}));if(Xfe(i))throw new Iae({},'Got a "nullish" response from provider.');return e(this._processJsonRpcResponse(n,i,{legacy:!0,error:!1}))}))}));if(upe(t))return t.sendAsync(n).then((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!1}))).catch((e=>this._processJsonRpcResponse(n,e,{legacy:!0,error:!0})));throw new Tse("Provider does not have a request or send method to use.")}))}_processJsonRpcResponse(e,t,{legacy:n,error:r}){if(Xfe(t))return this._buildResponse(e,null,r);if(jhe(t)){if(this.useRpcCallSpecification&&Ehe(t)){const e=t;if(Vae.get(e.error.code)){throw new(0,Vae.get(e.error.code).error)(e)}throw new Hae(e)}if(!gpe._isReverted(t))throw new Lae(t,e)}if(Ahe(t))return t;if(t instanceof Error)throw gpe._isReverted(t),t;if(!n&&Bhe(e)&&Mhe(t))return t;if(n&&!r&&Bhe(e))return t;if(n&&r&&Bhe(e))throw t;if(n&&!jhe(t)&&!Ahe(t))return this._buildResponse(e,t,r);if(Bhe(e)&&!Array.isArray(t))throw new Iae(t,"Got normal response for a batch request.");if(!Bhe(e)&&Array.isArray(t))throw new Iae(t,"Got batch response for a normal request.");throw new Iae(t,"Invalid response")}static _isReverted(e){let t;if(jhe(e)?t=e.error:e instanceof Error&&(t=e),null==t?void 0:t.message.includes("revert"))throw new xse(t);return!1}_buildResponse(e,t,n){const r={jsonrpc:"2.0",id:Bhe(e)?e[0].id:"id"in e?e.id:null};return n?Object.assign(Object.assign({},r),{error:t}):Object.assign(Object.assign({},r),{result:t})}}var vpe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class ype{constructor(e,t,n=!1){this.requestManager=e,this.registeredSubscriptions=t,this.tolerateUnlinkedSubscription=n,this._subscriptions=new Map,this.requestManager.on(fpe.BEFORE_PROVIDER_CHANGE,(()=>vpe(this,void 0,void 0,(function*(){yield this.unsubscribe()})))),this.requestManager.on(fpe.PROVIDER_CHANGED,(()=>{this.clear(),this.listenToProviderEvents()})),this.listenToProviderEvents()}listenToProviderEvents(){const e=this.requestManager.provider;this.requestManager.provider&&("function"!=typeof(null==e?void 0:e.supportsSubscriptions)||(null==e?void 0:e.supportsSubscriptions()))&&"function"==typeof this.requestManager.provider.on&&("function"==typeof this.requestManager.provider.request?this.requestManager.provider.on("message",(e=>this.messageListener(e))):e.on("data",(e=>this.messageListener(e))))}messageListener(e){var t,n,r;if(!e)throw new Mse("Should not call messageListener with no data. Type was");const i=(null===(t=e.params)||void 0===t?void 0:t.subscription)||(null===(n=e.data)||void 0===n?void 0:n.subscription)||(null===(r=e.id)||void 0===r?void 0:r.toString(16));if(i){const t=this._subscriptions.get(i);null==t||t.processSubscriptionData(e)}}subscribe(e,t){return vpe(this,arguments,void 0,(function*(e,t,n=Eoe){const r=this.registeredSubscriptions[e];if(!r)throw new Mse("Invalid subscription type");const i=new r(null!=t?t:void 0,{subscriptionManager:this,returnFormat:n});return yield this.addSubscription(i),i}))}get subscriptions(){return this._subscriptions}addSubscription(e){returnvpe(this,void 0,void 0,(function*(){if(!this.requestManager.provider)throw new Tse("Provider not available");if(!this.supportsSubscriptions())throw new Mse("The current provider does not support subscriptions");if(e.id&&this._subscriptions.has(e.id))throw new Mse(`Subscription with id "${e.id}" already exists`);if(yield e.sendSubscriptionRequest(),Xfe(e.id))throw new Mse("Subscription is not subscribed yet.");return this._subscriptions.set(e.id,e),e.id}))}removeSubscription(e){return vpe(this,void 0,void 0,(function*(){const{id:t}=e;if(Xfe(t))throw new Mse("Subscription is not subscribed yet. Or, had already been unsubscribed but not through the Subscription Manager.");if(!this._subscriptions.has(t)&&!this.tolerateUnlinkedSubscription)throw new Mse(`Subscription with id "${t.toString()}" does not exists`);return yield e.sendUnsubscribeRequest(),this._subscriptions.delete(t),t}))}unsubscribe(e){return vpe(this,void 0,void 0,(function*(){const t=[];for(const[n,r]of this.subscriptions.entries())(!e||"function"==typeof e&&e({id:n,sub:r}))&&t.push(this.removeSubscription(r));return Promise.all(t)}))}clear(){this._subscriptions.clear()}supportsSubscriptions(){return!Xfe(this.requestManager.provider)&&((e=this.requestManager.provider)&&"supportsSubscriptions"in e?e.supportsSubscriptions():!(!e||"string"==typeof e||!("on"in e)));var e}}var bpe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};classxpe extends Yhe{constructor(e,t){var n;super(),this.args=e;const{requestManager:r}=t,{subscriptionManager:i}=t;this._subscriptionManager=r?new ype(r,{},!0):i,this._returnFormat=null!==(n=null==t?void 0:t.returnFormat)&&void 0!==n?n:Eoe}get id(){return this._id}get lastBlock(){return this._lastBlock}subscribe(){return bpe(this,void 0,void 0,(function*(){return this._subscriptionManager.addSubscription(this)}))}processSubscriptionData(e){var t,n;(null==e?void 0:e.data)?this._processSubscriptionResult(null!==(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)&&void 0!==n?n:null==e?void 0:e.data):e&&Ohe(e)&&this._processSubscriptionResult(null==e?void 0:e.params.result)}sendSubscriptionRequest(){return bpe(this,void 0,void 0,(function*(){return this._id=yield this._subscriptionManager.requestManager.send({method:"eth_subscribe",params:this._buildSubscriptionParams()}),this.emit("connected",this._id),this._id}))}get returnFormat(){return this._returnFormat}get subscriptionManager(){return this._subscriptionManager}resubscribe(){return bpe(this,void 0,void 0,(function*(){yield this.unsubscribe(),yield this.subscribe()}))}unsubscribe(){return bpe(this,void 0,void 0,(function*(){this.id&&(yield this._subscriptionManager.removeSubscription(this))}))}sendUnsubscribeRequest(){return bpe(this,void 0,void 0,(function*(){yield this._subscriptionManager.requestManager.send({method:"eth_unsubscribe",params:[this.id]}),this._id=void 0}))}formatSubscriptionResult(e){return e}_processSubscriptionResult(e){this.emit("data",this.formatSubscriptionResult(e))}_processSubscriptionError(e){this.emit("error",e)}_buildSubscriptionParams(){throw new Error("Implement in the child class")}}var _pe=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(_k){o(_k)}}function a(e){try{l(r.throw(e))}catch(_k){o(_k)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class wpe extends Roe{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch(_k){return!_k||22!==_k.code&&1014!==_k.code&&"QuotaExceededError"!==_k.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==_k.name||nfe(e)||0===e.length?void 0:e}}create(e){for(let t=0;t<e;t+=1)this.add(this._accountProvider.create());return this}add(e){var t;if("string"==typeof e)return this.add(this._accountProvider.privateKeyToAccount(e));let n=this.length;return this.get(e.address)&&(n=null!==(t=this._addressMap.get(e.address.toLowerCase()))&&void 0!==t?t:n),this._addressMap.set(e.address.toLowerCase(),n),this[n]=e,this}get(e){if("string"==typeof e){const t=this._addressMap.get(e.toLowerCase());return nfe(t)?void 0:this[t]}return this[e]}remove(e){if("string"==typeof e){const t=this._addressMap.get(e.toLowerCase());return!nfe(t)&&(this._addressMap.delete(e.toLowerCase()),this.splice(t,1),!0)}return!!this[e]&&(this.splice(e,1),!0)}clear(){return this._addressMap.clear(),this.length=0,this}encrypt(e,t){return _pe(this,void 0,void 0,(function*(){return Promise.all(this.map((n=>_pe(this,void 0,void 0,(function*(){return n.encrypt(e,t)})))))}))}decrypt(e,t,n){return _pe(this,void 0,void 0,(function*(){const r=yield Promise.all(e.map((e=>_pe(this,void 0,void 0,(function*(){return this._accountProvider.decrypt(e,t,n)})))));for(const e of r)this.add(e);return this}))}save(e,t){return _pe(this,void 0,void 0,(function*(){const n=wpe.getStorage();if(!n)throw new Error("Local storage not available.");return n.setItem(null!=t?t:this._defaultKeyName,JSON.stringify(yield this.encrypt(e))),!0}))}load(e,t){return _pe(this,void 0,void 0,(function*(){const n=wpe.getStorage();if(!n)throw new Error("Local storage not available.");const r=n.getItem(null!=t?t:this._defaultKeyName);return r&&(yield this.decrypt(JSON.parse(r)||[],e)),this}))}}const Cpe={web:ole};function kpe(e,t,n){if(!n.startsWith("aes-"))throw new Error(`AES submodule doesn't support mode ${n}`);if(16!==t.length)throw new Error("AES: wrong IV length");if(n.startsWith("aes-128")&&16!==e.length||n.startsWith("aes-256")&&32!==e.length)throw new Error("AES: wrong key length")}function Spe(e,t,n){return g(this,null,(function*(){if(!Cpe.web)throw new Error("Browser crypto not available.");let r;if(["aes-128-cbc","aes-256-cbc"].includes(e)&&(r="cbc"),["aes-128-ctr","aes-256-ctr"].includes(e)&&(r="ctr"),!r)throw new Error("AES: unsupported mode");return[yield Cpe.web.subtle.importKey("raw",t,{name:`AES-${r.toUpperCase()}`,length:8*t.length},!0,["encrypt","decrypt"]),{name:`aes-${r}`,iv:n,counter:n,length:128}]}))}function Epe(e,t,n,r="aes-128-ctr",i=!0){return g(this,null,(function*(){if(kpe(t,n,r),Cpe.web){const[o,s]=yield Spe(r,t,n),a=yield Cpe.web.subtle.encrypt(s,o,e);let l=new Uint8Array(a);return i||"aes-cbc"!==s.name||e.length%16||(l=l.slice(0,-16)),l}if(Cpe.node){const o=Cpe.node.createCipheriv(r,t,n);return o.setAutoPadding(i),ple(o.update(e),o.final())}throw new Error("The environment doesn't have AES module")}))}function Ape(e,t,n,r="aes-128-ctr",i=!0){return g(this,null,(function*(){if(kpe(t,n,r),Cpe.web){const[o,s]=yield Spe(r,t,n);if(!i&&"aes-cbc"===s.name){const i=yield function(e,t,n,r){return g(this,null,(function*(){const i=e.slice(-16);for(let e=0;e<16;e++)i[e]^=16^n[e];return(yield Epe(i,t,n,r)).slice(0,16)}))}(e,t,n,r);e=ple(e,i)}const a=yield Cpe.web.subtle.decrypt(s,o,e),l=new Uint8Array(a);if("aes-cbc"===s.name){if(!function(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}(yield Epe(l,t,n,r),e))throw new Error("AES: wrong padding")}return l}if(Cpe.node){const o=Cpe.node.createDecipheriv(r,t,n);return o.setAutoPadding(i),ple(o.update(e),o.final())}throw new Error("The environment doesn't have AES module")}))}let jpe=class extends mle{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,qae(e);const n=hle(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),i.fill(0)}update(e){return Zae(this),this.iHash.update(e),this}digestInto(e){Zae(this),Wae(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const Ope=(e,t,n)=>new jpe(e,t).update(n).digest();function Npe(e,t,n,r){const{c:i,dkLen:o,DK:s,PRF:a,PRFSalt:l}=function(e,t,n,r){qae(e);const i=vle({dkLen:32,asyncTick:10},r),{c:o,dkLen:s,asyncTick:a}=i;if(Gae(o),Gae(s),Gae(a),o<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=hle(t),c=hle(n),u=new Uint8Array(s),d=Ope.create(e,l),f=d._cloneInto().update(c);return{c:o,dkLen:s,asyncTick:a,DK:u,PRF:d,PRFSalt:f}}(e,t,n,r);let c;const u=new Uint8Array(4),d=ale(u),f=new Uint8Array(a.outputLen);for(let h=1,p=0;p<o;h++,p+=a.outputLen){const e=s.subarray(p,p+a.outputLen);d.setInt32(0,h,!1),(c=l._cloneInto(c)).update(u).digestInto(f),e.set(f.subarray(0,e.length));for(let t=1;t<i;t++){a._cloneInto(c).update(f).digestInto(f);for(let t=0;t<e.length;t++)e[t]^=f[t]}}return function(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}(a,l,s,c,f)}Ope.create=(e,t)=>new jpe(e,t);const Tpe=(e,t,n)=>e&t^e&n^t&n;let Ppe=class extends mle{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=ale(this.buffer)}update(e){Zae(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=hle(e)).length;for(let o=0;o<i;){const s=Math.min(r-this.pos,i-o);if(s!==r)n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=ale(e);for(;r<=i-o;o+=r)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Zae(this),Xae(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(n,0),o=0);for(let u=o;u<r;u++)t[u]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),l=r?4:0,c=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+c,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=ale(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,c=this.get();if(l>c.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)s.setUint32(4*u,c[u],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=o,r%t&&e.buffer.set(n),e}};const Mpe=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]),Ipe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Lpe=newUint32Array(64);let Rpe=class extends Ppe{constructor(){super(64,32,8,!1),this.A=0|Ipe[0],this.B=0|Ipe[1],this.C=0|Ipe[2],this.D=0|Ipe[3],this.E=0|Ipe[4],this.F=0|Ipe[5],this.G=0|Ipe[6],this.H=0|Ipe[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let d=0;d<16;d++,t+=4)Lpe[d]=e.getUint32(t,!1);for(let d=16;d<64;d++){const e=Lpe[d-15],t=Lpe[d-2],n=lle(e,7)^lle(e,18)^e>>>3,r=lle(t,17)^lle(t,19)^t>>>10;Lpe[d]=r+Lpe[d-7]+n+Lpe[d-16]|0}let{A:n,B:r,C:i,D:o,E:s,F:a,G:l,H:c}=this;for(let d=0;d<64;d++){const e=c+(lle(s,6)^lle(s,11)^lle(s,25))+((u=s)&a^~u&l)+Mpe[d]+Lpe[d]|0,t=(lle(n,2)^lle(n,13)^lle(n,22))+Tpe(n,r,i)|0;c=l,l=a,a=s,s=o+e|0,o=i,i=r,r=n,n=e+t|0}var u;n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(n,r,i,o,s,a,l,c)}roundClean(){Lpe.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Dpe=yle((()=>new Rpe)),[Bpe,Fpe]=(()=>ile.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"].map((e=>BigInt(e)))))(),Hpe=new Uint32Array(80),zpe=new Uint32Array(80);let Vpe=class extends Ppe{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(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:l,El:c,Fh:u,Fl:d,Gh:f,Gl:h,Hh:p,Hl:m}=this;return[e,t,n,r,i,o,s,a,l,c,u,d,f,h,p,m]}set(e,t,n,r,i,o,s,a,l,c,u,d,f,h,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let y=0;y<16;y++,t+=4)Hpe[y]=e.getUint32(t),zpe[y]=e.getUint32(t+=4);for(let y=16;y<80;y++){const e=0|Hpe[y-15],t=0|zpe[y-15],n=ile.rotrSH(e,t,1)^ile.rotrSH(e,t,8)^ile.shrSH(e,t,7),r=ile.rotrSL(e,t,1)^ile.rotrSL(e,t,8)^ile.shrSL(e,t,7),i=0|Hpe[y-2],o=0|zpe[y-2],s=ile.rotrSH(i,o,19)^ile.rotrBH(i,o,61)^ile.shrSH(i,o,6),a=ile.rotrSL(i,o,19)^ile.rotrBL(i,o,61)^ile.shrSL(i,o,6),l=ile.add4L(r,a,zpe[y-7],zpe[y-16]),c=ile.add4H(l,n,s,Hpe[y-7],Hpe[y-16]);Hpe[y]=0|c,zpe[y]=0|l}let{Ah:n,Al:r,Bh:i,Bl:o,Ch:s,Cl:a,Dh:l,Dl:c,Eh:u,El:d,Fh:f,Fl:h,Gh:p,Gl:m,Hh:g,Hl:v}=this;for(let y=0;y<80;y++){const e=ile.rotrSH(u,d,14)^ile.rotrSH(u,d,18)^ile.rotrBH(u,d,41),t=ile.rotrSL(u,d,14)^ile.rotrSL(u,d,18)^ile.rotrBL(u,d,41),b=u&f^~u&p,x=d&h^~d&m,_=ile.add5L(v,t,x,Fpe[y],zpe[y]),w=ile.add5H(_,g,e,b,Bpe[y],Hpe[y]),C=0|_,k=ile.rotrSH(n,r,28)^ile.rotrBH(n,r,34)^ile.rotrBH(n,r,39),S=ile.rotrSL(n,r,28)^ile.rotrBL(n,r,34)^ile.rotrBL(n,r,39),E=n&i^n&s^i&s,A=r&o^r&a^o&a;g=0|p,v=0|m,p=0|f,m=0|h,f=0|u,h=0|d,({h:u,l:d}=ile.add(0|l,0|c,0|w,0|C)),l=0|s,c=0|a,s=0|i,a=0|o,i=0|n,o=0|r;const j=ile.add3L(C,S,A);n=ile.add3H(j,w,k,E),r=0|j}({h:n,l:r}=ile.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:o}=ile.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=ile.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:l,l:c}=ile.add(0|this.Dh,0|this.Dl,0|l,0|c)),({h:u,l:d}=ile.add(0|this.Eh,0|this.El,0|u,0|d)),({h:f,l:h}=ile.add(0|this.Fh,0|this.Fl,0|f,0|h)),({h:p,l:m}=ile.add(0|this.Gh,0|this.Gl,0|p,0|m)),({h:g,l:v}=ile.add(0|this.Hh,0|this.Hl,0|g,0|v)),this.set(n,r,i,o,s,a,l,c,u,d,f,h,p,m,g,v)}roundClean(){Hpe.fill(0),zpe.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const Upe=yle((()=>new Vpe));function Gpe(e,t,n,r,i){if(!["sha256","sha512"].includes(i))throw new Error("Only sha256 and sha512 are supported");return Lle(e),Lle(t),Npe("sha256"===i?Dpe:Upe,e,t,{c:n,dkLen:r})}function Wpe(e,t,n,r,i,o){let s=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],c=e[t++]^n[r++],u=e[t++]^n[r++],d=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],p=e[t++]^n[r++],m=e[t++]^n[r++],g=e[t++]^n[r++],v=e[t++]^n[r++],y=e[t++]^n[r++],b=e[t++]^n[r++],x=e[t++]^n[r++],_=e[t++]^n[r++],w=s,C=a,k=l,S=c,E=u,A=d,j=f,O=h,N=p,T=m,P=g,M=v,I=y,L=b,R=x,D=_;for(let B=0;B<8;B+=2)E^=cle(w+I|0,7),N^=cle(E+w|0,9),I^=cle(N+E|0,13),w^=cle(I+N|0,18),T^=cle(A+C|0,7),L^=cle(T+A|0,9),C^=cle(L+T|0,13),A^=cle(C+L|0,18),R^=cle(P+j|0,7),k^=cle(R+P|0,9),j^=cle(k+R|0,13),P^=cle(j+k|0,18),S^=cle(D+M|0,7),O^=cle(S+D|0,9),M^=cle(O+S|0,13),D^=cle(M+O|0,18),C^=cle(w+S|0,7),k^=cle(C+w|0,9),S^=cle(k+C|0,13),w^=cle(S+k|0,18),j^=cle(A+E|0,7),O^=cle(j+A|0,9),E^=cle(O+j|0,13),A^=cle(E+O|0,18),M^=cle(P+T|0,7),N^=cle(M+P|0,9),T^=cle(N+M|0,13),P^=cle(T+N|0,18),I^=cle(D+R|0,7),L^=cle(I+D|0,9),R^=cle(L+I|0,13),D^=cle(R+L|0,18);i[o++]=s+w|0,i[o++]=a+C|0,i[o++]=l+k|0,i[o++]=c+S|0,i[o++]=u+E|0,i[o++]=d+A|0,i[o++]=f+j|0,i[o++]=h+O|0,i[o++]=p+N|0,i[o++]=m+T|0,i[o++]=g+P|0,i[o++]=v+M|0,i[o++]=y+I|0,i[o++]=b+L|0,i[o++]=x+R|0,i[o++]=_+D|0}function qpe(e,t,n,r,i){let o=r+0,s=r+16*i;for(let a=0;a<16;a++)n[s+a]=e[t+16*(2*i-1)+a];for(let a=0;a<i;a++,o+=16,t+=16)Wpe(n,s,e,t,n,o),a>0&&(s+=16),Wpe(n,o,e,t+=16,n,s)}function Zpe(e,t,n){const{N:r,r:i,p:o,dkLen:s,blockSize32:a,V:l,B32:c,B:d,tmp:f,blockMixCb:h}=function(e,t,n){const r=vle({dkLen:32,asyncTick:10,maxmem:u(1024,3)+1024},n),{N:i,r:o,p:s,dkLen:a,asyncTick:l,maxmem:c,onProgress:d}=r;if(Gae(i),Gae(o),Gae(s),Gae(a),Gae(l),Gae(c),void 0!==d&&"function"!=typeof d)throw new Error("progressCb should be function");const f=128*o,h=f/4;if(i<=1||i&i-1||i>=u(2,f/8)||i>u(2,32))throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(s<0||s>32*(u(2,32)-1)/f)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>32*(u(2,32)-1))throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const p=f*(i+s);if(p>c)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${c} (maxmem)`);const m=Npe(Dpe,e,t,{c:1,dkLen:f*s}),g=sle(m),v=sle(new Uint8Array(f*i)),y=sle(new Uint8Array(f));let b=()=>{};if(d){const e=2*i*s,t=Math.max(Math.floor(e/1e4),1);let n=0;b=()=>{n++,!d||n%t&&n!==e||d(n/e)}}return{N:i,r:o,p:s,dkLen:a,blockSize32:h,V:v,B32:g,B:m,tmp:y,blockMixCb:b,asyncTick:l}}(e,t,n);ule||dle(c);for(let u=0;u<o;u++){const e=a*u;for(let t=0;t<a;t++)l[t]=c[e+t];for(let t=0,n=0;t<r-1;t++)qpe(l,n,l,n+=a,i),h();qpe(l,(r-1)*a,c,e,i),h();for(let t=0;t<r;t++){const t=c[e+a-16]%r;for(let n=0;n<a;n++)f[n]=c[e+n]^l[t*a+n];qpe(f,0,c,e,i),h()}}return ule||dle(c),function(e,t,n,r,i){const o=Npe(Dpe,e,n,{c:1,dkLen:t});return n.fill(0),r.fill(0),i.fill(0),o}(e,s,d,l,f)}function Xpe(e,t,n,r,i,o,s){return Lle(e),Lle(t),Zpe(e,t,{N:n,r:i,p:r,dkLen:o,onProgress:s})}
  9. const Gje=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Wje=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),qje=BigInt(1),Zje=BigInt(2),Xje=(e,t)=>(e+t/Zje)/t;const Kje=eSe(Gje,void 0,void 0,{sqrt:function(e){const t=Gje,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),c=e*e*e%t,u=c*c*e%t,d=Kke(u,n,t)*u%t,f=Kke(d,n,t)*u%t,h=Kke(f,Zje,t)*c%t,p=Kke(h,i,t)*h%t,m=Kke(p,o,t)*p%t,g=Kke(m,a,t)*m%t,v=Kke(g,l,t)*g%t,y=Kke(v,a,t)*m%t,b=Kke(y,n,t)*u%t,x=Kke(b,s,t)*p%t,_=Kke(x,r,t)*c%t,w=Kke(_,Zje,t);if(!Kje.eql(Kje.sqr(w),e))throw new Error("Cannot find square root");return w}}),Yje=function(e,t){const n=t=>Vje(f(f({},e),Uje(t)));return h(f({},n(t)),{create:n})}({a:BigInt(0),b:BigInt(7),Fp:Kje,n:Wje,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Wje,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-qje*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=Xje(o*e,t),l=Xje(-r*e,t);let c=Zke(e-a*n-l*i,t),u=Zke(-a*r-l*o,t);const d=c>s,f=u>s;if(d&&(c=t-c),f&&(u=t-u),c>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:c,k2neg:f,k2:u}}}},USe);function $je(e){try{return NSe.ExtendedPoint.fromHex(e),!0}catch(_k){return!1}}BigInt(0),NSe.utils.randomPrivateKey;const Jje=NSe.verify,Qje=e=>Vo.Buffer.isBuffer(e)?e:e instanceof Uint8Array?Vo.Buffer.from(e.buffer,e.byteOffset,e.byteLength):Vo.Buffer.from(e);class eOe{constructor(e){Object.assign(this,e)}encode(){return Vo.Buffer.from(xEe(tOe,this))}static decode(e){return CEe(tOe,this,e)}static decodeUnchecked(e){return aEe(tOe,this,e)}}const tOe=new Map;var nOe;const rOe=32;let iOe=1;class oOe extends eOe{constructor(e){if(super({}),this._bn=void 0,function(e){return void 0!==e._bn}(e))this._bn=e._bn;else{if("string"==typeof e){const t=BSe.decode(e);if(t.length!=rOe)throw new Error("Invalid public key input");this._bn=new MSe(t)}else this._bn=new MSe(e);if(this._bn.byteLength()>rOe)throw new Error("Invalid public key input")}}static unique(){const e=new oOe(iOe);returniOe+=1,new oOe(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return BSe.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this._bn.toArrayLike(Vo.Buffer);if(e.length===rOe)return e;const t=Vo.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static createWithSeed(e,t,n){return g(this,null,(function*(){const r=Vo.Buffer.concat([e.toBuffer(),Vo.Buffer.from(t),n.toBuffer()]),i=USe(r);return new oOe(i)}))}static createProgramAddressSync(e,t){let n=Vo.Buffer.alloc(0);e.forEach((function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");n=Vo.Buffer.concat([n,Qje(e)])})),n=Vo.Buffer.concat([n,t.toBuffer(),Vo.Buffer.from("ProgramDerivedAddress")]);const r=USe(n);if($je(r))throw new Error("Invalid seeds, address must fall off the curve");return new oOe(r)}static createProgramAddress(e,t){return g(this,null,(function*(){return this.createProgramAddressSync(e,t)}))}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const i=e.concat(Vo.Buffer.from([r]));n=this.createProgramAddressSync(i,t)}catch(MJe){if(MJe instanceof TypeError)throw MJe;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static findProgramAddress(e,t){return g(this,null,(function*(){return this.findProgramAddressSync(e,t)}))}static isOnCurve(e){return $je(new oOe(e).toBytes())}}nOe=oOe,oOe.default=new nOe("11111111111111111111111111111111"),tOe.set(oOe,{kind:"struct",fields:[["_bn","u256"]]}),new oOe("BPFLoader1111111111111111111111111111111111");const sOe=1232;class aOe extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(aOe.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class lOe extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(lOe.prototype,"name",{value:"TransactionExpiredTimeoutError"});class cOe extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(cOe.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class uOe{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const t=new Map;this.keySegments().flat().forEach(((e,n)=>{t.set(e.toBase58(),n)}));const n=e=>{const n=t.get(e.toBase58());if(void 0===n)throw new Error("Encountered an unknown instruction account key during compilation");return n};return e.map((e=>({programIdIndex:n(e.programId),accountKeyIndexes:e.keys.map((e=>n(e.pubkey))),data:e.data})))}}const dOe=(e="publicKey")=>gAe(32,e),fOe=(e="string")=>{const t=pAe([dAe("length"),dAe("lengthPadding"),gAe(lAe(dAe(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(e,t)=>n(e,t).chars.toString(),i.encode=(e,t,n)=>{const i={chars:Vo.Buffer.from(e,"utf8")};returnr(i,t,n)},i.alloc=e=>dAe().span+dAe().span+Vo.Buffer.from(e,"utf8").length,i};function hOe(e,t){const n=e=>{if(e.span>=0)return e.span;if("function"==typeof e.alloc)return e.alloc(t[e.property]);if("count"in e&&"elementLayout"in e){const r=t[e.property];if(Array.isArray(r))return r.length*n(e.elementLayout)}else if("fields"in e)return hOe({layout:e},t[e.property]);return 0};let r=0;return e.layout.fields.forEach((e=>{r+=n(e)})),r}function pOe(e){let t=0,n=0;for(;;){let r=e.shift();if(t|=(127&r)<<7*n,n+=1,!(128&r))break}return t}function mOe(e,t){let n=t;for(;;){let t=127&n;if(n>>=7,0==n){e.push(t);break}t|=128,e.push(t)}}function gOe(e,t){if(!e)throw new Error(t||"Assertion failed")}class vOe{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){const n=new Map,r=e=>{const t=e.toBase58();let r=n.get(t);return void 0===r&&(r={isSigner:!1,isWritable:!1,isInvoked:!1},n.set(t,r)),r},i=r(t);i.isSigner=!0,i.isWritable=!0;for(const o of e){r(o.programId).isInvoked=!0;for(const e of o.keys){const t=r(e.pubkey);t.isSigner||(t.isSigner=e.isSigner),t.isWritable||(t.isWritable=e.isWritable)}}return new vOe(t,n)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];gOe(e.length<=256,"Max static account keys length exceeded");const t=e.filter((([,e])=>e.isSigner&&e.isWritable)),n=e.filter((([,e])=>e.isSigner&&!e.isWritable)),r=e.filter((([,e])=>!e.isSigner&&e.isWritable)),i=e.filter((([,e])=>!e.isSigner&&!e.isWritable)),o={numRequiredSignatures:t.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:i.length};{gOe(t.length>0,"Expected at least one writable signer key");const[e]=t[0];gOe(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}return[o,[...t.map((([e])=>new oOe(e))),...n.map((([e])=>new oOe(e))),...r.map((([e])=>new oOe(e))),...i.map((([e])=>new oOe(e)))]]}extractTableLookup(e){const[t,n]=this.drainKeysFoundInLookupTable(e.state.addresses,(e=>!e.isSigner&&!e.isInvoked&&e.isWritable)),[r,i]=this.drainKeysFoundInLookupTable(e.state.addresses,(e=>!e.isSigner&&!e.isInvoked&&!e.isWritable));if(0!==t.length||0!==r.length)return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:r},{writable:n,readonly:i}]}drainKeysFoundInLookupTable(e,t){const n=new Array,r=new Array;for(const[i,o]of this.keyMetaMap.entries())if(t(o)){const t=new oOe(i),o=e.findIndex((e=>e.equals(t)));o>=0&&(gOe(o<256,"Max lookup table index exceeded"),n.push(o),r.push(t),this.keyMetaMap.delete(i))}return[n,r]}}const yOe="Reached end of buffer unexpectedly";function bOe(e){if(0===e.length)throw new Error(yOe);return e.shift()}function xOe(e,...t){var n;const[r]=t;if(2===t.length?r+(null!=(n=t[1])?n:0)>e.length:r>=e.length)throw new Error(yOe);return e.splice(...t)}let _Oe=class e{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map((e=>new oOe(e))),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach((e=>this.indexToProgramIds.set(e.programIdIndex,this.accountKeys[e.programIdIndex])))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map((e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:BSe.decode(e.data)})))}get addressTableLookups(){return[]}getAccountKeys(){return new uOe(this.staticAccountKeys)}static compile(t){const n=vOe.compile(t.instructions,t.payerKey),[r,i]=n.getMessageComponents(),o=new uOe(i).compileInstructions(t.instructions).map((e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:BSe.encode(e.data)})));return new e({header:r,accountKeys:i,recentBlockhash:t.recentBlockhash,instructions:o})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){return e-t<this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts}return e<t-this.header.numReadonlySignedAccounts}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter(((e,t)=>!this.isProgramId(t)))}serialize(){const e=this.accountKeys.length;let t=[];mOe(t,e);const n=this.instructions.map((e=>{const{accounts:t,programIdIndex:n}=e,r=Array.from(BSe.decode(e.data));let i=[];mOe(i,t.length);let o=[];return mOe(o,r.length),{programIdIndex:n,keyIndicesCount:Vo.Buffer.from(i),keyIndices:t,dataLength:Vo.Buffer.from(o),data:r}}));let r=[];mOe(r,n.length);let i=Vo.Buffer.alloc(sOe);Vo.Buffer.from(r).copy(i);let o=r.length;n.forEach((e=>{const t=pAe([cAe("programIdIndex"),gAe(e.keyIndicesCount.length,"keyIndicesCount"),mAe(cAe("keyIndex"),e.keyIndices.length,"keyIndices"),gAe(e.dataLength.length,"dataLength"),mAe(cAe("userdatum"),e.data.length,"data")]).encode(e,i,o);o+=t})),i=i.slice(0,o);const s=pAe([gAe(1,"numRequiredSignatures"),gAe(1,"numReadonlySignedAccounts"),gAe(1,"numReadonlyUnsignedAccounts"),gAe(t.length,"keyCount"),mAe(dOe("key"),e,"keys"),dOe("recentBlockhash")]),a={numRequiredSignatures:Vo.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:Vo.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:Vo.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:Vo.Buffer.from(t),keys:this.accountKeys.map((e=>Qje(e.toBytes()))),recentBlockhash:BSe.decode(this.recentBlockhash)};let l=Vo.Buffer.alloc(2048);const c=s.encode(a,l);return i.copy(l,c),l.slice(0,c+i.length)}static from(t){let n=[...t];const r=bOe(n);if(r!==(127&r))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const i=bOe(n),o=bOe(n),s=pOe(n);let a=[];for(let e=0;e<s;e++){const e=xOe(n,0,rOe);a.push(new oOe(Vo.Buffer.from(e)))}const l=xOe(n,0,rOe),c=pOe(n);let u=[];for(let e=0;e<c;e++){const e=bOe(n),t=xOe(n,0,pOe(n)),r=xOe(n,0,pOe(n)),i=BSe.encode(Vo.Buffer.from(r));u.push({programIdIndex:e,accounts:t,data:i})}const d={header:{numRequiredSignatures:r,numReadonlySignedAccounts:i,numReadonlyUnsignedAccounts:o},recentBlockhash:BSe.encode(Vo.Buffer.from(l)),accountKeys:a,instructions:u};return new e(d)}};class wOe{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(const t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch inthe number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new uOe(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures,n=this.staticAccountKeys.length;if(e>=n){return e-n<this.addressTableLookups.reduce(((e,t)=>e+t.writableIndexes.length),0)}if(e>=this.header.numRequiredSignatures){return e-t<n-t-this.header.numReadonlyUnsignedAccounts}return e<t-this.header.numReadonlySignedAccounts}resolveAddressTableLookups(e){const t={writable:[],readonly:[]};for(const n of this.addressTableLookups){const r=e.find((e=>e.key.equals(n.accountKey)));if(!r)throw new Error(`Failed to findaddress lookup table account for table key ${n.accountKey.toBase58()}`);for(const e of n.writableIndexes){if(!(e<r.state.addresses.length))throw new Error(`Failed to find address for index ${e} in address lookup table ${n.accountKey.toBase58()}`);t.writable.push(r.state.addresses[e])}for(const e of n.readonlyIndexes){if(!(e<r.state.addresses.length))throw new Error(`Failed to find address for index ${e} in address lookup table ${n.accountKey.toBase58()}`);t.readonly.push(r.state.addresses[e])}}return t}static compile(e){const t=vOe.compile(e.instructions,e.payerKey),n=new Array,r={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const l of i){const e=t.extractTableLookup(l);if(void 0!==e){const[t,{writable:i,readonly:o}]=e;n.push(t),r.writable.push(...i),r.readonly.push(...o)}}const[o,s]=t.getMessageComponents(),a=new uOe(s,r).compileInstructions(e.instructions);return new wOe({header:o,staticAccountKeys:s,recentBlockhash:e.recentBlockhash,compiledInstructions:a,addressTableLookups:n})}serialize(){const e=Array();mOe(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),n=Array();mOe(n,this.compiledInstructions.length);const r=this.serializeAddressTableLookups(),i=Array();mOe(i,this.addressTableLookups.length);const o=pAe([cAe("prefix"),pAe([cAe("numRequiredSignatures"),cAe("numReadonlySignedAccounts"),cAe("numReadonlyUnsignedAccounts")],"header"),gAe(e.length,"staticAccountKeysLength"),mAe(dOe(),this.staticAccountKeys.length,"staticAccountKeys"),dOe("recentBlockhash"),gAe(n.length,"instructionsLength"),gAe(t.length,"serializedInstructions"),gAe(i.length,"addressTableLookupsLength"),gAe(r.length,"serializedAddressTableLookups")]),s=new Uint8Array(sOe),a=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map((e=>e.toBytes())),recentBlockhash:BSe.decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:r},s);return s.slice(0,a)}serializeInstructions(){let e=0;const t=new Uint8Array(sOe);for(const n of this.compiledInstructions){const r=Array();mOe(r,n.accountKeyIndexes.length);const i=Array();mOe(i,n.data.length);e+=pAe([cAe("programIdIndex"),gAe(r.length,"encodedAccountKeyIndexesLength"),mAe(cAe(),n.accountKeyIndexes.length,"accountKeyIndexes"),gAe(i.length,"encodedDataLength"),gAe(n.data.length,"data")]).encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(r),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:n.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array(sOe);for(const n of this.addressTableLookups){const r=Array();mOe(r,n.writableIndexes.length);const i=Array();mOe(i,n.readonlyIndexes.length);e+=pAe([dOe("accountKey"),gAe(r.length,"encodedWritableIndexesLength"),mAe(cAe(),n.writableIndexes.length,"writableIndexes"),gAe(i.length,"encodedReadonlyIndexesLength"),mAe(cAe(),n.readonlyIndexes.length,"readonlyIndexes")]).encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(r),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:n.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const n=bOe(t),r=127&n;gOe(n!==r,"Expected versioned message but received legacy message");gOe(0===r,`Expected versioned message with version 0but found version ${r}`);const i={numRequiredSignatures:bOe(t),numReadonlySignedAccounts:bOe(t),numReadonlyUnsignedAccounts:bOe(t)},o=[],s=pOe(t);for(let f=0;f<s;f++)o.push(new oOe(xOe(t,0,rOe)));const a=BSe.encode(xOe(t,0,rOe)),l=pOe(t),c=[];for(let f=0;f<l;f++){const e=bOe(t),n=xOe(t,0,pOe(t)),r=pOe(t),i=new Uint8Array(xOe(t,0,r));c.push({programIdIndex:e,accountKeyIndexes:n,data:i})}const u=pOe(t),d=[];for(let f=0;f<u;f++){const e=new oOe(xOe(t,0,rOe)),n=xOe(t,0,pOe(t)),r=xOe(t,0,pOe(t));d.push({accountKey:e,writableIndexes:n,readonlyIndexes:r})}return new wOe({header:i,staticAccountKeys:o,recentBlockhash:a,compiledInstructions:c,addressTableLookups:d})}}let COe=function(e){return e[e.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",e[e.PROCESSED=1]="PROCESSED",e[e.TIMED_OUT=2]="TIMED_OUT",e[e.NONCE_INVALID=3]="NONCE_INVALID",e}({});const kOe=Vo.Buffer.alloc(64).fill(0);class SOe{constructor(e){this.keys=void 0,this.programId=void 0,this.data=Vo.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map((({pubkey:e,isSigner:t,isWritable:n})=>({pubkey:e.toJSON(),isSigner:t,isWritable:n}))),programId:this.programId.toJSON(),data:[...this.data]}}}class EOe{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,e)if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){const{minContextSlot:t,nonceInfo:n}=e;this.minNonceContextSlot=t,this.nonceInfo=n}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:t,lastValidBlockHeight:n}=e;this.recentBlockhash=t,this.lastValidBlockHeight=n}else{const{recentBlockhash:t,nonceInfo:n}=e;n&&(this.nonceInfo=n),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map((e=>e.toJSON())),signers:this.signatures.map((({publicKey:e})=>e.toJSON()))}}add(...e){if(0===e.length)throw new Error("No instructions");return e.forEach((e=>{"instructions"in e?this.instructions=this.instructions.concat(e.instructions):"data"ine&&"programId"in e&&"keys"in e?this.instructions.push(e):this.instructions.push(new SOe(e))})),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,t,n;if(this.nonceInfo?(e=this.nonceInfo.nonce,t=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw new Error("Transaction recentBlockhash required");if(t.length,this.feePayer)n=this.feePayer;else{if(!(this.signatures.length>0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");n=this.signatures[0].publicKey}for(let f=0;f<t.length;f++)if(void 0===t[f].programId)throw new Error(`Transaction instruction index ${f} has undefined program id`);const r=[],i=[];t.forEach((e=>{e.keys.forEach((e=>{i.push(f({},e))}));const t=e.programId.toString();r.includes(t)||r.push(t)})),r.forEach((e=>{i.push({pubkey:new oOe(e),isSigner:!1,isWritable:!1})}));const o=[];i.forEach((e=>{const t=e.pubkey.toString(),n=o.findIndex((e=>e.pubkey.toString()===t));n>-1?(o[n].isWritable=o[n].isWritable||e.isWritable,o[n].isSigner=o[n].isSigner||e.isSigner):o.push(e)})),o.sort((function(e,t){if(e.isSigner!==t.isSigner)return e.isSigner?-1:1;if(e.isWritable!==t.isWritable)return e.isWritable?-1:1;return e.pubkey.toBase58().localeCompare(t.pubkey.toBase58(),"en",{localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"})}));const s=o.findIndex((e=>e.pubkey.equals(n)));if(s>-1){const[e]=o.splice(s,1);e.isSigner=!0,e.isWritable=!0,o.unshift(e)}else o.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(const f of this.signatures){const e=o.findIndex((e=>e.pubkey.equals(f.publicKey)));if(!(e>-1))thrownew Error(`unknown signer: ${f.publicKey.toString()}`);o[e].isSigner||(o[e].isSigner=!0)}let a=0,l=0,c=0;const u=[],d=[];o.forEach((({pubkey:e,isSigner:t,isWritable:n})=>{t?(u.push(e.toString()),a+=1,n||(l+=1)):(d.push(e.toString()),n||(c+=1))}));const h=u.concat(d),p=t.map((e=>{const{data:t,programId:n}=e;return{programIdIndex:h.indexOf(n.toString()),accounts:e.keys.map((e=>h.indexOf(e.pubkey.toString()))),data:BSe.encode(t)}}));return p.forEach((e=>{gOe(e.programIdIndex>=0),e.accounts.forEach((e=>gOe(e>=0)))})),new _Oe({header:{numRequiredSignatures:a,numReadonlySignedAccounts:l,numReadonlyUnsignedAccounts:c},accountKeys:h,recentBlockhash:e,instructions:p})}_compile(){const e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length){if(this.signatures.every(((e,n)=>t[n].equals(e.publicKey))))return e}return this.signatures=t.map((e=>({signature:null,publicKey:e}))),e}serializeMessage(){return this._compile().serialize()}getEstimatedFee(e){return g(this,null,(function*(){return(yield e.getFeeForMessage(this.compileMessage())).value}))}setSigners(...e){if(0===e.length)throw new Error("No signers");const t=new Set;this.signatures=e.filter((e=>{const n=e.toString();return!t.has(n)&&(t.add(n),!0)})).map((e=>({signature:null,publicKey:e})))}sign(...e){if(0===e.length)throw new Error("No signers");const t=new Set,n=[];for(const i of e){const e=i.publicKey.toString();t.has(e)||(t.add(e),n.push(i))}this.signatures=n.map((e=>({signature:null,publicKey:e.publicKey})));const r=this._compile();this._partialSign(r,...n)}partialSign(...e){if(0===e.length)throw new Error("No signers");const t=new Set,n=[];for(const i of e){const e=i.publicKey.toString();t.has(e)||(t.add(e),n.push(i))}const r=this._compile();this._partialSign(r,...n)}_partialSign(e,...t){const n=e.serialize();t.forEach((e=>{const t=((e,t)=>NSe.sign(e,t.slice(0,32)))(n,e.secretKey);this._addSignature(e.publicKey,Qje(t))}))}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){gOe(64===t.length);const n=this.signatures.findIndex((t=>e.equals(t.publicKey)));if(n<0)throw new Error(`unknown signer: ${e.toString()}`);this.signatures[n].signature=Vo.Buffer.from(t)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){const n={};for(const{signature:r,publicKey:i}of this.signatures)null===r?t&&(n.missing||(n.missing=[])).push(i):Jje(r,e,i.toBytes())||(n.invalid||(n.invalid=[])).push(i);return n.invalid||n.missing?n:void 0}serialize(e){const{requireAllSignatures:t,verifySignatures:n}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),r=this.serializeMessage();if(n){const e=this._getMessageSignednessErrors(r,t);if(e){let t="Signature verification failed.";throw e.invalid&&(t+=`\nInvalid signature for public key${1===e.invalid.length?"":"(s)"} [\`${e.invalid.map((e=>e.toBase58())).join("`, `")}\`].`),e.missing&&(t+=`\nMissing signature for public key${1===e.missing.length?"":"(s)"} [\`${e.missing.map((e=>e.toBase58())).join("`, `")}\`].`),new Error(t)}}return this._serialize(r)}_serialize(e){const{signatures:t}=this,n=[];mOe(n,t.length);const r=n.length+64*t.length+e.length,i=Vo.Buffer.alloc(r);return gOe(t.length<256),Vo.Buffer.from(n).copy(i,0),t.forEach((({signature:e},t)=>{null!==e&&(gOe(64===e.length,"signature has invalid length"),Vo.Buffer.from(e).copy(i,n.length+64*t))})),e.copy(i,n.length+64*t.length),gOe(i.length<=sOe,`Transaction too large: ${i.length} > 1232`),i}get keys(){return gOe(1===this.instructions.length),this.instructions[0].keys.map((e=>e.pubkey))}get programId(){return gOe(1===this.instructions.length),this.instructions[0].programId}get data(){return gOe(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e];const n=pOe(t);let r=[];for(let i=0;i<n;i++){const e=xOe(t,0,64);r.push(BSe.encode(Vo.Buffer.from(e)))}return EOe.populate(_Oe.from(t),r)}static populate(e,t=[]){const n=new EOe;return n.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(n.feePayer=e.accountKeys[0]),t.forEach(((t,r)=>{const i={signature:t==BSe.encode(kOe)?null:BSe.decode(t),publicKey:e.accountKeys[r]};n.signatures.push(i)})),e.instructions.forEach((t=>{const r=t.accounts.map((t=>{const r=e.accountKeys[t];return{pubkey:r,isSigner:n.signatures.some((e=>e.publicKey.toString()===r.toString()))||e.isAccountSigner(t),isWritable:e.isAccountWritable(t)}}));n.instructions.push(new SOe({keys:r,programId:e.accountKeys[t.programIdIndex],data:BSe.decode(t.data)}))})),n._message=e,n._json=n.toJSON(),n}}new oOe("SysvarC1ock11111111111111111111111111111111"),new oOe("SysvarEpochSchedu1e111111111111111111111111"),new oOe("Sysvar1nstructions1111111111111111111111111");const AOe=new oOe("SysvarRecentB1ockHashes11111111111111111111"),jOe=new oOe("SysvarRent111111111111111111111111111111111");new oOe("SysvarRewards111111111111111111111111111111"),newoOe("SysvarS1otHashes111111111111111111111111111"),new oOe("SysvarS1otHistory11111111111111111111111111"),new oOe("SysvarStakeHistory1111111111111111111111111");class OOe extends Error{constructor({action:e,signature:t,transactionMessage:n,logs:r}){const i=r?`Logs: \n${JSON.stringify(r.slice(-10),null,2)}. `:"",o="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";let s;switch(e){case"send":s=`Transaction ${t} resulted in an error. \n${n}. `+i+o;break;case"simulate":s=`Simulation failed. \nMessage: ${n}. \n`+i+o;break;default:s=`Unknown action '${e}'`}super(s),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=t,this.transactionMessage=n,this.transactionLogs=r||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){const e=this.transactionLogs;if(null==e||"object"!=typeof e||!("then"in e))return e}getLogs(e){return g(this,null,(function*(){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise(((t,n)=>{e.getTransaction(this.signature).then((e=>{if(e&&e.meta&&e.meta.logMessages){const n=e.meta.logMessages;this.transactionLogs=n,t(n)}else n(new Error("Log messages not found"))})).catch(n)}))),yield this.transactionLogs}))}}class NOe extends Error{constructor({code:e,message:t,data:n},r){super(null!=r?`${r}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=n,this.name="SolanaJSONRPCError"}}function TOe(e){return new Promise((t=>setTimeout(t,e)))}function POe(e,t){const n=e.layout.span>=0?e.layout.span:hOe(e,t),r=Vo.Buffer.alloc(n),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,r),r}const MOe=fAe("lamportsPerSignature"),IOe=pAe([dAe("version"),dAe("state"),dOe("authorizedPubkey"),dOe("nonce"),pAe([MOe],"feeCalculator")]),LOe=IOe.span;class ROe{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){const t=IOe.decode(Qje(e),0);return new ROe({authorizedPubkey:new oOe(t.authorizedPubkey),nonce:new oOe(t.nonce).toString(),feeCalculator:t.feeCalculator})}}const DOe=(BOe=8,e=>{const t=gAe(BOe,e),{encode:n,decode:r}=(e=>({decode:e.decode.bind(e),encode:e.encode.bind(e)}))(t),i=t;return i.decode=(e,t)=>{const n=r(e,t);return yAe(Vo.Buffer.from(n))},i.encode=(e,t,r)=>{const i=bAe(e,BOe);return n(i,t,r)},i});var BOe;const FOe=Object.freeze({Create:{index:0,layout:pAe([dAe("instruction"),hAe("lamports"),hAe("space"),dOe("programId")])},Assign:{index:1,layout:pAe([dAe("instruction"),dOe("programId")])},Transfer:{index:2,layout:pAe([dAe("instruction"),DOe("lamports")])},CreateWithSeed:{index:3,layout:pAe([dAe("instruction"),dOe("base"),fOe("seed"),hAe("lamports"),hAe("space"),dOe("programId")])},AdvanceNonceAccount:{index:4,layout:pAe([dAe("instruction")])},WithdrawNonceAccount:{index:5,layout:pAe([dAe("instruction"),hAe("lamports")])},InitializeNonceAccount:{index:6,layout:pAe([dAe("instruction"),dOe("authorized")])},AuthorizeNonceAccount:{index:7,layout:pAe([dAe("instruction"),dOe("authorized")])},Allocate:{index:8,layout:pAe([dAe("instruction"),hAe("space")])},AllocateWithSeed:{index:9,layout:pAe([dAe("instruction"),dOe("base"),fOe("seed"),hAe("space"),dOe("programId")])},AssignWithSeed:{index:10,layout:pAe([dAe("instruction"),dOe("base"),fOe("seed"),dOe("programId")])},TransferWithSeed:{index:11,layout:pAe([dAe("instruction"),DOe("lamports"),fOe("seed"),dOe("programId")])},UpgradeNonceAccount:{index:12,layout:pAe([dAe("instruction")])}});class HOe{constructor(){}static createAccount(e){const t=POe(FOe.Create,{lamports:e.lamports,space:e.space,programId:Qje(e.programId.toBuffer())});return new SOe({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:t})}static transfer(e){let t,n;if("basePubkey"in e){t=POe(FOe.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:Qje(e.programId.toBuffer())}),n=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{t=POe(FOe.Transfer,{lamports:BigInt(e.lamports)}),n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new SOe({keys:n,programId:this.programId,data:t})}static assign(e){let t,n;if("basePubkey"in e){t=POe(FOe.AssignWithSeed,{base:Qje(e.basePubkey.toBuffer()),seed:e.seed,programId:Qje(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=POe(FOe.Assign,{programId:Qje(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new SOe({keys:n,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=POe(FOe.CreateWithSeed,{base:Qje(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:Qje(e.programId.toBuffer())});let n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey.equals(e.fromPubkey)||n.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new SOe({keys:n,programId:this.programId,data:t})}static createNonceAccount(e){const t=new EOe;"basePubkey"in e&&"seed"in e?t.add(HOe.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:LOe,programId:this.programId})):t.add(HOe.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:LOe,programId:this.programId}));const n={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(n)),t}static nonceInitialize(e){const t=POe(FOe.InitializeNonceAccount,{authorized:Qje(e.authorizedPubkey.toBuffer())}),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:AOe,isSigner:!1,isWritable:!1},{pubkey:jOe,isSigner:!1,isWritable:!1}],programId:this.programId,data:t};return new SOe(n)}static nonceAdvance(e){const t=POe(FOe.AdvanceNonceAccount),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:AOe,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t};return new SOe(n)}static nonceWithdraw(e){const t=POe(FOe.WithdrawNonceAccount,{lamports:e.lamports});return new SOe({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:AOe,isSigner:!1,isWritable:!1},{pubkey:jOe,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceAuthorize(e){const t=POe(FOe.AuthorizeNonceAccount,{authorized:Qje(e.newAuthorizedPubkey.toBuffer())});return new SOe({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static allocate(e){let t,n;if("basePubkey"in e){t=POe(FOe.AllocateWithSeed,{base:Qje(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:Qje(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=POe(FOe.Allocate,{space:e.space}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new SOe({keys:n,programId:this.programId,data:t})}}function zOe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var VOe,UOe;function GOe(){if(UOe)return VOe;UOe=1;var e=Object.prototype.toString,t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function n(r,i){var o,s,a,l,c,u,d;if(!0===r)return"true";if(!1===r)return"false";switch(typeof r){case"object":if(null===r)return null;if(r.toJSON&&"function"==typeof r.toJSON)return n(r.toJSON(),i);if("[object Array]"===(d=e.call(r))){for(a="[",s=r.length-1,o=0;o<s;o++)a+=n(r[o],!0)+",";return s>-1&&(a+=n(r[o],!0)),a+"]"}if("[object Object]"===d){for(s=(l=t(r).sort()).length,a="",o=0;o<s;)void 0!==(u=n(r[c=l[o]],!1))&&(a&&(a+=","),a+=JSON.stringify(c)+":"+u),o++;return"{"+a+"}"}return JSON.stringify(r);case"function":case"undefined":return i?null:void 0;case"string":return JSON.stringify(r);default:return isFinite(r)?r:null}}return VOe=function(e){var t=n(e,!1);if(void 0!==t)return""+t}}HOe.programId=new oOe("11111111111111111111111111111111"),new oOe("BPFLoader2111111111111111111111111111111111");var WOe=zOe(GOe());function qOe(e){let t=0;for(;e>1;)e/=2,t++;return t}class ZOe{constructor(e,t,n,r,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=n,this.firstNormalEpoch=r,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=qOe(0===(t=e+32+1)?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,1+(t|=t>>32)))-qOe(32)-1;return[n,e-(this.getSlotsInEpoch(n)-32)]}{const t=e-this.firstNormalSlot,n=Math.floor(t/this.slotsPerEpoch);return[this.firstNormalEpoch+n,t%this.slotsPerEpoch]}var t}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?32*(Math.pow(2,e)-1):(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e<this.firstNormalEpoch?Math.pow(2,e+qOe(32)):this.slotsPerEpoch}}var XOe=globalThis.fetch;class KOe extends Nje{constructor(e,t,n){super((e=>{const n=function(e,t){return new jje(e,t)}(e,f({autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3},t));return this.underlyingSocket="socket"in n?n.socket:n,n}),e,t,n),this.underlyingSocket=void 0}call(...e){var t;const n=null==(t=this.underlyingSocket)?void 0:t.readyState;return 1===n?super.call(...e):Promise.reject(new Error("Tried to call a JSON-RPC method `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+n+")"))}notify(...e){var t;const n=null==(t=this.underlyingSocket)?void 0:t.readyState;return 1===n?super.notify(...e):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+n+")"))}}class YOe{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){const e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){const t=function(e,t){let n;try{n=e.layout.decode(t)}catch(MJe){throw new Error("invalid instruction; "+MJe)}if(n.typeIndex!==e.index)throw new Error(`invalid account data; account type mismatch ${n.typeIndex} != ${e.index}`);return n}($Oe,e),n=e.length-56;gOe(n>=0,"lookup table is invalid"),gOe(n%32==0,"lookup table is invalid");const r=n/32,{addresses:i}=pAe([mAe(dOe(),r,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new oOe(t.authority[0]):void 0,addresses:i.map((e=>new oOe(e)))}}}const $Oe={index:1,layout:pAe([dAe("typeIndex"),DOe("deactivationSlot"),fAe("lastExtendedSlot"),cAe("lastExtendedStartIndex"),cAe(),mAe(dOe(),lAe(cAe(),-1),"authority")])},JOe=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;const QOe=WAe(IAe(oOe),HAe(),(e=>new oOe(e))),eNe=zAe([HAe(),LAe("base64")]),tNe=WAe(IAe(Vo.Buffer),eNe,(e=>Vo.Buffer.from(e[0],"base64")));function nNe(e){let t,n;if("string"==typeof e)t=e;else if(e){const r=e,{commitment:i}=r;t=i,n=p(r,["commitment"])}return{commitment:t,config:n}}function rNe(e){return e.map((e=>{var t;return"memcmp"in e?h(f({},e),{memcmp:h(f({},e.memcmp),{encoding:null!=(t=e.memcmp.encoding)?t:"base58"})}):e}))}function iNe(e){return UAe([VAe({jsonrpc:LAe("2.0"),id:HAe(),result:e}),VAe({jsonrpc:LAe("2.0"),id:HAe(),error:VAe({code:GAe(),message:HAe(),data:BAe(TAe("any",(()=>!0)))})})])}const oNe=iNe(GAe());function sNe(e){return WAe(iNe(e),oNe,(t=>"error"in t?t:h(f({},t),{result:jAe(t.result,e)})))}function aNe(e){return sNe(VAe({context:VAe({slot:DAe()}),value:e}))}function lNe(e){return VAe({context:VAe({slot:DAe()}),value:e})}function cNe(e,t){return 0===e?new wOe({header:t.header,staticAccountKeys:t.accountKeys.map((e=>new oOe(e))),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map((e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:BSe.decode(e.data)}))),addressTableLookups:t.addressTableLookups}):new _Oe(t)}const uNe=VAe({foundation:DAe(),foundationTerm:DAe(),initial:DAe(),taper:DAe(),terminal:DAe()}),dNe=sNe(PAe(RAe(VAe({epoch:DAe(),effectiveSlot:DAe(),amount:DAe(),postBalance:DAe(),commission:BAe(RAe(DAe()))})))),fNe=PAe(VAe({slot:DAe(),prioritizationFee:DAe()})),hNe=VAe({total:DAe(),validator:DAe(),foundation:DAe(),epoch:DAe()}),pNe=VAe({epoch:DAe(),slotIndex:DAe(),slotsInEpoch:DAe(),absoluteSlot:DAe(),blockHeight:BAe(DAe()),transactionCount:BAe(DAe())}),mNe=VAe({slotsPerEpoch:DAe(),leaderScheduleSlotOffset:DAe(),warmup:MAe(),firstNormalEpoch:DAe(),firstNormalSlot:DAe()}),gNe=FAe(HAe(),PAe(DAe())),vNe=RAe(UAe([VAe({}),HAe()])),yNe=VAe({err:vNe}),bNe=LAe("receivedSignature"),xNe=VAe({"solana-core":HAe(),"feature-set":BAe(DAe())}),_Ne=VAe({program:HAe(),programId:QOe,parsed:GAe()}),wNe=VAe({programId:QOe,accounts:PAe(QOe),data:HAe()}),CNe=aNe(VAe({err:RAe(UAe([VAe({}),HAe()])),logs:RAe(PAe(HAe())),accounts:BAe(RAe(PAe(RAe(VAe({executable:MAe(),owner:HAe(),lamports:DAe(),data:PAe(
RAW Gist Data Copied