devin-test
Version:
With OmniConnect, users can connect effortlessly across all platforms—whether it's a plugin, mobile app, TGMini App, or Web/H5. No matter where users are or which blockchain they want to interact with, OmniConnect provides direct, seamless access, ensurin
42 lines (36 loc) • 237 kB
JavaScript
(function(xe,st){typeof exports=="object"&&typeof module<"u"?st(exports):typeof define=="function"&&define.amd?define(["exports"],st):(xe=typeof globalThis<"u"?globalThis:xe||self,st(xe["@bitget-wallet/omni-connect"]={}))})(this,function(xe){"use strict";var a2=Object.defineProperty;var M0=xe=>{throw TypeError(xe)};var u2=(xe,st,$t)=>st in xe?a2(xe,st,{enumerable:!0,configurable:!0,writable:!0,value:$t}):xe[st]=$t;var Or=(xe,st,$t)=>u2(xe,typeof st!="symbol"?st+"":st,$t),Ec=(xe,st,$t)=>st.has(xe)||M0("Cannot "+$t);var We=(xe,st,$t)=>(Ec(xe,st,"read from private field"),$t?$t.call(xe):st.get(xe)),os=(xe,st,$t)=>st.has(xe)?M0("Cannot add the same private member more than once"):st instanceof WeakSet?st.add(xe):st.set(xe,$t),Gf=(xe,st,$t,_o)=>(Ec(xe,st,"write to private field"),_o?_o.call(xe,$t):st.set(xe,$t),$t),Dt=(xe,st,$t)=>(Ec(xe,st,"access private method"),$t);var tr,St,_n,gt,Pi,Jr,Sc,Ac,Rc,Tc;var st=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $t(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function _o(i){if(i.__esModule)return i;var n=i.default;if(typeof n=="function"){var r=function f(){return this instanceof f?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(f){var c=Object.getOwnPropertyDescriptor(i,f);Object.defineProperty(r,f,c.get?c:{enumerable:!0,get:function(){return i[f]}})}),r}var Ye={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ic;function F0(){if(Ic)return Ye;Ic=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ue=Symbol.iterator;function _e(O){return O===null||typeof O!="object"?null:(O=ue&&O[ue]||O["@@iterator"],typeof O=="function"?O:null)}var ce={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$e=Object.assign,pe={};function de(O,Y,Oe){this.props=O,this.context=Y,this.refs=pe,this.updater=Oe||ce}de.prototype.isReactComponent={},de.prototype.setState=function(O,Y){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,Y,"setState")},de.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function mt(){}mt.prototype=de.prototype;function Ve(O,Y,Oe){this.props=O,this.context=Y,this.refs=pe,this.updater=Oe||ce}var _t=Ve.prototype=new mt;_t.constructor=Ve,$e(_t,de.prototype),_t.isPureReactComponent=!0;var dt=Array.isArray,ft=Object.prototype.hasOwnProperty,At={current:null},kt={key:!0,ref:!0,__self:!0,__source:!0};function ln(O,Y,Oe){var Ce,ee={},qe=null,Rt=null;if(Y!=null)for(Ce in Y.ref!==void 0&&(Rt=Y.ref),Y.key!==void 0&&(qe=""+Y.key),Y)ft.call(Y,Ce)&&!kt.hasOwnProperty(Ce)&&(ee[Ce]=Y[Ce]);var ut=arguments.length-2;if(ut===1)ee.children=Oe;else if(1<ut){for(var nt=Array(ut),Ft=0;Ft<ut;Ft++)nt[Ft]=arguments[Ft+2];ee.children=nt}if(O&&O.defaultProps)for(Ce in ut=O.defaultProps,ut)ee[Ce]===void 0&&(ee[Ce]=ut[Ce]);return{$$typeof:i,type:O,key:qe,ref:Rt,props:ee,_owner:At.current}}function nr(O,Y){return{$$typeof:i,type:O.type,key:Y,ref:O.ref,props:O.props,_owner:O._owner}}function rr(O){return typeof O=="object"&&O!==null&&O.$$typeof===i}function vr(O){var Y={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(Oe){return Y[Oe]})}var yr=/\/+/g;function xr(O,Y){return typeof O=="object"&&O!==null&&O.key!=null?vr(""+O.key):Y.toString(36)}function In(O,Y,Oe,Ce,ee){var qe=typeof O;(qe==="undefined"||qe==="boolean")&&(O=null);var Rt=!1;if(O===null)Rt=!0;else switch(qe){case"string":case"number":Rt=!0;break;case"object":switch(O.$$typeof){case i:case n:Rt=!0}}if(Rt)return Rt=O,ee=ee(Rt),O=Ce===""?"."+xr(Rt,0):Ce,dt(ee)?(Oe="",O!=null&&(Oe=O.replace(yr,"$&/")+"/"),In(ee,Y,Oe,"",function(Ft){return Ft})):ee!=null&&(rr(ee)&&(ee=nr(ee,Oe+(!ee.key||Rt&&Rt.key===ee.key?"":(""+ee.key).replace(yr,"$&/")+"/")+O)),Y.push(ee)),1;if(Rt=0,Ce=Ce===""?".":Ce+":",dt(O))for(var ut=0;ut<O.length;ut++){qe=O[ut];var nt=Ce+xr(qe,ut);Rt+=In(qe,Y,Oe,nt,ee)}else if(nt=_e(O),typeof nt=="function")for(O=nt.call(O),ut=0;!(qe=O.next()).done;)qe=qe.value,nt=Ce+xr(qe,ut++),Rt+=In(qe,Y,Oe,nt,ee);else if(qe==="object")throw Y=String(O),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Rt}function on(O,Y,Oe){if(O==null)return O;var Ce=[],ee=0;return In(O,Ce,"","",function(qe){return Y.call(Oe,qe,ee++)}),Ce}function Yt(O){if(O._status===-1){var Y=O._result;Y=Y(),Y.then(function(Oe){(O._status===0||O._status===-1)&&(O._status=1,O._result=Oe)},function(Oe){(O._status===0||O._status===-1)&&(O._status=2,O._result=Oe)}),O._status===-1&&(O._status=0,O._result=Y)}if(O._status===1)return O._result.default;throw O._result}var le={current:null},Nt={transition:null},On={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:Nt,ReactCurrentOwner:At};function wn(){throw Error("act(...) is not supported in production builds of React.")}return Ye.Children={map:on,forEach:function(O,Y,Oe){on(O,function(){Y.apply(this,arguments)},Oe)},count:function(O){var Y=0;return on(O,function(){Y++}),Y},toArray:function(O){return on(O,function(Y){return Y})||[]},only:function(O){if(!rr(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Ye.Component=de,Ye.Fragment=r,Ye.Profiler=c,Ye.PureComponent=Ve,Ye.StrictMode=f,Ye.Suspense=H,Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=On,Ye.act=wn,Ye.cloneElement=function(O,Y,Oe){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var Ce=$e({},O.props),ee=O.key,qe=O.ref,Rt=O._owner;if(Y!=null){if(Y.ref!==void 0&&(qe=Y.ref,Rt=At.current),Y.key!==void 0&&(ee=""+Y.key),O.type&&O.type.defaultProps)var ut=O.type.defaultProps;for(nt in Y)ft.call(Y,nt)&&!kt.hasOwnProperty(nt)&&(Ce[nt]=Y[nt]===void 0&&ut!==void 0?ut[nt]:Y[nt])}var nt=arguments.length-2;if(nt===1)Ce.children=Oe;else if(1<nt){ut=Array(nt);for(var Ft=0;Ft<nt;Ft++)ut[Ft]=arguments[Ft+2];Ce.children=ut}return{$$typeof:i,type:O.type,key:ee,ref:qe,props:Ce,_owner:Rt}},Ye.createContext=function(O){return O={$$typeof:w,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:y,_context:O},O.Consumer=O},Ye.createElement=ln,Ye.createFactory=function(O){var Y=ln.bind(null,O);return Y.type=O,Y},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(O){return{$$typeof:T,render:O}},Ye.isValidElement=rr,Ye.lazy=function(O){return{$$typeof:Q,_payload:{_status:-1,_result:O},_init:Yt}},Ye.memo=function(O,Y){return{$$typeof:j,type:O,compare:Y===void 0?null:Y}},Ye.startTransition=function(O){var Y=Nt.transition;Nt.transition={};try{O()}finally{Nt.transition=Y}},Ye.unstable_act=wn,Ye.useCallback=function(O,Y){return le.current.useCallback(O,Y)},Ye.useContext=function(O){return le.current.useContext(O)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(O){return le.current.useDeferredValue(O)},Ye.useEffect=function(O,Y){return le.current.useEffect(O,Y)},Ye.useId=function(){return le.current.useId()},Ye.useImperativeHandle=function(O,Y,Oe){return le.current.useImperativeHandle(O,Y,Oe)},Ye.useInsertionEffect=function(O,Y){return le.current.useInsertionEffect(O,Y)},Ye.useLayoutEffect=function(O,Y){return le.current.useLayoutEffect(O,Y)},Ye.useMemo=function(O,Y){return le.current.useMemo(O,Y)},Ye.useReducer=function(O,Y,Oe){return le.current.useReducer(O,Y,Oe)},Ye.useRef=function(O){return le.current.useRef(O)},Ye.useState=function(O){return le.current.useState(O)},Ye.useSyncExternalStore=function(O,Y,Oe){return le.current.useSyncExternalStore(O,Y,Oe)},Ye.useTransition=function(){return le.current.useTransition()},Ye.version="18.3.1",Ye}var vo={exports:{}};/**
* @license React
* react.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/vo.exports;var Oc;function W0(){return Oc||(Oc=1,function(i,n){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var r="18.3.1",f=Symbol.for("react.element"),c=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),j=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),$e=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),de=Symbol.iterator,mt="@@iterator";function Ve(l){if(l===null||typeof l!="object")return null;var m=de&&l[de]||l[mt];return typeof m=="function"?m:null}var _t={current:null},dt={transition:null},ft={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},At={current:null},kt={},ln=null;function nr(l){ln=l}kt.setExtraStackFrame=function(l){ln=l},kt.getCurrentStack=null,kt.getStackAddendum=function(){var l="";ln&&(l+=ln);var m=kt.getCurrentStack;return m&&(l+=m()||""),l};var rr=!1,vr=!1,yr=!1,xr=!1,In=!1,on={ReactCurrentDispatcher:_t,ReactCurrentBatchConfig:dt,ReactCurrentOwner:At};on.ReactDebugCurrentFrame=kt,on.ReactCurrentActQueue=ft;function Yt(l){{for(var m=arguments.length,P=new Array(m>1?m-1:0),$=1;$<m;$++)P[$-1]=arguments[$];Nt("warn",l,P)}}function le(l){{for(var m=arguments.length,P=new Array(m>1?m-1:0),$=1;$<m;$++)P[$-1]=arguments[$];Nt("error",l,P)}}function Nt(l,m,P){{var $=on.ReactDebugCurrentFrame,z=$.getStackAddendum();z!==""&&(m+="%s",P=P.concat([z]));var ye=P.map(function(fe){return String(fe)});ye.unshift("Warning: "+m),Function.prototype.apply.call(console[l],console,ye)}}var On={};function wn(l,m){{var P=l.constructor,$=P&&(P.displayName||P.name)||"ReactClass",z=$+"."+m;if(On[z])return;le("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",m,$),On[z]=!0}}var O={isMounted:function(l){return!1},enqueueForceUpdate:function(l,m,P){wn(l,"forceUpdate")},enqueueReplaceState:function(l,m,P,$){wn(l,"replaceState")},enqueueSetState:function(l,m,P,$){wn(l,"setState")}},Y=Object.assign,Oe={};Object.freeze(Oe);function Ce(l,m,P){this.props=l,this.context=m,this.refs=Oe,this.updater=P||O}Ce.prototype.isReactComponent={},Ce.prototype.setState=function(l,m){if(typeof l!="object"&&typeof l!="function"&&l!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,l,m,"setState")},Ce.prototype.forceUpdate=function(l){this.updater.enqueueForceUpdate(this,l,"forceUpdate")};{var ee={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},qe=function(l,m){Object.defineProperty(Ce.prototype,l,{get:function(){Yt("%s(...) is deprecated in plain JavaScript React classes. %s",m[0],m[1])}})};for(var Rt in ee)ee.hasOwnProperty(Rt)&&qe(Rt,ee[Rt])}function ut(){}ut.prototype=Ce.prototype;function nt(l,m,P){this.props=l,this.context=m,this.refs=Oe,this.updater=P||O}var Ft=nt.prototype=new ut;Ft.constructor=nt,Y(Ft,Ce.prototype),Ft.isPureReactComponent=!0;function $r(){var l={current:null};return Object.seal(l),l}var ir=Array.isArray;function br(l){return ir(l)}function vn(l){{var m=typeof Symbol=="function"&&Symbol.toStringTag,P=m&&l[Symbol.toStringTag]||l.constructor.name||"Object";return P}}function Nr(l){try{return Zi(l),!1}catch{return!0}}function Zi(l){return""+l}function sn(l){if(Nr(l))return le("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",vn(l)),Zi(l)}function gi(l,m,P){var $=l.displayName;if($)return $;var z=m.displayName||m.name||"";return z!==""?P+"("+z+")":P}function Bn(l){return l.displayName||"Context"}function Jt(l){if(l==null)return null;if(typeof l.tag=="number"&&le("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case y:return"Fragment";case c:return"Portal";case T:return"Profiler";case w:return"StrictMode";case ue:return"Suspense";case _e:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case j:var m=l;return Bn(m)+".Consumer";case H:var P=l;return Bn(P._context)+".Provider";case Q:return gi(l,l.render,"ForwardRef");case ce:var $=l.displayName||null;return $!==null?$:Jt(l.type)||"Memo";case $e:{var z=l,ye=z._payload,fe=z._init;try{return Jt(fe(ye))}catch{return null}}}return null}var Vt=Object.prototype.hasOwnProperty,Dn={key:!0,ref:!0,__self:!0,__source:!0},or,Mr,Pn;Pn={};function Br(l){if(Vt.call(l,"ref")){var m=Object.getOwnPropertyDescriptor(l,"ref").get;if(m&&m.isReactWarning)return!1}return l.ref!==void 0}function Fn(l){if(Vt.call(l,"key")){var m=Object.getOwnPropertyDescriptor(l,"key").get;if(m&&m.isReactWarning)return!1}return l.key!==void 0}function Wn(l,m){var P=function(){or||(or=!0,le("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};P.isReactWarning=!0,Object.defineProperty(l,"key",{get:P,configurable:!0})}function Xr(l,m){var P=function(){Mr||(Mr=!0,le("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};P.isReactWarning=!0,Object.defineProperty(l,"ref",{get:P,configurable:!0})}function _i(l){if(typeof l.ref=="string"&&At.current&&l.__self&&At.current.stateNode!==l.__self){var m=Jt(At.current.type);Pn[m]||(le('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',m,l.ref),Pn[m]=!0)}}var sr=function(l,m,P,$,z,ye,fe){var Le={$$typeof:f,type:l,key:m,ref:P,props:fe,_owner:ye};return Le._store={},Object.defineProperty(Le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(Le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.freeze&&(Object.freeze(Le.props),Object.freeze(Le)),Le};function Dr(l,m,P){var $,z={},ye=null,fe=null,Le=null,et=null;if(m!=null){Br(m)&&(fe=m.ref,_i(m)),Fn(m)&&(sn(m.key),ye=""+m.key),Le=m.__self===void 0?null:m.__self,et=m.__source===void 0?null:m.__source;for($ in m)Vt.call(m,$)&&!Dn.hasOwnProperty($)&&(z[$]=m[$])}var xt=arguments.length-2;if(xt===1)z.children=P;else if(xt>1){for(var Ot=Array(xt),Xe=0;Xe<xt;Xe++)Ot[Xe]=arguments[Xe+2];Object.freeze&&Object.freeze(Ot),z.children=Ot}if(l&&l.defaultProps){var Ut=l.defaultProps;for($ in Ut)z[$]===void 0&&(z[$]=Ut[$])}if(ye||fe){var at=typeof l=="function"?l.displayName||l.name||"Unknown":l;ye&&Wn(z,at),fe&&Xr(z,at)}return sr(l,ye,fe,Le,et,At.current,z)}function mr(l,m){var P=sr(l.type,m,l.ref,l._self,l._source,l._owner,l.props);return P}function fr(l,m,P){if(l==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+l+".");var $,z=Y({},l.props),ye=l.key,fe=l.ref,Le=l._self,et=l._source,xt=l._owner;if(m!=null){Br(m)&&(fe=m.ref,xt=At.current),Fn(m)&&(sn(m.key),ye=""+m.key);var Ot;l.type&&l.type.defaultProps&&(Ot=l.type.defaultProps);for($ in m)Vt.call(m,$)&&!Dn.hasOwnProperty($)&&(m[$]===void 0&&Ot!==void 0?z[$]=Ot[$]:z[$]=m[$])}var Xe=arguments.length-2;if(Xe===1)z.children=P;else if(Xe>1){for(var Ut=Array(Xe),at=0;at<Xe;at++)Ut[at]=arguments[at+2];z.children=Ut}return sr(l.type,ye,fe,Le,et,xt,z)}function fn(l){return typeof l=="object"&&l!==null&&l.$$typeof===f}var jn=".",wr=":";function Fr(l){var m=/[=:]/g,P={"=":"=0",":":"=2"},$=l.replace(m,function(z){return P[z]});return"$"+$}var Er=!1,vi=/\/+/g;function Qr(l){return l.replace(vi,"$&/")}function ei(l,m){return typeof l=="object"&&l!==null&&l.key!=null?(sn(l.key),Fr(""+l.key)):m.toString(36)}function ti(l,m,P,$,z){var ye=typeof l;(ye==="undefined"||ye==="boolean")&&(l=null);var fe=!1;if(l===null)fe=!0;else switch(ye){case"string":case"number":fe=!0;break;case"object":switch(l.$$typeof){case f:case c:fe=!0}}if(fe){var Le=l,et=z(Le),xt=$===""?jn+ei(Le,0):$;if(br(et)){var Ot="";xt!=null&&(Ot=Qr(xt)+"/"),ti(et,m,Ot,"",function(mu){return mu})}else et!=null&&(fn(et)&&(et.key&&(!Le||Le.key!==et.key)&&sn(et.key),et=mr(et,P+(et.key&&(!Le||Le.key!==et.key)?Qr(""+et.key)+"/":"")+xt)),m.push(et));return 1}var Xe,Ut,at=0,Xt=$===""?jn:$+wr;if(br(l))for(var bi=0;bi<l.length;bi++)Xe=l[bi],Ut=Xt+ei(Xe,bi),at+=ti(Xe,m,P,Ut,z);else{var kn=Ve(l);if(typeof kn=="function"){var mi=l;kn===mi.entries&&(Er||Yt("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Er=!0);for(var Ko=kn.call(mi),Pt,Ar=0;!(Pt=Ko.next()).done;)Xe=Pt.value,Ut=Xt+ei(Xe,Ar++),at+=ti(Xe,m,P,Ut,z)}else if(ye==="object"){var to=String(l);throw new Error("Objects are not valid as a React child (found: "+(to==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":to)+"). If you meant to render a collection of children, use an array instead.")}}return at}function hn(l,m,P){if(l==null)return l;var $=[],z=0;return ti(l,$,"","",function(ye){return m.call(P,ye,z++)}),$}function ar(l){var m=0;return hn(l,function(){m++}),m}function Sr(l,m,P){hn(l,function(){m.apply(this,arguments)},P)}function ni(l){return hn(l,function(m){return m})||[]}function yi(l){if(!fn(l))throw new Error("React.Children.only expected to receive a single React element child.");return l}function Xi(l){var m={$$typeof:j,_currentValue:l,_currentValue2:l,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};m.Provider={$$typeof:H,_context:m};var P=!1,$=!1,z=!1;{var ye={$$typeof:j,_context:m};Object.defineProperties(ye,{Provider:{get:function(){return $||($=!0,le("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),m.Provider},set:function(fe){m.Provider=fe}},_currentValue:{get:function(){return m._currentValue},set:function(fe){m._currentValue=fe}},_currentValue2:{get:function(){return m._currentValue2},set:function(fe){m._currentValue2=fe}},_threadCount:{get:function(){return m._threadCount},set:function(fe){m._threadCount=fe}},Consumer:{get:function(){return P||(P=!0,le("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),m.Consumer}},displayName:{get:function(){return m.displayName},set:function(fe){z||(Yt("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",fe),z=!0)}}}),m.Consumer=ye}return m._currentRenderer=null,m._currentRenderer2=null,m}var Wr=-1,Kt=0,xi=1,u=2;function p(l){if(l._status===Wr){var m=l._result,P=m();if(P.then(function(ye){if(l._status===Kt||l._status===Wr){var fe=l;fe._status=xi,fe._result=ye}},function(ye){if(l._status===Kt||l._status===Wr){var fe=l;fe._status=u,fe._result=ye}}),l._status===Wr){var $=l;$._status=Kt,$._result=P}}if(l._status===xi){var z=l._result;return z===void 0&&le(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))
Did you accidentally put curly braces around the import?`,z),"default"in z||le(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))`,z),z.default}else throw l._result}function d(l){var m={_status:Wr,_result:l},P={$$typeof:$e,_payload:m,_init:p};{var $,z;Object.defineProperties(P,{defaultProps:{configurable:!0,get:function(){return $},set:function(ye){le("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),$=ye,Object.defineProperty(P,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return z},set:function(ye){le("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),z=ye,Object.defineProperty(P,"propTypes",{enumerable:!0})}}})}return P}function s(l){l!=null&&l.$$typeof===ce?le("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof l!="function"?le("forwardRef requires a render function but was given %s.",l===null?"null":typeof l):l.length!==0&&l.length!==2&&le("forwardRef render functions accept exactly two parameters: props and ref. %s",l.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),l!=null&&(l.defaultProps!=null||l.propTypes!=null)&&le("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var m={$$typeof:Q,render:l};{var P;Object.defineProperty(m,"displayName",{enumerable:!1,configurable:!0,get:function(){return P},set:function($){P=$,!l.name&&!l.displayName&&(l.displayName=$)}})}return m}var v;v=Symbol.for("react.module.reference");function A(l){return!!(typeof l=="string"||typeof l=="function"||l===y||l===T||In||l===w||l===ue||l===_e||xr||l===pe||rr||vr||yr||typeof l=="object"&&l!==null&&(l.$$typeof===$e||l.$$typeof===ce||l.$$typeof===H||l.$$typeof===j||l.$$typeof===Q||l.$$typeof===v||l.getModuleId!==void 0))}function I(l,m){A(l)||le("memo: The first argument must be a component. Instead received: %s",l===null?"null":typeof l);var P={$$typeof:ce,type:l,compare:m===void 0?null:m};{var $;Object.defineProperty(P,"displayName",{enumerable:!1,configurable:!0,get:function(){return $},set:function(z){$=z,!l.name&&!l.displayName&&(l.displayName=z)}})}return P}function N(){var l=_t.current;return l===null&&le(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),l}function G(l){var m=N();if(l._context!==void 0){var P=l._context;P.Consumer===l?le("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):P.Provider===l&&le("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return m.useContext(l)}function se(l){var m=N();return m.useState(l)}function J(l,m,P){var $=N();return $.useReducer(l,m,P)}function Qe(l){var m=N();return m.useRef(l)}function ne(l,m){var P=N();return P.useEffect(l,m)}function be(l,m){var P=N();return P.useInsertionEffect(l,m)}function Ee(l,m){var P=N();return P.useLayoutEffect(l,m)}function Ne(l,m){var P=N();return P.useCallback(l,m)}function Se(l,m){var P=N();return P.useMemo(l,m)}function Ae(l,m,P){var $=N();return $.useImperativeHandle(l,m,P)}function ve(l,m){{var P=N();return P.useDebugValue(l,m)}}function Re(){var l=N();return l.useTransition()}function re(l){var m=N();return m.useDeferredValue(l)}function ae(){var l=N();return l.useId()}function Z(l,m,P){var $=N();return $.useSyncExternalStore(l,m,P)}var te=0,ie,V,C,U,k,B,D;function q(){}q.__reactDisabledLog=!0;function ge(){{if(te===0){ie=console.log,V=console.info,C=console.warn,U=console.error,k=console.group,B=console.groupCollapsed,D=console.groupEnd;var l={configurable:!0,enumerable:!0,value:q,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}te++}}function Me(){{if(te--,te===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},l,{value:ie}),info:Y({},l,{value:V}),warn:Y({},l,{value:C}),error:Y({},l,{value:U}),group:Y({},l,{value:k}),groupCollapsed:Y({},l,{value:B}),groupEnd:Y({},l,{value:D})})}te<0&&le("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Pe=on.ReactCurrentDispatcher,me;function x(l,m,P){{if(me===void 0)try{throw Error()}catch(z){var $=z.stack.trim().match(/\n( *(at )?)/);me=$&&$[1]||""}return`
`+me+l}}var Be=!1,je;{var Je=typeof WeakMap=="function"?WeakMap:Map;je=new Je}function Ue(l,m){if(!l||Be)return"";{var P=je.get(l);if(P!==void 0)return P}var $;Be=!0;var z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ye;ye=Pe.current,Pe.current=null,ge();try{if(m){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(Xt){$=Xt}Reflect.construct(l,[],fe)}else{try{fe.call()}catch(Xt){$=Xt}l.call(fe.prototype)}}else{try{throw Error()}catch(Xt){$=Xt}l()}}catch(Xt){if(Xt&&$&&typeof Xt.stack=="string"){for(var Le=Xt.stack.split(`
`),et=$.stack.split(`
`),xt=Le.length-1,Ot=et.length-1;xt>=1&&Ot>=0&&Le[xt]!==et[Ot];)Ot--;for(;xt>=1&&Ot>=0;xt--,Ot--)if(Le[xt]!==et[Ot]){if(xt!==1||Ot!==1)do if(xt--,Ot--,Ot<0||Le[xt]!==et[Ot]){var Xe=`
`+Le[xt].replace(" at new "," at ");return l.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",l.displayName)),typeof l=="function"&&je.set(l,Xe),Xe}while(xt>=1&&Ot>=0);break}}}finally{Be=!1,Pe.current=ye,Me(),Error.prepareStackTrace=z}var Ut=l?l.displayName||l.name:"",at=Ut?x(Ut):"";return typeof l=="function"&&je.set(l,at),at}function Ze(l,m,P){return Ue(l,!1)}function He(l){var m=l.prototype;return!!(m&&m.isReactComponent)}function vt(l,m,P){if(l==null)return"";if(typeof l=="function")return Ue(l,He(l));if(typeof l=="string")return x(l);switch(l){case ue:return x("Suspense");case _e:return x("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case Q:return Ze(l.render);case ce:return vt(l.type,m,P);case $e:{var $=l,z=$._payload,ye=$._init;try{return vt(ye(z),m,P)}catch{}}}return""}var rt={},ct=on.ReactDebugCurrentFrame;function yt(l){if(l){var m=l._owner,P=vt(l.type,l._source,m?m.type:null);ct.setExtraStackFrame(P)}else ct.setExtraStackFrame(null)}function It(l,m,P,$,z){{var ye=Function.call.bind(Vt);for(var fe in l)if(ye(l,fe)){var Le=void 0;try{if(typeof l[fe]!="function"){var et=Error(($||"React class")+": "+P+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw et.name="Invariant Violation",et}Le=l[fe](m,fe,$,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(xt){Le=xt}Le&&!(Le instanceof Error)&&(yt(z),le("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$||"React class",P,fe,typeof Le),yt(null)),Le instanceof Error&&!(Le.message in rt)&&(rt[Le.message]=!0,yt(z),le("Failed %s type: %s",P,Le.message),yt(null))}}}function Tt(l){if(l){var m=l._owner,P=vt(l.type,l._source,m?m.type:null);nr(P)}else nr(null)}var Mt;Mt=!1;function Wt(){if(At.current){var l=Jt(At.current.type);if(l)return`
Check the render method of \``+l+"`."}return""}function qt(l){if(l!==void 0){var m=l.fileName.replace(/^.*[\\\/]/,""),P=l.lineNumber;return`
Check your code at `+m+":"+P+"."}return""}function Qs(l){return l!=null?qt(l.__source):""}var ef={};function pu(l){var m=Wt();if(!m){var P=typeof l=="string"?l:l.displayName||l.name;P&&(m=`
Check the top-level render call using <`+P+">.")}return m}function tf(l,m){if(!(!l._store||l._store.validated||l.key!=null)){l._store.validated=!0;var P=pu(m);if(!ef[P]){ef[P]=!0;var $="";l&&l._owner&&l._owner!==At.current&&($=" It was passed a child from "+Jt(l._owner.type)+"."),Tt(l),le('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',P,$),Tt(null)}}}function Do(l,m){if(typeof l=="object"){if(br(l))for(var P=0;P<l.length;P++){var $=l[P];fn($)&&tf($,m)}else if(fn(l))l._store&&(l._store.validated=!0);else if(l){var z=Ve(l);if(typeof z=="function"&&z!==l.entries)for(var ye=z.call(l),fe;!(fe=ye.next()).done;)fn(fe.value)&&tf(fe.value,m)}}}function nf(l){{var m=l.type;if(m==null||typeof m=="string")return;var P;if(typeof m=="function")P=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===Q||m.$$typeof===ce))P=m.propTypes;else return;if(P){var $=Jt(m);It(P,l.props,"prop",$,l)}else if(m.PropTypes!==void 0&&!Mt){Mt=!0;var z=Jt(m);le("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",z||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&le("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gu(l){{for(var m=Object.keys(l.props),P=0;P<m.length;P++){var $=m[P];if($!=="children"&&$!=="key"){Tt(l),le("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Tt(null);break}}l.ref!==null&&(Tt(l),le("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}function rf(l,m,P){var $=A(l);if(!$){var z="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ye=Qs(m);ye?z+=ye:z+=Wt();var fe;l===null?fe="null":br(l)?fe="array":l!==void 0&&l.$$typeof===f?(fe="<"+(Jt(l.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):fe=typeof l,le("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",fe,z)}var Le=Dr.apply(this,arguments);if(Le==null)return Le;if($)for(var et=2;et<arguments.length;et++)Do(arguments[et],l);return l===y?gu(Le):nf(Le),Le}var of=!1;function Fo(l){var m=rf.bind(null,l);return m.type=l,of||(of=!0,Yt("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(m,"type",{enumerable:!1,get:function(){return Yt("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:l}),l}}),m}function _u(l,m,P){for(var $=fr.apply(this,arguments),z=2;z<arguments.length;z++)Do(arguments[z],$.type);return nf($),$}function vu(l,m){var P=dt.transition;dt.transition={};var $=dt.transition;dt.transition._updatedFibers=new Set;try{l()}finally{if(dt.transition=P,P===null&&$._updatedFibers){var z=$._updatedFibers.size;z>10&&Yt("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),$._updatedFibers.clear()}}}var sf=!1,Qi=null;function yu(l){if(Qi===null)try{var m=("require"+Math.random()).slice(0,7),P=i&&i[m];Qi=P.call(i,"timers").setImmediate}catch{Qi=function(z){sf===!1&&(sf=!0,typeof MessageChannel>"u"&&le("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var ye=new MessageChannel;ye.port1.onmessage=z,ye.port2.postMessage(void 0)}}return Qi(l)}var lt=0,wt=!1;function ff(l){{var m=lt;lt++,ft.current===null&&(ft.current=[]);var P=ft.isBatchingLegacy,$;try{if(ft.isBatchingLegacy=!0,$=l(),!P&&ft.didScheduleLegacyUpdate){var z=ft.current;z!==null&&(ft.didScheduleLegacyUpdate=!1,ko(z))}}catch(Ut){throw eo(m),Ut}finally{ft.isBatchingLegacy=P}if($!==null&&typeof $=="object"&&typeof $.then=="function"){var ye=$,fe=!1,Le={then:function(Ut,at){fe=!0,ye.then(function(Xt){eo(m),lt===0?Wo(Xt,Ut,at):Ut(Xt)},function(Xt){eo(m),at(Xt)})}};return!wt&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){fe||(wt=!0,le("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),Le}else{var et=$;if(eo(m),lt===0){var xt=ft.current;xt!==null&&(ko(xt),ft.current=null);var Ot={then:function(Ut,at){ft.current===null?(ft.current=[],Wo(et,Ut,at)):Ut(et)}};return Ot}else{var Xe={then:function(Ut,at){Ut(et)}};return Xe}}}}function eo(l){l!==lt-1&&le("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),lt=l}function Wo(l,m,P){{var $=ft.current;if($!==null)try{ko($),yu(function(){$.length===0?(ft.current=null,m(l)):Wo(l,m,P)})}catch(z){P(z)}else m(l)}}var jo=!1;function ko(l){if(!jo){jo=!0;var m=0;try{for(;m<l.length;m++){var P=l[m];do P=P(!0);while(P!==null)}l.length=0}catch($){throw l=l.slice(m+1),$}finally{jo=!1}}}var xu=rf,af=_u,bu=Fo,Zt={map:hn,forEach:Sr,count:ar,toArray:ni,only:yi};n.Children=Zt,n.Component=Ce,n.Fragment=y,n.Profiler=T,n.PureComponent=nt,n.StrictMode=w,n.Suspense=ue,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=on,n.act=ff,n.cloneElement=af,n.createContext=Xi,n.createElement=xu,n.createFactory=bu,n.createRef=$r,n.forwardRef=s,n.isValidElement=fn,n.lazy=d,n.memo=I,n.startTransition=vu,n.unstable_act=ff,n.useCallback=Ne,n.useContext=G,n.useDebugValue=ve,n.useDeferredValue=re,n.useEffect=ne,n.useId=ae,n.useImperativeHandle=Ae,n.useInsertionEffect=be,n.useLayoutEffect=Ee,n.useMemo=Se,n.useReducer=J,n.useRef=Qe,n.useState=se,n.useSyncExternalStore=Z,n.useTransition=Re,n.version=r,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(vo,vo.exports)),vo.exports}process.env.NODE_ENV==="production"?F0():W0();class ci extends Error{constructor(n,r,f){super(typeof r=="object"?r.message:r||n,{cause:typeof r=="object"?r.cause:f}),this.type=n,Object.setPrototypeOf(this,ci.prototype)}}function j0(i){return i.replace(/_[a-z]/g,n=>n[1].toUpperCase())}const k0="ERR_INVALID_VALUE",K0="ERR_UNEXPECTED_VALUE",q0="ERR_UNEXPECTED_TYPE",Pc="ERR_PARSE";function z0(i,n){const r={};for(const f in i){const c=i[f];if(!c)continue;let y,w;typeof c=="function"?(y=f,w=c):[y,w]=c;try{const T=w(n(y));T!==void 0&&(r[f]=T)}catch(T){throw new ci(Pc,`Parser for "${f}" property failed${y===f?"":`. Source field: "${y}"`}`,T)}}return r}function Cc(i){let n=i;if(typeof n=="string")try{n=JSON.parse(n)}catch(r){throw new ci(k0,{cause:r})}if(typeof n!="object"||!n||Array.isArray(n))throw new ci(K0);return n}function yo(i,n){return r=>{const f=c=>{if(!(r&&c===void 0))try{return n(c)}catch(y){throw new ci(Pc,{message:`"${i}" transformer failed to parse the value`,cause:y})}};return Object.assign(f,{isValid(c){try{return f(c),!0}catch{return!1}}})}}function H0(i,n){return yo("object",r=>{const f=Cc(r);return z0(i,c=>f[c])})}function Uc(i){throw new ci(q0,`Unexpected value received: ${JSON.stringify(i)}`)}const Vf=yo("string",i=>{if(typeof i=="string"||typeof i=="number")return i.toString();Uc(i)});function xo(i){return/^#[\da-f]{6}$/i.test(i)}function G0(i){return/^#[\da-f]{3}$/i.test(i)}function Y0(i){const n=i.replace(/\s/g,"").toLowerCase();if(xo(n))return n;if(G0(n)){let f="#";for(let c=0;c<3;c+=1)f+=n[1+c].repeat(2);return f}const r=n.match(/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/)||n.match(/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),\d{1,3}\)$/);if(!r)throw new Error(`Value "${i}" does not satisfy any of known RGB formats.`);return r.slice(1).reduce((f,c)=>{const y=parseInt(c,10).toString(16);return f+(y.length===1?"0":"")+y},"#")}const V0=yo("rgb",i=>Y0(Vf()(i))),J0=yo("themeParams",i=>{const n=V0(!0);return Object.entries(Cc(i)).reduce((r,[f,c])=>(r[j0(f)]=n(c),r),{})});function Z0(i,n){return yo("array",r=>{let f;if(Array.isArray(r))f=r;else if(typeof r=="string")try{const c=JSON.parse(r);Array.isArray(c)&&(f=c)}catch{}return f||Uc(r),f.map(i)})}let bo=class B0 extends Error{constructor(n,r,f){super(typeof r=="object"?r.message:r||n,{cause:typeof r=="object"?r.cause:f}),this.type=n,Object.setPrototypeOf(this,B0.prototype)}};function Lc(i){return i.replace(/[A-Z]/g,n=>`_${n.toLowerCase()}`)}function X0(i){return i.replace(/_[a-z]/g,n=>n[1].toUpperCase())}const Q0="ERR_INVALID_VALUE",ep="ERR_UNEXPECTED_VALUE",tp="ERR_UNEXPECTED_TYPE",$c="ERR_PARSE";function Nc(i,n){const r={};for(const f in i){const c=i[f];if(!c)continue;let y,w;typeof c=="function"?(y=f,w=c):[y,w]=c;try{const T=w(n(y));T!==void 0&&(r[f]=T)}catch(T){throw new bo($c,`Parser for "${f}" property failed${y===f?"":`. Source field: "${y}"`}`,T)}}return r}function Mc(i){let n=i;if(typeof n=="string")try{n=JSON.parse(n)}catch(r){throw new bo(Q0,{cause:r})}if(typeof n!="object"||!n||Array.isArray(n))throw new bo(ep);return n}function dr(i,n){return r=>{const f=c=>{if(!(r&&c===void 0))try{return n(c)}catch(y){throw new bo($c,{message:`"${i}" transformer failed to parse the value`,cause:y})}};return Object.assign(f,{isValid(c){try{return f(c),!0}catch{return!1}}})}}function pr(i,n){return dr(n||"object",r=>{const f=Mc(r);return Nc(i,c=>f[c])})}function mo(i){throw new bo(tp,`Unexpected value received: ${JSON.stringify(i)}`)}const ss=dr("boolean",i=>{if(typeof i=="boolean")return i;const n=String(i);if(n==="1"||n==="true")return!0;if(n==="0"||n==="false")return!1;mo(i)}),Vn=dr("string",i=>{if(typeof i=="string"||typeof i=="number")return i.toString();mo(i)}),wo=dr("number",i=>{if(typeof i=="number")return i;if(typeof i=="string"){const n=Number(i);if(!Number.isNaN(n))return n}mo(i)}),np=dr("date",i=>i instanceof Date?i:new Date(wo()(i)*1e3));function Bc(i,n){return dr(n||"searchParams",r=>{typeof r!="string"&&!(r instanceof URLSearchParams)&&mo(r);const f=typeof r=="string"?new URLSearchParams(r):r;return Nc(i,c=>{const y=f.get(c);return y===null?void 0:y})})}function Jf(i){for(const n in i)i[n]=[Lc(n),i[n]];return i}const rp=i=>{const n=wo(),r=wo(!0),f=Vn(),c=Vn(!0),y=ss(!0),w=pr(Jf({addedToAttachmentMenu:y,allowsWriteToPm:y,firstName:f,id:n,isBot:y,isPremium:y,languageCode:c,lastName:c,photoUrl:c,username:c}),"User")(!0);return Bc(Jf({authDate:np(),canSendAfter:r,chat:pr(Jf({id:n,type:f,title:f,photoUrl:c,username:c}),"Chat")(!0),chatInstance:c,chatType:c,hash:f,queryId:c,receiver:w,startParam:c,user:w}),"initData")(i)};function ip(i){return/^#[\da-f]{6}$/i.test(i)}function op(i){return/^#[\da-f]{3}$/i.test(i)}function sp(i){const n=i.replace(/\s/g,"").toLowerCase();if(ip(n))return n;if(op(n)){let f="#";for(let c=0;c<3;c+=1)f+=n[1+c].repeat(2);return f}const r=n.match(/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/)||n.match(/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),\d{1,3}\)$/);if(!r)throw new Error(`Value "${i}" does not satisfy any of known RGB formats.`);return r.slice(1).reduce((f,c)=>{const y=parseInt(c,10).toString(16);return f+(y.length===1?"0":"")+y},"#")}const fp=dr("rgb",i=>sp(Vn()(i))),Dc=dr("themeParams",i=>{const n=fp(!0);return Object.entries(Mc(i)).reduce((r,[f,c])=>(r[X0(f)]=n(c),r),{})});function Fc(i){return JSON.stringify(Object.fromEntries(Object.entries(i).map(([n,r])=>[Lc(n),r])))}const ap=i=>{const n=Vn(),r=Vn(!0),f=ss(!0);return Bc({botInline:["tgWebAppBotInline",f],defaultColors:["tgWebAppDefaultColors",Dc(!0)],fullscreen:["tgWebAppFullscreen",f],initData:["tgWebAppData",rp(!0)],initDataRaw:["tgWebAppData",r],platform:["tgWebAppPlatform",n],showSettings:["tgWebAppShowSettings",f],startParam:["tgWebAppStartParam",r],themeParams:["tgWebAppThemeParams",Dc()],version:["tgWebAppVersion",n]},"launchParams")(i)};function up(i){const{initDataRaw:n,startParam:r,showSettings:f,botInline:c,fullscreen:y,defaultColors:w}=i,T=new URLSearchParams;return T.set("tgWebAppPlatform",i.platform),T.set("tgWebAppThemeParams",Fc(i.themeParams)),T.set("tgWebAppVersion",i.version),n&&T.set("tgWebAppData",n),r&&T.set("tgWebAppStartParam",r),typeof f=="boolean"&&T.set("tgWebAppShowSettings",f?"1":"0"),typeof c=="boolean"&&T.set("tgWebAppBotInline",c?"1":"0"),typeof y=="boolean"&&T.set("tgWebAppFullscreen",y?"1":"0"),w&&T.set("tgWebAppDefaultColors",Fc(w)),T.toString()}const cp=pr({eventType:Vn(),eventData:i=>i},"miniAppsMessage"),Wc=dr("fn",i=>{if(typeof i=="function")return i;mo(i)});function lp(i){return!!i&&typeof i=="object"&&!Array.isArray(i)}const hp=pr({TelegramWebviewProxy:pr({postEvent:Wc()})()});function jc(i){return hp().isValid(i)}function dp(){try{return window.self!==window.top}catch{return!0}}var pp=Object.defineProperty,gp=(i,n,r)=>n in i?pp(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,kc=(i,n,r)=>gp(i,typeof n!="symbol"?n+"":n,r);let ht=class D0 extends Error{constructor(n,r,f){super(typeof r=="object"?r.message:r||n,{cause:typeof r=="object"?r.cause:f}),this.type=n,Object.setPrototypeOf(this,D0.prototype)}};function Kc(i,n,r){return i.addEventListener(n,r),()=>i.removeEventListener(n,r)}function Ci(...i){const n=i.flat(1);return[n.push.bind(n),()=>{n.forEach(r=>{r()})}]}const _p="ERR_ABORTED",vp="ERR_CANCELED",yp="ERR_TIMED_OUT";function qc(i){return new ht(_p,{cause:i})}function zc(i,n){return i.reject=n.reject,i}class tn extends Promise{constructor(n,r){let f,c;typeof n=="function"?(f=n,c=r):c=n;let y,w;super((T,H)=>{c||(c={});const{abortSignal:j}=c;if(j&&j.aborted)return H(qc(j.reason));const[Q,ue]=Ci(),_e=de=>(...mt)=>(ue(),de(...mt)),ce=new AbortController,{signal:$e}=ce;w=_e(de=>{ce.abort(de),H(de)}),y=_e(T),j&&Q(Kc(j,"abort",()=>{w(qc(j.reason))}));const{timeout:pe}=c;if(pe){const de=setTimeout(()=>{w(new ht(yp,`Timeout reached: ${pe}ms`))},pe);Q(()=>{clearTimeout(de)})}f&&f(y,w,$e)}),kc(this,"reject"),this.reject=w}static withFn(n,r){return new tn((f,c,y)=>{try{const w=n(y);return w instanceof Promise?w.then(f,c):f(w)}catch(w){c(w)}},r)}static resolve(n){return new tn(r=>{r(n)})}static reject(n){return new tn((r,f)=>{f(n)})}cancel(){this.reject(new ht(vp))}catch(n){return this.then(void 0,n)}finally(n){return zc(super.finally(n),this)}then(n,r){return zc(super.then(n,r),this)}}function Hc(i,n){return i.resolve=n.resolve,i}let xp=class Yf extends tn{constructor(n,r){let f,c;typeof n=="function"?(f=n,c=r):c=n;let y;super((w,T,H)=>{y=w,f&&f(w,T,H)},c),kc(this,"resolve"),this.resolve=y}static withFn(n,r){return new Yf((f,c,y)=>tn.withFn(n,{abortSignal:y}).then(f,c),r)}static resolve(n){return new Yf(r=>{r(n)})}static reject(n){return new Yf((r,f)=>{f(n)})}catch(n){return this.then(void 0,n)}finally(n){return Hc(super.finally(n),this)}then(n,r){return Hc(super.then(n,r),this)}};function Gc(i){return`tapps/${i}`}function Jn(i,n){sessionStorage.setItem(Gc(i),JSON.stringify(n))}function Zn(i){const n=sessionStorage.getItem(Gc(i));try{return n?JSON.parse(n):void 0}catch{}}function Zf(i){return i.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function bp(i,n){n||(n={});const{textColor:r,bgColor:f,shouldLog:c=!0}=n;function y(w,...T){if(!c||typeof c=="function"&&!c())return;const H="font-weight:bold;padding:0 5px;border-radius:5px";console[w](`%c${Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,timeZone:"UTC"}).format(new Date)}%c / %c${i}`,`${H};background-color: lightblue;color:black`,"",`${H};${r?`color:${r};`:""}${f?`background-color:${f}`:""}`,...T)}return[function(...w){y("log",...w)},function(...w){y("error",...w)}]}function Xf(i,n){document.documentElement.style.setProperty(i,n)}function Qf(i){document.documentElement.style.removeProperty(i)}function mp(i,n){n()}function Ui(i,n){n||(n={});const r=n.equals||Object.is;let f=[],c=i;const y=j=>{if(!r(c,j)){const Q=c;c=j,mp(H,()=>{[...f].forEach(([ue,_e])=>{ue(j,Q),_e&&T(ue,!0)})})}};function w(j){const Q=typeof j!="object"?{once:j}:j;return{once:Q.once||!1,signal:Q.signal||!1}}const T=(j,Q)=>{const ue=w(Q),_e=f.findIndex(([ce,$e])=>ce===j&&$e.once===ue.once&&$e.signal===ue.signal);_e>=0&&f.splice(_e,1)},H=Object.assign(function(){return wp(H),c},{destroy(){f=[]},set:y,reset(){y(i)},sub(j,Q){return f.push([j,w(Q)]),()=>T(j,Q)},unsub:T,unsubAll(){f=f.filter(j=>j[1].signal)}});return H}const ea=[];function wp(i){ea.length&&ea[ea.length-1].add(i)}const Ep=Ui(!1),[Yc,Sp]=bp("Bridge",{bgColor:"#9147ff",textColor:"white",shouldLog:Ep}),Ap={clipboard_text_received:pr({req_id:Vn(),data:i=>i===null?i:Vn(!0)(i)},"clipboard_text_received"),custom_method_invoked:pr({req_id:Vn(),result:i=>i,error:Vn(!0)},"custom_method_invoked"),popup_closed:dr("popup_closed",i=>i?pr({button_id:n=>n==null?void 0:Vn()(n)})()(i):{}),viewport_changed:pr({height:wo(),width:i=>i==null?window.innerWidth:wo()(i),is_state_stable:ss(),is_expanded:ss()},"viewport_changed")};function Rp(i){const n=window,[,r]=Ci(Kc(n,"message",f=>{if(f.source!==n.parent)return;let c;try{c=cp()(f.data)}catch{return}const{eventType:y,eventData:w}=c,T=Ap[y];try{const H=T?T()(w):w;Yc("Event received:",H?{eventType:y,eventData:H}:{eventType:y}),i([y,H])}catch(H){Sp([`An error occurred processing the "${y}" event from the Telegram application.`,"Please, file an issue here:","https://github.com/Telegram-Mini-Apps/telegram-apps/issues/new/choose"].join(`
`),c,H)}}));return r}const Vc=Ui(),Jc=Ui();function Tp(){return Jc()||Jc.set(Rp(Vc.set)),Vc}const ta=Ui({});function Zc(i){let n=ta()[i];return n||(n=Ui(void 0,{equals(){return!1}}),Tp().sub(r=>{r&&r[0]===i&&n.set(r[1])}),ta.set({...ta(),[i]:n})),n}function Tn(i,n,r){return Zc(i).sub(n,r)}const Ip="ERR_METHOD_UNSUPPORTED",Op="ERR_RETRIEVE_LP_FAILED",Pp="ERR_METHOD_PARAMETER_UNSUPPORTED",Xc="ERR_UNKNOWN_ENV",Cp="ERR_INVOKE_CUSTOM_METHOD_RESPONSE",Up=Ui("https://web.telegram.org");function na(i,n){Yc("Posting event:",n?{eventType:i,eventData:n}:{eventType:i});const r=window;if(jc(r)){r.TelegramWebviewProxy.postEvent(i,JSON.stringify(n));return}const f=JSON.stringify({eventType:i,eventData:n});if(dp())return r.parent.postMessage(f,Up());const{external:c}=r;if(pr({notify:Wc()})().isValid(c)){c.notify(f);return}throw new ht(Xc)}function ra(i,n,r){r||(r={});const{capture:f}=r,[c,y]=Ci();return new tn(w=>{(Array.isArray(n)?n:[n]).forEach(T=>{c(Tn(T,H=>{(!f||(Array.isArray(n)?f({event:T,payload:H}):f(H)))&&w(H)}))}),(r.postEvent||na)(i,r.params)},r).finally(y)}function Qc(i){return ap()(i)}function el(i){return Qc(i.replace(/^[^?#]*[?#]/,"").replace(/[?#]/g,"&"))}function Lp(){return el(window.location.href)}function $p(){const i=performance.getEntriesByType("navigation")[0];if(!i)throw new Error("Unable to get first navigation entry.");return el(i.name)}const Np="launchParams";function Mp(){return Qc(Zn(Np)||"")}function Bp(i){Jn("launchParams",up(i))}function tl(i){return i instanceof Error?i.message+(i.cause?`
${tl(i.cause)}`:""):JSON.stringify(i)}function fs(){const i=[];for(const n of[Lp,$p,Mp])try{const r=n();return Bp(r),r}catch(r){i.push(r)}throw new ht(Op,["Unable to retrieve launch parameters from any known source. Perhaps, you have opened your app outside Telegram?","📖 Refer to docs for more information:","https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk/environment","Collected errors:",...i.map(n=>`— ${tl(n)}`)].join(`
`))}function as(i){if(i==="simple")try{return fs(),!0}catch{return!1}return tn.withFn(async()=>{if(jc(window))return!0;try{return await ra("web_app_request_theme","theme_changed",{timeout:100}),!0}catch{return!1}},i)}function Dp(i,n){window.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({eventType:i,eventData:n}),source:window.parent}))}function Fp(){[["TelegramGameProxy_receiveEvent"],["TelegramGameProxy","receiveEvent"],["Telegram","WebView","receiveEvent"]].forEach(i=>{let n=window;i.forEach((r,f,c)=>{if(f===c.length-1){n[r]=Dp;return}r in n||(n[r]={}),n=n[r]})})}function Wp(){["TelegramGameProxy_receiveEvent","TelegramGameProxy","Telegram"].forEach(i=>{delete window[i]})}function us(i,n,r){Zc