@dataramen/cli 0.0.55 → 0.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var J0;function hx(){if(J0)return ge;J0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function E(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,O={};function N(R,$,W){this.props=R,this.context=$,this.refs=O,this.updater=W||C}N.prototype.isReactComponent={},N.prototype.setState=function(R,$){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,$,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=N.prototype;function A(R,$,W){this.props=R,this.context=$,this.refs=O,this.updater=W||C}var j=A.prototype=new _;j.constructor=A,w(j,N.prototype),j.isPureReactComponent=!0;var B=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},Q=Object.prototype.hasOwnProperty;function G(R,$,W,I,se,Ce){return W=Ce.ref,{$$typeof:n,type:R,key:$,ref:W!==void 0?W:null,props:Ce}}function Z(R,$){return G(R.type,$,void 0,void 0,void 0,R.props)}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function pe(R){var $={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(W){return $[W]})}var Re=/\/+/g;function be(R,$){return typeof R=="object"&&R!==null&&R.key!=null?pe(""+R.key):$.toString(36)}function Ue(){}function ye(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Ue,Ue):(R.status="pending",R.then(function($){R.status==="pending"&&(R.status="fulfilled",R.value=$)},function($){R.status==="pending"&&(R.status="rejected",R.reason=$)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function Se(R,$,W,I,se){var Ce=typeof R;(Ce==="undefined"||Ce==="boolean")&&(R=null);var ce=!1;if(R===null)ce=!0;else switch(Ce){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(R.$$typeof){case n:case l:ce=!0;break;case g:return ce=R._init,Se(ce(R._payload),$,W,I,se)}}if(ce)return se=se(R),ce=I===""?"."+be(R,0):I,B(se)?(W="",ce!=null&&(W=ce.replace(Re,"$&/")+"/"),Se(se,$,W,"",function(Ze){return Ze})):se!=null&&(te(se)&&(se=Z(se,W+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(Re,"$&/")+"/")+ce)),$.push(se)),1;ce=0;var St=I===""?".":I+":";if(B(R))for(var qe=0;qe<R.length;qe++)I=R[qe],Ce=St+be(I,qe),ce+=Se(I,$,W,Ce,se);else if(qe=E(R),typeof qe=="function")for(R=qe.call(R),qe=0;!(I=R.next()).done;)I=I.value,Ce=St+be(I,qe++),ce+=Se(I,$,W,Ce,se);else if(Ce==="object"){if(typeof R.then=="function")return Se(ye(R),$,W,I,se);throw $=String(R),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ce}function k(R,$,W){if(R==null)return R;var I=[],se=0;return Se(R,I,"","",function(Ce){return $.call(W,Ce,se++)}),I}function X(R){if(R._status===-1){var $=R._result;$=$(),$.then(function(W){(R._status===0||R._status===-1)&&(R._status=1,R._result=W)},function(W){(R._status===0||R._status===-1)&&(R._status=2,R._result=W)}),R._status===-1&&(R._status=0,R._result=$)}if(R._status===1)return R._result.default;throw R._result}var J=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function ue(){}return ge.Children={map:k,forEach:function(R,$,W){k(R,function(){$.apply(this,arguments)},W)},count:function(R){var $=0;return k(R,function(){$++}),$},toArray:function(R){return k(R,function($){return $})||[]},only:function(R){if(!te(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},ge.Component=N,ge.Fragment=r,ge.Profiler=o,ge.PureComponent=A,ge.StrictMode=i,ge.Suspense=y,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ge.__COMPILER_RUNTIME={__proto__:null,c:function(R){return V.H.useMemoCache(R)}},ge.cache=function(R){return function(){return R.apply(null,arguments)}},ge.cloneElement=function(R,$,W){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var I=w({},R.props),se=R.key,Ce=void 0;if($!=null)for(ce in $.ref!==void 0&&(Ce=void 0),$.key!==void 0&&(se=""+$.key),$)!Q.call($,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&$.ref===void 0||(I[ce]=$[ce]);var ce=arguments.length-2;if(ce===1)I.children=W;else if(1<ce){for(var St=Array(ce),qe=0;qe<ce;qe++)St[qe]=arguments[qe+2];I.children=St}return G(R.type,se,void 0,void 0,Ce,I)},ge.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},ge.createElement=function(R,$,W){var I,se={},Ce=null;if($!=null)for(I in $.key!==void 0&&(Ce=""+$.key),$)Q.call($,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(se[I]=$[I]);var ce=arguments.length-2;if(ce===1)se.children=W;else if(1<ce){for(var St=Array(ce),qe=0;qe<ce;qe++)St[qe]=arguments[qe+2];se.children=St}if(R&&R.defaultProps)for(I in ce=R.defaultProps,ce)se[I]===void 0&&(se[I]=ce[I]);return G(R,Ce,void 0,void 0,null,se)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(R){return{$$typeof:m,render:R}},ge.isValidElement=te,ge.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:X}},ge.memo=function(R,$){return{$$typeof:p,type:R,compare:$===void 0?null:$}},ge.startTransition=function(R){var $=V.T,W={};V.T=W;try{var I=R(),se=V.S;se!==null&&se(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(ue,J)}catch(Ce){J(Ce)}finally{V.T=$}},ge.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ge.use=function(R){return V.H.use(R)},ge.useActionState=function(R,$,W){return V.H.useActionState(R,$,W)},ge.useCallback=function(R,$){return V.H.useCallback(R,$)},ge.useContext=function(R){return V.H.useContext(R)},ge.useDebugValue=function(){},ge.useDeferredValue=function(R,$){return V.H.useDeferredValue(R,$)},ge.useEffect=function(R,$,W){var I=V.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return I.useEffect(R,$)},ge.useId=function(){return V.H.useId()},ge.useImperativeHandle=function(R,$,W){return V.H.useImperativeHandle(R,$,W)},ge.useInsertionEffect=function(R,$){return V.H.useInsertionEffect(R,$)},ge.useLayoutEffect=function(R,$){return V.H.useLayoutEffect(R,$)},ge.useMemo=function(R,$){return V.H.useMemo(R,$)},ge.useOptimistic=function(R,$){return V.H.useOptimistic(R,$)},ge.useReducer=function(R,$,W){return V.H.useReducer(R,$,W)},ge.useRef=function(R){return V.H.useRef(R)},ge.useState=function(R){return V.H.useState(R)},ge.useSyncExternalStore=function(R,$,W){return V.H.useSyncExternalStore(R,$,W)},ge.useTransition=function(){return V.H.useTransition()},ge.version="19.1.0",ge}var I0;function Ud(){return I0||(I0=1,Ff.exports=hx()),Ff.exports}var x=Ud();const Ke=Su(x);var Gf={exports:{}},ar={},Xf={exports:{}},Zf={};/**
17
+ */var J0;function hx(){if(J0)return ge;J0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function E(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,O={};function N(R,$,W){this.props=R,this.context=$,this.refs=O,this.updater=W||C}N.prototype.isReactComponent={},N.prototype.setState=function(R,$){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,$,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=N.prototype;function A(R,$,W){this.props=R,this.context=$,this.refs=O,this.updater=W||C}var j=A.prototype=new _;j.constructor=A,w(j,N.prototype),j.isPureReactComponent=!0;var B=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},Q=Object.prototype.hasOwnProperty;function G(R,$,W,I,se,Ce){return W=Ce.ref,{$$typeof:n,type:R,key:$,ref:W!==void 0?W:null,props:Ce}}function Z(R,$){return G(R.type,$,void 0,void 0,void 0,R.props)}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function pe(R){var $={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(W){return $[W]})}var Re=/\/+/g;function be(R,$){return typeof R=="object"&&R!==null&&R.key!=null?pe(""+R.key):$.toString(36)}function Ue(){}function ye(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Ue,Ue):(R.status="pending",R.then(function($){R.status==="pending"&&(R.status="fulfilled",R.value=$)},function($){R.status==="pending"&&(R.status="rejected",R.reason=$)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function Se(R,$,W,I,se){var Ce=typeof R;(Ce==="undefined"||Ce==="boolean")&&(R=null);var ce=!1;if(R===null)ce=!0;else switch(Ce){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(R.$$typeof){case n:case l:ce=!0;break;case g:return ce=R._init,Se(ce(R._payload),$,W,I,se)}}if(ce)return se=se(R),ce=I===""?"."+be(R,0):I,B(se)?(W="",ce!=null&&(W=ce.replace(Re,"$&/")+"/"),Se(se,$,W,"",function(Ze){return Ze})):se!=null&&(te(se)&&(se=Z(se,W+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(Re,"$&/")+"/")+ce)),$.push(se)),1;ce=0;var St=I===""?".":I+":";if(B(R))for(var ze=0;ze<R.length;ze++)I=R[ze],Ce=St+be(I,ze),ce+=Se(I,$,W,Ce,se);else if(ze=E(R),typeof ze=="function")for(R=ze.call(R),ze=0;!(I=R.next()).done;)I=I.value,Ce=St+be(I,ze++),ce+=Se(I,$,W,Ce,se);else if(Ce==="object"){if(typeof R.then=="function")return Se(ye(R),$,W,I,se);throw $=String(R),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ce}function k(R,$,W){if(R==null)return R;var I=[],se=0;return Se(R,I,"","",function(Ce){return $.call(W,Ce,se++)}),I}function X(R){if(R._status===-1){var $=R._result;$=$(),$.then(function(W){(R._status===0||R._status===-1)&&(R._status=1,R._result=W)},function(W){(R._status===0||R._status===-1)&&(R._status=2,R._result=W)}),R._status===-1&&(R._status=0,R._result=$)}if(R._status===1)return R._result.default;throw R._result}var J=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function ue(){}return ge.Children={map:k,forEach:function(R,$,W){k(R,function(){$.apply(this,arguments)},W)},count:function(R){var $=0;return k(R,function(){$++}),$},toArray:function(R){return k(R,function($){return $})||[]},only:function(R){if(!te(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},ge.Component=N,ge.Fragment=r,ge.Profiler=o,ge.PureComponent=A,ge.StrictMode=i,ge.Suspense=y,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ge.__COMPILER_RUNTIME={__proto__:null,c:function(R){return V.H.useMemoCache(R)}},ge.cache=function(R){return function(){return R.apply(null,arguments)}},ge.cloneElement=function(R,$,W){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var I=w({},R.props),se=R.key,Ce=void 0;if($!=null)for(ce in $.ref!==void 0&&(Ce=void 0),$.key!==void 0&&(se=""+$.key),$)!Q.call($,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&$.ref===void 0||(I[ce]=$[ce]);var ce=arguments.length-2;if(ce===1)I.children=W;else if(1<ce){for(var St=Array(ce),ze=0;ze<ce;ze++)St[ze]=arguments[ze+2];I.children=St}return G(R.type,se,void 0,void 0,Ce,I)},ge.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},ge.createElement=function(R,$,W){var I,se={},Ce=null;if($!=null)for(I in $.key!==void 0&&(Ce=""+$.key),$)Q.call($,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(se[I]=$[I]);var ce=arguments.length-2;if(ce===1)se.children=W;else if(1<ce){for(var St=Array(ce),ze=0;ze<ce;ze++)St[ze]=arguments[ze+2];se.children=St}if(R&&R.defaultProps)for(I in ce=R.defaultProps,ce)se[I]===void 0&&(se[I]=ce[I]);return G(R,Ce,void 0,void 0,null,se)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(R){return{$$typeof:m,render:R}},ge.isValidElement=te,ge.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:X}},ge.memo=function(R,$){return{$$typeof:p,type:R,compare:$===void 0?null:$}},ge.startTransition=function(R){var $=V.T,W={};V.T=W;try{var I=R(),se=V.S;se!==null&&se(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(ue,J)}catch(Ce){J(Ce)}finally{V.T=$}},ge.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ge.use=function(R){return V.H.use(R)},ge.useActionState=function(R,$,W){return V.H.useActionState(R,$,W)},ge.useCallback=function(R,$){return V.H.useCallback(R,$)},ge.useContext=function(R){return V.H.useContext(R)},ge.useDebugValue=function(){},ge.useDeferredValue=function(R,$){return V.H.useDeferredValue(R,$)},ge.useEffect=function(R,$,W){var I=V.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return I.useEffect(R,$)},ge.useId=function(){return V.H.useId()},ge.useImperativeHandle=function(R,$,W){return V.H.useImperativeHandle(R,$,W)},ge.useInsertionEffect=function(R,$){return V.H.useInsertionEffect(R,$)},ge.useLayoutEffect=function(R,$){return V.H.useLayoutEffect(R,$)},ge.useMemo=function(R,$){return V.H.useMemo(R,$)},ge.useOptimistic=function(R,$){return V.H.useOptimistic(R,$)},ge.useReducer=function(R,$,W){return V.H.useReducer(R,$,W)},ge.useRef=function(R){return V.H.useRef(R)},ge.useState=function(R){return V.H.useState(R)},ge.useSyncExternalStore=function(R,$,W){return V.H.useSyncExternalStore(R,$,W)},ge.useTransition=function(){return V.H.useTransition()},ge.version="19.1.0",ge}var I0;function Ud(){return I0||(I0=1,Ff.exports=hx()),Ff.exports}var x=Ud();const Ke=Su(x);var Gf={exports:{}},ar={},Xf={exports:{}},Zf={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -38,22 +38,22 @@
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var ay;function vx(){if(ay)return ar;ay=1;var n=px(),l=Ud(),r=fv();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(i(188))}function y(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,s=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(s=c.return,s!==null){a=s;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return m(c),e;if(f===s)return m(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==s.return)a=c,s=f;else{for(var v=!1,S=c.child;S;){if(S===a){v=!0,a=c,s=f;break}if(S===s){v=!0,s=c,a=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===a){v=!0,a=f,s=c;break}if(S===s){v=!0,s=f,a=c;break}S=S.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==s)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),pe=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case O:return"StrictMode";case V:return"Suspense";case Q:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case j:return(e.displayName||"Context")+".Provider";case A:return(e._context.displayName||"Context")+".Consumer";case B:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var Se=Array.isArray,k=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},ue=[],R=-1;function $(e){return{current:e}}function W(e){0>R||(e.current=ue[R],ue[R]=null,R--)}function I(e,t){R++,ue[R]=e.current,e.current=t}var se=$(null),Ce=$(null),ce=$(null),St=$(null);function qe(e,t){switch(I(ce,t),I(Ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?E0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=E0(t),e=C0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(se),I(se,e)}function Ze(){W(se),W(Ce),W(ce)}function Qn(e){e.memoizedState!==null&&I(St,e);var t=se.current,a=C0(t,e.type);t!==a&&(I(Ce,e),I(se,a))}function jt(e){Ce.current===e&&(W(se),W(Ce)),St.current===e&&(W(St),Js._currentValue=J)}var mn=Object.prototype.hasOwnProperty,ua=n.unstable_scheduleCallback,pn=n.unstable_cancelCallback,ss=n.unstable_shouldYield,kt=n.unstable_requestPaint,Bt=n.unstable_now,ca=n.unstable_getCurrentPriorityLevel,$n=n.unstable_ImmediatePriority,Ge=n.unstable_UserBlockingPriority,Yn=n.unstable_NormalPriority,xl=n.unstable_LowPriority,Ua=n.unstable_IdlePriority,Sl=n.log,Wl=n.unstable_setDisableYieldValue,yn=null,tt=null;function Vt(e){if(typeof Sl=="function"&&Wl(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(yn,e)}catch{}}var it=Math.clz32?Math.clz32:za,qa=Math.log,rs=Math.LN2;function za(e){return e>>>=0,e===0?32:31-(qa(e)/rs|0)|0}var vn=256,At=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function fa(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=s&134217727;return S!==0?(s=S&~f,s!==0?c=He(s):(v&=S,v!==0?c=He(v):a||(a=S&~e,a!==0&&(c=He(a))))):(S=s&~f,S!==0?c=He(S):v!==0?c=He(v):a||(a=s&~e,a!==0&&(c=He(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function Mn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ka(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ba(){var e=vn;return vn<<=1,(vn&4194048)===0&&(vn=256),e}function da(){var e=At;return At<<=1,(At&62914560)===0&&(At=4194304),e}function Vn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function gn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wl(e,t,a,s,c,f){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,T=e.expirationTimes,U=e.hiddenUpdates;for(a=v&~a;0<a;){var Y=31-it(a),F=1<<Y;S[Y]=0,T[Y]=-1;var q=U[Y];if(q!==null)for(U[Y]=null,Y=0;Y<q.length;Y++){var z=q[Y];z!==null&&(z.lane&=-536870913)}a&=~F}s!==0&&El(e,s,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function El(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-it(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&4194090}function st(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-it(a),c=1<<s;c&t|e[s]&t&&(e[s]|=t),a&=~c}}function Tt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function oe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function _e(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Y0(e.type))}function Ht(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var Ot=Math.random().toString(36).slice(2),P="__reactFiber$"+Ot,ne="__reactProps$"+Ot,de="__reactContainer$"+Ot,Ie="__reactEvents$"+Ot,vt="__reactListeners$"+Ot,bn="__reactHandles$"+Ot,tn="__reactResources$"+Ot,rt="__reactMarker$"+Ot;function Rt(e){delete e[P],delete e[ne],delete e[Ie],delete e[vt],delete e[bn]}function De(e){var t=e[P];if(t)return t;for(var a=e.parentNode;a;){if(t=a[de]||a[P]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=A0(e);e!==null;){if(a=e[P])return a;e=A0(e)}return t}e=a,a=e.parentNode}return null}function nn(e){if(e=e[P]||e[de]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ha(e){var t=e[tn];return t||(t=e[tn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ot(e){e[rt]=!0}var os=new Set,us={};function Kn(e,t){ha(e,t),ha(e+"Capture",t)}function ha(e,t){for(us[e]=t,e=0;e<t.length;e++)os.add(t[e])}var Me=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),xn={},ei={};function _l(e){return mn.call(ei,e)?!0:mn.call(xn,e)?!1:Me.test(e)?ei[e]=!0:(xn[e]=!0,!1)}function ti(e,t,a){if(_l(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Qa(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ma(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}var ku,yh;function ni(e){if(ku===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ku=t&&t[1]||"",yh=-1<a.stack.indexOf(`
41
+ */var ay;function vx(){if(ay)return ar;ay=1;var n=px(),l=Ud(),r=fv();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(i(188))}function y(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,s=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(s=c.return,s!==null){a=s;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return m(c),e;if(f===s)return m(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==s.return)a=c,s=f;else{for(var v=!1,S=c.child;S;){if(S===a){v=!0,a=c,s=f;break}if(S===s){v=!0,s=c,a=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===a){v=!0,a=f,s=c;break}if(S===s){v=!0,s=f,a=c;break}S=S.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==s)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),pe=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case O:return"StrictMode";case V:return"Suspense";case Q:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case j:return(e.displayName||"Context")+".Provider";case A:return(e._context.displayName||"Context")+".Consumer";case B:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var Se=Array.isArray,k=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},ue=[],R=-1;function $(e){return{current:e}}function W(e){0>R||(e.current=ue[R],ue[R]=null,R--)}function I(e,t){R++,ue[R]=e.current,e.current=t}var se=$(null),Ce=$(null),ce=$(null),St=$(null);function ze(e,t){switch(I(ce,t),I(Ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?E0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=E0(t),e=C0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(se),I(se,e)}function Ze(){W(se),W(Ce),W(ce)}function Qn(e){e.memoizedState!==null&&I(St,e);var t=se.current,a=C0(t,e.type);t!==a&&(I(Ce,e),I(se,a))}function jt(e){Ce.current===e&&(W(se),W(Ce)),St.current===e&&(W(St),Js._currentValue=J)}var mn=Object.prototype.hasOwnProperty,ua=n.unstable_scheduleCallback,pn=n.unstable_cancelCallback,ss=n.unstable_shouldYield,kt=n.unstable_requestPaint,Bt=n.unstable_now,ca=n.unstable_getCurrentPriorityLevel,$n=n.unstable_ImmediatePriority,Ge=n.unstable_UserBlockingPriority,Yn=n.unstable_NormalPriority,xl=n.unstable_LowPriority,Ua=n.unstable_IdlePriority,Sl=n.log,Wl=n.unstable_setDisableYieldValue,yn=null,tt=null;function Vt(e){if(typeof Sl=="function"&&Wl(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(yn,e)}catch{}}var it=Math.clz32?Math.clz32:qa,za=Math.log,rs=Math.LN2;function qa(e){return e>>>=0,e===0?32:31-(za(e)/rs|0)|0}var vn=256,At=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function fa(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=s&134217727;return S!==0?(s=S&~f,s!==0?c=He(s):(v&=S,v!==0?c=He(v):a||(a=S&~e,a!==0&&(c=He(a))))):(S=s&~f,S!==0?c=He(S):v!==0?c=He(v):a||(a=s&~e,a!==0&&(c=He(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function Mn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ka(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ba(){var e=vn;return vn<<=1,(vn&4194048)===0&&(vn=256),e}function da(){var e=At;return At<<=1,(At&62914560)===0&&(At=4194304),e}function Vn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function gn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wl(e,t,a,s,c,f){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,T=e.expirationTimes,U=e.hiddenUpdates;for(a=v&~a;0<a;){var Y=31-it(a),F=1<<Y;S[Y]=0,T[Y]=-1;var z=U[Y];if(z!==null)for(U[Y]=null,Y=0;Y<z.length;Y++){var q=z[Y];q!==null&&(q.lane&=-536870913)}a&=~F}s!==0&&El(e,s,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function El(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-it(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&4194090}function st(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-it(a),c=1<<s;c&t|e[s]&t&&(e[s]|=t),a&=~c}}function Tt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function oe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function _e(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Y0(e.type))}function Ht(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var Ot=Math.random().toString(36).slice(2),P="__reactFiber$"+Ot,ne="__reactProps$"+Ot,de="__reactContainer$"+Ot,Ie="__reactEvents$"+Ot,vt="__reactListeners$"+Ot,bn="__reactHandles$"+Ot,tn="__reactResources$"+Ot,rt="__reactMarker$"+Ot;function Rt(e){delete e[P],delete e[ne],delete e[Ie],delete e[vt],delete e[bn]}function De(e){var t=e[P];if(t)return t;for(var a=e.parentNode;a;){if(t=a[de]||a[P]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=A0(e);e!==null;){if(a=e[P])return a;e=A0(e)}return t}e=a,a=e.parentNode}return null}function nn(e){if(e=e[P]||e[de]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ha(e){var t=e[tn];return t||(t=e[tn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ot(e){e[rt]=!0}var os=new Set,us={};function Kn(e,t){ha(e,t),ha(e+"Capture",t)}function ha(e,t){for(us[e]=t,e=0;e<t.length;e++)os.add(t[e])}var Me=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),xn={},ei={};function _l(e){return mn.call(ei,e)?!0:mn.call(xn,e)?!1:Me.test(e)?ei[e]=!0:(xn[e]=!0,!1)}function ti(e,t,a){if(_l(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Qa(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ma(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}var ku,yh;function ni(e){if(ku===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ku=t&&t[1]||"",yh=-1<a.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ku+e+yh}var Bu=!1;function Hu(e,t){if(!e||Bu)return"";Bu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(z){var q=z}Reflect.construct(e,[],F)}else{try{F.call()}catch(z){q=z}e.call(F.prototype)}}else{try{throw Error()}catch(z){q=z}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(z){if(z&&q&&typeof z.stack=="string")return[z.stack,q.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var T=v.split(`
43
+ `+ku+e+yh}var Bu=!1;function Hu(e,t){if(!e||Bu)return"";Bu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(q){var z=q}Reflect.construct(e,[],F)}else{try{F.call()}catch(q){z=q}e.call(F.prototype)}}else{try{throw Error()}catch(q){z=q}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(q){if(q&&z&&typeof q.stack=="string")return[q.stack,z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var T=v.split(`
44
44
  `),U=S.split(`
45
45
  `);for(c=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;if(s===T.length||c===U.length)for(s=T.length-1,c=U.length-1;1<=s&&0<=c&&T[s]!==U[c];)c--;for(;1<=s&&0<=c;s--,c--)if(T[s]!==U[c]){if(s!==1||c!==1)do if(s--,c--,0>c||T[s]!==U[c]){var Y=`
46
46
  `+T[s].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=s&&0<=c);break}}}finally{Bu=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ni(a):""}function ig(e){switch(e.tag){case 26:case 27:case 5:return ni(e.type);case 16:return ni("Lazy");case 13:return ni("Suspense");case 19:return ni("SuspenseList");case 0:case 15:return Hu(e.type,!1);case 11:return Hu(e.type.render,!1);case 1:return Hu(e.type,!0);case 31:return ni("Activity");default:return""}}function vh(e){try{var t="";do t+=ig(e),e=e.return;while(e);return t}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
- `+a.stack}}function Sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sg(e){var t=gh(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){s=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(v){s=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ur(e){e._valueTracker||(e._valueTracker=sg(e))}function bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=gh(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function qr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var rg=/[\n"\\]/g;function wn(e){return e.replace(rg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qu(e,t,a,s,c,f,v,S){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Sn(t)):e.value!==""+Sn(t)&&(e.value=""+Sn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?$u(e,v,Sn(t)):a!=null?$u(e,v,Sn(a)):s!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Sn(S):e.removeAttribute("name")}function xh(e,t,a,s,c,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null))return;a=a!=null?""+Sn(a):"",t=t!=null?""+Sn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=S?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function $u(e,t,a){t==="number"&&qr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ai(e,t,a,s){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Sn(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,s&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Sh(e,t,a){if(t!=null&&(t=""+Sn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Sn(a):""}function wh(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(i(92));if(Se(s)){if(1<s.length)throw Error(i(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=Sn(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s)}function li(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var og=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Eh(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||og.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ch(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var c in t)s=t[c],t.hasOwnProperty(c)&&a[c]!==s&&Eh(e,c,s)}else for(var f in t)t.hasOwnProperty(f)&&Eh(e,f,t[f])}function Yu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ug=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function zr(e){return cg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Vu=null;function Ku(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ii=null,si=null;function _h(e){var t=nn(e);if(t&&(e=t.stateNode)){var a=e[ne]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var c=s[ne]||null;if(!c)throw Error(i(90));Qu(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&bh(s)}break e;case"textarea":Sh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ai(e,!!a.multiple,t,!1)}}}var Fu=!1;function Nh(e,t,a){if(Fu)return e(t,a);Fu=!0;try{var s=e(t);return s}finally{if(Fu=!1,(ii!==null||si!==null)&&(Eo(),ii&&(t=ii,e=si,si=ii=null,_h(t),e)))for(t=0;t<e.length;t++)_h(e[t])}}function cs(e,t){var a=e.stateNode;if(a===null)return null;var s=a[ne]||null;if(s===null)return null;a=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(pa)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{Gu=!1}var $a=null,Xu=null,kr=null;function jh(){if(kr)return kr;var e,t=Xu,a=t.length,s,c="value"in $a?$a.value:$a.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var v=a-e;for(s=1;s<=v&&t[a-s]===c[f-s];s++);return kr=c.slice(e,1<s?1-s:void 0)}function Br(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hr(){return!0}function Ah(){return!1}function Kt(e){function t(a,s,c,f,v){this._reactName=a,this._targetInst=c,this.type=s,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Hr:Ah,this.isPropagationStopped=Ah,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Hr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hr)},persist:function(){},isPersistent:Hr}),t}var Nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qr=Kt(Nl),ds=g({},Nl,{view:0,detail:0}),fg=Kt(ds),Zu,Pu,hs,$r=g({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hs&&(hs&&e.type==="mousemove"?(Zu=e.screenX-hs.screenX,Pu=e.screenY-hs.screenY):Pu=Zu=0,hs=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:Pu}}),Th=Kt($r),dg=g({},$r,{dataTransfer:0}),hg=Kt(dg),mg=g({},ds,{relatedTarget:0}),Ju=Kt(mg),pg=g({},Nl,{animationName:0,elapsedTime:0,pseudoElement:0}),yg=Kt(pg),vg=g({},Nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gg=Kt(vg),bg=g({},Nl,{data:0}),Oh=Kt(bg),xg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Eg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wg[e])?!!t[e]:!1}function Iu(){return Eg}var Cg=g({},ds,{key:function(e){if(e.key){var t=xg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Br(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(e){return e.type==="keypress"?Br(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Br(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_g=Kt(Cg),Ng=g({},$r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rh=Kt(Ng),jg=g({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),Ag=Kt(jg),Tg=g({},Nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Og=Kt(Tg),Rg=g({},$r,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dg=Kt(Rg),Mg=g({},Nl,{newState:0,oldState:0}),Lg=Kt(Mg),Ug=[9,13,27,32],Wu=pa&&"CompositionEvent"in window,ms=null;pa&&"documentMode"in document&&(ms=document.documentMode);var qg=pa&&"TextEvent"in window&&!ms,Dh=pa&&(!Wu||ms&&8<ms&&11>=ms),Mh=" ",Lh=!1;function Uh(e,t){switch(e){case"keyup":return Ug.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ri=!1;function zg(e,t){switch(e){case"compositionend":return qh(t);case"keypress":return t.which!==32?null:(Lh=!0,Mh);case"textInput":return e=t.data,e===Mh&&Lh?null:e;default:return null}}function kg(e,t){if(ri)return e==="compositionend"||!Wu&&Uh(e,t)?(e=jh(),kr=Xu=$a=null,ri=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dh&&t.locale!=="ko"?null:t.data;default:return null}}var Bg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bg[e.type]:t==="textarea"}function kh(e,t,a,s){ii?si?si.push(s):si=[s]:ii=s,t=To(t,"onChange"),0<t.length&&(a=new Qr("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var ps=null,ys=null;function Hg(e){g0(e,0)}function Yr(e){var t=Cl(e);if(bh(t))return e}function Bh(e,t){if(e==="change")return t}var Hh=!1;if(pa){var ec;if(pa){var tc="oninput"in document;if(!tc){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),tc=typeof Qh.oninput=="function"}ec=tc}else ec=!1;Hh=ec&&(!document.documentMode||9<document.documentMode)}function $h(){ps&&(ps.detachEvent("onpropertychange",Yh),ys=ps=null)}function Yh(e){if(e.propertyName==="value"&&Yr(ys)){var t=[];kh(t,ys,e,Ku(e)),Nh(Hg,t)}}function Qg(e,t,a){e==="focusin"?($h(),ps=t,ys=a,ps.attachEvent("onpropertychange",Yh)):e==="focusout"&&$h()}function $g(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yr(ys)}function Yg(e,t){if(e==="click")return Yr(t)}function Vg(e,t){if(e==="input"||e==="change")return Yr(t)}function Kg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:Kg;function vs(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var c=a[s];if(!mn.call(t,c)||!an(e[c],t[c]))return!1}return!0}function Vh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var a=Vh(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Vh(a)}}function Fh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=qr(e.document)}return t}function nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Fg=pa&&"documentMode"in document&&11>=document.documentMode,oi=null,ac=null,gs=null,lc=!1;function Xh(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;lc||oi==null||oi!==qr(s)||(s=oi,"selectionStart"in s&&nc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),gs&&vs(gs,s)||(gs=s,s=To(ac,"onSelect"),0<s.length&&(t=new Qr("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=oi)))}function jl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ui={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},ic={},Zh={};pa&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);function Al(e){if(ic[e])return ic[e];if(!ui[e])return e;var t=ui[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Zh)return ic[e]=t[a];return e}var Ph=Al("animationend"),Jh=Al("animationiteration"),Ih=Al("animationstart"),Gg=Al("transitionrun"),Xg=Al("transitionstart"),Zg=Al("transitioncancel"),Wh=Al("transitionend"),em=new Map,sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sc.push("scrollEnd");function Ln(e,t){em.set(e,t),Kn(t,[e])}var tm=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var a=tm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:vh(t)},tm.set(e,t),t)}return{value:e,source:t,stack:vh(t)}}var Cn=[],ci=0,rc=0;function Vr(){for(var e=ci,t=rc=ci=0;t<e;){var a=Cn[t];Cn[t++]=null;var s=Cn[t];Cn[t++]=null;var c=Cn[t];Cn[t++]=null;var f=Cn[t];if(Cn[t++]=null,s!==null&&c!==null){var v=s.pending;v===null?c.next=c:(c.next=v.next,v.next=c),s.pending=c}f!==0&&nm(a,c,f)}}function Kr(e,t,a,s){Cn[ci++]=e,Cn[ci++]=t,Cn[ci++]=a,Cn[ci++]=s,rc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function oc(e,t,a,s){return Kr(e,t,a,s),Fr(e)}function fi(e,t){return Kr(e,null,null,t),Fr(e)}function nm(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,s=f.alternate,s!==null&&(s.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-it(a),e=f.hiddenUpdates,s=e[c],s===null?e[c]=[t]:s.push(t),t.lane=a|536870912),f):null}function Fr(e){if(50<Ys)throw Ys=0,pf=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var di={};function Pg(e,t,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,a,s){return new Pg(e,t,a,s)}function uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ya(e,t){var a=e.alternate;return a===null?(a=ln(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function am(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Gr(e,t,a,s,c,f){var v=0;if(s=e,typeof e=="function")uc(e)&&(v=1);else if(typeof e=="string")v=Ib(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=ln(31,a,t,c),e.elementType=te,e.lanes=f,e;case w:return Tl(a.children,c,f,t);case O:v=8,c|=24;break;case N:return e=ln(12,a,t,c|2),e.elementType=N,e.lanes=f,e;case V:return e=ln(13,a,t,c),e.elementType=V,e.lanes=f,e;case Q:return e=ln(19,a,t,c),e.elementType=Q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:case j:v=10;break e;case A:v=9;break e;case B:v=11;break e;case G:v=14;break e;case Z:v=16,s=null;break e}v=29,a=Error(i(130,e===null?"null":typeof e,"")),s=null}return t=ln(v,a,t,c),t.elementType=e,t.type=s,t.lanes=f,t}function Tl(e,t,a,s){return e=ln(7,e,s,t),e.lanes=a,e}function cc(e,t,a){return e=ln(6,e,null,t),e.lanes=a,e}function fc(e,t,a){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=[],mi=0,Xr=null,Zr=0,_n=[],Nn=0,Ol=null,va=1,ga="";function Rl(e,t){hi[mi++]=Zr,hi[mi++]=Xr,Xr=e,Zr=t}function lm(e,t,a){_n[Nn++]=va,_n[Nn++]=ga,_n[Nn++]=Ol,Ol=e;var s=va;e=ga;var c=32-it(s)-1;s&=~(1<<c),a+=1;var f=32-it(t)+c;if(30<f){var v=c-c%5;f=(s&(1<<v)-1).toString(32),s>>=v,c-=v,va=1<<32-it(t)+c|a<<c|s,ga=f+e}else va=1<<f|a<<c|s,ga=e}function dc(e){e.return!==null&&(Rl(e,1),lm(e,1,0))}function hc(e){for(;e===Xr;)Xr=hi[--mi],hi[mi]=null,Zr=hi[--mi],hi[mi]=null;for(;e===Ol;)Ol=_n[--Nn],_n[Nn]=null,ga=_n[--Nn],_n[Nn]=null,va=_n[--Nn],_n[Nn]=null}var Qt=null,nt=null,Le=!1,Dl=null,Fn=!1,mc=Error(i(519));function Ml(e){var t=Error(i(418,""));throw Ss(En(t,e)),mc}function im(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[P]=e,t[ne]=s,a){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(a=0;a<Ks.length;a++)je(Ks[a],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),xh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0),Ur(t);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),wh(t,s.value,s.defaultValue,s.children),Ur(t)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||w0(t.textContent,a)?(s.popover!=null&&(je("beforetoggle",t),je("toggle",t)),s.onScroll!=null&&je("scroll",t),s.onScrollEnd!=null&&je("scrollend",t),s.onClick!=null&&(t.onclick=Oo),t=!0):t=!1,t||Ml(e)}function sm(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 13:Fn=!1;return;case 27:case 3:Fn=!0;return;default:Qt=Qt.return}}function bs(e){if(e!==Qt)return!1;if(!Le)return sm(e),Le=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Rf(e.type,e.memoizedProps)),a=!a),a&&nt&&Ml(e),sm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){nt=qn(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}nt=null}}else t===27?(t=nt,ll(e.type)?(e=Uf,Uf=null,nt=e):nt=t):nt=Qt?qn(e.stateNode.nextSibling):null;return!0}function xs(){nt=Qt=null,Le=!1}function rm(){var e=Dl;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),Dl=null),e}function Ss(e){Dl===null?Dl=[e]:Dl.push(e)}var pc=$(null),Ll=null,ba=null;function Ya(e,t,a){I(pc,t._currentValue),t._currentValue=a}function xa(e){e._currentValue=pc.current,W(pc)}function yc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function vc(e,t,a,s){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var v=c.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=c;for(var T=0;T<t.length;T++)if(S.context===t[T]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),yc(f.return,a,e),s||(v=null);break e}f=S.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(i(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),yc(v,a,e),v=null}else v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function ws(e,t,a,s){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var S=c.type;an(c.pendingProps.value,v.value)||(e!==null?e.push(S):e=[S])}}else if(c===St.current){if(v=c.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Js):e=[Js])}c=c.return}e!==null&&vc(t,e,a,s),t.flags|=262144}function Pr(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Ll=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return om(Ll,e)}function Jr(e,t){return Ll===null&&Ul(e),om(e,t)}function om(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ba===null){if(e===null)throw Error(i(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return a}var Jg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ig=n.unstable_scheduleCallback,Wg=n.unstable_NormalPriority,pt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new Jg,data:new Map,refCount:0}}function Es(e){e.refCount--,e.refCount===0&&Ig(Wg,function(){e.controller.abort()})}var Cs=null,bc=0,pi=0,yi=null;function eb(e,t){if(Cs===null){var a=Cs=[];bc=0,pi=wf(),yi={status:"pending",value:void 0,then:function(s){a.push(s)}}}return bc++,t.then(um,um),t}function um(){if(--bc===0&&Cs!==null){yi!==null&&(yi.status="fulfilled");var e=Cs;Cs=null,pi=0,yi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function tb(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(s.status="rejected",s.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),s}var cm=k.S;k.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&eb(e,t),cm!==null&&cm(e,t)};var ql=$(null);function xc(){var e=ql.current;return e!==null?e:Xe.pooledCache}function Ir(e,t){t===null?I(ql,ql.current):I(ql,t.pool)}function fm(){var e=xc();return e===null?null:{parent:pt._currentValue,pool:e}}var _s=Error(i(460)),dm=Error(i(474)),Wr=Error(i(542)),Sc={then:function(){}};function hm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function eo(){}function mm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(eo,eo),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(e),e;default:if(typeof t.status=="string")t.then(eo,eo);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=s}},function(s){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(e),e}throw Ns=t,_s}}var Ns=null;function pm(){if(Ns===null)throw Error(i(459));var e=Ns;return Ns=null,e}function ym(e){if(e===_s||e===Wr)throw Error(i(483))}var Va=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(ze&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,t=Fr(e),nm(e,null,a),t}return Kr(e,s,t,a),Fr(e)}function js(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,st(e,a)}}function Cc(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=v:f=f.next=v,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var _c=!1;function As(){if(_c){var e=yi;if(e!==null)throw e}}function Ts(e,t,a,s){_c=!1;var c=e.updateQueue;Va=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var T=S,U=T.next;T.next=null,v===null?f=U:v.next=U,v=T;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==v&&(S===null?Y.firstBaseUpdate=U:S.next=U,Y.lastBaseUpdate=T))}if(f!==null){var F=c.baseState;v=0,Y=U=T=null,S=f;do{var q=S.lane&-536870913,z=q!==S.lane;if(z?(Ae&q)===q:(s&q)===q){q!==0&&q===pi&&(_c=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var me=e,fe=S;q=t;var Ye=a;switch(fe.tag){case 1:if(me=fe.payload,typeof me=="function"){F=me.call(Ye,F,q);break e}F=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=fe.payload,q=typeof me=="function"?me.call(Ye,F,q):me,q==null)break e;F=g({},F,q);break e;case 2:Va=!0}}q=S.callback,q!==null&&(e.flags|=64,z&&(e.flags|=8192),z=c.callbacks,z===null?c.callbacks=[q]:z.push(q))}else z={lane:q,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(U=Y=z,T=F):Y=Y.next=z,v|=q;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;z=S,S=z.next,z.next=null,c.lastBaseUpdate=z,c.shared.pending=null}}while(!0);Y===null&&(T=F),c.baseState=T,c.firstBaseUpdate=U,c.lastBaseUpdate=Y,f===null&&(c.shared.lanes=0),el|=v,e.lanes=v,e.memoizedState=F}}function vm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function gm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)vm(a[e],t)}var vi=$(null),to=$(0);function bm(e,t){e=ja,I(to,e),I(vi,t),ja=e|t.baseLanes}function Nc(){I(to,ja),I(vi,vi.current)}function jc(){ja=to.current,W(vi),W(to)}var Ga=0,xe=null,Qe=null,ht=null,no=!1,gi=!1,zl=!1,ao=0,Os=0,bi=null,nb=0;function ut(){throw Error(i(321))}function Ac(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!an(e[a],t[a]))return!1;return!0}function Tc(e,t,a,s,c,f){return Ga=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?np:ap,zl=!1,f=a(s,c),zl=!1,gi&&(f=Sm(t,a,s,c)),xm(e),f}function xm(e){k.H=uo;var t=Qe!==null&&Qe.next!==null;if(Ga=0,ht=Qe=xe=null,no=!1,Os=0,bi=null,t)throw Error(i(300));e===null||gt||(e=e.dependencies,e!==null&&Pr(e)&&(gt=!0))}function Sm(e,t,a,s){xe=e;var c=0;do{if(gi&&(bi=null),Os=0,gi=!1,25<=c)throw Error(i(301));if(c+=1,ht=Qe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}k.H=ub,f=t(a,s)}while(gi);return f}function ab(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Rs(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Oc(){var e=ao!==0;return ao=0,e}function Rc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Dc(e){if(no){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}no=!1}Ga=0,ht=Qe=xe=null,gi=!1,Os=ao=0,bi=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?xe.memoizedState=ht=e:ht=ht.next=e,ht}function mt(){if(Qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=ht===null?xe.memoizedState:ht.next;if(t!==null)ht=t,Qe=e;else{if(e===null)throw xe.alternate===null?Error(i(467)):Error(i(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},ht===null?xe.memoizedState=ht=e:ht=ht.next=e}return ht}function Mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rs(e){var t=Os;return Os+=1,bi===null&&(bi=[]),e=mm(bi,e,t),t=xe,(ht===null?t.memoizedState:ht.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?np:ap),e}function lo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rs(e);if(e.$$typeof===j)return Dt(e)}throw Error(i(438,String(e)))}function Lc(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=xe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mc(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=pe;return t.index++,a}function Sa(e,t){return typeof t=="function"?t(e):t}function io(e){var t=mt();return Uc(t,Qe,e)}function Uc(e,t,a){var s=e.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=a;var c=e.baseQueue,f=s.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,s.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var S=v=null,T=null,U=t,Y=!1;do{var F=U.lane&-536870913;if(F!==U.lane?(Ae&F)===F:(Ga&F)===F){var q=U.revertLane;if(q===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),F===pi&&(Y=!0);else if((Ga&q)===q){U=U.next,q===pi&&(Y=!0);continue}else F={lane:0,revertLane:U.revertLane,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},T===null?(S=T=F,v=f):T=T.next=F,xe.lanes|=q,el|=q;F=U.action,zl&&a(f,F),f=U.hasEagerState?U.eagerState:a(f,F)}else q={lane:F,revertLane:U.revertLane,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},T===null?(S=T=q,v=f):T=T.next=q,xe.lanes|=F,el|=F;U=U.next}while(U!==null&&U!==t);if(T===null?v=f:T.next=S,!an(f,e.memoizedState)&&(gt=!0,Y&&(a=yi,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=T,s.lastRenderedState=f}return c===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function qc(e){var t=mt(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var s=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==c);an(f,t.memoizedState)||(gt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,s]}function wm(e,t,a){var s=xe,c=mt(),f=Le;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var v=!an((Qe||c).memoizedState,a);v&&(c.memoizedState=a,gt=!0),c=c.queue;var S=_m.bind(null,s,c,e);if(Ds(2048,8,S,[e]),c.getSnapshot!==t||v||ht!==null&&ht.memoizedState.tag&1){if(s.flags|=2048,xi(9,so(),Cm.bind(null,s,c,a,t),null),Xe===null)throw Error(i(349));f||(Ga&124)!==0||Em(s,t,a)}return a}function Em(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=xe.updateQueue,t===null?(t=Mc(),xe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Cm(e,t,a,s){t.value=a,t.getSnapshot=s,Nm(t)&&jm(e)}function _m(e,t,a){return a(function(){Nm(t)&&jm(e)})}function Nm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!an(e,a)}catch{return!0}}function jm(e){var t=fi(e,2);t!==null&&cn(t,e,2)}function zc(e){var t=Ft();if(typeof e=="function"){var a=e;if(e=a(),zl){Vt(!0);try{a()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t}function Am(e,t,a,s){return e.baseState=a,Uc(e,Qe,typeof s=="function"?s:Sa)}function lb(e,t,a,s,c){if(oo(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};k.T!==null?a(!0):f.isTransition=!1,s(f),a=t.pending,a===null?(f.next=t.pending=f,Tm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Tm(e,t){var a=t.action,s=t.payload,c=e.state;if(t.isTransition){var f=k.T,v={};k.T=v;try{var S=a(c,s),T=k.S;T!==null&&T(v,S),Om(e,t,S)}catch(U){kc(e,t,U)}finally{k.T=f}}else try{f=a(c,s),Om(e,t,f)}catch(U){kc(e,t,U)}}function Om(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Rm(e,t,s)},function(s){return kc(e,t,s)}):Rm(e,t,a)}function Rm(e,t,a){t.status="fulfilled",t.value=a,Dm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Tm(e,a)))}function kc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Dm(t),t=t.next;while(t!==s)}e.action=null}function Dm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mm(e,t){return t}function Lm(e,t){if(Le){var a=Xe.formState;if(a!==null){e:{var s=xe;if(Le){if(nt){t:{for(var c=nt,f=Fn;c.nodeType!==8;){if(!f){c=null;break t}if(c=qn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){nt=qn(c.nextSibling),s=c.data==="F!";break e}}Ml(s)}s=!1}s&&(t=a[0])}}return a=Ft(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mm,lastRenderedState:t},a.queue=s,a=Wm.bind(null,xe,s),s.dispatch=a,s=zc(!1),f=Yc.bind(null,xe,!1,s.queue),s=Ft(),c={state:t,dispatch:null,action:e,pending:null},s.queue=c,a=lb.bind(null,xe,c,f,a),c.dispatch=a,s.memoizedState=e,[t,a,!1]}function Um(e){var t=mt();return qm(t,Qe,e)}function qm(e,t,a){if(t=Uc(e,t,Mm)[0],e=io(Sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Rs(t)}catch(v){throw v===_s?Wr:v}else s=t;t=mt();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,xi(9,so(),ib.bind(null,c,a),null)),[s,f,e]}function ib(e,t){e.action=t}function zm(e){var t=mt(),a=Qe;if(a!==null)return qm(t,a,e);mt(),t=t.memoizedState,a=mt();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function xi(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Mc(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function so(){return{destroy:void 0,resource:void 0}}function km(){return mt().memoizedState}function ro(e,t,a,s){var c=Ft();s=s===void 0?null:s,xe.flags|=e,c.memoizedState=xi(1|t,so(),a,s)}function Ds(e,t,a,s){var c=mt();s=s===void 0?null:s;var f=c.memoizedState.inst;Qe!==null&&s!==null&&Ac(s,Qe.memoizedState.deps)?c.memoizedState=xi(t,f,a,s):(xe.flags|=e,c.memoizedState=xi(1|t,f,a,s))}function Bm(e,t){ro(8390656,8,e,t)}function Hm(e,t){Ds(2048,8,e,t)}function Qm(e,t){return Ds(4,2,e,t)}function $m(e,t){return Ds(4,4,e,t)}function Ym(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vm(e,t,a){a=a!=null?a.concat([e]):null,Ds(4,4,Ym.bind(null,t,e),a)}function Bc(){}function Km(e,t){var a=mt();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Ac(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Fm(e,t){var a=mt();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Ac(t,s[1]))return s[0];if(s=e(),zl){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[s,t],s}function Hc(e,t,a){return a===void 0||(Ga&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Zp(),xe.lanes|=e,el|=e,a)}function Gm(e,t,a,s){return an(a,t)?a:vi.current!==null?(e=Hc(e,a,s),an(e,t)||(gt=!0),e):(Ga&42)===0?(gt=!0,e.memoizedState=a):(e=Zp(),xe.lanes|=e,el|=e,t)}function Xm(e,t,a,s,c){var f=X.p;X.p=f!==0&&8>f?f:8;var v=k.T,S={};k.T=S,Yc(e,!1,t,a);try{var T=c(),U=k.S;if(U!==null&&U(S,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var Y=tb(T,s);Ms(e,t,Y,un(e))}else Ms(e,t,s,un(e))}catch(F){Ms(e,t,{then:function(){},status:"rejected",reason:F},un())}finally{X.p=f,k.T=v}}function sb(){}function Qc(e,t,a,s){if(e.tag!==5)throw Error(i(476));var c=Zm(e).queue;Xm(e,c,t,J,a===null?sb:function(){return Pm(e),a(s)})}function Zm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pm(e){var t=Zm(e).next.queue;Ms(e,t,{},un())}function $c(){return Dt(Js)}function Jm(){return mt().memoizedState}function Im(){return mt().memoizedState}function rb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=un();e=Ka(a);var s=Fa(t,e,a);s!==null&&(cn(s,t,a),js(s,t,a)),t={cache:gc()},e.payload=t;return}t=t.return}}function ob(e,t,a){var s=un();a={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},oo(e)?ep(t,a):(a=oc(e,t,a,s),a!==null&&(cn(a,e,s),tp(a,t,s)))}function Wm(e,t,a){var s=un();Ms(e,t,a,s)}function Ms(e,t,a,s){var c={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(oo(e))ep(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,S=f(v,a);if(c.hasEagerState=!0,c.eagerState=S,an(S,v))return Kr(e,t,c,0),Xe===null&&Vr(),!1}catch{}finally{}if(a=oc(e,t,c,s),a!==null)return cn(a,e,s),tp(a,t,s),!0}return!1}function Yc(e,t,a,s){if(s={lane:2,revertLane:wf(),action:s,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(t)throw Error(i(479))}else t=oc(e,a,s,2),t!==null&&cn(t,e,2)}function oo(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function ep(e,t){gi=no=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function tp(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,st(e,a)}}var uo={readContext:Dt,use:lo,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut},np={readContext:Dt,use:lo,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Bm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ro(4194308,4,Ym.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ro(4194308,4,e,t)},useInsertionEffect:function(e,t){ro(4,2,e,t)},useMemo:function(e,t){var a=Ft();t=t===void 0?null:t;var s=e();if(zl){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=Ft();if(a!==void 0){var c=a(t);if(zl){Vt(!0);try{a(t)}finally{Vt(!1)}}}else c=t;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=ob.bind(null,xe,e),[s.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=zc(e);var t=e.queue,a=Wm.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Bc,useDeferredValue:function(e,t){var a=Ft();return Hc(a,e,t)},useTransition:function(){var e=zc(!1);return e=Xm.bind(null,xe,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=xe,c=Ft();if(Le){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Xe===null)throw Error(i(349));(Ae&124)!==0||Em(s,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Bm(_m.bind(null,s,f,e),[e]),s.flags|=2048,xi(9,so(),Cm.bind(null,s,f,a,t),null),a},useId:function(){var e=Ft(),t=Xe.identifierPrefix;if(Le){var a=ga,s=va;a=(s&~(1<<32-it(s)-1)).toString(32)+a,t="«"+t+"R"+a,a=ao++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=nb++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:$c,useFormState:Lm,useActionState:Lm,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Yc.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Lc,useCacheRefresh:function(){return Ft().memoizedState=rb.bind(null,xe)}},ap={readContext:Dt,use:lo,useCallback:Km,useContext:Dt,useEffect:Hm,useImperativeHandle:Vm,useInsertionEffect:Qm,useLayoutEffect:$m,useMemo:Fm,useReducer:io,useRef:km,useState:function(){return io(Sa)},useDebugValue:Bc,useDeferredValue:function(e,t){var a=mt();return Gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=io(Sa)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Rs(e),t]},useSyncExternalStore:wm,useId:Jm,useHostTransitionStatus:$c,useFormState:Um,useActionState:Um,useOptimistic:function(e,t){var a=mt();return Am(a,Qe,e,t)},useMemoCache:Lc,useCacheRefresh:Im},ub={readContext:Dt,use:lo,useCallback:Km,useContext:Dt,useEffect:Hm,useImperativeHandle:Vm,useInsertionEffect:Qm,useLayoutEffect:$m,useMemo:Fm,useReducer:qc,useRef:km,useState:function(){return qc(Sa)},useDebugValue:Bc,useDeferredValue:function(e,t){var a=mt();return Qe===null?Hc(a,e,t):Gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=qc(Sa)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Rs(e),t]},useSyncExternalStore:wm,useId:Jm,useHostTransitionStatus:$c,useFormState:zm,useActionState:zm,useOptimistic:function(e,t){var a=mt();return Qe!==null?Am(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Lc,useCacheRefresh:Im},Si=null,Ls=0;function co(e){var t=Ls;return Ls+=1,Si===null&&(Si=[]),mm(Si,e,t)}function Us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function fo(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){var t=e._init;return t(e._payload)}function ip(e){function t(M,D){if(e){var L=M.deletions;L===null?(M.deletions=[D],M.flags|=16):L.push(D)}}function a(M,D){if(!e)return null;for(;D!==null;)t(M,D),D=D.sibling;return null}function s(M){for(var D=new Map;M!==null;)M.key!==null?D.set(M.key,M):D.set(M.index,M),M=M.sibling;return D}function c(M,D){return M=ya(M,D),M.index=0,M.sibling=null,M}function f(M,D,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<D?(M.flags|=67108866,D):L):(M.flags|=67108866,D)):(M.flags|=1048576,D)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,D,L,K){return D===null||D.tag!==6?(D=cc(L,M.mode,K),D.return=M,D):(D=c(D,L),D.return=M,D)}function T(M,D,L,K){var ee=L.type;return ee===w?Y(M,D,L.props.children,K,L.key):D!==null&&(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&lp(ee)===D.type)?(D=c(D,L.props),Us(D,L),D.return=M,D):(D=Gr(L.type,L.key,L.props,null,M.mode,K),Us(D,L),D.return=M,D)}function U(M,D,L,K){return D===null||D.tag!==4||D.stateNode.containerInfo!==L.containerInfo||D.stateNode.implementation!==L.implementation?(D=fc(L,M.mode,K),D.return=M,D):(D=c(D,L.children||[]),D.return=M,D)}function Y(M,D,L,K,ee){return D===null||D.tag!==7?(D=Tl(L,M.mode,K,ee),D.return=M,D):(D=c(D,L),D.return=M,D)}function F(M,D,L){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=cc(""+D,M.mode,L),D.return=M,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case E:return L=Gr(D.type,D.key,D.props,null,M.mode,L),Us(L,D),L.return=M,L;case C:return D=fc(D,M.mode,L),D.return=M,D;case Z:var K=D._init;return D=K(D._payload),F(M,D,L)}if(Se(D)||be(D))return D=Tl(D,M.mode,L,null),D.return=M,D;if(typeof D.then=="function")return F(M,co(D),L);if(D.$$typeof===j)return F(M,Jr(M,D),L);fo(M,D)}return null}function q(M,D,L,K){var ee=D!==null?D.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ee!==null?null:S(M,D,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return L.key===ee?T(M,D,L,K):null;case C:return L.key===ee?U(M,D,L,K):null;case Z:return ee=L._init,L=ee(L._payload),q(M,D,L,K)}if(Se(L)||be(L))return ee!==null?null:Y(M,D,L,K,null);if(typeof L.then=="function")return q(M,D,co(L),K);if(L.$$typeof===j)return q(M,D,Jr(M,L),K);fo(M,L)}return null}function z(M,D,L,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return M=M.get(L)||null,S(D,M,""+K,ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case E:return M=M.get(K.key===null?L:K.key)||null,T(D,M,K,ee);case C:return M=M.get(K.key===null?L:K.key)||null,U(D,M,K,ee);case Z:var we=K._init;return K=we(K._payload),z(M,D,L,K,ee)}if(Se(K)||be(K))return M=M.get(L)||null,Y(D,M,K,ee,null);if(typeof K.then=="function")return z(M,D,L,co(K),ee);if(K.$$typeof===j)return z(M,D,L,Jr(D,K),ee);fo(D,K)}return null}function me(M,D,L,K){for(var ee=null,we=null,le=D,he=D=0,xt=null;le!==null&&he<L.length;he++){le.index>he?(xt=le,le=null):xt=le.sibling;var Te=q(M,le,L[he],K);if(Te===null){le===null&&(le=xt);break}e&&le&&Te.alternate===null&&t(M,le),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te,le=xt}if(he===L.length)return a(M,le),Le&&Rl(M,he),ee;if(le===null){for(;he<L.length;he++)le=F(M,L[he],K),le!==null&&(D=f(le,D,he),we===null?ee=le:we.sibling=le,we=le);return Le&&Rl(M,he),ee}for(le=s(le);he<L.length;he++)xt=z(le,M,he,L[he],K),xt!==null&&(e&&xt.alternate!==null&&le.delete(xt.key===null?he:xt.key),D=f(xt,D,he),we===null?ee=xt:we.sibling=xt,we=xt);return e&&le.forEach(function(ul){return t(M,ul)}),Le&&Rl(M,he),ee}function fe(M,D,L,K){if(L==null)throw Error(i(151));for(var ee=null,we=null,le=D,he=D=0,xt=null,Te=L.next();le!==null&&!Te.done;he++,Te=L.next()){le.index>he?(xt=le,le=null):xt=le.sibling;var ul=q(M,le,Te.value,K);if(ul===null){le===null&&(le=xt);break}e&&le&&ul.alternate===null&&t(M,le),D=f(ul,D,he),we===null?ee=ul:we.sibling=ul,we=ul,le=xt}if(Te.done)return a(M,le),Le&&Rl(M,he),ee;if(le===null){for(;!Te.done;he++,Te=L.next())Te=F(M,Te.value,K),Te!==null&&(D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return Le&&Rl(M,he),ee}for(le=s(le);!Te.done;he++,Te=L.next())Te=z(le,M,he,Te.value,K),Te!==null&&(e&&Te.alternate!==null&&le.delete(Te.key===null?he:Te.key),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return e&&le.forEach(function(cx){return t(M,cx)}),Le&&Rl(M,he),ee}function Ye(M,D,L,K){if(typeof L=="object"&&L!==null&&L.type===w&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case E:e:{for(var ee=L.key;D!==null;){if(D.key===ee){if(ee=L.type,ee===w){if(D.tag===7){a(M,D.sibling),K=c(D,L.props.children),K.return=M,M=K;break e}}else if(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&lp(ee)===D.type){a(M,D.sibling),K=c(D,L.props),Us(K,L),K.return=M,M=K;break e}a(M,D);break}else t(M,D);D=D.sibling}L.type===w?(K=Tl(L.props.children,M.mode,K,L.key),K.return=M,M=K):(K=Gr(L.type,L.key,L.props,null,M.mode,K),Us(K,L),K.return=M,M=K)}return v(M);case C:e:{for(ee=L.key;D!==null;){if(D.key===ee)if(D.tag===4&&D.stateNode.containerInfo===L.containerInfo&&D.stateNode.implementation===L.implementation){a(M,D.sibling),K=c(D,L.children||[]),K.return=M,M=K;break e}else{a(M,D);break}else t(M,D);D=D.sibling}K=fc(L,M.mode,K),K.return=M,M=K}return v(M);case Z:return ee=L._init,L=ee(L._payload),Ye(M,D,L,K)}if(Se(L))return me(M,D,L,K);if(be(L)){if(ee=be(L),typeof ee!="function")throw Error(i(150));return L=ee.call(L),fe(M,D,L,K)}if(typeof L.then=="function")return Ye(M,D,co(L),K);if(L.$$typeof===j)return Ye(M,D,Jr(M,L),K);fo(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,D!==null&&D.tag===6?(a(M,D.sibling),K=c(D,L),K.return=M,M=K):(a(M,D),K=cc(L,M.mode,K),K.return=M,M=K),v(M)):a(M,D)}return function(M,D,L,K){try{Ls=0;var ee=Ye(M,D,L,K);return Si=null,ee}catch(le){if(le===_s||le===Wr)throw le;var we=ln(29,le,null,M.mode);return we.lanes=K,we.return=M,we}finally{}}}var wi=ip(!0),sp=ip(!1),jn=$(null),Gn=null;function Xa(e){var t=e.alternate;I(yt,yt.current&1),I(jn,e),Gn===null&&(t===null||vi.current!==null||t.memoizedState!==null)&&(Gn=e)}function rp(e){if(e.tag===22){if(I(yt,yt.current),I(jn,e),Gn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Gn=e)}}else Za()}function Za(){I(yt,yt.current),I(jn,jn.current)}function wa(e){W(jn),Gn===e&&(Gn=null),W(yt)}var yt=$(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Lf(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Vc(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:g({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Kc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=un(),c=Ka(s);c.payload=t,a!=null&&(c.callback=a),t=Fa(e,c,s),t!==null&&(cn(t,e,s),js(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=un(),c=Ka(s);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Fa(e,c,s),t!==null&&(cn(t,e,s),js(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=un(),s=Ka(a);s.tag=2,t!=null&&(s.callback=t),t=Fa(e,s,a),t!==null&&(cn(t,e,a),js(t,e,a))}};function op(e,t,a,s,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,v):t.prototype&&t.prototype.isPureReactComponent?!vs(a,s)||!vs(c,f):!0}function up(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Kc.enqueueReplaceState(t,t.state,null)}function kl(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=g({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}var mo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function cp(e){mo(e)}function fp(e){console.error(e)}function dp(e){mo(e)}function po(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function hp(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Fc(e,t,a){return a=Ka(a),a.tag=3,a.payload={element:null},a.callback=function(){po(e,t)},a}function mp(e){return e=Ka(e),e.tag=3,e}function pp(e,t,a,s){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=s.value;e.payload=function(){return c(f)},e.callback=function(){hp(t,a,s)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){hp(t,a,s),typeof c!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function cb(e,t,a,s,c){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&ws(t,a,c,!0),a=jn.current,a!==null){switch(a.tag){case 13:return Gn===null?vf():a.alternate===null&&at===0&&(at=3),a.flags&=-257,a.flags|=65536,a.lanes=c,s===Sc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),bf(e,s,c)),!1;case 22:return a.flags|=65536,s===Sc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),bf(e,s,c)),!1}throw Error(i(435,a.tag))}return bf(e,s,c),vf(),!1}if(Le)return t=jn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,s!==mc&&(e=Error(i(422),{cause:s}),Ss(En(e,a)))):(s!==mc&&(t=Error(i(423),{cause:s}),Ss(En(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,s=En(s,a),c=Fc(e.stateNode,s,c),Cc(e,c),at!==4&&(at=2)),!1;var f=Error(i(520),{cause:s});if(f=En(f,a),$s===null?$s=[f]:$s.push(f),at!==4&&(at=2),t===null)return!0;s=En(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Fc(a.stateNode,s,e),Cc(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(tl===null||!tl.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=mp(c),pp(c,e,a,s),Cc(a,c),!1}a=a.return}while(a!==null);return!1}var yp=Error(i(461)),gt=!1;function wt(e,t,a,s){t.child=e===null?sp(t,null,a,s):wi(t,e.child,a,s)}function vp(e,t,a,s,c){a=a.render;var f=t.ref;if("ref"in s){var v={};for(var S in s)S!=="ref"&&(v[S]=s[S])}else v=s;return Ul(t),s=Tc(e,t,a,v,f,c),S=Oc(),e!==null&&!gt?(Rc(e,t,c),Ea(e,t,c)):(Le&&S&&dc(t),t.flags|=1,wt(e,t,s,c),t.child)}function gp(e,t,a,s,c){if(e===null){var f=a.type;return typeof f=="function"&&!uc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,bp(e,t,f,s,c)):(e=Gr(a.type,null,s,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!ef(e,c)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:vs,a(v,s)&&e.ref===t.ref)return Ea(e,t,c)}return t.flags|=1,e=ya(f,s),e.ref=t.ref,e.return=t,t.child=e}function bp(e,t,a,s,c){if(e!==null){var f=e.memoizedProps;if(vs(f,s)&&e.ref===t.ref)if(gt=!1,t.pendingProps=s=f,ef(e,c))(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,Ea(e,t,c)}return Gc(e,t,a,s,c)}function xp(e,t,a){var s=t.pendingProps,c=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"){if((t.flags&128)!==0){if(s=f!==null?f.baseLanes|a:a,e!==null){for(c=t.child=e.child,f=0;c!==null;)f=f|c.lanes|c.childLanes,c=c.sibling;t.childLanes=f&~s}else t.childLanes=0,t.child=null;return Sp(e,t,s,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ir(t,f!==null?f.cachePool:null),f!==null?bm(t,f):Nc(),rp(t);else return t.lanes=t.childLanes=536870912,Sp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(Ir(t,f.cachePool),bm(t,f),Za(),t.memoizedState=null):(e!==null&&Ir(t,null),Nc(),Za());return wt(e,t,c,a),t.child}function Sp(e,t,a,s){var c=xc();return c=c===null?null:{parent:pt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Ir(t,null),Nc(),rp(t),e!==null&&ws(e,t,s,!0),null}function yo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Gc(e,t,a,s,c){return Ul(t),a=Tc(e,t,a,s,void 0,c),s=Oc(),e!==null&&!gt?(Rc(e,t,c),Ea(e,t,c)):(Le&&s&&dc(t),t.flags|=1,wt(e,t,a,c),t.child)}function wp(e,t,a,s,c,f){return Ul(t),t.updateQueue=null,a=Sm(t,s,a,c),xm(e),s=Oc(),e!==null&&!gt?(Rc(e,t,f),Ea(e,t,f)):(Le&&s&&dc(t),t.flags|=1,wt(e,t,a,f),t.child)}function Ep(e,t,a,s,c){if(Ul(t),t.stateNode===null){var f=di,v=a.contextType;typeof v=="object"&&v!==null&&(f=Dt(v)),f=new a(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Kc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},wc(t),v=a.contextType,f.context=typeof v=="object"&&v!==null?Dt(v):di,f.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Vc(t,a,v,s),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Kc.enqueueReplaceState(f,f.state,null),Ts(t,s,f,c),As(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,T=kl(a,S);f.props=T;var U=f.context,Y=a.contextType;v=di,typeof Y=="object"&&Y!==null&&(v=Dt(Y));var F=a.getDerivedStateFromProps;Y=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||U!==v)&&up(t,f,s,v),Va=!1;var q=t.memoizedState;f.state=q,Ts(t,s,f,c),As(),U=t.memoizedState,S||q!==U||Va?(typeof F=="function"&&(Vc(t,a,F,s),U=t.memoizedState),(T=Va||op(t,a,T,s,q,U,v))?(Y||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=U),f.props=s,f.state=U,f.context=v,s=T):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,Ec(e,t),v=t.memoizedProps,Y=kl(a,v),f.props=Y,F=t.pendingProps,q=f.context,U=a.contextType,T=di,typeof U=="object"&&U!==null&&(T=Dt(U)),S=a.getDerivedStateFromProps,(U=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==F||q!==T)&&up(t,f,s,T),Va=!1,q=t.memoizedState,f.state=q,Ts(t,s,f,c),As();var z=t.memoizedState;v!==F||q!==z||Va||e!==null&&e.dependencies!==null&&Pr(e.dependencies)?(typeof S=="function"&&(Vc(t,a,S,s),z=t.memoizedState),(Y=Va||op(t,a,Y,s,q,z,T)||e!==null&&e.dependencies!==null&&Pr(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,z,T),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,z,T)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=z),f.props=s,f.state=z,f.context=T,s=Y):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,yo(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=wi(t,e.child,null,c),t.child=wi(t,null,a,c)):wt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=Ea(e,t,c),e}function Cp(e,t,a,s){return xs(),t.flags|=256,wt(e,t,a,s),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zc(e){return{baseLanes:e,cachePool:fm()}}function Pc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=An),e}function _p(e,t,a){var s=t.pendingProps,c=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(c?Xa(t):Za(),Le){var S=nt,T;if(T=S){e:{for(T=S,S=Fn;T.nodeType!==8;){if(!S){S=null;break e}if(T=qn(T.nextSibling),T===null){S=null;break e}}S=T}S!==null?(t.memoizedState={dehydrated:S,treeContext:Ol!==null?{id:va,overflow:ga}:null,retryLane:536870912,hydrationErrors:null},T=ln(18,null,null,0),T.stateNode=S,T.return=t,t.child=T,Qt=t,nt=null,T=!0):T=!1}T||Ml(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Lf(S)?t.lanes=32:t.lanes=536870912,null;wa(t)}return S=s.children,s=s.fallback,c?(Za(),c=t.mode,S=vo({mode:"hidden",children:S},c),s=Tl(s,c,a,null),S.return=t,s.return=t,S.sibling=s,t.child=S,c=t.child,c.memoizedState=Zc(a),c.childLanes=Pc(e,v,a),t.memoizedState=Xc,s):(Xa(t),Jc(t,S))}if(T=e.memoizedState,T!==null&&(S=T.dehydrated,S!==null)){if(f)t.flags&256?(Xa(t),t.flags&=-257,t=Ic(e,t,a)):t.memoizedState!==null?(Za(),t.child=e.child,t.flags|=128,t=null):(Za(),c=s.fallback,S=t.mode,s=vo({mode:"visible",children:s.children},S),c=Tl(c,S,a,null),c.flags|=2,s.return=t,c.return=t,s.sibling=c,t.child=s,wi(t,e.child,null,a),s=t.child,s.memoizedState=Zc(a),s.childLanes=Pc(e,v,a),t.memoizedState=Xc,t=c);else if(Xa(t),Lf(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var U=v.dgst;v=U,s=Error(i(419)),s.stack="",s.digest=v,Ss({value:s,source:null,stack:null}),t=Ic(e,t,a)}else if(gt||ws(e,t,a,!1),v=(a&e.childLanes)!==0,gt||v){if(v=Xe,v!==null&&(s=a&-a,s=(s&42)!==0?1:Tt(s),s=(s&(v.suspendedLanes|a))!==0?0:s,s!==0&&s!==T.retryLane))throw T.retryLane=s,fi(e,s),cn(v,e,s),yp;S.data==="$?"||vf(),t=Ic(e,t,a)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,nt=qn(S.nextSibling),Qt=t,Le=!0,Dl=null,Fn=!1,e!==null&&(_n[Nn++]=va,_n[Nn++]=ga,_n[Nn++]=Ol,va=e.id,ga=e.overflow,Ol=t),t=Jc(t,s.children),t.flags|=4096);return t}return c?(Za(),c=s.fallback,S=t.mode,T=e.child,U=T.sibling,s=ya(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,U!==null?c=ya(U,c):(c=Tl(c,S,a,null),c.flags|=2),c.return=t,s.return=t,s.sibling=c,t.child=s,s=c,c=t.child,S=e.child.memoizedState,S===null?S=Zc(a):(T=S.cachePool,T!==null?(U=pt._currentValue,T=T.parent!==U?{parent:U,pool:U}:T):T=fm(),S={baseLanes:S.baseLanes|a,cachePool:T}),c.memoizedState=S,c.childLanes=Pc(e,v,a),t.memoizedState=Xc,s):(Xa(t),a=e.child,e=a.sibling,a=ya(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=a,t.memoizedState=null,a)}function Jc(e,t){return t=vo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vo(e,t){return e=ln(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Ic(e,t,a){return wi(t,e.child,null,a),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Np(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),yc(e.return,t,a)}function Wc(e,t,a,s,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=s,f.tail=a,f.tailMode=c)}function jp(e,t,a){var s=t.pendingProps,c=s.revealOrder,f=s.tail;if(wt(e,t,s.children,a),s=yt.current,(s&2)!==0)s=s&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Np(e,a,t);else if(e.tag===19)Np(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}switch(I(yt,s),c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&ho(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Wc(t,!1,c,a,f);break;case"backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ho(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Wc(t,!0,a,null,f);break;case"together":Wc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),el|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ws(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=ya(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ya(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ef(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pr(e)))}function fb(e,t,a){switch(t.tag){case 3:qe(t,t.stateNode.containerInfo),Ya(t,pt,e.memoizedState.cache),xs();break;case 27:case 5:Qn(t);break;case 4:qe(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Xa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?_p(e,t,a):(Xa(t),e=Ea(e,t,a),e!==null?e.sibling:null);Xa(t);break;case 19:var c=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(ws(e,t,a,!1),s=(a&t.childLanes)!==0),c){if(s)return jp(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),I(yt,yt.current),s)break;return null;case 22:case 23:return t.lanes=0,xp(e,t,a);case 24:Ya(t,pt,e.memoizedState.cache)}return Ea(e,t,a)}function Ap(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)gt=!0;else{if(!ef(e,a)&&(t.flags&128)===0)return gt=!1,fb(e,t,a);gt=(e.flags&131072)!==0}else gt=!1,Le&&(t.flags&1048576)!==0&&lm(t,Zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var s=t.elementType,c=s._init;if(s=c(s._payload),t.type=s,typeof s=="function")uc(s)?(e=kl(s,e),t.tag=1,t=Ep(null,t,s,e,a)):(t.tag=0,t=Gc(null,t,s,e,a));else{if(s!=null){if(c=s.$$typeof,c===B){t.tag=11,t=vp(null,t,s,e,a);break e}else if(c===G){t.tag=14,t=gp(null,t,s,e,a);break e}}throw t=ye(s)||s,Error(i(306,t,""))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,c=kl(s,t.pendingProps),Ep(e,t,s,c,a);case 3:e:{if(qe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));s=t.pendingProps;var f=t.memoizedState;c=f.element,Ec(e,t),Ts(t,s,null,a);var v=t.memoizedState;if(s=v.cache,Ya(t,pt,s),s!==f.cache&&vc(t,[pt],a,!0),As(),s=v.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Cp(e,t,s,a);break e}else if(s!==c){c=En(Error(i(424)),t),Ss(c),t=Cp(e,t,s,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=qn(e.firstChild),Qt=t,Le=!0,Dl=null,Fn=!0,a=sp(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(xs(),s===c){t=Ea(e,t,a);break e}wt(e,t,s,a)}t=t.child}return t;case 26:return yo(e,t),e===null?(a=D0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Le||(a=t.type,e=t.pendingProps,s=Ro(ce.current).createElement(a),s[P]=t,s[ne]=e,Ct(s,a,e),ot(s),t.stateNode=s):t.memoizedState=D0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qn(t),e===null&&Le&&(s=t.stateNode=T0(t.type,t.pendingProps,ce.current),Qt=t,Fn=!0,c=nt,ll(t.type)?(Uf=c,nt=qn(s.firstChild)):nt=c),wt(e,t,t.pendingProps.children,a),yo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((c=s=nt)&&(s=Bb(s,t.type,t.pendingProps,Fn),s!==null?(t.stateNode=s,Qt=t,nt=qn(s.firstChild),Fn=!1,c=!0):c=!1),c||Ml(t)),Qn(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,s=f.children,Rf(c,f)?s=null:v!==null&&Rf(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=Tc(e,t,ab,null,null,a),Js._currentValue=c),yo(e,t),wt(e,t,s,a),t.child;case 6:return e===null&&Le&&((e=a=nt)&&(a=Hb(a,t.pendingProps,Fn),a!==null?(t.stateNode=a,Qt=t,nt=null,e=!0):e=!1),e||Ml(t)),null;case 13:return _p(e,t,a);case 4:return qe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=wi(t,null,s,a):wt(e,t,s,a),t.child;case 11:return vp(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,Ya(t,t.type,s.value),wt(e,t,s.children,a),t.child;case 9:return c=t.type._context,s=t.pendingProps.children,Ul(t),c=Dt(c),s=s(c),t.flags|=1,wt(e,t,s,a),t.child;case 14:return gp(e,t,t.type,t.pendingProps,a);case 15:return bp(e,t,t.type,t.pendingProps,a);case 19:return jp(e,t,a);case 31:return s=t.pendingProps,a=t.mode,s={mode:s.mode,children:s.children},e===null?(a=vo(s,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ya(e.child,s),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return xp(e,t,a);case 24:return Ul(t),s=Dt(pt),e===null?(c=xc(),c===null&&(c=Xe,f=gc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:s,cache:c},wc(t),Ya(t,pt,c)):((e.lanes&a)!==0&&(Ec(e,t),Ts(t,null,null,a),As()),c=e.memoizedState,f=t.memoizedState,c.parent!==s?(c={parent:s,cache:s},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ya(t,pt,s)):(s=f.cache,Ya(t,pt,s),s!==c.cache&&vc(t,[pt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ca(e){e.flags|=4}function Tp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!z0(t)){if(t=jn.current,t!==null&&((Ae&4194048)===Ae?Gn!==null:(Ae&62914560)!==Ae&&(Ae&536870912)===0||t!==Gn))throw Ns=Sc,dm;e.flags|=8192}}function go(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?da():536870912,e.lanes|=t,Ni|=t)}function qs(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags&65011712,s|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function db(e,t,a){var s=t.pendingProps;switch(hc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),xa(pt),Ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(bs(t)?Ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rm())),We(t),null;case 26:return a=t.memoizedState,e===null?(Ca(t),a!==null?(We(t),Tp(t,a)):(We(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Ca(t),We(t),Tp(t,a)):(We(t),t.flags&=-16777217):(e.memoizedProps!==s&&Ca(t),We(t),t.flags&=-16777217),null;case 27:jt(t),a=ce.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(!s){if(t.stateNode===null)throw Error(i(166));return We(t),null}e=se.current,bs(t)?im(t):(e=T0(c,s,a),t.stateNode=e,Ca(t))}return We(t),null;case 5:if(jt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(!s){if(t.stateNode===null)throw Error(i(166));return We(t),null}if(e=se.current,bs(t))im(t);else{switch(c=Ro(ce.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof s.is=="string"?c.createElement("select",{is:s.is}):c.createElement("select"),s.multiple?e.multiple=!0:s.size&&(e.size=s.size);break;default:e=typeof s.is=="string"?c.createElement(a,{is:s.is}):c.createElement(a)}}e[P]=t,e[ne]=s;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(Ct(e,a,s),a){case"button":case"input":case"select":case"textarea":e=!!s.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ca(t)}}return We(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(i(166));if(e=ce.current,bs(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,c=Qt,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[P]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||w0(e.nodeValue,a)),e||Ml(t)}else e=Ro(e).createTextNode(s),e[P]=t,t.stateNode=e}return We(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[P]=t}else xs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),c=!1}else c=rm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(wa(t),t):(wa(t),null)}if(wa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=s!==null,e=e!==null&&e.memoizedState!==null,a){s=t.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool);var f=null;s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==c&&(s.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),go(t,t.updateQueue),We(t),null;case 4:return Ze(),e===null&&Nf(t.stateNode.containerInfo),We(t),null;case 10:return xa(t.type),We(t),null;case 19:if(W(yt),c=t.memoizedState,c===null)return We(t),null;if(s=(t.flags&128)!==0,f=c.rendering,f===null)if(s)qs(c,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=ho(e),f!==null){for(t.flags|=128,qs(c,!1),e=f.updateQueue,t.updateQueue=e,go(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)am(a,e),a=a.sibling;return I(yt,yt.current&1|2),t.child}e=e.sibling}c.tail!==null&&Bt()>So&&(t.flags|=128,s=!0,qs(c,!1),t.lanes=4194304)}else{if(!s)if(e=ho(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,go(t,e),qs(c,!0),c.tail===null&&c.tailMode==="hidden"&&!f.alternate&&!Le)return We(t),null}else 2*Bt()-c.renderingStartTime>So&&a!==536870912&&(t.flags|=128,s=!0,qs(c,!1),t.lanes=4194304);c.isBackwards?(f.sibling=t.child,t.child=f):(e=c.last,e!==null?e.sibling=f:t.child=f,c.last=f)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Bt(),t.sibling=null,e=yt.current,I(yt,s?e&1|2:e&1),t):(We(t),null);case 22:case 23:return wa(t),jc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),a=t.updateQueue,a!==null&&go(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&W(ql),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xa(pt),We(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function hb(e,t){switch(hc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(pt),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return jt(t),null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));xs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(yt),null;case 4:return Ze(),null;case 10:return xa(t.type),null;case 22:case 23:return wa(t),jc(),e!==null&&W(ql),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(pt),null;case 25:return null;default:return null}}function Op(e,t){switch(hc(t),t.tag){case 3:xa(pt),Ze();break;case 26:case 27:case 5:jt(t);break;case 4:Ze();break;case 13:wa(t);break;case 19:W(yt);break;case 10:xa(t.type);break;case 22:case 23:wa(t),jc(),e!==null&&W(ql);break;case 24:xa(pt)}}function zs(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){s=void 0;var f=a.create,v=a.inst;s=f(),v.destroy=s}a=a.next}while(a!==c)}}catch(S){Ve(t,t.return,S)}}function Pa(e,t,a){try{var s=t.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var f=c.next;s=f;do{if((s.tag&e)===e){var v=s.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,c=t;var T=a,U=S;try{U()}catch(Y){Ve(c,T,Y)}}}s=s.next}while(s!==f)}}catch(Y){Ve(t,t.return,Y)}}function Rp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{gm(t,a)}catch(s){Ve(e,e.return,s)}}}function Dp(e,t,a){a.props=kl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Ve(e,t,s)}}function ks(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(c){Ve(e,t,c)}}function Xn(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(c){Ve(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ve(e,t,c)}else a.current=null}function Mp(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(c){Ve(e,e.return,c)}}function tf(e,t,a){try{var s=e.stateNode;Lb(s,e.type,a,t),s[ne]=t}catch(c){Ve(e,e.return,c)}}function Lp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ll(e.type)||e.tag===4}function nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function af(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Oo));else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(af(e,t,a),e=e.sibling;e!==null;)af(e,t,a),e=e.sibling}function bo(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(bo(e,t,a),e=e.sibling;e!==null;)bo(e,t,a),e=e.sibling}function Up(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ct(t,s,a),t[P]=e,t[ne]=a}catch(f){Ve(e,e.return,f)}}var _a=!1,ct=!1,lf=!1,qp=typeof WeakSet=="function"?WeakSet:Set,bt=null;function mb(e,t){if(e=e.containerInfo,Tf=zo,e=Gh(e),nc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var c=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,S=-1,T=-1,U=0,Y=0,F=e,q=null;t:for(;;){for(var z;F!==a||c!==0&&F.nodeType!==3||(S=v+c),F!==f||s!==0&&F.nodeType!==3||(T=v+s),F.nodeType===3&&(v+=F.nodeValue.length),(z=F.firstChild)!==null;)q=F,F=z;for(;;){if(F===e)break t;if(q===a&&++U===c&&(S=v),q===f&&++Y===s&&(T=v),(z=F.nextSibling)!==null)break;F=q,q=F.parentNode}F=z}a=S===-1||T===-1?null:{start:S,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(Of={focusedElem:e,selectionRange:a},zo=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,f=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,s=a.stateNode;try{var me=kl(a.type,c,a.elementType===a.type);e=s.getSnapshotBeforeUpdate(me,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Ve(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function zp(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),s&4&&zs(5,a);break;case 1:if(Ja(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){Ve(a,a.return,v)}else{var c=kl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ve(a,a.return,v)}}s&64&&Rp(a),s&512&&ks(a,a.return);break;case 3:if(Ja(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{gm(e,t)}catch(v){Ve(a,a.return,v)}}break;case 27:t===null&&s&4&&Up(a);case 26:case 5:Ja(e,a),t===null&&s&4&&Mp(a),s&512&&ks(a,a.return);break;case 12:Ja(e,a);break;case 13:Ja(e,a),s&4&&Hp(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Eb.bind(null,a),Qb(e,a))));break;case 22:if(s=a.memoizedState!==null||_a,!s){t=t!==null&&t.memoizedState!==null||ct,c=_a;var f=ct;_a=s,(ct=t)&&!f?Ia(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),_a=c,ct=f}break;case 30:break;default:Ja(e,a)}}function kp(e){var t=e.alternate;t!==null&&(e.alternate=null,kp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Rt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pe=null,Gt=!1;function Na(e,t,a){for(a=a.child;a!==null;)Bp(e,t,a),a=a.sibling}function Bp(e,t,a){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(yn,a)}catch{}switch(a.tag){case 26:ct||Xn(a,t),Na(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||Xn(a,t);var s=Pe,c=Gt;ll(a.type)&&(Pe=a.stateNode,Gt=!1),Na(e,t,a),Gs(a.stateNode),Pe=s,Gt=c;break;case 5:ct||Xn(a,t);case 6:if(s=Pe,c=Gt,Pe=null,Na(e,t,a),Pe=s,Gt=c,Pe!==null)if(Gt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(a.stateNode)}catch(f){Ve(a,t,f)}else try{Pe.removeChild(a.stateNode)}catch(f){Ve(a,t,f)}break;case 18:Pe!==null&&(Gt?(e=Pe,j0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),tr(e)):j0(Pe,a.stateNode));break;case 4:s=Pe,c=Gt,Pe=a.stateNode.containerInfo,Gt=!0,Na(e,t,a),Pe=s,Gt=c;break;case 0:case 11:case 14:case 15:ct||Pa(2,a,t),ct||Pa(4,a,t),Na(e,t,a);break;case 1:ct||(Xn(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Dp(a,t,s)),Na(e,t,a);break;case 21:Na(e,t,a);break;case 22:ct=(s=ct)||a.memoizedState!==null,Na(e,t,a),ct=s;break;default:Na(e,t,a)}}function Hp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{tr(e)}catch(a){Ve(t,t.return,a)}}function pb(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qp),t;default:throw Error(i(435,e.tag))}}function sf(e,t){var a=pb(e);t.forEach(function(s){var c=Cb.bind(null,e,s);a.has(s)||(a.add(s),s.then(c,c))})}function sn(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var c=a[s],f=e,v=t,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(ll(S.type)){Pe=S.stateNode,Gt=!1;break e}break;case 5:Pe=S.stateNode,Gt=!1;break e;case 3:case 4:Pe=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(Pe===null)throw Error(i(160));Bp(f,v,c),Pe=null,Gt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Qp(t,e),t=t.sibling}var Un=null;function Qp(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),rn(e),s&4&&(Pa(3,e,e.return),zs(3,e),Pa(5,e,e.return));break;case 1:sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),s&64&&_a&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var c=Un;if(sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),s&4){var f=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(s){case"title":f=c.getElementsByTagName("title")[0],(!f||f[rt]||f[P]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(s),c.head.insertBefore(f,c.querySelector("head > title"))),Ct(f,s,a),f[P]=e,ot(f),s=f;break e;case"link":var v=U0("link","href",c).get(s+(a.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(S,1);break t}}f=c.createElement(s),Ct(f,s,a),c.head.appendChild(f);break;case"meta":if(v=U0("meta","content",c).get(s+(a.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(S,1);break t}}f=c.createElement(s),Ct(f,s,a),c.head.appendChild(f);break;default:throw Error(i(468,s))}f[P]=e,ot(f),s=f}e.stateNode=s}else q0(c,e.type,e.stateNode);else e.stateNode=L0(c,s,e.memoizedProps);else f!==s?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,s===null?q0(c,e.type,e.stateNode):L0(c,s,e.memoizedProps)):s===null&&e.stateNode!==null&&tf(e,e.memoizedProps,a.memoizedProps)}break;case 27:sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),a!==null&&s&4&&tf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),e.flags&32){c=e.stateNode;try{li(c,"")}catch(z){Ve(e,e.return,z)}}s&4&&e.stateNode!=null&&(c=e.memoizedProps,tf(e,c,a!==null?a.memoizedProps:c)),s&1024&&(lf=!0);break;case 6:if(sn(t,e),rn(e),s&4){if(e.stateNode===null)throw Error(i(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(z){Ve(e,e.return,z)}}break;case 3:if(Lo=null,c=Un,Un=Do(t.containerInfo),sn(t,e),Un=c,rn(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{tr(t.containerInfo)}catch(z){Ve(e,e.return,z)}lf&&(lf=!1,$p(e));break;case 4:s=Un,Un=Do(e.stateNode.containerInfo),sn(t,e),rn(e),Un=s;break;case 12:sn(t,e),rn(e);break;case 13:sn(t,e),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(df=Bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,sf(e,s)));break;case 22:c=e.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,U=_a,Y=ct;if(_a=U||c,ct=Y||T,sn(t,e),ct=Y,_a=U,rn(e),s&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||T||_a||ct||Bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){T=a=t;try{if(f=T.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=T.stateNode;var F=T.memoizedProps.style,q=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(z){Ve(T,T.return,z)}}}else if(t.tag===6){if(a===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(z){Ve(T,T.return,z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,sf(e,a))));break;case 19:sn(t,e),rn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,sf(e,s)));break;case 30:break;case 21:break;default:sn(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Lp(s)){a=s;break}s=s.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=nf(e);bo(e,f,c);break;case 5:var v=a.stateNode;a.flags&32&&(li(v,""),a.flags&=-33);var S=nf(e);bo(e,S,v);break;case 3:case 4:var T=a.stateNode.containerInfo,U=nf(e);af(e,U,T);break;default:throw Error(i(161))}}catch(Y){Ve(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $p(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$p(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)zp(e,t.alternate,t),t=t.sibling}function Bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),Bl(t);break;case 1:Xn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Dp(t,t.return,a),Bl(t);break;case 27:Gs(t.stateNode);case 26:case 5:Xn(t,t.return),Bl(t);break;case 22:t.memoizedState===null&&Bl(t);break;case 30:Bl(t);break;default:Bl(t)}e=e.sibling}}function Ia(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:Ia(c,f,a),zs(4,f);break;case 1:if(Ia(c,f,a),s=f,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(U){Ve(s,s.return,U)}if(s=f,c=s.updateQueue,c!==null){var S=s.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)vm(T[c],S)}catch(U){Ve(s,s.return,U)}}a&&v&64&&Rp(f),ks(f,f.return);break;case 27:Up(f);case 26:case 5:Ia(c,f,a),a&&s===null&&v&4&&Mp(f),ks(f,f.return);break;case 12:Ia(c,f,a);break;case 13:Ia(c,f,a),a&&v&4&&Hp(c,f);break;case 22:f.memoizedState===null&&Ia(c,f,a),ks(f,f.return);break;case 30:break;default:Ia(c,f,a)}t=t.sibling}}function rf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Es(a))}function of(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Es(e))}function Zn(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yp(e,t,a,s),t=t.sibling}function Yp(e,t,a,s){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Zn(e,t,a,s),c&2048&&zs(9,t);break;case 1:Zn(e,t,a,s);break;case 3:Zn(e,t,a,s),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Es(e)));break;case 12:if(c&2048){Zn(e,t,a,s),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Ve(t,t.return,T)}}else Zn(e,t,a,s);break;case 13:Zn(e,t,a,s);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Zn(e,t,a,s):Bs(e,t):f._visibility&2?Zn(e,t,a,s):(f._visibility|=2,Ei(e,t,a,s,(t.subtreeFlags&10256)!==0)),c&2048&&rf(v,t);break;case 24:Zn(e,t,a,s),c&2048&&of(t.alternate,t);break;default:Zn(e,t,a,s)}}function Ei(e,t,a,s,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var f=e,v=t,S=a,T=s,U=v.flags;switch(v.tag){case 0:case 11:case 15:Ei(f,v,S,T,c),zs(8,v);break;case 23:break;case 22:var Y=v.stateNode;v.memoizedState!==null?Y._visibility&2?Ei(f,v,S,T,c):Bs(f,v):(Y._visibility|=2,Ei(f,v,S,T,c)),c&&U&2048&&rf(v.alternate,v);break;case 24:Ei(f,v,S,T,c),c&&U&2048&&of(v.alternate,v);break;default:Ei(f,v,S,T,c)}t=t.sibling}}function Bs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,c=s.flags;switch(s.tag){case 22:Bs(a,s),c&2048&&rf(s.alternate,s);break;case 24:Bs(a,s),c&2048&&of(s.alternate,s);break;default:Bs(a,s)}t=t.sibling}}var Hs=8192;function Ci(e){if(e.subtreeFlags&Hs)for(e=e.child;e!==null;)Vp(e),e=e.sibling}function Vp(e){switch(e.tag){case 26:Ci(e),e.flags&Hs&&e.memoizedState!==null&&ex(Un,e.memoizedState,e.memoizedProps);break;case 5:Ci(e);break;case 3:case 4:var t=Un;Un=Do(e.stateNode.containerInfo),Ci(e),Un=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Hs,Hs=16777216,Ci(e),Hs=t):Ci(e));break;default:Ci(e)}}function Kp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Qs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];bt=s,Gp(s,e)}Kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fp(e),e=e.sibling}function Fp(e){switch(e.tag){case 0:case 11:case 15:Qs(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:Qs(e);break;case 12:Qs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xo(e)):Qs(e);break;default:Qs(e)}}function xo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];bt=s,Gp(s,e)}Kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),xo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,xo(t));break;default:xo(t)}e=e.sibling}}function Gp(e,t){for(;bt!==null;){var a=bt;switch(a.tag){case 0:case 11:case 15:Pa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Es(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,bt=s;else e:for(a=e;bt!==null;){s=bt;var c=s.sibling,f=s.return;if(kp(s),s===a){bt=null;break e}if(c!==null){c.return=f,bt=c;break e}bt=f}}}var yb={getCacheForType:function(e){var t=Dt(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},vb=typeof WeakMap=="function"?WeakMap:Map,ze=0,Xe=null,Ne=null,Ae=0,ke=0,on=null,Wa=!1,_i=!1,uf=!1,ja=0,at=0,el=0,Hl=0,cf=0,An=0,Ni=0,$s=null,Xt=null,ff=!1,df=0,So=1/0,wo=null,tl=null,Et=0,nl=null,ji=null,Ai=0,hf=0,mf=null,Xp=null,Ys=0,pf=null;function un(){if((ze&2)!==0&&Ae!==0)return Ae&-Ae;if(k.T!==null){var e=pi;return e!==0?e:wf()}return _e()}function Zp(){An===0&&(An=(Ae&536870912)===0||Le?Ba():536870912);var e=jn.current;return e!==null&&(e.flags|=32),An}function cn(e,t,a){(e===Xe&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(Ti(e,0),al(e,Ae,An,!1)),gn(e,a),((ze&2)===0||e!==Xe)&&(e===Xe&&((ze&2)===0&&(Hl|=a),at===4&&al(e,Ae,An,!1)),Pn(e))}function Pp(e,t,a){if((ze&6)!==0)throw Error(i(327));var s=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Mn(e,t),c=s?xb(e,t):gf(e,t,!0),f=s;do{if(c===0){_i&&!s&&al(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!gb(a)){c=gf(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var S=e;c=$s;var T=S.current.memoizedState.isDehydrated;if(T&&(Ti(S,v).flags|=256),v=gf(S,v,!1),v!==2){if(uf&&!T){S.errorRecoveryDisabledLanes|=f,Hl|=f,c=4;break e}f=Xt,Xt=c,f!==null&&(Xt===null?Xt=f:Xt.push.apply(Xt,f))}c=v}if(f=!1,c!==2)continue}}if(c===1){Ti(e,0),al(e,t,0,!0);break}e:{switch(s=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:al(s,t,An,!Wa);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=df+300-Bt(),10<c)){if(al(s,t,An,!Wa),fa(s,0,!0)!==0)break e;s.timeoutHandle=_0(Jp.bind(null,s,a,Xt,wo,ff,t,An,Hl,Ni,Wa,f,2,-0,0),c);break e}Jp(s,a,Xt,wo,ff,t,An,Hl,Ni,Wa,f,0,-0,0)}}break}while(!0);Pn(e)}function Jp(e,t,a,s,c,f,v,S,T,U,Y,F,q,z){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(Ps={stylesheets:null,count:0,unsuspend:Wb},Vp(t),F=tx(),F!==null)){e.cancelPendingCommit=F(l0.bind(null,e,t,f,a,s,c,v,S,T,Y,1,q,z)),al(e,f,v,!U);return}l0(e,t,f,a,s,c,v,S,T)}function gb(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var c=a[s],f=c.getSnapshot;c=c.value;try{if(!an(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function al(e,t,a,s){t&=~cf,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var c=t;0<c;){var f=31-it(c),v=1<<f;s[f]=-1,c&=~v}a!==0&&El(e,a,t)}function Eo(){return(ze&6)===0?(Vs(0),!1):!0}function yf(){if(Ne!==null){if(ke===0)var e=Ne.return;else e=Ne,ba=Ll=null,Dc(e),Si=null,Ls=0,e=Ne;for(;e!==null;)Op(e.alternate,e),e=e.return;Ne=null}}function Ti(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,qb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),yf(),Xe=e,Ne=a=ya(e.current,null),Ae=t,ke=0,on=null,Wa=!1,_i=Mn(e,t),uf=!1,Ni=An=cf=Hl=el=at=0,Xt=$s=null,ff=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var c=31-it(s),f=1<<c;t|=e[c],s&=~f}return ja=t,Vr(),a}function Ip(e,t){xe=null,k.H=uo,t===_s||t===Wr?(t=pm(),ke=3):t===dm?(t=pm(),ke=4):ke=t===yp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,on=t,Ne===null&&(at=1,po(e,En(t,e.current)))}function Wp(){var e=k.H;return k.H=uo,e===null?uo:e}function e0(){var e=k.A;return k.A=yb,e}function vf(){at=4,Wa||(Ae&4194048)!==Ae&&jn.current!==null||(_i=!0),(el&134217727)===0&&(Hl&134217727)===0||Xe===null||al(Xe,Ae,An,!1)}function gf(e,t,a){var s=ze;ze|=2;var c=Wp(),f=e0();(Xe!==e||Ae!==t)&&(wo=null,Ti(e,t)),t=!1;var v=at;e:do try{if(ke!==0&&Ne!==null){var S=Ne,T=on;switch(ke){case 8:yf(),v=6;break e;case 3:case 2:case 9:case 6:jn.current===null&&(t=!0);var U=ke;if(ke=0,on=null,Oi(e,S,T,U),a&&_i){v=0;break e}break;default:U=ke,ke=0,on=null,Oi(e,S,T,U)}}bb(),v=at;break}catch(Y){Ip(e,Y)}while(!0);return t&&e.shellSuspendCounter++,ba=Ll=null,ze=s,k.H=c,k.A=f,Ne===null&&(Xe=null,Ae=0,Vr()),v}function bb(){for(;Ne!==null;)t0(Ne)}function xb(e,t){var a=ze;ze|=2;var s=Wp(),c=e0();Xe!==e||Ae!==t?(wo=null,So=Bt()+500,Ti(e,t)):_i=Mn(e,t);e:do try{if(ke!==0&&Ne!==null){t=Ne;var f=on;t:switch(ke){case 1:ke=0,on=null,Oi(e,t,f,1);break;case 2:case 9:if(hm(f)){ke=0,on=null,n0(t);break}t=function(){ke!==2&&ke!==9||Xe!==e||(ke=7),Pn(e)},f.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:hm(f)?(ke=0,on=null,n0(t)):(ke=0,on=null,Oi(e,t,f,7));break;case 5:var v=null;switch(Ne.tag){case 26:v=Ne.memoizedState;case 5:case 27:var S=Ne;if(!v||z0(v)){ke=0,on=null;var T=S.sibling;if(T!==null)Ne=T;else{var U=S.return;U!==null?(Ne=U,Co(U)):Ne=null}break t}}ke=0,on=null,Oi(e,t,f,5);break;case 6:ke=0,on=null,Oi(e,t,f,6);break;case 8:yf(),at=6;break e;default:throw Error(i(462))}}Sb();break}catch(Y){Ip(e,Y)}while(!0);return ba=Ll=null,k.H=s,k.A=c,ze=a,Ne!==null?0:(Xe=null,Ae=0,Vr(),at)}function Sb(){for(;Ne!==null&&!ss();)t0(Ne)}function t0(e){var t=Ap(e.alternate,e,ja);e.memoizedProps=e.pendingProps,t===null?Co(e):Ne=t}function n0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wp(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=wp(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Dc(t);default:Op(a,t),t=Ne=am(t,ja),t=Ap(a,t,ja)}e.memoizedProps=e.pendingProps,t===null?Co(e):Ne=t}function Oi(e,t,a,s){ba=Ll=null,Dc(t),Si=null,Ls=0;var c=t.return;try{if(cb(e,c,t,a,Ae)){at=1,po(e,En(a,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;at=1,po(e,En(a,e.current)),Ne=null;return}t.flags&32768?(Le||s===1?e=!0:_i||(Ae&536870912)!==0?e=!1:(Wa=e=!0,(s===2||s===9||s===3||s===6)&&(s=jn.current,s!==null&&s.tag===13&&(s.flags|=16384))),a0(t,e)):Co(t)}function Co(e){var t=e;do{if((t.flags&32768)!==0){a0(t,Wa);return}e=t.return;var a=db(t.alternate,t,ja);if(a!==null){Ne=a;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);at===0&&(at=5)}function a0(e,t){do{var a=hb(e.alternate,e);if(a!==null){a.flags&=32767,Ne=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=a}while(e!==null);at=6,Ne=null}function l0(e,t,a,s,c,f,v,S,T){e.cancelPendingCommit=null;do _o();while(Et!==0);if((ze&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=rc,wl(e,a,f,v,S,T),e===Xe&&(Ne=Xe=null,Ae=0),ji=t,nl=e,Ai=a,hf=f,mf=c,Xp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_b(Yn,function(){return u0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,c=X.p,X.p=2,v=ze,ze|=4;try{mb(e,t,a)}finally{ze=v,X.p=c,k.T=s}}Et=1,i0(),s0(),r0()}}function i0(){if(Et===1){Et=0;var e=nl,t=ji,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null;var s=X.p;X.p=2;var c=ze;ze|=4;try{Qp(t,e);var f=Of,v=Gh(e.containerInfo),S=f.focusedElem,T=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Fh(S.ownerDocument.documentElement,S)){if(T!==null&&nc(S)){var U=T.start,Y=T.end;if(Y===void 0&&(Y=U),"selectionStart"in S)S.selectionStart=U,S.selectionEnd=Math.min(Y,S.value.length);else{var F=S.ownerDocument||document,q=F&&F.defaultView||window;if(q.getSelection){var z=q.getSelection(),me=S.textContent.length,fe=Math.min(T.start,me),Ye=T.end===void 0?fe:Math.min(T.end,me);!z.extend&&fe>Ye&&(v=Ye,Ye=fe,fe=v);var M=Kh(S,fe),D=Kh(S,Ye);if(M&&D&&(z.rangeCount!==1||z.anchorNode!==M.node||z.anchorOffset!==M.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)){var L=F.createRange();L.setStart(M.node,M.offset),z.removeAllRanges(),fe>Ye?(z.addRange(L),z.extend(D.node,D.offset)):(L.setEnd(D.node,D.offset),z.addRange(L))}}}}for(F=[],z=S;z=z.parentNode;)z.nodeType===1&&F.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<F.length;S++){var K=F[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}zo=!!Tf,Of=Tf=null}finally{ze=c,X.p=s,k.T=a}}e.current=t,Et=2}}function s0(){if(Et===2){Et=0;var e=nl,t=ji,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=k.T,k.T=null;var s=X.p;X.p=2;var c=ze;ze|=4;try{zp(e,t.alternate,t)}finally{ze=c,X.p=s,k.T=a}}Et=3}}function r0(){if(Et===4||Et===3){Et=0,kt();var e=nl,t=ji,a=Ai,s=Xp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,ji=nl=null,o0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(tl=null),oe(a),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(yn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,c=X.p,X.p=2,k.T=null;try{for(var f=e.onRecoverableError,v=0;v<s.length;v++){var S=s[v];f(S.value,{componentStack:S.stack})}}finally{k.T=t,X.p=c}}(Ai&3)!==0&&_o(),Pn(e),c=e.pendingLanes,(a&4194090)!==0&&(c&42)!==0?e===pf?Ys++:(Ys=0,pf=e):Ys=0,Vs(0)}}function o0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Es(t)))}function _o(e){return i0(),s0(),r0(),u0()}function u0(){if(Et!==5)return!1;var e=nl,t=hf;hf=0;var a=oe(Ai),s=k.T,c=X.p;try{X.p=32>a?32:a,k.T=null,a=mf,mf=null;var f=nl,v=Ai;if(Et=0,ji=nl=null,Ai=0,(ze&6)!==0)throw Error(i(331));var S=ze;if(ze|=4,Fp(f.current),Yp(f,f.current,v,a),ze=S,Vs(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(yn,f)}catch{}return!0}finally{X.p=c,k.T=s,o0(e,t)}}function c0(e,t,a){t=En(a,t),t=Fc(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(gn(e,2),Pn(e))}function Ve(e,t,a){if(e.tag===3)c0(e,e,a);else for(;t!==null;){if(t.tag===3){c0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(tl===null||!tl.has(s))){e=En(a,e),a=mp(2),s=Fa(t,a,2),s!==null&&(pp(a,s,t,e),gn(s,2),Pn(s));break}}t=t.return}}function bf(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new vb;var c=new Set;s.set(t,c)}else c=s.get(t),c===void 0&&(c=new Set,s.set(t,c));c.has(a)||(uf=!0,c.add(a),e=wb.bind(null,e,t,a),t.then(e,e))}function wb(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(Ae&a)===a&&(at===4||at===3&&(Ae&62914560)===Ae&&300>Bt()-df?(ze&2)===0&&Ti(e,0):cf|=a,Ni===Ae&&(Ni=0)),Pn(e)}function f0(e,t){t===0&&(t=da()),e=fi(e,t),e!==null&&(gn(e,t),Pn(e))}function Eb(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),f0(e,a)}function Cb(e,t){var a=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(i(314))}s!==null&&s.delete(t),f0(e,a)}function _b(e,t){return ua(e,t)}var No=null,Ri=null,xf=!1,jo=!1,Sf=!1,Ql=0;function Pn(e){e!==Ri&&e.next===null&&(Ri===null?No=Ri=e:Ri=Ri.next=e),jo=!0,xf||(xf=!0,jb())}function Vs(e,t){if(!Sf&&jo){Sf=!0;do for(var a=!1,s=No;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var f=0;else{var v=s.suspendedLanes,S=s.pingedLanes;f=(1<<31-it(42|e)+1)-1,f&=c&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,p0(s,f))}else f=Ae,f=fa(s,s===Xe?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||Mn(s,f)||(a=!0,p0(s,f));s=s.next}while(a);Sf=!1}}function Nb(){d0()}function d0(){jo=xf=!1;var e=0;Ql!==0&&(Ub()&&(e=Ql),Ql=0);for(var t=Bt(),a=null,s=No;s!==null;){var c=s.next,f=h0(s,t);f===0?(s.next=null,a===null?No=c:a.next=c,c===null&&(Ri=a)):(a=s,(e!==0||(f&3)!==0)&&(jo=!0)),s=c}Vs(e)}function h0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-it(f),S=1<<v,T=c[v];T===-1?((S&a)===0||(S&s)!==0)&&(c[v]=ka(S,t)):T<=t&&(e.expiredLanes|=S),f&=~S}if(t=Xe,a=Ae,a=fa(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pn(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Mn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&pn(s),oe(a)){case 2:case 8:a=Ge;break;case 32:a=Yn;break;case 268435456:a=Ua;break;default:a=Yn}return s=m0.bind(null,e),a=ua(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&pn(s),e.callbackPriority=2,e.callbackNode=null,2}function m0(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_o()&&e.callbackNode!==a)return null;var s=Ae;return s=fa(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Pp(e,s,t),h0(e,Bt()),e.callbackNode!=null&&e.callbackNode===a?m0.bind(null,e):null)}function p0(e,t){if(_o())return null;Pp(e,t,!0)}function jb(){zb(function(){(ze&6)!==0?ua($n,Nb):d0()})}function wf(){return Ql===0&&(Ql=Ba()),Ql}function y0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zr(""+e)}function v0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Ab(e,t,a,s,c){if(t==="submit"&&a&&a.stateNode===c){var f=y0((c[ne]||null).action),v=s.submitter;v&&(t=(t=v[ne]||null)?y0(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var S=new Qr("action","action",null,s,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ql!==0){var T=v?v0(c,v):new FormData(c);Qc(a,{pending:!0,data:T,method:c.method,action:f},null,T)}}else typeof f=="function"&&(S.preventDefault(),T=v?v0(c,v):new FormData(c),Qc(a,{pending:!0,data:T,method:c.method,action:f},f,T))},currentTarget:c}]})}}for(var Ef=0;Ef<sc.length;Ef++){var Cf=sc[Ef],Tb=Cf.toLowerCase(),Ob=Cf[0].toUpperCase()+Cf.slice(1);Ln(Tb,"on"+Ob)}Ln(Ph,"onAnimationEnd"),Ln(Jh,"onAnimationIteration"),Ln(Ih,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(Gg,"onTransitionRun"),Ln(Xg,"onTransitionStart"),Ln(Zg,"onTransitionCancel"),Ln(Wh,"onTransitionEnd"),ha("onMouseEnter",["mouseout","mouseover"]),ha("onMouseLeave",["mouseout","mouseover"]),ha("onPointerEnter",["pointerout","pointerover"]),ha("onPointerLeave",["pointerout","pointerover"]),Kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ks="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ks));function g0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],c=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var v=s.length-1;0<=v;v--){var S=s[v],T=S.instance,U=S.currentTarget;if(S=S.listener,T!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=U;try{f(c)}catch(Y){mo(Y)}c.currentTarget=null,f=T}else for(v=0;v<s.length;v++){if(S=s[v],T=S.instance,U=S.currentTarget,S=S.listener,T!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=U;try{f(c)}catch(Y){mo(Y)}c.currentTarget=null,f=T}}}}function je(e,t){var a=t[Ie];a===void 0&&(a=t[Ie]=new Set);var s=e+"__bubble";a.has(s)||(b0(t,e,2,!1),a.add(s))}function _f(e,t,a){var s=0;t&&(s|=4),b0(a,e,s,t)}var Ao="_reactListening"+Math.random().toString(36).slice(2);function Nf(e){if(!e[Ao]){e[Ao]=!0,os.forEach(function(a){a!=="selectionchange"&&(Rb.has(a)||_f(a,!1,e),_f(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ao]||(t[Ao]=!0,_f("selectionchange",!1,t))}}function b0(e,t,a,s){switch(Y0(t)){case 2:var c=lx;break;case 8:c=ix;break;default:c=Hf}a=c.bind(null,t,a,e),c=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),s?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function jf(e,t,a,s,c){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var S=s.stateNode.containerInfo;if(S===c)break;if(v===4)for(v=s.return;v!==null;){var T=v.tag;if((T===3||T===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;S!==null;){if(v=De(S),v===null)return;if(T=v.tag,T===5||T===6||T===26||T===27){s=f=v;continue e}S=S.parentNode}}s=s.return}Nh(function(){var U=f,Y=Ku(a),F=[];e:{var q=em.get(e);if(q!==void 0){var z=Qr,me=e;switch(e){case"keypress":if(Br(a)===0)break e;case"keydown":case"keyup":z=_g;break;case"focusin":me="focus",z=Ju;break;case"focusout":me="blur",z=Ju;break;case"beforeblur":case"afterblur":z=Ju;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=Th;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=hg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Ag;break;case Ph:case Jh:case Ih:z=yg;break;case Wh:z=Og;break;case"scroll":case"scrollend":z=fg;break;case"wheel":z=Dg;break;case"copy":case"cut":case"paste":z=gg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Rh;break;case"toggle":case"beforetoggle":z=Lg}var fe=(t&4)!==0,Ye=!fe&&(e==="scroll"||e==="scrollend"),M=fe?q!==null?q+"Capture":null:q;fe=[];for(var D=U,L;D!==null;){var K=D;if(L=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||L===null||M===null||(K=cs(D,M),K!=null&&fe.push(Fs(D,K,L))),Ye)break;D=D.return}0<fe.length&&(q=new z(q,me,null,a,Y),F.push({event:q,listeners:fe}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",q&&a!==Vu&&(me=a.relatedTarget||a.fromElement)&&(De(me)||me[de]))break e;if((z||q)&&(q=Y.window===Y?Y:(q=Y.ownerDocument)?q.defaultView||q.parentWindow:window,z?(me=a.relatedTarget||a.toElement,z=U,me=me?De(me):null,me!==null&&(Ye=u(me),fe=me.tag,me!==Ye||fe!==5&&fe!==27&&fe!==6)&&(me=null)):(z=null,me=U),z!==me)){if(fe=Th,K="onMouseLeave",M="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(fe=Rh,K="onPointerLeave",M="onPointerEnter",D="pointer"),Ye=z==null?q:Cl(z),L=me==null?q:Cl(me),q=new fe(K,D+"leave",z,a,Y),q.target=Ye,q.relatedTarget=L,K=null,De(Y)===U&&(fe=new fe(M,D+"enter",me,a,Y),fe.target=L,fe.relatedTarget=Ye,K=fe),Ye=K,z&&me)t:{for(fe=z,M=me,D=0,L=fe;L;L=Di(L))D++;for(L=0,K=M;K;K=Di(K))L++;for(;0<D-L;)fe=Di(fe),D--;for(;0<L-D;)M=Di(M),L--;for(;D--;){if(fe===M||M!==null&&fe===M.alternate)break t;fe=Di(fe),M=Di(M)}fe=null}else fe=null;z!==null&&x0(F,q,z,fe,!1),me!==null&&Ye!==null&&x0(F,Ye,me,fe,!0)}}e:{if(q=U?Cl(U):window,z=q.nodeName&&q.nodeName.toLowerCase(),z==="select"||z==="input"&&q.type==="file")var ee=Bh;else if(zh(q))if(Hh)ee=Vg;else{ee=$g;var we=Qg}else z=q.nodeName,!z||z.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?U&&Yu(U.elementType)&&(ee=Bh):ee=Yg;if(ee&&(ee=ee(e,U))){kh(F,ee,a,Y);break e}we&&we(e,q,U),e==="focusout"&&U&&q.type==="number"&&U.memoizedProps.value!=null&&$u(q,"number",q.value)}switch(we=U?Cl(U):window,e){case"focusin":(zh(we)||we.contentEditable==="true")&&(oi=we,ac=U,gs=null);break;case"focusout":gs=ac=oi=null;break;case"mousedown":lc=!0;break;case"contextmenu":case"mouseup":case"dragend":lc=!1,Xh(F,a,Y);break;case"selectionchange":if(Fg)break;case"keydown":case"keyup":Xh(F,a,Y)}var le;if(Wu)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else ri?Uh(e,a)&&(he="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(Dh&&a.locale!=="ko"&&(ri||he!=="onCompositionStart"?he==="onCompositionEnd"&&ri&&(le=jh()):($a=Y,Xu="value"in $a?$a.value:$a.textContent,ri=!0)),we=To(U,he),0<we.length&&(he=new Oh(he,e,null,a,Y),F.push({event:he,listeners:we}),le?he.data=le:(le=qh(a),le!==null&&(he.data=le)))),(le=qg?zg(e,a):kg(e,a))&&(he=To(U,"onBeforeInput"),0<he.length&&(we=new Oh("onBeforeInput","beforeinput",null,a,Y),F.push({event:we,listeners:he}),we.data=le)),Ab(F,e,U,a,Y)}g0(F,t)})}function Fs(e,t,a){return{instance:e,listener:t,currentTarget:a}}function To(e,t){for(var a=t+"Capture",s=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=cs(e,a),c!=null&&s.unshift(Fs(e,c,f)),c=cs(e,t),c!=null&&s.push(Fs(e,c,f))),e.tag===3)return s;e=e.return}return[]}function Di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function x0(e,t,a,s,c){for(var f=t._reactName,v=[];a!==null&&a!==s;){var S=a,T=S.alternate,U=S.stateNode;if(S=S.tag,T!==null&&T===s)break;S!==5&&S!==26&&S!==27||U===null||(T=U,c?(U=cs(a,f),U!=null&&v.unshift(Fs(a,U,T))):c||(U=cs(a,f),U!=null&&v.push(Fs(a,U,T)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var Db=/\r\n?/g,Mb=/\u0000|\uFFFD/g;function S0(e){return(typeof e=="string"?e:""+e).replace(Db,`
49
- `).replace(Mb,"")}function w0(e,t){return t=S0(t),S0(e)===t}function Oo(){}function $e(e,t,a,s,c,f){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||li(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&li(e,""+s);break;case"className":Qa(e,"class",s);break;case"tabIndex":Qa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qa(e,a,s);break;case"style":Ch(e,s,f);break;case"data":if(t!=="object"){Qa(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=zr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&$e(e,t,"name",c.name,c,null),$e(e,t,"formEncType",c.formEncType,c,null),$e(e,t,"formMethod",c.formMethod,c,null),$e(e,t,"formTarget",c.formTarget,c,null)):($e(e,t,"encType",c.encType,c,null),$e(e,t,"method",c.method,c,null),$e(e,t,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=zr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Oo);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=zr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":je("beforetoggle",e),je("toggle",e),ti(e,"popover",s);break;case"xlinkActuate":ma(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ma(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ma(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ma(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ma(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ma(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ma(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ma(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ma(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ti(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ug.get(a)||a,ti(e,a,s))}}function Af(e,t,a,s,c,f){switch(a){case"style":Ch(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof s=="string"?li(e,s):(typeof s=="number"||typeof s=="bigint")&&li(e,""+s);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!us.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[ne]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof s=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,c);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):ti(e,a,s)}}}function Ct(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var s=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:$e(e,t,f,v,a,null)}}c&&$e(e,t,"srcSet",a.srcSet,a,null),s&&$e(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var S=f=v=c=null,T=null,U=null;for(s in a)if(a.hasOwnProperty(s)){var Y=a[s];if(Y!=null)switch(s){case"name":c=Y;break;case"type":v=Y;break;case"checked":T=Y;break;case"defaultChecked":U=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,t));break;default:$e(e,t,s,Y,a,null)}}xh(e,f,S,T,U,v,c,!1),Ur(e);return;case"select":je("invalid",e),s=v=f=null;for(c in a)if(a.hasOwnProperty(c)&&(S=a[c],S!=null))switch(c){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":s=S;default:$e(e,t,c,S,a,null)}t=f,a=v,e.multiple=!!s,t!=null?ai(e,!!s,t,!1):a!=null&&ai(e,!!s,a,!0);return;case"textarea":je("invalid",e),f=c=s=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":s=S;break;case"defaultValue":c=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(i(91));break;default:$e(e,t,v,S,a,null)}wh(e,s,c,f),Ur(e);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(s=a[T],s!=null))switch(T){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:$e(e,t,T,s,a,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(s=0;s<Ks.length;s++)je(Ks[s],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in a)if(a.hasOwnProperty(U)&&(s=a[U],s!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:$e(e,t,U,s,a,null)}return;default:if(Yu(t)){for(Y in a)a.hasOwnProperty(Y)&&(s=a[Y],s!==void 0&&Af(e,t,Y,s,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(s=a[S],s!=null&&$e(e,t,S,s,a,null))}function Lb(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,v=null,S=null,T=null,U=null,Y=null;for(z in a){var F=a[z];if(a.hasOwnProperty(z)&&F!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":T=F;default:s.hasOwnProperty(z)||$e(e,t,z,null,s,F)}}for(var q in s){var z=s[q];if(F=a[q],s.hasOwnProperty(q)&&(z!=null||F!=null))switch(q){case"type":f=z;break;case"name":c=z;break;case"checked":U=z;break;case"defaultChecked":Y=z;break;case"value":v=z;break;case"defaultValue":S=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(137,t));break;default:z!==F&&$e(e,t,q,z,s,F)}}Qu(e,v,S,T,U,Y,f,c);return;case"select":z=v=S=q=null;for(f in a)if(T=a[f],a.hasOwnProperty(f)&&T!=null)switch(f){case"value":break;case"multiple":z=T;default:s.hasOwnProperty(f)||$e(e,t,f,null,s,T)}for(c in s)if(f=s[c],T=a[c],s.hasOwnProperty(c)&&(f!=null||T!=null))switch(c){case"value":q=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==T&&$e(e,t,c,f,s,T)}t=S,a=v,s=z,q!=null?ai(e,!!a,q,!1):!!s!=!!a&&(t!=null?ai(e,!!a,t,!0):ai(e,!!a,a?[]:"",!1));return;case"textarea":z=q=null;for(S in a)if(c=a[S],a.hasOwnProperty(S)&&c!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(e,t,S,null,s,c)}for(v in s)if(c=s[v],f=a[v],s.hasOwnProperty(v)&&(c!=null||f!=null))switch(v){case"value":q=c;break;case"defaultValue":z=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&$e(e,t,v,c,s,f)}Sh(e,q,z);return;case"option":for(var me in a)if(q=a[me],a.hasOwnProperty(me)&&q!=null&&!s.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:$e(e,t,me,null,s,q)}for(T in s)if(q=s[T],z=a[T],s.hasOwnProperty(T)&&q!==z&&(q!=null||z!=null))switch(T){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:$e(e,t,T,q,s,z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var fe in a)q=a[fe],a.hasOwnProperty(fe)&&q!=null&&!s.hasOwnProperty(fe)&&$e(e,t,fe,null,s,q);for(U in s)if(q=s[U],z=a[U],s.hasOwnProperty(U)&&q!==z&&(q!=null||z!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(137,t));break;default:$e(e,t,U,q,s,z)}return;default:if(Yu(t)){for(var Ye in a)q=a[Ye],a.hasOwnProperty(Ye)&&q!==void 0&&!s.hasOwnProperty(Ye)&&Af(e,t,Ye,void 0,s,q);for(Y in s)q=s[Y],z=a[Y],!s.hasOwnProperty(Y)||q===z||q===void 0&&z===void 0||Af(e,t,Y,q,s,z);return}}for(var M in a)q=a[M],a.hasOwnProperty(M)&&q!=null&&!s.hasOwnProperty(M)&&$e(e,t,M,null,s,q);for(F in s)q=s[F],z=a[F],!s.hasOwnProperty(F)||q===z||q==null&&z==null||$e(e,t,F,q,s,z)}var Tf=null,Of=null;function Ro(e){return e.nodeType===9?e:e.ownerDocument}function E0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function C0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Rf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Df=null;function Ub(){var e=window.event;return e&&e.type==="popstate"?e===Df?!1:(Df=e,!0):(Df=null,!1)}var _0=typeof setTimeout=="function"?setTimeout:void 0,qb=typeof clearTimeout=="function"?clearTimeout:void 0,N0=typeof Promise=="function"?Promise:void 0,zb=typeof queueMicrotask=="function"?queueMicrotask:typeof N0<"u"?function(e){return N0.resolve(null).then(e).catch(kb)}:_0;function kb(e){setTimeout(function(){throw e})}function ll(e){return e==="head"}function j0(e,t){var a=t,s=0,c=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(0<s&&8>s){a=s;var v=e.ownerDocument;if(a&1&&Gs(v.documentElement),a&2&&Gs(v.body),a&4)for(a=v.head,Gs(a),v=a.firstChild;v;){var S=v.nextSibling,T=v.nodeName;v[rt]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=S}}if(c===0){e.removeChild(f),tr(t);return}c--}else a==="$"||a==="$?"||a==="$!"?c++:s=a.charCodeAt(0)-48;else s=0;a=f}while(a);tr(t)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Mf(a),Rt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Bb(e,t,a,s){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[rt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function Hb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=qn(e.nextSibling),e===null))return null;return e}function Lf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Qb(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Uf=null;function A0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function T0(e,t,a){switch(t=Ro(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Gs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rt(e)}var Tn=new Map,O0=new Set;function Do(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Aa=X.d;X.d={f:$b,r:Yb,D:Vb,C:Kb,L:Fb,m:Gb,X:Zb,S:Xb,M:Pb};function $b(){var e=Aa.f(),t=Eo();return e||t}function Yb(e){var t=nn(e);t!==null&&t.tag===5&&t.type==="form"?Pm(t):Aa.r(e)}var Mi=typeof document>"u"?null:document;function R0(e,t,a){var s=Mi;if(s&&typeof t=="string"&&t){var c=wn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),O0.has(c)||(O0.add(c),e={rel:e,crossOrigin:a,href:t},s.querySelector(c)===null&&(t=s.createElement("link"),Ct(t,"link",e),ot(t),s.head.appendChild(t)))}}function Vb(e){Aa.D(e),R0("dns-prefetch",e,null)}function Kb(e,t){Aa.C(e,t),R0("preconnect",e,t)}function Fb(e,t,a){Aa.L(e,t,a);var s=Mi;if(s&&e&&t){var c='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+wn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+wn(a.imageSizes)+'"]')):c+='[href="'+wn(e)+'"]';var f=c;switch(t){case"style":f=Li(e);break;case"script":f=Ui(e)}Tn.has(f)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Tn.set(f,e),s.querySelector(c)!==null||t==="style"&&s.querySelector(Xs(f))||t==="script"&&s.querySelector(Zs(f))||(t=s.createElement("link"),Ct(t,"link",e),ot(t),s.head.appendChild(t)))}}function Gb(e,t){Aa.m(e,t);var a=Mi;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+wn(s)+'"][href="'+wn(e)+'"]',f=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ui(e)}if(!Tn.has(f)&&(e=g({rel:"modulepreload",href:e},t),Tn.set(f,e),a.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Zs(f)))return}s=a.createElement("link"),Ct(s,"link",e),ot(s),a.head.appendChild(s)}}}function Xb(e,t,a){Aa.S(e,t,a);var s=Mi;if(s&&e){var c=Ha(s).hoistableStyles,f=Li(e);t=t||"default";var v=c.get(f);if(!v){var S={loading:0,preload:null};if(v=s.querySelector(Xs(f)))S.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Tn.get(f))&&qf(e,a);var T=v=s.createElement("link");ot(T),Ct(T,"link",e),T._p=new Promise(function(U,Y){T.onload=U,T.onerror=Y}),T.addEventListener("load",function(){S.loading|=1}),T.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Mo(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:S},c.set(f,v)}}}function Zb(e,t){Aa.X(e,t);var a=Mi;if(a&&e){var s=Ha(a).hoistableScripts,c=Ui(e),f=s.get(c);f||(f=a.querySelector(Zs(c)),f||(e=g({src:e,async:!0},t),(t=Tn.get(c))&&zf(e,t),f=a.createElement("script"),ot(f),Ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(c,f))}}function Pb(e,t){Aa.M(e,t);var a=Mi;if(a&&e){var s=Ha(a).hoistableScripts,c=Ui(e),f=s.get(c);f||(f=a.querySelector(Zs(c)),f||(e=g({src:e,async:!0,type:"module"},t),(t=Tn.get(c))&&zf(e,t),f=a.createElement("script"),ot(f),Ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(c,f))}}function D0(e,t,a,s){var c=(c=ce.current)?Do(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Li(a.href),a=Ha(c).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Li(a.href);var f=Ha(c).hoistableStyles,v=f.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=c.querySelector(Xs(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Tn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Tn.set(e,a),f||Jb(c,e,a,v.state))),t&&s===null)throw Error(i(528,""));return v}if(t&&s!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(a),a=Ha(c).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Li(e){return'href="'+wn(e)+'"'}function Xs(e){return'link[rel="stylesheet"]['+e+"]"}function M0(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Jb(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Ct(t,"link",a),ot(t),e.head.appendChild(t))}function Ui(e){return'[src="'+wn(e)+'"]'}function Zs(e){return"script[async]"+e}function L0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+wn(a.href)+'"]');if(s)return t.instance=s,ot(s),s;var c=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ot(s),Ct(s,"style",c),Mo(s,a.precedence,e),t.instance=s;case"stylesheet":c=Li(a.href);var f=e.querySelector(Xs(c));if(f)return t.state.loading|=4,t.instance=f,ot(f),f;s=M0(a),(c=Tn.get(c))&&qf(s,c),f=(e.ownerDocument||e).createElement("link"),ot(f);var v=f;return v._p=new Promise(function(S,T){v.onload=S,v.onerror=T}),Ct(f,"link",s),t.state.loading|=4,Mo(f,a.precedence,e),t.instance=f;case"script":return f=Ui(a.src),(c=e.querySelector(Zs(f)))?(t.instance=c,ot(c),c):(s=a,(c=Tn.get(f))&&(s=g({},a),zf(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),ot(c),Ct(c,"link",s),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Mo(s,a.precedence,e));return t.instance}function Mo(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,f=c,v=0;v<s.length;v++){var S=s[v];if(S.dataset.precedence===t)f=S;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Lo=null;function U0(e,t,a){if(Lo===null){var s=new Map,c=Lo=new Map;c.set(a,s)}else c=Lo,s=c.get(a),s||(s=new Map,c.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[rt]||f[P]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var S=s.get(v);S?S.push(f):s.set(v,[f])}}return s}function q0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ib(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function z0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Ps=null;function Wb(){}function ex(e,t,a){if(Ps===null)throw Error(i(475));var s=Ps;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Li(a.href),f=e.querySelector(Xs(c));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(s.count++,s=Uo.bind(s),e.then(s,s)),t.state.loading|=4,t.instance=f,ot(f);return}f=e.ownerDocument||e,a=M0(a),(c=Tn.get(c))&&qf(a,c),f=f.createElement("link"),ot(f);var v=f;v._p=new Promise(function(S,T){v.onload=S,v.onerror=T}),Ct(f,"link",a),t.instance=f}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(s.count++,t=Uo.bind(s),e.addEventListener("load",t),e.addEventListener("error",t))}}function tx(){if(Ps===null)throw Error(i(475));var e=Ps;return e.stylesheets&&e.count===0&&kf(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&kf(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Uo(){if(this.count--,this.count===0){if(this.stylesheets)kf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var qo=null;function kf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,qo=new Map,t.forEach(nx,e),qo=null,Uo.call(e))}function nx(e,t){if(!(t.state.loading&4)){var a=qo.get(e);if(a)var s=a.get(null);else{a=new Map,qo.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var v=c[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),s=v)}s&&a.set(null,s)}c=t.instance,v=c.getAttribute("data-precedence"),f=a.get(v)||s,f===s&&a.set(null,c),a.set(v,c),this.count++,s=Uo.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Js={$$typeof:j,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function ax(e,t,a,s,c,f,v,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vn(0),this.hiddenUpdates=Vn(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function k0(e,t,a,s,c,f,v,S,T,U,Y,F){return e=new ax(e,t,a,v,S,T,U,F),t=1,f===!0&&(t|=24),f=ln(3,null,null,t),e.current=f,f.stateNode=e,t=gc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:a,cache:t},wc(f),e}function B0(e){return e?(e=di,e):di}function H0(e,t,a,s,c,f){c=B0(c),s.context===null?s.context=c:s.pendingContext=c,s=Ka(t),s.payload={element:a},f=f===void 0?null:f,f!==null&&(s.callback=f),a=Fa(e,s,t),a!==null&&(cn(a,e,t),js(a,e,t))}function Q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Bf(e,t){Q0(e,t),(e=e.alternate)&&Q0(e,t)}function $0(e){if(e.tag===13){var t=fi(e,67108864);t!==null&&cn(t,e,67108864),Bf(e,67108864)}}var zo=!0;function lx(e,t,a,s){var c=k.T;k.T=null;var f=X.p;try{X.p=2,Hf(e,t,a,s)}finally{X.p=f,k.T=c}}function ix(e,t,a,s){var c=k.T;k.T=null;var f=X.p;try{X.p=8,Hf(e,t,a,s)}finally{X.p=f,k.T=c}}function Hf(e,t,a,s){if(zo){var c=Qf(s);if(c===null)jf(e,t,s,ko,a),V0(e,s);else if(rx(c,e,t,a,s))s.stopPropagation();else if(V0(e,s),t&4&&-1<sx.indexOf(e)){for(;c!==null;){var f=nn(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=He(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var T=1<<31-it(v);S.entanglements[1]|=T,v&=~T}Pn(f),(ze&6)===0&&(So=Bt()+500,Vs(0))}}break;case 13:S=fi(f,2),S!==null&&cn(S,f,2),Eo(),Bf(f,2)}if(f=Qf(s),f===null&&jf(e,t,s,ko,a),f===c)break;c=f}c!==null&&s.stopPropagation()}else jf(e,t,s,null,a)}}function Qf(e){return e=Ku(e),$f(e)}var ko=null;function $f(e){if(ko=null,e=De(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ko=e,null}function Y0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ca()){case $n:return 2;case Ge:return 8;case Yn:case xl:return 32;case Ua:return 268435456;default:return 32}default:return 32}}var Yf=!1,il=null,sl=null,rl=null,Is=new Map,Ws=new Map,ol=[],sx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function V0(e,t){switch(e){case"focusin":case"focusout":il=null;break;case"dragenter":case"dragleave":sl=null;break;case"mouseover":case"mouseout":rl=null;break;case"pointerover":case"pointerout":Is.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(t.pointerId)}}function er(e,t,a,s,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:f,targetContainers:[c]},t!==null&&(t=nn(t),t!==null&&$0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function rx(e,t,a,s,c){switch(t){case"focusin":return il=er(il,e,t,a,s,c),!0;case"dragenter":return sl=er(sl,e,t,a,s,c),!0;case"mouseover":return rl=er(rl,e,t,a,s,c),!0;case"pointerover":var f=c.pointerId;return Is.set(f,er(Is.get(f)||null,e,t,a,s,c)),!0;case"gotpointercapture":return f=c.pointerId,Ws.set(f,er(Ws.get(f)||null,e,t,a,s,c)),!0}return!1}function K0(e){var t=De(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Ht(e.priority,function(){if(a.tag===13){var s=un();s=Tt(s);var c=fi(a,s);c!==null&&cn(c,a,s),Bf(a,s)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Qf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Vu=s,a.target.dispatchEvent(s),Vu=null}else return t=nn(a),t!==null&&$0(t),e.blockedOn=a,!1;t.shift()}return!0}function F0(e,t,a){Bo(e)&&a.delete(t)}function ox(){Yf=!1,il!==null&&Bo(il)&&(il=null),sl!==null&&Bo(sl)&&(sl=null),rl!==null&&Bo(rl)&&(rl=null),Is.forEach(F0),Ws.forEach(F0)}function Ho(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ox)))}var Qo=null;function G0(e){Qo!==e&&(Qo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Qo===e&&(Qo=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],c=e[t+2];if(typeof s!="function"){if($f(s||a)===null)continue;break}var f=nn(a);f!==null&&(e.splice(t,3),t-=3,Qc(f,{pending:!0,data:c,method:a.method,action:s},s,c))}}))}function tr(e){function t(T){return Ho(T,e)}il!==null&&Ho(il,e),sl!==null&&Ho(sl,e),rl!==null&&Ho(rl,e),Is.forEach(t),Ws.forEach(t);for(var a=0;a<ol.length;a++){var s=ol[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ol.length&&(a=ol[0],a.blockedOn===null);)K0(a),a.blockedOn===null&&ol.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var c=a[s],f=a[s+1],v=c[ne]||null;if(typeof f=="function")v||G0(a);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[ne]||null)S=v.formAction;else if($f(c)!==null)continue}else S=v.action;typeof S=="function"?a[s+1]=S:(a.splice(s,3),s-=3),G0(a)}}}function Vf(e){this._internalRoot=e}$o.prototype.render=Vf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,s=un();H0(a,s,e,t,null,null)},$o.prototype.unmount=Vf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;H0(e.current,2,null,e,null,null),Eo(),t[de]=null}};function $o(e){this._internalRoot=e}$o.prototype.unstable_scheduleHydration=function(e){if(e){var t=_e();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ol.length&&t!==0&&t<ol[a].priority;a++);ol.splice(a,0,e),a===0&&K0(e)}};var X0=l.version;if(X0!=="19.1.0")throw Error(i(527,X0,"19.1.0"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=y(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var ux={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yo.isDisabled&&Yo.supportsFiber)try{yn=Yo.inject(ux),tt=Yo}catch{}}return ar.createRoot=function(e,t){if(!o(e))throw Error(i(299));var a=!1,s="",c=cp,f=fp,v=dp,S=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(S=t.unstable_transitionCallbacks)),t=k0(e,1,!1,null,null,a,s,c,f,v,S,null),e[de]=t.current,Nf(e),new Vf(t)},ar.hydrateRoot=function(e,t,a){if(!o(e))throw Error(i(299));var s=!1,c="",f=cp,v=fp,S=dp,T=null,U=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(T=a.unstable_transitionCallbacks),a.formState!==void 0&&(U=a.formState)),t=k0(e,1,!0,t,a??null,s,c,f,v,S,T,U),t.context=B0(null),a=t.current,s=un(),s=Tt(s),c=Ka(s),c.callback=null,Fa(a,c,s),a=s,t.current.lanes=a,gn(t,a),Pn(t),e[de]=t.current,Nf(e),new $o(t)},ar.version="19.1.0",ar}var ly;function gx(){if(ly)return Gf.exports;ly=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Gf.exports=vx(),Gf.exports}var bx=gx();const xx=Su(bx);var lr={},iy;function Sx(){if(iy)return lr;iy=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.parse=d,lr.serialize=p;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,l=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,u=(()=>{const E=function(){};return E.prototype=Object.create(null),E})();function d(E,C){const w=new u,O=E.length;if(O<2)return w;const N=(C==null?void 0:C.decode)||g;let _=0;do{const A=E.indexOf("=",_);if(A===-1)break;const j=E.indexOf(";",_),B=j===-1?O:j;if(A>B){_=E.lastIndexOf(";",A-1)+1;continue}const V=m(E,_,A),Q=y(E,A,V),G=E.slice(V,Q);if(w[G]===void 0){let Z=m(E,A+1,B),te=y(E,B,Z);const pe=N(E.slice(Z,te));w[G]=pe}_=B+1}while(_<O);return w}function m(E,C,w){do{const O=E.charCodeAt(C);if(O!==32&&O!==9)return C}while(++C<w);return w}function y(E,C,w){for(;C>w;){const O=E.charCodeAt(--C);if(O!==32&&O!==9)return C+1}return w}function p(E,C,w){const O=(w==null?void 0:w.encode)||encodeURIComponent;if(!n.test(E))throw new TypeError(`argument name is invalid: ${E}`);const N=O(C);if(!l.test(N))throw new TypeError(`argument val is invalid: ${C}`);let _=E+"="+N;if(!w)return _;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);_+="; Max-Age="+w.maxAge}if(w.domain){if(!r.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);_+="; Domain="+w.domain}if(w.path){if(!i.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);_+="; Path="+w.path}if(w.expires){if(!b(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);_+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(_+="; HttpOnly"),w.secure&&(_+="; Secure"),w.partitioned&&(_+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":_+="; Priority=Low";break;case"medium":_+="; Priority=Medium";break;case"high":_+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":_+="; SameSite=Strict";break;case"lax":_+="; SameSite=Lax";break;case"none":_+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return _}function g(E){if(E.indexOf("%")===-1)return E;try{return decodeURIComponent(E)}catch{return E}}function b(E){return o.call(E)==="[object Date]"}return lr}Sx();var sy="popstate";function wx(n={}){function l(i,o){let{pathname:u,search:d,hash:m}=i.location;return hd("",{pathname:u,search:d,hash:m},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(i,o){return typeof o=="string"?o:hr(o)}return Cx(l,r,null,n)}function et(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function zn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Ex(){return Math.random().toString(36).substring(2,10)}function ry(n,l){return{usr:n.state,key:n.key,idx:l}}function hd(n,l,r=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Zi(l):l,state:r,key:l&&l.key||i||Ex()}}function hr({pathname:n="/",search:l="",hash:r=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function Zi(n){let l={};if(n){let r=n.indexOf("#");r>=0&&(l.hash=n.substring(r),n=n.substring(0,r));let i=n.indexOf("?");i>=0&&(l.search=n.substring(i),n=n.substring(0,i)),n&&(l.pathname=n)}return l}function Cx(n,l,r,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,d=o.history,m="POP",y=null,p=g();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function g(){return(d.state||{idx:null}).idx}function b(){m="POP";let N=g(),_=N==null?null:N-p;p=N,y&&y({action:m,location:O.location,delta:_})}function E(N,_){m="PUSH";let A=hd(O.location,N,_);p=g()+1;let j=ry(A,p),B=O.createHref(A);try{d.pushState(j,"",B)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;o.location.assign(B)}u&&y&&y({action:m,location:O.location,delta:1})}function C(N,_){m="REPLACE";let A=hd(O.location,N,_);p=g();let j=ry(A,p),B=O.createHref(A);d.replaceState(j,"",B),u&&y&&y({action:m,location:O.location,delta:0})}function w(N){return _x(N)}let O={get action(){return m},get location(){return n(o,d)},listen(N){if(y)throw new Error("A history only accepts one active listener");return o.addEventListener(sy,b),y=N,()=>{o.removeEventListener(sy,b),y=null}},createHref(N){return l(o,N)},createURL:w,encodeLocation(N){let _=w(N);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:E,replace:C,go(N){return d.go(N)}};return O}function _x(n,l=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),et(r,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:hr(n);return i=i.replace(/ $/,"%20"),!l&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function dv(n,l,r="/"){return Nx(n,l,r,!1)}function Nx(n,l,r,i){let o=typeof l=="string"?Zi(l):l,u=Ma(o.pathname||"/",r);if(u==null)return null;let d=hv(n);jx(d);let m=null;for(let y=0;m==null&&y<d.length;++y){let p=kx(u);m=qx(d[y],p,i)}return m}function hv(n,l=[],r=[],i=""){let o=(u,d,m)=>{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};y.relativePath.startsWith("/")&&(et(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length));let p=Da([i,y.relativePath]),g=r.concat(y);u.children&&u.children.length>0&&(et(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),hv(u.children,l,g,p)),!(u.path==null&&!u.index)&&l.push({path:p,score:Lx(p,u.index),routesMeta:g})};return n.forEach((u,d)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))o(u,d);else for(let y of mv(u.path))o(u,d,y)}),l}function mv(n){let l=n.split("/");if(l.length===0)return[];let[r,...i]=l,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let d=mv(i.join("/")),m=[];return m.push(...d.map(y=>y===""?u:[u,y].join("/"))),o&&m.push(...d),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function jx(n){n.sort((l,r)=>l.score!==r.score?r.score-l.score:Ux(l.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var Ax=/^:[\w-]+$/,Tx=3,Ox=2,Rx=1,Dx=10,Mx=-2,oy=n=>n==="*";function Lx(n,l){let r=n.split("/"),i=r.length;return r.some(oy)&&(i+=Mx),l&&(i+=Ox),r.filter(o=>!oy(o)).reduce((o,u)=>o+(Ax.test(u)?Tx:u===""?Rx:Dx),i)}function Ux(n,l){return n.length===l.length&&n.slice(0,-1).every((i,o)=>i===l[o])?n[n.length-1]-l[l.length-1]:0}function qx(n,l,r=!1){let{routesMeta:i}=n,o={},u="/",d=[];for(let m=0;m<i.length;++m){let y=i[m],p=m===i.length-1,g=u==="/"?l:l.slice(u.length)||"/",b=mr({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},g),E=y.route;if(!b&&p&&r&&!i[i.length-1].route.index&&(b=mr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},g)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:Da([u,b.pathname]),pathnameBase:$x(Da([u,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(u=Da([u,b.pathnameBase]))}return d}function mr(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,i]=zx(n.path,n.caseSensitive,n.end),o=l.match(r);if(!o)return null;let u=o[0],d=u.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:i.reduce((p,{paramName:g,isOptional:b},E)=>{if(g==="*"){let w=m[E]||"";d=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const C=m[E];return b&&!C?p[g]=void 0:p[g]=(C||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:d,pattern:n}}function zx(n,l=!1,r=!0){zn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,y)=>(i.push({paramName:m,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),i]}function kx(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return zn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function Ma(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,i=n.charAt(r);return i&&i!=="/"?null:n.slice(r)||"/"}function Bx(n,l="/"){let{pathname:r,search:i="",hash:o=""}=typeof n=="string"?Zi(n):n;return{pathname:r?r.startsWith("/")?r:Hx(r,l):l,search:Yx(i),hash:Vx(o)}}function Hx(n,l){let r=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Jf(n,l,r,i){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qx(n){return n.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function pv(n){let l=Qx(n);return l.map((r,i)=>i===l.length-1?r.pathname:r.pathnameBase)}function yv(n,l,r,i=!1){let o;typeof n=="string"?o=Zi(n):(o={...n},et(!o.pathname||!o.pathname.includes("?"),Jf("?","pathname","search",o)),et(!o.pathname||!o.pathname.includes("#"),Jf("#","pathname","hash",o)),et(!o.search||!o.search.includes("#"),Jf("#","search","hash",o)));let u=n===""||o.pathname==="",d=u?"/":o.pathname,m;if(d==null)m=r;else{let b=l.length-1;if(!i&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),b-=1;o.pathname=E.join("/")}m=b>=0?l[b]:"/"}let y=Bx(o,m),p=d&&d!=="/"&&d.endsWith("/"),g=(u||d===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||g)&&(y.pathname+="/"),y}var Da=n=>n.join("/").replace(/\/\/+/g,"/"),$x=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Yx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Vx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Kx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var vv=["POST","PUT","PATCH","DELETE"];new Set(vv);var Fx=["GET",...vv];new Set(Fx);var Pi=x.createContext(null);Pi.displayName="DataRouter";var wu=x.createContext(null);wu.displayName="DataRouterState";var gv=x.createContext({isTransitioning:!1});gv.displayName="ViewTransition";var Gx=x.createContext(new Map);Gx.displayName="Fetchers";var Xx=x.createContext(null);Xx.displayName="Await";var na=x.createContext(null);na.displayName="Navigation";var vr=x.createContext(null);vr.displayName="Location";var aa=x.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var qd=x.createContext(null);qd.displayName="RouteError";function Zx(n,{relative:l}={}){et(gr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=x.useContext(na),{hash:o,pathname:u,search:d}=br(n,{relative:l}),m=u;return r!=="/"&&(m=u==="/"?r:Da([r,u])),i.createHref({pathname:m,search:d,hash:o})}function gr(){return x.useContext(vr)!=null}function Yt(){return et(gr(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(vr).location}var bv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xv(n){x.useContext(na).static||x.useLayoutEffect(n)}function zt(){let{isDataRoute:n}=x.useContext(aa);return n?u2():Px()}function Px(){et(gr(),"useNavigate() may be used only in the context of a <Router> component.");let n=x.useContext(Pi),{basename:l,navigator:r}=x.useContext(na),{matches:i}=x.useContext(aa),{pathname:o}=Yt(),u=JSON.stringify(pv(i)),d=x.useRef(!1);return xv(()=>{d.current=!0}),x.useCallback((y,p={})=>{if(zn(d.current,bv),!d.current)return;if(typeof y=="number"){r.go(y);return}let g=yv(y,JSON.parse(u),o,p.relative==="path");n==null&&l!=="/"&&(g.pathname=g.pathname==="/"?l:Da([l,g.pathname])),(p.replace?r.replace:r.push)(g,p.state,p)},[l,r,u,o,n])}x.createContext(null);function Jx(){let{matches:n}=x.useContext(aa),l=n[n.length-1];return l?l.params:{}}function br(n,{relative:l}={}){let{matches:r}=x.useContext(aa),{pathname:i}=Yt(),o=JSON.stringify(pv(r));return x.useMemo(()=>yv(n,JSON.parse(o),i,l==="path"),[n,o,i,l])}function Ix(n,l){return Sv(n,l)}function Sv(n,l,r,i){var A;et(gr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:u}=x.useContext(na),{matches:d}=x.useContext(aa),m=d[d.length-1],y=m?m.params:{},p=m?m.pathname:"/",g=m?m.pathnameBase:"/",b=m&&m.route;{let j=b&&b.path||"";wv(p,!b||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
48
+ `+a.stack}}function Sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sg(e){var t=gh(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){s=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(v){s=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ur(e){e._valueTracker||(e._valueTracker=sg(e))}function bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=gh(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var rg=/[\n"\\]/g;function wn(e){return e.replace(rg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qu(e,t,a,s,c,f,v,S){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Sn(t)):e.value!==""+Sn(t)&&(e.value=""+Sn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?$u(e,v,Sn(t)):a!=null?$u(e,v,Sn(a)):s!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Sn(S):e.removeAttribute("name")}function xh(e,t,a,s,c,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null))return;a=a!=null?""+Sn(a):"",t=t!=null?""+Sn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=S?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function $u(e,t,a){t==="number"&&zr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ai(e,t,a,s){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Sn(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,s&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Sh(e,t,a){if(t!=null&&(t=""+Sn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Sn(a):""}function wh(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(i(92));if(Se(s)){if(1<s.length)throw Error(i(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=Sn(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s)}function li(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var og=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Eh(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||og.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ch(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var c in t)s=t[c],t.hasOwnProperty(c)&&a[c]!==s&&Eh(e,c,s)}else for(var f in t)t.hasOwnProperty(f)&&Eh(e,f,t[f])}function Yu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ug=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qr(e){return cg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Vu=null;function Ku(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ii=null,si=null;function _h(e){var t=nn(e);if(t&&(e=t.stateNode)){var a=e[ne]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var c=s[ne]||null;if(!c)throw Error(i(90));Qu(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&bh(s)}break e;case"textarea":Sh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ai(e,!!a.multiple,t,!1)}}}var Fu=!1;function Nh(e,t,a){if(Fu)return e(t,a);Fu=!0;try{var s=e(t);return s}finally{if(Fu=!1,(ii!==null||si!==null)&&(Eo(),ii&&(t=ii,e=si,si=ii=null,_h(t),e)))for(t=0;t<e.length;t++)_h(e[t])}}function cs(e,t){var a=e.stateNode;if(a===null)return null;var s=a[ne]||null;if(s===null)return null;a=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(pa)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{Gu=!1}var $a=null,Xu=null,kr=null;function jh(){if(kr)return kr;var e,t=Xu,a=t.length,s,c="value"in $a?$a.value:$a.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var v=a-e;for(s=1;s<=v&&t[a-s]===c[f-s];s++);return kr=c.slice(e,1<s?1-s:void 0)}function Br(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hr(){return!0}function Ah(){return!1}function Kt(e){function t(a,s,c,f,v){this._reactName=a,this._targetInst=c,this.type=s,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Hr:Ah,this.isPropagationStopped=Ah,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Hr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hr)},persist:function(){},isPersistent:Hr}),t}var Nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qr=Kt(Nl),ds=g({},Nl,{view:0,detail:0}),fg=Kt(ds),Zu,Pu,hs,$r=g({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hs&&(hs&&e.type==="mousemove"?(Zu=e.screenX-hs.screenX,Pu=e.screenY-hs.screenY):Pu=Zu=0,hs=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:Pu}}),Th=Kt($r),dg=g({},$r,{dataTransfer:0}),hg=Kt(dg),mg=g({},ds,{relatedTarget:0}),Ju=Kt(mg),pg=g({},Nl,{animationName:0,elapsedTime:0,pseudoElement:0}),yg=Kt(pg),vg=g({},Nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gg=Kt(vg),bg=g({},Nl,{data:0}),Oh=Kt(bg),xg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Eg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wg[e])?!!t[e]:!1}function Iu(){return Eg}var Cg=g({},ds,{key:function(e){if(e.key){var t=xg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Br(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(e){return e.type==="keypress"?Br(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Br(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_g=Kt(Cg),Ng=g({},$r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rh=Kt(Ng),jg=g({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),Ag=Kt(jg),Tg=g({},Nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Og=Kt(Tg),Rg=g({},$r,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dg=Kt(Rg),Mg=g({},Nl,{newState:0,oldState:0}),Lg=Kt(Mg),Ug=[9,13,27,32],Wu=pa&&"CompositionEvent"in window,ms=null;pa&&"documentMode"in document&&(ms=document.documentMode);var zg=pa&&"TextEvent"in window&&!ms,Dh=pa&&(!Wu||ms&&8<ms&&11>=ms),Mh=" ",Lh=!1;function Uh(e,t){switch(e){case"keyup":return Ug.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ri=!1;function qg(e,t){switch(e){case"compositionend":return zh(t);case"keypress":return t.which!==32?null:(Lh=!0,Mh);case"textInput":return e=t.data,e===Mh&&Lh?null:e;default:return null}}function kg(e,t){if(ri)return e==="compositionend"||!Wu&&Uh(e,t)?(e=jh(),kr=Xu=$a=null,ri=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dh&&t.locale!=="ko"?null:t.data;default:return null}}var Bg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bg[e.type]:t==="textarea"}function kh(e,t,a,s){ii?si?si.push(s):si=[s]:ii=s,t=To(t,"onChange"),0<t.length&&(a=new Qr("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var ps=null,ys=null;function Hg(e){g0(e,0)}function Yr(e){var t=Cl(e);if(bh(t))return e}function Bh(e,t){if(e==="change")return t}var Hh=!1;if(pa){var ec;if(pa){var tc="oninput"in document;if(!tc){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),tc=typeof Qh.oninput=="function"}ec=tc}else ec=!1;Hh=ec&&(!document.documentMode||9<document.documentMode)}function $h(){ps&&(ps.detachEvent("onpropertychange",Yh),ys=ps=null)}function Yh(e){if(e.propertyName==="value"&&Yr(ys)){var t=[];kh(t,ys,e,Ku(e)),Nh(Hg,t)}}function Qg(e,t,a){e==="focusin"?($h(),ps=t,ys=a,ps.attachEvent("onpropertychange",Yh)):e==="focusout"&&$h()}function $g(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yr(ys)}function Yg(e,t){if(e==="click")return Yr(t)}function Vg(e,t){if(e==="input"||e==="change")return Yr(t)}function Kg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:Kg;function vs(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var c=a[s];if(!mn.call(t,c)||!an(e[c],t[c]))return!1}return!0}function Vh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var a=Vh(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Vh(a)}}function Fh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=zr(e.document)}return t}function nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Fg=pa&&"documentMode"in document&&11>=document.documentMode,oi=null,ac=null,gs=null,lc=!1;function Xh(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;lc||oi==null||oi!==zr(s)||(s=oi,"selectionStart"in s&&nc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),gs&&vs(gs,s)||(gs=s,s=To(ac,"onSelect"),0<s.length&&(t=new Qr("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=oi)))}function jl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ui={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},ic={},Zh={};pa&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);function Al(e){if(ic[e])return ic[e];if(!ui[e])return e;var t=ui[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Zh)return ic[e]=t[a];return e}var Ph=Al("animationend"),Jh=Al("animationiteration"),Ih=Al("animationstart"),Gg=Al("transitionrun"),Xg=Al("transitionstart"),Zg=Al("transitioncancel"),Wh=Al("transitionend"),em=new Map,sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sc.push("scrollEnd");function Ln(e,t){em.set(e,t),Kn(t,[e])}var tm=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var a=tm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:vh(t)},tm.set(e,t),t)}return{value:e,source:t,stack:vh(t)}}var Cn=[],ci=0,rc=0;function Vr(){for(var e=ci,t=rc=ci=0;t<e;){var a=Cn[t];Cn[t++]=null;var s=Cn[t];Cn[t++]=null;var c=Cn[t];Cn[t++]=null;var f=Cn[t];if(Cn[t++]=null,s!==null&&c!==null){var v=s.pending;v===null?c.next=c:(c.next=v.next,v.next=c),s.pending=c}f!==0&&nm(a,c,f)}}function Kr(e,t,a,s){Cn[ci++]=e,Cn[ci++]=t,Cn[ci++]=a,Cn[ci++]=s,rc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function oc(e,t,a,s){return Kr(e,t,a,s),Fr(e)}function fi(e,t){return Kr(e,null,null,t),Fr(e)}function nm(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,s=f.alternate,s!==null&&(s.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-it(a),e=f.hiddenUpdates,s=e[c],s===null?e[c]=[t]:s.push(t),t.lane=a|536870912),f):null}function Fr(e){if(50<Ys)throw Ys=0,pf=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var di={};function Pg(e,t,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,a,s){return new Pg(e,t,a,s)}function uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ya(e,t){var a=e.alternate;return a===null?(a=ln(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function am(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Gr(e,t,a,s,c,f){var v=0;if(s=e,typeof e=="function")uc(e)&&(v=1);else if(typeof e=="string")v=Ib(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=ln(31,a,t,c),e.elementType=te,e.lanes=f,e;case w:return Tl(a.children,c,f,t);case O:v=8,c|=24;break;case N:return e=ln(12,a,t,c|2),e.elementType=N,e.lanes=f,e;case V:return e=ln(13,a,t,c),e.elementType=V,e.lanes=f,e;case Q:return e=ln(19,a,t,c),e.elementType=Q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:case j:v=10;break e;case A:v=9;break e;case B:v=11;break e;case G:v=14;break e;case Z:v=16,s=null;break e}v=29,a=Error(i(130,e===null?"null":typeof e,"")),s=null}return t=ln(v,a,t,c),t.elementType=e,t.type=s,t.lanes=f,t}function Tl(e,t,a,s){return e=ln(7,e,s,t),e.lanes=a,e}function cc(e,t,a){return e=ln(6,e,null,t),e.lanes=a,e}function fc(e,t,a){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=[],mi=0,Xr=null,Zr=0,_n=[],Nn=0,Ol=null,va=1,ga="";function Rl(e,t){hi[mi++]=Zr,hi[mi++]=Xr,Xr=e,Zr=t}function lm(e,t,a){_n[Nn++]=va,_n[Nn++]=ga,_n[Nn++]=Ol,Ol=e;var s=va;e=ga;var c=32-it(s)-1;s&=~(1<<c),a+=1;var f=32-it(t)+c;if(30<f){var v=c-c%5;f=(s&(1<<v)-1).toString(32),s>>=v,c-=v,va=1<<32-it(t)+c|a<<c|s,ga=f+e}else va=1<<f|a<<c|s,ga=e}function dc(e){e.return!==null&&(Rl(e,1),lm(e,1,0))}function hc(e){for(;e===Xr;)Xr=hi[--mi],hi[mi]=null,Zr=hi[--mi],hi[mi]=null;for(;e===Ol;)Ol=_n[--Nn],_n[Nn]=null,ga=_n[--Nn],_n[Nn]=null,va=_n[--Nn],_n[Nn]=null}var Qt=null,nt=null,Le=!1,Dl=null,Fn=!1,mc=Error(i(519));function Ml(e){var t=Error(i(418,""));throw Ss(En(t,e)),mc}function im(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[P]=e,t[ne]=s,a){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(a=0;a<Ks.length;a++)je(Ks[a],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),xh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0),Ur(t);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),wh(t,s.value,s.defaultValue,s.children),Ur(t)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||w0(t.textContent,a)?(s.popover!=null&&(je("beforetoggle",t),je("toggle",t)),s.onScroll!=null&&je("scroll",t),s.onScrollEnd!=null&&je("scrollend",t),s.onClick!=null&&(t.onclick=Oo),t=!0):t=!1,t||Ml(e)}function sm(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 13:Fn=!1;return;case 27:case 3:Fn=!0;return;default:Qt=Qt.return}}function bs(e){if(e!==Qt)return!1;if(!Le)return sm(e),Le=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Rf(e.type,e.memoizedProps)),a=!a),a&&nt&&Ml(e),sm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){nt=zn(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}nt=null}}else t===27?(t=nt,ll(e.type)?(e=Uf,Uf=null,nt=e):nt=t):nt=Qt?zn(e.stateNode.nextSibling):null;return!0}function xs(){nt=Qt=null,Le=!1}function rm(){var e=Dl;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),Dl=null),e}function Ss(e){Dl===null?Dl=[e]:Dl.push(e)}var pc=$(null),Ll=null,ba=null;function Ya(e,t,a){I(pc,t._currentValue),t._currentValue=a}function xa(e){e._currentValue=pc.current,W(pc)}function yc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function vc(e,t,a,s){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var v=c.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=c;for(var T=0;T<t.length;T++)if(S.context===t[T]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),yc(f.return,a,e),s||(v=null);break e}f=S.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(i(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),yc(v,a,e),v=null}else v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function ws(e,t,a,s){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var S=c.type;an(c.pendingProps.value,v.value)||(e!==null?e.push(S):e=[S])}}else if(c===St.current){if(v=c.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Js):e=[Js])}c=c.return}e!==null&&vc(t,e,a,s),t.flags|=262144}function Pr(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Ll=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return om(Ll,e)}function Jr(e,t){return Ll===null&&Ul(e),om(e,t)}function om(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ba===null){if(e===null)throw Error(i(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return a}var Jg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ig=n.unstable_scheduleCallback,Wg=n.unstable_NormalPriority,pt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new Jg,data:new Map,refCount:0}}function Es(e){e.refCount--,e.refCount===0&&Ig(Wg,function(){e.controller.abort()})}var Cs=null,bc=0,pi=0,yi=null;function eb(e,t){if(Cs===null){var a=Cs=[];bc=0,pi=wf(),yi={status:"pending",value:void 0,then:function(s){a.push(s)}}}return bc++,t.then(um,um),t}function um(){if(--bc===0&&Cs!==null){yi!==null&&(yi.status="fulfilled");var e=Cs;Cs=null,pi=0,yi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function tb(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(s.status="rejected",s.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),s}var cm=k.S;k.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&eb(e,t),cm!==null&&cm(e,t)};var zl=$(null);function xc(){var e=zl.current;return e!==null?e:Xe.pooledCache}function Ir(e,t){t===null?I(zl,zl.current):I(zl,t.pool)}function fm(){var e=xc();return e===null?null:{parent:pt._currentValue,pool:e}}var _s=Error(i(460)),dm=Error(i(474)),Wr=Error(i(542)),Sc={then:function(){}};function hm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function eo(){}function mm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(eo,eo),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(e),e;default:if(typeof t.status=="string")t.then(eo,eo);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=s}},function(s){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(e),e}throw Ns=t,_s}}var Ns=null;function pm(){if(Ns===null)throw Error(i(459));var e=Ns;return Ns=null,e}function ym(e){if(e===_s||e===Wr)throw Error(i(483))}var Va=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(qe&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,t=Fr(e),nm(e,null,a),t}return Kr(e,s,t,a),Fr(e)}function js(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,st(e,a)}}function Cc(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=v:f=f.next=v,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var _c=!1;function As(){if(_c){var e=yi;if(e!==null)throw e}}function Ts(e,t,a,s){_c=!1;var c=e.updateQueue;Va=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var T=S,U=T.next;T.next=null,v===null?f=U:v.next=U,v=T;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==v&&(S===null?Y.firstBaseUpdate=U:S.next=U,Y.lastBaseUpdate=T))}if(f!==null){var F=c.baseState;v=0,Y=U=T=null,S=f;do{var z=S.lane&-536870913,q=z!==S.lane;if(q?(Ae&z)===z:(s&z)===z){z!==0&&z===pi&&(_c=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var me=e,fe=S;z=t;var Ye=a;switch(fe.tag){case 1:if(me=fe.payload,typeof me=="function"){F=me.call(Ye,F,z);break e}F=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=fe.payload,z=typeof me=="function"?me.call(Ye,F,z):me,z==null)break e;F=g({},F,z);break e;case 2:Va=!0}}z=S.callback,z!==null&&(e.flags|=64,q&&(e.flags|=8192),q=c.callbacks,q===null?c.callbacks=[z]:q.push(z))}else q={lane:z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(U=Y=q,T=F):Y=Y.next=q,v|=z;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;q=S,S=q.next,q.next=null,c.lastBaseUpdate=q,c.shared.pending=null}}while(!0);Y===null&&(T=F),c.baseState=T,c.firstBaseUpdate=U,c.lastBaseUpdate=Y,f===null&&(c.shared.lanes=0),el|=v,e.lanes=v,e.memoizedState=F}}function vm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function gm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)vm(a[e],t)}var vi=$(null),to=$(0);function bm(e,t){e=ja,I(to,e),I(vi,t),ja=e|t.baseLanes}function Nc(){I(to,ja),I(vi,vi.current)}function jc(){ja=to.current,W(vi),W(to)}var Ga=0,xe=null,Qe=null,ht=null,no=!1,gi=!1,ql=!1,ao=0,Os=0,bi=null,nb=0;function ut(){throw Error(i(321))}function Ac(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!an(e[a],t[a]))return!1;return!0}function Tc(e,t,a,s,c,f){return Ga=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?np:ap,ql=!1,f=a(s,c),ql=!1,gi&&(f=Sm(t,a,s,c)),xm(e),f}function xm(e){k.H=uo;var t=Qe!==null&&Qe.next!==null;if(Ga=0,ht=Qe=xe=null,no=!1,Os=0,bi=null,t)throw Error(i(300));e===null||gt||(e=e.dependencies,e!==null&&Pr(e)&&(gt=!0))}function Sm(e,t,a,s){xe=e;var c=0;do{if(gi&&(bi=null),Os=0,gi=!1,25<=c)throw Error(i(301));if(c+=1,ht=Qe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}k.H=ub,f=t(a,s)}while(gi);return f}function ab(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Rs(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Oc(){var e=ao!==0;return ao=0,e}function Rc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Dc(e){if(no){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}no=!1}Ga=0,ht=Qe=xe=null,gi=!1,Os=ao=0,bi=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?xe.memoizedState=ht=e:ht=ht.next=e,ht}function mt(){if(Qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=ht===null?xe.memoizedState:ht.next;if(t!==null)ht=t,Qe=e;else{if(e===null)throw xe.alternate===null?Error(i(467)):Error(i(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},ht===null?xe.memoizedState=ht=e:ht=ht.next=e}return ht}function Mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rs(e){var t=Os;return Os+=1,bi===null&&(bi=[]),e=mm(bi,e,t),t=xe,(ht===null?t.memoizedState:ht.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?np:ap),e}function lo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rs(e);if(e.$$typeof===j)return Dt(e)}throw Error(i(438,String(e)))}function Lc(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=xe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mc(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=pe;return t.index++,a}function Sa(e,t){return typeof t=="function"?t(e):t}function io(e){var t=mt();return Uc(t,Qe,e)}function Uc(e,t,a){var s=e.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=a;var c=e.baseQueue,f=s.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,s.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var S=v=null,T=null,U=t,Y=!1;do{var F=U.lane&-536870913;if(F!==U.lane?(Ae&F)===F:(Ga&F)===F){var z=U.revertLane;if(z===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),F===pi&&(Y=!0);else if((Ga&z)===z){U=U.next,z===pi&&(Y=!0);continue}else F={lane:0,revertLane:U.revertLane,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},T===null?(S=T=F,v=f):T=T.next=F,xe.lanes|=z,el|=z;F=U.action,ql&&a(f,F),f=U.hasEagerState?U.eagerState:a(f,F)}else z={lane:F,revertLane:U.revertLane,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},T===null?(S=T=z,v=f):T=T.next=z,xe.lanes|=F,el|=F;U=U.next}while(U!==null&&U!==t);if(T===null?v=f:T.next=S,!an(f,e.memoizedState)&&(gt=!0,Y&&(a=yi,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=T,s.lastRenderedState=f}return c===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function zc(e){var t=mt(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var s=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==c);an(f,t.memoizedState)||(gt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,s]}function wm(e,t,a){var s=xe,c=mt(),f=Le;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var v=!an((Qe||c).memoizedState,a);v&&(c.memoizedState=a,gt=!0),c=c.queue;var S=_m.bind(null,s,c,e);if(Ds(2048,8,S,[e]),c.getSnapshot!==t||v||ht!==null&&ht.memoizedState.tag&1){if(s.flags|=2048,xi(9,so(),Cm.bind(null,s,c,a,t),null),Xe===null)throw Error(i(349));f||(Ga&124)!==0||Em(s,t,a)}return a}function Em(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=xe.updateQueue,t===null?(t=Mc(),xe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Cm(e,t,a,s){t.value=a,t.getSnapshot=s,Nm(t)&&jm(e)}function _m(e,t,a){return a(function(){Nm(t)&&jm(e)})}function Nm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!an(e,a)}catch{return!0}}function jm(e){var t=fi(e,2);t!==null&&cn(t,e,2)}function qc(e){var t=Ft();if(typeof e=="function"){var a=e;if(e=a(),ql){Vt(!0);try{a()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t}function Am(e,t,a,s){return e.baseState=a,Uc(e,Qe,typeof s=="function"?s:Sa)}function lb(e,t,a,s,c){if(oo(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};k.T!==null?a(!0):f.isTransition=!1,s(f),a=t.pending,a===null?(f.next=t.pending=f,Tm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Tm(e,t){var a=t.action,s=t.payload,c=e.state;if(t.isTransition){var f=k.T,v={};k.T=v;try{var S=a(c,s),T=k.S;T!==null&&T(v,S),Om(e,t,S)}catch(U){kc(e,t,U)}finally{k.T=f}}else try{f=a(c,s),Om(e,t,f)}catch(U){kc(e,t,U)}}function Om(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Rm(e,t,s)},function(s){return kc(e,t,s)}):Rm(e,t,a)}function Rm(e,t,a){t.status="fulfilled",t.value=a,Dm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Tm(e,a)))}function kc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Dm(t),t=t.next;while(t!==s)}e.action=null}function Dm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mm(e,t){return t}function Lm(e,t){if(Le){var a=Xe.formState;if(a!==null){e:{var s=xe;if(Le){if(nt){t:{for(var c=nt,f=Fn;c.nodeType!==8;){if(!f){c=null;break t}if(c=zn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){nt=zn(c.nextSibling),s=c.data==="F!";break e}}Ml(s)}s=!1}s&&(t=a[0])}}return a=Ft(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mm,lastRenderedState:t},a.queue=s,a=Wm.bind(null,xe,s),s.dispatch=a,s=qc(!1),f=Yc.bind(null,xe,!1,s.queue),s=Ft(),c={state:t,dispatch:null,action:e,pending:null},s.queue=c,a=lb.bind(null,xe,c,f,a),c.dispatch=a,s.memoizedState=e,[t,a,!1]}function Um(e){var t=mt();return zm(t,Qe,e)}function zm(e,t,a){if(t=Uc(e,t,Mm)[0],e=io(Sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Rs(t)}catch(v){throw v===_s?Wr:v}else s=t;t=mt();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,xi(9,so(),ib.bind(null,c,a),null)),[s,f,e]}function ib(e,t){e.action=t}function qm(e){var t=mt(),a=Qe;if(a!==null)return zm(t,a,e);mt(),t=t.memoizedState,a=mt();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function xi(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Mc(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function so(){return{destroy:void 0,resource:void 0}}function km(){return mt().memoizedState}function ro(e,t,a,s){var c=Ft();s=s===void 0?null:s,xe.flags|=e,c.memoizedState=xi(1|t,so(),a,s)}function Ds(e,t,a,s){var c=mt();s=s===void 0?null:s;var f=c.memoizedState.inst;Qe!==null&&s!==null&&Ac(s,Qe.memoizedState.deps)?c.memoizedState=xi(t,f,a,s):(xe.flags|=e,c.memoizedState=xi(1|t,f,a,s))}function Bm(e,t){ro(8390656,8,e,t)}function Hm(e,t){Ds(2048,8,e,t)}function Qm(e,t){return Ds(4,2,e,t)}function $m(e,t){return Ds(4,4,e,t)}function Ym(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vm(e,t,a){a=a!=null?a.concat([e]):null,Ds(4,4,Ym.bind(null,t,e),a)}function Bc(){}function Km(e,t){var a=mt();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Ac(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Fm(e,t){var a=mt();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Ac(t,s[1]))return s[0];if(s=e(),ql){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[s,t],s}function Hc(e,t,a){return a===void 0||(Ga&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Zp(),xe.lanes|=e,el|=e,a)}function Gm(e,t,a,s){return an(a,t)?a:vi.current!==null?(e=Hc(e,a,s),an(e,t)||(gt=!0),e):(Ga&42)===0?(gt=!0,e.memoizedState=a):(e=Zp(),xe.lanes|=e,el|=e,t)}function Xm(e,t,a,s,c){var f=X.p;X.p=f!==0&&8>f?f:8;var v=k.T,S={};k.T=S,Yc(e,!1,t,a);try{var T=c(),U=k.S;if(U!==null&&U(S,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var Y=tb(T,s);Ms(e,t,Y,un(e))}else Ms(e,t,s,un(e))}catch(F){Ms(e,t,{then:function(){},status:"rejected",reason:F},un())}finally{X.p=f,k.T=v}}function sb(){}function Qc(e,t,a,s){if(e.tag!==5)throw Error(i(476));var c=Zm(e).queue;Xm(e,c,t,J,a===null?sb:function(){return Pm(e),a(s)})}function Zm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pm(e){var t=Zm(e).next.queue;Ms(e,t,{},un())}function $c(){return Dt(Js)}function Jm(){return mt().memoizedState}function Im(){return mt().memoizedState}function rb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=un();e=Ka(a);var s=Fa(t,e,a);s!==null&&(cn(s,t,a),js(s,t,a)),t={cache:gc()},e.payload=t;return}t=t.return}}function ob(e,t,a){var s=un();a={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},oo(e)?ep(t,a):(a=oc(e,t,a,s),a!==null&&(cn(a,e,s),tp(a,t,s)))}function Wm(e,t,a){var s=un();Ms(e,t,a,s)}function Ms(e,t,a,s){var c={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(oo(e))ep(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,S=f(v,a);if(c.hasEagerState=!0,c.eagerState=S,an(S,v))return Kr(e,t,c,0),Xe===null&&Vr(),!1}catch{}finally{}if(a=oc(e,t,c,s),a!==null)return cn(a,e,s),tp(a,t,s),!0}return!1}function Yc(e,t,a,s){if(s={lane:2,revertLane:wf(),action:s,hasEagerState:!1,eagerState:null,next:null},oo(e)){if(t)throw Error(i(479))}else t=oc(e,a,s,2),t!==null&&cn(t,e,2)}function oo(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function ep(e,t){gi=no=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function tp(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,st(e,a)}}var uo={readContext:Dt,use:lo,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut},np={readContext:Dt,use:lo,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Bm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ro(4194308,4,Ym.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ro(4194308,4,e,t)},useInsertionEffect:function(e,t){ro(4,2,e,t)},useMemo:function(e,t){var a=Ft();t=t===void 0?null:t;var s=e();if(ql){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=Ft();if(a!==void 0){var c=a(t);if(ql){Vt(!0);try{a(t)}finally{Vt(!1)}}}else c=t;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=ob.bind(null,xe,e),[s.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=qc(e);var t=e.queue,a=Wm.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Bc,useDeferredValue:function(e,t){var a=Ft();return Hc(a,e,t)},useTransition:function(){var e=qc(!1);return e=Xm.bind(null,xe,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=xe,c=Ft();if(Le){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Xe===null)throw Error(i(349));(Ae&124)!==0||Em(s,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Bm(_m.bind(null,s,f,e),[e]),s.flags|=2048,xi(9,so(),Cm.bind(null,s,f,a,t),null),a},useId:function(){var e=Ft(),t=Xe.identifierPrefix;if(Le){var a=ga,s=va;a=(s&~(1<<32-it(s)-1)).toString(32)+a,t="«"+t+"R"+a,a=ao++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=nb++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:$c,useFormState:Lm,useActionState:Lm,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Yc.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Lc,useCacheRefresh:function(){return Ft().memoizedState=rb.bind(null,xe)}},ap={readContext:Dt,use:lo,useCallback:Km,useContext:Dt,useEffect:Hm,useImperativeHandle:Vm,useInsertionEffect:Qm,useLayoutEffect:$m,useMemo:Fm,useReducer:io,useRef:km,useState:function(){return io(Sa)},useDebugValue:Bc,useDeferredValue:function(e,t){var a=mt();return Gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=io(Sa)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Rs(e),t]},useSyncExternalStore:wm,useId:Jm,useHostTransitionStatus:$c,useFormState:Um,useActionState:Um,useOptimistic:function(e,t){var a=mt();return Am(a,Qe,e,t)},useMemoCache:Lc,useCacheRefresh:Im},ub={readContext:Dt,use:lo,useCallback:Km,useContext:Dt,useEffect:Hm,useImperativeHandle:Vm,useInsertionEffect:Qm,useLayoutEffect:$m,useMemo:Fm,useReducer:zc,useRef:km,useState:function(){return zc(Sa)},useDebugValue:Bc,useDeferredValue:function(e,t){var a=mt();return Qe===null?Hc(a,e,t):Gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=zc(Sa)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Rs(e),t]},useSyncExternalStore:wm,useId:Jm,useHostTransitionStatus:$c,useFormState:qm,useActionState:qm,useOptimistic:function(e,t){var a=mt();return Qe!==null?Am(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Lc,useCacheRefresh:Im},Si=null,Ls=0;function co(e){var t=Ls;return Ls+=1,Si===null&&(Si=[]),mm(Si,e,t)}function Us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function fo(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){var t=e._init;return t(e._payload)}function ip(e){function t(M,D){if(e){var L=M.deletions;L===null?(M.deletions=[D],M.flags|=16):L.push(D)}}function a(M,D){if(!e)return null;for(;D!==null;)t(M,D),D=D.sibling;return null}function s(M){for(var D=new Map;M!==null;)M.key!==null?D.set(M.key,M):D.set(M.index,M),M=M.sibling;return D}function c(M,D){return M=ya(M,D),M.index=0,M.sibling=null,M}function f(M,D,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<D?(M.flags|=67108866,D):L):(M.flags|=67108866,D)):(M.flags|=1048576,D)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,D,L,K){return D===null||D.tag!==6?(D=cc(L,M.mode,K),D.return=M,D):(D=c(D,L),D.return=M,D)}function T(M,D,L,K){var ee=L.type;return ee===w?Y(M,D,L.props.children,K,L.key):D!==null&&(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&lp(ee)===D.type)?(D=c(D,L.props),Us(D,L),D.return=M,D):(D=Gr(L.type,L.key,L.props,null,M.mode,K),Us(D,L),D.return=M,D)}function U(M,D,L,K){return D===null||D.tag!==4||D.stateNode.containerInfo!==L.containerInfo||D.stateNode.implementation!==L.implementation?(D=fc(L,M.mode,K),D.return=M,D):(D=c(D,L.children||[]),D.return=M,D)}function Y(M,D,L,K,ee){return D===null||D.tag!==7?(D=Tl(L,M.mode,K,ee),D.return=M,D):(D=c(D,L),D.return=M,D)}function F(M,D,L){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=cc(""+D,M.mode,L),D.return=M,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case E:return L=Gr(D.type,D.key,D.props,null,M.mode,L),Us(L,D),L.return=M,L;case C:return D=fc(D,M.mode,L),D.return=M,D;case Z:var K=D._init;return D=K(D._payload),F(M,D,L)}if(Se(D)||be(D))return D=Tl(D,M.mode,L,null),D.return=M,D;if(typeof D.then=="function")return F(M,co(D),L);if(D.$$typeof===j)return F(M,Jr(M,D),L);fo(M,D)}return null}function z(M,D,L,K){var ee=D!==null?D.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ee!==null?null:S(M,D,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return L.key===ee?T(M,D,L,K):null;case C:return L.key===ee?U(M,D,L,K):null;case Z:return ee=L._init,L=ee(L._payload),z(M,D,L,K)}if(Se(L)||be(L))return ee!==null?null:Y(M,D,L,K,null);if(typeof L.then=="function")return z(M,D,co(L),K);if(L.$$typeof===j)return z(M,D,Jr(M,L),K);fo(M,L)}return null}function q(M,D,L,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return M=M.get(L)||null,S(D,M,""+K,ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case E:return M=M.get(K.key===null?L:K.key)||null,T(D,M,K,ee);case C:return M=M.get(K.key===null?L:K.key)||null,U(D,M,K,ee);case Z:var we=K._init;return K=we(K._payload),q(M,D,L,K,ee)}if(Se(K)||be(K))return M=M.get(L)||null,Y(D,M,K,ee,null);if(typeof K.then=="function")return q(M,D,L,co(K),ee);if(K.$$typeof===j)return q(M,D,L,Jr(D,K),ee);fo(D,K)}return null}function me(M,D,L,K){for(var ee=null,we=null,le=D,he=D=0,xt=null;le!==null&&he<L.length;he++){le.index>he?(xt=le,le=null):xt=le.sibling;var Te=z(M,le,L[he],K);if(Te===null){le===null&&(le=xt);break}e&&le&&Te.alternate===null&&t(M,le),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te,le=xt}if(he===L.length)return a(M,le),Le&&Rl(M,he),ee;if(le===null){for(;he<L.length;he++)le=F(M,L[he],K),le!==null&&(D=f(le,D,he),we===null?ee=le:we.sibling=le,we=le);return Le&&Rl(M,he),ee}for(le=s(le);he<L.length;he++)xt=q(le,M,he,L[he],K),xt!==null&&(e&&xt.alternate!==null&&le.delete(xt.key===null?he:xt.key),D=f(xt,D,he),we===null?ee=xt:we.sibling=xt,we=xt);return e&&le.forEach(function(ul){return t(M,ul)}),Le&&Rl(M,he),ee}function fe(M,D,L,K){if(L==null)throw Error(i(151));for(var ee=null,we=null,le=D,he=D=0,xt=null,Te=L.next();le!==null&&!Te.done;he++,Te=L.next()){le.index>he?(xt=le,le=null):xt=le.sibling;var ul=z(M,le,Te.value,K);if(ul===null){le===null&&(le=xt);break}e&&le&&ul.alternate===null&&t(M,le),D=f(ul,D,he),we===null?ee=ul:we.sibling=ul,we=ul,le=xt}if(Te.done)return a(M,le),Le&&Rl(M,he),ee;if(le===null){for(;!Te.done;he++,Te=L.next())Te=F(M,Te.value,K),Te!==null&&(D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return Le&&Rl(M,he),ee}for(le=s(le);!Te.done;he++,Te=L.next())Te=q(le,M,he,Te.value,K),Te!==null&&(e&&Te.alternate!==null&&le.delete(Te.key===null?he:Te.key),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return e&&le.forEach(function(cx){return t(M,cx)}),Le&&Rl(M,he),ee}function Ye(M,D,L,K){if(typeof L=="object"&&L!==null&&L.type===w&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case E:e:{for(var ee=L.key;D!==null;){if(D.key===ee){if(ee=L.type,ee===w){if(D.tag===7){a(M,D.sibling),K=c(D,L.props.children),K.return=M,M=K;break e}}else if(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&lp(ee)===D.type){a(M,D.sibling),K=c(D,L.props),Us(K,L),K.return=M,M=K;break e}a(M,D);break}else t(M,D);D=D.sibling}L.type===w?(K=Tl(L.props.children,M.mode,K,L.key),K.return=M,M=K):(K=Gr(L.type,L.key,L.props,null,M.mode,K),Us(K,L),K.return=M,M=K)}return v(M);case C:e:{for(ee=L.key;D!==null;){if(D.key===ee)if(D.tag===4&&D.stateNode.containerInfo===L.containerInfo&&D.stateNode.implementation===L.implementation){a(M,D.sibling),K=c(D,L.children||[]),K.return=M,M=K;break e}else{a(M,D);break}else t(M,D);D=D.sibling}K=fc(L,M.mode,K),K.return=M,M=K}return v(M);case Z:return ee=L._init,L=ee(L._payload),Ye(M,D,L,K)}if(Se(L))return me(M,D,L,K);if(be(L)){if(ee=be(L),typeof ee!="function")throw Error(i(150));return L=ee.call(L),fe(M,D,L,K)}if(typeof L.then=="function")return Ye(M,D,co(L),K);if(L.$$typeof===j)return Ye(M,D,Jr(M,L),K);fo(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,D!==null&&D.tag===6?(a(M,D.sibling),K=c(D,L),K.return=M,M=K):(a(M,D),K=cc(L,M.mode,K),K.return=M,M=K),v(M)):a(M,D)}return function(M,D,L,K){try{Ls=0;var ee=Ye(M,D,L,K);return Si=null,ee}catch(le){if(le===_s||le===Wr)throw le;var we=ln(29,le,null,M.mode);return we.lanes=K,we.return=M,we}finally{}}}var wi=ip(!0),sp=ip(!1),jn=$(null),Gn=null;function Xa(e){var t=e.alternate;I(yt,yt.current&1),I(jn,e),Gn===null&&(t===null||vi.current!==null||t.memoizedState!==null)&&(Gn=e)}function rp(e){if(e.tag===22){if(I(yt,yt.current),I(jn,e),Gn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Gn=e)}}else Za()}function Za(){I(yt,yt.current),I(jn,jn.current)}function wa(e){W(jn),Gn===e&&(Gn=null),W(yt)}var yt=$(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Lf(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Vc(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:g({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Kc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=un(),c=Ka(s);c.payload=t,a!=null&&(c.callback=a),t=Fa(e,c,s),t!==null&&(cn(t,e,s),js(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=un(),c=Ka(s);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Fa(e,c,s),t!==null&&(cn(t,e,s),js(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=un(),s=Ka(a);s.tag=2,t!=null&&(s.callback=t),t=Fa(e,s,a),t!==null&&(cn(t,e,a),js(t,e,a))}};function op(e,t,a,s,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,v):t.prototype&&t.prototype.isPureReactComponent?!vs(a,s)||!vs(c,f):!0}function up(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Kc.enqueueReplaceState(t,t.state,null)}function kl(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=g({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}var mo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function cp(e){mo(e)}function fp(e){console.error(e)}function dp(e){mo(e)}function po(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function hp(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Fc(e,t,a){return a=Ka(a),a.tag=3,a.payload={element:null},a.callback=function(){po(e,t)},a}function mp(e){return e=Ka(e),e.tag=3,e}function pp(e,t,a,s){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=s.value;e.payload=function(){return c(f)},e.callback=function(){hp(t,a,s)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){hp(t,a,s),typeof c!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function cb(e,t,a,s,c){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&ws(t,a,c,!0),a=jn.current,a!==null){switch(a.tag){case 13:return Gn===null?vf():a.alternate===null&&at===0&&(at=3),a.flags&=-257,a.flags|=65536,a.lanes=c,s===Sc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),bf(e,s,c)),!1;case 22:return a.flags|=65536,s===Sc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),bf(e,s,c)),!1}throw Error(i(435,a.tag))}return bf(e,s,c),vf(),!1}if(Le)return t=jn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,s!==mc&&(e=Error(i(422),{cause:s}),Ss(En(e,a)))):(s!==mc&&(t=Error(i(423),{cause:s}),Ss(En(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,s=En(s,a),c=Fc(e.stateNode,s,c),Cc(e,c),at!==4&&(at=2)),!1;var f=Error(i(520),{cause:s});if(f=En(f,a),$s===null?$s=[f]:$s.push(f),at!==4&&(at=2),t===null)return!0;s=En(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Fc(a.stateNode,s,e),Cc(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(tl===null||!tl.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=mp(c),pp(c,e,a,s),Cc(a,c),!1}a=a.return}while(a!==null);return!1}var yp=Error(i(461)),gt=!1;function wt(e,t,a,s){t.child=e===null?sp(t,null,a,s):wi(t,e.child,a,s)}function vp(e,t,a,s,c){a=a.render;var f=t.ref;if("ref"in s){var v={};for(var S in s)S!=="ref"&&(v[S]=s[S])}else v=s;return Ul(t),s=Tc(e,t,a,v,f,c),S=Oc(),e!==null&&!gt?(Rc(e,t,c),Ea(e,t,c)):(Le&&S&&dc(t),t.flags|=1,wt(e,t,s,c),t.child)}function gp(e,t,a,s,c){if(e===null){var f=a.type;return typeof f=="function"&&!uc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,bp(e,t,f,s,c)):(e=Gr(a.type,null,s,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!ef(e,c)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:vs,a(v,s)&&e.ref===t.ref)return Ea(e,t,c)}return t.flags|=1,e=ya(f,s),e.ref=t.ref,e.return=t,t.child=e}function bp(e,t,a,s,c){if(e!==null){var f=e.memoizedProps;if(vs(f,s)&&e.ref===t.ref)if(gt=!1,t.pendingProps=s=f,ef(e,c))(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,Ea(e,t,c)}return Gc(e,t,a,s,c)}function xp(e,t,a){var s=t.pendingProps,c=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"){if((t.flags&128)!==0){if(s=f!==null?f.baseLanes|a:a,e!==null){for(c=t.child=e.child,f=0;c!==null;)f=f|c.lanes|c.childLanes,c=c.sibling;t.childLanes=f&~s}else t.childLanes=0,t.child=null;return Sp(e,t,s,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ir(t,f!==null?f.cachePool:null),f!==null?bm(t,f):Nc(),rp(t);else return t.lanes=t.childLanes=536870912,Sp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(Ir(t,f.cachePool),bm(t,f),Za(),t.memoizedState=null):(e!==null&&Ir(t,null),Nc(),Za());return wt(e,t,c,a),t.child}function Sp(e,t,a,s){var c=xc();return c=c===null?null:{parent:pt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Ir(t,null),Nc(),rp(t),e!==null&&ws(e,t,s,!0),null}function yo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Gc(e,t,a,s,c){return Ul(t),a=Tc(e,t,a,s,void 0,c),s=Oc(),e!==null&&!gt?(Rc(e,t,c),Ea(e,t,c)):(Le&&s&&dc(t),t.flags|=1,wt(e,t,a,c),t.child)}function wp(e,t,a,s,c,f){return Ul(t),t.updateQueue=null,a=Sm(t,s,a,c),xm(e),s=Oc(),e!==null&&!gt?(Rc(e,t,f),Ea(e,t,f)):(Le&&s&&dc(t),t.flags|=1,wt(e,t,a,f),t.child)}function Ep(e,t,a,s,c){if(Ul(t),t.stateNode===null){var f=di,v=a.contextType;typeof v=="object"&&v!==null&&(f=Dt(v)),f=new a(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Kc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},wc(t),v=a.contextType,f.context=typeof v=="object"&&v!==null?Dt(v):di,f.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Vc(t,a,v,s),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Kc.enqueueReplaceState(f,f.state,null),Ts(t,s,f,c),As(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,T=kl(a,S);f.props=T;var U=f.context,Y=a.contextType;v=di,typeof Y=="object"&&Y!==null&&(v=Dt(Y));var F=a.getDerivedStateFromProps;Y=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||U!==v)&&up(t,f,s,v),Va=!1;var z=t.memoizedState;f.state=z,Ts(t,s,f,c),As(),U=t.memoizedState,S||z!==U||Va?(typeof F=="function"&&(Vc(t,a,F,s),U=t.memoizedState),(T=Va||op(t,a,T,s,z,U,v))?(Y||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=U),f.props=s,f.state=U,f.context=v,s=T):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,Ec(e,t),v=t.memoizedProps,Y=kl(a,v),f.props=Y,F=t.pendingProps,z=f.context,U=a.contextType,T=di,typeof U=="object"&&U!==null&&(T=Dt(U)),S=a.getDerivedStateFromProps,(U=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==F||z!==T)&&up(t,f,s,T),Va=!1,z=t.memoizedState,f.state=z,Ts(t,s,f,c),As();var q=t.memoizedState;v!==F||z!==q||Va||e!==null&&e.dependencies!==null&&Pr(e.dependencies)?(typeof S=="function"&&(Vc(t,a,S,s),q=t.memoizedState),(Y=Va||op(t,a,Y,s,z,q,T)||e!==null&&e.dependencies!==null&&Pr(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,q,T),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,q,T)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=q),f.props=s,f.state=q,f.context=T,s=Y):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,yo(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=wi(t,e.child,null,c),t.child=wi(t,null,a,c)):wt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=Ea(e,t,c),e}function Cp(e,t,a,s){return xs(),t.flags|=256,wt(e,t,a,s),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zc(e){return{baseLanes:e,cachePool:fm()}}function Pc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=An),e}function _p(e,t,a){var s=t.pendingProps,c=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(c?Xa(t):Za(),Le){var S=nt,T;if(T=S){e:{for(T=S,S=Fn;T.nodeType!==8;){if(!S){S=null;break e}if(T=zn(T.nextSibling),T===null){S=null;break e}}S=T}S!==null?(t.memoizedState={dehydrated:S,treeContext:Ol!==null?{id:va,overflow:ga}:null,retryLane:536870912,hydrationErrors:null},T=ln(18,null,null,0),T.stateNode=S,T.return=t,t.child=T,Qt=t,nt=null,T=!0):T=!1}T||Ml(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Lf(S)?t.lanes=32:t.lanes=536870912,null;wa(t)}return S=s.children,s=s.fallback,c?(Za(),c=t.mode,S=vo({mode:"hidden",children:S},c),s=Tl(s,c,a,null),S.return=t,s.return=t,S.sibling=s,t.child=S,c=t.child,c.memoizedState=Zc(a),c.childLanes=Pc(e,v,a),t.memoizedState=Xc,s):(Xa(t),Jc(t,S))}if(T=e.memoizedState,T!==null&&(S=T.dehydrated,S!==null)){if(f)t.flags&256?(Xa(t),t.flags&=-257,t=Ic(e,t,a)):t.memoizedState!==null?(Za(),t.child=e.child,t.flags|=128,t=null):(Za(),c=s.fallback,S=t.mode,s=vo({mode:"visible",children:s.children},S),c=Tl(c,S,a,null),c.flags|=2,s.return=t,c.return=t,s.sibling=c,t.child=s,wi(t,e.child,null,a),s=t.child,s.memoizedState=Zc(a),s.childLanes=Pc(e,v,a),t.memoizedState=Xc,t=c);else if(Xa(t),Lf(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var U=v.dgst;v=U,s=Error(i(419)),s.stack="",s.digest=v,Ss({value:s,source:null,stack:null}),t=Ic(e,t,a)}else if(gt||ws(e,t,a,!1),v=(a&e.childLanes)!==0,gt||v){if(v=Xe,v!==null&&(s=a&-a,s=(s&42)!==0?1:Tt(s),s=(s&(v.suspendedLanes|a))!==0?0:s,s!==0&&s!==T.retryLane))throw T.retryLane=s,fi(e,s),cn(v,e,s),yp;S.data==="$?"||vf(),t=Ic(e,t,a)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,nt=zn(S.nextSibling),Qt=t,Le=!0,Dl=null,Fn=!1,e!==null&&(_n[Nn++]=va,_n[Nn++]=ga,_n[Nn++]=Ol,va=e.id,ga=e.overflow,Ol=t),t=Jc(t,s.children),t.flags|=4096);return t}return c?(Za(),c=s.fallback,S=t.mode,T=e.child,U=T.sibling,s=ya(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,U!==null?c=ya(U,c):(c=Tl(c,S,a,null),c.flags|=2),c.return=t,s.return=t,s.sibling=c,t.child=s,s=c,c=t.child,S=e.child.memoizedState,S===null?S=Zc(a):(T=S.cachePool,T!==null?(U=pt._currentValue,T=T.parent!==U?{parent:U,pool:U}:T):T=fm(),S={baseLanes:S.baseLanes|a,cachePool:T}),c.memoizedState=S,c.childLanes=Pc(e,v,a),t.memoizedState=Xc,s):(Xa(t),a=e.child,e=a.sibling,a=ya(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=a,t.memoizedState=null,a)}function Jc(e,t){return t=vo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vo(e,t){return e=ln(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Ic(e,t,a){return wi(t,e.child,null,a),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Np(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),yc(e.return,t,a)}function Wc(e,t,a,s,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=s,f.tail=a,f.tailMode=c)}function jp(e,t,a){var s=t.pendingProps,c=s.revealOrder,f=s.tail;if(wt(e,t,s.children,a),s=yt.current,(s&2)!==0)s=s&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Np(e,a,t);else if(e.tag===19)Np(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}switch(I(yt,s),c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&ho(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Wc(t,!1,c,a,f);break;case"backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ho(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Wc(t,!0,a,null,f);break;case"together":Wc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),el|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ws(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=ya(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ya(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ef(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pr(e)))}function fb(e,t,a){switch(t.tag){case 3:ze(t,t.stateNode.containerInfo),Ya(t,pt,e.memoizedState.cache),xs();break;case 27:case 5:Qn(t);break;case 4:ze(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Xa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?_p(e,t,a):(Xa(t),e=Ea(e,t,a),e!==null?e.sibling:null);Xa(t);break;case 19:var c=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(ws(e,t,a,!1),s=(a&t.childLanes)!==0),c){if(s)return jp(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),I(yt,yt.current),s)break;return null;case 22:case 23:return t.lanes=0,xp(e,t,a);case 24:Ya(t,pt,e.memoizedState.cache)}return Ea(e,t,a)}function Ap(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)gt=!0;else{if(!ef(e,a)&&(t.flags&128)===0)return gt=!1,fb(e,t,a);gt=(e.flags&131072)!==0}else gt=!1,Le&&(t.flags&1048576)!==0&&lm(t,Zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var s=t.elementType,c=s._init;if(s=c(s._payload),t.type=s,typeof s=="function")uc(s)?(e=kl(s,e),t.tag=1,t=Ep(null,t,s,e,a)):(t.tag=0,t=Gc(null,t,s,e,a));else{if(s!=null){if(c=s.$$typeof,c===B){t.tag=11,t=vp(null,t,s,e,a);break e}else if(c===G){t.tag=14,t=gp(null,t,s,e,a);break e}}throw t=ye(s)||s,Error(i(306,t,""))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,c=kl(s,t.pendingProps),Ep(e,t,s,c,a);case 3:e:{if(ze(t,t.stateNode.containerInfo),e===null)throw Error(i(387));s=t.pendingProps;var f=t.memoizedState;c=f.element,Ec(e,t),Ts(t,s,null,a);var v=t.memoizedState;if(s=v.cache,Ya(t,pt,s),s!==f.cache&&vc(t,[pt],a,!0),As(),s=v.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Cp(e,t,s,a);break e}else if(s!==c){c=En(Error(i(424)),t),Ss(c),t=Cp(e,t,s,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=zn(e.firstChild),Qt=t,Le=!0,Dl=null,Fn=!0,a=sp(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(xs(),s===c){t=Ea(e,t,a);break e}wt(e,t,s,a)}t=t.child}return t;case 26:return yo(e,t),e===null?(a=D0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Le||(a=t.type,e=t.pendingProps,s=Ro(ce.current).createElement(a),s[P]=t,s[ne]=e,Ct(s,a,e),ot(s),t.stateNode=s):t.memoizedState=D0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qn(t),e===null&&Le&&(s=t.stateNode=T0(t.type,t.pendingProps,ce.current),Qt=t,Fn=!0,c=nt,ll(t.type)?(Uf=c,nt=zn(s.firstChild)):nt=c),wt(e,t,t.pendingProps.children,a),yo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((c=s=nt)&&(s=Bb(s,t.type,t.pendingProps,Fn),s!==null?(t.stateNode=s,Qt=t,nt=zn(s.firstChild),Fn=!1,c=!0):c=!1),c||Ml(t)),Qn(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,s=f.children,Rf(c,f)?s=null:v!==null&&Rf(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=Tc(e,t,ab,null,null,a),Js._currentValue=c),yo(e,t),wt(e,t,s,a),t.child;case 6:return e===null&&Le&&((e=a=nt)&&(a=Hb(a,t.pendingProps,Fn),a!==null?(t.stateNode=a,Qt=t,nt=null,e=!0):e=!1),e||Ml(t)),null;case 13:return _p(e,t,a);case 4:return ze(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=wi(t,null,s,a):wt(e,t,s,a),t.child;case 11:return vp(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,Ya(t,t.type,s.value),wt(e,t,s.children,a),t.child;case 9:return c=t.type._context,s=t.pendingProps.children,Ul(t),c=Dt(c),s=s(c),t.flags|=1,wt(e,t,s,a),t.child;case 14:return gp(e,t,t.type,t.pendingProps,a);case 15:return bp(e,t,t.type,t.pendingProps,a);case 19:return jp(e,t,a);case 31:return s=t.pendingProps,a=t.mode,s={mode:s.mode,children:s.children},e===null?(a=vo(s,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ya(e.child,s),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return xp(e,t,a);case 24:return Ul(t),s=Dt(pt),e===null?(c=xc(),c===null&&(c=Xe,f=gc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:s,cache:c},wc(t),Ya(t,pt,c)):((e.lanes&a)!==0&&(Ec(e,t),Ts(t,null,null,a),As()),c=e.memoizedState,f=t.memoizedState,c.parent!==s?(c={parent:s,cache:s},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ya(t,pt,s)):(s=f.cache,Ya(t,pt,s),s!==c.cache&&vc(t,[pt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ca(e){e.flags|=4}function Tp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!q0(t)){if(t=jn.current,t!==null&&((Ae&4194048)===Ae?Gn!==null:(Ae&62914560)!==Ae&&(Ae&536870912)===0||t!==Gn))throw Ns=Sc,dm;e.flags|=8192}}function go(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?da():536870912,e.lanes|=t,Ni|=t)}function zs(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags&65011712,s|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function db(e,t,a){var s=t.pendingProps;switch(hc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),xa(pt),Ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(bs(t)?Ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rm())),We(t),null;case 26:return a=t.memoizedState,e===null?(Ca(t),a!==null?(We(t),Tp(t,a)):(We(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Ca(t),We(t),Tp(t,a)):(We(t),t.flags&=-16777217):(e.memoizedProps!==s&&Ca(t),We(t),t.flags&=-16777217),null;case 27:jt(t),a=ce.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(!s){if(t.stateNode===null)throw Error(i(166));return We(t),null}e=se.current,bs(t)?im(t):(e=T0(c,s,a),t.stateNode=e,Ca(t))}return We(t),null;case 5:if(jt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(!s){if(t.stateNode===null)throw Error(i(166));return We(t),null}if(e=se.current,bs(t))im(t);else{switch(c=Ro(ce.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof s.is=="string"?c.createElement("select",{is:s.is}):c.createElement("select"),s.multiple?e.multiple=!0:s.size&&(e.size=s.size);break;default:e=typeof s.is=="string"?c.createElement(a,{is:s.is}):c.createElement(a)}}e[P]=t,e[ne]=s;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(Ct(e,a,s),a){case"button":case"input":case"select":case"textarea":e=!!s.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ca(t)}}return We(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(i(166));if(e=ce.current,bs(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,c=Qt,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[P]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||w0(e.nodeValue,a)),e||Ml(t)}else e=Ro(e).createTextNode(s),e[P]=t,t.stateNode=e}return We(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[P]=t}else xs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),c=!1}else c=rm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(wa(t),t):(wa(t),null)}if(wa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=s!==null,e=e!==null&&e.memoizedState!==null,a){s=t.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool);var f=null;s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==c&&(s.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),go(t,t.updateQueue),We(t),null;case 4:return Ze(),e===null&&Nf(t.stateNode.containerInfo),We(t),null;case 10:return xa(t.type),We(t),null;case 19:if(W(yt),c=t.memoizedState,c===null)return We(t),null;if(s=(t.flags&128)!==0,f=c.rendering,f===null)if(s)zs(c,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=ho(e),f!==null){for(t.flags|=128,zs(c,!1),e=f.updateQueue,t.updateQueue=e,go(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)am(a,e),a=a.sibling;return I(yt,yt.current&1|2),t.child}e=e.sibling}c.tail!==null&&Bt()>So&&(t.flags|=128,s=!0,zs(c,!1),t.lanes=4194304)}else{if(!s)if(e=ho(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,go(t,e),zs(c,!0),c.tail===null&&c.tailMode==="hidden"&&!f.alternate&&!Le)return We(t),null}else 2*Bt()-c.renderingStartTime>So&&a!==536870912&&(t.flags|=128,s=!0,zs(c,!1),t.lanes=4194304);c.isBackwards?(f.sibling=t.child,t.child=f):(e=c.last,e!==null?e.sibling=f:t.child=f,c.last=f)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Bt(),t.sibling=null,e=yt.current,I(yt,s?e&1|2:e&1),t):(We(t),null);case 22:case 23:return wa(t),jc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),a=t.updateQueue,a!==null&&go(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&W(zl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xa(pt),We(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function hb(e,t){switch(hc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(pt),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return jt(t),null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));xs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(yt),null;case 4:return Ze(),null;case 10:return xa(t.type),null;case 22:case 23:return wa(t),jc(),e!==null&&W(zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(pt),null;case 25:return null;default:return null}}function Op(e,t){switch(hc(t),t.tag){case 3:xa(pt),Ze();break;case 26:case 27:case 5:jt(t);break;case 4:Ze();break;case 13:wa(t);break;case 19:W(yt);break;case 10:xa(t.type);break;case 22:case 23:wa(t),jc(),e!==null&&W(zl);break;case 24:xa(pt)}}function qs(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){s=void 0;var f=a.create,v=a.inst;s=f(),v.destroy=s}a=a.next}while(a!==c)}}catch(S){Ve(t,t.return,S)}}function Pa(e,t,a){try{var s=t.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var f=c.next;s=f;do{if((s.tag&e)===e){var v=s.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,c=t;var T=a,U=S;try{U()}catch(Y){Ve(c,T,Y)}}}s=s.next}while(s!==f)}}catch(Y){Ve(t,t.return,Y)}}function Rp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{gm(t,a)}catch(s){Ve(e,e.return,s)}}}function Dp(e,t,a){a.props=kl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Ve(e,t,s)}}function ks(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(c){Ve(e,t,c)}}function Xn(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(c){Ve(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ve(e,t,c)}else a.current=null}function Mp(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(c){Ve(e,e.return,c)}}function tf(e,t,a){try{var s=e.stateNode;Lb(s,e.type,a,t),s[ne]=t}catch(c){Ve(e,e.return,c)}}function Lp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ll(e.type)||e.tag===4}function nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function af(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Oo));else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(af(e,t,a),e=e.sibling;e!==null;)af(e,t,a),e=e.sibling}function bo(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(bo(e,t,a),e=e.sibling;e!==null;)bo(e,t,a),e=e.sibling}function Up(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ct(t,s,a),t[P]=e,t[ne]=a}catch(f){Ve(e,e.return,f)}}var _a=!1,ct=!1,lf=!1,zp=typeof WeakSet=="function"?WeakSet:Set,bt=null;function mb(e,t){if(e=e.containerInfo,Tf=qo,e=Gh(e),nc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var c=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,S=-1,T=-1,U=0,Y=0,F=e,z=null;t:for(;;){for(var q;F!==a||c!==0&&F.nodeType!==3||(S=v+c),F!==f||s!==0&&F.nodeType!==3||(T=v+s),F.nodeType===3&&(v+=F.nodeValue.length),(q=F.firstChild)!==null;)z=F,F=q;for(;;){if(F===e)break t;if(z===a&&++U===c&&(S=v),z===f&&++Y===s&&(T=v),(q=F.nextSibling)!==null)break;F=z,z=F.parentNode}F=q}a=S===-1||T===-1?null:{start:S,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(Of={focusedElem:e,selectionRange:a},qo=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,f=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,s=a.stateNode;try{var me=kl(a.type,c,a.elementType===a.type);e=s.getSnapshotBeforeUpdate(me,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Ve(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function qp(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),s&4&&qs(5,a);break;case 1:if(Ja(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){Ve(a,a.return,v)}else{var c=kl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ve(a,a.return,v)}}s&64&&Rp(a),s&512&&ks(a,a.return);break;case 3:if(Ja(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{gm(e,t)}catch(v){Ve(a,a.return,v)}}break;case 27:t===null&&s&4&&Up(a);case 26:case 5:Ja(e,a),t===null&&s&4&&Mp(a),s&512&&ks(a,a.return);break;case 12:Ja(e,a);break;case 13:Ja(e,a),s&4&&Hp(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Eb.bind(null,a),Qb(e,a))));break;case 22:if(s=a.memoizedState!==null||_a,!s){t=t!==null&&t.memoizedState!==null||ct,c=_a;var f=ct;_a=s,(ct=t)&&!f?Ia(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),_a=c,ct=f}break;case 30:break;default:Ja(e,a)}}function kp(e){var t=e.alternate;t!==null&&(e.alternate=null,kp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Rt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pe=null,Gt=!1;function Na(e,t,a){for(a=a.child;a!==null;)Bp(e,t,a),a=a.sibling}function Bp(e,t,a){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(yn,a)}catch{}switch(a.tag){case 26:ct||Xn(a,t),Na(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||Xn(a,t);var s=Pe,c=Gt;ll(a.type)&&(Pe=a.stateNode,Gt=!1),Na(e,t,a),Gs(a.stateNode),Pe=s,Gt=c;break;case 5:ct||Xn(a,t);case 6:if(s=Pe,c=Gt,Pe=null,Na(e,t,a),Pe=s,Gt=c,Pe!==null)if(Gt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(a.stateNode)}catch(f){Ve(a,t,f)}else try{Pe.removeChild(a.stateNode)}catch(f){Ve(a,t,f)}break;case 18:Pe!==null&&(Gt?(e=Pe,j0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),tr(e)):j0(Pe,a.stateNode));break;case 4:s=Pe,c=Gt,Pe=a.stateNode.containerInfo,Gt=!0,Na(e,t,a),Pe=s,Gt=c;break;case 0:case 11:case 14:case 15:ct||Pa(2,a,t),ct||Pa(4,a,t),Na(e,t,a);break;case 1:ct||(Xn(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Dp(a,t,s)),Na(e,t,a);break;case 21:Na(e,t,a);break;case 22:ct=(s=ct)||a.memoizedState!==null,Na(e,t,a),ct=s;break;default:Na(e,t,a)}}function Hp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{tr(e)}catch(a){Ve(t,t.return,a)}}function pb(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zp),t;default:throw Error(i(435,e.tag))}}function sf(e,t){var a=pb(e);t.forEach(function(s){var c=Cb.bind(null,e,s);a.has(s)||(a.add(s),s.then(c,c))})}function sn(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var c=a[s],f=e,v=t,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(ll(S.type)){Pe=S.stateNode,Gt=!1;break e}break;case 5:Pe=S.stateNode,Gt=!1;break e;case 3:case 4:Pe=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(Pe===null)throw Error(i(160));Bp(f,v,c),Pe=null,Gt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Qp(t,e),t=t.sibling}var Un=null;function Qp(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),rn(e),s&4&&(Pa(3,e,e.return),qs(3,e),Pa(5,e,e.return));break;case 1:sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),s&64&&_a&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var c=Un;if(sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),s&4){var f=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(s){case"title":f=c.getElementsByTagName("title")[0],(!f||f[rt]||f[P]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(s),c.head.insertBefore(f,c.querySelector("head > title"))),Ct(f,s,a),f[P]=e,ot(f),s=f;break e;case"link":var v=U0("link","href",c).get(s+(a.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(S,1);break t}}f=c.createElement(s),Ct(f,s,a),c.head.appendChild(f);break;case"meta":if(v=U0("meta","content",c).get(s+(a.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(S,1);break t}}f=c.createElement(s),Ct(f,s,a),c.head.appendChild(f);break;default:throw Error(i(468,s))}f[P]=e,ot(f),s=f}e.stateNode=s}else z0(c,e.type,e.stateNode);else e.stateNode=L0(c,s,e.memoizedProps);else f!==s?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,s===null?z0(c,e.type,e.stateNode):L0(c,s,e.memoizedProps)):s===null&&e.stateNode!==null&&tf(e,e.memoizedProps,a.memoizedProps)}break;case 27:sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),a!==null&&s&4&&tf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(sn(t,e),rn(e),s&512&&(ct||a===null||Xn(a,a.return)),e.flags&32){c=e.stateNode;try{li(c,"")}catch(q){Ve(e,e.return,q)}}s&4&&e.stateNode!=null&&(c=e.memoizedProps,tf(e,c,a!==null?a.memoizedProps:c)),s&1024&&(lf=!0);break;case 6:if(sn(t,e),rn(e),s&4){if(e.stateNode===null)throw Error(i(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(q){Ve(e,e.return,q)}}break;case 3:if(Lo=null,c=Un,Un=Do(t.containerInfo),sn(t,e),Un=c,rn(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{tr(t.containerInfo)}catch(q){Ve(e,e.return,q)}lf&&(lf=!1,$p(e));break;case 4:s=Un,Un=Do(e.stateNode.containerInfo),sn(t,e),rn(e),Un=s;break;case 12:sn(t,e),rn(e);break;case 13:sn(t,e),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(df=Bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,sf(e,s)));break;case 22:c=e.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,U=_a,Y=ct;if(_a=U||c,ct=Y||T,sn(t,e),ct=Y,_a=U,rn(e),s&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||T||_a||ct||Bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){T=a=t;try{if(f=T.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=T.stateNode;var F=T.memoizedProps.style,z=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(q){Ve(T,T.return,q)}}}else if(t.tag===6){if(a===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(q){Ve(T,T.return,q)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,sf(e,a))));break;case 19:sn(t,e),rn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,sf(e,s)));break;case 30:break;case 21:break;default:sn(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Lp(s)){a=s;break}s=s.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=nf(e);bo(e,f,c);break;case 5:var v=a.stateNode;a.flags&32&&(li(v,""),a.flags&=-33);var S=nf(e);bo(e,S,v);break;case 3:case 4:var T=a.stateNode.containerInfo,U=nf(e);af(e,U,T);break;default:throw Error(i(161))}}catch(Y){Ve(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $p(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$p(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qp(e,t.alternate,t),t=t.sibling}function Bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),Bl(t);break;case 1:Xn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Dp(t,t.return,a),Bl(t);break;case 27:Gs(t.stateNode);case 26:case 5:Xn(t,t.return),Bl(t);break;case 22:t.memoizedState===null&&Bl(t);break;case 30:Bl(t);break;default:Bl(t)}e=e.sibling}}function Ia(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:Ia(c,f,a),qs(4,f);break;case 1:if(Ia(c,f,a),s=f,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(U){Ve(s,s.return,U)}if(s=f,c=s.updateQueue,c!==null){var S=s.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)vm(T[c],S)}catch(U){Ve(s,s.return,U)}}a&&v&64&&Rp(f),ks(f,f.return);break;case 27:Up(f);case 26:case 5:Ia(c,f,a),a&&s===null&&v&4&&Mp(f),ks(f,f.return);break;case 12:Ia(c,f,a);break;case 13:Ia(c,f,a),a&&v&4&&Hp(c,f);break;case 22:f.memoizedState===null&&Ia(c,f,a),ks(f,f.return);break;case 30:break;default:Ia(c,f,a)}t=t.sibling}}function rf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Es(a))}function of(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Es(e))}function Zn(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yp(e,t,a,s),t=t.sibling}function Yp(e,t,a,s){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Zn(e,t,a,s),c&2048&&qs(9,t);break;case 1:Zn(e,t,a,s);break;case 3:Zn(e,t,a,s),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Es(e)));break;case 12:if(c&2048){Zn(e,t,a,s),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Ve(t,t.return,T)}}else Zn(e,t,a,s);break;case 13:Zn(e,t,a,s);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Zn(e,t,a,s):Bs(e,t):f._visibility&2?Zn(e,t,a,s):(f._visibility|=2,Ei(e,t,a,s,(t.subtreeFlags&10256)!==0)),c&2048&&rf(v,t);break;case 24:Zn(e,t,a,s),c&2048&&of(t.alternate,t);break;default:Zn(e,t,a,s)}}function Ei(e,t,a,s,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var f=e,v=t,S=a,T=s,U=v.flags;switch(v.tag){case 0:case 11:case 15:Ei(f,v,S,T,c),qs(8,v);break;case 23:break;case 22:var Y=v.stateNode;v.memoizedState!==null?Y._visibility&2?Ei(f,v,S,T,c):Bs(f,v):(Y._visibility|=2,Ei(f,v,S,T,c)),c&&U&2048&&rf(v.alternate,v);break;case 24:Ei(f,v,S,T,c),c&&U&2048&&of(v.alternate,v);break;default:Ei(f,v,S,T,c)}t=t.sibling}}function Bs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,c=s.flags;switch(s.tag){case 22:Bs(a,s),c&2048&&rf(s.alternate,s);break;case 24:Bs(a,s),c&2048&&of(s.alternate,s);break;default:Bs(a,s)}t=t.sibling}}var Hs=8192;function Ci(e){if(e.subtreeFlags&Hs)for(e=e.child;e!==null;)Vp(e),e=e.sibling}function Vp(e){switch(e.tag){case 26:Ci(e),e.flags&Hs&&e.memoizedState!==null&&ex(Un,e.memoizedState,e.memoizedProps);break;case 5:Ci(e);break;case 3:case 4:var t=Un;Un=Do(e.stateNode.containerInfo),Ci(e),Un=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Hs,Hs=16777216,Ci(e),Hs=t):Ci(e));break;default:Ci(e)}}function Kp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Qs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];bt=s,Gp(s,e)}Kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fp(e),e=e.sibling}function Fp(e){switch(e.tag){case 0:case 11:case 15:Qs(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:Qs(e);break;case 12:Qs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xo(e)):Qs(e);break;default:Qs(e)}}function xo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];bt=s,Gp(s,e)}Kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),xo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,xo(t));break;default:xo(t)}e=e.sibling}}function Gp(e,t){for(;bt!==null;){var a=bt;switch(a.tag){case 0:case 11:case 15:Pa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Es(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,bt=s;else e:for(a=e;bt!==null;){s=bt;var c=s.sibling,f=s.return;if(kp(s),s===a){bt=null;break e}if(c!==null){c.return=f,bt=c;break e}bt=f}}}var yb={getCacheForType:function(e){var t=Dt(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},vb=typeof WeakMap=="function"?WeakMap:Map,qe=0,Xe=null,Ne=null,Ae=0,ke=0,on=null,Wa=!1,_i=!1,uf=!1,ja=0,at=0,el=0,Hl=0,cf=0,An=0,Ni=0,$s=null,Xt=null,ff=!1,df=0,So=1/0,wo=null,tl=null,Et=0,nl=null,ji=null,Ai=0,hf=0,mf=null,Xp=null,Ys=0,pf=null;function un(){if((qe&2)!==0&&Ae!==0)return Ae&-Ae;if(k.T!==null){var e=pi;return e!==0?e:wf()}return _e()}function Zp(){An===0&&(An=(Ae&536870912)===0||Le?Ba():536870912);var e=jn.current;return e!==null&&(e.flags|=32),An}function cn(e,t,a){(e===Xe&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(Ti(e,0),al(e,Ae,An,!1)),gn(e,a),((qe&2)===0||e!==Xe)&&(e===Xe&&((qe&2)===0&&(Hl|=a),at===4&&al(e,Ae,An,!1)),Pn(e))}function Pp(e,t,a){if((qe&6)!==0)throw Error(i(327));var s=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Mn(e,t),c=s?xb(e,t):gf(e,t,!0),f=s;do{if(c===0){_i&&!s&&al(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!gb(a)){c=gf(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var S=e;c=$s;var T=S.current.memoizedState.isDehydrated;if(T&&(Ti(S,v).flags|=256),v=gf(S,v,!1),v!==2){if(uf&&!T){S.errorRecoveryDisabledLanes|=f,Hl|=f,c=4;break e}f=Xt,Xt=c,f!==null&&(Xt===null?Xt=f:Xt.push.apply(Xt,f))}c=v}if(f=!1,c!==2)continue}}if(c===1){Ti(e,0),al(e,t,0,!0);break}e:{switch(s=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:al(s,t,An,!Wa);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=df+300-Bt(),10<c)){if(al(s,t,An,!Wa),fa(s,0,!0)!==0)break e;s.timeoutHandle=_0(Jp.bind(null,s,a,Xt,wo,ff,t,An,Hl,Ni,Wa,f,2,-0,0),c);break e}Jp(s,a,Xt,wo,ff,t,An,Hl,Ni,Wa,f,0,-0,0)}}break}while(!0);Pn(e)}function Jp(e,t,a,s,c,f,v,S,T,U,Y,F,z,q){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(Ps={stylesheets:null,count:0,unsuspend:Wb},Vp(t),F=tx(),F!==null)){e.cancelPendingCommit=F(l0.bind(null,e,t,f,a,s,c,v,S,T,Y,1,z,q)),al(e,f,v,!U);return}l0(e,t,f,a,s,c,v,S,T)}function gb(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var c=a[s],f=c.getSnapshot;c=c.value;try{if(!an(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function al(e,t,a,s){t&=~cf,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var c=t;0<c;){var f=31-it(c),v=1<<f;s[f]=-1,c&=~v}a!==0&&El(e,a,t)}function Eo(){return(qe&6)===0?(Vs(0),!1):!0}function yf(){if(Ne!==null){if(ke===0)var e=Ne.return;else e=Ne,ba=Ll=null,Dc(e),Si=null,Ls=0,e=Ne;for(;e!==null;)Op(e.alternate,e),e=e.return;Ne=null}}function Ti(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,zb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),yf(),Xe=e,Ne=a=ya(e.current,null),Ae=t,ke=0,on=null,Wa=!1,_i=Mn(e,t),uf=!1,Ni=An=cf=Hl=el=at=0,Xt=$s=null,ff=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var c=31-it(s),f=1<<c;t|=e[c],s&=~f}return ja=t,Vr(),a}function Ip(e,t){xe=null,k.H=uo,t===_s||t===Wr?(t=pm(),ke=3):t===dm?(t=pm(),ke=4):ke=t===yp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,on=t,Ne===null&&(at=1,po(e,En(t,e.current)))}function Wp(){var e=k.H;return k.H=uo,e===null?uo:e}function e0(){var e=k.A;return k.A=yb,e}function vf(){at=4,Wa||(Ae&4194048)!==Ae&&jn.current!==null||(_i=!0),(el&134217727)===0&&(Hl&134217727)===0||Xe===null||al(Xe,Ae,An,!1)}function gf(e,t,a){var s=qe;qe|=2;var c=Wp(),f=e0();(Xe!==e||Ae!==t)&&(wo=null,Ti(e,t)),t=!1;var v=at;e:do try{if(ke!==0&&Ne!==null){var S=Ne,T=on;switch(ke){case 8:yf(),v=6;break e;case 3:case 2:case 9:case 6:jn.current===null&&(t=!0);var U=ke;if(ke=0,on=null,Oi(e,S,T,U),a&&_i){v=0;break e}break;default:U=ke,ke=0,on=null,Oi(e,S,T,U)}}bb(),v=at;break}catch(Y){Ip(e,Y)}while(!0);return t&&e.shellSuspendCounter++,ba=Ll=null,qe=s,k.H=c,k.A=f,Ne===null&&(Xe=null,Ae=0,Vr()),v}function bb(){for(;Ne!==null;)t0(Ne)}function xb(e,t){var a=qe;qe|=2;var s=Wp(),c=e0();Xe!==e||Ae!==t?(wo=null,So=Bt()+500,Ti(e,t)):_i=Mn(e,t);e:do try{if(ke!==0&&Ne!==null){t=Ne;var f=on;t:switch(ke){case 1:ke=0,on=null,Oi(e,t,f,1);break;case 2:case 9:if(hm(f)){ke=0,on=null,n0(t);break}t=function(){ke!==2&&ke!==9||Xe!==e||(ke=7),Pn(e)},f.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:hm(f)?(ke=0,on=null,n0(t)):(ke=0,on=null,Oi(e,t,f,7));break;case 5:var v=null;switch(Ne.tag){case 26:v=Ne.memoizedState;case 5:case 27:var S=Ne;if(!v||q0(v)){ke=0,on=null;var T=S.sibling;if(T!==null)Ne=T;else{var U=S.return;U!==null?(Ne=U,Co(U)):Ne=null}break t}}ke=0,on=null,Oi(e,t,f,5);break;case 6:ke=0,on=null,Oi(e,t,f,6);break;case 8:yf(),at=6;break e;default:throw Error(i(462))}}Sb();break}catch(Y){Ip(e,Y)}while(!0);return ba=Ll=null,k.H=s,k.A=c,qe=a,Ne!==null?0:(Xe=null,Ae=0,Vr(),at)}function Sb(){for(;Ne!==null&&!ss();)t0(Ne)}function t0(e){var t=Ap(e.alternate,e,ja);e.memoizedProps=e.pendingProps,t===null?Co(e):Ne=t}function n0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wp(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=wp(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Dc(t);default:Op(a,t),t=Ne=am(t,ja),t=Ap(a,t,ja)}e.memoizedProps=e.pendingProps,t===null?Co(e):Ne=t}function Oi(e,t,a,s){ba=Ll=null,Dc(t),Si=null,Ls=0;var c=t.return;try{if(cb(e,c,t,a,Ae)){at=1,po(e,En(a,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;at=1,po(e,En(a,e.current)),Ne=null;return}t.flags&32768?(Le||s===1?e=!0:_i||(Ae&536870912)!==0?e=!1:(Wa=e=!0,(s===2||s===9||s===3||s===6)&&(s=jn.current,s!==null&&s.tag===13&&(s.flags|=16384))),a0(t,e)):Co(t)}function Co(e){var t=e;do{if((t.flags&32768)!==0){a0(t,Wa);return}e=t.return;var a=db(t.alternate,t,ja);if(a!==null){Ne=a;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);at===0&&(at=5)}function a0(e,t){do{var a=hb(e.alternate,e);if(a!==null){a.flags&=32767,Ne=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=a}while(e!==null);at=6,Ne=null}function l0(e,t,a,s,c,f,v,S,T){e.cancelPendingCommit=null;do _o();while(Et!==0);if((qe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=rc,wl(e,a,f,v,S,T),e===Xe&&(Ne=Xe=null,Ae=0),ji=t,nl=e,Ai=a,hf=f,mf=c,Xp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_b(Yn,function(){return u0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,c=X.p,X.p=2,v=qe,qe|=4;try{mb(e,t,a)}finally{qe=v,X.p=c,k.T=s}}Et=1,i0(),s0(),r0()}}function i0(){if(Et===1){Et=0;var e=nl,t=ji,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null;var s=X.p;X.p=2;var c=qe;qe|=4;try{Qp(t,e);var f=Of,v=Gh(e.containerInfo),S=f.focusedElem,T=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Fh(S.ownerDocument.documentElement,S)){if(T!==null&&nc(S)){var U=T.start,Y=T.end;if(Y===void 0&&(Y=U),"selectionStart"in S)S.selectionStart=U,S.selectionEnd=Math.min(Y,S.value.length);else{var F=S.ownerDocument||document,z=F&&F.defaultView||window;if(z.getSelection){var q=z.getSelection(),me=S.textContent.length,fe=Math.min(T.start,me),Ye=T.end===void 0?fe:Math.min(T.end,me);!q.extend&&fe>Ye&&(v=Ye,Ye=fe,fe=v);var M=Kh(S,fe),D=Kh(S,Ye);if(M&&D&&(q.rangeCount!==1||q.anchorNode!==M.node||q.anchorOffset!==M.offset||q.focusNode!==D.node||q.focusOffset!==D.offset)){var L=F.createRange();L.setStart(M.node,M.offset),q.removeAllRanges(),fe>Ye?(q.addRange(L),q.extend(D.node,D.offset)):(L.setEnd(D.node,D.offset),q.addRange(L))}}}}for(F=[],q=S;q=q.parentNode;)q.nodeType===1&&F.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<F.length;S++){var K=F[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}qo=!!Tf,Of=Tf=null}finally{qe=c,X.p=s,k.T=a}}e.current=t,Et=2}}function s0(){if(Et===2){Et=0;var e=nl,t=ji,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=k.T,k.T=null;var s=X.p;X.p=2;var c=qe;qe|=4;try{qp(e,t.alternate,t)}finally{qe=c,X.p=s,k.T=a}}Et=3}}function r0(){if(Et===4||Et===3){Et=0,kt();var e=nl,t=ji,a=Ai,s=Xp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,ji=nl=null,o0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(tl=null),oe(a),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(yn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,c=X.p,X.p=2,k.T=null;try{for(var f=e.onRecoverableError,v=0;v<s.length;v++){var S=s[v];f(S.value,{componentStack:S.stack})}}finally{k.T=t,X.p=c}}(Ai&3)!==0&&_o(),Pn(e),c=e.pendingLanes,(a&4194090)!==0&&(c&42)!==0?e===pf?Ys++:(Ys=0,pf=e):Ys=0,Vs(0)}}function o0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Es(t)))}function _o(e){return i0(),s0(),r0(),u0()}function u0(){if(Et!==5)return!1;var e=nl,t=hf;hf=0;var a=oe(Ai),s=k.T,c=X.p;try{X.p=32>a?32:a,k.T=null,a=mf,mf=null;var f=nl,v=Ai;if(Et=0,ji=nl=null,Ai=0,(qe&6)!==0)throw Error(i(331));var S=qe;if(qe|=4,Fp(f.current),Yp(f,f.current,v,a),qe=S,Vs(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(yn,f)}catch{}return!0}finally{X.p=c,k.T=s,o0(e,t)}}function c0(e,t,a){t=En(a,t),t=Fc(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(gn(e,2),Pn(e))}function Ve(e,t,a){if(e.tag===3)c0(e,e,a);else for(;t!==null;){if(t.tag===3){c0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(tl===null||!tl.has(s))){e=En(a,e),a=mp(2),s=Fa(t,a,2),s!==null&&(pp(a,s,t,e),gn(s,2),Pn(s));break}}t=t.return}}function bf(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new vb;var c=new Set;s.set(t,c)}else c=s.get(t),c===void 0&&(c=new Set,s.set(t,c));c.has(a)||(uf=!0,c.add(a),e=wb.bind(null,e,t,a),t.then(e,e))}function wb(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(Ae&a)===a&&(at===4||at===3&&(Ae&62914560)===Ae&&300>Bt()-df?(qe&2)===0&&Ti(e,0):cf|=a,Ni===Ae&&(Ni=0)),Pn(e)}function f0(e,t){t===0&&(t=da()),e=fi(e,t),e!==null&&(gn(e,t),Pn(e))}function Eb(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),f0(e,a)}function Cb(e,t){var a=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(i(314))}s!==null&&s.delete(t),f0(e,a)}function _b(e,t){return ua(e,t)}var No=null,Ri=null,xf=!1,jo=!1,Sf=!1,Ql=0;function Pn(e){e!==Ri&&e.next===null&&(Ri===null?No=Ri=e:Ri=Ri.next=e),jo=!0,xf||(xf=!0,jb())}function Vs(e,t){if(!Sf&&jo){Sf=!0;do for(var a=!1,s=No;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var f=0;else{var v=s.suspendedLanes,S=s.pingedLanes;f=(1<<31-it(42|e)+1)-1,f&=c&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,p0(s,f))}else f=Ae,f=fa(s,s===Xe?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||Mn(s,f)||(a=!0,p0(s,f));s=s.next}while(a);Sf=!1}}function Nb(){d0()}function d0(){jo=xf=!1;var e=0;Ql!==0&&(Ub()&&(e=Ql),Ql=0);for(var t=Bt(),a=null,s=No;s!==null;){var c=s.next,f=h0(s,t);f===0?(s.next=null,a===null?No=c:a.next=c,c===null&&(Ri=a)):(a=s,(e!==0||(f&3)!==0)&&(jo=!0)),s=c}Vs(e)}function h0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-it(f),S=1<<v,T=c[v];T===-1?((S&a)===0||(S&s)!==0)&&(c[v]=ka(S,t)):T<=t&&(e.expiredLanes|=S),f&=~S}if(t=Xe,a=Ae,a=fa(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pn(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Mn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&pn(s),oe(a)){case 2:case 8:a=Ge;break;case 32:a=Yn;break;case 268435456:a=Ua;break;default:a=Yn}return s=m0.bind(null,e),a=ua(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&pn(s),e.callbackPriority=2,e.callbackNode=null,2}function m0(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_o()&&e.callbackNode!==a)return null;var s=Ae;return s=fa(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Pp(e,s,t),h0(e,Bt()),e.callbackNode!=null&&e.callbackNode===a?m0.bind(null,e):null)}function p0(e,t){if(_o())return null;Pp(e,t,!0)}function jb(){qb(function(){(qe&6)!==0?ua($n,Nb):d0()})}function wf(){return Ql===0&&(Ql=Ba()),Ql}function y0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:qr(""+e)}function v0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Ab(e,t,a,s,c){if(t==="submit"&&a&&a.stateNode===c){var f=y0((c[ne]||null).action),v=s.submitter;v&&(t=(t=v[ne]||null)?y0(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var S=new Qr("action","action",null,s,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ql!==0){var T=v?v0(c,v):new FormData(c);Qc(a,{pending:!0,data:T,method:c.method,action:f},null,T)}}else typeof f=="function"&&(S.preventDefault(),T=v?v0(c,v):new FormData(c),Qc(a,{pending:!0,data:T,method:c.method,action:f},f,T))},currentTarget:c}]})}}for(var Ef=0;Ef<sc.length;Ef++){var Cf=sc[Ef],Tb=Cf.toLowerCase(),Ob=Cf[0].toUpperCase()+Cf.slice(1);Ln(Tb,"on"+Ob)}Ln(Ph,"onAnimationEnd"),Ln(Jh,"onAnimationIteration"),Ln(Ih,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(Gg,"onTransitionRun"),Ln(Xg,"onTransitionStart"),Ln(Zg,"onTransitionCancel"),Ln(Wh,"onTransitionEnd"),ha("onMouseEnter",["mouseout","mouseover"]),ha("onMouseLeave",["mouseout","mouseover"]),ha("onPointerEnter",["pointerout","pointerover"]),ha("onPointerLeave",["pointerout","pointerover"]),Kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ks="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ks));function g0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],c=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var v=s.length-1;0<=v;v--){var S=s[v],T=S.instance,U=S.currentTarget;if(S=S.listener,T!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=U;try{f(c)}catch(Y){mo(Y)}c.currentTarget=null,f=T}else for(v=0;v<s.length;v++){if(S=s[v],T=S.instance,U=S.currentTarget,S=S.listener,T!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=U;try{f(c)}catch(Y){mo(Y)}c.currentTarget=null,f=T}}}}function je(e,t){var a=t[Ie];a===void 0&&(a=t[Ie]=new Set);var s=e+"__bubble";a.has(s)||(b0(t,e,2,!1),a.add(s))}function _f(e,t,a){var s=0;t&&(s|=4),b0(a,e,s,t)}var Ao="_reactListening"+Math.random().toString(36).slice(2);function Nf(e){if(!e[Ao]){e[Ao]=!0,os.forEach(function(a){a!=="selectionchange"&&(Rb.has(a)||_f(a,!1,e),_f(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ao]||(t[Ao]=!0,_f("selectionchange",!1,t))}}function b0(e,t,a,s){switch(Y0(t)){case 2:var c=lx;break;case 8:c=ix;break;default:c=Hf}a=c.bind(null,t,a,e),c=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),s?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function jf(e,t,a,s,c){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var S=s.stateNode.containerInfo;if(S===c)break;if(v===4)for(v=s.return;v!==null;){var T=v.tag;if((T===3||T===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;S!==null;){if(v=De(S),v===null)return;if(T=v.tag,T===5||T===6||T===26||T===27){s=f=v;continue e}S=S.parentNode}}s=s.return}Nh(function(){var U=f,Y=Ku(a),F=[];e:{var z=em.get(e);if(z!==void 0){var q=Qr,me=e;switch(e){case"keypress":if(Br(a)===0)break e;case"keydown":case"keyup":q=_g;break;case"focusin":me="focus",q=Ju;break;case"focusout":me="blur",q=Ju;break;case"beforeblur":case"afterblur":q=Ju;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Th;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=hg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Ag;break;case Ph:case Jh:case Ih:q=yg;break;case Wh:q=Og;break;case"scroll":case"scrollend":q=fg;break;case"wheel":q=Dg;break;case"copy":case"cut":case"paste":q=gg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Rh;break;case"toggle":case"beforetoggle":q=Lg}var fe=(t&4)!==0,Ye=!fe&&(e==="scroll"||e==="scrollend"),M=fe?z!==null?z+"Capture":null:z;fe=[];for(var D=U,L;D!==null;){var K=D;if(L=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||L===null||M===null||(K=cs(D,M),K!=null&&fe.push(Fs(D,K,L))),Ye)break;D=D.return}0<fe.length&&(z=new q(z,me,null,a,Y),F.push({event:z,listeners:fe}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",z&&a!==Vu&&(me=a.relatedTarget||a.fromElement)&&(De(me)||me[de]))break e;if((q||z)&&(z=Y.window===Y?Y:(z=Y.ownerDocument)?z.defaultView||z.parentWindow:window,q?(me=a.relatedTarget||a.toElement,q=U,me=me?De(me):null,me!==null&&(Ye=u(me),fe=me.tag,me!==Ye||fe!==5&&fe!==27&&fe!==6)&&(me=null)):(q=null,me=U),q!==me)){if(fe=Th,K="onMouseLeave",M="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(fe=Rh,K="onPointerLeave",M="onPointerEnter",D="pointer"),Ye=q==null?z:Cl(q),L=me==null?z:Cl(me),z=new fe(K,D+"leave",q,a,Y),z.target=Ye,z.relatedTarget=L,K=null,De(Y)===U&&(fe=new fe(M,D+"enter",me,a,Y),fe.target=L,fe.relatedTarget=Ye,K=fe),Ye=K,q&&me)t:{for(fe=q,M=me,D=0,L=fe;L;L=Di(L))D++;for(L=0,K=M;K;K=Di(K))L++;for(;0<D-L;)fe=Di(fe),D--;for(;0<L-D;)M=Di(M),L--;for(;D--;){if(fe===M||M!==null&&fe===M.alternate)break t;fe=Di(fe),M=Di(M)}fe=null}else fe=null;q!==null&&x0(F,z,q,fe,!1),me!==null&&Ye!==null&&x0(F,Ye,me,fe,!0)}}e:{if(z=U?Cl(U):window,q=z.nodeName&&z.nodeName.toLowerCase(),q==="select"||q==="input"&&z.type==="file")var ee=Bh;else if(qh(z))if(Hh)ee=Vg;else{ee=$g;var we=Qg}else q=z.nodeName,!q||q.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?U&&Yu(U.elementType)&&(ee=Bh):ee=Yg;if(ee&&(ee=ee(e,U))){kh(F,ee,a,Y);break e}we&&we(e,z,U),e==="focusout"&&U&&z.type==="number"&&U.memoizedProps.value!=null&&$u(z,"number",z.value)}switch(we=U?Cl(U):window,e){case"focusin":(qh(we)||we.contentEditable==="true")&&(oi=we,ac=U,gs=null);break;case"focusout":gs=ac=oi=null;break;case"mousedown":lc=!0;break;case"contextmenu":case"mouseup":case"dragend":lc=!1,Xh(F,a,Y);break;case"selectionchange":if(Fg)break;case"keydown":case"keyup":Xh(F,a,Y)}var le;if(Wu)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else ri?Uh(e,a)&&(he="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(Dh&&a.locale!=="ko"&&(ri||he!=="onCompositionStart"?he==="onCompositionEnd"&&ri&&(le=jh()):($a=Y,Xu="value"in $a?$a.value:$a.textContent,ri=!0)),we=To(U,he),0<we.length&&(he=new Oh(he,e,null,a,Y),F.push({event:he,listeners:we}),le?he.data=le:(le=zh(a),le!==null&&(he.data=le)))),(le=zg?qg(e,a):kg(e,a))&&(he=To(U,"onBeforeInput"),0<he.length&&(we=new Oh("onBeforeInput","beforeinput",null,a,Y),F.push({event:we,listeners:he}),we.data=le)),Ab(F,e,U,a,Y)}g0(F,t)})}function Fs(e,t,a){return{instance:e,listener:t,currentTarget:a}}function To(e,t){for(var a=t+"Capture",s=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=cs(e,a),c!=null&&s.unshift(Fs(e,c,f)),c=cs(e,t),c!=null&&s.push(Fs(e,c,f))),e.tag===3)return s;e=e.return}return[]}function Di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function x0(e,t,a,s,c){for(var f=t._reactName,v=[];a!==null&&a!==s;){var S=a,T=S.alternate,U=S.stateNode;if(S=S.tag,T!==null&&T===s)break;S!==5&&S!==26&&S!==27||U===null||(T=U,c?(U=cs(a,f),U!=null&&v.unshift(Fs(a,U,T))):c||(U=cs(a,f),U!=null&&v.push(Fs(a,U,T)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var Db=/\r\n?/g,Mb=/\u0000|\uFFFD/g;function S0(e){return(typeof e=="string"?e:""+e).replace(Db,`
49
+ `).replace(Mb,"")}function w0(e,t){return t=S0(t),S0(e)===t}function Oo(){}function $e(e,t,a,s,c,f){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||li(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&li(e,""+s);break;case"className":Qa(e,"class",s);break;case"tabIndex":Qa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qa(e,a,s);break;case"style":Ch(e,s,f);break;case"data":if(t!=="object"){Qa(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=qr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&$e(e,t,"name",c.name,c,null),$e(e,t,"formEncType",c.formEncType,c,null),$e(e,t,"formMethod",c.formMethod,c,null),$e(e,t,"formTarget",c.formTarget,c,null)):($e(e,t,"encType",c.encType,c,null),$e(e,t,"method",c.method,c,null),$e(e,t,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=qr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Oo);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=qr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":je("beforetoggle",e),je("toggle",e),ti(e,"popover",s);break;case"xlinkActuate":ma(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ma(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ma(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ma(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ma(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ma(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ma(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ma(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ma(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ti(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ug.get(a)||a,ti(e,a,s))}}function Af(e,t,a,s,c,f){switch(a){case"style":Ch(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof s=="string"?li(e,s):(typeof s=="number"||typeof s=="bigint")&&li(e,""+s);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!us.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[ne]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof s=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,c);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):ti(e,a,s)}}}function Ct(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var s=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:$e(e,t,f,v,a,null)}}c&&$e(e,t,"srcSet",a.srcSet,a,null),s&&$e(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var S=f=v=c=null,T=null,U=null;for(s in a)if(a.hasOwnProperty(s)){var Y=a[s];if(Y!=null)switch(s){case"name":c=Y;break;case"type":v=Y;break;case"checked":T=Y;break;case"defaultChecked":U=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,t));break;default:$e(e,t,s,Y,a,null)}}xh(e,f,S,T,U,v,c,!1),Ur(e);return;case"select":je("invalid",e),s=v=f=null;for(c in a)if(a.hasOwnProperty(c)&&(S=a[c],S!=null))switch(c){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":s=S;default:$e(e,t,c,S,a,null)}t=f,a=v,e.multiple=!!s,t!=null?ai(e,!!s,t,!1):a!=null&&ai(e,!!s,a,!0);return;case"textarea":je("invalid",e),f=c=s=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":s=S;break;case"defaultValue":c=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(i(91));break;default:$e(e,t,v,S,a,null)}wh(e,s,c,f),Ur(e);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(s=a[T],s!=null))switch(T){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:$e(e,t,T,s,a,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(s=0;s<Ks.length;s++)je(Ks[s],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in a)if(a.hasOwnProperty(U)&&(s=a[U],s!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:$e(e,t,U,s,a,null)}return;default:if(Yu(t)){for(Y in a)a.hasOwnProperty(Y)&&(s=a[Y],s!==void 0&&Af(e,t,Y,s,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(s=a[S],s!=null&&$e(e,t,S,s,a,null))}function Lb(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,v=null,S=null,T=null,U=null,Y=null;for(q in a){var F=a[q];if(a.hasOwnProperty(q)&&F!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":T=F;default:s.hasOwnProperty(q)||$e(e,t,q,null,s,F)}}for(var z in s){var q=s[z];if(F=a[z],s.hasOwnProperty(z)&&(q!=null||F!=null))switch(z){case"type":f=q;break;case"name":c=q;break;case"checked":U=q;break;case"defaultChecked":Y=q;break;case"value":v=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(137,t));break;default:q!==F&&$e(e,t,z,q,s,F)}}Qu(e,v,S,T,U,Y,f,c);return;case"select":q=v=S=z=null;for(f in a)if(T=a[f],a.hasOwnProperty(f)&&T!=null)switch(f){case"value":break;case"multiple":q=T;default:s.hasOwnProperty(f)||$e(e,t,f,null,s,T)}for(c in s)if(f=s[c],T=a[c],s.hasOwnProperty(c)&&(f!=null||T!=null))switch(c){case"value":z=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==T&&$e(e,t,c,f,s,T)}t=S,a=v,s=q,z!=null?ai(e,!!a,z,!1):!!s!=!!a&&(t!=null?ai(e,!!a,t,!0):ai(e,!!a,a?[]:"",!1));return;case"textarea":q=z=null;for(S in a)if(c=a[S],a.hasOwnProperty(S)&&c!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(e,t,S,null,s,c)}for(v in s)if(c=s[v],f=a[v],s.hasOwnProperty(v)&&(c!=null||f!=null))switch(v){case"value":z=c;break;case"defaultValue":q=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&$e(e,t,v,c,s,f)}Sh(e,z,q);return;case"option":for(var me in a)if(z=a[me],a.hasOwnProperty(me)&&z!=null&&!s.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:$e(e,t,me,null,s,z)}for(T in s)if(z=s[T],q=a[T],s.hasOwnProperty(T)&&z!==q&&(z!=null||q!=null))switch(T){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:$e(e,t,T,z,s,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var fe in a)z=a[fe],a.hasOwnProperty(fe)&&z!=null&&!s.hasOwnProperty(fe)&&$e(e,t,fe,null,s,z);for(U in s)if(z=s[U],q=a[U],s.hasOwnProperty(U)&&z!==q&&(z!=null||q!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(137,t));break;default:$e(e,t,U,z,s,q)}return;default:if(Yu(t)){for(var Ye in a)z=a[Ye],a.hasOwnProperty(Ye)&&z!==void 0&&!s.hasOwnProperty(Ye)&&Af(e,t,Ye,void 0,s,z);for(Y in s)z=s[Y],q=a[Y],!s.hasOwnProperty(Y)||z===q||z===void 0&&q===void 0||Af(e,t,Y,z,s,q);return}}for(var M in a)z=a[M],a.hasOwnProperty(M)&&z!=null&&!s.hasOwnProperty(M)&&$e(e,t,M,null,s,z);for(F in s)z=s[F],q=a[F],!s.hasOwnProperty(F)||z===q||z==null&&q==null||$e(e,t,F,z,s,q)}var Tf=null,Of=null;function Ro(e){return e.nodeType===9?e:e.ownerDocument}function E0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function C0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Rf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Df=null;function Ub(){var e=window.event;return e&&e.type==="popstate"?e===Df?!1:(Df=e,!0):(Df=null,!1)}var _0=typeof setTimeout=="function"?setTimeout:void 0,zb=typeof clearTimeout=="function"?clearTimeout:void 0,N0=typeof Promise=="function"?Promise:void 0,qb=typeof queueMicrotask=="function"?queueMicrotask:typeof N0<"u"?function(e){return N0.resolve(null).then(e).catch(kb)}:_0;function kb(e){setTimeout(function(){throw e})}function ll(e){return e==="head"}function j0(e,t){var a=t,s=0,c=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(0<s&&8>s){a=s;var v=e.ownerDocument;if(a&1&&Gs(v.documentElement),a&2&&Gs(v.body),a&4)for(a=v.head,Gs(a),v=a.firstChild;v;){var S=v.nextSibling,T=v.nodeName;v[rt]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=S}}if(c===0){e.removeChild(f),tr(t);return}c--}else a==="$"||a==="$?"||a==="$!"?c++:s=a.charCodeAt(0)-48;else s=0;a=f}while(a);tr(t)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Mf(a),Rt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Bb(e,t,a,s){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[rt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function Hb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zn(e.nextSibling),e===null))return null;return e}function Lf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Qb(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function zn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Uf=null;function A0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function T0(e,t,a){switch(t=Ro(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Gs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rt(e)}var Tn=new Map,O0=new Set;function Do(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Aa=X.d;X.d={f:$b,r:Yb,D:Vb,C:Kb,L:Fb,m:Gb,X:Zb,S:Xb,M:Pb};function $b(){var e=Aa.f(),t=Eo();return e||t}function Yb(e){var t=nn(e);t!==null&&t.tag===5&&t.type==="form"?Pm(t):Aa.r(e)}var Mi=typeof document>"u"?null:document;function R0(e,t,a){var s=Mi;if(s&&typeof t=="string"&&t){var c=wn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),O0.has(c)||(O0.add(c),e={rel:e,crossOrigin:a,href:t},s.querySelector(c)===null&&(t=s.createElement("link"),Ct(t,"link",e),ot(t),s.head.appendChild(t)))}}function Vb(e){Aa.D(e),R0("dns-prefetch",e,null)}function Kb(e,t){Aa.C(e,t),R0("preconnect",e,t)}function Fb(e,t,a){Aa.L(e,t,a);var s=Mi;if(s&&e&&t){var c='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+wn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+wn(a.imageSizes)+'"]')):c+='[href="'+wn(e)+'"]';var f=c;switch(t){case"style":f=Li(e);break;case"script":f=Ui(e)}Tn.has(f)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Tn.set(f,e),s.querySelector(c)!==null||t==="style"&&s.querySelector(Xs(f))||t==="script"&&s.querySelector(Zs(f))||(t=s.createElement("link"),Ct(t,"link",e),ot(t),s.head.appendChild(t)))}}function Gb(e,t){Aa.m(e,t);var a=Mi;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+wn(s)+'"][href="'+wn(e)+'"]',f=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ui(e)}if(!Tn.has(f)&&(e=g({rel:"modulepreload",href:e},t),Tn.set(f,e),a.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Zs(f)))return}s=a.createElement("link"),Ct(s,"link",e),ot(s),a.head.appendChild(s)}}}function Xb(e,t,a){Aa.S(e,t,a);var s=Mi;if(s&&e){var c=Ha(s).hoistableStyles,f=Li(e);t=t||"default";var v=c.get(f);if(!v){var S={loading:0,preload:null};if(v=s.querySelector(Xs(f)))S.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Tn.get(f))&&zf(e,a);var T=v=s.createElement("link");ot(T),Ct(T,"link",e),T._p=new Promise(function(U,Y){T.onload=U,T.onerror=Y}),T.addEventListener("load",function(){S.loading|=1}),T.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Mo(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:S},c.set(f,v)}}}function Zb(e,t){Aa.X(e,t);var a=Mi;if(a&&e){var s=Ha(a).hoistableScripts,c=Ui(e),f=s.get(c);f||(f=a.querySelector(Zs(c)),f||(e=g({src:e,async:!0},t),(t=Tn.get(c))&&qf(e,t),f=a.createElement("script"),ot(f),Ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(c,f))}}function Pb(e,t){Aa.M(e,t);var a=Mi;if(a&&e){var s=Ha(a).hoistableScripts,c=Ui(e),f=s.get(c);f||(f=a.querySelector(Zs(c)),f||(e=g({src:e,async:!0,type:"module"},t),(t=Tn.get(c))&&qf(e,t),f=a.createElement("script"),ot(f),Ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(c,f))}}function D0(e,t,a,s){var c=(c=ce.current)?Do(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Li(a.href),a=Ha(c).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Li(a.href);var f=Ha(c).hoistableStyles,v=f.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=c.querySelector(Xs(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Tn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Tn.set(e,a),f||Jb(c,e,a,v.state))),t&&s===null)throw Error(i(528,""));return v}if(t&&s!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(a),a=Ha(c).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Li(e){return'href="'+wn(e)+'"'}function Xs(e){return'link[rel="stylesheet"]['+e+"]"}function M0(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Jb(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Ct(t,"link",a),ot(t),e.head.appendChild(t))}function Ui(e){return'[src="'+wn(e)+'"]'}function Zs(e){return"script[async]"+e}function L0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+wn(a.href)+'"]');if(s)return t.instance=s,ot(s),s;var c=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ot(s),Ct(s,"style",c),Mo(s,a.precedence,e),t.instance=s;case"stylesheet":c=Li(a.href);var f=e.querySelector(Xs(c));if(f)return t.state.loading|=4,t.instance=f,ot(f),f;s=M0(a),(c=Tn.get(c))&&zf(s,c),f=(e.ownerDocument||e).createElement("link"),ot(f);var v=f;return v._p=new Promise(function(S,T){v.onload=S,v.onerror=T}),Ct(f,"link",s),t.state.loading|=4,Mo(f,a.precedence,e),t.instance=f;case"script":return f=Ui(a.src),(c=e.querySelector(Zs(f)))?(t.instance=c,ot(c),c):(s=a,(c=Tn.get(f))&&(s=g({},a),qf(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),ot(c),Ct(c,"link",s),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Mo(s,a.precedence,e));return t.instance}function Mo(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,f=c,v=0;v<s.length;v++){var S=s[v];if(S.dataset.precedence===t)f=S;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Lo=null;function U0(e,t,a){if(Lo===null){var s=new Map,c=Lo=new Map;c.set(a,s)}else c=Lo,s=c.get(a),s||(s=new Map,c.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[rt]||f[P]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var S=s.get(v);S?S.push(f):s.set(v,[f])}}return s}function z0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ib(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function q0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Ps=null;function Wb(){}function ex(e,t,a){if(Ps===null)throw Error(i(475));var s=Ps;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Li(a.href),f=e.querySelector(Xs(c));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(s.count++,s=Uo.bind(s),e.then(s,s)),t.state.loading|=4,t.instance=f,ot(f);return}f=e.ownerDocument||e,a=M0(a),(c=Tn.get(c))&&zf(a,c),f=f.createElement("link"),ot(f);var v=f;v._p=new Promise(function(S,T){v.onload=S,v.onerror=T}),Ct(f,"link",a),t.instance=f}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(s.count++,t=Uo.bind(s),e.addEventListener("load",t),e.addEventListener("error",t))}}function tx(){if(Ps===null)throw Error(i(475));var e=Ps;return e.stylesheets&&e.count===0&&kf(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&kf(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Uo(){if(this.count--,this.count===0){if(this.stylesheets)kf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zo=null;function kf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zo=new Map,t.forEach(nx,e),zo=null,Uo.call(e))}function nx(e,t){if(!(t.state.loading&4)){var a=zo.get(e);if(a)var s=a.get(null);else{a=new Map,zo.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var v=c[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),s=v)}s&&a.set(null,s)}c=t.instance,v=c.getAttribute("data-precedence"),f=a.get(v)||s,f===s&&a.set(null,c),a.set(v,c),this.count++,s=Uo.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Js={$$typeof:j,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function ax(e,t,a,s,c,f,v,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vn(0),this.hiddenUpdates=Vn(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function k0(e,t,a,s,c,f,v,S,T,U,Y,F){return e=new ax(e,t,a,v,S,T,U,F),t=1,f===!0&&(t|=24),f=ln(3,null,null,t),e.current=f,f.stateNode=e,t=gc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:a,cache:t},wc(f),e}function B0(e){return e?(e=di,e):di}function H0(e,t,a,s,c,f){c=B0(c),s.context===null?s.context=c:s.pendingContext=c,s=Ka(t),s.payload={element:a},f=f===void 0?null:f,f!==null&&(s.callback=f),a=Fa(e,s,t),a!==null&&(cn(a,e,t),js(a,e,t))}function Q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Bf(e,t){Q0(e,t),(e=e.alternate)&&Q0(e,t)}function $0(e){if(e.tag===13){var t=fi(e,67108864);t!==null&&cn(t,e,67108864),Bf(e,67108864)}}var qo=!0;function lx(e,t,a,s){var c=k.T;k.T=null;var f=X.p;try{X.p=2,Hf(e,t,a,s)}finally{X.p=f,k.T=c}}function ix(e,t,a,s){var c=k.T;k.T=null;var f=X.p;try{X.p=8,Hf(e,t,a,s)}finally{X.p=f,k.T=c}}function Hf(e,t,a,s){if(qo){var c=Qf(s);if(c===null)jf(e,t,s,ko,a),V0(e,s);else if(rx(c,e,t,a,s))s.stopPropagation();else if(V0(e,s),t&4&&-1<sx.indexOf(e)){for(;c!==null;){var f=nn(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=He(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var T=1<<31-it(v);S.entanglements[1]|=T,v&=~T}Pn(f),(qe&6)===0&&(So=Bt()+500,Vs(0))}}break;case 13:S=fi(f,2),S!==null&&cn(S,f,2),Eo(),Bf(f,2)}if(f=Qf(s),f===null&&jf(e,t,s,ko,a),f===c)break;c=f}c!==null&&s.stopPropagation()}else jf(e,t,s,null,a)}}function Qf(e){return e=Ku(e),$f(e)}var ko=null;function $f(e){if(ko=null,e=De(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ko=e,null}function Y0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ca()){case $n:return 2;case Ge:return 8;case Yn:case xl:return 32;case Ua:return 268435456;default:return 32}default:return 32}}var Yf=!1,il=null,sl=null,rl=null,Is=new Map,Ws=new Map,ol=[],sx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function V0(e,t){switch(e){case"focusin":case"focusout":il=null;break;case"dragenter":case"dragleave":sl=null;break;case"mouseover":case"mouseout":rl=null;break;case"pointerover":case"pointerout":Is.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(t.pointerId)}}function er(e,t,a,s,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:f,targetContainers:[c]},t!==null&&(t=nn(t),t!==null&&$0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function rx(e,t,a,s,c){switch(t){case"focusin":return il=er(il,e,t,a,s,c),!0;case"dragenter":return sl=er(sl,e,t,a,s,c),!0;case"mouseover":return rl=er(rl,e,t,a,s,c),!0;case"pointerover":var f=c.pointerId;return Is.set(f,er(Is.get(f)||null,e,t,a,s,c)),!0;case"gotpointercapture":return f=c.pointerId,Ws.set(f,er(Ws.get(f)||null,e,t,a,s,c)),!0}return!1}function K0(e){var t=De(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Ht(e.priority,function(){if(a.tag===13){var s=un();s=Tt(s);var c=fi(a,s);c!==null&&cn(c,a,s),Bf(a,s)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Qf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Vu=s,a.target.dispatchEvent(s),Vu=null}else return t=nn(a),t!==null&&$0(t),e.blockedOn=a,!1;t.shift()}return!0}function F0(e,t,a){Bo(e)&&a.delete(t)}function ox(){Yf=!1,il!==null&&Bo(il)&&(il=null),sl!==null&&Bo(sl)&&(sl=null),rl!==null&&Bo(rl)&&(rl=null),Is.forEach(F0),Ws.forEach(F0)}function Ho(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ox)))}var Qo=null;function G0(e){Qo!==e&&(Qo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Qo===e&&(Qo=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],c=e[t+2];if(typeof s!="function"){if($f(s||a)===null)continue;break}var f=nn(a);f!==null&&(e.splice(t,3),t-=3,Qc(f,{pending:!0,data:c,method:a.method,action:s},s,c))}}))}function tr(e){function t(T){return Ho(T,e)}il!==null&&Ho(il,e),sl!==null&&Ho(sl,e),rl!==null&&Ho(rl,e),Is.forEach(t),Ws.forEach(t);for(var a=0;a<ol.length;a++){var s=ol[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ol.length&&(a=ol[0],a.blockedOn===null);)K0(a),a.blockedOn===null&&ol.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var c=a[s],f=a[s+1],v=c[ne]||null;if(typeof f=="function")v||G0(a);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[ne]||null)S=v.formAction;else if($f(c)!==null)continue}else S=v.action;typeof S=="function"?a[s+1]=S:(a.splice(s,3),s-=3),G0(a)}}}function Vf(e){this._internalRoot=e}$o.prototype.render=Vf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,s=un();H0(a,s,e,t,null,null)},$o.prototype.unmount=Vf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;H0(e.current,2,null,e,null,null),Eo(),t[de]=null}};function $o(e){this._internalRoot=e}$o.prototype.unstable_scheduleHydration=function(e){if(e){var t=_e();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ol.length&&t!==0&&t<ol[a].priority;a++);ol.splice(a,0,e),a===0&&K0(e)}};var X0=l.version;if(X0!=="19.1.0")throw Error(i(527,X0,"19.1.0"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=y(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var ux={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yo.isDisabled&&Yo.supportsFiber)try{yn=Yo.inject(ux),tt=Yo}catch{}}return ar.createRoot=function(e,t){if(!o(e))throw Error(i(299));var a=!1,s="",c=cp,f=fp,v=dp,S=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(S=t.unstable_transitionCallbacks)),t=k0(e,1,!1,null,null,a,s,c,f,v,S,null),e[de]=t.current,Nf(e),new Vf(t)},ar.hydrateRoot=function(e,t,a){if(!o(e))throw Error(i(299));var s=!1,c="",f=cp,v=fp,S=dp,T=null,U=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(T=a.unstable_transitionCallbacks),a.formState!==void 0&&(U=a.formState)),t=k0(e,1,!0,t,a??null,s,c,f,v,S,T,U),t.context=B0(null),a=t.current,s=un(),s=Tt(s),c=Ka(s),c.callback=null,Fa(a,c,s),a=s,t.current.lanes=a,gn(t,a),Pn(t),e[de]=t.current,Nf(e),new $o(t)},ar.version="19.1.0",ar}var ly;function gx(){if(ly)return Gf.exports;ly=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Gf.exports=vx(),Gf.exports}var bx=gx();const xx=Su(bx);var lr={},iy;function Sx(){if(iy)return lr;iy=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.parse=d,lr.serialize=p;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,l=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,u=(()=>{const E=function(){};return E.prototype=Object.create(null),E})();function d(E,C){const w=new u,O=E.length;if(O<2)return w;const N=(C==null?void 0:C.decode)||g;let _=0;do{const A=E.indexOf("=",_);if(A===-1)break;const j=E.indexOf(";",_),B=j===-1?O:j;if(A>B){_=E.lastIndexOf(";",A-1)+1;continue}const V=m(E,_,A),Q=y(E,A,V),G=E.slice(V,Q);if(w[G]===void 0){let Z=m(E,A+1,B),te=y(E,B,Z);const pe=N(E.slice(Z,te));w[G]=pe}_=B+1}while(_<O);return w}function m(E,C,w){do{const O=E.charCodeAt(C);if(O!==32&&O!==9)return C}while(++C<w);return w}function y(E,C,w){for(;C>w;){const O=E.charCodeAt(--C);if(O!==32&&O!==9)return C+1}return w}function p(E,C,w){const O=(w==null?void 0:w.encode)||encodeURIComponent;if(!n.test(E))throw new TypeError(`argument name is invalid: ${E}`);const N=O(C);if(!l.test(N))throw new TypeError(`argument val is invalid: ${C}`);let _=E+"="+N;if(!w)return _;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);_+="; Max-Age="+w.maxAge}if(w.domain){if(!r.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);_+="; Domain="+w.domain}if(w.path){if(!i.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);_+="; Path="+w.path}if(w.expires){if(!b(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);_+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(_+="; HttpOnly"),w.secure&&(_+="; Secure"),w.partitioned&&(_+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":_+="; Priority=Low";break;case"medium":_+="; Priority=Medium";break;case"high":_+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":_+="; SameSite=Strict";break;case"lax":_+="; SameSite=Lax";break;case"none":_+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return _}function g(E){if(E.indexOf("%")===-1)return E;try{return decodeURIComponent(E)}catch{return E}}function b(E){return o.call(E)==="[object Date]"}return lr}Sx();var sy="popstate";function wx(n={}){function l(i,o){let{pathname:u,search:d,hash:m}=i.location;return hd("",{pathname:u,search:d,hash:m},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(i,o){return typeof o=="string"?o:hr(o)}return Cx(l,r,null,n)}function et(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function qn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Ex(){return Math.random().toString(36).substring(2,10)}function ry(n,l){return{usr:n.state,key:n.key,idx:l}}function hd(n,l,r=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Zi(l):l,state:r,key:l&&l.key||i||Ex()}}function hr({pathname:n="/",search:l="",hash:r=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function Zi(n){let l={};if(n){let r=n.indexOf("#");r>=0&&(l.hash=n.substring(r),n=n.substring(0,r));let i=n.indexOf("?");i>=0&&(l.search=n.substring(i),n=n.substring(0,i)),n&&(l.pathname=n)}return l}function Cx(n,l,r,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,d=o.history,m="POP",y=null,p=g();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function g(){return(d.state||{idx:null}).idx}function b(){m="POP";let N=g(),_=N==null?null:N-p;p=N,y&&y({action:m,location:O.location,delta:_})}function E(N,_){m="PUSH";let A=hd(O.location,N,_);p=g()+1;let j=ry(A,p),B=O.createHref(A);try{d.pushState(j,"",B)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;o.location.assign(B)}u&&y&&y({action:m,location:O.location,delta:1})}function C(N,_){m="REPLACE";let A=hd(O.location,N,_);p=g();let j=ry(A,p),B=O.createHref(A);d.replaceState(j,"",B),u&&y&&y({action:m,location:O.location,delta:0})}function w(N){return _x(N)}let O={get action(){return m},get location(){return n(o,d)},listen(N){if(y)throw new Error("A history only accepts one active listener");return o.addEventListener(sy,b),y=N,()=>{o.removeEventListener(sy,b),y=null}},createHref(N){return l(o,N)},createURL:w,encodeLocation(N){let _=w(N);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:E,replace:C,go(N){return d.go(N)}};return O}function _x(n,l=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),et(r,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:hr(n);return i=i.replace(/ $/,"%20"),!l&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function dv(n,l,r="/"){return Nx(n,l,r,!1)}function Nx(n,l,r,i){let o=typeof l=="string"?Zi(l):l,u=Ma(o.pathname||"/",r);if(u==null)return null;let d=hv(n);jx(d);let m=null;for(let y=0;m==null&&y<d.length;++y){let p=kx(u);m=zx(d[y],p,i)}return m}function hv(n,l=[],r=[],i=""){let o=(u,d,m)=>{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};y.relativePath.startsWith("/")&&(et(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length));let p=Da([i,y.relativePath]),g=r.concat(y);u.children&&u.children.length>0&&(et(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),hv(u.children,l,g,p)),!(u.path==null&&!u.index)&&l.push({path:p,score:Lx(p,u.index),routesMeta:g})};return n.forEach((u,d)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))o(u,d);else for(let y of mv(u.path))o(u,d,y)}),l}function mv(n){let l=n.split("/");if(l.length===0)return[];let[r,...i]=l,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let d=mv(i.join("/")),m=[];return m.push(...d.map(y=>y===""?u:[u,y].join("/"))),o&&m.push(...d),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function jx(n){n.sort((l,r)=>l.score!==r.score?r.score-l.score:Ux(l.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var Ax=/^:[\w-]+$/,Tx=3,Ox=2,Rx=1,Dx=10,Mx=-2,oy=n=>n==="*";function Lx(n,l){let r=n.split("/"),i=r.length;return r.some(oy)&&(i+=Mx),l&&(i+=Ox),r.filter(o=>!oy(o)).reduce((o,u)=>o+(Ax.test(u)?Tx:u===""?Rx:Dx),i)}function Ux(n,l){return n.length===l.length&&n.slice(0,-1).every((i,o)=>i===l[o])?n[n.length-1]-l[l.length-1]:0}function zx(n,l,r=!1){let{routesMeta:i}=n,o={},u="/",d=[];for(let m=0;m<i.length;++m){let y=i[m],p=m===i.length-1,g=u==="/"?l:l.slice(u.length)||"/",b=mr({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},g),E=y.route;if(!b&&p&&r&&!i[i.length-1].route.index&&(b=mr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},g)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:Da([u,b.pathname]),pathnameBase:$x(Da([u,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(u=Da([u,b.pathnameBase]))}return d}function mr(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,i]=qx(n.path,n.caseSensitive,n.end),o=l.match(r);if(!o)return null;let u=o[0],d=u.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:i.reduce((p,{paramName:g,isOptional:b},E)=>{if(g==="*"){let w=m[E]||"";d=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const C=m[E];return b&&!C?p[g]=void 0:p[g]=(C||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:d,pattern:n}}function qx(n,l=!1,r=!0){qn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,y)=>(i.push({paramName:m,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),i]}function kx(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return qn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function Ma(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,i=n.charAt(r);return i&&i!=="/"?null:n.slice(r)||"/"}function Bx(n,l="/"){let{pathname:r,search:i="",hash:o=""}=typeof n=="string"?Zi(n):n;return{pathname:r?r.startsWith("/")?r:Hx(r,l):l,search:Yx(i),hash:Vx(o)}}function Hx(n,l){let r=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Jf(n,l,r,i){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qx(n){return n.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function pv(n){let l=Qx(n);return l.map((r,i)=>i===l.length-1?r.pathname:r.pathnameBase)}function yv(n,l,r,i=!1){let o;typeof n=="string"?o=Zi(n):(o={...n},et(!o.pathname||!o.pathname.includes("?"),Jf("?","pathname","search",o)),et(!o.pathname||!o.pathname.includes("#"),Jf("#","pathname","hash",o)),et(!o.search||!o.search.includes("#"),Jf("#","search","hash",o)));let u=n===""||o.pathname==="",d=u?"/":o.pathname,m;if(d==null)m=r;else{let b=l.length-1;if(!i&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),b-=1;o.pathname=E.join("/")}m=b>=0?l[b]:"/"}let y=Bx(o,m),p=d&&d!=="/"&&d.endsWith("/"),g=(u||d===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||g)&&(y.pathname+="/"),y}var Da=n=>n.join("/").replace(/\/\/+/g,"/"),$x=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Yx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Vx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Kx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var vv=["POST","PUT","PATCH","DELETE"];new Set(vv);var Fx=["GET",...vv];new Set(Fx);var Pi=x.createContext(null);Pi.displayName="DataRouter";var wu=x.createContext(null);wu.displayName="DataRouterState";var gv=x.createContext({isTransitioning:!1});gv.displayName="ViewTransition";var Gx=x.createContext(new Map);Gx.displayName="Fetchers";var Xx=x.createContext(null);Xx.displayName="Await";var na=x.createContext(null);na.displayName="Navigation";var vr=x.createContext(null);vr.displayName="Location";var aa=x.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var zd=x.createContext(null);zd.displayName="RouteError";function Zx(n,{relative:l}={}){et(gr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=x.useContext(na),{hash:o,pathname:u,search:d}=br(n,{relative:l}),m=u;return r!=="/"&&(m=u==="/"?r:Da([r,u])),i.createHref({pathname:m,search:d,hash:o})}function gr(){return x.useContext(vr)!=null}function Yt(){return et(gr(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(vr).location}var bv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xv(n){x.useContext(na).static||x.useLayoutEffect(n)}function qt(){let{isDataRoute:n}=x.useContext(aa);return n?u2():Px()}function Px(){et(gr(),"useNavigate() may be used only in the context of a <Router> component.");let n=x.useContext(Pi),{basename:l,navigator:r}=x.useContext(na),{matches:i}=x.useContext(aa),{pathname:o}=Yt(),u=JSON.stringify(pv(i)),d=x.useRef(!1);return xv(()=>{d.current=!0}),x.useCallback((y,p={})=>{if(qn(d.current,bv),!d.current)return;if(typeof y=="number"){r.go(y);return}let g=yv(y,JSON.parse(u),o,p.relative==="path");n==null&&l!=="/"&&(g.pathname=g.pathname==="/"?l:Da([l,g.pathname])),(p.replace?r.replace:r.push)(g,p.state,p)},[l,r,u,o,n])}x.createContext(null);function Jx(){let{matches:n}=x.useContext(aa),l=n[n.length-1];return l?l.params:{}}function br(n,{relative:l}={}){let{matches:r}=x.useContext(aa),{pathname:i}=Yt(),o=JSON.stringify(pv(r));return x.useMemo(()=>yv(n,JSON.parse(o),i,l==="path"),[n,o,i,l])}function Ix(n,l){return Sv(n,l)}function Sv(n,l,r,i){var A;et(gr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:u}=x.useContext(na),{matches:d}=x.useContext(aa),m=d[d.length-1],y=m?m.params:{},p=m?m.pathname:"/",g=m?m.pathnameBase:"/",b=m&&m.route;{let j=b&&b.path||"";wv(p,!b||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
50
 
51
- Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let E=Yt(),C;if(l){let j=typeof l=="string"?Zi(l):l;et(g==="/"||((A=j.pathname)==null?void 0:A.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${j.pathname}" was given in the \`location\` prop.`),C=j}else C=E;let w=C.pathname||"/",O=w;if(g!=="/"){let j=g.replace(/^\//,"").split("/");O="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let N=!u&&r&&r.matches&&r.matches.length>0?r.matches:dv(n,{pathname:O});zn(b||N!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),zn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${C.pathname}${C.search}${C.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=a2(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},y,j.params),pathname:Da([g,o.encodeLocation?o.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:Da([g,o.encodeLocation?o.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),d,r,i);return l&&_?x.createElement(vr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},_):_}function Wx(){let n=o2(),l=Kx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:u},"ErrorBoundary")," or"," ",x.createElement("code",{style:u},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},l),r?x.createElement("pre",{style:o},r):null,d)}var e2=x.createElement(Wx,null),t2=class extends x.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){console.error("React Router caught the following error during render",n,l)}render(){return this.state.error!==void 0?x.createElement(aa.Provider,{value:this.props.routeContext},x.createElement(qd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function n2({routeContext:n,match:l,children:r}){let i=x.useContext(Pi);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),x.createElement(aa.Provider,{value:n},r)}function a2(n,l=[],r=null,i=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(l.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let o=n,u=r==null?void 0:r.errors;if(u!=null){let y=o.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);et(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let d=!1,m=-1;if(r)for(let y=0;y<o.length;y++){let p=o[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(m=y),p.route.id){let{loaderData:g,errors:b}=r,E=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!b||b[p.route.id]===void 0);if(p.route.lazy||E){d=!0,m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}return o.reduceRight((y,p,g)=>{let b,E=!1,C=null,w=null;r&&(b=u&&p.route.id?u[p.route.id]:void 0,C=p.route.errorElement||e2,d&&(m<0&&g===0?(wv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,w=null):m===g&&(E=!0,w=p.route.hydrateFallbackElement||null)));let O=l.concat(o.slice(0,g+1)),N=()=>{let _;return b?_=C:E?_=w:p.route.Component?_=x.createElement(p.route.Component,null):p.route.element?_=p.route.element:_=y,x.createElement(n2,{match:p,routeContext:{outlet:y,matches:O,isDataRoute:r!=null},children:_})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?x.createElement(t2,{location:r.location,revalidation:r.revalidation,component:C,error:b,children:N(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):N()},null)}function zd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l2(n){let l=x.useContext(Pi);return et(l,zd(n)),l}function i2(n){let l=x.useContext(wu);return et(l,zd(n)),l}function s2(n){let l=x.useContext(aa);return et(l,zd(n)),l}function kd(n){let l=s2(n),r=l.matches[l.matches.length-1];return et(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function r2(){return kd("useRouteId")}function o2(){var i;let n=x.useContext(qd),l=i2("useRouteError"),r=kd("useRouteError");return n!==void 0?n:(i=l.errors)==null?void 0:i[r]}function u2(){let{router:n}=l2("useNavigate"),l=kd("useNavigate"),r=x.useRef(!1);return xv(()=>{r.current=!0}),x.useCallback(async(o,u={})=>{zn(r.current,bv),r.current&&(typeof o=="number"?n.navigate(o):await n.navigate(o,{fromRouteId:l,...u}))},[n,l])}var uy={};function wv(n,l,r){!l&&!uy[n]&&(uy[n]=!0,zn(!1,r))}x.memo(c2);function c2({routes:n,future:l,state:r}){return Sv(n,void 0,r,l)}function cr(n){et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function f2({basename:n="/",children:l=null,location:r,navigationType:i="POP",navigator:o,static:u=!1}){et(!gr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),m=x.useMemo(()=>({basename:d,navigator:o,static:u,future:{}}),[d,o,u]);typeof r=="string"&&(r=Zi(r));let{pathname:y="/",search:p="",hash:g="",state:b=null,key:E="default"}=r,C=x.useMemo(()=>{let w=Ma(y,d);return w==null?null:{location:{pathname:w,search:p,hash:g,state:b,key:E},navigationType:i}},[d,y,p,g,b,E,i]);return zn(C!=null,`<Router basename="${d}"> is not able to match the URL "${y}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:x.createElement(na.Provider,{value:m},x.createElement(vr.Provider,{children:l,value:C}))}function d2({children:n,location:l}){return Ix(md(n),l)}function md(n,l=[]){let r=[];return x.Children.forEach(n,(i,o)=>{if(!x.isValidElement(i))return;let u=[...l,o];if(i.type===x.Fragment){r.push.apply(r,md(i.props.children,u));return}et(i.type===cr,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),et(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=md(i.props.children,u)),r.push(d)}),r}var Zo="get",Po="application/x-www-form-urlencoded";function Eu(n){return n!=null&&typeof n.tagName=="string"}function h2(n){return Eu(n)&&n.tagName.toLowerCase()==="button"}function m2(n){return Eu(n)&&n.tagName.toLowerCase()==="form"}function p2(n){return Eu(n)&&n.tagName.toLowerCase()==="input"}function y2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function v2(n,l){return n.button===0&&(!l||l==="_self")&&!y2(n)}function pd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,r)=>{let i=n[r];return l.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function g2(n,l){let r=pd(n);return l&&l.forEach((i,o)=>{r.has(o)||l.getAll(o).forEach(u=>{r.append(o,u)})}),r}var Vo=null;function b2(){if(Vo===null)try{new FormData(document.createElement("form"),0),Vo=!1}catch{Vo=!0}return Vo}var x2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function If(n){return n!=null&&!x2.has(n)?(zn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Po}"`),null):n}function S2(n,l){let r,i,o,u,d;if(m2(n)){let m=n.getAttribute("action");i=m?Ma(m,l):null,r=n.getAttribute("method")||Zo,o=If(n.getAttribute("enctype"))||Po,u=new FormData(n)}else if(h2(n)||p2(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||m.getAttribute("action");if(i=y?Ma(y,l):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Zo,o=If(n.getAttribute("formenctype"))||If(m.getAttribute("enctype"))||Po,u=new FormData(m,n),!b2()){let{name:p,type:g,value:b}=n;if(g==="image"){let E=p?`${p}.`:"";u.append(`${E}x`,"0"),u.append(`${E}y`,"0")}else p&&u.append(p,b)}}else{if(Eu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Zo,i=null,o=Po,d=n}return u&&o==="text/plain"&&(d=u,u=void 0),{action:i,method:r.toLowerCase(),encType:o,formData:u,body:d}}function Bd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}async function w2(n,l){if(n.id in l)return l[n.id];try{let r=await import(n.module);return l[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function E2(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function C2(n,l,r){let i=await Promise.all(n.map(async o=>{let u=l.routes[o.route.id];if(u){let d=await w2(u,r);return d.links?d.links():[]}return[]}));return A2(i.flat(1).filter(E2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function cy(n,l,r,i,o,u){let d=(y,p)=>r[p]?y.route.id!==r[p].route.id:!0,m=(y,p)=>{var g;return r[p].pathname!==y.pathname||((g=r[p].route.path)==null?void 0:g.endsWith("*"))&&r[p].params["*"]!==y.params["*"]};return u==="assets"?l.filter((y,p)=>d(y,p)||m(y,p)):u==="data"?l.filter((y,p)=>{var b;let g=i.routes[y.route.id];if(!g||!g.hasLoader)return!1;if(d(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let E=y.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=r[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function _2(n,l,{includeHydrateFallback:r}={}){return N2(n.map(i=>{let o=l.routes[i.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function N2(n){return[...new Set(n)]}function j2(n){let l={},r=Object.keys(n).sort();for(let i of r)l[i]=n[i];return l}function A2(n,l){let r=new Set;return new Set(l),n.reduce((i,o)=>{let u=JSON.stringify(j2(o));return r.has(u)||(r.add(u),i.push({key:u,link:o})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var T2=new Set([100,101,204,205]);function O2(n,l){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r.pathname==="/"?r.pathname="_root.data":l&&Ma(r.pathname,l)==="/"?r.pathname=`${l.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Ev(){let n=x.useContext(Pi);return Bd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function R2(){let n=x.useContext(wu);return Bd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Hd=x.createContext(void 0);Hd.displayName="FrameworkContext";function Cv(){let n=x.useContext(Hd);return Bd(n,"You must render this element inside a <HydratedRouter> element"),n}function D2(n,l){let r=x.useContext(Hd),[i,o]=x.useState(!1),[u,d]=x.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:g,onTouchStart:b}=l,E=x.useRef(null);x.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let O=_=>{_.forEach(A=>{d(A.isIntersecting)})},N=new IntersectionObserver(O,{threshold:.5});return E.current&&N.observe(E.current),()=>{N.disconnect()}}},[n]),x.useEffect(()=>{if(i){let O=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(O)}}},[i]);let C=()=>{o(!0)},w=()=>{o(!1),d(!1)};return r?n!=="intent"?[u,E,{}]:[u,E,{onFocus:ir(m,C),onBlur:ir(y,w),onMouseEnter:ir(p,C),onMouseLeave:ir(g,w),onTouchStart:ir(b,C)}]:[!1,E,{}]}function ir(n,l){return r=>{n&&n(r),r.defaultPrevented||l(r)}}function M2({page:n,...l}){let{router:r}=Ev(),i=x.useMemo(()=>dv(r.routes,n,r.basename),[r.routes,n,r.basename]);return i?x.createElement(U2,{page:n,matches:i,...l}):null}function L2(n){let{manifest:l,routeModules:r}=Cv(),[i,o]=x.useState([]);return x.useEffect(()=>{let u=!1;return C2(n,l,r).then(d=>{u||o(d)}),()=>{u=!0}},[n,l,r]),i}function U2({page:n,matches:l,...r}){let i=Yt(),{manifest:o,routeModules:u}=Cv(),{basename:d}=Ev(),{loaderData:m,matches:y}=R2(),p=x.useMemo(()=>cy(n,l,y,o,i,"data"),[n,l,y,o,i]),g=x.useMemo(()=>cy(n,l,y,o,i,"assets"),[n,l,y,o,i]),b=x.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let w=new Set,O=!1;if(l.forEach(_=>{var j;let A=o.routes[_.route.id];!A||!A.hasLoader||(!p.some(B=>B.route.id===_.route.id)&&_.route.id in m&&((j=u[_.route.id])!=null&&j.shouldRevalidate)||A.hasClientLoader?O=!0:w.add(_.route.id))}),w.size===0)return[];let N=O2(n,d);return O&&w.size>0&&N.searchParams.set("_routes",l.filter(_=>w.has(_.route.id)).map(_=>_.route.id).join(",")),[N.pathname+N.search]},[d,m,i,o,p,l,n,u]),E=x.useMemo(()=>_2(g,o),[g,o]),C=L2(g);return x.createElement(x.Fragment,null,b.map(w=>x.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),E.map(w=>x.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),C.map(({key:w,link:O})=>x.createElement("link",{key:w,...O})))}function q2(...n){return l=>{n.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var _v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_v&&(window.__reactRouterVersion="7.6.0")}catch{}function z2({basename:n,children:l,window:r}){let i=x.useRef();i.current==null&&(i.current=wx({window:r,v5Compat:!0}));let o=i.current,[u,d]=x.useState({action:o.action,location:o.location}),m=x.useCallback(y=>{x.startTransition(()=>d(y))},[d]);return x.useLayoutEffect(()=>o.listen(m),[o,m]),x.createElement(f2,{basename:n,children:l,location:u.location,navigationType:u.action,navigator:o})}var Nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jv=x.forwardRef(function({onClick:l,discover:r="render",prefetch:i="none",relative:o,reloadDocument:u,replace:d,state:m,target:y,to:p,preventScrollReset:g,viewTransition:b,...E},C){let{basename:w}=x.useContext(na),O=typeof p=="string"&&Nv.test(p),N,_=!1;if(typeof p=="string"&&O&&(N=p,_v))try{let te=new URL(window.location.href),pe=p.startsWith("//")?new URL(te.protocol+p):new URL(p),Re=Ma(pe.pathname,w);pe.origin===te.origin&&Re!=null?p=Re+pe.search+pe.hash:_=!0}catch{zn(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=Zx(p,{relative:o}),[j,B,V]=D2(i,E),Q=Q2(p,{replace:d,state:m,target:y,preventScrollReset:g,relative:o,viewTransition:b});function G(te){l&&l(te),te.defaultPrevented||Q(te)}let Z=x.createElement("a",{...E,...V,href:N||A,onClick:_||u?l:G,ref:q2(C,B),target:y,"data-discover":!O&&r==="render"?"true":void 0});return j&&!O?x.createElement(x.Fragment,null,Z,x.createElement(M2,{page:A})):Z});jv.displayName="Link";var k2=x.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:i="",end:o=!1,style:u,to:d,viewTransition:m,children:y,...p},g){let b=br(d,{relative:p.relative}),E=Yt(),C=x.useContext(wu),{navigator:w,basename:O}=x.useContext(na),N=C!=null&&G2(b)&&m===!0,_=w.encodeLocation?w.encodeLocation(b).pathname:b.pathname,A=E.pathname,j=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;r||(A=A.toLowerCase(),j=j?j.toLowerCase():null,_=_.toLowerCase()),j&&O&&(j=Ma(j,O)||j);const B=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let V=A===_||!o&&A.startsWith(_)&&A.charAt(B)==="/",Q=j!=null&&(j===_||!o&&j.startsWith(_)&&j.charAt(_.length)==="/"),G={isActive:V,isPending:Q,isTransitioning:N},Z=V?l:void 0,te;typeof i=="function"?te=i(G):te=[i,V?"active":null,Q?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let pe=typeof u=="function"?u(G):u;return x.createElement(jv,{...p,"aria-current":Z,className:te,ref:g,style:pe,to:d,viewTransition:m},typeof y=="function"?y(G):y)});k2.displayName="NavLink";var B2=x.forwardRef(({discover:n="render",fetcherKey:l,navigate:r,reloadDocument:i,replace:o,state:u,method:d=Zo,action:m,onSubmit:y,relative:p,preventScrollReset:g,viewTransition:b,...E},C)=>{let w=K2(),O=F2(m,{relative:p}),N=d.toLowerCase()==="get"?"get":"post",_=typeof m=="string"&&Nv.test(m),A=j=>{if(y&&y(j),j.defaultPrevented)return;j.preventDefault();let B=j.nativeEvent.submitter,V=(B==null?void 0:B.getAttribute("formmethod"))||d;w(B||j.currentTarget,{fetcherKey:l,method:V,navigate:r,replace:o,state:u,relative:p,preventScrollReset:g,viewTransition:b})};return x.createElement("form",{ref:C,method:N,action:O,onSubmit:i?y:A,...E,"data-discover":!_&&n==="render"?"true":void 0})});B2.displayName="Form";function H2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Av(n){let l=x.useContext(Pi);return et(l,H2(n)),l}function Q2(n,{target:l,replace:r,state:i,preventScrollReset:o,relative:u,viewTransition:d}={}){let m=zt(),y=Yt(),p=br(n,{relative:u});return x.useCallback(g=>{if(v2(g,l)){g.preventDefault();let b=r!==void 0?r:hr(y)===hr(p);m(n,{replace:b,state:i,preventScrollReset:o,relative:u,viewTransition:d})}},[y,m,p,r,i,l,n,o,u,d])}function $2(n){zn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=x.useRef(pd(n)),r=x.useRef(!1),i=Yt(),o=x.useMemo(()=>g2(i.search,r.current?null:l.current),[i.search]),u=zt(),d=x.useCallback((m,y)=>{const p=pd(typeof m=="function"?m(o):m);r.current=!0,u("?"+p,y)},[u,o]);return[o,d]}var Y2=0,V2=()=>`__${String(++Y2)}__`;function K2(){let{router:n}=Av("useSubmit"),{basename:l}=x.useContext(na),r=r2();return x.useCallback(async(i,o={})=>{let{action:u,method:d,encType:m,formData:y,body:p}=S2(i,l);if(o.navigate===!1){let g=o.fetcherKey||V2();await n.fetch(g,r,o.action||u,{preventScrollReset:o.preventScrollReset,formData:y,body:p,formMethod:o.method||d,formEncType:o.encType||m,flushSync:o.flushSync})}else await n.navigate(o.action||u,{preventScrollReset:o.preventScrollReset,formData:y,body:p,formMethod:o.method||d,formEncType:o.encType||m,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,l,r])}function F2(n,{relative:l}={}){let{basename:r}=x.useContext(na),i=x.useContext(aa);et(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...br(n||".",{relative:l})},d=Yt();if(n==null){u.search=d.search;let m=new URLSearchParams(u.search),y=m.getAll("index");if(y.some(g=>g==="")){m.delete("index"),y.filter(b=>b).forEach(b=>m.append("index",b));let g=m.toString();u.search=g?`?${g}`:""}}return(!n||n===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Da([r,u.pathname])),hr(u)}function G2(n,l={}){let r=x.useContext(gv);et(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Av("useViewTransitionState"),o=br(n,{relative:l.relative});if(!r.isTransitioning)return!1;let u=Ma(r.currentLocation.pathname,i)||r.currentLocation.pathname,d=Ma(r.nextLocation.pathname,i)||r.nextLocation.pathname;return mr(o.pathname,d)!=null||mr(o.pathname,u)!=null}[...T2];var Tv=fv();const X2=Su(Tv);function yd(n,l){return yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yd(n,l)}function Ji(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,yd(n,l)}var Ii=function(){function n(){this.listeners=[]}var l=n.prototype;return l.subscribe=function(i){var o=this,u=i||function(){};return this.listeners.push(u),this.onSubscribe(),function(){o.listeners=o.listeners.filter(function(d){return d!==u}),o.onUnsubscribe()}},l.hasListeners=function(){return this.listeners.length>0},l.onSubscribe=function(){},l.onUnsubscribe=function(){},n}();function Ee(){return Ee=Object.assign?Object.assign.bind():function(n){for(var l=1;l<arguments.length;l++){var r=arguments[l];for(var i in r)({}).hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n},Ee.apply(null,arguments)}var ru=typeof window>"u";function _t(){}function Z2(n,l){return typeof n=="function"?n(l):n}function vd(n){return typeof n=="number"&&n>=0&&n!==1/0}function ou(n){return Array.isArray(n)?n:[n]}function Ov(n,l){return Math.max(n+(l||0)-Date.now(),0)}function Jo(n,l,r){return xr(n)?typeof l=="function"?Ee({},r,{queryKey:n,queryFn:l}):Ee({},l,{queryKey:n}):n}function P2(n,l,r){return xr(n)?typeof l=="function"?Ee({},r,{mutationKey:n,mutationFn:l}):Ee({},l,{mutationKey:n}):typeof n=="function"?Ee({},l,{mutationFn:n}):Ee({},n)}function cl(n,l,r){return xr(n)?[Ee({},l,{queryKey:n}),r]:[n||{},l]}function J2(n,l){if(n===!0&&l===!0||n==null&&l==null)return"all";if(n===!1&&l===!1)return"none";var r=n??!l;return r?"active":"inactive"}function fy(n,l){var r=n.active,i=n.exact,o=n.fetching,u=n.inactive,d=n.predicate,m=n.queryKey,y=n.stale;if(xr(m)){if(i){if(l.queryHash!==Qd(m,l.options))return!1}else if(!uu(l.queryKey,m))return!1}var p=J2(r,u);if(p==="none")return!1;if(p!=="all"){var g=l.isActive();if(p==="active"&&!g||p==="inactive"&&g)return!1}return!(typeof y=="boolean"&&l.isStale()!==y||typeof o=="boolean"&&l.isFetching()!==o||d&&!d(l))}function dy(n,l){var r=n.exact,i=n.fetching,o=n.predicate,u=n.mutationKey;if(xr(u)){if(!l.options.mutationKey)return!1;if(r){if(Yl(l.options.mutationKey)!==Yl(u))return!1}else if(!uu(l.options.mutationKey,u))return!1}return!(typeof i=="boolean"&&l.state.status==="loading"!==i||o&&!o(l))}function Qd(n,l){var r=(l==null?void 0:l.queryKeyHashFn)||Yl;return r(n)}function Yl(n){var l=ou(n);return I2(l)}function I2(n){return JSON.stringify(n,function(l,r){return gd(r)?Object.keys(r).sort().reduce(function(i,o){return i[o]=r[o],i},{}):r})}function uu(n,l){return Rv(ou(n),ou(l))}function Rv(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?!Object.keys(l).some(function(r){return!Rv(n[r],l[r])}):!1}function cu(n,l){if(n===l)return n;var r=Array.isArray(n)&&Array.isArray(l);if(r||gd(n)&&gd(l)){for(var i=r?n.length:Object.keys(n).length,o=r?l:Object.keys(l),u=o.length,d=r?[]:{},m=0,y=0;y<u;y++){var p=r?y:o[y];d[p]=cu(n[p],l[p]),d[p]===n[p]&&m++}return i===u&&m===i?n:d}return l}function W2(n,l){if(n&&!l||l&&!n)return!1;for(var r in n)if(n[r]!==l[r])return!1;return!0}function gd(n){if(!hy(n))return!1;var l=n.constructor;if(typeof l>"u")return!0;var r=l.prototype;return!(!hy(r)||!r.hasOwnProperty("isPrototypeOf"))}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}function xr(n){return typeof n=="string"||Array.isArray(n)}function eS(n){return new Promise(function(l){setTimeout(l,n)})}function my(n){Promise.resolve().then(n).catch(function(l){return setTimeout(function(){throw l})})}function Dv(){if(typeof AbortController=="function")return new AbortController}var tS=function(n){Ji(l,n);function l(){var i;return i=n.call(this)||this,i.setup=function(o){var u;if(!ru&&((u=window)!=null&&u.addEventListener)){var d=function(){return o()};return window.addEventListener("visibilitychange",d,!1),window.addEventListener("focus",d,!1),function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("focus",d)}}},i}var r=l.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var o;(o=this.cleanup)==null||o.call(this),this.cleanup=void 0}},r.setEventListener=function(o){var u,d=this;this.setup=o,(u=this.cleanup)==null||u.call(this),this.cleanup=o(function(m){typeof m=="boolean"?d.setFocused(m):d.onFocus()})},r.setFocused=function(o){this.focused=o,o&&this.onFocus()},r.onFocus=function(){this.listeners.forEach(function(o){o()})},r.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},l}(Ii),fr=new tS,nS=function(n){Ji(l,n);function l(){var i;return i=n.call(this)||this,i.setup=function(o){var u;if(!ru&&((u=window)!=null&&u.addEventListener)){var d=function(){return o()};return window.addEventListener("online",d,!1),window.addEventListener("offline",d,!1),function(){window.removeEventListener("online",d),window.removeEventListener("offline",d)}}},i}var r=l.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var o;(o=this.cleanup)==null||o.call(this),this.cleanup=void 0}},r.setEventListener=function(o){var u,d=this;this.setup=o,(u=this.cleanup)==null||u.call(this),this.cleanup=o(function(m){typeof m=="boolean"?d.setOnline(m):d.onOnline()})},r.setOnline=function(o){this.online=o,o&&this.onOnline()},r.onOnline=function(){this.listeners.forEach(function(o){o()})},r.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},l}(Ii),Io=new nS;function aS(n){return Math.min(1e3*Math.pow(2,n),3e4)}function fu(n){return typeof(n==null?void 0:n.cancel)=="function"}var Mv=function(l){this.revert=l==null?void 0:l.revert,this.silent=l==null?void 0:l.silent};function Wo(n){return n instanceof Mv}var Lv=function(l){var r=this,i=!1,o,u,d,m;this.abort=l.abort,this.cancel=function(E){return o==null?void 0:o(E)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return u==null?void 0:u()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(E,C){d=E,m=C});var y=function(C){r.isResolved||(r.isResolved=!0,l.onSuccess==null||l.onSuccess(C),u==null||u(),d(C))},p=function(C){r.isResolved||(r.isResolved=!0,l.onError==null||l.onError(C),u==null||u(),m(C))},g=function(){return new Promise(function(C){u=C,r.isPaused=!0,l.onPause==null||l.onPause()}).then(function(){u=void 0,r.isPaused=!1,l.onContinue==null||l.onContinue()})},b=function E(){if(!r.isResolved){var C;try{C=l.fn()}catch(w){C=Promise.reject(w)}o=function(O){if(!r.isResolved&&(p(new Mv(O)),r.abort==null||r.abort(),fu(C)))try{C.cancel()}catch{}},r.isTransportCancelable=fu(C),Promise.resolve(C).then(y).catch(function(w){var O,N;if(!r.isResolved){var _=(O=l.retry)!=null?O:3,A=(N=l.retryDelay)!=null?N:aS,j=typeof A=="function"?A(r.failureCount,w):A,B=_===!0||typeof _=="number"&&r.failureCount<_||typeof _=="function"&&_(r.failureCount,w);if(i||!B){p(w);return}r.failureCount++,l.onFail==null||l.onFail(r.failureCount,w),eS(j).then(function(){if(!fr.isFocused()||!Io.isOnline())return g()}).then(function(){i?p(w):E()})}})}};b()},lS=function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(r){r()},this.batchNotifyFn=function(r){r()}}var l=n.prototype;return l.batch=function(i){var o;this.transactions++;try{o=i()}finally{this.transactions--,this.transactions||this.flush()}return o},l.schedule=function(i){var o=this;this.transactions?this.queue.push(i):my(function(){o.notifyFn(i)})},l.batchCalls=function(i){var o=this;return function(){for(var u=arguments.length,d=new Array(u),m=0;m<u;m++)d[m]=arguments[m];o.schedule(function(){i.apply(void 0,d)})}},l.flush=function(){var i=this,o=this.queue;this.queue=[],o.length&&my(function(){i.batchNotifyFn(function(){o.forEach(function(u){i.notifyFn(u)})})})},l.setNotifyFunction=function(i){this.notifyFn=i},l.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n}(),Je=new lS,Uv=console;function du(){return Uv}function iS(n){Uv=n}var sS=function(){function n(r){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=r.defaultOptions,this.setOptions(r.options),this.observers=[],this.cache=r.cache,this.queryKey=r.queryKey,this.queryHash=r.queryHash,this.initialState=r.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=r.meta,this.scheduleGc()}var l=n.prototype;return l.setOptions=function(i){var o;this.options=Ee({},this.defaultOptions,i),this.meta=i==null?void 0:i.meta,this.cacheTime=Math.max(this.cacheTime||0,(o=this.options.cacheTime)!=null?o:5*60*1e3)},l.setDefaultOptions=function(i){this.defaultOptions=i},l.scheduleGc=function(){var i=this;this.clearGcTimeout(),vd(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.optionalRemove()},this.cacheTime))},l.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},l.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},l.setData=function(i,o){var u,d,m=this.state.data,y=Z2(i,m);return(u=(d=this.options).isDataEqual)!=null&&u.call(d,m,y)?y=m:this.options.structuralSharing!==!1&&(y=cu(m,y)),this.dispatch({data:y,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt}),y},l.setState=function(i,o){this.dispatch({type:"setState",state:i,setStateOptions:o})},l.cancel=function(i){var o,u=this.promise;return(o=this.retryer)==null||o.cancel(i),u?u.then(_t).catch(_t):Promise.resolve()},l.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},l.reset=function(){this.destroy(),this.setState(this.initialState)},l.isActive=function(){return this.observers.some(function(i){return i.options.enabled!==!1})},l.isFetching=function(){return this.state.isFetching},l.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},l.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Ov(this.state.dataUpdatedAt,i)},l.onFocus=function(){var i,o=this.observers.find(function(u){return u.shouldFetchOnWindowFocus()});o&&o.refetch(),(i=this.retryer)==null||i.continue()},l.onOnline=function(){var i,o=this.observers.find(function(u){return u.shouldFetchOnReconnect()});o&&o.refetch(),(i=this.retryer)==null||i.continue()},l.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},l.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(o){return o!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},l.getObserversCount=function(){return this.observers.length},l.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},l.fetch=function(i,o){var u=this,d,m,y;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var p;return(p=this.retryer)==null||p.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var g=this.observers.find(function(A){return A.options.queryFn});g&&this.setOptions(g.options)}var b=ou(this.queryKey),E=Dv(),C={queryKey:b,pageParam:void 0,meta:this.meta};Object.defineProperty(C,"signal",{enumerable:!0,get:function(){if(E)return u.abortSignalConsumed=!0,E.signal}});var w=function(){return u.options.queryFn?(u.abortSignalConsumed=!1,u.options.queryFn(C)):Promise.reject("Missing queryFn")},O={fetchOptions:o,options:this.options,queryKey:b,state:this.state,fetchFn:w,meta:this.meta};if((d=this.options.behavior)!=null&&d.onFetch){var N;(N=this.options.behavior)==null||N.onFetch(O)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((m=O.fetchOptions)==null?void 0:m.meta)){var _;this.dispatch({type:"fetch",meta:(_=O.fetchOptions)==null?void 0:_.meta})}return this.retryer=new Lv({fn:O.fetchFn,abort:E==null||(y=E.abort)==null?void 0:y.bind(E),onSuccess:function(j){u.setData(j),u.cache.config.onSuccess==null||u.cache.config.onSuccess(j,u),u.cacheTime===0&&u.optionalRemove()},onError:function(j){Wo(j)&&j.silent||u.dispatch({type:"error",error:j}),Wo(j)||(u.cache.config.onError==null||u.cache.config.onError(j,u),du().error(j)),u.cacheTime===0&&u.optionalRemove()},onFail:function(){u.dispatch({type:"failed"})},onPause:function(){u.dispatch({type:"pause"})},onContinue:function(){u.dispatch({type:"continue"})},retry:O.options.retry,retryDelay:O.options.retryDelay}),this.promise=this.retryer.promise,this.promise},l.dispatch=function(i){var o=this;this.state=this.reducer(this.state,i),Je.batch(function(){o.observers.forEach(function(u){u.onQueryUpdate(i)}),o.cache.notify({query:o,type:"queryUpdated",action:i})})},l.getDefaultState=function(i){var o=typeof i.initialData=="function"?i.initialData():i.initialData,u=typeof i.initialData<"u",d=u?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,m=typeof o<"u";return{data:o,dataUpdateCount:0,dataUpdatedAt:m?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:m?"success":"idle"}},l.reducer=function(i,o){var u,d;switch(o.type){case"failed":return Ee({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return Ee({},i,{isPaused:!0});case"continue":return Ee({},i,{isPaused:!1});case"fetch":return Ee({},i,{fetchFailureCount:0,fetchMeta:(u=o.meta)!=null?u:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ee({},i,{data:o.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(d=o.dataUpdatedAt)!=null?d:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var m=o.error;return Wo(m)&&m.revert&&this.revertState?Ee({},this.revertState):Ee({},i,{error:m,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Ee({},i,{isInvalidated:!0});case"setState":return Ee({},i,o.state);default:return i}},n}(),rS=function(n){Ji(l,n);function l(i){var o;return o=n.call(this)||this,o.config=i||{},o.queries=[],o.queriesMap={},o}var r=l.prototype;return r.build=function(o,u,d){var m,y=u.queryKey,p=(m=u.queryHash)!=null?m:Qd(y,u),g=this.get(p);return g||(g=new sS({cache:this,queryKey:y,queryHash:p,options:o.defaultQueryOptions(u),state:d,defaultOptions:o.getQueryDefaults(y),meta:u.meta}),this.add(g)),g},r.add=function(o){this.queriesMap[o.queryHash]||(this.queriesMap[o.queryHash]=o,this.queries.push(o),this.notify({type:"queryAdded",query:o}))},r.remove=function(o){var u=this.queriesMap[o.queryHash];u&&(o.destroy(),this.queries=this.queries.filter(function(d){return d!==o}),u===o&&delete this.queriesMap[o.queryHash],this.notify({type:"queryRemoved",query:o}))},r.clear=function(){var o=this;Je.batch(function(){o.queries.forEach(function(u){o.remove(u)})})},r.get=function(o){return this.queriesMap[o]},r.getAll=function(){return this.queries},r.find=function(o,u){var d=cl(o,u),m=d[0];return typeof m.exact>"u"&&(m.exact=!0),this.queries.find(function(y){return fy(m,y)})},r.findAll=function(o,u){var d=cl(o,u),m=d[0];return Object.keys(m).length>0?this.queries.filter(function(y){return fy(m,y)}):this.queries},r.notify=function(o){var u=this;Je.batch(function(){u.listeners.forEach(function(d){d(o)})})},r.onFocus=function(){var o=this;Je.batch(function(){o.queries.forEach(function(u){u.onFocus()})})},r.onOnline=function(){var o=this;Je.batch(function(){o.queries.forEach(function(u){u.onOnline()})})},l}(Ii),oS=function(){function n(r){this.options=Ee({},r.defaultOptions,r.options),this.mutationId=r.mutationId,this.mutationCache=r.mutationCache,this.observers=[],this.state=r.state||qv(),this.meta=r.meta}var l=n.prototype;return l.setState=function(i){this.dispatch({type:"setState",state:i})},l.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},l.removeObserver=function(i){this.observers=this.observers.filter(function(o){return o!==i})},l.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(_t).catch(_t)):Promise.resolve()},l.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},l.execute=function(){var i=this,o,u=this.state.status==="loading",d=Promise.resolve();return u||(this.dispatch({type:"loading",variables:this.options.variables}),d=d.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(m){m!==i.state.context&&i.dispatch({type:"loading",context:m,variables:i.state.variables})})),d.then(function(){return i.executeMutation()}).then(function(m){o=m,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(o,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(o,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(o,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:o}),o}).catch(function(m){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(m,i.state.variables,i.state.context,i),du().error(m),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(m,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,m,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:m}),m})})},l.executeMutation=function(){var i=this,o;return this.retryer=new Lv({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(o=this.options.retry)!=null?o:0,retryDelay:this.options.retryDelay}),this.retryer.promise},l.dispatch=function(i){var o=this;this.state=uS(this.state,i),Je.batch(function(){o.observers.forEach(function(u){u.onMutationUpdate(i)}),o.mutationCache.notify(o)})},n}();function qv(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function uS(n,l){switch(l.type){case"failed":return Ee({},n,{failureCount:n.failureCount+1});case"pause":return Ee({},n,{isPaused:!0});case"continue":return Ee({},n,{isPaused:!1});case"loading":return Ee({},n,{context:l.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:l.variables});case"success":return Ee({},n,{data:l.data,error:null,status:"success",isPaused:!1});case"error":return Ee({},n,{data:void 0,error:l.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Ee({},n,l.state);default:return n}}var zv=function(n){Ji(l,n);function l(i){var o;return o=n.call(this)||this,o.config=i||{},o.mutations=[],o.mutationId=0,o}var r=l.prototype;return r.build=function(o,u,d){var m=new oS({mutationCache:this,mutationId:++this.mutationId,options:o.defaultMutationOptions(u),state:d,defaultOptions:u.mutationKey?o.getMutationDefaults(u.mutationKey):void 0,meta:u.meta});return this.add(m),m},r.add=function(o){this.mutations.push(o),this.notify(o)},r.remove=function(o){this.mutations=this.mutations.filter(function(u){return u!==o}),o.cancel(),this.notify(o)},r.clear=function(){var o=this;Je.batch(function(){o.mutations.forEach(function(u){o.remove(u)})})},r.getAll=function(){return this.mutations},r.find=function(o){return typeof o.exact>"u"&&(o.exact=!0),this.mutations.find(function(u){return dy(o,u)})},r.findAll=function(o){return this.mutations.filter(function(u){return dy(o,u)})},r.notify=function(o){var u=this;Je.batch(function(){u.listeners.forEach(function(d){d(o)})})},r.onFocus=function(){this.resumePausedMutations()},r.onOnline=function(){this.resumePausedMutations()},r.resumePausedMutations=function(){var o=this.mutations.filter(function(u){return u.state.isPaused});return Je.batch(function(){return o.reduce(function(u,d){return u.then(function(){return d.continue().catch(_t)})},Promise.resolve())})},l}(Ii);function cS(){return{onFetch:function(l){l.fetchFn=function(){var r,i,o,u,d,m,y=(r=l.fetchOptions)==null||(i=r.meta)==null?void 0:i.refetchPage,p=(o=l.fetchOptions)==null||(u=o.meta)==null?void 0:u.fetchMore,g=p==null?void 0:p.pageParam,b=(p==null?void 0:p.direction)==="forward",E=(p==null?void 0:p.direction)==="backward",C=((d=l.state.data)==null?void 0:d.pages)||[],w=((m=l.state.data)==null?void 0:m.pageParams)||[],O=Dv(),N=O==null?void 0:O.signal,_=w,A=!1,j=l.options.queryFn||function(){return Promise.reject("Missing queryFn")},B=function(ye,Se,k,X){return _=X?[Se].concat(_):[].concat(_,[Se]),X?[k].concat(ye):[].concat(ye,[k])},V=function(ye,Se,k,X){if(A)return Promise.reject("Cancelled");if(typeof k>"u"&&!Se&&ye.length)return Promise.resolve(ye);var J={queryKey:l.queryKey,signal:N,pageParam:k,meta:l.meta},ue=j(J),R=Promise.resolve(ue).then(function(W){return B(ye,k,W,X)});if(fu(ue)){var $=R;$.cancel=ue.cancel}return R},Q;if(!C.length)Q=V([]);else if(b){var G=typeof g<"u",Z=G?g:py(l.options,C);Q=V(C,G,Z)}else if(E){var te=typeof g<"u",pe=te?g:fS(l.options,C);Q=V(C,te,pe,!0)}else(function(){_=[];var Ue=typeof l.options.getNextPageParam>"u",ye=y&&C[0]?y(C[0],0,C):!0;Q=ye?V([],Ue,w[0]):Promise.resolve(B([],w[0],C[0]));for(var Se=function(J){Q=Q.then(function(ue){var R=y&&C[J]?y(C[J],J,C):!0;if(R){var $=Ue?w[J]:py(l.options,ue);return V(ue,Ue,$)}return Promise.resolve(B(ue,w[J],C[J]))})},k=1;k<C.length;k++)Se(k)})();var Re=Q.then(function(Ue){return{pages:Ue,pageParams:_}}),be=Re;return be.cancel=function(){A=!0,O==null||O.abort(),fu(Q)&&Q.cancel()},Re}}}}function py(n,l){return n.getNextPageParam==null?void 0:n.getNextPageParam(l[l.length-1],l)}function fS(n,l){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(l[0],l)}var dS=function(){function n(r){r===void 0&&(r={}),this.queryCache=r.queryCache||new rS,this.mutationCache=r.mutationCache||new zv,this.defaultOptions=r.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var l=n.prototype;return l.mount=function(){var i=this;this.unsubscribeFocus=fr.subscribe(function(){fr.isFocused()&&Io.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=Io.subscribe(function(){fr.isFocused()&&Io.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},l.unmount=function(){var i,o;(i=this.unsubscribeFocus)==null||i.call(this),(o=this.unsubscribeOnline)==null||o.call(this)},l.isFetching=function(i,o){var u=cl(i,o),d=u[0];return d.fetching=!0,this.queryCache.findAll(d).length},l.isMutating=function(i){return this.mutationCache.findAll(Ee({},i,{fetching:!0})).length},l.getQueryData=function(i,o){var u;return(u=this.queryCache.find(i,o))==null?void 0:u.state.data},l.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(o){var u=o.queryKey,d=o.state,m=d.data;return[u,m]})},l.setQueryData=function(i,o,u){var d=Jo(i),m=this.defaultQueryOptions(d);return this.queryCache.build(this,m).setData(o,u)},l.setQueriesData=function(i,o,u){var d=this;return Je.batch(function(){return d.getQueryCache().findAll(i).map(function(m){var y=m.queryKey;return[y,d.setQueryData(y,o,u)]})})},l.getQueryState=function(i,o){var u;return(u=this.queryCache.find(i,o))==null?void 0:u.state},l.removeQueries=function(i,o){var u=cl(i,o),d=u[0],m=this.queryCache;Je.batch(function(){m.findAll(d).forEach(function(y){m.remove(y)})})},l.resetQueries=function(i,o,u){var d=this,m=cl(i,o,u),y=m[0],p=m[1],g=this.queryCache,b=Ee({},y,{active:!0});return Je.batch(function(){return g.findAll(y).forEach(function(E){E.reset()}),d.refetchQueries(b,p)})},l.cancelQueries=function(i,o,u){var d=this,m=cl(i,o,u),y=m[0],p=m[1],g=p===void 0?{}:p;typeof g.revert>"u"&&(g.revert=!0);var b=Je.batch(function(){return d.queryCache.findAll(y).map(function(E){return E.cancel(g)})});return Promise.all(b).then(_t).catch(_t)},l.invalidateQueries=function(i,o,u){var d,m,y,p=this,g=cl(i,o,u),b=g[0],E=g[1],C=Ee({},b,{active:(d=(m=b.refetchActive)!=null?m:b.active)!=null?d:!0,inactive:(y=b.refetchInactive)!=null?y:!1});return Je.batch(function(){return p.queryCache.findAll(b).forEach(function(w){w.invalidate()}),p.refetchQueries(C,E)})},l.refetchQueries=function(i,o,u){var d=this,m=cl(i,o,u),y=m[0],p=m[1],g=Je.batch(function(){return d.queryCache.findAll(y).map(function(E){return E.fetch(void 0,Ee({},p,{meta:{refetchPage:y==null?void 0:y.refetchPage}}))})}),b=Promise.all(g).then(_t);return p!=null&&p.throwOnError||(b=b.catch(_t)),b},l.fetchQuery=function(i,o,u){var d=Jo(i,o,u),m=this.defaultQueryOptions(d);typeof m.retry>"u"&&(m.retry=!1);var y=this.queryCache.build(this,m);return y.isStaleByTime(m.staleTime)?y.fetch(m):Promise.resolve(y.state.data)},l.prefetchQuery=function(i,o,u){return this.fetchQuery(i,o,u).then(_t).catch(_t)},l.fetchInfiniteQuery=function(i,o,u){var d=Jo(i,o,u);return d.behavior=cS(),this.fetchQuery(d)},l.prefetchInfiniteQuery=function(i,o,u){return this.fetchInfiniteQuery(i,o,u).then(_t).catch(_t)},l.cancelMutations=function(){var i=this,o=Je.batch(function(){return i.mutationCache.getAll().map(function(u){return u.cancel()})});return Promise.all(o).then(_t).catch(_t)},l.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},l.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},l.getQueryCache=function(){return this.queryCache},l.getMutationCache=function(){return this.mutationCache},l.getDefaultOptions=function(){return this.defaultOptions},l.setDefaultOptions=function(i){this.defaultOptions=i},l.setQueryDefaults=function(i,o){var u=this.queryDefaults.find(function(d){return Yl(i)===Yl(d.queryKey)});u?u.defaultOptions=o:this.queryDefaults.push({queryKey:i,defaultOptions:o})},l.getQueryDefaults=function(i){var o;return i?(o=this.queryDefaults.find(function(u){return uu(i,u.queryKey)}))==null?void 0:o.defaultOptions:void 0},l.setMutationDefaults=function(i,o){var u=this.mutationDefaults.find(function(d){return Yl(i)===Yl(d.mutationKey)});u?u.defaultOptions=o:this.mutationDefaults.push({mutationKey:i,defaultOptions:o})},l.getMutationDefaults=function(i){var o;return i?(o=this.mutationDefaults.find(function(u){return uu(i,u.mutationKey)}))==null?void 0:o.defaultOptions:void 0},l.defaultQueryOptions=function(i){if(i!=null&&i._defaulted)return i;var o=Ee({},this.defaultOptions.queries,this.getQueryDefaults(i==null?void 0:i.queryKey),i,{_defaulted:!0});return!o.queryHash&&o.queryKey&&(o.queryHash=Qd(o.queryKey,o)),o},l.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},l.defaultMutationOptions=function(i){return i!=null&&i._defaulted?i:Ee({},this.defaultOptions.mutations,this.getMutationDefaults(i==null?void 0:i.mutationKey),i,{_defaulted:!0})},l.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),hS=function(n){Ji(l,n);function l(i,o){var u;return u=n.call(this)||this,u.client=i,u.options=o,u.trackedProps=[],u.selectError=null,u.bindMethods(),u.setOptions(o),u}var r=l.prototype;return r.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},r.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),yy(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},r.onUnsubscribe=function(){this.listeners.length||this.destroy()},r.shouldFetchOnReconnect=function(){return bd(this.currentQuery,this.options,this.options.refetchOnReconnect)},r.shouldFetchOnWindowFocus=function(){return bd(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},r.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},r.setOptions=function(o,u){var d=this.options,m=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(o),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=d.queryKey),this.updateQuery();var y=this.hasListeners();y&&vy(this.currentQuery,m,this.options,d)&&this.executeFetch(),this.updateResult(u),y&&(this.currentQuery!==m||this.options.enabled!==d.enabled||this.options.staleTime!==d.staleTime)&&this.updateStaleTimeout();var p=this.computeRefetchInterval();y&&(this.currentQuery!==m||this.options.enabled!==d.enabled||p!==this.currentRefetchInterval)&&this.updateRefetchInterval(p)},r.getOptimisticResult=function(o){var u=this.client.defaultQueryObserverOptions(o),d=this.client.getQueryCache().build(this.client,u);return this.createResult(d,u)},r.getCurrentResult=function(){return this.currentResult},r.trackResult=function(o,u){var d=this,m={},y=function(g){d.trackedProps.includes(g)||d.trackedProps.push(g)};return Object.keys(o).forEach(function(p){Object.defineProperty(m,p,{configurable:!1,enumerable:!0,get:function(){return y(p),o[p]}})}),(u.useErrorBoundary||u.suspense)&&y("error"),m},r.getNextResult=function(o){var u=this;return new Promise(function(d,m){var y=u.subscribe(function(p){p.isFetching||(y(),p.isError&&(o!=null&&o.throwOnError)?m(p.error):d(p))})})},r.getCurrentQuery=function(){return this.currentQuery},r.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},r.refetch=function(o){return this.fetch(Ee({},o,{meta:{refetchPage:o==null?void 0:o.refetchPage}}))},r.fetchOptimistic=function(o){var u=this,d=this.client.defaultQueryObserverOptions(o),m=this.client.getQueryCache().build(this.client,d);return m.fetch().then(function(){return u.createResult(m,d)})},r.fetch=function(o){var u=this;return this.executeFetch(o).then(function(){return u.updateResult(),u.currentResult})},r.executeFetch=function(o){this.updateQuery();var u=this.currentQuery.fetch(this.options,o);return o!=null&&o.throwOnError||(u=u.catch(_t)),u},r.updateStaleTimeout=function(){var o=this;if(this.clearStaleTimeout(),!(ru||this.currentResult.isStale||!vd(this.options.staleTime))){var u=Ov(this.currentResult.dataUpdatedAt,this.options.staleTime),d=u+1;this.staleTimeoutId=setTimeout(function(){o.currentResult.isStale||o.updateResult()},d)}},r.computeRefetchInterval=function(){var o;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(o=this.options.refetchInterval)!=null?o:!1},r.updateRefetchInterval=function(o){var u=this;this.clearRefetchInterval(),this.currentRefetchInterval=o,!(ru||this.options.enabled===!1||!vd(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(u.options.refetchIntervalInBackground||fr.isFocused())&&u.executeFetch()},this.currentRefetchInterval))},r.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},r.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},r.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},r.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},r.createResult=function(o,u){var d=this.currentQuery,m=this.options,y=this.currentResult,p=this.currentResultState,g=this.currentResultOptions,b=o!==d,E=b?o.state:this.currentQueryInitialState,C=b?this.currentResult:this.previousQueryResult,w=o.state,O=w.dataUpdatedAt,N=w.error,_=w.errorUpdatedAt,A=w.isFetching,j=w.status,B=!1,V=!1,Q;if(u.optimisticResults){var G=this.hasListeners(),Z=!G&&yy(o,u),te=G&&vy(o,d,u,m);(Z||te)&&(A=!0,O||(j="loading"))}if(u.keepPreviousData&&!w.dataUpdateCount&&(C!=null&&C.isSuccess)&&j!=="error")Q=C.data,O=C.dataUpdatedAt,j=C.status,B=!0;else if(u.select&&typeof w.data<"u")if(y&&w.data===(p==null?void 0:p.data)&&u.select===this.selectFn)Q=this.selectResult;else try{this.selectFn=u.select,Q=u.select(w.data),u.structuralSharing!==!1&&(Q=cu(y==null?void 0:y.data,Q)),this.selectResult=Q,this.selectError=null}catch(be){du().error(be),this.selectError=be}else Q=w.data;if(typeof u.placeholderData<"u"&&typeof Q>"u"&&(j==="loading"||j==="idle")){var pe;if(y!=null&&y.isPlaceholderData&&u.placeholderData===(g==null?void 0:g.placeholderData))pe=y.data;else if(pe=typeof u.placeholderData=="function"?u.placeholderData():u.placeholderData,u.select&&typeof pe<"u")try{pe=u.select(pe),u.structuralSharing!==!1&&(pe=cu(y==null?void 0:y.data,pe)),this.selectError=null}catch(be){du().error(be),this.selectError=be}typeof pe<"u"&&(j="success",Q=pe,V=!0)}this.selectError&&(N=this.selectError,Q=this.selectResult,_=Date.now(),j="error");var Re={status:j,isLoading:j==="loading",isSuccess:j==="success",isError:j==="error",isIdle:j==="idle",data:Q,dataUpdatedAt:O,error:N,errorUpdatedAt:_,failureCount:w.fetchFailureCount,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>E.dataUpdateCount||w.errorUpdateCount>E.errorUpdateCount,isFetching:A,isRefetching:A&&j!=="loading",isLoadingError:j==="error"&&w.dataUpdatedAt===0,isPlaceholderData:V,isPreviousData:B,isRefetchError:j==="error"&&w.dataUpdatedAt!==0,isStale:$d(o,u),refetch:this.refetch,remove:this.remove};return Re},r.shouldNotifyListeners=function(o,u){if(!u)return!0;var d=this.options,m=d.notifyOnChangeProps,y=d.notifyOnChangePropsExclusions;if(!m&&!y||m==="tracked"&&!this.trackedProps.length)return!0;var p=m==="tracked"?this.trackedProps:m;return Object.keys(o).some(function(g){var b=g,E=o[b]!==u[b],C=p==null?void 0:p.some(function(O){return O===g}),w=y==null?void 0:y.some(function(O){return O===g});return E&&!w&&(!p||C)})},r.updateResult=function(o){var u=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!W2(this.currentResult,u)){var d={cache:!0};(o==null?void 0:o.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,u)&&(d.listeners=!0),this.notify(Ee({},d,o))}},r.updateQuery=function(){var o=this.client.getQueryCache().build(this.client,this.options);if(o!==this.currentQuery){var u=this.currentQuery;this.currentQuery=o,this.currentQueryInitialState=o.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(u==null||u.removeObserver(this),o.addObserver(this))}},r.onQueryUpdate=function(o){var u={};o.type==="success"?u.onSuccess=!0:o.type==="error"&&!Wo(o.error)&&(u.onError=!0),this.updateResult(u),this.hasListeners()&&this.updateTimers()},r.notify=function(o){var u=this;Je.batch(function(){o.onSuccess?(u.options.onSuccess==null||u.options.onSuccess(u.currentResult.data),u.options.onSettled==null||u.options.onSettled(u.currentResult.data,null)):o.onError&&(u.options.onError==null||u.options.onError(u.currentResult.error),u.options.onSettled==null||u.options.onSettled(void 0,u.currentResult.error)),o.listeners&&u.listeners.forEach(function(d){d(u.currentResult)}),o.cache&&u.client.getQueryCache().notify({query:u.currentQuery,type:"observerResultsUpdated"})})},l}(Ii);function mS(n,l){return l.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&l.retryOnMount===!1)}function yy(n,l){return mS(n,l)||n.state.dataUpdatedAt>0&&bd(n,l,l.refetchOnMount)}function bd(n,l,r){if(l.enabled!==!1){var i=typeof r=="function"?r(n):r;return i==="always"||i!==!1&&$d(n,l)}return!1}function vy(n,l,r,i){return r.enabled!==!1&&(n!==l||i.enabled===!1)&&(!r.suspense||n.state.status!=="error")&&$d(n,r)}function $d(n,l){return n.isStaleByTime(l.staleTime)}var pS=function(n){Ji(l,n);function l(i,o){var u;return u=n.call(this)||this,u.client=i,u.setOptions(o),u.bindMethods(),u.updateResult(),u}var r=l.prototype;return r.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},r.setOptions=function(o){this.options=this.client.defaultMutationOptions(o)},r.onUnsubscribe=function(){if(!this.listeners.length){var o;(o=this.currentMutation)==null||o.removeObserver(this)}},r.onMutationUpdate=function(o){this.updateResult();var u={listeners:!0};o.type==="success"?u.onSuccess=!0:o.type==="error"&&(u.onError=!0),this.notify(u)},r.getCurrentResult=function(){return this.currentResult},r.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},r.mutate=function(o,u){return this.mutateOptions=u,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Ee({},this.options,{variables:typeof o<"u"?o:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},r.updateResult=function(){var o=this.currentMutation?this.currentMutation.state:qv(),u=Ee({},o,{isLoading:o.status==="loading",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=u},r.notify=function(o){var u=this;Je.batch(function(){u.mutateOptions&&(o.onSuccess?(u.mutateOptions.onSuccess==null||u.mutateOptions.onSuccess(u.currentResult.data,u.currentResult.variables,u.currentResult.context),u.mutateOptions.onSettled==null||u.mutateOptions.onSettled(u.currentResult.data,null,u.currentResult.variables,u.currentResult.context)):o.onError&&(u.mutateOptions.onError==null||u.mutateOptions.onError(u.currentResult.error,u.currentResult.variables,u.currentResult.context),u.mutateOptions.onSettled==null||u.mutateOptions.onSettled(void 0,u.currentResult.error,u.currentResult.variables,u.currentResult.context))),o.listeners&&u.listeners.forEach(function(d){d(u.currentResult)})})},l}(Ii),yS=X2.unstable_batchedUpdates;Je.setBatchNotifyFunction(yS);var vS=console;iS(vS);var gy=Ke.createContext(void 0),kv=Ke.createContext(!1);function Bv(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=gy),window.ReactQueryClientContext):gy}var Hv=function(){var l=Ke.useContext(Bv(Ke.useContext(kv)));if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},gS=function(l){var r=l.client,i=l.contextSharing,o=i===void 0?!1:i,u=l.children;Ke.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]);var d=Bv(o);return Ke.createElement(kv.Provider,{value:o},Ke.createElement(d.Provider,{value:r},u))};function bS(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var xS=Ke.createContext(bS()),SS=function(){return Ke.useContext(xS)};function Qv(n,l,r){return typeof l=="function"?l.apply(void 0,r):typeof l=="boolean"?l:!!n}function Nt(n,l,r){var i=Ke.useRef(!1),o=Ke.useState(0),u=o[1],d=P2(n,l,r),m=Hv(),y=Ke.useRef();y.current?y.current.setOptions(d):y.current=new pS(m,d);var p=y.current.getCurrentResult();Ke.useEffect(function(){i.current=!0;var b=y.current.subscribe(Je.batchCalls(function(){i.current&&u(function(E){return E+1})}));return function(){i.current=!1,b()}},[]);var g=Ke.useCallback(function(b,E){y.current.mutate(b,E).catch(_t)},[]);if(p.error&&Qv(void 0,y.current.options.useErrorBoundary,[p.error]))throw p.error;return Ee({},p,{mutate:g,mutateAsync:p.mutate})}function wS(n,l){var r=Ke.useRef(!1),i=Ke.useState(0),o=i[1],u=Hv(),d=SS(),m=u.defaultQueryObserverOptions(n);m.optimisticResults=!0,m.onError&&(m.onError=Je.batchCalls(m.onError)),m.onSuccess&&(m.onSuccess=Je.batchCalls(m.onSuccess)),m.onSettled&&(m.onSettled=Je.batchCalls(m.onSettled)),m.suspense&&(typeof m.staleTime!="number"&&(m.staleTime=1e3),m.cacheTime===0&&(m.cacheTime=1)),(m.suspense||m.useErrorBoundary)&&(d.isReset()||(m.retryOnMount=!1));var y=Ke.useState(function(){return new l(u,m)}),p=y[0],g=p.getOptimisticResult(m);if(Ke.useEffect(function(){r.current=!0,d.clearReset();var b=p.subscribe(Je.batchCalls(function(){r.current&&o(function(E){return E+1})}));return p.updateResult(),function(){r.current=!1,b()}},[d,p]),Ke.useEffect(function(){p.setOptions(m,{listeners:!1})},[m,p]),m.suspense&&g.isLoading)throw p.fetchOptimistic(m).then(function(b){var E=b.data;m.onSuccess==null||m.onSuccess(E),m.onSettled==null||m.onSettled(E,null)}).catch(function(b){d.clearReset(),m.onError==null||m.onError(b),m.onSettled==null||m.onSettled(void 0,b)});if(g.isError&&!d.isReset()&&!g.isFetching&&Qv(m.suspense,m.useErrorBoundary,[g.error,p.getCurrentQuery()]))throw g.error;return m.notifyOnChangeProps==="tracked"&&(g=p.trackResult(g,m)),g}function en(n,l,r){var i=Jo(n,l,r);return wS(i,hS)}function $v(n,l){return function(){return n.apply(l,arguments)}}const{toString:ES}=Object.prototype,{getPrototypeOf:Yd}=Object,{iterator:Cu,toStringTag:Yv}=Symbol,_u=(n=>l=>{const r=ES.call(l);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Hn=n=>(n=n.toLowerCase(),l=>_u(l)===n),Nu=n=>l=>typeof l===n,{isArray:Wi}=Array,pr=Nu("undefined");function CS(n){return n!==null&&!pr(n)&&n.constructor!==null&&!pr(n.constructor)&&Pt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Vv=Hn("ArrayBuffer");function _S(n){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(n):l=n&&n.buffer&&Vv(n.buffer),l}const NS=Nu("string"),Pt=Nu("function"),Kv=Nu("number"),ju=n=>n!==null&&typeof n=="object",jS=n=>n===!0||n===!1,eu=n=>{if(_u(n)!=="object")return!1;const l=Yd(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Yv in n)&&!(Cu in n)},AS=Hn("Date"),TS=Hn("File"),OS=Hn("Blob"),RS=Hn("FileList"),DS=n=>ju(n)&&Pt(n.pipe),MS=n=>{let l;return n&&(typeof FormData=="function"&&n instanceof FormData||Pt(n.append)&&((l=_u(n))==="formdata"||l==="object"&&Pt(n.toString)&&n.toString()==="[object FormData]"))},LS=Hn("URLSearchParams"),[US,qS,zS,kS]=["ReadableStream","Request","Response","Headers"].map(Hn),BS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sr(n,l,{allOwnKeys:r=!1}={}){if(n===null||typeof n>"u")return;let i,o;if(typeof n!="object"&&(n=[n]),Wi(n))for(i=0,o=n.length;i<o;i++)l.call(null,n[i],i,n);else{const u=r?Object.getOwnPropertyNames(n):Object.keys(n),d=u.length;let m;for(i=0;i<d;i++)m=u[i],l.call(null,n[m],m,n)}}function Fv(n,l){l=l.toLowerCase();const r=Object.keys(n);let i=r.length,o;for(;i-- >0;)if(o=r[i],l===o.toLowerCase())return o;return null}const Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gv=n=>!pr(n)&&n!==Vl;function xd(){const{caseless:n}=Gv(this)&&this||{},l={},r=(i,o)=>{const u=n&&Fv(l,o)||o;eu(l[u])&&eu(i)?l[u]=xd(l[u],i):eu(i)?l[u]=xd({},i):Wi(i)?l[u]=i.slice():l[u]=i};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Sr(arguments[i],r);return l}const HS=(n,l,r,{allOwnKeys:i}={})=>(Sr(l,(o,u)=>{r&&Pt(o)?n[u]=$v(o,r):n[u]=o},{allOwnKeys:i}),n),QS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$S=(n,l,r,i)=>{n.prototype=Object.create(l.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:l.prototype}),r&&Object.assign(n.prototype,r)},YS=(n,l,r,i)=>{let o,u,d;const m={};if(l=l||{},n==null)return l;do{for(o=Object.getOwnPropertyNames(n),u=o.length;u-- >0;)d=o[u],(!i||i(d,n,l))&&!m[d]&&(l[d]=n[d],m[d]=!0);n=r!==!1&&Yd(n)}while(n&&(!r||r(n,l))&&n!==Object.prototype);return l},VS=(n,l,r)=>{n=String(n),(r===void 0||r>n.length)&&(r=n.length),r-=l.length;const i=n.indexOf(l,r);return i!==-1&&i===r},KS=n=>{if(!n)return null;if(Wi(n))return n;let l=n.length;if(!Kv(l))return null;const r=new Array(l);for(;l-- >0;)r[l]=n[l];return r},FS=(n=>l=>n&&l instanceof n)(typeof Uint8Array<"u"&&Yd(Uint8Array)),GS=(n,l)=>{const i=(n&&n[Cu]).call(n);let o;for(;(o=i.next())&&!o.done;){const u=o.value;l.call(n,u[0],u[1])}},XS=(n,l)=>{let r;const i=[];for(;(r=n.exec(l))!==null;)i.push(r);return i},ZS=Hn("HTMLFormElement"),PS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,o){return i.toUpperCase()+o}),by=(({hasOwnProperty:n})=>(l,r)=>n.call(l,r))(Object.prototype),JS=Hn("RegExp"),Xv=(n,l)=>{const r=Object.getOwnPropertyDescriptors(n),i={};Sr(r,(o,u)=>{let d;(d=l(o,u,n))!==!1&&(i[u]=d||o)}),Object.defineProperties(n,i)},IS=n=>{Xv(n,(l,r)=>{if(Pt(n)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=n[r];if(Pt(i)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},WS=(n,l)=>{const r={},i=o=>{o.forEach(u=>{r[u]=!0})};return Wi(n)?i(n):i(String(n).split(l)),r},ew=()=>{},tw=(n,l)=>n!=null&&Number.isFinite(n=+n)?n:l;function nw(n){return!!(n&&Pt(n.append)&&n[Yv]==="FormData"&&n[Cu])}const aw=n=>{const l=new Array(10),r=(i,o)=>{if(ju(i)){if(l.indexOf(i)>=0)return;if(!("toJSON"in i)){l[o]=i;const u=Wi(i)?[]:{};return Sr(i,(d,m)=>{const y=r(d,o+1);!pr(y)&&(u[m]=y)}),l[o]=void 0,u}}return i};return r(n,0)},lw=Hn("AsyncFunction"),iw=n=>n&&(ju(n)||Pt(n))&&Pt(n.then)&&Pt(n.catch),Zv=((n,l)=>n?setImmediate:l?((r,i)=>(Vl.addEventListener("message",({source:o,data:u})=>{o===Vl&&u===r&&i.length&&i.shift()()},!1),o=>{i.push(o),Vl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Pt(Vl.postMessage)),sw=typeof queueMicrotask<"u"?queueMicrotask.bind(Vl):typeof process<"u"&&process.nextTick||Zv,rw=n=>n!=null&&Pt(n[Cu]),H={isArray:Wi,isArrayBuffer:Vv,isBuffer:CS,isFormData:MS,isArrayBufferView:_S,isString:NS,isNumber:Kv,isBoolean:jS,isObject:ju,isPlainObject:eu,isReadableStream:US,isRequest:qS,isResponse:zS,isHeaders:kS,isUndefined:pr,isDate:AS,isFile:TS,isBlob:OS,isRegExp:JS,isFunction:Pt,isStream:DS,isURLSearchParams:LS,isTypedArray:FS,isFileList:RS,forEach:Sr,merge:xd,extend:HS,trim:BS,stripBOM:QS,inherits:$S,toFlatObject:YS,kindOf:_u,kindOfTest:Hn,endsWith:VS,toArray:KS,forEachEntry:GS,matchAll:XS,isHTMLForm:ZS,hasOwnProperty:by,hasOwnProp:by,reduceDescriptors:Xv,freezeMethods:IS,toObjectSet:WS,toCamelCase:PS,noop:ew,toFiniteNumber:tw,findKey:Fv,global:Vl,isContextDefined:Gv,isSpecCompliantForm:nw,toJSONObject:aw,isAsyncFn:lw,isThenable:iw,setImmediate:Zv,asap:sw,isIterable:rw};function ve(n,l,r,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",l&&(this.code=l),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}H.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Pv=ve.prototype,Jv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Jv[n]={value:n}});Object.defineProperties(ve,Jv);Object.defineProperty(Pv,"isAxiosError",{value:!0});ve.from=(n,l,r,i,o,u)=>{const d=Object.create(Pv);return H.toFlatObject(n,d,function(y){return y!==Error.prototype},m=>m!=="isAxiosError"),ve.call(d,n.message,l,r,i,o),d.cause=n,d.name=n.name,u&&Object.assign(d,u),d};const ow=null;function Sd(n){return H.isPlainObject(n)||H.isArray(n)}function Iv(n){return H.endsWith(n,"[]")?n.slice(0,-2):n}function xy(n,l,r){return n?n.concat(l).map(function(o,u){return o=Iv(o),!r&&u?"["+o+"]":o}).join(r?".":""):l}function uw(n){return H.isArray(n)&&!n.some(Sd)}const cw=H.toFlatObject(H,{},null,function(l){return/^is[A-Z]/.test(l)});function Au(n,l,r){if(!H.isObject(n))throw new TypeError("target must be an object");l=l||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,N){return!H.isUndefined(N[O])});const i=r.metaTokens,o=r.visitor||g,u=r.dots,d=r.indexes,y=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(l);if(!H.isFunction(o))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if(H.isDate(w))return w.toISOString();if(!y&&H.isBlob(w))throw new ve("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(w)||H.isTypedArray(w)?y&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function g(w,O,N){let _=w;if(w&&!N&&typeof w=="object"){if(H.endsWith(O,"{}"))O=i?O:O.slice(0,-2),w=JSON.stringify(w);else if(H.isArray(w)&&uw(w)||(H.isFileList(w)||H.endsWith(O,"[]"))&&(_=H.toArray(w)))return O=Iv(O),_.forEach(function(j,B){!(H.isUndefined(j)||j===null)&&l.append(d===!0?xy([O],B,u):d===null?O:O+"[]",p(j))}),!1}return Sd(w)?!0:(l.append(xy(N,O,u),p(w)),!1)}const b=[],E=Object.assign(cw,{defaultVisitor:g,convertValue:p,isVisitable:Sd});function C(w,O){if(!H.isUndefined(w)){if(b.indexOf(w)!==-1)throw Error("Circular reference detected in "+O.join("."));b.push(w),H.forEach(w,function(_,A){(!(H.isUndefined(_)||_===null)&&o.call(l,_,H.isString(A)?A.trim():A,O,E))===!0&&C(_,O?O.concat(A):[A])}),b.pop()}}if(!H.isObject(n))throw new TypeError("data must be an object");return C(n),l}function Sy(n){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return l[i]})}function Vd(n,l){this._pairs=[],n&&Au(n,this,l)}const Wv=Vd.prototype;Wv.append=function(l,r){this._pairs.push([l,r])};Wv.toString=function(l){const r=l?function(i){return l.call(this,i,Sy)}:Sy;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function fw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function e1(n,l,r){if(!l)return n;const i=r&&r.encode||fw;H.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let u;if(o?u=o(l,r):u=H.isURLSearchParams(l)?l.toString():new Vd(l,r).toString(i),u){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+u}return n}class wy{constructor(){this.handlers=[]}use(l,r,i){return this.handlers.push({fulfilled:l,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){H.forEach(this.handlers,function(i){i!==null&&l(i)})}}const t1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dw=typeof URLSearchParams<"u"?URLSearchParams:Vd,hw=typeof FormData<"u"?FormData:null,mw=typeof Blob<"u"?Blob:null,pw={isBrowser:!0,classes:{URLSearchParams:dw,FormData:hw,Blob:mw},protocols:["http","https","file","blob","url","data"]},Kd=typeof window<"u"&&typeof document<"u",wd=typeof navigator=="object"&&navigator||void 0,yw=Kd&&(!wd||["ReactNative","NativeScript","NS"].indexOf(wd.product)<0),vw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gw=Kd&&window.location.href||"http://localhost",bw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kd,hasStandardBrowserEnv:yw,hasStandardBrowserWebWorkerEnv:vw,navigator:wd,origin:gw},Symbol.toStringTag,{value:"Module"})),Lt={...bw,...pw};function xw(n,l){return Au(n,new Lt.classes.URLSearchParams,Object.assign({visitor:function(r,i,o,u){return Lt.isNode&&H.isBuffer(r)?(this.append(i,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},l))}function Sw(n){return H.matchAll(/\w+|\[(\w*)]/g,n).map(l=>l[0]==="[]"?"":l[1]||l[0])}function ww(n){const l={},r=Object.keys(n);let i;const o=r.length;let u;for(i=0;i<o;i++)u=r[i],l[u]=n[u];return l}function n1(n){function l(r,i,o,u){let d=r[u++];if(d==="__proto__")return!0;const m=Number.isFinite(+d),y=u>=r.length;return d=!d&&H.isArray(o)?o.length:d,y?(H.hasOwnProp(o,d)?o[d]=[o[d],i]:o[d]=i,!m):((!o[d]||!H.isObject(o[d]))&&(o[d]=[]),l(r,i,o[d],u)&&H.isArray(o[d])&&(o[d]=ww(o[d])),!m)}if(H.isFormData(n)&&H.isFunction(n.entries)){const r={};return H.forEachEntry(n,(i,o)=>{l(Sw(i),o,r,0)}),r}return null}function Ew(n,l,r){if(H.isString(n))try{return(l||JSON.parse)(n),H.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(n)}const wr={transitional:t1,adapter:["xhr","http","fetch"],transformRequest:[function(l,r){const i=r.getContentType()||"",o=i.indexOf("application/json")>-1,u=H.isObject(l);if(u&&H.isHTMLForm(l)&&(l=new FormData(l)),H.isFormData(l))return o?JSON.stringify(n1(l)):l;if(H.isArrayBuffer(l)||H.isBuffer(l)||H.isStream(l)||H.isFile(l)||H.isBlob(l)||H.isReadableStream(l))return l;if(H.isArrayBufferView(l))return l.buffer;if(H.isURLSearchParams(l))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let m;if(u){if(i.indexOf("application/x-www-form-urlencoded")>-1)return xw(l,this.formSerializer).toString();if((m=H.isFileList(l))||i.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Au(m?{"files[]":l}:l,y&&new y,this.formSerializer)}}return u||o?(r.setContentType("application/json",!1),Ew(l)):l}],transformResponse:[function(l){const r=this.transitional||wr.transitional,i=r&&r.forcedJSONParsing,o=this.responseType==="json";if(H.isResponse(l)||H.isReadableStream(l))return l;if(l&&H.isString(l)&&(i&&!this.responseType||o)){const d=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(l)}catch(m){if(d)throw m.name==="SyntaxError"?ve.from(m,ve.ERR_BAD_RESPONSE,this,null,this.response):m}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],n=>{wr.headers[n]={}});const Cw=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_w=n=>{const l={};let r,i,o;return n&&n.split(`
51
+ Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let E=Yt(),C;if(l){let j=typeof l=="string"?Zi(l):l;et(g==="/"||((A=j.pathname)==null?void 0:A.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${j.pathname}" was given in the \`location\` prop.`),C=j}else C=E;let w=C.pathname||"/",O=w;if(g!=="/"){let j=g.replace(/^\//,"").split("/");O="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let N=!u&&r&&r.matches&&r.matches.length>0?r.matches:dv(n,{pathname:O});qn(b||N!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),qn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${C.pathname}${C.search}${C.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=a2(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},y,j.params),pathname:Da([g,o.encodeLocation?o.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:Da([g,o.encodeLocation?o.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),d,r,i);return l&&_?x.createElement(vr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},_):_}function Wx(){let n=o2(),l=Kx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:u},"ErrorBoundary")," or"," ",x.createElement("code",{style:u},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},l),r?x.createElement("pre",{style:o},r):null,d)}var e2=x.createElement(Wx,null),t2=class extends x.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){console.error("React Router caught the following error during render",n,l)}render(){return this.state.error!==void 0?x.createElement(aa.Provider,{value:this.props.routeContext},x.createElement(zd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function n2({routeContext:n,match:l,children:r}){let i=x.useContext(Pi);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),x.createElement(aa.Provider,{value:n},r)}function a2(n,l=[],r=null,i=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(l.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let o=n,u=r==null?void 0:r.errors;if(u!=null){let y=o.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);et(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let d=!1,m=-1;if(r)for(let y=0;y<o.length;y++){let p=o[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(m=y),p.route.id){let{loaderData:g,errors:b}=r,E=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!b||b[p.route.id]===void 0);if(p.route.lazy||E){d=!0,m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}return o.reduceRight((y,p,g)=>{let b,E=!1,C=null,w=null;r&&(b=u&&p.route.id?u[p.route.id]:void 0,C=p.route.errorElement||e2,d&&(m<0&&g===0?(wv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,w=null):m===g&&(E=!0,w=p.route.hydrateFallbackElement||null)));let O=l.concat(o.slice(0,g+1)),N=()=>{let _;return b?_=C:E?_=w:p.route.Component?_=x.createElement(p.route.Component,null):p.route.element?_=p.route.element:_=y,x.createElement(n2,{match:p,routeContext:{outlet:y,matches:O,isDataRoute:r!=null},children:_})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?x.createElement(t2,{location:r.location,revalidation:r.revalidation,component:C,error:b,children:N(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):N()},null)}function qd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l2(n){let l=x.useContext(Pi);return et(l,qd(n)),l}function i2(n){let l=x.useContext(wu);return et(l,qd(n)),l}function s2(n){let l=x.useContext(aa);return et(l,qd(n)),l}function kd(n){let l=s2(n),r=l.matches[l.matches.length-1];return et(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function r2(){return kd("useRouteId")}function o2(){var i;let n=x.useContext(zd),l=i2("useRouteError"),r=kd("useRouteError");return n!==void 0?n:(i=l.errors)==null?void 0:i[r]}function u2(){let{router:n}=l2("useNavigate"),l=kd("useNavigate"),r=x.useRef(!1);return xv(()=>{r.current=!0}),x.useCallback(async(o,u={})=>{qn(r.current,bv),r.current&&(typeof o=="number"?n.navigate(o):await n.navigate(o,{fromRouteId:l,...u}))},[n,l])}var uy={};function wv(n,l,r){!l&&!uy[n]&&(uy[n]=!0,qn(!1,r))}x.memo(c2);function c2({routes:n,future:l,state:r}){return Sv(n,void 0,r,l)}function cr(n){et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function f2({basename:n="/",children:l=null,location:r,navigationType:i="POP",navigator:o,static:u=!1}){et(!gr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),m=x.useMemo(()=>({basename:d,navigator:o,static:u,future:{}}),[d,o,u]);typeof r=="string"&&(r=Zi(r));let{pathname:y="/",search:p="",hash:g="",state:b=null,key:E="default"}=r,C=x.useMemo(()=>{let w=Ma(y,d);return w==null?null:{location:{pathname:w,search:p,hash:g,state:b,key:E},navigationType:i}},[d,y,p,g,b,E,i]);return qn(C!=null,`<Router basename="${d}"> is not able to match the URL "${y}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:x.createElement(na.Provider,{value:m},x.createElement(vr.Provider,{children:l,value:C}))}function d2({children:n,location:l}){return Ix(md(n),l)}function md(n,l=[]){let r=[];return x.Children.forEach(n,(i,o)=>{if(!x.isValidElement(i))return;let u=[...l,o];if(i.type===x.Fragment){r.push.apply(r,md(i.props.children,u));return}et(i.type===cr,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),et(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=md(i.props.children,u)),r.push(d)}),r}var Zo="get",Po="application/x-www-form-urlencoded";function Eu(n){return n!=null&&typeof n.tagName=="string"}function h2(n){return Eu(n)&&n.tagName.toLowerCase()==="button"}function m2(n){return Eu(n)&&n.tagName.toLowerCase()==="form"}function p2(n){return Eu(n)&&n.tagName.toLowerCase()==="input"}function y2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function v2(n,l){return n.button===0&&(!l||l==="_self")&&!y2(n)}function pd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,r)=>{let i=n[r];return l.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function g2(n,l){let r=pd(n);return l&&l.forEach((i,o)=>{r.has(o)||l.getAll(o).forEach(u=>{r.append(o,u)})}),r}var Vo=null;function b2(){if(Vo===null)try{new FormData(document.createElement("form"),0),Vo=!1}catch{Vo=!0}return Vo}var x2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function If(n){return n!=null&&!x2.has(n)?(qn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Po}"`),null):n}function S2(n,l){let r,i,o,u,d;if(m2(n)){let m=n.getAttribute("action");i=m?Ma(m,l):null,r=n.getAttribute("method")||Zo,o=If(n.getAttribute("enctype"))||Po,u=new FormData(n)}else if(h2(n)||p2(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||m.getAttribute("action");if(i=y?Ma(y,l):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Zo,o=If(n.getAttribute("formenctype"))||If(m.getAttribute("enctype"))||Po,u=new FormData(m,n),!b2()){let{name:p,type:g,value:b}=n;if(g==="image"){let E=p?`${p}.`:"";u.append(`${E}x`,"0"),u.append(`${E}y`,"0")}else p&&u.append(p,b)}}else{if(Eu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Zo,i=null,o=Po,d=n}return u&&o==="text/plain"&&(d=u,u=void 0),{action:i,method:r.toLowerCase(),encType:o,formData:u,body:d}}function Bd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}async function w2(n,l){if(n.id in l)return l[n.id];try{let r=await import(n.module);return l[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function E2(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function C2(n,l,r){let i=await Promise.all(n.map(async o=>{let u=l.routes[o.route.id];if(u){let d=await w2(u,r);return d.links?d.links():[]}return[]}));return A2(i.flat(1).filter(E2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function cy(n,l,r,i,o,u){let d=(y,p)=>r[p]?y.route.id!==r[p].route.id:!0,m=(y,p)=>{var g;return r[p].pathname!==y.pathname||((g=r[p].route.path)==null?void 0:g.endsWith("*"))&&r[p].params["*"]!==y.params["*"]};return u==="assets"?l.filter((y,p)=>d(y,p)||m(y,p)):u==="data"?l.filter((y,p)=>{var b;let g=i.routes[y.route.id];if(!g||!g.hasLoader)return!1;if(d(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let E=y.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=r[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function _2(n,l,{includeHydrateFallback:r}={}){return N2(n.map(i=>{let o=l.routes[i.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function N2(n){return[...new Set(n)]}function j2(n){let l={},r=Object.keys(n).sort();for(let i of r)l[i]=n[i];return l}function A2(n,l){let r=new Set;return new Set(l),n.reduce((i,o)=>{let u=JSON.stringify(j2(o));return r.has(u)||(r.add(u),i.push({key:u,link:o})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var T2=new Set([100,101,204,205]);function O2(n,l){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r.pathname==="/"?r.pathname="_root.data":l&&Ma(r.pathname,l)==="/"?r.pathname=`${l.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Ev(){let n=x.useContext(Pi);return Bd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function R2(){let n=x.useContext(wu);return Bd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Hd=x.createContext(void 0);Hd.displayName="FrameworkContext";function Cv(){let n=x.useContext(Hd);return Bd(n,"You must render this element inside a <HydratedRouter> element"),n}function D2(n,l){let r=x.useContext(Hd),[i,o]=x.useState(!1),[u,d]=x.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:g,onTouchStart:b}=l,E=x.useRef(null);x.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let O=_=>{_.forEach(A=>{d(A.isIntersecting)})},N=new IntersectionObserver(O,{threshold:.5});return E.current&&N.observe(E.current),()=>{N.disconnect()}}},[n]),x.useEffect(()=>{if(i){let O=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(O)}}},[i]);let C=()=>{o(!0)},w=()=>{o(!1),d(!1)};return r?n!=="intent"?[u,E,{}]:[u,E,{onFocus:ir(m,C),onBlur:ir(y,w),onMouseEnter:ir(p,C),onMouseLeave:ir(g,w),onTouchStart:ir(b,C)}]:[!1,E,{}]}function ir(n,l){return r=>{n&&n(r),r.defaultPrevented||l(r)}}function M2({page:n,...l}){let{router:r}=Ev(),i=x.useMemo(()=>dv(r.routes,n,r.basename),[r.routes,n,r.basename]);return i?x.createElement(U2,{page:n,matches:i,...l}):null}function L2(n){let{manifest:l,routeModules:r}=Cv(),[i,o]=x.useState([]);return x.useEffect(()=>{let u=!1;return C2(n,l,r).then(d=>{u||o(d)}),()=>{u=!0}},[n,l,r]),i}function U2({page:n,matches:l,...r}){let i=Yt(),{manifest:o,routeModules:u}=Cv(),{basename:d}=Ev(),{loaderData:m,matches:y}=R2(),p=x.useMemo(()=>cy(n,l,y,o,i,"data"),[n,l,y,o,i]),g=x.useMemo(()=>cy(n,l,y,o,i,"assets"),[n,l,y,o,i]),b=x.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let w=new Set,O=!1;if(l.forEach(_=>{var j;let A=o.routes[_.route.id];!A||!A.hasLoader||(!p.some(B=>B.route.id===_.route.id)&&_.route.id in m&&((j=u[_.route.id])!=null&&j.shouldRevalidate)||A.hasClientLoader?O=!0:w.add(_.route.id))}),w.size===0)return[];let N=O2(n,d);return O&&w.size>0&&N.searchParams.set("_routes",l.filter(_=>w.has(_.route.id)).map(_=>_.route.id).join(",")),[N.pathname+N.search]},[d,m,i,o,p,l,n,u]),E=x.useMemo(()=>_2(g,o),[g,o]),C=L2(g);return x.createElement(x.Fragment,null,b.map(w=>x.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),E.map(w=>x.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),C.map(({key:w,link:O})=>x.createElement("link",{key:w,...O})))}function z2(...n){return l=>{n.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var _v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_v&&(window.__reactRouterVersion="7.6.0")}catch{}function q2({basename:n,children:l,window:r}){let i=x.useRef();i.current==null&&(i.current=wx({window:r,v5Compat:!0}));let o=i.current,[u,d]=x.useState({action:o.action,location:o.location}),m=x.useCallback(y=>{x.startTransition(()=>d(y))},[d]);return x.useLayoutEffect(()=>o.listen(m),[o,m]),x.createElement(f2,{basename:n,children:l,location:u.location,navigationType:u.action,navigator:o})}var Nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jv=x.forwardRef(function({onClick:l,discover:r="render",prefetch:i="none",relative:o,reloadDocument:u,replace:d,state:m,target:y,to:p,preventScrollReset:g,viewTransition:b,...E},C){let{basename:w}=x.useContext(na),O=typeof p=="string"&&Nv.test(p),N,_=!1;if(typeof p=="string"&&O&&(N=p,_v))try{let te=new URL(window.location.href),pe=p.startsWith("//")?new URL(te.protocol+p):new URL(p),Re=Ma(pe.pathname,w);pe.origin===te.origin&&Re!=null?p=Re+pe.search+pe.hash:_=!0}catch{qn(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=Zx(p,{relative:o}),[j,B,V]=D2(i,E),Q=Q2(p,{replace:d,state:m,target:y,preventScrollReset:g,relative:o,viewTransition:b});function G(te){l&&l(te),te.defaultPrevented||Q(te)}let Z=x.createElement("a",{...E,...V,href:N||A,onClick:_||u?l:G,ref:z2(C,B),target:y,"data-discover":!O&&r==="render"?"true":void 0});return j&&!O?x.createElement(x.Fragment,null,Z,x.createElement(M2,{page:A})):Z});jv.displayName="Link";var k2=x.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:i="",end:o=!1,style:u,to:d,viewTransition:m,children:y,...p},g){let b=br(d,{relative:p.relative}),E=Yt(),C=x.useContext(wu),{navigator:w,basename:O}=x.useContext(na),N=C!=null&&G2(b)&&m===!0,_=w.encodeLocation?w.encodeLocation(b).pathname:b.pathname,A=E.pathname,j=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;r||(A=A.toLowerCase(),j=j?j.toLowerCase():null,_=_.toLowerCase()),j&&O&&(j=Ma(j,O)||j);const B=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let V=A===_||!o&&A.startsWith(_)&&A.charAt(B)==="/",Q=j!=null&&(j===_||!o&&j.startsWith(_)&&j.charAt(_.length)==="/"),G={isActive:V,isPending:Q,isTransitioning:N},Z=V?l:void 0,te;typeof i=="function"?te=i(G):te=[i,V?"active":null,Q?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let pe=typeof u=="function"?u(G):u;return x.createElement(jv,{...p,"aria-current":Z,className:te,ref:g,style:pe,to:d,viewTransition:m},typeof y=="function"?y(G):y)});k2.displayName="NavLink";var B2=x.forwardRef(({discover:n="render",fetcherKey:l,navigate:r,reloadDocument:i,replace:o,state:u,method:d=Zo,action:m,onSubmit:y,relative:p,preventScrollReset:g,viewTransition:b,...E},C)=>{let w=K2(),O=F2(m,{relative:p}),N=d.toLowerCase()==="get"?"get":"post",_=typeof m=="string"&&Nv.test(m),A=j=>{if(y&&y(j),j.defaultPrevented)return;j.preventDefault();let B=j.nativeEvent.submitter,V=(B==null?void 0:B.getAttribute("formmethod"))||d;w(B||j.currentTarget,{fetcherKey:l,method:V,navigate:r,replace:o,state:u,relative:p,preventScrollReset:g,viewTransition:b})};return x.createElement("form",{ref:C,method:N,action:O,onSubmit:i?y:A,...E,"data-discover":!_&&n==="render"?"true":void 0})});B2.displayName="Form";function H2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Av(n){let l=x.useContext(Pi);return et(l,H2(n)),l}function Q2(n,{target:l,replace:r,state:i,preventScrollReset:o,relative:u,viewTransition:d}={}){let m=qt(),y=Yt(),p=br(n,{relative:u});return x.useCallback(g=>{if(v2(g,l)){g.preventDefault();let b=r!==void 0?r:hr(y)===hr(p);m(n,{replace:b,state:i,preventScrollReset:o,relative:u,viewTransition:d})}},[y,m,p,r,i,l,n,o,u,d])}function $2(n){qn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=x.useRef(pd(n)),r=x.useRef(!1),i=Yt(),o=x.useMemo(()=>g2(i.search,r.current?null:l.current),[i.search]),u=qt(),d=x.useCallback((m,y)=>{const p=pd(typeof m=="function"?m(o):m);r.current=!0,u("?"+p,y)},[u,o]);return[o,d]}var Y2=0,V2=()=>`__${String(++Y2)}__`;function K2(){let{router:n}=Av("useSubmit"),{basename:l}=x.useContext(na),r=r2();return x.useCallback(async(i,o={})=>{let{action:u,method:d,encType:m,formData:y,body:p}=S2(i,l);if(o.navigate===!1){let g=o.fetcherKey||V2();await n.fetch(g,r,o.action||u,{preventScrollReset:o.preventScrollReset,formData:y,body:p,formMethod:o.method||d,formEncType:o.encType||m,flushSync:o.flushSync})}else await n.navigate(o.action||u,{preventScrollReset:o.preventScrollReset,formData:y,body:p,formMethod:o.method||d,formEncType:o.encType||m,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,l,r])}function F2(n,{relative:l}={}){let{basename:r}=x.useContext(na),i=x.useContext(aa);et(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...br(n||".",{relative:l})},d=Yt();if(n==null){u.search=d.search;let m=new URLSearchParams(u.search),y=m.getAll("index");if(y.some(g=>g==="")){m.delete("index"),y.filter(b=>b).forEach(b=>m.append("index",b));let g=m.toString();u.search=g?`?${g}`:""}}return(!n||n===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Da([r,u.pathname])),hr(u)}function G2(n,l={}){let r=x.useContext(gv);et(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Av("useViewTransitionState"),o=br(n,{relative:l.relative});if(!r.isTransitioning)return!1;let u=Ma(r.currentLocation.pathname,i)||r.currentLocation.pathname,d=Ma(r.nextLocation.pathname,i)||r.nextLocation.pathname;return mr(o.pathname,d)!=null||mr(o.pathname,u)!=null}[...T2];var Tv=fv();const X2=Su(Tv);function yd(n,l){return yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yd(n,l)}function Ji(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,yd(n,l)}var Ii=function(){function n(){this.listeners=[]}var l=n.prototype;return l.subscribe=function(i){var o=this,u=i||function(){};return this.listeners.push(u),this.onSubscribe(),function(){o.listeners=o.listeners.filter(function(d){return d!==u}),o.onUnsubscribe()}},l.hasListeners=function(){return this.listeners.length>0},l.onSubscribe=function(){},l.onUnsubscribe=function(){},n}();function Ee(){return Ee=Object.assign?Object.assign.bind():function(n){for(var l=1;l<arguments.length;l++){var r=arguments[l];for(var i in r)({}).hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n},Ee.apply(null,arguments)}var ru=typeof window>"u";function _t(){}function Z2(n,l){return typeof n=="function"?n(l):n}function vd(n){return typeof n=="number"&&n>=0&&n!==1/0}function ou(n){return Array.isArray(n)?n:[n]}function Ov(n,l){return Math.max(n+(l||0)-Date.now(),0)}function Jo(n,l,r){return xr(n)?typeof l=="function"?Ee({},r,{queryKey:n,queryFn:l}):Ee({},l,{queryKey:n}):n}function P2(n,l,r){return xr(n)?typeof l=="function"?Ee({},r,{mutationKey:n,mutationFn:l}):Ee({},l,{mutationKey:n}):typeof n=="function"?Ee({},l,{mutationFn:n}):Ee({},n)}function cl(n,l,r){return xr(n)?[Ee({},l,{queryKey:n}),r]:[n||{},l]}function J2(n,l){if(n===!0&&l===!0||n==null&&l==null)return"all";if(n===!1&&l===!1)return"none";var r=n??!l;return r?"active":"inactive"}function fy(n,l){var r=n.active,i=n.exact,o=n.fetching,u=n.inactive,d=n.predicate,m=n.queryKey,y=n.stale;if(xr(m)){if(i){if(l.queryHash!==Qd(m,l.options))return!1}else if(!uu(l.queryKey,m))return!1}var p=J2(r,u);if(p==="none")return!1;if(p!=="all"){var g=l.isActive();if(p==="active"&&!g||p==="inactive"&&g)return!1}return!(typeof y=="boolean"&&l.isStale()!==y||typeof o=="boolean"&&l.isFetching()!==o||d&&!d(l))}function dy(n,l){var r=n.exact,i=n.fetching,o=n.predicate,u=n.mutationKey;if(xr(u)){if(!l.options.mutationKey)return!1;if(r){if(Yl(l.options.mutationKey)!==Yl(u))return!1}else if(!uu(l.options.mutationKey,u))return!1}return!(typeof i=="boolean"&&l.state.status==="loading"!==i||o&&!o(l))}function Qd(n,l){var r=(l==null?void 0:l.queryKeyHashFn)||Yl;return r(n)}function Yl(n){var l=ou(n);return I2(l)}function I2(n){return JSON.stringify(n,function(l,r){return gd(r)?Object.keys(r).sort().reduce(function(i,o){return i[o]=r[o],i},{}):r})}function uu(n,l){return Rv(ou(n),ou(l))}function Rv(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?!Object.keys(l).some(function(r){return!Rv(n[r],l[r])}):!1}function cu(n,l){if(n===l)return n;var r=Array.isArray(n)&&Array.isArray(l);if(r||gd(n)&&gd(l)){for(var i=r?n.length:Object.keys(n).length,o=r?l:Object.keys(l),u=o.length,d=r?[]:{},m=0,y=0;y<u;y++){var p=r?y:o[y];d[p]=cu(n[p],l[p]),d[p]===n[p]&&m++}return i===u&&m===i?n:d}return l}function W2(n,l){if(n&&!l||l&&!n)return!1;for(var r in n)if(n[r]!==l[r])return!1;return!0}function gd(n){if(!hy(n))return!1;var l=n.constructor;if(typeof l>"u")return!0;var r=l.prototype;return!(!hy(r)||!r.hasOwnProperty("isPrototypeOf"))}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}function xr(n){return typeof n=="string"||Array.isArray(n)}function eS(n){return new Promise(function(l){setTimeout(l,n)})}function my(n){Promise.resolve().then(n).catch(function(l){return setTimeout(function(){throw l})})}function Dv(){if(typeof AbortController=="function")return new AbortController}var tS=function(n){Ji(l,n);function l(){var i;return i=n.call(this)||this,i.setup=function(o){var u;if(!ru&&((u=window)!=null&&u.addEventListener)){var d=function(){return o()};return window.addEventListener("visibilitychange",d,!1),window.addEventListener("focus",d,!1),function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("focus",d)}}},i}var r=l.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var o;(o=this.cleanup)==null||o.call(this),this.cleanup=void 0}},r.setEventListener=function(o){var u,d=this;this.setup=o,(u=this.cleanup)==null||u.call(this),this.cleanup=o(function(m){typeof m=="boolean"?d.setFocused(m):d.onFocus()})},r.setFocused=function(o){this.focused=o,o&&this.onFocus()},r.onFocus=function(){this.listeners.forEach(function(o){o()})},r.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},l}(Ii),fr=new tS,nS=function(n){Ji(l,n);function l(){var i;return i=n.call(this)||this,i.setup=function(o){var u;if(!ru&&((u=window)!=null&&u.addEventListener)){var d=function(){return o()};return window.addEventListener("online",d,!1),window.addEventListener("offline",d,!1),function(){window.removeEventListener("online",d),window.removeEventListener("offline",d)}}},i}var r=l.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var o;(o=this.cleanup)==null||o.call(this),this.cleanup=void 0}},r.setEventListener=function(o){var u,d=this;this.setup=o,(u=this.cleanup)==null||u.call(this),this.cleanup=o(function(m){typeof m=="boolean"?d.setOnline(m):d.onOnline()})},r.setOnline=function(o){this.online=o,o&&this.onOnline()},r.onOnline=function(){this.listeners.forEach(function(o){o()})},r.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},l}(Ii),Io=new nS;function aS(n){return Math.min(1e3*Math.pow(2,n),3e4)}function fu(n){return typeof(n==null?void 0:n.cancel)=="function"}var Mv=function(l){this.revert=l==null?void 0:l.revert,this.silent=l==null?void 0:l.silent};function Wo(n){return n instanceof Mv}var Lv=function(l){var r=this,i=!1,o,u,d,m;this.abort=l.abort,this.cancel=function(E){return o==null?void 0:o(E)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return u==null?void 0:u()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(E,C){d=E,m=C});var y=function(C){r.isResolved||(r.isResolved=!0,l.onSuccess==null||l.onSuccess(C),u==null||u(),d(C))},p=function(C){r.isResolved||(r.isResolved=!0,l.onError==null||l.onError(C),u==null||u(),m(C))},g=function(){return new Promise(function(C){u=C,r.isPaused=!0,l.onPause==null||l.onPause()}).then(function(){u=void 0,r.isPaused=!1,l.onContinue==null||l.onContinue()})},b=function E(){if(!r.isResolved){var C;try{C=l.fn()}catch(w){C=Promise.reject(w)}o=function(O){if(!r.isResolved&&(p(new Mv(O)),r.abort==null||r.abort(),fu(C)))try{C.cancel()}catch{}},r.isTransportCancelable=fu(C),Promise.resolve(C).then(y).catch(function(w){var O,N;if(!r.isResolved){var _=(O=l.retry)!=null?O:3,A=(N=l.retryDelay)!=null?N:aS,j=typeof A=="function"?A(r.failureCount,w):A,B=_===!0||typeof _=="number"&&r.failureCount<_||typeof _=="function"&&_(r.failureCount,w);if(i||!B){p(w);return}r.failureCount++,l.onFail==null||l.onFail(r.failureCount,w),eS(j).then(function(){if(!fr.isFocused()||!Io.isOnline())return g()}).then(function(){i?p(w):E()})}})}};b()},lS=function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(r){r()},this.batchNotifyFn=function(r){r()}}var l=n.prototype;return l.batch=function(i){var o;this.transactions++;try{o=i()}finally{this.transactions--,this.transactions||this.flush()}return o},l.schedule=function(i){var o=this;this.transactions?this.queue.push(i):my(function(){o.notifyFn(i)})},l.batchCalls=function(i){var o=this;return function(){for(var u=arguments.length,d=new Array(u),m=0;m<u;m++)d[m]=arguments[m];o.schedule(function(){i.apply(void 0,d)})}},l.flush=function(){var i=this,o=this.queue;this.queue=[],o.length&&my(function(){i.batchNotifyFn(function(){o.forEach(function(u){i.notifyFn(u)})})})},l.setNotifyFunction=function(i){this.notifyFn=i},l.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n}(),Je=new lS,Uv=console;function du(){return Uv}function iS(n){Uv=n}var sS=function(){function n(r){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=r.defaultOptions,this.setOptions(r.options),this.observers=[],this.cache=r.cache,this.queryKey=r.queryKey,this.queryHash=r.queryHash,this.initialState=r.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=r.meta,this.scheduleGc()}var l=n.prototype;return l.setOptions=function(i){var o;this.options=Ee({},this.defaultOptions,i),this.meta=i==null?void 0:i.meta,this.cacheTime=Math.max(this.cacheTime||0,(o=this.options.cacheTime)!=null?o:5*60*1e3)},l.setDefaultOptions=function(i){this.defaultOptions=i},l.scheduleGc=function(){var i=this;this.clearGcTimeout(),vd(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.optionalRemove()},this.cacheTime))},l.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},l.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},l.setData=function(i,o){var u,d,m=this.state.data,y=Z2(i,m);return(u=(d=this.options).isDataEqual)!=null&&u.call(d,m,y)?y=m:this.options.structuralSharing!==!1&&(y=cu(m,y)),this.dispatch({data:y,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt}),y},l.setState=function(i,o){this.dispatch({type:"setState",state:i,setStateOptions:o})},l.cancel=function(i){var o,u=this.promise;return(o=this.retryer)==null||o.cancel(i),u?u.then(_t).catch(_t):Promise.resolve()},l.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},l.reset=function(){this.destroy(),this.setState(this.initialState)},l.isActive=function(){return this.observers.some(function(i){return i.options.enabled!==!1})},l.isFetching=function(){return this.state.isFetching},l.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},l.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!Ov(this.state.dataUpdatedAt,i)},l.onFocus=function(){var i,o=this.observers.find(function(u){return u.shouldFetchOnWindowFocus()});o&&o.refetch(),(i=this.retryer)==null||i.continue()},l.onOnline=function(){var i,o=this.observers.find(function(u){return u.shouldFetchOnReconnect()});o&&o.refetch(),(i=this.retryer)==null||i.continue()},l.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},l.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(o){return o!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},l.getObserversCount=function(){return this.observers.length},l.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},l.fetch=function(i,o){var u=this,d,m,y;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var p;return(p=this.retryer)==null||p.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var g=this.observers.find(function(A){return A.options.queryFn});g&&this.setOptions(g.options)}var b=ou(this.queryKey),E=Dv(),C={queryKey:b,pageParam:void 0,meta:this.meta};Object.defineProperty(C,"signal",{enumerable:!0,get:function(){if(E)return u.abortSignalConsumed=!0,E.signal}});var w=function(){return u.options.queryFn?(u.abortSignalConsumed=!1,u.options.queryFn(C)):Promise.reject("Missing queryFn")},O={fetchOptions:o,options:this.options,queryKey:b,state:this.state,fetchFn:w,meta:this.meta};if((d=this.options.behavior)!=null&&d.onFetch){var N;(N=this.options.behavior)==null||N.onFetch(O)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((m=O.fetchOptions)==null?void 0:m.meta)){var _;this.dispatch({type:"fetch",meta:(_=O.fetchOptions)==null?void 0:_.meta})}return this.retryer=new Lv({fn:O.fetchFn,abort:E==null||(y=E.abort)==null?void 0:y.bind(E),onSuccess:function(j){u.setData(j),u.cache.config.onSuccess==null||u.cache.config.onSuccess(j,u),u.cacheTime===0&&u.optionalRemove()},onError:function(j){Wo(j)&&j.silent||u.dispatch({type:"error",error:j}),Wo(j)||(u.cache.config.onError==null||u.cache.config.onError(j,u),du().error(j)),u.cacheTime===0&&u.optionalRemove()},onFail:function(){u.dispatch({type:"failed"})},onPause:function(){u.dispatch({type:"pause"})},onContinue:function(){u.dispatch({type:"continue"})},retry:O.options.retry,retryDelay:O.options.retryDelay}),this.promise=this.retryer.promise,this.promise},l.dispatch=function(i){var o=this;this.state=this.reducer(this.state,i),Je.batch(function(){o.observers.forEach(function(u){u.onQueryUpdate(i)}),o.cache.notify({query:o,type:"queryUpdated",action:i})})},l.getDefaultState=function(i){var o=typeof i.initialData=="function"?i.initialData():i.initialData,u=typeof i.initialData<"u",d=u?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,m=typeof o<"u";return{data:o,dataUpdateCount:0,dataUpdatedAt:m?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:m?"success":"idle"}},l.reducer=function(i,o){var u,d;switch(o.type){case"failed":return Ee({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return Ee({},i,{isPaused:!0});case"continue":return Ee({},i,{isPaused:!1});case"fetch":return Ee({},i,{fetchFailureCount:0,fetchMeta:(u=o.meta)!=null?u:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ee({},i,{data:o.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(d=o.dataUpdatedAt)!=null?d:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var m=o.error;return Wo(m)&&m.revert&&this.revertState?Ee({},this.revertState):Ee({},i,{error:m,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Ee({},i,{isInvalidated:!0});case"setState":return Ee({},i,o.state);default:return i}},n}(),rS=function(n){Ji(l,n);function l(i){var o;return o=n.call(this)||this,o.config=i||{},o.queries=[],o.queriesMap={},o}var r=l.prototype;return r.build=function(o,u,d){var m,y=u.queryKey,p=(m=u.queryHash)!=null?m:Qd(y,u),g=this.get(p);return g||(g=new sS({cache:this,queryKey:y,queryHash:p,options:o.defaultQueryOptions(u),state:d,defaultOptions:o.getQueryDefaults(y),meta:u.meta}),this.add(g)),g},r.add=function(o){this.queriesMap[o.queryHash]||(this.queriesMap[o.queryHash]=o,this.queries.push(o),this.notify({type:"queryAdded",query:o}))},r.remove=function(o){var u=this.queriesMap[o.queryHash];u&&(o.destroy(),this.queries=this.queries.filter(function(d){return d!==o}),u===o&&delete this.queriesMap[o.queryHash],this.notify({type:"queryRemoved",query:o}))},r.clear=function(){var o=this;Je.batch(function(){o.queries.forEach(function(u){o.remove(u)})})},r.get=function(o){return this.queriesMap[o]},r.getAll=function(){return this.queries},r.find=function(o,u){var d=cl(o,u),m=d[0];return typeof m.exact>"u"&&(m.exact=!0),this.queries.find(function(y){return fy(m,y)})},r.findAll=function(o,u){var d=cl(o,u),m=d[0];return Object.keys(m).length>0?this.queries.filter(function(y){return fy(m,y)}):this.queries},r.notify=function(o){var u=this;Je.batch(function(){u.listeners.forEach(function(d){d(o)})})},r.onFocus=function(){var o=this;Je.batch(function(){o.queries.forEach(function(u){u.onFocus()})})},r.onOnline=function(){var o=this;Je.batch(function(){o.queries.forEach(function(u){u.onOnline()})})},l}(Ii),oS=function(){function n(r){this.options=Ee({},r.defaultOptions,r.options),this.mutationId=r.mutationId,this.mutationCache=r.mutationCache,this.observers=[],this.state=r.state||zv(),this.meta=r.meta}var l=n.prototype;return l.setState=function(i){this.dispatch({type:"setState",state:i})},l.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},l.removeObserver=function(i){this.observers=this.observers.filter(function(o){return o!==i})},l.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(_t).catch(_t)):Promise.resolve()},l.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},l.execute=function(){var i=this,o,u=this.state.status==="loading",d=Promise.resolve();return u||(this.dispatch({type:"loading",variables:this.options.variables}),d=d.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(m){m!==i.state.context&&i.dispatch({type:"loading",context:m,variables:i.state.variables})})),d.then(function(){return i.executeMutation()}).then(function(m){o=m,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(o,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(o,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(o,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:o}),o}).catch(function(m){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(m,i.state.variables,i.state.context,i),du().error(m),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(m,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,m,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:m}),m})})},l.executeMutation=function(){var i=this,o;return this.retryer=new Lv({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(o=this.options.retry)!=null?o:0,retryDelay:this.options.retryDelay}),this.retryer.promise},l.dispatch=function(i){var o=this;this.state=uS(this.state,i),Je.batch(function(){o.observers.forEach(function(u){u.onMutationUpdate(i)}),o.mutationCache.notify(o)})},n}();function zv(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function uS(n,l){switch(l.type){case"failed":return Ee({},n,{failureCount:n.failureCount+1});case"pause":return Ee({},n,{isPaused:!0});case"continue":return Ee({},n,{isPaused:!1});case"loading":return Ee({},n,{context:l.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:l.variables});case"success":return Ee({},n,{data:l.data,error:null,status:"success",isPaused:!1});case"error":return Ee({},n,{data:void 0,error:l.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Ee({},n,l.state);default:return n}}var qv=function(n){Ji(l,n);function l(i){var o;return o=n.call(this)||this,o.config=i||{},o.mutations=[],o.mutationId=0,o}var r=l.prototype;return r.build=function(o,u,d){var m=new oS({mutationCache:this,mutationId:++this.mutationId,options:o.defaultMutationOptions(u),state:d,defaultOptions:u.mutationKey?o.getMutationDefaults(u.mutationKey):void 0,meta:u.meta});return this.add(m),m},r.add=function(o){this.mutations.push(o),this.notify(o)},r.remove=function(o){this.mutations=this.mutations.filter(function(u){return u!==o}),o.cancel(),this.notify(o)},r.clear=function(){var o=this;Je.batch(function(){o.mutations.forEach(function(u){o.remove(u)})})},r.getAll=function(){return this.mutations},r.find=function(o){return typeof o.exact>"u"&&(o.exact=!0),this.mutations.find(function(u){return dy(o,u)})},r.findAll=function(o){return this.mutations.filter(function(u){return dy(o,u)})},r.notify=function(o){var u=this;Je.batch(function(){u.listeners.forEach(function(d){d(o)})})},r.onFocus=function(){this.resumePausedMutations()},r.onOnline=function(){this.resumePausedMutations()},r.resumePausedMutations=function(){var o=this.mutations.filter(function(u){return u.state.isPaused});return Je.batch(function(){return o.reduce(function(u,d){return u.then(function(){return d.continue().catch(_t)})},Promise.resolve())})},l}(Ii);function cS(){return{onFetch:function(l){l.fetchFn=function(){var r,i,o,u,d,m,y=(r=l.fetchOptions)==null||(i=r.meta)==null?void 0:i.refetchPage,p=(o=l.fetchOptions)==null||(u=o.meta)==null?void 0:u.fetchMore,g=p==null?void 0:p.pageParam,b=(p==null?void 0:p.direction)==="forward",E=(p==null?void 0:p.direction)==="backward",C=((d=l.state.data)==null?void 0:d.pages)||[],w=((m=l.state.data)==null?void 0:m.pageParams)||[],O=Dv(),N=O==null?void 0:O.signal,_=w,A=!1,j=l.options.queryFn||function(){return Promise.reject("Missing queryFn")},B=function(ye,Se,k,X){return _=X?[Se].concat(_):[].concat(_,[Se]),X?[k].concat(ye):[].concat(ye,[k])},V=function(ye,Se,k,X){if(A)return Promise.reject("Cancelled");if(typeof k>"u"&&!Se&&ye.length)return Promise.resolve(ye);var J={queryKey:l.queryKey,signal:N,pageParam:k,meta:l.meta},ue=j(J),R=Promise.resolve(ue).then(function(W){return B(ye,k,W,X)});if(fu(ue)){var $=R;$.cancel=ue.cancel}return R},Q;if(!C.length)Q=V([]);else if(b){var G=typeof g<"u",Z=G?g:py(l.options,C);Q=V(C,G,Z)}else if(E){var te=typeof g<"u",pe=te?g:fS(l.options,C);Q=V(C,te,pe,!0)}else(function(){_=[];var Ue=typeof l.options.getNextPageParam>"u",ye=y&&C[0]?y(C[0],0,C):!0;Q=ye?V([],Ue,w[0]):Promise.resolve(B([],w[0],C[0]));for(var Se=function(J){Q=Q.then(function(ue){var R=y&&C[J]?y(C[J],J,C):!0;if(R){var $=Ue?w[J]:py(l.options,ue);return V(ue,Ue,$)}return Promise.resolve(B(ue,w[J],C[J]))})},k=1;k<C.length;k++)Se(k)})();var Re=Q.then(function(Ue){return{pages:Ue,pageParams:_}}),be=Re;return be.cancel=function(){A=!0,O==null||O.abort(),fu(Q)&&Q.cancel()},Re}}}}function py(n,l){return n.getNextPageParam==null?void 0:n.getNextPageParam(l[l.length-1],l)}function fS(n,l){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(l[0],l)}var dS=function(){function n(r){r===void 0&&(r={}),this.queryCache=r.queryCache||new rS,this.mutationCache=r.mutationCache||new qv,this.defaultOptions=r.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var l=n.prototype;return l.mount=function(){var i=this;this.unsubscribeFocus=fr.subscribe(function(){fr.isFocused()&&Io.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=Io.subscribe(function(){fr.isFocused()&&Io.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},l.unmount=function(){var i,o;(i=this.unsubscribeFocus)==null||i.call(this),(o=this.unsubscribeOnline)==null||o.call(this)},l.isFetching=function(i,o){var u=cl(i,o),d=u[0];return d.fetching=!0,this.queryCache.findAll(d).length},l.isMutating=function(i){return this.mutationCache.findAll(Ee({},i,{fetching:!0})).length},l.getQueryData=function(i,o){var u;return(u=this.queryCache.find(i,o))==null?void 0:u.state.data},l.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(o){var u=o.queryKey,d=o.state,m=d.data;return[u,m]})},l.setQueryData=function(i,o,u){var d=Jo(i),m=this.defaultQueryOptions(d);return this.queryCache.build(this,m).setData(o,u)},l.setQueriesData=function(i,o,u){var d=this;return Je.batch(function(){return d.getQueryCache().findAll(i).map(function(m){var y=m.queryKey;return[y,d.setQueryData(y,o,u)]})})},l.getQueryState=function(i,o){var u;return(u=this.queryCache.find(i,o))==null?void 0:u.state},l.removeQueries=function(i,o){var u=cl(i,o),d=u[0],m=this.queryCache;Je.batch(function(){m.findAll(d).forEach(function(y){m.remove(y)})})},l.resetQueries=function(i,o,u){var d=this,m=cl(i,o,u),y=m[0],p=m[1],g=this.queryCache,b=Ee({},y,{active:!0});return Je.batch(function(){return g.findAll(y).forEach(function(E){E.reset()}),d.refetchQueries(b,p)})},l.cancelQueries=function(i,o,u){var d=this,m=cl(i,o,u),y=m[0],p=m[1],g=p===void 0?{}:p;typeof g.revert>"u"&&(g.revert=!0);var b=Je.batch(function(){return d.queryCache.findAll(y).map(function(E){return E.cancel(g)})});return Promise.all(b).then(_t).catch(_t)},l.invalidateQueries=function(i,o,u){var d,m,y,p=this,g=cl(i,o,u),b=g[0],E=g[1],C=Ee({},b,{active:(d=(m=b.refetchActive)!=null?m:b.active)!=null?d:!0,inactive:(y=b.refetchInactive)!=null?y:!1});return Je.batch(function(){return p.queryCache.findAll(b).forEach(function(w){w.invalidate()}),p.refetchQueries(C,E)})},l.refetchQueries=function(i,o,u){var d=this,m=cl(i,o,u),y=m[0],p=m[1],g=Je.batch(function(){return d.queryCache.findAll(y).map(function(E){return E.fetch(void 0,Ee({},p,{meta:{refetchPage:y==null?void 0:y.refetchPage}}))})}),b=Promise.all(g).then(_t);return p!=null&&p.throwOnError||(b=b.catch(_t)),b},l.fetchQuery=function(i,o,u){var d=Jo(i,o,u),m=this.defaultQueryOptions(d);typeof m.retry>"u"&&(m.retry=!1);var y=this.queryCache.build(this,m);return y.isStaleByTime(m.staleTime)?y.fetch(m):Promise.resolve(y.state.data)},l.prefetchQuery=function(i,o,u){return this.fetchQuery(i,o,u).then(_t).catch(_t)},l.fetchInfiniteQuery=function(i,o,u){var d=Jo(i,o,u);return d.behavior=cS(),this.fetchQuery(d)},l.prefetchInfiniteQuery=function(i,o,u){return this.fetchInfiniteQuery(i,o,u).then(_t).catch(_t)},l.cancelMutations=function(){var i=this,o=Je.batch(function(){return i.mutationCache.getAll().map(function(u){return u.cancel()})});return Promise.all(o).then(_t).catch(_t)},l.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},l.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},l.getQueryCache=function(){return this.queryCache},l.getMutationCache=function(){return this.mutationCache},l.getDefaultOptions=function(){return this.defaultOptions},l.setDefaultOptions=function(i){this.defaultOptions=i},l.setQueryDefaults=function(i,o){var u=this.queryDefaults.find(function(d){return Yl(i)===Yl(d.queryKey)});u?u.defaultOptions=o:this.queryDefaults.push({queryKey:i,defaultOptions:o})},l.getQueryDefaults=function(i){var o;return i?(o=this.queryDefaults.find(function(u){return uu(i,u.queryKey)}))==null?void 0:o.defaultOptions:void 0},l.setMutationDefaults=function(i,o){var u=this.mutationDefaults.find(function(d){return Yl(i)===Yl(d.mutationKey)});u?u.defaultOptions=o:this.mutationDefaults.push({mutationKey:i,defaultOptions:o})},l.getMutationDefaults=function(i){var o;return i?(o=this.mutationDefaults.find(function(u){return uu(i,u.mutationKey)}))==null?void 0:o.defaultOptions:void 0},l.defaultQueryOptions=function(i){if(i!=null&&i._defaulted)return i;var o=Ee({},this.defaultOptions.queries,this.getQueryDefaults(i==null?void 0:i.queryKey),i,{_defaulted:!0});return!o.queryHash&&o.queryKey&&(o.queryHash=Qd(o.queryKey,o)),o},l.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},l.defaultMutationOptions=function(i){return i!=null&&i._defaulted?i:Ee({},this.defaultOptions.mutations,this.getMutationDefaults(i==null?void 0:i.mutationKey),i,{_defaulted:!0})},l.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),hS=function(n){Ji(l,n);function l(i,o){var u;return u=n.call(this)||this,u.client=i,u.options=o,u.trackedProps=[],u.selectError=null,u.bindMethods(),u.setOptions(o),u}var r=l.prototype;return r.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},r.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),yy(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},r.onUnsubscribe=function(){this.listeners.length||this.destroy()},r.shouldFetchOnReconnect=function(){return bd(this.currentQuery,this.options,this.options.refetchOnReconnect)},r.shouldFetchOnWindowFocus=function(){return bd(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},r.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},r.setOptions=function(o,u){var d=this.options,m=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(o),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=d.queryKey),this.updateQuery();var y=this.hasListeners();y&&vy(this.currentQuery,m,this.options,d)&&this.executeFetch(),this.updateResult(u),y&&(this.currentQuery!==m||this.options.enabled!==d.enabled||this.options.staleTime!==d.staleTime)&&this.updateStaleTimeout();var p=this.computeRefetchInterval();y&&(this.currentQuery!==m||this.options.enabled!==d.enabled||p!==this.currentRefetchInterval)&&this.updateRefetchInterval(p)},r.getOptimisticResult=function(o){var u=this.client.defaultQueryObserverOptions(o),d=this.client.getQueryCache().build(this.client,u);return this.createResult(d,u)},r.getCurrentResult=function(){return this.currentResult},r.trackResult=function(o,u){var d=this,m={},y=function(g){d.trackedProps.includes(g)||d.trackedProps.push(g)};return Object.keys(o).forEach(function(p){Object.defineProperty(m,p,{configurable:!1,enumerable:!0,get:function(){return y(p),o[p]}})}),(u.useErrorBoundary||u.suspense)&&y("error"),m},r.getNextResult=function(o){var u=this;return new Promise(function(d,m){var y=u.subscribe(function(p){p.isFetching||(y(),p.isError&&(o!=null&&o.throwOnError)?m(p.error):d(p))})})},r.getCurrentQuery=function(){return this.currentQuery},r.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},r.refetch=function(o){return this.fetch(Ee({},o,{meta:{refetchPage:o==null?void 0:o.refetchPage}}))},r.fetchOptimistic=function(o){var u=this,d=this.client.defaultQueryObserverOptions(o),m=this.client.getQueryCache().build(this.client,d);return m.fetch().then(function(){return u.createResult(m,d)})},r.fetch=function(o){var u=this;return this.executeFetch(o).then(function(){return u.updateResult(),u.currentResult})},r.executeFetch=function(o){this.updateQuery();var u=this.currentQuery.fetch(this.options,o);return o!=null&&o.throwOnError||(u=u.catch(_t)),u},r.updateStaleTimeout=function(){var o=this;if(this.clearStaleTimeout(),!(ru||this.currentResult.isStale||!vd(this.options.staleTime))){var u=Ov(this.currentResult.dataUpdatedAt,this.options.staleTime),d=u+1;this.staleTimeoutId=setTimeout(function(){o.currentResult.isStale||o.updateResult()},d)}},r.computeRefetchInterval=function(){var o;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(o=this.options.refetchInterval)!=null?o:!1},r.updateRefetchInterval=function(o){var u=this;this.clearRefetchInterval(),this.currentRefetchInterval=o,!(ru||this.options.enabled===!1||!vd(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(u.options.refetchIntervalInBackground||fr.isFocused())&&u.executeFetch()},this.currentRefetchInterval))},r.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},r.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},r.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},r.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},r.createResult=function(o,u){var d=this.currentQuery,m=this.options,y=this.currentResult,p=this.currentResultState,g=this.currentResultOptions,b=o!==d,E=b?o.state:this.currentQueryInitialState,C=b?this.currentResult:this.previousQueryResult,w=o.state,O=w.dataUpdatedAt,N=w.error,_=w.errorUpdatedAt,A=w.isFetching,j=w.status,B=!1,V=!1,Q;if(u.optimisticResults){var G=this.hasListeners(),Z=!G&&yy(o,u),te=G&&vy(o,d,u,m);(Z||te)&&(A=!0,O||(j="loading"))}if(u.keepPreviousData&&!w.dataUpdateCount&&(C!=null&&C.isSuccess)&&j!=="error")Q=C.data,O=C.dataUpdatedAt,j=C.status,B=!0;else if(u.select&&typeof w.data<"u")if(y&&w.data===(p==null?void 0:p.data)&&u.select===this.selectFn)Q=this.selectResult;else try{this.selectFn=u.select,Q=u.select(w.data),u.structuralSharing!==!1&&(Q=cu(y==null?void 0:y.data,Q)),this.selectResult=Q,this.selectError=null}catch(be){du().error(be),this.selectError=be}else Q=w.data;if(typeof u.placeholderData<"u"&&typeof Q>"u"&&(j==="loading"||j==="idle")){var pe;if(y!=null&&y.isPlaceholderData&&u.placeholderData===(g==null?void 0:g.placeholderData))pe=y.data;else if(pe=typeof u.placeholderData=="function"?u.placeholderData():u.placeholderData,u.select&&typeof pe<"u")try{pe=u.select(pe),u.structuralSharing!==!1&&(pe=cu(y==null?void 0:y.data,pe)),this.selectError=null}catch(be){du().error(be),this.selectError=be}typeof pe<"u"&&(j="success",Q=pe,V=!0)}this.selectError&&(N=this.selectError,Q=this.selectResult,_=Date.now(),j="error");var Re={status:j,isLoading:j==="loading",isSuccess:j==="success",isError:j==="error",isIdle:j==="idle",data:Q,dataUpdatedAt:O,error:N,errorUpdatedAt:_,failureCount:w.fetchFailureCount,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>E.dataUpdateCount||w.errorUpdateCount>E.errorUpdateCount,isFetching:A,isRefetching:A&&j!=="loading",isLoadingError:j==="error"&&w.dataUpdatedAt===0,isPlaceholderData:V,isPreviousData:B,isRefetchError:j==="error"&&w.dataUpdatedAt!==0,isStale:$d(o,u),refetch:this.refetch,remove:this.remove};return Re},r.shouldNotifyListeners=function(o,u){if(!u)return!0;var d=this.options,m=d.notifyOnChangeProps,y=d.notifyOnChangePropsExclusions;if(!m&&!y||m==="tracked"&&!this.trackedProps.length)return!0;var p=m==="tracked"?this.trackedProps:m;return Object.keys(o).some(function(g){var b=g,E=o[b]!==u[b],C=p==null?void 0:p.some(function(O){return O===g}),w=y==null?void 0:y.some(function(O){return O===g});return E&&!w&&(!p||C)})},r.updateResult=function(o){var u=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!W2(this.currentResult,u)){var d={cache:!0};(o==null?void 0:o.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,u)&&(d.listeners=!0),this.notify(Ee({},d,o))}},r.updateQuery=function(){var o=this.client.getQueryCache().build(this.client,this.options);if(o!==this.currentQuery){var u=this.currentQuery;this.currentQuery=o,this.currentQueryInitialState=o.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(u==null||u.removeObserver(this),o.addObserver(this))}},r.onQueryUpdate=function(o){var u={};o.type==="success"?u.onSuccess=!0:o.type==="error"&&!Wo(o.error)&&(u.onError=!0),this.updateResult(u),this.hasListeners()&&this.updateTimers()},r.notify=function(o){var u=this;Je.batch(function(){o.onSuccess?(u.options.onSuccess==null||u.options.onSuccess(u.currentResult.data),u.options.onSettled==null||u.options.onSettled(u.currentResult.data,null)):o.onError&&(u.options.onError==null||u.options.onError(u.currentResult.error),u.options.onSettled==null||u.options.onSettled(void 0,u.currentResult.error)),o.listeners&&u.listeners.forEach(function(d){d(u.currentResult)}),o.cache&&u.client.getQueryCache().notify({query:u.currentQuery,type:"observerResultsUpdated"})})},l}(Ii);function mS(n,l){return l.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&l.retryOnMount===!1)}function yy(n,l){return mS(n,l)||n.state.dataUpdatedAt>0&&bd(n,l,l.refetchOnMount)}function bd(n,l,r){if(l.enabled!==!1){var i=typeof r=="function"?r(n):r;return i==="always"||i!==!1&&$d(n,l)}return!1}function vy(n,l,r,i){return r.enabled!==!1&&(n!==l||i.enabled===!1)&&(!r.suspense||n.state.status!=="error")&&$d(n,r)}function $d(n,l){return n.isStaleByTime(l.staleTime)}var pS=function(n){Ji(l,n);function l(i,o){var u;return u=n.call(this)||this,u.client=i,u.setOptions(o),u.bindMethods(),u.updateResult(),u}var r=l.prototype;return r.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},r.setOptions=function(o){this.options=this.client.defaultMutationOptions(o)},r.onUnsubscribe=function(){if(!this.listeners.length){var o;(o=this.currentMutation)==null||o.removeObserver(this)}},r.onMutationUpdate=function(o){this.updateResult();var u={listeners:!0};o.type==="success"?u.onSuccess=!0:o.type==="error"&&(u.onError=!0),this.notify(u)},r.getCurrentResult=function(){return this.currentResult},r.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},r.mutate=function(o,u){return this.mutateOptions=u,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Ee({},this.options,{variables:typeof o<"u"?o:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},r.updateResult=function(){var o=this.currentMutation?this.currentMutation.state:zv(),u=Ee({},o,{isLoading:o.status==="loading",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=u},r.notify=function(o){var u=this;Je.batch(function(){u.mutateOptions&&(o.onSuccess?(u.mutateOptions.onSuccess==null||u.mutateOptions.onSuccess(u.currentResult.data,u.currentResult.variables,u.currentResult.context),u.mutateOptions.onSettled==null||u.mutateOptions.onSettled(u.currentResult.data,null,u.currentResult.variables,u.currentResult.context)):o.onError&&(u.mutateOptions.onError==null||u.mutateOptions.onError(u.currentResult.error,u.currentResult.variables,u.currentResult.context),u.mutateOptions.onSettled==null||u.mutateOptions.onSettled(void 0,u.currentResult.error,u.currentResult.variables,u.currentResult.context))),o.listeners&&u.listeners.forEach(function(d){d(u.currentResult)})})},l}(Ii),yS=X2.unstable_batchedUpdates;Je.setBatchNotifyFunction(yS);var vS=console;iS(vS);var gy=Ke.createContext(void 0),kv=Ke.createContext(!1);function Bv(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=gy),window.ReactQueryClientContext):gy}var Hv=function(){var l=Ke.useContext(Bv(Ke.useContext(kv)));if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},gS=function(l){var r=l.client,i=l.contextSharing,o=i===void 0?!1:i,u=l.children;Ke.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]);var d=Bv(o);return Ke.createElement(kv.Provider,{value:o},Ke.createElement(d.Provider,{value:r},u))};function bS(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var xS=Ke.createContext(bS()),SS=function(){return Ke.useContext(xS)};function Qv(n,l,r){return typeof l=="function"?l.apply(void 0,r):typeof l=="boolean"?l:!!n}function Nt(n,l,r){var i=Ke.useRef(!1),o=Ke.useState(0),u=o[1],d=P2(n,l,r),m=Hv(),y=Ke.useRef();y.current?y.current.setOptions(d):y.current=new pS(m,d);var p=y.current.getCurrentResult();Ke.useEffect(function(){i.current=!0;var b=y.current.subscribe(Je.batchCalls(function(){i.current&&u(function(E){return E+1})}));return function(){i.current=!1,b()}},[]);var g=Ke.useCallback(function(b,E){y.current.mutate(b,E).catch(_t)},[]);if(p.error&&Qv(void 0,y.current.options.useErrorBoundary,[p.error]))throw p.error;return Ee({},p,{mutate:g,mutateAsync:p.mutate})}function wS(n,l){var r=Ke.useRef(!1),i=Ke.useState(0),o=i[1],u=Hv(),d=SS(),m=u.defaultQueryObserverOptions(n);m.optimisticResults=!0,m.onError&&(m.onError=Je.batchCalls(m.onError)),m.onSuccess&&(m.onSuccess=Je.batchCalls(m.onSuccess)),m.onSettled&&(m.onSettled=Je.batchCalls(m.onSettled)),m.suspense&&(typeof m.staleTime!="number"&&(m.staleTime=1e3),m.cacheTime===0&&(m.cacheTime=1)),(m.suspense||m.useErrorBoundary)&&(d.isReset()||(m.retryOnMount=!1));var y=Ke.useState(function(){return new l(u,m)}),p=y[0],g=p.getOptimisticResult(m);if(Ke.useEffect(function(){r.current=!0,d.clearReset();var b=p.subscribe(Je.batchCalls(function(){r.current&&o(function(E){return E+1})}));return p.updateResult(),function(){r.current=!1,b()}},[d,p]),Ke.useEffect(function(){p.setOptions(m,{listeners:!1})},[m,p]),m.suspense&&g.isLoading)throw p.fetchOptimistic(m).then(function(b){var E=b.data;m.onSuccess==null||m.onSuccess(E),m.onSettled==null||m.onSettled(E,null)}).catch(function(b){d.clearReset(),m.onError==null||m.onError(b),m.onSettled==null||m.onSettled(void 0,b)});if(g.isError&&!d.isReset()&&!g.isFetching&&Qv(m.suspense,m.useErrorBoundary,[g.error,p.getCurrentQuery()]))throw g.error;return m.notifyOnChangeProps==="tracked"&&(g=p.trackResult(g,m)),g}function en(n,l,r){var i=Jo(n,l,r);return wS(i,hS)}function $v(n,l){return function(){return n.apply(l,arguments)}}const{toString:ES}=Object.prototype,{getPrototypeOf:Yd}=Object,{iterator:Cu,toStringTag:Yv}=Symbol,_u=(n=>l=>{const r=ES.call(l);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Hn=n=>(n=n.toLowerCase(),l=>_u(l)===n),Nu=n=>l=>typeof l===n,{isArray:Wi}=Array,pr=Nu("undefined");function CS(n){return n!==null&&!pr(n)&&n.constructor!==null&&!pr(n.constructor)&&Pt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Vv=Hn("ArrayBuffer");function _S(n){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(n):l=n&&n.buffer&&Vv(n.buffer),l}const NS=Nu("string"),Pt=Nu("function"),Kv=Nu("number"),ju=n=>n!==null&&typeof n=="object",jS=n=>n===!0||n===!1,eu=n=>{if(_u(n)!=="object")return!1;const l=Yd(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Yv in n)&&!(Cu in n)},AS=Hn("Date"),TS=Hn("File"),OS=Hn("Blob"),RS=Hn("FileList"),DS=n=>ju(n)&&Pt(n.pipe),MS=n=>{let l;return n&&(typeof FormData=="function"&&n instanceof FormData||Pt(n.append)&&((l=_u(n))==="formdata"||l==="object"&&Pt(n.toString)&&n.toString()==="[object FormData]"))},LS=Hn("URLSearchParams"),[US,zS,qS,kS]=["ReadableStream","Request","Response","Headers"].map(Hn),BS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sr(n,l,{allOwnKeys:r=!1}={}){if(n===null||typeof n>"u")return;let i,o;if(typeof n!="object"&&(n=[n]),Wi(n))for(i=0,o=n.length;i<o;i++)l.call(null,n[i],i,n);else{const u=r?Object.getOwnPropertyNames(n):Object.keys(n),d=u.length;let m;for(i=0;i<d;i++)m=u[i],l.call(null,n[m],m,n)}}function Fv(n,l){l=l.toLowerCase();const r=Object.keys(n);let i=r.length,o;for(;i-- >0;)if(o=r[i],l===o.toLowerCase())return o;return null}const Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gv=n=>!pr(n)&&n!==Vl;function xd(){const{caseless:n}=Gv(this)&&this||{},l={},r=(i,o)=>{const u=n&&Fv(l,o)||o;eu(l[u])&&eu(i)?l[u]=xd(l[u],i):eu(i)?l[u]=xd({},i):Wi(i)?l[u]=i.slice():l[u]=i};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Sr(arguments[i],r);return l}const HS=(n,l,r,{allOwnKeys:i}={})=>(Sr(l,(o,u)=>{r&&Pt(o)?n[u]=$v(o,r):n[u]=o},{allOwnKeys:i}),n),QS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$S=(n,l,r,i)=>{n.prototype=Object.create(l.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:l.prototype}),r&&Object.assign(n.prototype,r)},YS=(n,l,r,i)=>{let o,u,d;const m={};if(l=l||{},n==null)return l;do{for(o=Object.getOwnPropertyNames(n),u=o.length;u-- >0;)d=o[u],(!i||i(d,n,l))&&!m[d]&&(l[d]=n[d],m[d]=!0);n=r!==!1&&Yd(n)}while(n&&(!r||r(n,l))&&n!==Object.prototype);return l},VS=(n,l,r)=>{n=String(n),(r===void 0||r>n.length)&&(r=n.length),r-=l.length;const i=n.indexOf(l,r);return i!==-1&&i===r},KS=n=>{if(!n)return null;if(Wi(n))return n;let l=n.length;if(!Kv(l))return null;const r=new Array(l);for(;l-- >0;)r[l]=n[l];return r},FS=(n=>l=>n&&l instanceof n)(typeof Uint8Array<"u"&&Yd(Uint8Array)),GS=(n,l)=>{const i=(n&&n[Cu]).call(n);let o;for(;(o=i.next())&&!o.done;){const u=o.value;l.call(n,u[0],u[1])}},XS=(n,l)=>{let r;const i=[];for(;(r=n.exec(l))!==null;)i.push(r);return i},ZS=Hn("HTMLFormElement"),PS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,o){return i.toUpperCase()+o}),by=(({hasOwnProperty:n})=>(l,r)=>n.call(l,r))(Object.prototype),JS=Hn("RegExp"),Xv=(n,l)=>{const r=Object.getOwnPropertyDescriptors(n),i={};Sr(r,(o,u)=>{let d;(d=l(o,u,n))!==!1&&(i[u]=d||o)}),Object.defineProperties(n,i)},IS=n=>{Xv(n,(l,r)=>{if(Pt(n)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=n[r];if(Pt(i)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},WS=(n,l)=>{const r={},i=o=>{o.forEach(u=>{r[u]=!0})};return Wi(n)?i(n):i(String(n).split(l)),r},ew=()=>{},tw=(n,l)=>n!=null&&Number.isFinite(n=+n)?n:l;function nw(n){return!!(n&&Pt(n.append)&&n[Yv]==="FormData"&&n[Cu])}const aw=n=>{const l=new Array(10),r=(i,o)=>{if(ju(i)){if(l.indexOf(i)>=0)return;if(!("toJSON"in i)){l[o]=i;const u=Wi(i)?[]:{};return Sr(i,(d,m)=>{const y=r(d,o+1);!pr(y)&&(u[m]=y)}),l[o]=void 0,u}}return i};return r(n,0)},lw=Hn("AsyncFunction"),iw=n=>n&&(ju(n)||Pt(n))&&Pt(n.then)&&Pt(n.catch),Zv=((n,l)=>n?setImmediate:l?((r,i)=>(Vl.addEventListener("message",({source:o,data:u})=>{o===Vl&&u===r&&i.length&&i.shift()()},!1),o=>{i.push(o),Vl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Pt(Vl.postMessage)),sw=typeof queueMicrotask<"u"?queueMicrotask.bind(Vl):typeof process<"u"&&process.nextTick||Zv,rw=n=>n!=null&&Pt(n[Cu]),H={isArray:Wi,isArrayBuffer:Vv,isBuffer:CS,isFormData:MS,isArrayBufferView:_S,isString:NS,isNumber:Kv,isBoolean:jS,isObject:ju,isPlainObject:eu,isReadableStream:US,isRequest:zS,isResponse:qS,isHeaders:kS,isUndefined:pr,isDate:AS,isFile:TS,isBlob:OS,isRegExp:JS,isFunction:Pt,isStream:DS,isURLSearchParams:LS,isTypedArray:FS,isFileList:RS,forEach:Sr,merge:xd,extend:HS,trim:BS,stripBOM:QS,inherits:$S,toFlatObject:YS,kindOf:_u,kindOfTest:Hn,endsWith:VS,toArray:KS,forEachEntry:GS,matchAll:XS,isHTMLForm:ZS,hasOwnProperty:by,hasOwnProp:by,reduceDescriptors:Xv,freezeMethods:IS,toObjectSet:WS,toCamelCase:PS,noop:ew,toFiniteNumber:tw,findKey:Fv,global:Vl,isContextDefined:Gv,isSpecCompliantForm:nw,toJSONObject:aw,isAsyncFn:lw,isThenable:iw,setImmediate:Zv,asap:sw,isIterable:rw};function ve(n,l,r,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",l&&(this.code=l),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}H.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Pv=ve.prototype,Jv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Jv[n]={value:n}});Object.defineProperties(ve,Jv);Object.defineProperty(Pv,"isAxiosError",{value:!0});ve.from=(n,l,r,i,o,u)=>{const d=Object.create(Pv);return H.toFlatObject(n,d,function(y){return y!==Error.prototype},m=>m!=="isAxiosError"),ve.call(d,n.message,l,r,i,o),d.cause=n,d.name=n.name,u&&Object.assign(d,u),d};const ow=null;function Sd(n){return H.isPlainObject(n)||H.isArray(n)}function Iv(n){return H.endsWith(n,"[]")?n.slice(0,-2):n}function xy(n,l,r){return n?n.concat(l).map(function(o,u){return o=Iv(o),!r&&u?"["+o+"]":o}).join(r?".":""):l}function uw(n){return H.isArray(n)&&!n.some(Sd)}const cw=H.toFlatObject(H,{},null,function(l){return/^is[A-Z]/.test(l)});function Au(n,l,r){if(!H.isObject(n))throw new TypeError("target must be an object");l=l||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,N){return!H.isUndefined(N[O])});const i=r.metaTokens,o=r.visitor||g,u=r.dots,d=r.indexes,y=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(l);if(!H.isFunction(o))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if(H.isDate(w))return w.toISOString();if(!y&&H.isBlob(w))throw new ve("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(w)||H.isTypedArray(w)?y&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function g(w,O,N){let _=w;if(w&&!N&&typeof w=="object"){if(H.endsWith(O,"{}"))O=i?O:O.slice(0,-2),w=JSON.stringify(w);else if(H.isArray(w)&&uw(w)||(H.isFileList(w)||H.endsWith(O,"[]"))&&(_=H.toArray(w)))return O=Iv(O),_.forEach(function(j,B){!(H.isUndefined(j)||j===null)&&l.append(d===!0?xy([O],B,u):d===null?O:O+"[]",p(j))}),!1}return Sd(w)?!0:(l.append(xy(N,O,u),p(w)),!1)}const b=[],E=Object.assign(cw,{defaultVisitor:g,convertValue:p,isVisitable:Sd});function C(w,O){if(!H.isUndefined(w)){if(b.indexOf(w)!==-1)throw Error("Circular reference detected in "+O.join("."));b.push(w),H.forEach(w,function(_,A){(!(H.isUndefined(_)||_===null)&&o.call(l,_,H.isString(A)?A.trim():A,O,E))===!0&&C(_,O?O.concat(A):[A])}),b.pop()}}if(!H.isObject(n))throw new TypeError("data must be an object");return C(n),l}function Sy(n){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return l[i]})}function Vd(n,l){this._pairs=[],n&&Au(n,this,l)}const Wv=Vd.prototype;Wv.append=function(l,r){this._pairs.push([l,r])};Wv.toString=function(l){const r=l?function(i){return l.call(this,i,Sy)}:Sy;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function fw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function e1(n,l,r){if(!l)return n;const i=r&&r.encode||fw;H.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let u;if(o?u=o(l,r):u=H.isURLSearchParams(l)?l.toString():new Vd(l,r).toString(i),u){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+u}return n}class wy{constructor(){this.handlers=[]}use(l,r,i){return this.handlers.push({fulfilled:l,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){H.forEach(this.handlers,function(i){i!==null&&l(i)})}}const t1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dw=typeof URLSearchParams<"u"?URLSearchParams:Vd,hw=typeof FormData<"u"?FormData:null,mw=typeof Blob<"u"?Blob:null,pw={isBrowser:!0,classes:{URLSearchParams:dw,FormData:hw,Blob:mw},protocols:["http","https","file","blob","url","data"]},Kd=typeof window<"u"&&typeof document<"u",wd=typeof navigator=="object"&&navigator||void 0,yw=Kd&&(!wd||["ReactNative","NativeScript","NS"].indexOf(wd.product)<0),vw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gw=Kd&&window.location.href||"http://localhost",bw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kd,hasStandardBrowserEnv:yw,hasStandardBrowserWebWorkerEnv:vw,navigator:wd,origin:gw},Symbol.toStringTag,{value:"Module"})),Lt={...bw,...pw};function xw(n,l){return Au(n,new Lt.classes.URLSearchParams,Object.assign({visitor:function(r,i,o,u){return Lt.isNode&&H.isBuffer(r)?(this.append(i,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},l))}function Sw(n){return H.matchAll(/\w+|\[(\w*)]/g,n).map(l=>l[0]==="[]"?"":l[1]||l[0])}function ww(n){const l={},r=Object.keys(n);let i;const o=r.length;let u;for(i=0;i<o;i++)u=r[i],l[u]=n[u];return l}function n1(n){function l(r,i,o,u){let d=r[u++];if(d==="__proto__")return!0;const m=Number.isFinite(+d),y=u>=r.length;return d=!d&&H.isArray(o)?o.length:d,y?(H.hasOwnProp(o,d)?o[d]=[o[d],i]:o[d]=i,!m):((!o[d]||!H.isObject(o[d]))&&(o[d]=[]),l(r,i,o[d],u)&&H.isArray(o[d])&&(o[d]=ww(o[d])),!m)}if(H.isFormData(n)&&H.isFunction(n.entries)){const r={};return H.forEachEntry(n,(i,o)=>{l(Sw(i),o,r,0)}),r}return null}function Ew(n,l,r){if(H.isString(n))try{return(l||JSON.parse)(n),H.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(n)}const wr={transitional:t1,adapter:["xhr","http","fetch"],transformRequest:[function(l,r){const i=r.getContentType()||"",o=i.indexOf("application/json")>-1,u=H.isObject(l);if(u&&H.isHTMLForm(l)&&(l=new FormData(l)),H.isFormData(l))return o?JSON.stringify(n1(l)):l;if(H.isArrayBuffer(l)||H.isBuffer(l)||H.isStream(l)||H.isFile(l)||H.isBlob(l)||H.isReadableStream(l))return l;if(H.isArrayBufferView(l))return l.buffer;if(H.isURLSearchParams(l))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let m;if(u){if(i.indexOf("application/x-www-form-urlencoded")>-1)return xw(l,this.formSerializer).toString();if((m=H.isFileList(l))||i.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Au(m?{"files[]":l}:l,y&&new y,this.formSerializer)}}return u||o?(r.setContentType("application/json",!1),Ew(l)):l}],transformResponse:[function(l){const r=this.transitional||wr.transitional,i=r&&r.forcedJSONParsing,o=this.responseType==="json";if(H.isResponse(l)||H.isReadableStream(l))return l;if(l&&H.isString(l)&&(i&&!this.responseType||o)){const d=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(l)}catch(m){if(d)throw m.name==="SyntaxError"?ve.from(m,ve.ERR_BAD_RESPONSE,this,null,this.response):m}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],n=>{wr.headers[n]={}});const Cw=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_w=n=>{const l={};let r,i,o;return n&&n.split(`
52
52
  `).forEach(function(d){o=d.indexOf(":"),r=d.substring(0,o).trim().toLowerCase(),i=d.substring(o+1).trim(),!(!r||l[r]&&Cw[r])&&(r==="set-cookie"?l[r]?l[r].push(i):l[r]=[i]:l[r]=l[r]?l[r]+", "+i:i)}),l},Ey=Symbol("internals");function sr(n){return n&&String(n).trim().toLowerCase()}function tu(n){return n===!1||n==null?n:H.isArray(n)?n.map(tu):String(n)}function Nw(n){const l=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(n);)l[i[1]]=i[2];return l}const jw=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Wf(n,l,r,i,o){if(H.isFunction(i))return i.call(this,l,r);if(o&&(l=r),!!H.isString(l)){if(H.isString(i))return l.indexOf(i)!==-1;if(H.isRegExp(i))return i.test(l)}}function Aw(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,r,i)=>r.toUpperCase()+i)}function Tw(n,l){const r=H.toCamelCase(" "+l);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+r,{value:function(o,u,d){return this[i].call(this,l,o,u,d)},configurable:!0})})}let Jt=class{constructor(l){l&&this.set(l)}set(l,r,i){const o=this;function u(m,y,p){const g=sr(y);if(!g)throw new Error("header name must be a non-empty string");const b=H.findKey(o,g);(!b||o[b]===void 0||p===!0||p===void 0&&o[b]!==!1)&&(o[b||y]=tu(m))}const d=(m,y)=>H.forEach(m,(p,g)=>u(p,g,y));if(H.isPlainObject(l)||l instanceof this.constructor)d(l,r);else if(H.isString(l)&&(l=l.trim())&&!jw(l))d(_w(l),r);else if(H.isObject(l)&&H.isIterable(l)){let m={},y,p;for(const g of l){if(!H.isArray(g))throw TypeError("Object iterator must return a key-value pair");m[p=g[0]]=(y=m[p])?H.isArray(y)?[...y,g[1]]:[y,g[1]]:g[1]}d(m,r)}else l!=null&&u(r,l,i);return this}get(l,r){if(l=sr(l),l){const i=H.findKey(this,l);if(i){const o=this[i];if(!r)return o;if(r===!0)return Nw(o);if(H.isFunction(r))return r.call(this,o,i);if(H.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,r){if(l=sr(l),l){const i=H.findKey(this,l);return!!(i&&this[i]!==void 0&&(!r||Wf(this,this[i],i,r)))}return!1}delete(l,r){const i=this;let o=!1;function u(d){if(d=sr(d),d){const m=H.findKey(i,d);m&&(!r||Wf(i,i[m],m,r))&&(delete i[m],o=!0)}}return H.isArray(l)?l.forEach(u):u(l),o}clear(l){const r=Object.keys(this);let i=r.length,o=!1;for(;i--;){const u=r[i];(!l||Wf(this,this[u],u,l,!0))&&(delete this[u],o=!0)}return o}normalize(l){const r=this,i={};return H.forEach(this,(o,u)=>{const d=H.findKey(i,u);if(d){r[d]=tu(o),delete r[u];return}const m=l?Aw(u):String(u).trim();m!==u&&delete r[u],r[m]=tu(o),i[m]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const r=Object.create(null);return H.forEach(this,(i,o)=>{i!=null&&i!==!1&&(r[o]=l&&H.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,r])=>l+": "+r).join(`
53
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...r){const i=new this(l);return r.forEach(o=>i.set(o)),i}static accessor(l){const i=(this[Ey]=this[Ey]={accessors:{}}).accessors,o=this.prototype;function u(d){const m=sr(d);i[m]||(Tw(o,d),i[m]=!0)}return H.isArray(l)?l.forEach(u):u(l),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Jt.prototype,({value:n},l)=>{let r=l[0].toUpperCase()+l.slice(1);return{get:()=>n,set(i){this[r]=i}}});H.freezeMethods(Jt);function ed(n,l){const r=this||wr,i=l||r,o=Jt.from(i.headers);let u=i.data;return H.forEach(n,function(m){u=m.call(r,u,o.normalize(),l?l.status:void 0)}),o.normalize(),u}function a1(n){return!!(n&&n.__CANCEL__)}function es(n,l,r){ve.call(this,n??"canceled",ve.ERR_CANCELED,l,r),this.name="CanceledError"}H.inherits(es,ve,{__CANCEL__:!0});function l1(n,l,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?n(r):l(new ve("Request failed with status code "+r.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ow(n){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return l&&l[1]||""}function Rw(n,l){n=n||10;const r=new Array(n),i=new Array(n);let o=0,u=0,d;return l=l!==void 0?l:1e3,function(y){const p=Date.now(),g=i[u];d||(d=p),r[o]=y,i[o]=p;let b=u,E=0;for(;b!==o;)E+=r[b++],b=b%n;if(o=(o+1)%n,o===u&&(u=(u+1)%n),p-d<l)return;const C=g&&p-g;return C?Math.round(E*1e3/C):void 0}}function Dw(n,l){let r=0,i=1e3/l,o,u;const d=(p,g=Date.now())=>{r=g,o=null,u&&(clearTimeout(u),u=null),n.apply(null,p)};return[(...p)=>{const g=Date.now(),b=g-r;b>=i?d(p,g):(o=p,u||(u=setTimeout(()=>{u=null,d(o)},i-b)))},()=>o&&d(o)]}const hu=(n,l,r=3)=>{let i=0;const o=Rw(50,250);return Dw(u=>{const d=u.loaded,m=u.lengthComputable?u.total:void 0,y=d-i,p=o(y),g=d<=m;i=d;const b={loaded:d,total:m,progress:m?d/m:void 0,bytes:y,rate:p||void 0,estimated:p&&m&&g?(m-d)/p:void 0,event:u,lengthComputable:m!=null,[l?"download":"upload"]:!0};n(b)},r)},Cy=(n,l)=>{const r=n!=null;return[i=>l[0]({lengthComputable:r,total:n,loaded:i}),l[1]]},_y=n=>(...l)=>H.asap(()=>n(...l)),Mw=Lt.hasStandardBrowserEnv?((n,l)=>r=>(r=new URL(r,Lt.origin),n.protocol===r.protocol&&n.host===r.host&&(l||n.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,Lw=Lt.hasStandardBrowserEnv?{write(n,l,r,i,o,u){const d=[n+"="+encodeURIComponent(l)];H.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),H.isString(i)&&d.push("path="+i),H.isString(o)&&d.push("domain="+o),u===!0&&d.push("secure"),document.cookie=d.join("; ")},read(n){const l=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Uw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function qw(n,l){return l?n.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):n}function i1(n,l,r){let i=!Uw(l);return n&&(i||r==!1)?qw(n,l):l}const Ny=n=>n instanceof Jt?{...n}:n;function Zl(n,l){l=l||{};const r={};function i(p,g,b,E){return H.isPlainObject(p)&&H.isPlainObject(g)?H.merge.call({caseless:E},p,g):H.isPlainObject(g)?H.merge({},g):H.isArray(g)?g.slice():g}function o(p,g,b,E){if(H.isUndefined(g)){if(!H.isUndefined(p))return i(void 0,p,b,E)}else return i(p,g,b,E)}function u(p,g){if(!H.isUndefined(g))return i(void 0,g)}function d(p,g){if(H.isUndefined(g)){if(!H.isUndefined(p))return i(void 0,p)}else return i(void 0,g)}function m(p,g,b){if(b in l)return i(p,g);if(b in n)return i(void 0,p)}const y={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:m,headers:(p,g,b)=>o(Ny(p),Ny(g),b,!0)};return H.forEach(Object.keys(Object.assign({},n,l)),function(g){const b=y[g]||o,E=b(n[g],l[g],g);H.isUndefined(E)&&b!==m||(r[g]=E)}),r}const s1=n=>{const l=Zl({},n);let{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:u,headers:d,auth:m}=l;l.headers=d=Jt.from(d),l.url=e1(i1(l.baseURL,l.url,l.allowAbsoluteUrls),n.params,n.paramsSerializer),m&&d.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):"")));let y;if(H.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((y=d.getContentType())!==!1){const[p,...g]=y?y.split(";").map(b=>b.trim()).filter(Boolean):[];d.setContentType([p||"multipart/form-data",...g].join("; "))}}if(Lt.hasStandardBrowserEnv&&(i&&H.isFunction(i)&&(i=i(l)),i||i!==!1&&Mw(l.url))){const p=o&&u&&Lw.read(u);p&&d.set(o,p)}return l},zw=typeof XMLHttpRequest<"u",kw=zw&&function(n){return new Promise(function(r,i){const o=s1(n);let u=o.data;const d=Jt.from(o.headers).normalize();let{responseType:m,onUploadProgress:y,onDownloadProgress:p}=o,g,b,E,C,w;function O(){C&&C(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let N=new XMLHttpRequest;N.open(o.method.toUpperCase(),o.url,!0),N.timeout=o.timeout;function _(){if(!N)return;const j=Jt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),V={data:!m||m==="text"||m==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:j,config:n,request:N};l1(function(G){r(G),O()},function(G){i(G),O()},V),N=null}"onloadend"in N?N.onloadend=_:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(_)},N.onabort=function(){N&&(i(new ve("Request aborted",ve.ECONNABORTED,n,N)),N=null)},N.onerror=function(){i(new ve("Network Error",ve.ERR_NETWORK,n,N)),N=null},N.ontimeout=function(){let B=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||t1;o.timeoutErrorMessage&&(B=o.timeoutErrorMessage),i(new ve(B,V.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,n,N)),N=null},u===void 0&&d.setContentType(null),"setRequestHeader"in N&&H.forEach(d.toJSON(),function(B,V){N.setRequestHeader(V,B)}),H.isUndefined(o.withCredentials)||(N.withCredentials=!!o.withCredentials),m&&m!=="json"&&(N.responseType=o.responseType),p&&([E,w]=hu(p,!0),N.addEventListener("progress",E)),y&&N.upload&&([b,C]=hu(y),N.upload.addEventListener("progress",b),N.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(g=j=>{N&&(i(!j||j.type?new es(null,n,N):j),N.abort(),N=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const A=Ow(o.url);if(A&&Lt.protocols.indexOf(A)===-1){i(new ve("Unsupported protocol "+A+":",ve.ERR_BAD_REQUEST,n));return}N.send(u||null)})},Bw=(n,l)=>{const{length:r}=n=n?n.filter(Boolean):[];if(l||r){let i=new AbortController,o;const u=function(p){if(!o){o=!0,m();const g=p instanceof Error?p:this.reason;i.abort(g instanceof ve?g:new es(g instanceof Error?g.message:g))}};let d=l&&setTimeout(()=>{d=null,u(new ve(`timeout ${l} of ms exceeded`,ve.ETIMEDOUT))},l);const m=()=>{n&&(d&&clearTimeout(d),d=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(u):p.removeEventListener("abort",u)}),n=null)};n.forEach(p=>p.addEventListener("abort",u));const{signal:y}=i;return y.unsubscribe=()=>H.asap(m),y}},Hw=function*(n,l){let r=n.byteLength;if(r<l){yield n;return}let i=0,o;for(;i<r;)o=i+l,yield n.slice(i,o),i=o},Qw=async function*(n,l){for await(const r of $w(n))yield*Hw(r,l)},$w=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const l=n.getReader();try{for(;;){const{done:r,value:i}=await l.read();if(r)break;yield i}}finally{await l.cancel()}},jy=(n,l,r,i)=>{const o=Qw(n,l);let u=0,d,m=y=>{d||(d=!0,i&&i(y))};return new ReadableStream({async pull(y){try{const{done:p,value:g}=await o.next();if(p){m(),y.close();return}let b=g.byteLength;if(r){let E=u+=b;r(E)}y.enqueue(new Uint8Array(g))}catch(p){throw m(p),p}},cancel(y){return m(y),o.return()}},{highWaterMark:2})},Tu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r1=Tu&&typeof ReadableStream=="function",Yw=Tu&&(typeof TextEncoder=="function"?(n=>l=>n.encode(l))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),o1=(n,...l)=>{try{return!!n(...l)}catch{return!1}},Vw=r1&&o1(()=>{let n=!1;const l=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!l}),Ay=64*1024,Ed=r1&&o1(()=>H.isReadableStream(new Response("").body)),mu={stream:Ed&&(n=>n.body)};Tu&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!mu[l]&&(mu[l]=H.isFunction(n[l])?r=>r[l]():(r,i)=>{throw new ve(`Response type '${l}' is not supported`,ve.ERR_NOT_SUPPORT,i)})})})(new Response);const Kw=async n=>{if(n==null)return 0;if(H.isBlob(n))return n.size;if(H.isSpecCompliantForm(n))return(await new Request(Lt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(H.isArrayBufferView(n)||H.isArrayBuffer(n))return n.byteLength;if(H.isURLSearchParams(n)&&(n=n+""),H.isString(n))return(await Yw(n)).byteLength},Fw=async(n,l)=>{const r=H.toFiniteNumber(n.getContentLength());return r??Kw(l)},Gw=Tu&&(async n=>{let{url:l,method:r,data:i,signal:o,cancelToken:u,timeout:d,onDownloadProgress:m,onUploadProgress:y,responseType:p,headers:g,withCredentials:b="same-origin",fetchOptions:E}=s1(n);p=p?(p+"").toLowerCase():"text";let C=Bw([o,u&&u.toAbortSignal()],d),w;const O=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let N;try{if(y&&Vw&&r!=="get"&&r!=="head"&&(N=await Fw(g,i))!==0){let V=new Request(l,{method:"POST",body:i,duplex:"half"}),Q;if(H.isFormData(i)&&(Q=V.headers.get("content-type"))&&g.setContentType(Q),V.body){const[G,Z]=Cy(N,hu(_y(y)));i=jy(V.body,Ay,G,Z)}}H.isString(b)||(b=b?"include":"omit");const _="credentials"in Request.prototype;w=new Request(l,{...E,signal:C,method:r.toUpperCase(),headers:g.normalize().toJSON(),body:i,duplex:"half",credentials:_?b:void 0});let A=await fetch(w);const j=Ed&&(p==="stream"||p==="response");if(Ed&&(m||j&&O)){const V={};["status","statusText","headers"].forEach(te=>{V[te]=A[te]});const Q=H.toFiniteNumber(A.headers.get("content-length")),[G,Z]=m&&Cy(Q,hu(_y(m),!0))||[];A=new Response(jy(A.body,Ay,G,()=>{Z&&Z(),O&&O()}),V)}p=p||"text";let B=await mu[H.findKey(mu,p)||"text"](A,n);return!j&&O&&O(),await new Promise((V,Q)=>{l1(V,Q,{data:B,headers:Jt.from(A.headers),status:A.status,statusText:A.statusText,config:n,request:w})})}catch(_){throw O&&O(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,n,w),{cause:_.cause||_}):ve.from(_,_&&_.code,n,w)}}),Cd={http:ow,xhr:kw,fetch:Gw};H.forEach(Cd,(n,l)=>{if(n){try{Object.defineProperty(n,"name",{value:l})}catch{}Object.defineProperty(n,"adapterName",{value:l})}});const Ty=n=>`- ${n}`,Xw=n=>H.isFunction(n)||n===null||n===!1,u1={getAdapter:n=>{n=H.isArray(n)?n:[n];const{length:l}=n;let r,i;const o={};for(let u=0;u<l;u++){r=n[u];let d;if(i=r,!Xw(r)&&(i=Cd[(d=String(r)).toLowerCase()],i===void 0))throw new ve(`Unknown adapter '${d}'`);if(i)break;o[d||"#"+u]=i}if(!i){const u=Object.entries(o).map(([m,y])=>`adapter ${m} `+(y===!1?"is not supported by the environment":"is not available in the build"));let d=l?u.length>1?`since :
53
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...r){const i=new this(l);return r.forEach(o=>i.set(o)),i}static accessor(l){const i=(this[Ey]=this[Ey]={accessors:{}}).accessors,o=this.prototype;function u(d){const m=sr(d);i[m]||(Tw(o,d),i[m]=!0)}return H.isArray(l)?l.forEach(u):u(l),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Jt.prototype,({value:n},l)=>{let r=l[0].toUpperCase()+l.slice(1);return{get:()=>n,set(i){this[r]=i}}});H.freezeMethods(Jt);function ed(n,l){const r=this||wr,i=l||r,o=Jt.from(i.headers);let u=i.data;return H.forEach(n,function(m){u=m.call(r,u,o.normalize(),l?l.status:void 0)}),o.normalize(),u}function a1(n){return!!(n&&n.__CANCEL__)}function es(n,l,r){ve.call(this,n??"canceled",ve.ERR_CANCELED,l,r),this.name="CanceledError"}H.inherits(es,ve,{__CANCEL__:!0});function l1(n,l,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?n(r):l(new ve("Request failed with status code "+r.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ow(n){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return l&&l[1]||""}function Rw(n,l){n=n||10;const r=new Array(n),i=new Array(n);let o=0,u=0,d;return l=l!==void 0?l:1e3,function(y){const p=Date.now(),g=i[u];d||(d=p),r[o]=y,i[o]=p;let b=u,E=0;for(;b!==o;)E+=r[b++],b=b%n;if(o=(o+1)%n,o===u&&(u=(u+1)%n),p-d<l)return;const C=g&&p-g;return C?Math.round(E*1e3/C):void 0}}function Dw(n,l){let r=0,i=1e3/l,o,u;const d=(p,g=Date.now())=>{r=g,o=null,u&&(clearTimeout(u),u=null),n.apply(null,p)};return[(...p)=>{const g=Date.now(),b=g-r;b>=i?d(p,g):(o=p,u||(u=setTimeout(()=>{u=null,d(o)},i-b)))},()=>o&&d(o)]}const hu=(n,l,r=3)=>{let i=0;const o=Rw(50,250);return Dw(u=>{const d=u.loaded,m=u.lengthComputable?u.total:void 0,y=d-i,p=o(y),g=d<=m;i=d;const b={loaded:d,total:m,progress:m?d/m:void 0,bytes:y,rate:p||void 0,estimated:p&&m&&g?(m-d)/p:void 0,event:u,lengthComputable:m!=null,[l?"download":"upload"]:!0};n(b)},r)},Cy=(n,l)=>{const r=n!=null;return[i=>l[0]({lengthComputable:r,total:n,loaded:i}),l[1]]},_y=n=>(...l)=>H.asap(()=>n(...l)),Mw=Lt.hasStandardBrowserEnv?((n,l)=>r=>(r=new URL(r,Lt.origin),n.protocol===r.protocol&&n.host===r.host&&(l||n.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,Lw=Lt.hasStandardBrowserEnv?{write(n,l,r,i,o,u){const d=[n+"="+encodeURIComponent(l)];H.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),H.isString(i)&&d.push("path="+i),H.isString(o)&&d.push("domain="+o),u===!0&&d.push("secure"),document.cookie=d.join("; ")},read(n){const l=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Uw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function zw(n,l){return l?n.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):n}function i1(n,l,r){let i=!Uw(l);return n&&(i||r==!1)?zw(n,l):l}const Ny=n=>n instanceof Jt?{...n}:n;function Zl(n,l){l=l||{};const r={};function i(p,g,b,E){return H.isPlainObject(p)&&H.isPlainObject(g)?H.merge.call({caseless:E},p,g):H.isPlainObject(g)?H.merge({},g):H.isArray(g)?g.slice():g}function o(p,g,b,E){if(H.isUndefined(g)){if(!H.isUndefined(p))return i(void 0,p,b,E)}else return i(p,g,b,E)}function u(p,g){if(!H.isUndefined(g))return i(void 0,g)}function d(p,g){if(H.isUndefined(g)){if(!H.isUndefined(p))return i(void 0,p)}else return i(void 0,g)}function m(p,g,b){if(b in l)return i(p,g);if(b in n)return i(void 0,p)}const y={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:m,headers:(p,g,b)=>o(Ny(p),Ny(g),b,!0)};return H.forEach(Object.keys(Object.assign({},n,l)),function(g){const b=y[g]||o,E=b(n[g],l[g],g);H.isUndefined(E)&&b!==m||(r[g]=E)}),r}const s1=n=>{const l=Zl({},n);let{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:u,headers:d,auth:m}=l;l.headers=d=Jt.from(d),l.url=e1(i1(l.baseURL,l.url,l.allowAbsoluteUrls),n.params,n.paramsSerializer),m&&d.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):"")));let y;if(H.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((y=d.getContentType())!==!1){const[p,...g]=y?y.split(";").map(b=>b.trim()).filter(Boolean):[];d.setContentType([p||"multipart/form-data",...g].join("; "))}}if(Lt.hasStandardBrowserEnv&&(i&&H.isFunction(i)&&(i=i(l)),i||i!==!1&&Mw(l.url))){const p=o&&u&&Lw.read(u);p&&d.set(o,p)}return l},qw=typeof XMLHttpRequest<"u",kw=qw&&function(n){return new Promise(function(r,i){const o=s1(n);let u=o.data;const d=Jt.from(o.headers).normalize();let{responseType:m,onUploadProgress:y,onDownloadProgress:p}=o,g,b,E,C,w;function O(){C&&C(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let N=new XMLHttpRequest;N.open(o.method.toUpperCase(),o.url,!0),N.timeout=o.timeout;function _(){if(!N)return;const j=Jt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),V={data:!m||m==="text"||m==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:j,config:n,request:N};l1(function(G){r(G),O()},function(G){i(G),O()},V),N=null}"onloadend"in N?N.onloadend=_:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(_)},N.onabort=function(){N&&(i(new ve("Request aborted",ve.ECONNABORTED,n,N)),N=null)},N.onerror=function(){i(new ve("Network Error",ve.ERR_NETWORK,n,N)),N=null},N.ontimeout=function(){let B=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||t1;o.timeoutErrorMessage&&(B=o.timeoutErrorMessage),i(new ve(B,V.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,n,N)),N=null},u===void 0&&d.setContentType(null),"setRequestHeader"in N&&H.forEach(d.toJSON(),function(B,V){N.setRequestHeader(V,B)}),H.isUndefined(o.withCredentials)||(N.withCredentials=!!o.withCredentials),m&&m!=="json"&&(N.responseType=o.responseType),p&&([E,w]=hu(p,!0),N.addEventListener("progress",E)),y&&N.upload&&([b,C]=hu(y),N.upload.addEventListener("progress",b),N.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(g=j=>{N&&(i(!j||j.type?new es(null,n,N):j),N.abort(),N=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const A=Ow(o.url);if(A&&Lt.protocols.indexOf(A)===-1){i(new ve("Unsupported protocol "+A+":",ve.ERR_BAD_REQUEST,n));return}N.send(u||null)})},Bw=(n,l)=>{const{length:r}=n=n?n.filter(Boolean):[];if(l||r){let i=new AbortController,o;const u=function(p){if(!o){o=!0,m();const g=p instanceof Error?p:this.reason;i.abort(g instanceof ve?g:new es(g instanceof Error?g.message:g))}};let d=l&&setTimeout(()=>{d=null,u(new ve(`timeout ${l} of ms exceeded`,ve.ETIMEDOUT))},l);const m=()=>{n&&(d&&clearTimeout(d),d=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(u):p.removeEventListener("abort",u)}),n=null)};n.forEach(p=>p.addEventListener("abort",u));const{signal:y}=i;return y.unsubscribe=()=>H.asap(m),y}},Hw=function*(n,l){let r=n.byteLength;if(r<l){yield n;return}let i=0,o;for(;i<r;)o=i+l,yield n.slice(i,o),i=o},Qw=async function*(n,l){for await(const r of $w(n))yield*Hw(r,l)},$w=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const l=n.getReader();try{for(;;){const{done:r,value:i}=await l.read();if(r)break;yield i}}finally{await l.cancel()}},jy=(n,l,r,i)=>{const o=Qw(n,l);let u=0,d,m=y=>{d||(d=!0,i&&i(y))};return new ReadableStream({async pull(y){try{const{done:p,value:g}=await o.next();if(p){m(),y.close();return}let b=g.byteLength;if(r){let E=u+=b;r(E)}y.enqueue(new Uint8Array(g))}catch(p){throw m(p),p}},cancel(y){return m(y),o.return()}},{highWaterMark:2})},Tu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r1=Tu&&typeof ReadableStream=="function",Yw=Tu&&(typeof TextEncoder=="function"?(n=>l=>n.encode(l))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),o1=(n,...l)=>{try{return!!n(...l)}catch{return!1}},Vw=r1&&o1(()=>{let n=!1;const l=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!l}),Ay=64*1024,Ed=r1&&o1(()=>H.isReadableStream(new Response("").body)),mu={stream:Ed&&(n=>n.body)};Tu&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!mu[l]&&(mu[l]=H.isFunction(n[l])?r=>r[l]():(r,i)=>{throw new ve(`Response type '${l}' is not supported`,ve.ERR_NOT_SUPPORT,i)})})})(new Response);const Kw=async n=>{if(n==null)return 0;if(H.isBlob(n))return n.size;if(H.isSpecCompliantForm(n))return(await new Request(Lt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(H.isArrayBufferView(n)||H.isArrayBuffer(n))return n.byteLength;if(H.isURLSearchParams(n)&&(n=n+""),H.isString(n))return(await Yw(n)).byteLength},Fw=async(n,l)=>{const r=H.toFiniteNumber(n.getContentLength());return r??Kw(l)},Gw=Tu&&(async n=>{let{url:l,method:r,data:i,signal:o,cancelToken:u,timeout:d,onDownloadProgress:m,onUploadProgress:y,responseType:p,headers:g,withCredentials:b="same-origin",fetchOptions:E}=s1(n);p=p?(p+"").toLowerCase():"text";let C=Bw([o,u&&u.toAbortSignal()],d),w;const O=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let N;try{if(y&&Vw&&r!=="get"&&r!=="head"&&(N=await Fw(g,i))!==0){let V=new Request(l,{method:"POST",body:i,duplex:"half"}),Q;if(H.isFormData(i)&&(Q=V.headers.get("content-type"))&&g.setContentType(Q),V.body){const[G,Z]=Cy(N,hu(_y(y)));i=jy(V.body,Ay,G,Z)}}H.isString(b)||(b=b?"include":"omit");const _="credentials"in Request.prototype;w=new Request(l,{...E,signal:C,method:r.toUpperCase(),headers:g.normalize().toJSON(),body:i,duplex:"half",credentials:_?b:void 0});let A=await fetch(w);const j=Ed&&(p==="stream"||p==="response");if(Ed&&(m||j&&O)){const V={};["status","statusText","headers"].forEach(te=>{V[te]=A[te]});const Q=H.toFiniteNumber(A.headers.get("content-length")),[G,Z]=m&&Cy(Q,hu(_y(m),!0))||[];A=new Response(jy(A.body,Ay,G,()=>{Z&&Z(),O&&O()}),V)}p=p||"text";let B=await mu[H.findKey(mu,p)||"text"](A,n);return!j&&O&&O(),await new Promise((V,Q)=>{l1(V,Q,{data:B,headers:Jt.from(A.headers),status:A.status,statusText:A.statusText,config:n,request:w})})}catch(_){throw O&&O(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,n,w),{cause:_.cause||_}):ve.from(_,_&&_.code,n,w)}}),Cd={http:ow,xhr:kw,fetch:Gw};H.forEach(Cd,(n,l)=>{if(n){try{Object.defineProperty(n,"name",{value:l})}catch{}Object.defineProperty(n,"adapterName",{value:l})}});const Ty=n=>`- ${n}`,Xw=n=>H.isFunction(n)||n===null||n===!1,u1={getAdapter:n=>{n=H.isArray(n)?n:[n];const{length:l}=n;let r,i;const o={};for(let u=0;u<l;u++){r=n[u];let d;if(i=r,!Xw(r)&&(i=Cd[(d=String(r)).toLowerCase()],i===void 0))throw new ve(`Unknown adapter '${d}'`);if(i)break;o[d||"#"+u]=i}if(!i){const u=Object.entries(o).map(([m,y])=>`adapter ${m} `+(y===!1?"is not supported by the environment":"is not available in the build"));let d=l?u.length>1?`since :
54
54
  `+u.map(Ty).join(`
55
55
  `):" "+Ty(u[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return i},adapters:Cd};function td(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new es(null,n)}function Oy(n){return td(n),n.headers=Jt.from(n.headers),n.data=ed.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),u1.getAdapter(n.adapter||wr.adapter)(n).then(function(i){return td(n),i.data=ed.call(n,n.transformResponse,i),i.headers=Jt.from(i.headers),i},function(i){return a1(i)||(td(n),i&&i.response&&(i.response.data=ed.call(n,n.transformResponse,i.response),i.response.headers=Jt.from(i.response.headers))),Promise.reject(i)})}const c1="1.9.0",Ou={};["object","boolean","number","function","string","symbol"].forEach((n,l)=>{Ou[n]=function(i){return typeof i===n||"a"+(l<1?"n ":" ")+n}});const Ry={};Ou.transitional=function(l,r,i){function o(u,d){return"[Axios v"+c1+"] Transitional option '"+u+"'"+d+(i?". "+i:"")}return(u,d,m)=>{if(l===!1)throw new ve(o(d," has been removed"+(r?" in "+r:"")),ve.ERR_DEPRECATED);return r&&!Ry[d]&&(Ry[d]=!0,console.warn(o(d," has been deprecated since v"+r+" and will be removed in the near future"))),l?l(u,d,m):!0}};Ou.spelling=function(l){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${l}`),!0)};function Zw(n,l,r){if(typeof n!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let o=i.length;for(;o-- >0;){const u=i[o],d=l[u];if(d){const m=n[u],y=m===void 0||d(m,u,n);if(y!==!0)throw new ve("option "+u+" must be "+y,ve.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ve("Unknown option "+u,ve.ERR_BAD_OPTION)}}const nu={assertOptions:Zw,validators:Ou},Jn=nu.validators;let Fl=class{constructor(l){this.defaults=l||{},this.interceptors={request:new wy,response:new wy}}async request(l,r){try{return await this._request(l,r)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=o.stack?o.stack.replace(/^.+\n/,""):"";try{i.stack?u&&!String(i.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(i.stack+=`
56
- `+u):i.stack=u}catch{}}throw i}}_request(l,r){typeof l=="string"?(r=r||{},r.url=l):r=l||{},r=Zl(this.defaults,r);const{transitional:i,paramsSerializer:o,headers:u}=r;i!==void 0&&nu.assertOptions(i,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),o!=null&&(H.isFunction(o)?r.paramsSerializer={serialize:o}:nu.assertOptions(o,{encode:Jn.function,serialize:Jn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),nu.assertOptions(r,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d=u&&H.merge(u.common,u[r.method]);u&&H.forEach(["delete","get","head","post","put","patch","common"],w=>{delete u[w]}),r.headers=Jt.concat(d,u);const m=[];let y=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(r)===!1||(y=y&&O.synchronous,m.unshift(O.fulfilled,O.rejected))});const p=[];this.interceptors.response.forEach(function(O){p.push(O.fulfilled,O.rejected)});let g,b=0,E;if(!y){const w=[Oy.bind(this),void 0];for(w.unshift.apply(w,m),w.push.apply(w,p),E=w.length,g=Promise.resolve(r);b<E;)g=g.then(w[b++],w[b++]);return g}E=m.length;let C=r;for(b=0;b<E;){const w=m[b++],O=m[b++];try{C=w(C)}catch(N){O.call(this,N);break}}try{g=Oy.call(this,C)}catch(w){return Promise.reject(w)}for(b=0,E=p.length;b<E;)g=g.then(p[b++],p[b++]);return g}getUri(l){l=Zl(this.defaults,l);const r=i1(l.baseURL,l.url,l.allowAbsoluteUrls);return e1(r,l.params,l.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(l){Fl.prototype[l]=function(r,i){return this.request(Zl(i||{},{method:l,url:r,data:(i||{}).data}))}});H.forEach(["post","put","patch"],function(l){function r(i){return function(u,d,m){return this.request(Zl(m||{},{method:l,headers:i?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Fl.prototype[l]=r(),Fl.prototype[l+"Form"]=r(!0)});let Pw=class f1{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(u){r=u});const i=this;this.promise.then(o=>{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](o);i._listeners=null}),this.promise.then=o=>{let u;const d=new Promise(m=>{i.subscribe(m),u=m}).then(o);return d.cancel=function(){i.unsubscribe(u)},d},l(function(u,d,m){i.reason||(i.reason=new es(u,d,m),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const r=this._listeners.indexOf(l);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const l=new AbortController,r=i=>{l.abort(i)};return this.subscribe(r),l.signal.unsubscribe=()=>this.unsubscribe(r),l.signal}static source(){let l;return{token:new f1(function(o){l=o}),cancel:l}}};function Jw(n){return function(r){return n.apply(null,r)}}function Iw(n){return H.isObject(n)&&n.isAxiosError===!0}const _d={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_d).forEach(([n,l])=>{_d[l]=n});function d1(n){const l=new Fl(n),r=$v(Fl.prototype.request,l);return H.extend(r,Fl.prototype,l,{allOwnKeys:!0}),H.extend(r,l,null,{allOwnKeys:!0}),r.create=function(o){return d1(Zl(n,o))},r}const lt=d1(wr);lt.Axios=Fl;lt.CanceledError=es;lt.CancelToken=Pw;lt.isCancel=a1;lt.VERSION=c1;lt.toFormData=Au;lt.AxiosError=ve;lt.Cancel=lt.CanceledError;lt.all=function(l){return Promise.all(l)};lt.spread=Jw;lt.isAxiosError=Iw;lt.mergeConfig=Zl;lt.AxiosHeaders=Jt;lt.formToJSON=n=>n1(H.isHTMLForm(n)?new FormData(n):n);lt.getAdapter=u1.getAdapter;lt.HttpStatusCode=_d;lt.default=lt;const{Axios:_j,AxiosError:Ww,CanceledError:Nj,isCancel:jj,CancelToken:Aj,VERSION:Tj,all:Oj,Cancel:Rj,isAxiosError:pu,spread:Dj,toFormData:Mj,AxiosHeaders:Lj,HttpStatusCode:Uj,formToJSON:qj,getAdapter:zj,mergeConfig:kj}=lt,Nd="__access_token__",e3=()=>{try{const n=localStorage.getItem(Nd);return n||void 0}catch{return}},Ko=n=>{n?localStorage.setItem(Nd,n):localStorage.removeItem(Nd)};let t3={data:""},n3=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||t3,a3=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l3=/\/\*[^]*?\*\/| +/g,Dy=/\n+/g,fl=(n,l)=>{let r="",i="",o="";for(let u in n){let d=n[u];u[0]=="@"?u[1]=="i"?r=u+" "+d+";":i+=u[1]=="f"?fl(d,u):u+"{"+fl(d,u[1]=="k"?"":l)+"}":typeof d=="object"?i+=fl(d,l?l.replace(/([^,])+/g,m=>u.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,y=>/&/.test(y)?y.replace(/&/g,m):m?m+" "+y:y)):u):d!=null&&(u=/^--/.test(u)?u:u.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=fl.p?fl.p(u,d):u+":"+d+";")}return r+(l&&o?l+"{"+o+"}":o)+i},Ta={},h1=n=>{if(typeof n=="object"){let l="";for(let r in n)l+=r+h1(n[r]);return l}return n},i3=(n,l,r,i,o)=>{let u=h1(n),d=Ta[u]||(Ta[u]=(y=>{let p=0,g=11;for(;p<y.length;)g=101*g+y.charCodeAt(p++)>>>0;return"go"+g})(u));if(!Ta[d]){let y=u!==n?n:(p=>{let g,b,E=[{}];for(;g=a3.exec(p.replace(l3,""));)g[4]?E.shift():g[3]?(b=g[3].replace(Dy," ").trim(),E.unshift(E[0][b]=E[0][b]||{})):E[0][g[1]]=g[2].replace(Dy," ").trim();return E[0]})(n);Ta[d]=fl(o?{["@keyframes "+d]:y}:y,r?"":"."+d)}let m=r&&Ta.g?Ta.g:null;return r&&(Ta.g=Ta[d]),((y,p,g,b)=>{b?p.data=p.data.replace(b,y):p.data.indexOf(y)===-1&&(p.data=g?y+p.data:p.data+y)})(Ta[d],l,i,m),d},s3=(n,l,r)=>n.reduce((i,o,u)=>{let d=l[u];if(d&&d.call){let m=d(r),y=m&&m.props&&m.props.className||/^go/.test(m)&&m;d=y?"."+y:m&&typeof m=="object"?m.props?"":fl(m,""):m===!1?"":m}return i+o+(d??"")},"");function Ru(n){let l=this||{},r=n.call?n(l.p):n;return i3(r.unshift?r.raw?s3(r,[].slice.call(arguments,1),l.p):r.reduce((i,o)=>Object.assign(i,o&&o.call?o(l.p):o),{}):r,n3(l.target),l.g,l.o,l.k)}let m1,jd,Ad;Ru.bind({g:1});let La=Ru.bind({k:1});function r3(n,l,r,i){fl.p=l,m1=n,jd=r,Ad=i}function gl(n,l){let r=this||{};return function(){let i=arguments;function o(u,d){let m=Object.assign({},u),y=m.className||o.className;r.p=Object.assign({theme:jd&&jd()},m),r.o=/ *go\d+/.test(y),m.className=Ru.apply(r,i)+(y?" "+y:"");let p=n;return n[0]&&(p=m.as||n,delete m.as),Ad&&p[0]&&Ad(m),m1(p,m)}return o}}var o3=n=>typeof n=="function",yu=(n,l)=>o3(n)?n(l):n,u3=(()=>{let n=0;return()=>(++n).toString()})(),p1=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");n=!l||l.matches}return n}})(),c3=20,y1=(n,l)=>{switch(l.type){case 0:return{...n,toasts:[l.toast,...n.toasts].slice(0,c3)};case 1:return{...n,toasts:n.toasts.map(u=>u.id===l.toast.id?{...u,...l.toast}:u)};case 2:let{toast:r}=l;return y1(n,{type:n.toasts.find(u=>u.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=l;return{...n,toasts:n.toasts.map(u=>u.id===i||i===void 0?{...u,dismissed:!0,visible:!1}:u)};case 4:return l.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(u=>u.id!==l.toastId)};case 5:return{...n,pausedAt:l.time};case 6:let o=l.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(u=>({...u,pauseDuration:u.pauseDuration+o}))}}},au=[],Kl={toasts:[],pausedAt:void 0},Il=n=>{Kl=y1(Kl,n),au.forEach(l=>{l(Kl)})},f3={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},d3=(n={})=>{let[l,r]=x.useState(Kl),i=x.useRef(Kl);x.useEffect(()=>(i.current!==Kl&&r(Kl),au.push(r),()=>{let u=au.indexOf(r);u>-1&&au.splice(u,1)}),[]);let o=l.toasts.map(u=>{var d,m,y;return{...n,...n[u.type],...u,removeDelay:u.removeDelay||((d=n[u.type])==null?void 0:d.removeDelay)||(n==null?void 0:n.removeDelay),duration:u.duration||((m=n[u.type])==null?void 0:m.duration)||(n==null?void 0:n.duration)||f3[u.type],style:{...n.style,...(y=n[u.type])==null?void 0:y.style,...u.style}}});return{...l,toasts:o}},h3=(n,l="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...r,id:(r==null?void 0:r.id)||u3()}),Er=n=>(l,r)=>{let i=h3(l,n,r);return Il({type:2,toast:i}),i.id},$t=(n,l)=>Er("blank")(n,l);$t.error=Er("error");$t.success=Er("success");$t.loading=Er("loading");$t.custom=Er("custom");$t.dismiss=n=>{Il({type:3,toastId:n})};$t.remove=n=>Il({type:4,toastId:n});$t.promise=(n,l,r)=>{let i=$t.loading(l.loading,{...r,...r==null?void 0:r.loading});return typeof n=="function"&&(n=n()),n.then(o=>{let u=l.success?yu(l.success,o):void 0;return u?$t.success(u,{id:i,...r,...r==null?void 0:r.success}):$t.dismiss(i),o}).catch(o=>{let u=l.error?yu(l.error,o):void 0;u?$t.error(u,{id:i,...r,...r==null?void 0:r.error}):$t.dismiss(i)}),n};var m3=(n,l)=>{Il({type:1,toast:{id:n,height:l}})},p3=()=>{Il({type:5,time:Date.now()})},dr=new Map,y3=1e3,v3=(n,l=y3)=>{if(dr.has(n))return;let r=setTimeout(()=>{dr.delete(n),Il({type:4,toastId:n})},l);dr.set(n,r)},g3=n=>{let{toasts:l,pausedAt:r}=d3(n);x.useEffect(()=>{if(r)return;let u=Date.now(),d=l.map(m=>{if(m.duration===1/0)return;let y=(m.duration||0)+m.pauseDuration-(u-m.createdAt);if(y<0){m.visible&&$t.dismiss(m.id);return}return setTimeout(()=>$t.dismiss(m.id),y)});return()=>{d.forEach(m=>m&&clearTimeout(m))}},[l,r]);let i=x.useCallback(()=>{r&&Il({type:6,time:Date.now()})},[r]),o=x.useCallback((u,d)=>{let{reverseOrder:m=!1,gutter:y=8,defaultPosition:p}=d||{},g=l.filter(C=>(C.position||p)===(u.position||p)&&C.height),b=g.findIndex(C=>C.id===u.id),E=g.filter((C,w)=>w<b&&C.visible).length;return g.filter(C=>C.visible).slice(...m?[E+1]:[0,E]).reduce((C,w)=>C+(w.height||0)+y,0)},[l]);return x.useEffect(()=>{l.forEach(u=>{if(u.dismissed)v3(u.id,u.removeDelay);else{let d=dr.get(u.id);d&&(clearTimeout(d),dr.delete(u.id))}})},[l]),{toasts:l,handlers:{updateHeight:m3,startPause:p3,endPause:i,calculateOffset:o}}},b3=La`
56
+ `+u):i.stack=u}catch{}}throw i}}_request(l,r){typeof l=="string"?(r=r||{},r.url=l):r=l||{},r=Zl(this.defaults,r);const{transitional:i,paramsSerializer:o,headers:u}=r;i!==void 0&&nu.assertOptions(i,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),o!=null&&(H.isFunction(o)?r.paramsSerializer={serialize:o}:nu.assertOptions(o,{encode:Jn.function,serialize:Jn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),nu.assertOptions(r,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d=u&&H.merge(u.common,u[r.method]);u&&H.forEach(["delete","get","head","post","put","patch","common"],w=>{delete u[w]}),r.headers=Jt.concat(d,u);const m=[];let y=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(r)===!1||(y=y&&O.synchronous,m.unshift(O.fulfilled,O.rejected))});const p=[];this.interceptors.response.forEach(function(O){p.push(O.fulfilled,O.rejected)});let g,b=0,E;if(!y){const w=[Oy.bind(this),void 0];for(w.unshift.apply(w,m),w.push.apply(w,p),E=w.length,g=Promise.resolve(r);b<E;)g=g.then(w[b++],w[b++]);return g}E=m.length;let C=r;for(b=0;b<E;){const w=m[b++],O=m[b++];try{C=w(C)}catch(N){O.call(this,N);break}}try{g=Oy.call(this,C)}catch(w){return Promise.reject(w)}for(b=0,E=p.length;b<E;)g=g.then(p[b++],p[b++]);return g}getUri(l){l=Zl(this.defaults,l);const r=i1(l.baseURL,l.url,l.allowAbsoluteUrls);return e1(r,l.params,l.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(l){Fl.prototype[l]=function(r,i){return this.request(Zl(i||{},{method:l,url:r,data:(i||{}).data}))}});H.forEach(["post","put","patch"],function(l){function r(i){return function(u,d,m){return this.request(Zl(m||{},{method:l,headers:i?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Fl.prototype[l]=r(),Fl.prototype[l+"Form"]=r(!0)});let Pw=class f1{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(u){r=u});const i=this;this.promise.then(o=>{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](o);i._listeners=null}),this.promise.then=o=>{let u;const d=new Promise(m=>{i.subscribe(m),u=m}).then(o);return d.cancel=function(){i.unsubscribe(u)},d},l(function(u,d,m){i.reason||(i.reason=new es(u,d,m),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const r=this._listeners.indexOf(l);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const l=new AbortController,r=i=>{l.abort(i)};return this.subscribe(r),l.signal.unsubscribe=()=>this.unsubscribe(r),l.signal}static source(){let l;return{token:new f1(function(o){l=o}),cancel:l}}};function Jw(n){return function(r){return n.apply(null,r)}}function Iw(n){return H.isObject(n)&&n.isAxiosError===!0}const _d={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_d).forEach(([n,l])=>{_d[l]=n});function d1(n){const l=new Fl(n),r=$v(Fl.prototype.request,l);return H.extend(r,Fl.prototype,l,{allOwnKeys:!0}),H.extend(r,l,null,{allOwnKeys:!0}),r.create=function(o){return d1(Zl(n,o))},r}const lt=d1(wr);lt.Axios=Fl;lt.CanceledError=es;lt.CancelToken=Pw;lt.isCancel=a1;lt.VERSION=c1;lt.toFormData=Au;lt.AxiosError=ve;lt.Cancel=lt.CanceledError;lt.all=function(l){return Promise.all(l)};lt.spread=Jw;lt.isAxiosError=Iw;lt.mergeConfig=Zl;lt.AxiosHeaders=Jt;lt.formToJSON=n=>n1(H.isHTMLForm(n)?new FormData(n):n);lt.getAdapter=u1.getAdapter;lt.HttpStatusCode=_d;lt.default=lt;const{Axios:Nj,AxiosError:Ww,CanceledError:jj,isCancel:Aj,CancelToken:Tj,VERSION:Oj,all:Rj,Cancel:Dj,isAxiosError:pu,spread:Mj,toFormData:Lj,AxiosHeaders:Uj,HttpStatusCode:zj,formToJSON:qj,getAdapter:kj,mergeConfig:Bj}=lt,Nd="__access_token__",e3=()=>{try{const n=localStorage.getItem(Nd);return n||void 0}catch{return}},Ko=n=>{n?localStorage.setItem(Nd,n):localStorage.removeItem(Nd)};let t3={data:""},n3=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||t3,a3=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l3=/\/\*[^]*?\*\/| +/g,Dy=/\n+/g,fl=(n,l)=>{let r="",i="",o="";for(let u in n){let d=n[u];u[0]=="@"?u[1]=="i"?r=u+" "+d+";":i+=u[1]=="f"?fl(d,u):u+"{"+fl(d,u[1]=="k"?"":l)+"}":typeof d=="object"?i+=fl(d,l?l.replace(/([^,])+/g,m=>u.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,y=>/&/.test(y)?y.replace(/&/g,m):m?m+" "+y:y)):u):d!=null&&(u=/^--/.test(u)?u:u.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=fl.p?fl.p(u,d):u+":"+d+";")}return r+(l&&o?l+"{"+o+"}":o)+i},Ta={},h1=n=>{if(typeof n=="object"){let l="";for(let r in n)l+=r+h1(n[r]);return l}return n},i3=(n,l,r,i,o)=>{let u=h1(n),d=Ta[u]||(Ta[u]=(y=>{let p=0,g=11;for(;p<y.length;)g=101*g+y.charCodeAt(p++)>>>0;return"go"+g})(u));if(!Ta[d]){let y=u!==n?n:(p=>{let g,b,E=[{}];for(;g=a3.exec(p.replace(l3,""));)g[4]?E.shift():g[3]?(b=g[3].replace(Dy," ").trim(),E.unshift(E[0][b]=E[0][b]||{})):E[0][g[1]]=g[2].replace(Dy," ").trim();return E[0]})(n);Ta[d]=fl(o?{["@keyframes "+d]:y}:y,r?"":"."+d)}let m=r&&Ta.g?Ta.g:null;return r&&(Ta.g=Ta[d]),((y,p,g,b)=>{b?p.data=p.data.replace(b,y):p.data.indexOf(y)===-1&&(p.data=g?y+p.data:p.data+y)})(Ta[d],l,i,m),d},s3=(n,l,r)=>n.reduce((i,o,u)=>{let d=l[u];if(d&&d.call){let m=d(r),y=m&&m.props&&m.props.className||/^go/.test(m)&&m;d=y?"."+y:m&&typeof m=="object"?m.props?"":fl(m,""):m===!1?"":m}return i+o+(d??"")},"");function Ru(n){let l=this||{},r=n.call?n(l.p):n;return i3(r.unshift?r.raw?s3(r,[].slice.call(arguments,1),l.p):r.reduce((i,o)=>Object.assign(i,o&&o.call?o(l.p):o),{}):r,n3(l.target),l.g,l.o,l.k)}let m1,jd,Ad;Ru.bind({g:1});let La=Ru.bind({k:1});function r3(n,l,r,i){fl.p=l,m1=n,jd=r,Ad=i}function gl(n,l){let r=this||{};return function(){let i=arguments;function o(u,d){let m=Object.assign({},u),y=m.className||o.className;r.p=Object.assign({theme:jd&&jd()},m),r.o=/ *go\d+/.test(y),m.className=Ru.apply(r,i)+(y?" "+y:"");let p=n;return n[0]&&(p=m.as||n,delete m.as),Ad&&p[0]&&Ad(m),m1(p,m)}return o}}var o3=n=>typeof n=="function",yu=(n,l)=>o3(n)?n(l):n,u3=(()=>{let n=0;return()=>(++n).toString()})(),p1=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");n=!l||l.matches}return n}})(),c3=20,y1=(n,l)=>{switch(l.type){case 0:return{...n,toasts:[l.toast,...n.toasts].slice(0,c3)};case 1:return{...n,toasts:n.toasts.map(u=>u.id===l.toast.id?{...u,...l.toast}:u)};case 2:let{toast:r}=l;return y1(n,{type:n.toasts.find(u=>u.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=l;return{...n,toasts:n.toasts.map(u=>u.id===i||i===void 0?{...u,dismissed:!0,visible:!1}:u)};case 4:return l.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(u=>u.id!==l.toastId)};case 5:return{...n,pausedAt:l.time};case 6:let o=l.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(u=>({...u,pauseDuration:u.pauseDuration+o}))}}},au=[],Kl={toasts:[],pausedAt:void 0},Il=n=>{Kl=y1(Kl,n),au.forEach(l=>{l(Kl)})},f3={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},d3=(n={})=>{let[l,r]=x.useState(Kl),i=x.useRef(Kl);x.useEffect(()=>(i.current!==Kl&&r(Kl),au.push(r),()=>{let u=au.indexOf(r);u>-1&&au.splice(u,1)}),[]);let o=l.toasts.map(u=>{var d,m,y;return{...n,...n[u.type],...u,removeDelay:u.removeDelay||((d=n[u.type])==null?void 0:d.removeDelay)||(n==null?void 0:n.removeDelay),duration:u.duration||((m=n[u.type])==null?void 0:m.duration)||(n==null?void 0:n.duration)||f3[u.type],style:{...n.style,...(y=n[u.type])==null?void 0:y.style,...u.style}}});return{...l,toasts:o}},h3=(n,l="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...r,id:(r==null?void 0:r.id)||u3()}),Er=n=>(l,r)=>{let i=h3(l,n,r);return Il({type:2,toast:i}),i.id},$t=(n,l)=>Er("blank")(n,l);$t.error=Er("error");$t.success=Er("success");$t.loading=Er("loading");$t.custom=Er("custom");$t.dismiss=n=>{Il({type:3,toastId:n})};$t.remove=n=>Il({type:4,toastId:n});$t.promise=(n,l,r)=>{let i=$t.loading(l.loading,{...r,...r==null?void 0:r.loading});return typeof n=="function"&&(n=n()),n.then(o=>{let u=l.success?yu(l.success,o):void 0;return u?$t.success(u,{id:i,...r,...r==null?void 0:r.success}):$t.dismiss(i),o}).catch(o=>{let u=l.error?yu(l.error,o):void 0;u?$t.error(u,{id:i,...r,...r==null?void 0:r.error}):$t.dismiss(i)}),n};var m3=(n,l)=>{Il({type:1,toast:{id:n,height:l}})},p3=()=>{Il({type:5,time:Date.now()})},dr=new Map,y3=1e3,v3=(n,l=y3)=>{if(dr.has(n))return;let r=setTimeout(()=>{dr.delete(n),Il({type:4,toastId:n})},l);dr.set(n,r)},g3=n=>{let{toasts:l,pausedAt:r}=d3(n);x.useEffect(()=>{if(r)return;let u=Date.now(),d=l.map(m=>{if(m.duration===1/0)return;let y=(m.duration||0)+m.pauseDuration-(u-m.createdAt);if(y<0){m.visible&&$t.dismiss(m.id);return}return setTimeout(()=>$t.dismiss(m.id),y)});return()=>{d.forEach(m=>m&&clearTimeout(m))}},[l,r]);let i=x.useCallback(()=>{r&&Il({type:6,time:Date.now()})},[r]),o=x.useCallback((u,d)=>{let{reverseOrder:m=!1,gutter:y=8,defaultPosition:p}=d||{},g=l.filter(C=>(C.position||p)===(u.position||p)&&C.height),b=g.findIndex(C=>C.id===u.id),E=g.filter((C,w)=>w<b&&C.visible).length;return g.filter(C=>C.visible).slice(...m?[E+1]:[0,E]).reduce((C,w)=>C+(w.height||0)+y,0)},[l]);return x.useEffect(()=>{l.forEach(u=>{if(u.dismissed)v3(u.id,u.removeDelay);else{let d=dr.get(u.id);d&&(clearTimeout(d),dr.delete(u.id))}})},[l]),{toasts:l,handlers:{updateHeight:m3,startPause:p3,endPause:i,calculateOffset:o}}},b3=La`
57
57
  from {
58
58
  transform: scale(0) rotate(45deg);
59
59
  opacity: 0;
@@ -205,7 +205,7 @@ to {
205
205
  `,L3=n=>`
206
206
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
207
207
  100% {transform: translate3d(0,${n*-150}%,-1px) scale(.6); opacity:0;}
208
- `,U3="0%{opacity:0;} 100%{opacity:1;}",q3="0%{opacity:1;} 100%{opacity:0;}",z3=gl("div")`
208
+ `,U3="0%{opacity:0;} 100%{opacity:1;}",z3="0%{opacity:1;} 100%{opacity:0;}",q3=gl("div")`
209
209
  display: flex;
210
210
  align-items: center;
211
211
  background: #fff;
@@ -224,14 +224,14 @@ to {
224
224
  color: inherit;
225
225
  flex: 1 1 auto;
226
226
  white-space: pre-line;
227
- `,B3=(n,l)=>{let r=n.includes("top")?1:-1,[i,o]=p1()?[U3,q3]:[M3(r),L3(r)];return{animation:l?`${La(i)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${La(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},H3=x.memo(({toast:n,position:l,style:r,children:i})=>{let o=n.height?B3(n.position||l||"top-center",n.visible):{opacity:0},u=x.createElement(D3,{toast:n}),d=x.createElement(k3,{...n.ariaProps},yu(n.message,n));return x.createElement(z3,{className:n.className,style:{...o,...r,...n.style}},typeof i=="function"?i({icon:u,message:d}):x.createElement(x.Fragment,null,u,d))});r3(x.createElement);var Q3=({id:n,className:l,style:r,onHeightUpdate:i,children:o})=>{let u=x.useCallback(d=>{if(d){let m=()=>{let y=d.getBoundingClientRect().height;i(n,y)};m(),new MutationObserver(m).observe(d,{subtree:!0,childList:!0,characterData:!0})}},[n,i]);return x.createElement("div",{ref:u,className:l,style:r},o)},$3=(n,l)=>{let r=n.includes("top"),i=r?{top:0}:{bottom:0},o=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:p1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(r?1:-1)}px)`,...i,...o}},Y3=Ru`
227
+ `,B3=(n,l)=>{let r=n.includes("top")?1:-1,[i,o]=p1()?[U3,z3]:[M3(r),L3(r)];return{animation:l?`${La(i)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${La(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},H3=x.memo(({toast:n,position:l,style:r,children:i})=>{let o=n.height?B3(n.position||l||"top-center",n.visible):{opacity:0},u=x.createElement(D3,{toast:n}),d=x.createElement(k3,{...n.ariaProps},yu(n.message,n));return x.createElement(q3,{className:n.className,style:{...o,...r,...n.style}},typeof i=="function"?i({icon:u,message:d}):x.createElement(x.Fragment,null,u,d))});r3(x.createElement);var Q3=({id:n,className:l,style:r,onHeightUpdate:i,children:o})=>{let u=x.useCallback(d=>{if(d){let m=()=>{let y=d.getBoundingClientRect().height;i(n,y)};m(),new MutationObserver(m).observe(d,{subtree:!0,childList:!0,characterData:!0})}},[n,i]);return x.createElement("div",{ref:u,className:l,style:r},o)},$3=(n,l)=>{let r=n.includes("top"),i=r?{top:0}:{bottom:0},o=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:p1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(r?1:-1)}px)`,...i,...o}},Y3=Ru`
228
228
  z-index: 9999;
229
229
  > * {
230
230
  pointer-events: auto;
231
231
  }
232
- `,Fo=16,V3=({reverseOrder:n,position:l="top-center",toastOptions:r,gutter:i,children:o,containerStyle:u,containerClassName:d})=>{let{toasts:m,handlers:y}=g3(r);return x.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Fo,left:Fo,right:Fo,bottom:Fo,pointerEvents:"none",...u},className:d,onMouseEnter:y.startPause,onMouseLeave:y.endPause},m.map(p=>{let g=p.position||l,b=y.calculateOffset(p,{reverseOrder:n,gutter:i,defaultPosition:l}),E=$3(g,b);return x.createElement(Q3,{id:p.id,key:p.id,onHeightUpdate:y.updateHeight,className:p.visible?Y3:"",style:E},p.type==="custom"?yu(p.message,p):o?o(p):x.createElement(H3,{toast:p,position:g}))}))},It=$t;const ft=new dS({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(n,l)=>{var r;return pu(l)&&((r=l.response)==null?void 0:r.status)===404?!1:n<3}}},mutationCache:new zv({onError:n=>{var l;pu(n)&&n.status&&n.status>=400&&n.status<500&&(l=n.response)!=null&&l.data.error&&It.error(n.response.data.error)}})}),K3=async()=>{const{data:n}=await Fd.post("/auth/refresh");return n.data.accessToken},F3=async n=>{const{data:l}=await Fd.post("/auth/login",n);return l.data.accessToken},nd=()=>{ft.invalidateQueries({queryKey:["accessToken"]})},Cr=(()=>{let n=Promise.resolve(e3()),l=!1;const r=async()=>{await Fd.post("/auth/logout"),Ko(void 0),window.location.reload()};return{get:async()=>n.then(d=>(nd(),d)),refresh:()=>(l||(l=!0,n=K3().then(d=>(Ko(d),d)).catch(()=>{Ko(void 0),r()}).finally(()=>{l=!1,nd()})),n),login:d=>(l||(l=!0,n=F3(d).then(m=>(Ko(m),m)).finally(()=>{l=!1,nd()})),n),logout:r}})(),v1=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",Oe=lt.create({baseURL:v1,withCredentials:!0});Oe.interceptors.request.use(async n=>{const l=await Cr.get();return l&&(n.headers.Authorization=`Bearer ${l}`),n});Oe.interceptors.response.use(n=>n,n=>{var l;return pu(n)&&n.status===401&&((l=n==null?void 0:n.response)==null?void 0:l.data.error)!=="Missing auth token"&&Cr.refresh(),Promise.reject(n)});const Fd=lt.create({baseURL:v1,withCredentials:!0}),bl="data-sources",g1="auth-user",G3=n=>en({queryKey:["project","datasources",n],queryFn:async()=>{const{data:l}=await Oe.get(`/project/team/${n}/datasources`);return l.data},enabled:!!n}),X3=n=>en({queryKey:["project","saved-queries",n],queryFn:async()=>{const{data:l}=await Oe.get(`/project/team/${n}/queries`);return l.data},enabled:!!n}),ts=n=>{const l=["project","datasources"],r=["project","saved-queries"];return Promise.all([ft.invalidateQueries(l),ft.invalidateQueries(r)])},Z3=n=>{const l=["trash","team"];return ft.invalidateQueries(l)},P3=(n,l)=>en({queryKey:["project",l.teamId,"tables",n,l.selectedDataSources],queryFn:async()=>{const{data:r}=await Oe.get(`/project/team/${l.teamId}/query`,{params:{size:30,search:n,selectedDataSources:l.selectedDataSources}});return r.data},enabled:!!l.teamId,staleTime:0,keepPreviousData:!0}),J3=(n,l)=>{},I3=()=>{},W3={event:J3,pageView:I3},_r=n=>en([bl,n],async()=>{const{data:l}=await Oe.get("/data-sources/"+n);return l.data},{enabled:!!n}),Gd=n=>en({queryKey:[bl,n.teamId],queryFn:async()=>{const{data:l}=await Oe.get("/data-sources",{params:n});return l.data},enabled:n.teamId!==void 0}),ns=n=>en({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:l}=await Oe.get(`/data-sources/${n}/inspections`);return l.data},enabled:!!n}),e4=()=>Nt(async n=>{const{data:l}=await Oe.post("/data-sources",n);return l.data},{onSuccess:()=>{ft.invalidateQueries([bl]),ts()},onError:()=>{}}),t4=()=>Nt({mutationFn:async({dataSource:n,id:l})=>{const{data:r}=await Oe.put(`/data-sources/${l}`,n);return r.data},onSuccess:()=>{ft.invalidateQueries([bl]),ts()}}),b1=()=>Nt({mutationFn:async n=>{await Oe.post(`/data-sources/${n}/inspect`)},onSuccess:()=>{ft.invalidateQueries([bl])}}),n4=()=>Nt({mutationFn:async n=>{await Oe.delete(`/data-sources/${n}`)},onSuccess:()=>{ft.invalidateQueries([bl]),ts()}}),x1=()=>en(["accessToken"],Cr.get),la=()=>{const{data:n}=x1();return en({queryKey:[g1],queryFn:async()=>{const{data:l}=await Oe.get("/users");return l.data},enabled:!!n,retry:(l,r)=>pu(r)&&r.code==="ERR_NETWORK"?!1:l<3})},a4=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.patch("/users",n);return l.data},onSuccess:async n=>{ft.setQueryData([g1],n)}}),l4=()=>Nt({mutationFn:async n=>(await Oe.post("/users",n),!0),onSuccess:()=>{ft.invalidateQueries({queryKey:["team-users"]})}}),i4="_alert_14h2t_2",s4="_info_14h2t_2",r4="_danger_14h2t_2",o4="_success_14h2t_2",u4="_warning_14h2t_2",c4="_dark_14h2t_2",qi={alert:i4,info:s4,danger:r4,success:o4,warning:u4,dark:c4};function S1(n){var l,r,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(l=0;l<o;l++)n[l]&&(r=S1(n[l]))&&(i&&(i+=" "),i+=r)}else for(r in n)n[r]&&(i&&(i+=" "),i+=r);return i}function ae(){for(var n,l,r=0,i="",o=arguments.length;r<o;r++)(n=arguments[r])&&(l=S1(n))&&(i&&(i+=" "),i+=l);return i}const qt=({variant:n,noRounded:l,className:r,children:i,...o})=>h.jsx("div",{className:ae(qi.alert,!l&&"rounded-lg",(n==="info"||!n)&&qi.info,n==="danger"&&qi.danger,n==="dark"&&qi.dark,n==="warning"&&qi.warning,n==="success"&&qi.success,r),role:"alert",...o,children:i}),dn=n=>{const l=new Set;let r=n;const i=m=>(l.add(m),()=>l.delete(m)),o=m=>(l.forEach(y=>y(m)),!0),u=m=>{r=typeof m=="function"?m(r):m,o(r)},d=m=>()=>m?m(r):r;return[m=>x.useSyncExternalStore(i,d(m),d(m)),u,{get:()=>r,subscribe:m=>(m(r),i(m))}]};function f4(n){const l=[];for(const r of n)for(const i of r.columns)i.ref&&(l.push({id:`${r.tableName}->${i.ref.table}.${i.ref.field}`,name:`${r.tableName} in ${i.ref.table}`,where:`${r.tableName}.${i.name} = ${i.ref.table}.${i.ref.field}`,on:{fromTable:i.ref.table,toTable:r.tableName,fromColumn:i.ref.field,toColumn:i.name}}),l.push({id:`${i.ref.table}->${r.tableName}.${i.name}`,name:`${i.ref.table} in ${r.tableName}`,where:`${i.ref.table}.${i.ref.field} = ${r.tableName}.${i.name}`,on:{fromTable:r.tableName,toTable:i.ref.table,fromColumn:i.name,toColumn:i.ref.field}}));return l}const d4=n=>en({queryKey:["hooks",n],queryFn:async()=>{const l=await ft.fetchQuery({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:r}=await Oe.get(`/data-sources/${n}/inspections`);return r.data}});return f4(l)},enabled:!!n}),Xd=[{value:"=",label:"equals"},{value:"<>",label:"not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"},{value:"LIKE",label:"contains"},{value:"NOT LIKE",label:"not contains"},{value:"IN",label:"in list"},{value:"NOT IN",label:"not in list"},{value:"IS NULL",label:"is null"},{value:"IS NOT NULL",label:"is not null"}],Zd=Xd.reduce((n,l)=>(n[l.value]=l.label,n),{}),Pd=Xd.reduce((n,l)=>(n[l.label]=l.value,n),{}),as=n=>n.map(l=>({label:Zd[l],value:l})),h4=as(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]),m4=as(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);as(["=","<>","IS NULL","IS NOT NULL"]);const p4=as(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);as(["IS NULL","IS NOT NULL"]);as(["IN","NOT IN"]);const w1=n=>n!=="IS NULL"&&n!=="IS NOT NULL",y4=(n,l)=>w1(n)?n==="IN"||n==="NOT IN"?l.split(",").map(r=>({value:r.trim(),isColumn:!1})):[{value:l,isColumn:!1}]:[],v4=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],g4=["integer","smallint","decimal","numeric","float","real","double precision","int","smallint","integer","bigint","decimal","numeric","real","double precision","serial","bigserial","money"],b4=["date","time","datetime","timestamp","year","date","time","time without time zone","time with time zone","timestamp","timestamp without time zone","timestamp with time zone","interval"],x4=["date","datetime","timestamp","timestamptz"].reduce((n,l)=>(n[l]=!0,n),{}),Wn=n=>n.fn?n.distinct===!0?`${n.fn} distinct ${n.value}`:`${n.fn} ${n.value}`:n.value;var Zt=(n=>(n.OWNER="owner",n.ADMIN="admin",n.EDITOR="editor",n.READ_ONLY="read_only",n))(Zt||{});const My={[Zt.READ_ONLY]:10,[Zt.EDITOR]:20,[Zt.ADMIN]:30,[Zt.OWNER]:40};function S4(n,l){if(!n||!l)return{};const r=new Set;for(const o of l)o.table&&r.add(o.table);const i={};for(const o of r){const u=n.find(d=>d.tableName===o);if(u){i[o]=[];const d=u.columns.filter(m=>m.isPrimary);for(const m of d)if(l.find(p=>p.table===o&&p.column===m.name))i[o].push(m.name);else{delete i[o];break}}}return i}function w4(n,l,r,i){const{data:o}=d4(l),{data:u}=ns(l);return x.useMemo(()=>{const d=S4(u,n==null?void 0:n.result.columns);return{name:r,tabId:i,hooks:(()=>{const m=[];if(!o||!n||!n.result.columns)return m;for(const y of o)(n.result.tables.includes(y.on.toTable)||n.result.tables.includes(y.on.fromTable))&&m.push(y);return m})(),availableJoins:(()=>{const m=[];if(!o||!n||!n.result.columns)return m;for(const y of o)!n.result.tables.includes(y.on.toTable)&&n.result.tables.includes(y.on.fromTable)&&m.push(y);return m})(),allColumns:(n==null?void 0:n.result.allColumns)||[],dataSourceId:l,entities:Object.keys(d),getValue:(m,y)=>{var b;const p=Wn(y),g=(b=n==null?void 0:n.result.columns)==null?void 0:b.findIndex(E=>E.full===p);if(g!=null&&g>-1)return m[g]},getEntityKey:(m,y)=>d[m].reduce((p,g)=>{var E;const b=(E=n==null?void 0:n.result.columns)==null?void 0:E.findIndex(C=>C.column===g&&C.table===m);return b!=null&&b>-1&&p.push([g,y[b]]),p},[]),getColumnType:m=>{const y=n==null?void 0:n.result.allColumns.find(p=>p.full===m);if(y)return y.type}}},[n,l,o,u,r])}function E4(n,l){return x.useMemo(()=>({state:n,setState:l}),[n,l])}function Yi(n){return{dataSourceId:n.dataSourceId||"",page:(n==null?void 0:n.page)||0,size:(n==null?void 0:n.size)||50,table:n.table||"",filters:(n==null?void 0:n.filters)||[],joins:(n==null?void 0:n.joins)??[],orderBy:(n==null?void 0:n.orderBy)??[],columns:(n==null?void 0:n.columns)??[],groupBy:(n==null?void 0:n.groupBy)??[],aggregations:(n==null?void 0:n.aggregations)??[]}}const Fe={home:{path:"/"},workbench:{path:"/workbench"},share:{path:"/share"},login:{path:"/login"}},Jd=n=>{ft.setQueryData(["workbench-tabs"],l=>n(l||[]))},C4=(n,l)=>{ft.setQueryData(["workbench-tabs",n],r=>r&&l(r))},Id=()=>en({queryKey:["workbench-tabs"],queryFn:async()=>{const{data:n}=await Oe.get("/workbench-tabs");return n.data}}),_4=n=>en({queryKey:["workbench-tabs",n],queryFn:async()=>{const{data:l}=await Oe.get(`/workbench-tabs/${n}`);return l.data}}),ls=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/workbench-tabs",n);return l.data},onSuccess:async n=>{Jd(l=>[...l,n])}}),N4=()=>Nt({mutationFn:async n=>(await Oe.patch(`/workbench-tabs/${n}`,{archived:!0}),n),onMutate:n=>{Jd(l=>l.filter(r=>r.id!==n))}}),j4=()=>Nt({mutationFn:async n=>(await Oe.patch(`/workbench-tabs/${n}`,{archived:!1}),n),onSuccess:()=>O4()}),A4=()=>Nt({mutationFn:async({id:n,payload:l})=>(await Oe.patch(`/workbench-tabs/${n}`,l),!0),onMutate:({id:n,payload:l})=>{C4(n,r=>({...r,...l})),Jd(r=>r.map(i=>i.id!==n?i:{...i,name:l.name||i.name}))}}),T4=(n,l)=>{const{dataSourceId:r,searchAll:i,table:o,filters:u,joins:d,orderBy:m,groupBy:y,columns:p,aggregations:g,page:b=0,size:E=20}=l;return en({queryKey:["workbench-tab-runner",n,r,o,b,E,u,g,d,m,y,p,i],queryFn:async()=>{const{data:C}=await Oe.post(`/workbench-tabs/${n}/run`,l);return C.data},retry:1,enabled:!!o&&!!r,cacheTime:0,keepPreviousData:!0})},E1=n=>ft.invalidateQueries({queryKey:["workbench-tab-runner",n]}),O4=()=>ft.invalidateQueries({queryKey:["workbench-tabs"]}),[R4,ad,D4]=dn(void 0),M4=async()=>new Promise(n=>{ad({onCancel:()=>{ad(void 0),n(void 0)},onConfirm:(l,r,i)=>{ad(void 0),n({dsId:i,id:r,type:l})}})}),Nr=n=>{const l=zt(),r=ls(),i=j4();return x.useEffect(()=>{var o;(o=r==null?void 0:r.data)!=null&&o.id&&l(`${Fe.workbench.path}/tab/${r.data.id}`),i!=null&&i.data&&l(`${Fe.workbench.path}/tab/${i==null?void 0:i.data}`)},[r.data,i.data]),x.useCallback(()=>{D4.get()||M4().then(u=>{(u==null?void 0:u.type)==="table"?r.mutate({name:u.id,opts:Yi({table:u.id,dataSourceId:u.dsId})}):(u==null?void 0:u.type)==="query"?r.mutate({queryId:u.id}):(u==null?void 0:u.type)==="tab"&&i.mutate(u.id)})},[l,n])},jr=n=>{const{data:l}=la();return x.useMemo(()=>l?My[l.teamRole]>=My[n]:!1,[l,n])},L4="_input_1ilo5_2",U4="_small_1ilo5_2",q4="_content_1ilo5_2",z4="_form_1ilo5_2",k4="_mode-select_1ilo5_2",Be={input:L4,small:U4,content:q4,form:z4,switch:"_switch_1ilo5_2",modeSelect:k4},B4="_modal_wy05d_2",H4="_modal-visible_wy05d_2",Q4="_modal-invisible_wy05d_2",$4="_backdrop_wy05d_2",Y4="_modal-container_wy05d_2",V4="_close-button_wy05d_2",Qi={modal:B4,modalVisible:H4,modalInvisible:Q4,backdrop:$4,modalContainer:Y4,closeButton:V4},Dn=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M368 368L144 144M368 144L144 368"})),hn=({children:n,backdropClose:l,isVisible:r,onClose:i,onClosed:o,noPadding:u=!1,portal:d=!1})=>{const[m,y]=x.useState(!1),p=()=>{l&&i()},g=E=>{r||getComputedStyle(E.currentTarget).opacity==="0"&&(y(!1),o&&o())};x.useEffect(()=>{r&&y(!0)},[r]);const b=h.jsxs("div",{onTransitionEnd:g,className:ae(Qi.modal,r?Qi.modalVisible:Qi.modalInvisible),children:[h.jsx("div",{onClick:p,className:Qi.backdrop}),h.jsx("div",{className:ae(Qi.modalContainer,u!==!0&&"p-4"),children:m&&n})]});return d?Tv.createPortal(b,document.body):b},ia=({onClick:n})=>{const l=x.useRef(n);return l.current=n,x.useEffect(()=>{const r=i=>{var o;i.key==="Escape"&&((o=l.current)==null||o.call(l))};return window.addEventListener("keyup",r),()=>{window.removeEventListener("keyup",r)}},[]),h.jsx("button",{className:Qi.closeButton,onClick:n,children:h.jsx(Dn,{width:20,height:20})})},C1=({children:n})=>h.jsx("h2",{className:"text-xl font-semibold",children:n}),Ar=n=>{const[l,r]=x.useState(n),[i,o]=x.useState([]),u=x.useRef(n),d=x.useCallback((p,g)=>{r(b=>({...b,[p]:g}))},[]),m=x.useCallback(p=>g=>{g.target.type==="checkbox"?d(p,g.target.checked):d(p,g.target.value),o(b=>b.includes(p)?b:[...b,p])},[d]),y=x.useCallback(()=>{r(u.current),o([])},[]);return[l,{set:d,change:m,reset:y,touched:i}]},K4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]})]}),F4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Schema"}),h.jsx("input",{value:n.dbSchema,onChange:l("dbSchema"),className:"input"})]})]}),zi=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],G4=({show:n,onClose:l,dbType:r="postgres"})=>{const i=e4(),o=b1(),{data:u}=la(),[d,{change:m,set:y}]=Ar({name:"",dbType:r,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),p=async()=>{const w=await i.mutateAsync({...d,dbPort:Number(d.dbPort),teamId:u.teamId,ownerId:u.id});await o.mutateAsync(w.id),l(),W3.event("Create Datasource",{dbType:d.dbType})},g=w=>{y("allowInsert",!w),y("allowUpdate",!w)},b=()=>{l()},E=i.isLoading||o.isLoading,C=!d.allowInsert&&!d.allowUpdate;return h.jsxs(hn,{isVisible:n,onClose:b,children:[h.jsx(ia,{onClick:b}),h.jsxs(qt,{variant:"warning",className:"text-sm mb-2 max-w-xl",children:["DataRamen is currently under active development. In production-like environments, ",h.jsx("span",{className:"font-semibold underline",children:"it’s recommended to use read-only database credentials"}),"."]}),i.isError&&h.jsx(qt,{variant:"danger",className:"mb-2",children:h.jsx("span",{children:"Failed to connect to the database. Please check if the data are correct and retry."})}),i.isLoading&&h.jsx(qt,{className:"mb-2",variant:"info",children:"Creating connection"}),o.isLoading&&h.jsx(qt,{className:"mb-2",variant:"info",children:"Inspecting connection"}),h.jsxs("div",{className:Be.switch,children:[h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===zi[0].tag,onChange:()=>y("dbType",zi[0].tag)}),h.jsx("span",{children:zi[0].label})]}),h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===zi[1].tag,onChange:()=>y("dbType",zi[1].tag)}),h.jsx("span",{children:zi[1].label})]})]}),h.jsxs("div",{className:"overflow-y-auto mt-2",children:[h.jsx("div",{className:Be.content,children:h.jsxs("div",{className:Be.form,children:[h.jsxs("div",{className:ae(Be.input,"col-span-2"),children:[h.jsx("label",{children:"Name"}),h.jsx("input",{value:d.name,onChange:m("name"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,"col-span-2"),children:[h.jsx("label",{children:"Description"}),h.jsx("textarea",{value:d.description,onChange:m("description"),className:"input"})]}),d.dbType==="mysql"&&h.jsx(K4,{form:d,change:m}),d.dbType==="postgres"&&h.jsx(F4,{form:d,change:m})]})}),h.jsxs("div",{className:"mt-4",children:[h.jsxs("label",{className:Be.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:C,onChange:()=>g(!0)}),h.jsx("span",{className:"text-sm font-semibold",children:"Production mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"forbidden"}),". You won't be able to insert new rows or edit existing data. Tables in this data source are read-only."]})]}),h.jsxs("label",{className:Be.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!C,onChange:()=>g(!1)}),h.jsx("span",{className:"text-sm font-semibold",children:"Dev mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"allowed"}),". You will be able to insert new rows and edit existing data."]})]})]})]}),h.jsxs("div",{className:"flex justify-end gap-1 mt-2",children:[h.jsx("button",{onClick:b,className:"button tertiary",disabled:E,children:"Cancel"}),h.jsx("button",{onClick:p,className:"button primary",disabled:E,children:"Create"})]})]})},X4="_data-source-entry_giuan_2",Z4="_action-title_giuan_2",P4="_action-subtext_giuan_2",J4="_dev-tag_giuan_2",I4="_prod-tag_giuan_2",Rn={dataSourceEntry:X4,actionTitle:Z4,actionSubtext:P4,devTag:J4,prodTag:I4},W4=n=>x.createElement("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n},x.createElement("path",{d:"m24.129 23.412-.508-.484c-.251-.331-.518-.624-.809-.891l-.005-.004q-.448-.407-.931-.774-.387-.266-1.064-.641c-.371-.167-.661-.46-.818-.824l-.004-.01-.048-.024c.212-.021.406-.06.592-.115l-.023.006.57-.157c.236-.074.509-.122.792-.133h.006c.298-.012.579-.06.847-.139l-.025.006q.194-.048.399-.109t.351-.109v-.169q-.145-.217-.351-.496c-.131-.178-.278-.333-.443-.468l-.005-.004q-.629-.556-1.303-1.076c-.396-.309-.845-.624-1.311-.916l-.068-.04c-.246-.162-.528-.312-.825-.435l-.034-.012q-.448-.182-.883-.399c-.097-.048-.21-.09-.327-.119l-.011-.002c-.117-.024-.217-.084-.29-.169l-.001-.001c-.138-.182-.259-.389-.355-.609l-.008-.02q-.145-.339-.314-.651-.363-.702-.702-1.427t-.651-1.452q-.217-.484-.399-.967c-.134-.354-.285-.657-.461-.942l.013.023c-.432-.736-.863-1.364-1.331-1.961l.028.038c-.463-.584-.943-1.106-1.459-1.59l-.008-.007c-.509-.478-1.057-.934-1.632-1.356l-.049-.035q-.896-.651-1.96-1.282c-.285-.168-.616-.305-.965-.393l-.026-.006-1.113-.278-.629-.048q-.314-.024-.629-.024c-.148-.078-.275-.171-.387-.279-.11-.105-.229-.204-.353-.295l-.01-.007c-.605-.353-1.308-.676-2.043-.93l-.085-.026c-.193-.113-.425-.179-.672-.179-.176 0-.345.034-.499.095l.009-.003c-.38.151-.67.458-.795.84l-.003.01c-.073.172-.115.371-.115.581 0 .368.13.705.347.968l-.002-.003q.544.725.834 1.14.217.291.448.605c.141.188.266.403.367.63l.008.021c.056.119.105.261.141.407l.003.016q.048.206.121.448.217.556.411 1.14c.141.425.297.785.478 1.128l-.019-.04q.145.266.291.52t.314.496c.065.098.147.179.241.242l.003.002c.099.072.164.185.169.313v.001c-.114.168-.191.369-.217.586l-.001.006c-.035.253-.085.478-.153.695l.008-.03c-.223.666-.351 1.434-.351 2.231 0 .258.013.512.04.763l-.003-.031c.06.958.349 1.838.812 2.6l-.014-.025c.197.295.408.552.641.787.168.188.412.306.684.306.152 0 .296-.037.422-.103l-.005.002c.35-.126.599-.446.617-.827v-.002c.048-.474.12-.898.219-1.312l-.013.067c.024-.063.038-.135.038-.211 0-.015-.001-.03-.002-.045v.002q-.012-.109.133-.206v.048q.145.339.302.677t.326.677c.295.449.608.841.952 1.202l-.003-.003c.345.372.721.706 1.127 1.001l.022.015c.212.162.398.337.566.528l.004.004c.158.186.347.339.56.454l.01.005v-.024h.048c-.039-.087-.102-.157-.18-.205l-.002-.001c-.079-.044-.147-.088-.211-.136l.005.003q-.217-.217-.448-.484t-.423-.508q-.508-.702-.969-1.467t-.871-1.555q-.194-.387-.375-.798t-.351-.798c-.049-.099-.083-.213-.096-.334v-.005c-.006-.115-.072-.214-.168-.265l-.002-.001c-.121.206-.255.384-.408.545l.001-.001c-.159.167-.289.364-.382.58l-.005.013c-.141.342-.244.739-.289 1.154l-.002.019q-.072.641-.145 1.318l-.048.024-.024.024c-.26-.053-.474-.219-.59-.443l-.002-.005q-.182-.351-.326-.69c-.248-.637-.402-1.374-.423-2.144v-.009c-.009-.122-.013-.265-.013-.408 0-.666.105-1.308.299-1.91l-.012.044q.072-.266.314-.896t.097-.871c-.05-.165-.143-.304-.265-.41l-.001-.001c-.122-.106-.233-.217-.335-.335l-.003-.004q-.169-.244-.326-.52t-.278-.544c-.165-.382-.334-.861-.474-1.353l-.022-.089c-.159-.565-.336-1.043-.546-1.503l.026.064c-.111-.252-.24-.47-.39-.669l.006.008q-.244-.326-.436-.617-.244-.314-.484-.605c-.163-.197-.308-.419-.426-.657l-.009-.02c-.048-.097-.09-.21-.119-.327l-.002-.011c-.011-.035-.017-.076-.017-.117 0-.082.024-.159.066-.223l-.001.002c.011-.056.037-.105.073-.145.039-.035.089-.061.143-.072h.002c.085-.055.188-.088.3-.088.084 0 .165.019.236.053l-.003-.001c.219.062.396.124.569.195l-.036-.013q.459.194.847.375c.298.142.552.292.792.459l-.018-.012q.194.121.387.266t.411.291h.339q.387 0 .822.037c.293.023.564.078.822.164l-.024-.007c.481.143.894.312 1.286.515l-.041-.019q.593.302 1.125.641c.589.367 1.098.743 1.577 1.154l-.017-.014c.5.428.954.867 1.38 1.331l.01.012c.416.454.813.947 1.176 1.464l.031.047c.334.472.671 1.018.974 1.584l.042.085c.081.154.163.343.234.536l.011.033q.097.278.217.57.266.605.57 1.221t.57 1.198l.532 1.161c.187.406.396.756.639 1.079l-.011-.015c.203.217.474.369.778.422l.008.001c.368.092.678.196.978.319l-.047-.017c.143.065.327.134.516.195l.04.011c.212.065.396.151.565.259l-.009-.005c.327.183.604.363.868.559l-.021-.015q.411.302.822.57.194.145.651.423t.484.52c-.114-.004-.249-.007-.384-.007-.492 0-.976.032-1.45.094l.056-.006c-.536.072-1.022.203-1.479.39l.04-.014c-.113.049-.248.094-.388.129l-.019.004c-.142.021-.252.135-.266.277v.001c.061.076.11.164.143.26l.002.006c.034.102.075.19.125.272l-.003-.006c.119.211.247.393.391.561l-.004-.005c.141.174.3.325.476.454l.007.005q.244.194.508.399c.161.126.343.25.532.362l.024.013c.284.174.614.34.958.479l.046.016c.374.15.695.324.993.531l-.016-.011q.291.169.58.375t.556.399c.073.072.137.152.191.239l.003.005c.091.104.217.175.36.193h.003v-.048c-.088-.067-.153-.16-.184-.267l-.001-.004c-.025-.102-.062-.191-.112-.273l.002.004zm-18.576-19.205q-.194 0-.363.012c-.115.008-.222.029-.323.063l.009-.003v.024h.048q.097.145.244.326t.266.351l.387.798.048-.024c.113-.082.2-.192.252-.321l.002-.005c.052-.139.082-.301.082-.469 0-.018 0-.036-.001-.054v.003c-.045-.044-.082-.096-.108-.154l-.001-.003-.081-.182c-.053-.084-.127-.15-.214-.192l-.003-.001c-.094-.045-.174-.102-.244-.169z"})),eE=n=>x.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...n},x.createElement("title",null,"file_type_pgsql"),x.createElement("path",{d:"M29.507,18.773a1.378,1.378,0,0,0-1.144-.921,2.619,2.619,0,0,0-.913.051,8.2,8.2,0,0,1-1.406.185,27.125,27.125,0,0,0,2.872-6.83c.953-3.689.444-5.369-.151-6.13A8.239,8.239,0,0,0,22.121,2a11.773,11.773,0,0,0-3.453.484A12.858,12.858,0,0,0,16.648,2.3a6.565,6.565,0,0,0-3.518.867,16.039,16.039,0,0,0-2.484-.624,7.694,7.694,0,0,0-5.819.924C3.093,4.691,2.289,6.819,2.438,9.792A36.351,36.351,0,0,0,3.844,16.33a22.579,22.579,0,0,0,1.514,3.863A4.786,4.786,0,0,0,7.8,22.742a2.4,2.4,0,0,0,2.379-.516,2.08,2.08,0,0,0,.5.43,3.328,3.328,0,0,0,.944.4,5.069,5.069,0,0,0,3.3-.2c.006.171.011.335.014.477.006.229.013.454.021.665a11.641,11.641,0,0,0,.441,3.3c.016.043.037.107.059.176a3.975,3.975,0,0,0,.991,1.745,2.955,2.955,0,0,0,2.09.777,4.7,4.7,0,0,0,.977-.109A4.592,4.592,0,0,0,22.607,28.1c.811-1.155,1.206-2.894,1.277-5.635.009-.078.018-.152.026-.222l.017-.145.191.017.049,0a7.562,7.562,0,0,0,3.163-.548c.631-.293,2.654-1.361,2.177-2.8"}),x.createElement("path",{d:"M27.689,19.053c-3.163.652-3.38-.418-3.38-.418C27.648,13.68,29.044,7.39,27.839,5.851c-3.286-4.2-8.975-2.213-9.07-2.162l-.031.006a11.28,11.28,0,0,0-2.11-.22,5.212,5.212,0,0,0-3.34,1S3.14.294,3.612,9.733c.1,2.008,2.878,15.194,6.191,11.211,1.211-1.456,2.381-2.688,2.381-2.688a3.071,3.071,0,0,0,2.006.512l.057-.048a2.21,2.21,0,0,0,.023.567c-.854.954-.6,1.121-2.309,1.472-1.726.356-.712.989-.05,1.155a3.508,3.508,0,0,0,3.915-1.272l-.05.2c.334.268.569,1.742.53,3.079a8.481,8.481,0,0,0,.2,2.971c.264.717.526,2.329,2.769,1.849a3.307,3.307,0,0,0,2.98-3.179c.1-1.234.313-1.052.326-2.155l.174-.522c.2-1.673.032-2.213,1.186-1.962l.281.025a6.4,6.4,0,0,0,2.615-.44c1.406-.652,2.239-1.742.853-1.455h0",style:{fill:"#336791"}}),x.createElement("path",{d:"M13.882,10.631a.981.981,0,0,0-.674.1.247.247,0,0,0-.1.164.48.48,0,0,0,.117.314.881.881,0,0,0,.559.349.637.637,0,0,0,.09.006.725.725,0,0,0,.687-.467c.035-.248-.326-.414-.676-.463m9.442.008c-.027-.195-.374-.25-.7-.2s-.647.194-.62.389a.667.667,0,0,0,.62.411.592.592,0,0,0,.083-.006.8.8,0,0,0,.451-.247.5.5,0,0,0,.169-.343",style:{fill:"#fff"}}),x.createElement("path",{d:"M28.741,18.979c-.121-.365-.509-.482-1.154-.349-1.915.4-2.6.121-2.826-.044a26.327,26.327,0,0,0,3.373-7.565,14.374,14.374,0,0,0,.5-3.253,3.513,3.513,0,0,0-.509-2.2,7.482,7.482,0,0,0-6.049-2.825,10.363,10.363,0,0,0-3.5.551,8.717,8.717,0,0,0-1.968-.253,5.684,5.684,0,0,0-3.372.929,15.051,15.051,0,0,0-2.74-.718,6.978,6.978,0,0,0-5.242.805c-1.5,1.064-2.2,2.966-2.061,5.653a35.489,35.489,0,0,0,1.373,6.348c1.07,3.505,2.233,5.49,3.457,5.9a1.548,1.548,0,0,0,.491.081,2.049,2.049,0,0,0,1.563-.886q1.042-1.25,2.155-2.438a3.472,3.472,0,0,0,1.55.417l0,.042q-.14.166-.273.338c-.375.475-.452.574-1.658.823-.343.071-1.254.259-1.267.9-.014.7,1.077.991,1.2,1.022a5.144,5.144,0,0,0,1.249.162,3.634,3.634,0,0,0,2.5-.934,23.674,23.674,0,0,0,.381,5.684,2.854,2.854,0,0,0,2.729,2.1,4.378,4.378,0,0,0,.917-.1,3.462,3.462,0,0,0,3.156-3.212c.177-1.026.481-3.475.624-4.789a3.859,3.859,0,0,0,1.11.137,6.6,6.6,0,0,0,2.519-.48c.712-.331,2-1.141,1.763-1.846ZM24.051,10.1a7.968,7.968,0,0,1-.116,1.107,10.229,10.229,0,0,0-.14,1.3,9.859,9.859,0,0,0,.1,1.47,5.236,5.236,0,0,1-.229,2.986,3.882,3.882,0,0,1-.207-.426c-.058-.141-.185-.368-.359-.681-.68-1.22-2.274-4.078-1.458-5.244.243-.347.86-.7,2.408-.512ZM22.174,3.531a6.617,6.617,0,0,1,5.334,2.522c.975,1.245-.1,6.912-3.205,11.8l-.094-.119-.039-.049a5.524,5.524,0,0,0,.506-3.8,9.114,9.114,0,0,1-.1-1.352,9.572,9.572,0,0,1,.131-1.206,7.614,7.614,0,0,0,.123-1.493.619.619,0,0,0,.013-.21,8.381,8.381,0,0,0-1.912-3.6,8.61,8.61,0,0,0-3.039-2.284,10.246,10.246,0,0,1,2.28-.214ZM9.479,20.654c-.627.754-1.061.61-1.2.562-.928-.31-2.006-2.272-2.955-5.384a35.167,35.167,0,0,1-1.34-6.159c-.12-2.4.462-4.074,1.73-4.974,2.063-1.463,5.456-.587,6.819-.143-.02.019-.04.037-.059.057-2.237,2.259-2.184,6.119-2.178,6.355,0,.091.007.22.018.4a15.969,15.969,0,0,1-.081,3.226A4.08,4.08,0,0,0,11.3,18.007q.133.138.278.262c-.383.41-1.216,1.318-2.1,2.385Zm2.39-3.19a3.3,3.3,0,0,1-.865-2.764,16.7,16.7,0,0,0,.087-3.381c-.006-.095-.011-.178-.014-.243A4.3,4.3,0,0,1,14,10.223a1.188,1.188,0,0,1,.918,1.026c.646,2.989.085,4.234-.365,5.235-.093.206-.181.4-.255.6l-.058.156a10.218,10.218,0,0,0-.368,1.109,2.788,2.788,0,0,1-2-.887Zm.113,4.03a1.733,1.733,0,0,1-.523-.225,2.553,2.553,0,0,1,.557-.166c1.418-.292,1.637-.5,2.116-1.105.11-.139.234-.3.406-.489h0c.256-.287.374-.238.586-.15a.829.829,0,0,1,.408.525.585.585,0,0,1-.05.491A3.1,3.1,0,0,1,11.983,21.495ZM19.406,28.4a2.113,2.113,0,0,1-2.754-1.526,31.129,31.129,0,0,1-.3-6.853.392.392,0,0,0-.017-.124,1.643,1.643,0,0,0-.048-.23,1.589,1.589,0,0,0-.862-1.034,1.216,1.216,0,0,0-.793-.1,9.586,9.586,0,0,1,.342-1.022l.058-.157c.066-.177.148-.36.235-.554.471-1.047,1.117-2.482.416-5.722a2.044,2.044,0,0,0-2.468-1.669A5.694,5.694,0,0,0,11.328,10c-.078.04-.15.078-.216.115A8.244,8.244,0,0,1,13.03,5.163,4.711,4.711,0,0,1,16.6,3.827,7.567,7.567,0,0,1,22.381,6.59,8.774,8.774,0,0,1,23.963,9.3c-1.463-.149-2.458.14-2.962.861-1.1,1.568.6,4.612,1.416,6.075.15.268.279.5.319.6a5.432,5.432,0,0,0,.861,1.387c.077.1.152.189.208.271-.443.128-1.239.423-1.166,1.9-.058.74-.474,4.205-.686,5.43-.279,1.617-.874,2.22-2.548,2.579Zm7.242-8.288a5.714,5.714,0,0,1-1.931.4,2.422,2.422,0,0,1-1.3-.167c-.045-.919.3-1.015.66-1.117.057-.016.112-.032.166-.05a1.353,1.353,0,0,0,.11.08c.639.422,1.78.467,3.39.135l.018,0a4.334,4.334,0,0,1-1.116.72Z",style:{fill:"#fff"}})),Tr=({size:n,type:l})=>l==="mysql"?h.jsx(W4,{width:n,height:n}):h.jsx(eE,{width:n,height:n}),[tE,Vi]=dn(void 0),nE=()=>{const n=Nr("Home");return h.jsxs("div",{className:"card-white lg:col-span-2",onClick:n,children:[h.jsxs("h2",{className:Rn.actionTitle,children:[h.jsx("span",{children:"🔎 Start new query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsx("input",{className:"input mt-3 w-full",placeholder:"Search table or query to start"})]})},aE=()=>{const[n,l]=x.useState(void 0),r=jr(Zt.EDITOR),i=o=>{r?l(o):It.error("You don't have permission to connect new data sources in this team")};return h.jsxs("div",{children:[n&&h.jsx(G4,{show:!0,dbType:n,onClose:()=>l(void 0)}),h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>i("postgres"),children:[h.jsx("p",{className:Rn.actionTitle,children:"🧙‍♂️ Connection wizard"}),h.jsx("p",{className:Rn.actionSubtext,children:"Configure new database connection."})]})]})},lE=()=>{const n=zt(),{data:l}=Id(),r=Nr("Home"),i=()=>{l&&l.length>0?n(`${Fe.workbench.path}/tab/${l[0].id}`):r()};return h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:i,children:[h.jsxs("h2",{className:Rn.actionTitle,children:[h.jsx("span",{children:"🛠️ Workbench"}),h.jsx("span",{className:"hotkey",children:"W"})]}),h.jsx("p",{className:Rn.actionSubtext,children:"Continue your work from where you left."})]})},iE=()=>{const{data:n}=la(),{data:l}=Gd({teamId:n==null?void 0:n.teamId}),r=i=>{Vi(i)};return!l||l.length===0?null:h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Data sources"}),h.jsx("div",{className:"grid lg:grid-cols-3 gap-2 mt-4",children:l==null?void 0:l.map(i=>h.jsxs("div",{className:Rn.dataSourceEntry,onClick:()=>r(i.id),tabIndex:0,children:[h.jsx(Tr,{size:32,type:i.dbType}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:i.name}),i.allowInsert?h.jsx("span",{className:Rn.devTag,children:"dev"}):h.jsx("span",{className:Rn.prodTag,children:"prod"})]})]},i.id))})]})},sE=()=>h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Useful links"}),h.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://dataramen.xyz/",children:[h.jsx("p",{className:Rn.actionTitle,children:"Documentation"}),h.jsx("p",{className:Rn.actionSubtext,children:"Learn how to use DataRamen"})]}),h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://github.com/OleksandrDemian/dataramen",children:[h.jsx("p",{className:Rn.actionTitle,children:"Github"}),h.jsx("p",{className:Rn.actionSubtext,children:"Codebase is open sourced on Github"})]})]})]}),rE=()=>{const{data:n}=la(),{data:l}=Gd({teamId:n==null?void 0:n.teamId}),r=!!l&&l.length>0,i=!!n;return h.jsx("div",{className:"page-container h-screen max-h-screen bg-(--bg)",children:h.jsxs("div",{className:"page-content h-full pb-12 overflow-y-auto",children:[h.jsx("h2",{className:"font-semibold text-gray-700 mt-4 hidden lg:block",children:"Quick actions"}),i&&!r&&h.jsx(qt,{variant:"warning",className:"font-semibold mt-4",children:"Connect at least one datasource to start using DataRamen"}),h.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[h.jsx(nE,{}),h.jsx(aE,{}),i&&h.jsx(lE,{})]}),i&&h.jsx(iE,{}),h.jsx(sE,{})]})})},[oE,Wd]=dn(void 0),uE=()=>Wd(void 0);function Gl(n,l){if(n==null)return"";switch(l){case"json":case"jsonb":return JSON.stringify(n,null,2)}if(n===0||n===!1)return n.toString();switch(typeof n){case"string":return n;case"number":case"boolean":return n.toString();default:return JSON.stringify(n)}}const cE=n=>{var r;const l=((r=n.value)==null?void 0:r.map(i=>i.value).join(", "))||"";return`${n.column} ${n.operator} ${l}`},fE=n=>{var l;return((l=n.value)==null?void 0:l.map(r=>r.value).join(", "))||""},lu=n=>n.distinct?[n.fn,"DISTINCT",n.value].join(" "):[n.fn,n.value].join(" "),dl=n=>{let l=n.replace(/[_-]+/g," ");return l=l.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),l=l.toLowerCase().replace(/\b\w/g,r=>r.toUpperCase()),l},dE="_container_16mdj_2",hE="_header_16mdj_2",mE="_fields-container_16mdj_2",pE="_field-label_16mdj_2",yE="_actions_16mdj_2",rr={container:dE,header:hE,fieldsContainer:mE,fieldLabel:pE,actions:yE},pl=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),vE=(n,l,r)=>en({queryKey:["entity",n,l,r],queryFn:async()=>{const i=r?r.map(([u,d])=>({id:pl(),column:u,operator:"=",value:[{value:d}],connector:"AND"})):[],{data:o}=await Oe.post("/runner/select",{datasourceId:n,opts:{table:l,filters:i,joins:[],columns:[],orderBy:[],groupBy:[],aggregations:[]},size:1,page:0,name:`Select ${l}: [${r==null?void 0:r.join()}]`});return o.data},retry:1,enabled:!!l&&!!n&&!!r,staleTime:0,cacheTime:0}),gE=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/runner/update",n);return l.data}}),bE=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/runner/insert",n);return l.data}}),eh=n=>x.useMemo(()=>{var l,r,i;if(n)return n instanceof Ww?(l=n.response)!=null&&l.data.error?n.response.data.error:(i=(r=n.response)==null?void 0:r.data)!=null&&i.message?n.response.data.message:n.message:n instanceof Error?n.message:"Undefined error"},[n]),th=()=>{const{pathname:n}=Yt();return x.useMemo(()=>{const l=mr({path:`${Fe.workbench.path}/tab/:id`,end:!1},n);return l==null?void 0:l.params.id},[n])},xE=({data:n})=>{const[l,{change:r,touched:i}]=Ar({}),o=th(),{mutateAsync:u,error:d}=bE(),m=eh(d),{data:y}=ns(n.dataSourceId),[p,g]=x.useState(""),b=x.useMemo(()=>y==null?void 0:y.find(w=>w.tableName===n.table),[y,n.table]),E=x.useMemo(()=>{if(!b)return[];if(!p)return b.columns.map(O=>({...O,label:dl(O.name)}));const w=p.toLowerCase();return b.columns.filter(O=>O.name.toLowerCase().includes(w)).map(O=>({...O,label:dl(O.name)}))},[p,b]),C=()=>{const w=[];for(const O of i)w.push({value:l[O],column:O});u({datasourceId:n.dataSourceId,table:n.table,values:w}).then(()=>{uE(),o&&E1(o)})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:rr.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:["Insert new row in ",h.jsx("span",{className:"underline",children:n.table})]}),m&&h.jsx(qt,{variant:"danger",children:h.jsx("p",{children:m})})]}),h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:rr.container,children:h.jsx("div",{className:rr.fieldsContainer,children:E.map(w=>h.jsxs("label",{className:rr.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[w.isPrimary?"🔐":"🏷️"," ",w.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",w.name,": ",w.type,"]"]})]}),h.jsx("input",{className:"input w-full",value:Gl(l[w.name]),onChange:r(w.name),placeholder:w.name})]},w.name))})}),h.jsxs("div",{className:rr.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:p,onChange:w=>g(w.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{disabled:!i.length,className:"button primary",onClick:C,children:"Run insert"})]})]})},SE=()=>{const n=oE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const i=()=>Wd(void 0);return h.jsxs(hn,{isVisible:n!=null,onClose:i,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(ia,{onClick:i}),l&&h.jsx(xE,{data:l})]})},[wE,nh]=dn(void 0),EE=()=>nh(void 0),CE="_container_1707g_2",_E="_header_1707g_2",NE="_key_1707g_2",jE="_fields-container_1707g_2",AE="_field-label_1707g_2",TE="_actions_1707g_2",ki={container:CE,header:_E,key:NE,fieldsContainer:jE,fieldLabel:AE,actions:TE},OE=({data:n})=>{const[l,{change:r,set:i,reset:o,touched:u}]=Ar({}),d=th(),[m,y]=x.useState(""),{data:p,isLoading:g}=vE(n.dataSourceId,n.tableName,n.entityId),{mutateAsync:b,error:E}=gE(),C=eh(E),w=jr(Zt.EDITOR),{data:O}=ns(n.dataSourceId),{data:N}=_r(n.dataSourceId),_=x.useMemo(()=>O==null?void 0:O.find(Q=>Q.tableName===n.tableName),[n.tableName,O]),A=x.useMemo(()=>{if(!_)return[];if(!m)return _.columns.map(G=>({...G,label:dl(G.name)}));const Q=m.toLowerCase();return _.columns.filter(G=>G.name.toLowerCase().includes(Q)).map(G=>({...G,label:dl(G.name)}))},[m,_]);x.useEffect(()=>{const Q=p==null?void 0:p.rows[0];if(o(),Q&&(p!=null&&p.columns))for(let G=0;G<p.columns.length;G++){const Z=p.columns[G];i(Z.column,Gl(Q[G]))}},[p,i,o]);const j=()=>{const Q=[];for(const G of u)Q.push({value:l[G],column:G});b({datasourceId:n.dataSourceId,table:n.tableName,filters:n.entityId.map(G=>({id:pl(),value:[{value:G[1]}],column:G[0],connector:"AND",operator:"="})),values:Q}).then(()=>{EE(),d&&E1(d)})},B=n.entityId.map(([Q,G])=>`${Q} = ${G}`).join(", ")||"",V=!(N!=null&&N.allowUpdate)||!w;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ki.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:[V?"View":"Edit"," row in ",h.jsx("span",{className:"underline",children:n==null?void 0:n.tableName})]}),h.jsx("span",{className:ki.key,children:B}),C&&h.jsx(qt,{variant:"danger",children:h.jsx("p",{children:C})})]}),!V&&h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:ki.container,children:h.jsx("div",{className:ki.fieldsContainer,children:A.map(Q=>h.jsxs("label",{className:ki.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[Q.isPrimary?"🔐":"🏷️"," ",Q.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",Q.name,": ",Q.type,"]"]})]}),h.jsx("input",{disabled:Q.isPrimary||g||V,className:"input w-full",value:Gl(l[Q.name]),onChange:r(Q.name),placeholder:Q.name})]},Q.name))})}),h.jsxs("div",{className:ki.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:m,onChange:Q=>y(Q.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),!V&&h.jsx("button",{disabled:!u.length,className:"button primary",onClick:j,children:"Run update"})]})]})},RE=()=>{const n=wE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const i=()=>nh(void 0);return h.jsxs(hn,{isVisible:n!=null,onClose:i,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(ia,{onClick:i}),l&&h.jsx(OE,{data:l})]})},[DE,ld]=dn(void 0),_1=async n=>new Promise(l=>{ld({message:n,onCancel:()=>{l(!1),ld(void 0)},onConfirm:()=>{l(!0),ld(void 0)}})}),ME=({confirm:n})=>h.jsxs("div",{children:[h.jsx("p",{children:n.message}),h.jsxs("div",{className:"flex gap-2 justify-end mt-4",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:n.onConfirm,children:"Confirm"})]})]}),LE=()=>{const n=DE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(hn,{isVisible:!!n,onClose:()=>n==null?void 0:n.onCancel(),onClosed:()=>r(void 0),children:l&&h.jsx(ME,{confirm:l})})},[UE,iu]=dn(void 0),Or=async(n,l,r)=>new Promise(i=>{iu({message:n,defaultValue:l,alert:r,onCancel:()=>{iu(void 0),i(void 0)},onConfirm:o=>{iu(void 0),i(o)}})}),qE="_root_12mtw_1",zE={root:qE},kE=({data:n})=>{const[l,r]=x.useState("");x.useEffect(()=>{n.defaultValue&&r(n.defaultValue)},[n]);const i=u=>{r(u.target.value)},o=u=>{u.key==="Enter"&&(u.preventDefault(),n.onConfirm(l)),u.key==="Escape"&&(u.preventDefault(),n.onCancel())};return h.jsxs("div",{className:zE.root,children:[h.jsx("h2",{className:"text-xl font-semibold",children:n.message}),n.alert&&h.jsx(qt,{variant:n.alert.type,className:"mt-2",children:n.alert.message}),h.jsx("input",{autoFocus:!0,className:"w-full input my-2",value:l,onChange:i,onKeyDown:o}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:()=>n.onConfirm(l),children:"Confirm"})]})]})},BE=()=>{const n=UE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(hn,{isVisible:!!n,onClose:()=>iu(void 0),onClosed:()=>r(void 0),children:l&&h.jsx(kE,{data:l})})},[HE,QE]=dn(void 0),N1=n=>{QE(n)},$E="_textarea_z5gw5_2",YE={textarea:$E},VE=()=>{const n=HE(),l=()=>{n&&(navigator.clipboard.writeText(n.toString()),It.success("Copied!"))},r=()=>N1(void 0);return h.jsxs(hn,{isVisible:!!n,onClose:r,backdropClose:!0,children:[h.jsx("textarea",{className:YE.textarea,readOnly:!0,defaultValue:n==null?void 0:n.toString()}),h.jsxs("div",{className:"mt-2 flex gap-1 justify-end",children:[h.jsx("button",{className:"button primary",onClick:l,children:"Copy"}),h.jsx("button",{className:"button tertiary",onClick:r,children:"Close"})]})]})},KE="_tabs_1vuaq_2",FE="_mobile_1vuaq_2",GE="_tab_1vuaq_2",XE="_active_1vuaq_2",ZE="_close-button_1vuaq_2",or={tabs:KE,mobile:FE,tab:GE,active:XE,closeButton:ZE},Ly=n=>window.matchMedia(n).matches;function ah(n,{defaultValue:l=!1,initializeWithValue:r=!0}={}){const[i,o]=x.useState(()=>r?Ly(n):l);return x.useLayoutEffect(()=>{const u=window.matchMedia(n);function d(){o(()=>Ly(n))}return d(),u.addListener?u.addListener(d):u.addEventListener("change",d),()=>{u.removeListener?u.removeListener(d):u.removeEventListener("change",d)}},[n]),i}const Du={laptop:"(min-width: 1024px)"},PE=()=>window.matchMedia(Du.laptop).matches,JE="_table_1pwyq_2",IE="_semi-transparent_1pwyq_2",WE="_table-loading_1pwyq_2",eC="_table-empty_1pwyq_2",tC="_table-row-cells_1pwyq_2",nC="_header-cell_1pwyq_2",aC="_header-actions_1pwyq_2",lC="_cell_1pwyq_2",iC="_cell-actions_1pwyq_2",sC="_value_1pwyq_2",rC="_table-config_1pwyq_2",oC="_tab-name_1pwyq_2",uC="_table-action_1pwyq_2",cC="_blue_1pwyq_2",fC="_modal_1pwyq_2",dC="_options-container_1pwyq_2",hC="_row-options-entries-list_1pwyq_2",mC="_underlying-rows-btn_1pwyq_2",pC="_option-item_1pwyq_2",yC="_pagination-indicator_1pwyq_2",ie={table:JE,semiTransparent:IE,tableLoading:WE,tableEmpty:eC,tableRowCells:tC,headerCell:nC,headerActions:aC,cell:lC,cellActions:iC,value:sC,tableConfig:rC,tabName:oC,tableAction:uC,blue:cC,modal:fC,optionsContainer:dC,rowOptionsEntriesList:hC,underlyingRowsBtn:mC,optionItem:pC,paginationIndicator:yC},sa=x.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),dt=x.createContext({state:Yi({}),setState:()=>{}}),ra=x.createContext({}),j1={ON_ANIMATION_END:Symbol("ON_TRANSITION_END")},A1=()=>{const[n,l]=x.useState(),[r,i]=x.useState("hidden");return x.useMemo(()=>{const o=m=>{m.preventDefault(),i("in"),l({x:m.clientX-1,y:m.clientY-1})},u=()=>{i("out")},d=m=>{console.log("onAnimationEnd",m),r==="in"?i("visible"):r==="out"&&(l(void 0),i("hidden"))};return{show:!!n,position:n,state:r,open:o,close:u,[j1.ON_ANIMATION_END]:d}},[n,r])},vC=n=>{if(n==="ASC")return"DESC";if(n!=="DESC")return"ASC"},gC=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback(i=>{l(o=>{const u=o.orderBy[0];if(u&&u.column===i){const d=vC(u.direction);return d?{...o,orderBy:[{column:i,direction:d}]}:{...o,orderBy:[]}}return{...o,orderBy:[{column:i,direction:"ASC"}]}})},[l]);return{orderBy:n.orderBy,updateOrderBy:r}};function bC(n){var r;const l=(r=n.target)==null?void 0:r.dataset;if(l){if(l.copyCol&&l.copyRow)return{col:parseInt(l.copyCol),row:parseInt(l.copyRow),action:"copy"};if(l.showCol&&l.showRow)return{col:parseInt(l.showCol),row:parseInt(l.showRow),action:"show"};if(l.filterCol&&l.filterRow)return{col:parseInt(l.filterCol),row:parseInt(l.filterRow),action:"filter"}}}function id(n,l,r){var u,d,m;const i=(d=(u=n==null?void 0:n.rows)==null?void 0:u[l])==null?void 0:d[r],o=(m=n==null?void 0:n.columns)==null?void 0:m[r];return{value:i,column:o}}const xC=()=>{const{data:n}=x.useContext(ra),{getColumnType:l}=x.useContext(sa),{setState:r}=x.useContext(dt),i=m=>{const{value:y,column:p}=id(n==null?void 0:n.result,m.row,m.col);if(p){const g=Gl(y,l(p.full));navigator.clipboard.writeText(g),It.success("Copied!")}},o=m=>{const{value:y,column:p}=id(n==null?void 0:n.result,m.row,m.col);if(p){const g=Gl(y,l(p.full));N1(g)}},u=m=>{const{value:y,column:p}=id(n==null?void 0:n.result,m.row,m.col);let g=(p==null?void 0:p.full)||"",b;if((p==null?void 0:p.table)===""){It.error("Filtering on aggregated column is not supported yet");return}if(g){let E;if(y==null)E={id:pl(),isEnabled:!0,column:g,connector:"AND",operator:"IS NULL"};else{const C=Gl(y,l(g));E={id:pl(),isEnabled:!0,column:g,connector:"AND",operator:"=",fn:b,value:[{value:C}]}}r(C=>({...C,filters:[...C.filters,E]})),It.success(`Added new filter on column ${p==null?void 0:p.alias}`)}};return m=>{const y=bC(m);y&&(y.action==="copy"?i(y):y.action==="show"?o(y):y.action==="filter"&&u(y))}},SC="_container_1lgam_2",wC="_animate-show_1lgam_2",EC="_animate-hide_1lgam_2",CC="_content_1lgam_2",_C="_backdrop_1lgam_2",$l={container:SC,animateShow:wC,animateHide:EC,content:CC,backdrop:_C},T1=({children:n,handler:l})=>{const r=x.useRef(l.close);r.current=l.close;const i=x.useMemo(()=>{if(!l.position)return;const o={};if(typeof window<"u"){const u=l.position.y>window.innerHeight/2,d=l.position.x>window.innerWidth/2;u?o.bottom=window.innerHeight-l.position.y:o.top=l.position.y,PE()?d?o.right=window.innerWidth-l.position.x:o.left=l.position.x:(o.right=36,o.left=36)}return o},[l.position]);return x.useEffect(()=>{const o=u=>{u.code==="Escape"&&r.current()};return window.addEventListener("keyup",o),()=>{window.removeEventListener("keyup",o)}},[]),i?h.jsxs("div",{className:ae($l.container,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),onAnimationEnd:l[j1.ON_ANIMATION_END],children:[h.jsx("div",{className:$l.backdrop,onClick:o=>{o.stopPropagation(),o.preventDefault(),l.close()}}),h.jsx("div",{className:ae($l.content,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),style:i,children:n})]}):null},NC="_table_wa1aa_2",jC="_root_wa1aa_2",AC="_content_wa1aa_2",TC="_sub_wa1aa_2",Go={table:NC,root:jC,content:AC,sub:TC},O1=({hook:n,onClick:l})=>h.jsxs("button",{className:Go.root,onClick:l,children:[h.jsx("span",{children:"📄"}),h.jsxs("div",{className:Go.content,children:[h.jsxs("p",{className:Go.table,children:[" ",n.on.toTable]}),h.jsxs("span",{className:Go.sub,children:[n.on.toColumn," = ",n.on.fromTable,".",n.on.fromColumn]})]})]},n.where),yl=(n,l)=>n!=null&&n>l,OC=({handler:n,rowIndex:l})=>{const{hooks:r,entities:i,dataSourceId:o,getEntityKey:u,getValue:d}=x.useContext(sa),{state:m}=x.useContext(dt),{data:y}=x.useContext(ra),[p,g]=x.useState(""),[b,E]=x.useState(""),C=x.useMemo(()=>y==null?void 0:y.result.rows[l],[y,l]),w=ls(),O=zt(),N=()=>{C&&w.mutateAsync({name:`${m.table} > [${m.joins.map(Q=>Q.table).join()}]`,opts:Yi({joins:m.joins,table:m.table,dataSourceId:m.dataSourceId,filters:[...m.filters,...m.groupBy.map(Q=>({id:pl(),connector:"AND",column:Q.value,operator:"=",value:[{value:d(C,Q)}]}))]})}).then(Q=>{O(`${Fe.workbench.path}/tab/${Q.id}`),n.close()})},_=Q=>{if(!C)return;const G=d(C,{value:`${Q.on.fromTable}.${Q.on.fromColumn}`});w.mutateAsync({name:`${Q.on.toTable} ${Q.on.toColumn} equals ${G}`,opts:Yi({table:Q.on.toTable,dataSourceId:o,filters:[{id:pl(),column:`${Q.on.toTable}.${Q.on.toColumn}`,operator:G==null?"IS NULL":"=",connector:"AND",value:G!=null?[{value:G,isColumn:!1}]:void 0}]})}).then(Z=>{O(`${Fe.workbench.path}/tab/${Z.id}`),n.close()})},A=Q=>{if(!C)return;const G=u(Q,C);n.close(),nh({tableName:Q,dataSourceId:o,entityId:G}),n.close()},j=x.useMemo(()=>p?i.filter(Q=>Q.includes(p)):i,[i,p]),B=x.useMemo(()=>{if(!y)return[];const Q=b.toLowerCase();return r.filter(G=>y.result.columns.some(te=>te.column===G.on.fromColumn&&te.table===G.on.fromTable)?G.on.toTable.toLowerCase().includes(Q):!1)},[b,r,y]),V=m.groupBy.length>0;return h.jsx(T1,{handler:n,children:h.jsxs("div",{className:ie.optionsContainer,children:[i.length>0&&h.jsxs("div",{children:[h.jsxs("label",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 border-b bg-(--bg) border-b-gray-200 p-2",children:[h.jsx("span",{className:"font-semibold",children:"📝 Edit row"}),h.jsx("input",{className:"input bg-white!",placeholder:"Filter entities",value:p,onChange:Q=>g(Q.target.value)})]}),h.jsx("div",{className:ie.rowOptionsEntriesList,children:yl(j.length,0)?j.map(Q=>h.jsx("button",{className:ae(ie.optionItem,"font-semibold"),onClick:()=>A(Q),children:h.jsxs("span",{children:["📄 ",Q]})},Q)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),r.length>0&&h.jsxs("div",{className:"not-first:border-t border-gray-200",children:[h.jsxs("label",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 border-b bg-(--bg) border-gray-200 p-2",children:[h.jsx("span",{className:"font-semibold",children:"↗️ Connected tables"}),h.jsx("input",{className:"input bg-white!",placeholder:"Filter tables",value:b,onChange:Q=>E(Q.target.value)})]}),h.jsx("div",{className:ie.rowOptionsEntriesList,children:B.length>0?B.map(Q=>h.jsx(O1,{hook:Q,onClick:()=>_(Q)},Q.where)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),V&&h.jsx("button",{onClick:N,className:ie.underlyingRowsBtn,children:"🎯 Underlying rows"})]})})},RC={ASC:"⬆️",DESC:"⬇️"},DC=()=>{const{data:n}=x.useContext(ra),{orderBy:l,updateOrderBy:r}=gC(),i=(n==null?void 0:n.result.columns)||[],o=l[0],u=yl(n==null?void 0:n.result.tables.length,1);return h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("td",{className:"py-1 px-4 text-center text-sm text-gray-600 border-r",children:"#"}),i.map(d=>h.jsxs("td",{className:ie.headerCell,children:[h.jsxs("div",{className:"overflow-hidden",children:[u&&h.jsx("p",{className:"text-xs truncate italic",children:d.table||"-"}),h.jsx("p",{className:"text-sm font-semibold truncate",children:d.column})]}),h.jsx("div",{className:ie.headerActions,children:h.jsx("button",{onClick:()=>r(d.full),children:(o==null?void 0:o.column)===d.full?RC[o.direction]:"↕️"})})]},d.full))]})})};function MC({value:n,row:l,col:r}){if(n==="")return h.jsx("span",{className:"pointer-events-none text-black/30 truncate",children:"<EMPTY STRING>"});if(n==null)return h.jsx("span",{className:"pointer-events-none text-black/30",children:"<NULL>"});const i=Gl(n);return h.jsxs(h.Fragment,{children:[h.jsx("span",{"data-row":l,className:ie.value,children:i}),h.jsxs("div",{className:ie.cellActions,children:[h.jsx("button",{"data-copy-col":r,"data-copy-row":l,children:"📋"}),h.jsx("button",{"data-show-col":r,"data-show-row":l,children:"👀"}),h.jsx("button",{"data-filter-col":r,"data-filter-row":l,children:"🔎"})]})]})}const LC=x.memo(({row:n,isLastRow:l,index:r,offset:i})=>h.jsxs("tr",{className:ae(ie.tableRowCells,l&&"rounded-b-lg"),children:[h.jsx("td",{className:"py-1 px-4 text-center align-middle text-xs w-8 text-blue-500 border-r",children:r+1+i}),n.map((o,u)=>h.jsx("td",{className:ie.cell,"data-row":r,children:h.jsx(MC,{value:o,col:u,row:r})},u))]})),UC=()=>{var C,w;const{data:n,error:l,isLoading:r,isFetching:i}=x.useContext(ra),{state:{page:o,size:u}}=x.useContext(dt),d=eh(l),m=xC(),y=A1(),[p,g]=x.useState(void 0),b=O=>{var A;const N=(A=O.target)==null?void 0:A.dataset,_=N==null?void 0:N.row;_!=null&&(g(parseInt(_)),y.open(O))},E=o*u;return h.jsxs(h.Fragment,{children:[p!=null&&y.show&&h.jsx(OC,{handler:y,rowIndex:p}),d&&h.jsx(qt,{className:"my-4",variant:"danger",children:d}),r&&h.jsx("div",{className:ie.tableLoading,children:"Loading data"}),n&&h.jsxs("table",{className:ae(ie.table,i&&ie.semiTransparent),onContextMenu:b,onClick:m,children:[h.jsx(DC,{}),h.jsxs("tbody",{children:[((C=n.result.rows)==null?void 0:C.length)<1&&h.jsx("tr",{className:ie.tableEmpty,children:h.jsx("td",{colSpan:n.result.columns.length+1,children:"No data"})}),(w=n.result.rows)==null?void 0:w.map((O,N)=>h.jsx(LC,{index:N,offset:E,row:O,isLastRow:N===n.result.rows.length-1},N))]})]})]})},qC="_root_z8hvk_2",zC="_root-show_z8hvk_2",kC="_content-desktop_z8hvk_2",BC="_content-mobile_z8hvk_2",HC="_card_z8hvk_2",QC="_cards-list_z8hvk_2",$C="_sub-text_z8hvk_2",YC="_text_z8hvk_2",VC="_section-title_z8hvk_2",KC="_sidebar-action_z8hvk_2",FC="_sidebar-add-action_z8hvk_2",GC="_section-container_z8hvk_2",XC="_close-button_z8hvk_2",ZC="_section-open-btn_z8hvk_2",PC="_show_z8hvk_2",re={root:qC,rootShow:zC,contentDesktop:kC,contentMobile:BC,card:HC,cardsList:QC,subText:$C,text:YC,sectionTitle:VC,sidebarAction:KC,sidebarAddAction:FC,sectionContainer:GC,closeButton:XC,sectionOpenBtn:ZC,show:PC},lh=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback((o,u=!1)=>{l(d=>({...d,page:u?0:d.page,filters:o}))},[l]),i=x.useCallback(o=>{l(u=>({...u,filters:u.filters.filter(d=>d.id!==o)}))},[l]);return{filters:n.filters,removeFilter:i,setFilters:r}},JC=(n,l)=>n.type!==l.type||n.on!==l.on||n.table!==l.table,IC=(n,l)=>n.type===l.type&&n.on===l.on&&n.table===l.table,ih=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback(i=>{l(o=>{const u=o.joins;if(u.some(m=>IC(m,i))){const m=i.table+".";return{...o,joins:u.filter(y=>JC(y,i)),columns:o.columns.filter(y=>!y.value.startsWith(m)),groupBy:o.groupBy.filter(y=>!y.value.startsWith(m)),orderBy:o.orderBy.filter(y=>!y.column.startsWith(m)),aggregations:o.aggregations.filter(y=>!y.value.startsWith(m)),filters:o.filters.filter(y=>!y.column.startsWith(m))}}return{...o,joins:[...u,i]}})},[l]);return{joins:n.joins,toggle:r}},Ki=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M184 112l144 144-144 144"})),[WC,e_]=dn(!1),t_=()=>e_(n=>!n),n_="_sidebar_pku86_2",a_="_sidebar-visible_pku86_2",l_="_sidebar-container_pku86_2",i_="_sidebar-invisible_pku86_2",s_="_backdrop_pku86_2",ur={sidebar:n_,sidebarVisible:a_,sidebarContainer:l_,sidebarInvisible:i_,backdrop:s_},R1=({children:n,backdropClose:l,isVisible:r,onClose:i,onClosed:o,contentClassName:u})=>{const[d,m]=x.useState(!1),y=x.useRef(i);y.current=i;const p=()=>{l&&i()},g=b=>{r||getComputedStyle(b.currentTarget).opacity==="0"&&(m(!1),o&&o())};return x.useEffect(()=>{r&&m(!0)},[r]),x.useEffect(()=>{const b=E=>{r&&E.key==="Escape"&&y.current()};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[r]),h.jsxs("div",{onTransitionEnd:g,className:ae(ur.sidebar,r?ur.sidebarVisible:ur.sidebarInvisible),children:[h.jsx("div",{onClick:p,className:ur.backdrop}),h.jsx("div",{className:ae(ur.sidebarContainer,u),children:d&&n})]})},[Mu,sh]=dn({filters:!1,joins:!1,columns:!1,groupBy:!1,aggregate:!1}),Ut=n=>sh(l=>({...l,[n]:!0})),Lu=n=>sh(l=>({...l,[n]:!1})),vu=n=>sh(l=>({...l,[n]:!l[n]})),D1=()=>{const n=th(),l=A4();return{rename:async i=>{if(n){const o=await Or("New tab name",i);o&&await l.mutateAsync({id:n,payload:{name:o}})}return Promise.resolve()}}},r_=()=>{const n=WC();return ah(Du.laptop)?h.jsx("div",{className:ae(re.root,n&&re.rootShow),children:h.jsxs("div",{className:ae(re.contentDesktop,"no-scrollbar"),children:[h.jsx(qy,{}),h.jsx(Uy,{}),h.jsx($y,{}),h.jsx(Qy,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(zy,{})]})}):h.jsx(R1,{isVisible:n,onClose:t_,backdropClose:!0,children:h.jsxs("div",{className:re.contentMobile,children:[h.jsx(qy,{}),h.jsx(Uy,{}),h.jsx($y,{}),h.jsx(Qy,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(zy,{})]})})};function Rr({onShow:n,show:l,title:r,items:i}){return h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("p",{className:re.sectionTitle,children:r}),i>0&&h.jsxs("button",{className:ae(re.sectionOpenBtn,l&&re.show),onClick:n,children:[h.jsx("span",{children:i}),h.jsx(Ki,{width:16,height:16})]})]})}function Uy(){const{name:n}=x.useContext(sa),{data:l}=x.useContext(ra),{rename:r}=D1(),i=()=>{l!=null&&l.result.query&&(navigator.clipboard.writeText(l.result.query),It.success("Query copied to clipboard"))};return h.jsxs("div",{className:"grid lg:grid-cols-2 gap-1 px-2 mb-4",children:[h.jsx("button",{className:re.sidebarAction,onClick:()=>r(n),children:h.jsx("span",{children:"✏️ Rename tab"})}),h.jsx("button",{className:re.sidebarAction,onClick:i,children:h.jsx("span",{children:"🖋️ Copy SQL"})})]})}function qy(){const{state:n}=x.useContext(dt),{data:l}=_r(n.dataSourceId);return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx("div",{className:re.card,children:h.jsxs("div",{children:[h.jsx("p",{className:re.subText,children:"📄 Table"}),h.jsx("p",{className:ae(re.text,"text-blue-600"),children:n.table})]})}),h.jsx("div",{className:ae(re.card,"mt-2"),children:h.jsxs("div",{children:[h.jsx("p",{className:re.subText,children:"📦 Data source"}),h.jsx("p",{className:ae(re.text,"text-blue-600"),children:l==null?void 0:l.name})]})})]})}function zy(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(!0),o=u=>{l(d=>({...d,groupBy:d.groupBy.filter(m=>Wn(m)!==u)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"📚 Group by",show:r,onShow:()=>i(!r),items:n.groupBy.length}),r&&n.groupBy.length>0&&h.jsx("div",{className:re.cardsList,children:n.groupBy.map(u=>h.jsxs("div",{className:re.card,children:[h.jsx("span",{className:re.text,children:Wn(u)}),h.jsx("button",{className:re.closeButton,onClick:()=>o(Wn(u)),children:h.jsx(Dn,{width:20,height:20})})]},Wn(u)))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ut("groupBy"),children:[h.jsx("span",{className:"hotkey",children:"G"}),h.jsx("span",{children:"Add group by"})]})]})}function ky(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(!1),o=d=>{l(m=>({...m,columns:m.columns.filter(y=>Wn(y)!==d)}))},u=n.aggregations.length>0||n.groupBy.length>0;return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"👀 Columns",show:r,onShow:()=>i(!r),items:u?0:n.columns.length}),u&&h.jsx(qt,{variant:"warning",className:"border border-yellow-800 my-2",children:h.jsx("span",{className:re.text,children:"Columns are ignored when there is at least one aggregation or group by"})}),!u&&r&&n.columns.length>0&&h.jsx("div",{className:re.cardsList,children:n.columns.map(d=>h.jsxs("div",{className:re.card,children:[h.jsx("span",{className:re.text,children:Wn(d)}),h.jsx("button",{className:re.closeButton,onClick:()=>o(Wn(d)),children:h.jsx(Dn,{width:20,height:20})})]}))}),!u&&h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ut("columns"),children:[h.jsx("span",{className:"hotkey",children:"C"}),h.jsx("span",{children:"Show/Hide columns"})]})]})}function By(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(!0),o=u=>{const d=Wn(u);l(m=>({...m,aggregations:m.aggregations.filter(y=>y.fn!==u.fn||y.value!==u.value),orderBy:m.orderBy.filter(y=>y.column!==d)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"🔢 Aggregations",show:r,onShow:()=>i(!r),items:n.aggregations.length}),r&&n.aggregations.length>0&&h.jsx("div",{className:re.cardsList,children:n.aggregations.map(u=>h.jsxs("div",{className:re.card,children:[h.jsxs("span",{className:re.text,children:[u.fn," ",u.value]}),h.jsx("button",{className:re.closeButton,onClick:()=>o(u),children:h.jsx(Dn,{width:20,height:20})})]}))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ut("aggregate"),children:[h.jsx("span",{className:"hotkey",children:"A"}),h.jsx("span",{children:"Aggregate data"})]})]})}const o_=n=>(n==null?void 0:n.map(l=>l.value).join(", "))||"";function Hy(){const{state:n}=x.useContext(dt),{removeFilter:l}=lh(),[r,i]=x.useState(!0),o=()=>{Ut("filters")};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"🎚️ Filters",show:r,onShow:()=>i(!r),items:n.filters.length}),r&&n.filters.length>0&&h.jsx("div",{className:re.cardsList,children:n.filters.map((u,d)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:ae(re.subText,"truncate"),children:u.column}),h.jsxs("p",{className:ae(re.text,"truncate"),children:[Zd[u.operator]," ",o_(u.value)]})]}),h.jsx("button",{className:re.closeButton,onClick:()=>l(u.id),children:h.jsx(Dn,{width:20,height:20})})]},d))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:o,children:[h.jsx("span",{className:"hotkey",children:"F"}),h.jsx("span",{children:"Filter data"})]})]})}function Qy(){const{toggle:n}=ih(),{availableJoins:l}=x.useContext(sa),{state:r}=x.useContext(dt),[i,o]=x.useState(!0);return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"📄 Joins",show:i,onShow:()=>o(!i),items:r.joins.length}),i&&r.joins.length>0&&h.jsx("div",{className:re.cardsList,children:r.joins.map((u,d)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsxs("p",{className:ae(re.subText,"truncate"),children:["on ",u.on]}),h.jsx("p",{className:re.text,children:u.table})]}),d===r.joins.length-1&&h.jsx("button",{className:re.closeButton,onClick:()=>n(u),children:h.jsx(Dn,{width:20,height:20})})]},u.table+u.on))}),l.length>0&&h.jsxs("button",{onClick:()=>Ut("joins"),className:re.sidebarAddAction,children:[h.jsx("span",{className:"hotkey",children:"J"}),h.jsx("span",{children:"Join table"})]})]})}function $y(){const{state:n,setState:l}=x.useContext(dt);if(!n.orderBy.length)return null;const r=i=>{l(o=>({...o,orderBy:o.orderBy.filter(u=>u.column!==i.column&&u.direction!==i.direction)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx("p",{className:re.sectionTitle,children:"Order by"}),h.jsx("div",{className:re.cardsList,children:n.orderBy.map((i,o)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:ae(re.subText,"truncate"),children:i.direction}),h.jsx("p",{className:re.text,children:i.column})]}),h.jsx("button",{className:re.closeButton,onClick:()=>r(i),children:h.jsx(Dn,{width:20,height:20})})]},o))})]})}const u_=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback(o=>{l(u=>({...u,page:o}))},[l]),i=x.useCallback((o,u=!1)=>{l(d=>({...d,size:o,page:u?0:d.page}))},[l]);return{page:n.page,size:n.size,setSize:i,setPage:r}},c_=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/saved-queries",n);return l.data},onSuccess:()=>{ft.invalidateQueries(["queries"]),ts()}}),f_=()=>Nt({mutationFn:async n=>Oe.delete("/saved-queries/"+n),onSuccess:()=>{ts()}}),d_=()=>Nt({mutationFn:async({id:n,payload:l})=>{const{data:r}=await Oe.patch("/queries/"+n,l);return r.data},onSuccess:n=>{ft.invalidateQueries(["query",n.id]),ts(),Z3(),n.isTrash}}),Fi=Math.min,Xl=Math.max,gu=Math.round,Xo=Math.floor,ea=n=>({x:n,y:n}),h_={left:"right",right:"left",bottom:"top",top:"bottom"},m_={start:"end",end:"start"};function Td(n,l,r){return Xl(n,Fi(l,r))}function Dr(n,l){return typeof n=="function"?n(l):n}function Pl(n){return n.split("-")[0]}function Mr(n){return n.split("-")[1]}function M1(n){return n==="x"?"y":"x"}function rh(n){return n==="y"?"height":"width"}function hl(n){return["top","bottom"].includes(Pl(n))?"y":"x"}function oh(n){return M1(hl(n))}function p_(n,l,r){r===void 0&&(r=!1);const i=Mr(n),o=oh(n),u=rh(o);let d=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[u]>l.floating[u]&&(d=bu(d)),[d,bu(d)]}function y_(n){const l=bu(n);return[Od(n),l,Od(l)]}function Od(n){return n.replace(/start|end/g,l=>m_[l])}function v_(n,l,r){const i=["left","right"],o=["right","left"],u=["top","bottom"],d=["bottom","top"];switch(n){case"top":case"bottom":return r?l?o:i:l?i:o;case"left":case"right":return l?u:d;default:return[]}}function g_(n,l,r,i){const o=Mr(n);let u=v_(Pl(n),r==="start",i);return o&&(u=u.map(d=>d+"-"+o),l&&(u=u.concat(u.map(Od)))),u}function bu(n){return n.replace(/left|right|bottom|top/g,l=>h_[l])}function b_(n){return{top:0,right:0,bottom:0,left:0,...n}}function L1(n){return typeof n!="number"?b_(n):{top:n,right:n,bottom:n,left:n}}function xu(n){const{x:l,y:r,width:i,height:o}=n;return{width:i,height:o,top:r,left:l,right:l+i,bottom:r+o,x:l,y:r}}function Yy(n,l,r){let{reference:i,floating:o}=n;const u=hl(l),d=oh(l),m=rh(d),y=Pl(l),p=u==="y",g=i.x+i.width/2-o.width/2,b=i.y+i.height/2-o.height/2,E=i[m]/2-o[m]/2;let C;switch(y){case"top":C={x:g,y:i.y-o.height};break;case"bottom":C={x:g,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:b};break;case"left":C={x:i.x-o.width,y:b};break;default:C={x:i.x,y:i.y}}switch(Mr(l)){case"start":C[d]-=E*(r&&p?-1:1);break;case"end":C[d]+=E*(r&&p?-1:1);break}return C}const x_=async(n,l,r)=>{const{placement:i="bottom",strategy:o="absolute",middleware:u=[],platform:d}=r,m=u.filter(Boolean),y=await(d.isRTL==null?void 0:d.isRTL(l));let p=await d.getElementRects({reference:n,floating:l,strategy:o}),{x:g,y:b}=Yy(p,i,y),E=i,C={},w=0;for(let O=0;O<m.length;O++){const{name:N,fn:_}=m[O],{x:A,y:j,data:B,reset:V}=await _({x:g,y:b,initialPlacement:i,placement:E,strategy:o,middlewareData:C,rects:p,platform:d,elements:{reference:n,floating:l}});g=A??g,b=j??b,C={...C,[N]:{...C[N],...B}},V&&w<=50&&(w++,typeof V=="object"&&(V.placement&&(E=V.placement),V.rects&&(p=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:o}):V.rects),{x:g,y:b}=Yy(p,E,y)),O=-1)}return{x:g,y:b,placement:E,strategy:o,middlewareData:C}};async function U1(n,l){var r;l===void 0&&(l={});const{x:i,y:o,platform:u,rects:d,elements:m,strategy:y}=n,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:E=!1,padding:C=0}=Dr(l,n),w=L1(C),N=m[E?b==="floating"?"reference":"floating":b],_=xu(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(N)))==null||r?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:p,rootBoundary:g,strategy:y})),A=b==="floating"?{x:i,y:o,width:d.floating.width,height:d.floating.height}:d.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),B=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},V=xu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:A,offsetParent:j,strategy:y}):A);return{top:(_.top-V.top+w.top)/B.y,bottom:(V.bottom-_.bottom+w.bottom)/B.y,left:(_.left-V.left+w.left)/B.x,right:(V.right-_.right+w.right)/B.x}}const S_=n=>({name:"arrow",options:n,async fn(l){const{x:r,y:i,placement:o,rects:u,platform:d,elements:m,middlewareData:y}=l,{element:p,padding:g=0}=Dr(n,l)||{};if(p==null)return{};const b=L1(g),E={x:r,y:i},C=oh(o),w=rh(C),O=await d.getDimensions(p),N=C==="y",_=N?"top":"left",A=N?"bottom":"right",j=N?"clientHeight":"clientWidth",B=u.reference[w]+u.reference[C]-E[C]-u.floating[w],V=E[C]-u.reference[C],Q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let G=Q?Q[j]:0;(!G||!await(d.isElement==null?void 0:d.isElement(Q)))&&(G=m.floating[j]||u.floating[w]);const Z=B/2-V/2,te=G/2-O[w]/2-1,pe=Fi(b[_],te),Re=Fi(b[A],te),be=pe,Ue=G-O[w]-Re,ye=G/2-O[w]/2+Z,Se=Td(be,ye,Ue),k=!y.arrow&&Mr(o)!=null&&ye!==Se&&u.reference[w]/2-(ye<be?pe:Re)-O[w]/2<0,X=k?ye<be?ye-be:ye-Ue:0;return{[C]:E[C]+X,data:{[C]:Se,centerOffset:ye-Se-X,...k&&{alignmentOffset:X}},reset:k}}}),w_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var r,i;const{placement:o,middlewareData:u,rects:d,initialPlacement:m,platform:y,elements:p}=l,{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:E,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0,...N}=Dr(n,l);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const _=Pl(o),A=hl(m),j=Pl(m)===m,B=await(y.isRTL==null?void 0:y.isRTL(p.floating)),V=E||(j||!O?[bu(m)]:y_(m)),Q=w!=="none";!E&&Q&&V.push(...g_(m,O,w,B));const G=[m,...V],Z=await U1(l,N),te=[];let pe=((i=u.flip)==null?void 0:i.overflows)||[];if(g&&te.push(Z[_]),b){const ye=p_(o,d,B);te.push(Z[ye[0]],Z[ye[1]])}if(pe=[...pe,{placement:o,overflows:te}],!te.every(ye=>ye<=0)){var Re,be;const ye=(((Re=u.flip)==null?void 0:Re.index)||0)+1,Se=G[ye];if(Se&&(!(b==="alignment"?A!==hl(Se):!1)||pe.every(J=>J.overflows[0]>0&&hl(J.placement)===A)))return{data:{index:ye,overflows:pe},reset:{placement:Se}};let k=(be=pe.filter(X=>X.overflows[0]<=0).sort((X,J)=>X.overflows[1]-J.overflows[1])[0])==null?void 0:be.placement;if(!k)switch(C){case"bestFit":{var Ue;const X=(Ue=pe.filter(J=>{if(Q){const ue=hl(J.placement);return ue===A||ue==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(ue=>ue>0).reduce((ue,R)=>ue+R,0)]).sort((J,ue)=>J[1]-ue[1])[0])==null?void 0:Ue[0];X&&(k=X);break}case"initialPlacement":k=m;break}if(o!==k)return{reset:{placement:k}}}return{}}}};async function E_(n,l){const{placement:r,platform:i,elements:o}=n,u=await(i.isRTL==null?void 0:i.isRTL(o.floating)),d=Pl(r),m=Mr(r),y=hl(r)==="y",p=["left","top"].includes(d)?-1:1,g=u&&y?-1:1,b=Dr(l,n);let{mainAxis:E,crossAxis:C,alignmentAxis:w}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return m&&typeof w=="number"&&(C=m==="end"?w*-1:w),y?{x:C*g,y:E*p}:{x:E*p,y:C*g}}const C_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var r,i;const{x:o,y:u,placement:d,middlewareData:m}=l,y=await E_(l,n);return d===((r=m.offset)==null?void 0:r.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:o+y.x,y:u+y.y,data:{...y,placement:d}}}}},__=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:r,y:i,placement:o}=l,{mainAxis:u=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:_,y:A}=N;return{x:_,y:A}}},...y}=Dr(n,l),p={x:r,y:i},g=await U1(l,y),b=hl(Pl(o)),E=M1(b);let C=p[E],w=p[b];if(u){const N=E==="y"?"top":"left",_=E==="y"?"bottom":"right",A=C+g[N],j=C-g[_];C=Td(A,C,j)}if(d){const N=b==="y"?"top":"left",_=b==="y"?"bottom":"right",A=w+g[N],j=w-g[_];w=Td(A,w,j)}const O=m.fn({...l,[E]:C,[b]:w});return{...O,data:{x:O.x-r,y:O.y-i,enabled:{[E]:u,[b]:d}}}}}};function Uu(){return typeof window<"u"}function is(n){return q1(n)?(n.nodeName||"").toLowerCase():"#document"}function fn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function oa(n){var l;return(l=(q1(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function q1(n){return Uu()?n instanceof Node||n instanceof fn(n).Node:!1}function kn(n){return Uu()?n instanceof Element||n instanceof fn(n).Element:!1}function ta(n){return Uu()?n instanceof HTMLElement||n instanceof fn(n).HTMLElement:!1}function Vy(n){return!Uu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof fn(n).ShadowRoot}function Lr(n){const{overflow:l,overflowX:r,overflowY:i,display:o}=Bn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+r)&&!["inline","contents"].includes(o)}function N_(n){return["table","td","th"].includes(is(n))}function qu(n){return[":popover-open",":modal"].some(l=>{try{return n.matches(l)}catch{return!1}})}function uh(n){const l=ch(),r=kn(n)?Bn(n):n;return["transform","translate","scale","rotate","perspective"].some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!l&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!l&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(r.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(r.contain||"").includes(i))}function j_(n){let l=vl(n);for(;ta(l)&&!Gi(l);){if(uh(l))return l;if(qu(l))return null;l=vl(l)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Gi(n){return["html","body","#document"].includes(is(n))}function Bn(n){return fn(n).getComputedStyle(n)}function zu(n){return kn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function vl(n){if(is(n)==="html")return n;const l=n.assignedSlot||n.parentNode||Vy(n)&&n.host||oa(n);return Vy(l)?l.host:l}function z1(n){const l=vl(n);return Gi(l)?n.ownerDocument?n.ownerDocument.body:n.body:ta(l)&&Lr(l)?l:z1(l)}function yr(n,l,r){var i;l===void 0&&(l=[]),r===void 0&&(r=!0);const o=z1(n),u=o===((i=n.ownerDocument)==null?void 0:i.body),d=fn(o);if(u){const m=Rd(d);return l.concat(d,d.visualViewport||[],Lr(o)?o:[],m&&r?yr(m):[])}return l.concat(o,yr(o,[],r))}function Rd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function k1(n){const l=Bn(n);let r=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const o=ta(n),u=o?n.offsetWidth:r,d=o?n.offsetHeight:i,m=gu(r)!==u||gu(i)!==d;return m&&(r=u,i=d),{width:r,height:i,$:m}}function fh(n){return kn(n)?n:n.contextElement}function $i(n){const l=fh(n);if(!ta(l))return ea(1);const r=l.getBoundingClientRect(),{width:i,height:o,$:u}=k1(l);let d=(u?gu(r.width):r.width)/i,m=(u?gu(r.height):r.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const A_=ea(0);function B1(n){const l=fn(n);return!ch()||!l.visualViewport?A_:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function T_(n,l,r){return l===void 0&&(l=!1),!r||l&&r!==fn(n)?!1:l}function Jl(n,l,r,i){l===void 0&&(l=!1),r===void 0&&(r=!1);const o=n.getBoundingClientRect(),u=fh(n);let d=ea(1);l&&(i?kn(i)&&(d=$i(i)):d=$i(n));const m=T_(u,r,i)?B1(u):ea(0);let y=(o.left+m.x)/d.x,p=(o.top+m.y)/d.y,g=o.width/d.x,b=o.height/d.y;if(u){const E=fn(u),C=i&&kn(i)?fn(i):i;let w=E,O=Rd(w);for(;O&&i&&C!==w;){const N=$i(O),_=O.getBoundingClientRect(),A=Bn(O),j=_.left+(O.clientLeft+parseFloat(A.paddingLeft))*N.x,B=_.top+(O.clientTop+parseFloat(A.paddingTop))*N.y;y*=N.x,p*=N.y,g*=N.x,b*=N.y,y+=j,p+=B,w=fn(O),O=Rd(w)}}return xu({width:g,height:b,x:y,y:p})}function dh(n,l){const r=zu(n).scrollLeft;return l?l.left+r:Jl(oa(n)).left+r}function H1(n,l,r){r===void 0&&(r=!1);const i=n.getBoundingClientRect(),o=i.left+l.scrollLeft-(r?0:dh(n,i)),u=i.top+l.scrollTop;return{x:o,y:u}}function O_(n){let{elements:l,rect:r,offsetParent:i,strategy:o}=n;const u=o==="fixed",d=oa(i),m=l?qu(l.floating):!1;if(i===d||m&&u)return r;let y={scrollLeft:0,scrollTop:0},p=ea(1);const g=ea(0),b=ta(i);if((b||!b&&!u)&&((is(i)!=="body"||Lr(d))&&(y=zu(i)),ta(i))){const C=Jl(i);p=$i(i),g.x=C.x+i.clientLeft,g.y=C.y+i.clientTop}const E=d&&!b&&!u?H1(d,y,!0):ea(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-y.scrollLeft*p.x+g.x+E.x,y:r.y*p.y-y.scrollTop*p.y+g.y+E.y}}function R_(n){return Array.from(n.getClientRects())}function D_(n){const l=oa(n),r=zu(n),i=n.ownerDocument.body,o=Xl(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),u=Xl(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-r.scrollLeft+dh(n);const m=-r.scrollTop;return Bn(i).direction==="rtl"&&(d+=Xl(l.clientWidth,i.clientWidth)-o),{width:o,height:u,x:d,y:m}}function M_(n,l){const r=fn(n),i=oa(n),o=r.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,y=0;if(o){u=o.width,d=o.height;const p=ch();(!p||p&&l==="fixed")&&(m=o.offsetLeft,y=o.offsetTop)}return{width:u,height:d,x:m,y}}function L_(n,l){const r=Jl(n,!0,l==="fixed"),i=r.top+n.clientTop,o=r.left+n.clientLeft,u=ta(n)?$i(n):ea(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,y=o*u.x,p=i*u.y;return{width:d,height:m,x:y,y:p}}function Ky(n,l,r){let i;if(l==="viewport")i=M_(n,r);else if(l==="document")i=D_(oa(n));else if(kn(l))i=L_(l,r);else{const o=B1(n);i={x:l.x-o.x,y:l.y-o.y,width:l.width,height:l.height}}return xu(i)}function Q1(n,l){const r=vl(n);return r===l||!kn(r)||Gi(r)?!1:Bn(r).position==="fixed"||Q1(r,l)}function U_(n,l){const r=l.get(n);if(r)return r;let i=yr(n,[],!1).filter(m=>kn(m)&&is(m)!=="body"),o=null;const u=Bn(n).position==="fixed";let d=u?vl(n):n;for(;kn(d)&&!Gi(d);){const m=Bn(d),y=uh(d);!y&&m.position==="fixed"&&(o=null),(u?!y&&!o:!y&&m.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Lr(d)&&!y&&Q1(n,d))?i=i.filter(g=>g!==d):o=m,d=vl(d)}return l.set(n,i),i}function q_(n){let{element:l,boundary:r,rootBoundary:i,strategy:o}=n;const d=[...r==="clippingAncestors"?qu(l)?[]:U_(l,this._c):[].concat(r),i],m=d[0],y=d.reduce((p,g)=>{const b=Ky(l,g,o);return p.top=Xl(b.top,p.top),p.right=Fi(b.right,p.right),p.bottom=Fi(b.bottom,p.bottom),p.left=Xl(b.left,p.left),p},Ky(l,m,o));return{width:y.right-y.left,height:y.bottom-y.top,x:y.left,y:y.top}}function z_(n){const{width:l,height:r}=k1(n);return{width:l,height:r}}function k_(n,l,r){const i=ta(l),o=oa(l),u=r==="fixed",d=Jl(n,!0,u,l);let m={scrollLeft:0,scrollTop:0};const y=ea(0);function p(){y.x=dh(o)}if(i||!i&&!u)if((is(l)!=="body"||Lr(o))&&(m=zu(l)),i){const C=Jl(l,!0,u,l);y.x=C.x+l.clientLeft,y.y=C.y+l.clientTop}else o&&p();u&&!i&&o&&p();const g=o&&!i&&!u?H1(o,m):ea(0),b=d.left+m.scrollLeft-y.x-g.x,E=d.top+m.scrollTop-y.y-g.y;return{x:b,y:E,width:d.width,height:d.height}}function sd(n){return Bn(n).position==="static"}function Fy(n,l){if(!ta(n)||Bn(n).position==="fixed")return null;if(l)return l(n);let r=n.offsetParent;return oa(n)===r&&(r=r.ownerDocument.body),r}function $1(n,l){const r=fn(n);if(qu(n))return r;if(!ta(n)){let o=vl(n);for(;o&&!Gi(o);){if(kn(o)&&!sd(o))return o;o=vl(o)}return r}let i=Fy(n,l);for(;i&&N_(i)&&sd(i);)i=Fy(i,l);return i&&Gi(i)&&sd(i)&&!uh(i)?r:i||j_(n)||r}const B_=async function(n){const l=this.getOffsetParent||$1,r=this.getDimensions,i=await r(n.floating);return{reference:k_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function H_(n){return Bn(n).direction==="rtl"}const Q_={convertOffsetParentRelativeRectToViewportRelativeRect:O_,getDocumentElement:oa,getClippingRect:q_,getOffsetParent:$1,getElementRects:B_,getClientRects:R_,getDimensions:z_,getScale:$i,isElement:kn,isRTL:H_};function Y1(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function $_(n,l){let r=null,i;const o=oa(n);function u(){var m;clearTimeout(i),(m=r)==null||m.disconnect(),r=null}function d(m,y){m===void 0&&(m=!1),y===void 0&&(y=1),u();const p=n.getBoundingClientRect(),{left:g,top:b,width:E,height:C}=p;if(m||l(),!E||!C)return;const w=Xo(b),O=Xo(o.clientWidth-(g+E)),N=Xo(o.clientHeight-(b+C)),_=Xo(g),j={rootMargin:-w+"px "+-O+"px "+-N+"px "+-_+"px",threshold:Xl(0,Fi(1,y))||1};let B=!0;function V(Q){const G=Q[0].intersectionRatio;if(G!==y){if(!B)return d();G?d(!1,G):i=setTimeout(()=>{d(!1,1e-7)},1e3)}G===1&&!Y1(p,n.getBoundingClientRect())&&d(),B=!1}try{r=new IntersectionObserver(V,{...j,root:o.ownerDocument})}catch{r=new IntersectionObserver(V,j)}r.observe(n)}return d(!0),u}function Y_(n,l,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:y=!1}=i,p=fh(n),g=o||u?[...p?yr(p):[],...yr(l)]:[];g.forEach(_=>{o&&_.addEventListener("scroll",r,{passive:!0}),u&&_.addEventListener("resize",r)});const b=p&&m?$_(p,r):null;let E=-1,C=null;d&&(C=new ResizeObserver(_=>{let[A]=_;A&&A.target===p&&C&&(C.unobserve(l),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var j;(j=C)==null||j.observe(l)})),r()}),p&&!y&&C.observe(p),C.observe(l));let w,O=y?Jl(n):null;y&&N();function N(){const _=Jl(n);O&&!Y1(O,_)&&r(),O=_,w=requestAnimationFrame(N)}return r(),()=>{var _;g.forEach(A=>{o&&A.removeEventListener("scroll",r),u&&A.removeEventListener("resize",r)}),b==null||b(),(_=C)==null||_.disconnect(),C=null,y&&cancelAnimationFrame(w)}}const V_=C_,K_=__,F_=w_,G_=S_,Gy=(n,l,r)=>{const i=new Map,o={platform:Q_,...r},u={...o.platform,_c:i};return x_(n,l,{...o,platform:u})};var rd={exports:{}};/*!
232
+ `,Fo=16,V3=({reverseOrder:n,position:l="top-center",toastOptions:r,gutter:i,children:o,containerStyle:u,containerClassName:d})=>{let{toasts:m,handlers:y}=g3(r);return x.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Fo,left:Fo,right:Fo,bottom:Fo,pointerEvents:"none",...u},className:d,onMouseEnter:y.startPause,onMouseLeave:y.endPause},m.map(p=>{let g=p.position||l,b=y.calculateOffset(p,{reverseOrder:n,gutter:i,defaultPosition:l}),E=$3(g,b);return x.createElement(Q3,{id:p.id,key:p.id,onHeightUpdate:y.updateHeight,className:p.visible?Y3:"",style:E},p.type==="custom"?yu(p.message,p):o?o(p):x.createElement(H3,{toast:p,position:g}))}))},It=$t;const ft=new dS({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(n,l)=>{var r;return pu(l)&&((r=l.response)==null?void 0:r.status)===404?!1:n<3}}},mutationCache:new qv({onError:n=>{var l;pu(n)&&n.status&&n.status>=400&&n.status<500&&(l=n.response)!=null&&l.data.error&&It.error(n.response.data.error)}})}),K3=async()=>{const{data:n}=await Fd.post("/auth/refresh");return n.data.accessToken},F3=async n=>{const{data:l}=await Fd.post("/auth/login",n);return l.data.accessToken},nd=()=>{ft.invalidateQueries({queryKey:["accessToken"]})},Cr=(()=>{let n=Promise.resolve(e3()),l=!1;const r=async()=>{await Fd.post("/auth/logout"),Ko(void 0),window.location.reload()};return{get:async()=>n.then(d=>(nd(),d)),refresh:()=>(l||(l=!0,n=K3().then(d=>(Ko(d),d)).catch(()=>{Ko(void 0),r()}).finally(()=>{l=!1,nd()})),n),login:d=>(l||(l=!0,n=F3(d).then(m=>(Ko(m),m)).finally(()=>{l=!1,nd()})),n),logout:r}})(),v1=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",Oe=lt.create({baseURL:v1,withCredentials:!0});Oe.interceptors.request.use(async n=>{const l=await Cr.get();return l&&(n.headers.Authorization=`Bearer ${l}`),n});Oe.interceptors.response.use(n=>n,n=>{var l;return pu(n)&&n.status===401&&((l=n==null?void 0:n.response)==null?void 0:l.data.error)!=="Missing auth token"&&Cr.refresh(),Promise.reject(n)});const Fd=lt.create({baseURL:v1,withCredentials:!0}),bl="data-sources",g1="auth-user",G3=n=>en({queryKey:["project","datasources",n],queryFn:async()=>{const{data:l}=await Oe.get(`/project/team/${n}/datasources`);return l.data},enabled:!!n}),X3=n=>en({queryKey:["project","saved-queries",n],queryFn:async()=>{const{data:l}=await Oe.get(`/project/team/${n}/queries`);return l.data},enabled:!!n}),ts=n=>{const l=["project","datasources"],r=["project","saved-queries"];return Promise.all([ft.invalidateQueries(l),ft.invalidateQueries(r)])},Z3=n=>{const l=["trash","team"];return ft.invalidateQueries(l)},P3=(n,l)=>en({queryKey:["project",l.teamId,"tables",n,l.selectedDataSources],queryFn:async()=>{const{data:r}=await Oe.get(`/project/team/${l.teamId}/query`,{params:{size:30,search:n,selectedDataSources:l.selectedDataSources}});return r.data},enabled:!!l.teamId,staleTime:0,keepPreviousData:!0}),J3=(n,l)=>{},I3=()=>{},W3={event:J3,pageView:I3},_r=n=>en([bl,n],async()=>{const{data:l}=await Oe.get("/data-sources/"+n);return l.data},{enabled:!!n}),Gd=n=>en({queryKey:[bl,n.teamId],queryFn:async()=>{const{data:l}=await Oe.get("/data-sources",{params:n});return l.data},enabled:n.teamId!==void 0}),ns=n=>en({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:l}=await Oe.get(`/data-sources/${n}/inspections`);return l.data},enabled:!!n}),e4=()=>Nt(async n=>{const{data:l}=await Oe.post("/data-sources",n);return l.data},{onSuccess:()=>{ft.invalidateQueries([bl]),ts()},onError:()=>{}}),t4=()=>Nt({mutationFn:async({dataSource:n,id:l})=>{const{data:r}=await Oe.put(`/data-sources/${l}`,n);return r.data},onSuccess:()=>{ft.invalidateQueries([bl]),ts()}}),b1=()=>Nt({mutationFn:async n=>{await Oe.post(`/data-sources/${n}/inspect`)},onSuccess:()=>{ft.invalidateQueries([bl])}}),n4=()=>Nt({mutationFn:async n=>{await Oe.delete(`/data-sources/${n}`)},onSuccess:()=>{ft.invalidateQueries([bl]),ts()}}),x1=()=>en(["accessToken"],Cr.get),la=()=>{const{data:n}=x1();return en({queryKey:[g1],queryFn:async()=>{const{data:l}=await Oe.get("/users");return l.data},enabled:!!n,retry:(l,r)=>pu(r)&&r.code==="ERR_NETWORK"?!1:l<3})},a4=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.patch("/users",n);return l.data},onSuccess:async n=>{ft.setQueryData([g1],n)}}),l4=()=>Nt({mutationFn:async n=>(await Oe.post("/users",n),!0),onSuccess:()=>{ft.invalidateQueries({queryKey:["team-users"]})}}),i4="_alert_14h2t_2",s4="_info_14h2t_2",r4="_danger_14h2t_2",o4="_success_14h2t_2",u4="_warning_14h2t_2",c4="_dark_14h2t_2",zi={alert:i4,info:s4,danger:r4,success:o4,warning:u4,dark:c4};function S1(n){var l,r,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(l=0;l<o;l++)n[l]&&(r=S1(n[l]))&&(i&&(i+=" "),i+=r)}else for(r in n)n[r]&&(i&&(i+=" "),i+=r);return i}function ae(){for(var n,l,r=0,i="",o=arguments.length;r<o;r++)(n=arguments[r])&&(l=S1(n))&&(i&&(i+=" "),i+=l);return i}const zt=({variant:n,noRounded:l,className:r,children:i,...o})=>h.jsx("div",{className:ae(zi.alert,!l&&"rounded-lg",(n==="info"||!n)&&zi.info,n==="danger"&&zi.danger,n==="dark"&&zi.dark,n==="warning"&&zi.warning,n==="success"&&zi.success,r),role:"alert",...o,children:i}),dn=n=>{const l=new Set;let r=n;const i=m=>(l.add(m),()=>l.delete(m)),o=m=>(l.forEach(y=>y(m)),!0),u=m=>{r=typeof m=="function"?m(r):m,o(r)},d=m=>()=>m?m(r):r;return[m=>x.useSyncExternalStore(i,d(m),d(m)),u,{get:()=>r,subscribe:m=>(m(r),i(m))}]};function f4(n){const l=[];for(const r of n)for(const i of r.columns)i.ref&&(l.push({id:`${r.tableName}->${i.ref.table}.${i.ref.field}`,name:`${r.tableName} in ${i.ref.table}`,where:`${r.tableName}.${i.name} = ${i.ref.table}.${i.ref.field}`,on:{fromTable:i.ref.table,toTable:r.tableName,fromColumn:i.ref.field,toColumn:i.name}}),l.push({id:`${i.ref.table}->${r.tableName}.${i.name}`,name:`${i.ref.table} in ${r.tableName}`,where:`${i.ref.table}.${i.ref.field} = ${r.tableName}.${i.name}`,on:{fromTable:r.tableName,toTable:i.ref.table,fromColumn:i.name,toColumn:i.ref.field}}));return l}const d4=n=>en({queryKey:["hooks",n],queryFn:async()=>{const l=await ft.fetchQuery({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:r}=await Oe.get(`/data-sources/${n}/inspections`);return r.data}});return f4(l)},enabled:!!n}),Xd=[{value:"=",label:"equals"},{value:"<>",label:"not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"},{value:"LIKE",label:"contains"},{value:"NOT LIKE",label:"not contains"},{value:"IN",label:"in list"},{value:"NOT IN",label:"not in list"},{value:"IS NULL",label:"is null"},{value:"IS NOT NULL",label:"is not null"}],Zd=Xd.reduce((n,l)=>(n[l.value]=l.label,n),{}),Pd=Xd.reduce((n,l)=>(n[l.label]=l.value,n),{}),as=n=>n.map(l=>({label:Zd[l],value:l})),h4=as(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]),m4=as(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);as(["=","<>","IS NULL","IS NOT NULL"]);const p4=as(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);as(["IS NULL","IS NOT NULL"]);as(["IN","NOT IN"]);const w1=n=>n!=="IS NULL"&&n!=="IS NOT NULL",y4=(n,l)=>w1(n)?n==="IN"||n==="NOT IN"?l.split(",").map(r=>({value:r.trim(),isColumn:!1})):[{value:l,isColumn:!1}]:[],v4=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],g4=["integer","smallint","decimal","numeric","float","real","double precision","int","smallint","integer","bigint","decimal","numeric","real","double precision","serial","bigserial","money"],b4=["date","time","datetime","timestamp","year","date","time","time without time zone","time with time zone","timestamp","timestamp without time zone","timestamp with time zone","interval"],x4=["date","datetime","timestamp","timestamptz"].reduce((n,l)=>(n[l]=!0,n),{}),Wn=n=>n.fn?n.distinct===!0?`${n.fn} distinct ${n.value}`:`${n.fn} ${n.value}`:n.value;var Zt=(n=>(n.OWNER="owner",n.ADMIN="admin",n.EDITOR="editor",n.READ_ONLY="read_only",n))(Zt||{});const My={[Zt.READ_ONLY]:10,[Zt.EDITOR]:20,[Zt.ADMIN]:30,[Zt.OWNER]:40};function S4(n,l){if(!n||!l)return{};const r=new Set;for(const o of l)o.table&&r.add(o.table);const i={};for(const o of r){const u=n.find(d=>d.tableName===o);if(u){i[o]=[];const d=u.columns.filter(m=>m.isPrimary);for(const m of d)if(l.find(p=>p.table===o&&p.column===m.name))i[o].push(m.name);else{delete i[o];break}}}return i}function w4(n,l,r,i){const{data:o}=d4(l),{data:u}=ns(l);return x.useMemo(()=>{const d=S4(u,n==null?void 0:n.result.columns);return{name:r,tabId:i,hooks:(()=>{const m=[];if(!o||!n||!n.result.columns)return m;for(const y of o)(n.result.tables.includes(y.on.toTable)||n.result.tables.includes(y.on.fromTable))&&m.push(y);return m})(),availableJoins:(()=>{const m=[];if(!o||!n||!n.result.columns)return m;for(const y of o)!n.result.tables.includes(y.on.toTable)&&n.result.tables.includes(y.on.fromTable)&&m.push(y);return m})(),allColumns:(n==null?void 0:n.result.allColumns)||[],dataSourceId:l,entities:Object.keys(d),getValue:(m,y)=>{var b;const p=Wn(y),g=(b=n==null?void 0:n.result.columns)==null?void 0:b.findIndex(E=>E.full===p);if(g!=null&&g>-1)return m[g]},getEntityKey:(m,y)=>d[m].reduce((p,g)=>{var E;const b=(E=n==null?void 0:n.result.columns)==null?void 0:E.findIndex(C=>C.column===g&&C.table===m);return b!=null&&b>-1&&p.push([g,y[b]]),p},[]),getColumnType:m=>{const y=n==null?void 0:n.result.allColumns.find(p=>p.full===m);if(y)return y.type}}},[n,l,o,u,r])}function E4(n,l){return x.useMemo(()=>({state:n,setState:l}),[n,l])}function Yi(n){return{dataSourceId:n.dataSourceId||"",page:(n==null?void 0:n.page)||0,size:(n==null?void 0:n.size)||50,table:n.table||"",filters:(n==null?void 0:n.filters)||[],joins:(n==null?void 0:n.joins)??[],orderBy:(n==null?void 0:n.orderBy)??[],columns:(n==null?void 0:n.columns)??[],groupBy:(n==null?void 0:n.groupBy)??[],aggregations:(n==null?void 0:n.aggregations)??[]}}const Fe={home:{path:"/"},workbench:{path:"/workbench"},share:{path:"/share"},login:{path:"/login"}},Jd=n=>{ft.setQueryData(["workbench-tabs"],l=>n(l||[]))},C4=(n,l)=>{ft.setQueryData(["workbench-tabs",n],r=>r&&l(r))},Id=()=>en({queryKey:["workbench-tabs"],queryFn:async()=>{const{data:n}=await Oe.get("/workbench-tabs");return n.data}}),_4=n=>en({queryKey:["workbench-tabs",n],queryFn:async()=>{const{data:l}=await Oe.get(`/workbench-tabs/${n}`);return l.data}}),ls=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/workbench-tabs",n);return l.data},onSuccess:async n=>{Jd(l=>[...l,n])}}),N4=()=>Nt({mutationFn:async n=>(await Oe.patch(`/workbench-tabs/${n}`,{archived:!0}),n),onMutate:n=>{Jd(l=>l.filter(r=>r.id!==n))}}),j4=()=>Nt({mutationFn:async n=>(await Oe.patch(`/workbench-tabs/${n}`,{archived:!1}),n),onSuccess:()=>O4()}),A4=()=>Nt({mutationFn:async({id:n,payload:l})=>(await Oe.patch(`/workbench-tabs/${n}`,l),!0),onMutate:({id:n,payload:l})=>{C4(n,r=>({...r,...l})),Jd(r=>r.map(i=>i.id!==n?i:{...i,name:l.name||i.name}))}}),T4=(n,l)=>{const{dataSourceId:r,searchAll:i,table:o,filters:u,joins:d,orderBy:m,groupBy:y,columns:p,aggregations:g,page:b=0,size:E=20}=l;return en({queryKey:["workbench-tab-runner",n,r,o,b,E,u,g,d,m,y,p,i],queryFn:async()=>{const{data:C}=await Oe.post(`/workbench-tabs/${n}/run`,l);return C.data},retry:1,enabled:!!o&&!!r,cacheTime:0,keepPreviousData:!0})},E1=n=>ft.invalidateQueries({queryKey:["workbench-tab-runner",n]}),O4=()=>ft.invalidateQueries({queryKey:["workbench-tabs"]}),[R4,ad,D4]=dn(void 0),M4=async()=>new Promise(n=>{ad({onCancel:()=>{ad(void 0),n(void 0)},onConfirm:(l,r,i)=>{ad(void 0),n({dsId:i,id:r,type:l})}})}),Nr=n=>{const l=qt(),r=ls(),i=j4();return x.useEffect(()=>{var o;(o=r==null?void 0:r.data)!=null&&o.id&&l(`${Fe.workbench.path}/tab/${r.data.id}`),i!=null&&i.data&&l(`${Fe.workbench.path}/tab/${i==null?void 0:i.data}`)},[r.data,i.data]),x.useCallback(()=>{D4.get()||M4().then(u=>{(u==null?void 0:u.type)==="table"?r.mutate({name:u.id,opts:Yi({table:u.id,dataSourceId:u.dsId})}):(u==null?void 0:u.type)==="query"?r.mutate({queryId:u.id}):(u==null?void 0:u.type)==="tab"&&i.mutate(u.id)})},[l,n])},jr=n=>{const{data:l}=la();return x.useMemo(()=>l?My[l.teamRole]>=My[n]:!1,[l,n])},L4="_input_1ilo5_2",U4="_small_1ilo5_2",z4="_content_1ilo5_2",q4="_form_1ilo5_2",k4="_mode-select_1ilo5_2",Be={input:L4,small:U4,content:z4,form:q4,switch:"_switch_1ilo5_2",modeSelect:k4},B4="_modal_wy05d_2",H4="_modal-visible_wy05d_2",Q4="_modal-invisible_wy05d_2",$4="_backdrop_wy05d_2",Y4="_modal-container_wy05d_2",V4="_close-button_wy05d_2",Qi={modal:B4,modalVisible:H4,modalInvisible:Q4,backdrop:$4,modalContainer:Y4,closeButton:V4},Dn=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M368 368L144 144M368 144L144 368"})),hn=({children:n,backdropClose:l,isVisible:r,onClose:i,onClosed:o,noPadding:u=!1,portal:d=!1})=>{const[m,y]=x.useState(!1),p=()=>{l&&i()},g=E=>{r||getComputedStyle(E.currentTarget).opacity==="0"&&(y(!1),o&&o())};x.useEffect(()=>{r&&y(!0)},[r]);const b=h.jsxs("div",{onTransitionEnd:g,className:ae(Qi.modal,r?Qi.modalVisible:Qi.modalInvisible),children:[h.jsx("div",{onClick:p,className:Qi.backdrop}),h.jsx("div",{className:ae(Qi.modalContainer,u!==!0&&"p-4"),children:m&&n})]});return d?Tv.createPortal(b,document.body):b},ia=({onClick:n})=>{const l=x.useRef(n);return l.current=n,x.useEffect(()=>{const r=i=>{var o;i.key==="Escape"&&((o=l.current)==null||o.call(l))};return window.addEventListener("keyup",r),()=>{window.removeEventListener("keyup",r)}},[]),h.jsx("button",{className:Qi.closeButton,onClick:n,children:h.jsx(Dn,{width:20,height:20})})},C1=({children:n})=>h.jsx("h2",{className:"text-xl font-semibold",children:n}),Ar=n=>{const[l,r]=x.useState(n),[i,o]=x.useState([]),u=x.useRef(n),d=x.useCallback((p,g)=>{r(b=>({...b,[p]:g}))},[]),m=x.useCallback(p=>g=>{g.target.type==="checkbox"?d(p,g.target.checked):d(p,g.target.value),o(b=>b.includes(p)?b:[...b,p])},[d]),y=x.useCallback(()=>{r(u.current),o([])},[]);return[l,{set:d,change:m,reset:y,touched:i}]},K4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]})]}),F4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,Be.small),children:[h.jsx("label",{children:"Schema"}),h.jsx("input",{value:n.dbSchema,onChange:l("dbSchema"),className:"input"})]})]}),qi=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],G4=({show:n,onClose:l,dbType:r="postgres"})=>{const i=e4(),o=b1(),{data:u}=la(),[d,{change:m,set:y}]=Ar({name:"",dbType:r,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),p=async()=>{const w=await i.mutateAsync({...d,dbPort:Number(d.dbPort),teamId:u.teamId,ownerId:u.id});await o.mutateAsync(w.id),l(),W3.event("Create Datasource",{dbType:d.dbType})},g=w=>{y("allowInsert",!w),y("allowUpdate",!w)},b=()=>{l()},E=i.isLoading||o.isLoading,C=!d.allowInsert&&!d.allowUpdate;return h.jsxs(hn,{isVisible:n,onClose:b,children:[h.jsx(ia,{onClick:b}),h.jsxs(zt,{variant:"warning",className:"text-sm mb-2 max-w-xl",children:["DataRamen is currently under active development. In production-like environments, ",h.jsx("span",{className:"font-semibold underline",children:"it’s recommended to use read-only database credentials"}),"."]}),i.isError&&h.jsx(zt,{variant:"danger",className:"mb-2",children:h.jsx("span",{children:"Failed to connect to the database. Please check if the data are correct and retry."})}),i.isLoading&&h.jsx(zt,{className:"mb-2",variant:"info",children:"Creating connection"}),o.isLoading&&h.jsx(zt,{className:"mb-2",variant:"info",children:"Inspecting connection"}),h.jsxs("div",{className:Be.switch,children:[h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===qi[0].tag,onChange:()=>y("dbType",qi[0].tag)}),h.jsx("span",{children:qi[0].label})]}),h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===qi[1].tag,onChange:()=>y("dbType",qi[1].tag)}),h.jsx("span",{children:qi[1].label})]})]}),h.jsxs("div",{className:"overflow-y-auto mt-2",children:[h.jsx("div",{className:Be.content,children:h.jsxs("div",{className:Be.form,children:[h.jsxs("div",{className:ae(Be.input,"col-span-2"),children:[h.jsx("label",{children:"Name"}),h.jsx("input",{value:d.name,onChange:m("name"),className:"input"})]}),h.jsxs("div",{className:ae(Be.input,"col-span-2"),children:[h.jsx("label",{children:"Description"}),h.jsx("textarea",{value:d.description,onChange:m("description"),className:"input"})]}),d.dbType==="mysql"&&h.jsx(K4,{form:d,change:m}),d.dbType==="postgres"&&h.jsx(F4,{form:d,change:m})]})}),h.jsxs("div",{className:"mt-4",children:[h.jsxs("label",{className:Be.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:C,onChange:()=>g(!0)}),h.jsx("span",{className:"text-sm font-semibold",children:"Production mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"forbidden"}),". You won't be able to insert new rows or edit existing data. Tables in this data source are read-only."]})]}),h.jsxs("label",{className:Be.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!C,onChange:()=>g(!1)}),h.jsx("span",{className:"text-sm font-semibold",children:"Dev mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"allowed"}),". You will be able to insert new rows and edit existing data."]})]})]})]}),h.jsxs("div",{className:"flex justify-end gap-1 mt-2",children:[h.jsx("button",{onClick:b,className:"button tertiary",disabled:E,children:"Cancel"}),h.jsx("button",{onClick:p,className:"button primary",disabled:E,children:"Create"})]})]})},X4="_data-source-entry_giuan_2",Z4="_action-title_giuan_2",P4="_action-subtext_giuan_2",J4="_dev-tag_giuan_2",I4="_prod-tag_giuan_2",Rn={dataSourceEntry:X4,actionTitle:Z4,actionSubtext:P4,devTag:J4,prodTag:I4},W4=n=>x.createElement("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n},x.createElement("path",{d:"m24.129 23.412-.508-.484c-.251-.331-.518-.624-.809-.891l-.005-.004q-.448-.407-.931-.774-.387-.266-1.064-.641c-.371-.167-.661-.46-.818-.824l-.004-.01-.048-.024c.212-.021.406-.06.592-.115l-.023.006.57-.157c.236-.074.509-.122.792-.133h.006c.298-.012.579-.06.847-.139l-.025.006q.194-.048.399-.109t.351-.109v-.169q-.145-.217-.351-.496c-.131-.178-.278-.333-.443-.468l-.005-.004q-.629-.556-1.303-1.076c-.396-.309-.845-.624-1.311-.916l-.068-.04c-.246-.162-.528-.312-.825-.435l-.034-.012q-.448-.182-.883-.399c-.097-.048-.21-.09-.327-.119l-.011-.002c-.117-.024-.217-.084-.29-.169l-.001-.001c-.138-.182-.259-.389-.355-.609l-.008-.02q-.145-.339-.314-.651-.363-.702-.702-1.427t-.651-1.452q-.217-.484-.399-.967c-.134-.354-.285-.657-.461-.942l.013.023c-.432-.736-.863-1.364-1.331-1.961l.028.038c-.463-.584-.943-1.106-1.459-1.59l-.008-.007c-.509-.478-1.057-.934-1.632-1.356l-.049-.035q-.896-.651-1.96-1.282c-.285-.168-.616-.305-.965-.393l-.026-.006-1.113-.278-.629-.048q-.314-.024-.629-.024c-.148-.078-.275-.171-.387-.279-.11-.105-.229-.204-.353-.295l-.01-.007c-.605-.353-1.308-.676-2.043-.93l-.085-.026c-.193-.113-.425-.179-.672-.179-.176 0-.345.034-.499.095l.009-.003c-.38.151-.67.458-.795.84l-.003.01c-.073.172-.115.371-.115.581 0 .368.13.705.347.968l-.002-.003q.544.725.834 1.14.217.291.448.605c.141.188.266.403.367.63l.008.021c.056.119.105.261.141.407l.003.016q.048.206.121.448.217.556.411 1.14c.141.425.297.785.478 1.128l-.019-.04q.145.266.291.52t.314.496c.065.098.147.179.241.242l.003.002c.099.072.164.185.169.313v.001c-.114.168-.191.369-.217.586l-.001.006c-.035.253-.085.478-.153.695l.008-.03c-.223.666-.351 1.434-.351 2.231 0 .258.013.512.04.763l-.003-.031c.06.958.349 1.838.812 2.6l-.014-.025c.197.295.408.552.641.787.168.188.412.306.684.306.152 0 .296-.037.422-.103l-.005.002c.35-.126.599-.446.617-.827v-.002c.048-.474.12-.898.219-1.312l-.013.067c.024-.063.038-.135.038-.211 0-.015-.001-.03-.002-.045v.002q-.012-.109.133-.206v.048q.145.339.302.677t.326.677c.295.449.608.841.952 1.202l-.003-.003c.345.372.721.706 1.127 1.001l.022.015c.212.162.398.337.566.528l.004.004c.158.186.347.339.56.454l.01.005v-.024h.048c-.039-.087-.102-.157-.18-.205l-.002-.001c-.079-.044-.147-.088-.211-.136l.005.003q-.217-.217-.448-.484t-.423-.508q-.508-.702-.969-1.467t-.871-1.555q-.194-.387-.375-.798t-.351-.798c-.049-.099-.083-.213-.096-.334v-.005c-.006-.115-.072-.214-.168-.265l-.002-.001c-.121.206-.255.384-.408.545l.001-.001c-.159.167-.289.364-.382.58l-.005.013c-.141.342-.244.739-.289 1.154l-.002.019q-.072.641-.145 1.318l-.048.024-.024.024c-.26-.053-.474-.219-.59-.443l-.002-.005q-.182-.351-.326-.69c-.248-.637-.402-1.374-.423-2.144v-.009c-.009-.122-.013-.265-.013-.408 0-.666.105-1.308.299-1.91l-.012.044q.072-.266.314-.896t.097-.871c-.05-.165-.143-.304-.265-.41l-.001-.001c-.122-.106-.233-.217-.335-.335l-.003-.004q-.169-.244-.326-.52t-.278-.544c-.165-.382-.334-.861-.474-1.353l-.022-.089c-.159-.565-.336-1.043-.546-1.503l.026.064c-.111-.252-.24-.47-.39-.669l.006.008q-.244-.326-.436-.617-.244-.314-.484-.605c-.163-.197-.308-.419-.426-.657l-.009-.02c-.048-.097-.09-.21-.119-.327l-.002-.011c-.011-.035-.017-.076-.017-.117 0-.082.024-.159.066-.223l-.001.002c.011-.056.037-.105.073-.145.039-.035.089-.061.143-.072h.002c.085-.055.188-.088.3-.088.084 0 .165.019.236.053l-.003-.001c.219.062.396.124.569.195l-.036-.013q.459.194.847.375c.298.142.552.292.792.459l-.018-.012q.194.121.387.266t.411.291h.339q.387 0 .822.037c.293.023.564.078.822.164l-.024-.007c.481.143.894.312 1.286.515l-.041-.019q.593.302 1.125.641c.589.367 1.098.743 1.577 1.154l-.017-.014c.5.428.954.867 1.38 1.331l.01.012c.416.454.813.947 1.176 1.464l.031.047c.334.472.671 1.018.974 1.584l.042.085c.081.154.163.343.234.536l.011.033q.097.278.217.57.266.605.57 1.221t.57 1.198l.532 1.161c.187.406.396.756.639 1.079l-.011-.015c.203.217.474.369.778.422l.008.001c.368.092.678.196.978.319l-.047-.017c.143.065.327.134.516.195l.04.011c.212.065.396.151.565.259l-.009-.005c.327.183.604.363.868.559l-.021-.015q.411.302.822.57.194.145.651.423t.484.52c-.114-.004-.249-.007-.384-.007-.492 0-.976.032-1.45.094l.056-.006c-.536.072-1.022.203-1.479.39l.04-.014c-.113.049-.248.094-.388.129l-.019.004c-.142.021-.252.135-.266.277v.001c.061.076.11.164.143.26l.002.006c.034.102.075.19.125.272l-.003-.006c.119.211.247.393.391.561l-.004-.005c.141.174.3.325.476.454l.007.005q.244.194.508.399c.161.126.343.25.532.362l.024.013c.284.174.614.34.958.479l.046.016c.374.15.695.324.993.531l-.016-.011q.291.169.58.375t.556.399c.073.072.137.152.191.239l.003.005c.091.104.217.175.36.193h.003v-.048c-.088-.067-.153-.16-.184-.267l-.001-.004c-.025-.102-.062-.191-.112-.273l.002.004zm-18.576-19.205q-.194 0-.363.012c-.115.008-.222.029-.323.063l.009-.003v.024h.048q.097.145.244.326t.266.351l.387.798.048-.024c.113-.082.2-.192.252-.321l.002-.005c.052-.139.082-.301.082-.469 0-.018 0-.036-.001-.054v.003c-.045-.044-.082-.096-.108-.154l-.001-.003-.081-.182c-.053-.084-.127-.15-.214-.192l-.003-.001c-.094-.045-.174-.102-.244-.169z"})),eE=n=>x.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...n},x.createElement("title",null,"file_type_pgsql"),x.createElement("path",{d:"M29.507,18.773a1.378,1.378,0,0,0-1.144-.921,2.619,2.619,0,0,0-.913.051,8.2,8.2,0,0,1-1.406.185,27.125,27.125,0,0,0,2.872-6.83c.953-3.689.444-5.369-.151-6.13A8.239,8.239,0,0,0,22.121,2a11.773,11.773,0,0,0-3.453.484A12.858,12.858,0,0,0,16.648,2.3a6.565,6.565,0,0,0-3.518.867,16.039,16.039,0,0,0-2.484-.624,7.694,7.694,0,0,0-5.819.924C3.093,4.691,2.289,6.819,2.438,9.792A36.351,36.351,0,0,0,3.844,16.33a22.579,22.579,0,0,0,1.514,3.863A4.786,4.786,0,0,0,7.8,22.742a2.4,2.4,0,0,0,2.379-.516,2.08,2.08,0,0,0,.5.43,3.328,3.328,0,0,0,.944.4,5.069,5.069,0,0,0,3.3-.2c.006.171.011.335.014.477.006.229.013.454.021.665a11.641,11.641,0,0,0,.441,3.3c.016.043.037.107.059.176a3.975,3.975,0,0,0,.991,1.745,2.955,2.955,0,0,0,2.09.777,4.7,4.7,0,0,0,.977-.109A4.592,4.592,0,0,0,22.607,28.1c.811-1.155,1.206-2.894,1.277-5.635.009-.078.018-.152.026-.222l.017-.145.191.017.049,0a7.562,7.562,0,0,0,3.163-.548c.631-.293,2.654-1.361,2.177-2.8"}),x.createElement("path",{d:"M27.689,19.053c-3.163.652-3.38-.418-3.38-.418C27.648,13.68,29.044,7.39,27.839,5.851c-3.286-4.2-8.975-2.213-9.07-2.162l-.031.006a11.28,11.28,0,0,0-2.11-.22,5.212,5.212,0,0,0-3.34,1S3.14.294,3.612,9.733c.1,2.008,2.878,15.194,6.191,11.211,1.211-1.456,2.381-2.688,2.381-2.688a3.071,3.071,0,0,0,2.006.512l.057-.048a2.21,2.21,0,0,0,.023.567c-.854.954-.6,1.121-2.309,1.472-1.726.356-.712.989-.05,1.155a3.508,3.508,0,0,0,3.915-1.272l-.05.2c.334.268.569,1.742.53,3.079a8.481,8.481,0,0,0,.2,2.971c.264.717.526,2.329,2.769,1.849a3.307,3.307,0,0,0,2.98-3.179c.1-1.234.313-1.052.326-2.155l.174-.522c.2-1.673.032-2.213,1.186-1.962l.281.025a6.4,6.4,0,0,0,2.615-.44c1.406-.652,2.239-1.742.853-1.455h0",style:{fill:"#336791"}}),x.createElement("path",{d:"M13.882,10.631a.981.981,0,0,0-.674.1.247.247,0,0,0-.1.164.48.48,0,0,0,.117.314.881.881,0,0,0,.559.349.637.637,0,0,0,.09.006.725.725,0,0,0,.687-.467c.035-.248-.326-.414-.676-.463m9.442.008c-.027-.195-.374-.25-.7-.2s-.647.194-.62.389a.667.667,0,0,0,.62.411.592.592,0,0,0,.083-.006.8.8,0,0,0,.451-.247.5.5,0,0,0,.169-.343",style:{fill:"#fff"}}),x.createElement("path",{d:"M28.741,18.979c-.121-.365-.509-.482-1.154-.349-1.915.4-2.6.121-2.826-.044a26.327,26.327,0,0,0,3.373-7.565,14.374,14.374,0,0,0,.5-3.253,3.513,3.513,0,0,0-.509-2.2,7.482,7.482,0,0,0-6.049-2.825,10.363,10.363,0,0,0-3.5.551,8.717,8.717,0,0,0-1.968-.253,5.684,5.684,0,0,0-3.372.929,15.051,15.051,0,0,0-2.74-.718,6.978,6.978,0,0,0-5.242.805c-1.5,1.064-2.2,2.966-2.061,5.653a35.489,35.489,0,0,0,1.373,6.348c1.07,3.505,2.233,5.49,3.457,5.9a1.548,1.548,0,0,0,.491.081,2.049,2.049,0,0,0,1.563-.886q1.042-1.25,2.155-2.438a3.472,3.472,0,0,0,1.55.417l0,.042q-.14.166-.273.338c-.375.475-.452.574-1.658.823-.343.071-1.254.259-1.267.9-.014.7,1.077.991,1.2,1.022a5.144,5.144,0,0,0,1.249.162,3.634,3.634,0,0,0,2.5-.934,23.674,23.674,0,0,0,.381,5.684,2.854,2.854,0,0,0,2.729,2.1,4.378,4.378,0,0,0,.917-.1,3.462,3.462,0,0,0,3.156-3.212c.177-1.026.481-3.475.624-4.789a3.859,3.859,0,0,0,1.11.137,6.6,6.6,0,0,0,2.519-.48c.712-.331,2-1.141,1.763-1.846ZM24.051,10.1a7.968,7.968,0,0,1-.116,1.107,10.229,10.229,0,0,0-.14,1.3,9.859,9.859,0,0,0,.1,1.47,5.236,5.236,0,0,1-.229,2.986,3.882,3.882,0,0,1-.207-.426c-.058-.141-.185-.368-.359-.681-.68-1.22-2.274-4.078-1.458-5.244.243-.347.86-.7,2.408-.512ZM22.174,3.531a6.617,6.617,0,0,1,5.334,2.522c.975,1.245-.1,6.912-3.205,11.8l-.094-.119-.039-.049a5.524,5.524,0,0,0,.506-3.8,9.114,9.114,0,0,1-.1-1.352,9.572,9.572,0,0,1,.131-1.206,7.614,7.614,0,0,0,.123-1.493.619.619,0,0,0,.013-.21,8.381,8.381,0,0,0-1.912-3.6,8.61,8.61,0,0,0-3.039-2.284,10.246,10.246,0,0,1,2.28-.214ZM9.479,20.654c-.627.754-1.061.61-1.2.562-.928-.31-2.006-2.272-2.955-5.384a35.167,35.167,0,0,1-1.34-6.159c-.12-2.4.462-4.074,1.73-4.974,2.063-1.463,5.456-.587,6.819-.143-.02.019-.04.037-.059.057-2.237,2.259-2.184,6.119-2.178,6.355,0,.091.007.22.018.4a15.969,15.969,0,0,1-.081,3.226A4.08,4.08,0,0,0,11.3,18.007q.133.138.278.262c-.383.41-1.216,1.318-2.1,2.385Zm2.39-3.19a3.3,3.3,0,0,1-.865-2.764,16.7,16.7,0,0,0,.087-3.381c-.006-.095-.011-.178-.014-.243A4.3,4.3,0,0,1,14,10.223a1.188,1.188,0,0,1,.918,1.026c.646,2.989.085,4.234-.365,5.235-.093.206-.181.4-.255.6l-.058.156a10.218,10.218,0,0,0-.368,1.109,2.788,2.788,0,0,1-2-.887Zm.113,4.03a1.733,1.733,0,0,1-.523-.225,2.553,2.553,0,0,1,.557-.166c1.418-.292,1.637-.5,2.116-1.105.11-.139.234-.3.406-.489h0c.256-.287.374-.238.586-.15a.829.829,0,0,1,.408.525.585.585,0,0,1-.05.491A3.1,3.1,0,0,1,11.983,21.495ZM19.406,28.4a2.113,2.113,0,0,1-2.754-1.526,31.129,31.129,0,0,1-.3-6.853.392.392,0,0,0-.017-.124,1.643,1.643,0,0,0-.048-.23,1.589,1.589,0,0,0-.862-1.034,1.216,1.216,0,0,0-.793-.1,9.586,9.586,0,0,1,.342-1.022l.058-.157c.066-.177.148-.36.235-.554.471-1.047,1.117-2.482.416-5.722a2.044,2.044,0,0,0-2.468-1.669A5.694,5.694,0,0,0,11.328,10c-.078.04-.15.078-.216.115A8.244,8.244,0,0,1,13.03,5.163,4.711,4.711,0,0,1,16.6,3.827,7.567,7.567,0,0,1,22.381,6.59,8.774,8.774,0,0,1,23.963,9.3c-1.463-.149-2.458.14-2.962.861-1.1,1.568.6,4.612,1.416,6.075.15.268.279.5.319.6a5.432,5.432,0,0,0,.861,1.387c.077.1.152.189.208.271-.443.128-1.239.423-1.166,1.9-.058.74-.474,4.205-.686,5.43-.279,1.617-.874,2.22-2.548,2.579Zm7.242-8.288a5.714,5.714,0,0,1-1.931.4,2.422,2.422,0,0,1-1.3-.167c-.045-.919.3-1.015.66-1.117.057-.016.112-.032.166-.05a1.353,1.353,0,0,0,.11.08c.639.422,1.78.467,3.39.135l.018,0a4.334,4.334,0,0,1-1.116.72Z",style:{fill:"#fff"}})),Tr=({size:n,type:l})=>l==="mysql"?h.jsx(W4,{width:n,height:n}):h.jsx(eE,{width:n,height:n}),[tE,Vi]=dn(void 0),nE=()=>{const n=Nr("Home");return h.jsxs("div",{className:"card-white lg:col-span-2",onClick:n,children:[h.jsxs("h2",{className:Rn.actionTitle,children:[h.jsx("span",{children:"🔎 Start new query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsx("input",{className:"input mt-3 w-full",placeholder:"Search table or query to start"})]})},aE=()=>{const[n,l]=x.useState(void 0),r=jr(Zt.EDITOR),i=o=>{r?l(o):It.error("You don't have permission to connect new data sources in this team")};return h.jsxs("div",{children:[n&&h.jsx(G4,{show:!0,dbType:n,onClose:()=>l(void 0)}),h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>i("postgres"),children:[h.jsx("p",{className:Rn.actionTitle,children:"🧙‍♂️ Connection wizard"}),h.jsx("p",{className:Rn.actionSubtext,children:"Configure new database connection."})]})]})},lE=()=>{const n=qt(),{data:l}=Id(),r=Nr("Home"),i=()=>{l&&l.length>0?n(`${Fe.workbench.path}/tab/${l[0].id}`):r()};return h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:i,children:[h.jsxs("h2",{className:Rn.actionTitle,children:[h.jsx("span",{children:"🛠️ Workbench"}),h.jsx("span",{className:"hotkey",children:"W"})]}),h.jsx("p",{className:Rn.actionSubtext,children:"Continue your work from where you left."})]})},iE=()=>{const{data:n}=la(),{data:l}=Gd({teamId:n==null?void 0:n.teamId}),r=i=>{Vi(i)};return!l||l.length===0?null:h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Data sources"}),h.jsx("div",{className:"grid lg:grid-cols-3 gap-2 mt-4",children:l==null?void 0:l.map(i=>h.jsxs("div",{className:Rn.dataSourceEntry,onClick:()=>r(i.id),tabIndex:0,children:[h.jsx(Tr,{size:32,type:i.dbType}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:i.name}),i.allowInsert?h.jsx("span",{className:Rn.devTag,children:"dev"}):h.jsx("span",{className:Rn.prodTag,children:"prod"})]})]},i.id))})]})},sE=()=>h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Useful links"}),h.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://dataramen.xyz/",children:[h.jsx("p",{className:Rn.actionTitle,children:"Documentation"}),h.jsx("p",{className:Rn.actionSubtext,children:"Learn how to use DataRamen"})]}),h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://github.com/OleksandrDemian/dataramen",children:[h.jsx("p",{className:Rn.actionTitle,children:"Github"}),h.jsx("p",{className:Rn.actionSubtext,children:"Codebase is open sourced on Github"})]})]})]}),rE=()=>{const{data:n}=la(),{data:l}=Gd({teamId:n==null?void 0:n.teamId}),r=!!l&&l.length>0,i=!!n;return h.jsx("div",{className:"page-container h-screen max-h-screen bg-(--bg)",children:h.jsxs("div",{className:"page-content h-full pb-12 overflow-y-auto",children:[h.jsx("h2",{className:"font-semibold text-gray-700 mt-4 hidden lg:block",children:"Quick actions"}),i&&!r&&h.jsx(zt,{variant:"warning",className:"font-semibold mt-4",children:"Connect at least one datasource to start using DataRamen"}),h.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[h.jsx(nE,{}),h.jsx(aE,{}),i&&h.jsx(lE,{})]}),i&&h.jsx(iE,{}),h.jsx(sE,{})]})})},[oE,Wd]=dn(void 0),uE=()=>Wd(void 0);function Gl(n,l){if(n==null)return"";switch(l){case"json":case"jsonb":return JSON.stringify(n,null,2)}if(n===0||n===!1)return n.toString();switch(typeof n){case"string":return n;case"number":case"boolean":return n.toString();default:return JSON.stringify(n)}}const cE=n=>{var r;const l=((r=n.value)==null?void 0:r.map(i=>i.value).join(", "))||"";return`${n.column} ${n.operator} ${l}`},fE=n=>{var l;return((l=n.value)==null?void 0:l.map(r=>r.value).join(", "))||""},lu=n=>n.distinct?[n.fn,"DISTINCT",n.value].join(" "):[n.fn,n.value].join(" "),dl=n=>{let l=n.replace(/[_-]+/g," ");return l=l.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),l=l.toLowerCase().replace(/\b\w/g,r=>r.toUpperCase()),l},dE="_container_16mdj_2",hE="_header_16mdj_2",mE="_fields-container_16mdj_2",pE="_field-label_16mdj_2",yE="_actions_16mdj_2",rr={container:dE,header:hE,fieldsContainer:mE,fieldLabel:pE,actions:yE},pl=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),vE=(n,l,r)=>en({queryKey:["entity",n,l,r],queryFn:async()=>{const i=r?r.map(([u,d])=>({id:pl(),column:u,operator:"=",value:[{value:d}],connector:"AND"})):[],{data:o}=await Oe.post("/runner/select",{datasourceId:n,opts:{table:l,filters:i,joins:[],columns:[],orderBy:[],groupBy:[],aggregations:[]},size:1,page:0,name:`Select ${l}: [${r==null?void 0:r.join()}]`});return o.data},retry:1,enabled:!!l&&!!n&&!!r,staleTime:0,cacheTime:0}),gE=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/runner/update",n);return l.data}}),bE=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/runner/insert",n);return l.data}}),eh=n=>x.useMemo(()=>{var l,r,i;if(n)return n instanceof Ww?(l=n.response)!=null&&l.data.error?n.response.data.error:(i=(r=n.response)==null?void 0:r.data)!=null&&i.message?n.response.data.message:n.message:n instanceof Error?n.message:"Undefined error"},[n]),th=()=>{const{pathname:n}=Yt();return x.useMemo(()=>{const l=mr({path:`${Fe.workbench.path}/tab/:id`,end:!1},n);return l==null?void 0:l.params.id},[n])},xE=({data:n})=>{const[l,{change:r,touched:i}]=Ar({}),o=th(),{mutateAsync:u,error:d}=bE(),m=eh(d),{data:y}=ns(n.dataSourceId),[p,g]=x.useState(""),b=x.useMemo(()=>y==null?void 0:y.find(w=>w.tableName===n.table),[y,n.table]),E=x.useMemo(()=>{if(!b)return[];if(!p)return b.columns.map(O=>({...O,label:dl(O.name)}));const w=p.toLowerCase();return b.columns.filter(O=>O.name.toLowerCase().includes(w)).map(O=>({...O,label:dl(O.name)}))},[p,b]),C=()=>{const w=[];for(const O of i)w.push({value:l[O],column:O});u({datasourceId:n.dataSourceId,table:n.table,values:w}).then(()=>{uE(),o&&E1(o)})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:rr.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:["Insert new row in ",h.jsx("span",{className:"underline",children:n.table})]}),m&&h.jsx(zt,{variant:"danger",children:h.jsx("p",{children:m})})]}),h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:rr.container,children:h.jsx("div",{className:rr.fieldsContainer,children:E.map(w=>h.jsxs("label",{className:rr.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[w.isPrimary?"🔐":"🏷️"," ",w.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",w.name,": ",w.type,"]"]})]}),h.jsx("input",{className:"input w-full",value:Gl(l[w.name]),onChange:r(w.name),placeholder:w.name})]},w.name))})}),h.jsxs("div",{className:rr.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:p,onChange:w=>g(w.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{disabled:!i.length,className:"button primary",onClick:C,children:"Run insert"})]})]})},SE=()=>{const n=oE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const i=()=>Wd(void 0);return h.jsxs(hn,{isVisible:n!=null,onClose:i,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(ia,{onClick:i}),l&&h.jsx(xE,{data:l})]})},[wE,nh]=dn(void 0),EE=()=>nh(void 0),CE="_container_1707g_2",_E="_header_1707g_2",NE="_key_1707g_2",jE="_fields-container_1707g_2",AE="_field-label_1707g_2",TE="_actions_1707g_2",ki={container:CE,header:_E,key:NE,fieldsContainer:jE,fieldLabel:AE,actions:TE},OE=({data:n})=>{const[l,{change:r,set:i,reset:o,touched:u}]=Ar({}),d=th(),[m,y]=x.useState(""),{data:p,isLoading:g}=vE(n.dataSourceId,n.tableName,n.entityId),{mutateAsync:b,error:E}=gE(),C=eh(E),w=jr(Zt.EDITOR),{data:O}=ns(n.dataSourceId),{data:N}=_r(n.dataSourceId),_=x.useMemo(()=>O==null?void 0:O.find(Q=>Q.tableName===n.tableName),[n.tableName,O]),A=x.useMemo(()=>{if(!_)return[];if(!m)return _.columns.map(G=>({...G,label:dl(G.name)}));const Q=m.toLowerCase();return _.columns.filter(G=>G.name.toLowerCase().includes(Q)).map(G=>({...G,label:dl(G.name)}))},[m,_]);x.useEffect(()=>{const Q=p==null?void 0:p.rows[0];if(o(),Q&&(p!=null&&p.columns))for(let G=0;G<p.columns.length;G++){const Z=p.columns[G];i(Z.column,Gl(Q[G]))}},[p,i,o]);const j=()=>{const Q=[];for(const G of u)Q.push({value:l[G],column:G});b({datasourceId:n.dataSourceId,table:n.tableName,filters:n.entityId.map(G=>({id:pl(),value:[{value:G[1]}],column:G[0],connector:"AND",operator:"="})),values:Q}).then(()=>{EE(),d&&E1(d)})},B=n.entityId.map(([Q,G])=>`${Q} = ${G}`).join(", ")||"",V=!(N!=null&&N.allowUpdate)||!w;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ki.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:[V?"View":"Edit"," row in ",h.jsx("span",{className:"underline",children:n==null?void 0:n.tableName})]}),h.jsx("span",{className:ki.key,children:B}),C&&h.jsx(zt,{variant:"danger",children:h.jsx("p",{children:C})})]}),!V&&h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:ki.container,children:h.jsx("div",{className:ki.fieldsContainer,children:A.map(Q=>h.jsxs("label",{className:ki.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[Q.isPrimary?"🔐":"🏷️"," ",Q.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",Q.name,": ",Q.type,"]"]})]}),h.jsx("input",{disabled:Q.isPrimary||g||V,className:"input w-full",value:Gl(l[Q.name]),onChange:r(Q.name),placeholder:Q.name})]},Q.name))})}),h.jsxs("div",{className:ki.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:m,onChange:Q=>y(Q.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),!V&&h.jsx("button",{disabled:!u.length,className:"button primary",onClick:j,children:"Run update"})]})]})},RE=()=>{const n=wE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const i=()=>nh(void 0);return h.jsxs(hn,{isVisible:n!=null,onClose:i,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(ia,{onClick:i}),l&&h.jsx(OE,{data:l})]})},[DE,ld]=dn(void 0),_1=async n=>new Promise(l=>{ld({message:n,onCancel:()=>{l(!1),ld(void 0)},onConfirm:()=>{l(!0),ld(void 0)}})}),ME=({confirm:n})=>h.jsxs("div",{children:[h.jsx("p",{children:n.message}),h.jsxs("div",{className:"flex gap-2 justify-end mt-4",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:n.onConfirm,children:"Confirm"})]})]}),LE=()=>{const n=DE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(hn,{isVisible:!!n,onClose:()=>n==null?void 0:n.onCancel(),onClosed:()=>r(void 0),children:l&&h.jsx(ME,{confirm:l})})},[UE,iu]=dn(void 0),Or=async(n,l,r)=>new Promise(i=>{iu({message:n,defaultValue:l,alert:r,onCancel:()=>{iu(void 0),i(void 0)},onConfirm:o=>{iu(void 0),i(o)}})}),zE="_root_12mtw_1",qE={root:zE},kE=({data:n})=>{const[l,r]=x.useState("");x.useEffect(()=>{n.defaultValue&&r(n.defaultValue)},[n]);const i=u=>{r(u.target.value)},o=u=>{u.key==="Enter"&&(u.preventDefault(),n.onConfirm(l)),u.key==="Escape"&&(u.preventDefault(),n.onCancel())};return h.jsxs("div",{className:qE.root,children:[h.jsx("h2",{className:"text-xl font-semibold",children:n.message}),n.alert&&h.jsx(zt,{variant:n.alert.type,className:"mt-2",children:n.alert.message}),h.jsx("input",{autoFocus:!0,className:"w-full input my-2",value:l,onChange:i,onKeyDown:o}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:()=>n.onConfirm(l),children:"Confirm"})]})]})},BE=()=>{const n=UE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(hn,{isVisible:!!n,onClose:()=>iu(void 0),onClosed:()=>r(void 0),children:l&&h.jsx(kE,{data:l})})},[HE,QE]=dn(void 0),N1=n=>{QE(n)},$E="_textarea_z5gw5_2",YE={textarea:$E},VE=()=>{const n=HE(),l=()=>{n&&(navigator.clipboard.writeText(n.toString()),It.success("Copied!"))},r=()=>N1(void 0);return h.jsxs(hn,{isVisible:!!n,onClose:r,backdropClose:!0,children:[h.jsx("textarea",{className:YE.textarea,readOnly:!0,defaultValue:n==null?void 0:n.toString()}),h.jsxs("div",{className:"mt-2 flex gap-1 justify-end",children:[h.jsx("button",{className:"button primary",onClick:l,children:"Copy"}),h.jsx("button",{className:"button tertiary",onClick:r,children:"Close"})]})]})},KE="_tabs_1vuaq_2",FE="_mobile_1vuaq_2",GE="_tab_1vuaq_2",XE="_active_1vuaq_2",ZE="_close-button_1vuaq_2",or={tabs:KE,mobile:FE,tab:GE,active:XE,closeButton:ZE},Ly=n=>window.matchMedia(n).matches;function ah(n,{defaultValue:l=!1,initializeWithValue:r=!0}={}){const[i,o]=x.useState(()=>r?Ly(n):l);return x.useLayoutEffect(()=>{const u=window.matchMedia(n);function d(){o(()=>Ly(n))}return d(),u.addListener?u.addListener(d):u.addEventListener("change",d),()=>{u.removeListener?u.removeListener(d):u.removeEventListener("change",d)}},[n]),i}const Du={laptop:"(min-width: 1024px)"},PE=()=>window.matchMedia(Du.laptop).matches,JE="_table_1mykv_2",IE="_semi-transparent_1mykv_2",WE="_table-loading_1mykv_2",eC="_table-empty_1mykv_2",tC="_table-row-cells_1mykv_2",nC="_header-cell_1mykv_2",aC="_header-actions_1mykv_2",lC="_cell_1mykv_2",iC="_cell-actions_1mykv_2",sC="_value_1mykv_2",rC="_table-config_1mykv_2",oC="_tab-name_1mykv_2",uC="_table-action_1mykv_2",cC="_blue_1mykv_2",fC="_modal_1mykv_2",dC="_selected-size_1mykv_2",hC="_options-container_1mykv_2",mC="_row-options-entries-list_1mykv_2",pC="_underlying-rows-btn_1mykv_2",yC="_option-item_1mykv_2",vC="_pagination-indicator_1mykv_2",ie={table:JE,semiTransparent:IE,tableLoading:WE,tableEmpty:eC,tableRowCells:tC,headerCell:nC,headerActions:aC,cell:lC,cellActions:iC,value:sC,tableConfig:rC,tabName:oC,tableAction:uC,blue:cC,modal:fC,selectedSize:dC,optionsContainer:hC,rowOptionsEntriesList:mC,underlyingRowsBtn:pC,optionItem:yC,paginationIndicator:vC},sa=x.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),dt=x.createContext({state:Yi({}),setState:()=>{}}),ra=x.createContext({}),j1={ON_ANIMATION_END:Symbol("ON_TRANSITION_END")},A1=()=>{const[n,l]=x.useState(),[r,i]=x.useState("hidden");return x.useMemo(()=>{const o=m=>{m.preventDefault(),i("in"),l({x:m.clientX-1,y:m.clientY-1})},u=()=>{i("out")},d=m=>{console.log("onAnimationEnd",m),r==="in"?i("visible"):r==="out"&&(l(void 0),i("hidden"))};return{show:!!n,position:n,state:r,open:o,close:u,[j1.ON_ANIMATION_END]:d}},[n,r])},gC=n=>{if(n==="ASC")return"DESC";if(n!=="DESC")return"ASC"},bC=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback(i=>{l(o=>{const u=o.orderBy[0];if(u&&u.column===i){const d=gC(u.direction);return d?{...o,orderBy:[{column:i,direction:d}]}:{...o,orderBy:[]}}return{...o,orderBy:[{column:i,direction:"ASC"}]}})},[l]);return{orderBy:n.orderBy,updateOrderBy:r}};function xC(n){var r;const l=(r=n.target)==null?void 0:r.dataset;if(l){if(l.copyCol&&l.copyRow)return{col:parseInt(l.copyCol),row:parseInt(l.copyRow),action:"copy"};if(l.showCol&&l.showRow)return{col:parseInt(l.showCol),row:parseInt(l.showRow),action:"show"};if(l.filterCol&&l.filterRow)return{col:parseInt(l.filterCol),row:parseInt(l.filterRow),action:"filter"}}}function id(n,l,r){var u,d,m;const i=(d=(u=n==null?void 0:n.rows)==null?void 0:u[l])==null?void 0:d[r],o=(m=n==null?void 0:n.columns)==null?void 0:m[r];return{value:i,column:o}}const SC=()=>{const{data:n}=x.useContext(ra),{getColumnType:l}=x.useContext(sa),{setState:r}=x.useContext(dt),i=m=>{const{value:y,column:p}=id(n==null?void 0:n.result,m.row,m.col);if(p){const g=Gl(y,l(p.full));navigator.clipboard.writeText(g),It.success("Copied!")}},o=m=>{const{value:y,column:p}=id(n==null?void 0:n.result,m.row,m.col);if(p){const g=Gl(y,l(p.full));N1(g)}},u=m=>{const{value:y,column:p}=id(n==null?void 0:n.result,m.row,m.col);let g=(p==null?void 0:p.full)||"",b;if((p==null?void 0:p.table)===""){It.error("Filtering on aggregated column is not supported yet");return}if(g){let E;if(y==null)E={id:pl(),isEnabled:!0,column:g,connector:"AND",operator:"IS NULL"};else{const C=Gl(y,l(g));E={id:pl(),isEnabled:!0,column:g,connector:"AND",operator:"=",fn:b,value:[{value:C}]}}r(C=>({...C,filters:[...C.filters,E]})),It.success(`Added new filter on column ${p==null?void 0:p.alias}`)}};return m=>{const y=xC(m);y&&(y.action==="copy"?i(y):y.action==="show"?o(y):y.action==="filter"&&u(y))}},wC="_container_1lgam_2",EC="_animate-show_1lgam_2",CC="_animate-hide_1lgam_2",_C="_content_1lgam_2",NC="_backdrop_1lgam_2",$l={container:wC,animateShow:EC,animateHide:CC,content:_C,backdrop:NC},T1=({children:n,handler:l})=>{const r=x.useRef(l.close);r.current=l.close;const i=x.useMemo(()=>{if(!l.position)return;const o={};if(typeof window<"u"){const u=l.position.y>window.innerHeight/2,d=l.position.x>window.innerWidth/2;u?o.bottom=window.innerHeight-l.position.y:o.top=l.position.y,PE()?d?o.right=window.innerWidth-l.position.x:o.left=l.position.x:(o.right=36,o.left=36)}return o},[l.position]);return x.useEffect(()=>{const o=u=>{u.code==="Escape"&&r.current()};return window.addEventListener("keyup",o),()=>{window.removeEventListener("keyup",o)}},[]),i?h.jsxs("div",{className:ae($l.container,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),onAnimationEnd:l[j1.ON_ANIMATION_END],children:[h.jsx("div",{className:$l.backdrop,onClick:o=>{o.stopPropagation(),o.preventDefault(),l.close()}}),h.jsx("div",{className:ae($l.content,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),style:i,children:n})]}):null},jC="_table_wa1aa_2",AC="_root_wa1aa_2",TC="_content_wa1aa_2",OC="_sub_wa1aa_2",Go={table:jC,root:AC,content:TC,sub:OC},O1=({hook:n,onClick:l})=>h.jsxs("button",{className:Go.root,onClick:l,children:[h.jsx("span",{children:"📄"}),h.jsxs("div",{className:Go.content,children:[h.jsxs("p",{className:Go.table,children:[" ",n.on.toTable]}),h.jsxs("span",{className:Go.sub,children:[n.on.toColumn," = ",n.on.fromTable,".",n.on.fromColumn]})]})]},n.where),yl=(n,l)=>n!=null&&n>l,RC=({handler:n,rowIndex:l})=>{const{hooks:r,entities:i,dataSourceId:o,getEntityKey:u,getValue:d}=x.useContext(sa),{state:m}=x.useContext(dt),{data:y}=x.useContext(ra),[p,g]=x.useState(""),[b,E]=x.useState(""),C=x.useMemo(()=>y==null?void 0:y.result.rows[l],[y,l]),w=ls(),O=qt(),N=()=>{C&&w.mutateAsync({name:`${m.table} > [${m.joins.map(Q=>Q.table).join()}]`,opts:Yi({joins:m.joins,table:m.table,dataSourceId:m.dataSourceId,filters:[...m.filters,...m.groupBy.map(Q=>({id:pl(),connector:"AND",column:Q.value,operator:"=",value:[{value:d(C,Q)}]}))]})}).then(Q=>{O(`${Fe.workbench.path}/tab/${Q.id}`),n.close()})},_=Q=>{if(!C)return;const G=d(C,{value:`${Q.on.fromTable}.${Q.on.fromColumn}`});w.mutateAsync({name:`${Q.on.toTable} ${Q.on.toColumn} equals ${G}`,opts:Yi({table:Q.on.toTable,dataSourceId:o,filters:[{id:pl(),column:`${Q.on.toTable}.${Q.on.toColumn}`,operator:G==null?"IS NULL":"=",connector:"AND",value:G!=null?[{value:G,isColumn:!1}]:void 0}]})}).then(Z=>{O(`${Fe.workbench.path}/tab/${Z.id}`),n.close()})},A=Q=>{if(!C)return;const G=u(Q,C);n.close(),nh({tableName:Q,dataSourceId:o,entityId:G}),n.close()},j=x.useMemo(()=>p?i.filter(Q=>Q.includes(p)):i,[i,p]),B=x.useMemo(()=>{if(!y)return[];const Q=b.toLowerCase();return r.filter(G=>y.result.columns.some(te=>te.column===G.on.fromColumn&&te.table===G.on.fromTable)?G.on.toTable.toLowerCase().includes(Q):!1)},[b,r,y]),V=m.groupBy.length>0;return h.jsx(T1,{handler:n,children:h.jsxs("div",{className:ie.optionsContainer,children:[i.length>0&&h.jsxs("div",{children:[h.jsxs("label",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 border-b bg-(--bg) border-b-gray-200 p-2",children:[h.jsx("span",{className:"font-semibold",children:"📝 Edit row"}),h.jsx("input",{className:"input bg-white!",placeholder:"Filter entities",value:p,onChange:Q=>g(Q.target.value)})]}),h.jsx("div",{className:ie.rowOptionsEntriesList,children:yl(j.length,0)?j.map(Q=>h.jsx("button",{className:ae(ie.optionItem,"font-semibold"),onClick:()=>A(Q),children:h.jsxs("span",{children:["📄 ",Q]})},Q)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),r.length>0&&h.jsxs("div",{className:"not-first:border-t border-gray-200",children:[h.jsxs("label",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 border-b bg-(--bg) border-gray-200 p-2",children:[h.jsx("span",{className:"font-semibold",children:"↗️ Connected tables"}),h.jsx("input",{className:"input bg-white!",placeholder:"Filter tables",value:b,onChange:Q=>E(Q.target.value)})]}),h.jsx("div",{className:ie.rowOptionsEntriesList,children:B.length>0?B.map(Q=>h.jsx(O1,{hook:Q,onClick:()=>_(Q)},Q.where)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),V&&h.jsx("button",{onClick:N,className:ie.underlyingRowsBtn,children:"🎯 Underlying rows"})]})})},DC={ASC:"⬆️",DESC:"⬇️"},MC=()=>{const{data:n}=x.useContext(ra),{orderBy:l,updateOrderBy:r}=bC(),i=(n==null?void 0:n.result.columns)||[],o=l[0],u=yl(n==null?void 0:n.result.tables.length,1);return h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("td",{className:"py-1 px-4 text-center text-sm text-gray-600 border-r",children:"#"}),i.map(d=>h.jsxs("td",{className:ie.headerCell,children:[h.jsxs("div",{className:"overflow-hidden",children:[u&&h.jsx("p",{className:"text-xs truncate italic",children:d.table||"-"}),h.jsx("p",{className:"text-sm font-semibold truncate",children:d.column})]}),h.jsx("div",{className:ie.headerActions,children:h.jsx("button",{onClick:()=>r(d.full),children:(o==null?void 0:o.column)===d.full?DC[o.direction]:"↕️"})})]},d.full))]})})};function LC({value:n,row:l,col:r}){if(n==="")return h.jsx("span",{className:"pointer-events-none text-black/30 truncate",children:"<EMPTY STRING>"});if(n==null)return h.jsx("span",{className:"pointer-events-none text-black/30",children:"<NULL>"});const i=Gl(n);return h.jsxs(h.Fragment,{children:[h.jsx("span",{"data-row":l,className:ie.value,children:i}),h.jsxs("div",{className:ie.cellActions,children:[h.jsx("button",{"data-copy-col":r,"data-copy-row":l,children:"📋"}),h.jsx("button",{"data-show-col":r,"data-show-row":l,children:"👀"}),h.jsx("button",{"data-filter-col":r,"data-filter-row":l,children:"🔎"})]})]})}const UC=x.memo(({row:n,isLastRow:l,index:r,offset:i})=>h.jsxs("tr",{className:ae(ie.tableRowCells,l&&"rounded-b-lg"),children:[h.jsx("td",{className:"py-1 px-4 text-center align-middle text-xs w-8 text-blue-500 border-r",children:r+1+i}),n.map((o,u)=>h.jsx("td",{className:ie.cell,"data-row":r,children:h.jsx(LC,{value:o,col:u,row:r})},u))]})),zC=()=>{var C,w;const{data:n,error:l,isLoading:r,isFetching:i}=x.useContext(ra),{state:{page:o,size:u}}=x.useContext(dt),d=eh(l),m=SC(),y=A1(),[p,g]=x.useState(void 0),b=O=>{var A;const N=(A=O.target)==null?void 0:A.dataset,_=N==null?void 0:N.row;_!=null&&(g(parseInt(_)),y.open(O))},E=o*u;return h.jsxs(h.Fragment,{children:[p!=null&&y.show&&h.jsx(RC,{handler:y,rowIndex:p}),d&&h.jsx(zt,{className:"my-4",variant:"danger",children:d}),r&&h.jsx("div",{className:ie.tableLoading,children:"Loading data"}),n&&h.jsxs("table",{className:ae(ie.table,i&&ie.semiTransparent),onContextMenu:b,onClick:m,children:[h.jsx(MC,{}),h.jsxs("tbody",{children:[((C=n.result.rows)==null?void 0:C.length)<1&&h.jsx("tr",{className:ie.tableEmpty,children:h.jsx("td",{colSpan:n.result.columns.length+1,children:"No data"})}),(w=n.result.rows)==null?void 0:w.map((O,N)=>h.jsx(UC,{index:N,offset:E,row:O,isLastRow:N===n.result.rows.length-1},N))]})]})]})},qC="_root_z8hvk_2",kC="_root-show_z8hvk_2",BC="_content-desktop_z8hvk_2",HC="_content-mobile_z8hvk_2",QC="_card_z8hvk_2",$C="_cards-list_z8hvk_2",YC="_sub-text_z8hvk_2",VC="_text_z8hvk_2",KC="_section-title_z8hvk_2",FC="_sidebar-action_z8hvk_2",GC="_sidebar-add-action_z8hvk_2",XC="_section-container_z8hvk_2",ZC="_close-button_z8hvk_2",PC="_section-open-btn_z8hvk_2",JC="_show_z8hvk_2",re={root:qC,rootShow:kC,contentDesktop:BC,contentMobile:HC,card:QC,cardsList:$C,subText:YC,text:VC,sectionTitle:KC,sidebarAction:FC,sidebarAddAction:GC,sectionContainer:XC,closeButton:ZC,sectionOpenBtn:PC,show:JC},lh=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback((o,u=!1)=>{l(d=>({...d,page:u?0:d.page,filters:o}))},[l]),i=x.useCallback(o=>{l(u=>({...u,filters:u.filters.filter(d=>d.id!==o)}))},[l]);return{filters:n.filters,removeFilter:i,setFilters:r}},IC=(n,l)=>n.type!==l.type||n.on!==l.on||n.table!==l.table,WC=(n,l)=>n.type===l.type&&n.on===l.on&&n.table===l.table,ih=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback(i=>{l(o=>{const u=o.joins;if(u.some(m=>WC(m,i))){const m=i.table+".";return{...o,joins:u.filter(y=>IC(y,i)),columns:o.columns.filter(y=>!y.value.startsWith(m)),groupBy:o.groupBy.filter(y=>!y.value.startsWith(m)),orderBy:o.orderBy.filter(y=>!y.column.startsWith(m)),aggregations:o.aggregations.filter(y=>!y.value.startsWith(m)),filters:o.filters.filter(y=>!y.column.startsWith(m))}}return{...o,joins:[...u,i]}})},[l]);return{joins:n.joins,toggle:r}},Ki=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M184 112l144 144-144 144"})),[e_,t_]=dn(!1),n_=()=>t_(n=>!n),a_="_sidebar_pku86_2",l_="_sidebar-visible_pku86_2",i_="_sidebar-container_pku86_2",s_="_sidebar-invisible_pku86_2",r_="_backdrop_pku86_2",ur={sidebar:a_,sidebarVisible:l_,sidebarContainer:i_,sidebarInvisible:s_,backdrop:r_},R1=({children:n,backdropClose:l,isVisible:r,onClose:i,onClosed:o,contentClassName:u})=>{const[d,m]=x.useState(!1),y=x.useRef(i);y.current=i;const p=()=>{l&&i()},g=b=>{r||getComputedStyle(b.currentTarget).opacity==="0"&&(m(!1),o&&o())};return x.useEffect(()=>{r&&m(!0)},[r]),x.useEffect(()=>{const b=E=>{r&&E.key==="Escape"&&y.current()};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[r]),h.jsxs("div",{onTransitionEnd:g,className:ae(ur.sidebar,r?ur.sidebarVisible:ur.sidebarInvisible),children:[h.jsx("div",{onClick:p,className:ur.backdrop}),h.jsx("div",{className:ae(ur.sidebarContainer,u),children:d&&n})]})},[Mu,sh]=dn({filters:!1,joins:!1,columns:!1,groupBy:!1,aggregate:!1}),Ut=n=>sh(l=>({...l,[n]:!0})),Lu=n=>sh(l=>({...l,[n]:!1})),vu=n=>sh(l=>({...l,[n]:!l[n]})),D1=()=>{const n=th(),l=A4();return{rename:async i=>{if(n){const o=await Or("New tab name",i);o&&await l.mutateAsync({id:n,payload:{name:o}})}return Promise.resolve()}}},o_=()=>{const n=e_();return ah(Du.laptop)?h.jsx("div",{className:ae(re.root,n&&re.rootShow),children:h.jsxs("div",{className:ae(re.contentDesktop,"no-scrollbar"),children:[h.jsx(zy,{}),h.jsx(Uy,{}),h.jsx($y,{}),h.jsx(Qy,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(qy,{})]})}):h.jsx(R1,{isVisible:n,onClose:n_,backdropClose:!0,children:h.jsxs("div",{className:re.contentMobile,children:[h.jsx(zy,{}),h.jsx(Uy,{}),h.jsx($y,{}),h.jsx(Qy,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(qy,{})]})})};function Rr({onShow:n,show:l,title:r,items:i}){return h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("p",{className:re.sectionTitle,children:r}),i>0&&h.jsxs("button",{className:ae(re.sectionOpenBtn,l&&re.show),onClick:n,children:[h.jsx("span",{children:i}),h.jsx(Ki,{width:16,height:16})]})]})}function Uy(){const{name:n}=x.useContext(sa),{data:l}=x.useContext(ra),{rename:r}=D1(),i=()=>{l!=null&&l.result.query&&(navigator.clipboard.writeText(l.result.query),It.success("Query copied to clipboard"))};return h.jsxs("div",{className:"grid lg:grid-cols-2 gap-1 px-2 mb-4",children:[h.jsx("button",{className:re.sidebarAction,onClick:()=>r(n),children:h.jsx("span",{children:"✏️ Rename tab"})}),h.jsx("button",{className:re.sidebarAction,onClick:i,children:h.jsx("span",{children:"🖋️ Copy SQL"})})]})}function zy(){const{state:n}=x.useContext(dt),{data:l}=_r(n.dataSourceId);return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx("div",{className:re.card,children:h.jsxs("div",{children:[h.jsx("p",{className:re.subText,children:"📄 Table"}),h.jsx("p",{className:ae(re.text,"text-blue-600"),children:n.table})]})}),h.jsx("div",{className:ae(re.card,"mt-2"),children:h.jsxs("div",{children:[h.jsx("p",{className:re.subText,children:"📦 Data source"}),h.jsx("p",{className:ae(re.text,"text-blue-600"),children:l==null?void 0:l.name})]})})]})}function qy(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(!0),o=u=>{l(d=>({...d,groupBy:d.groupBy.filter(m=>Wn(m)!==u)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"📚 Group by",show:r,onShow:()=>i(!r),items:n.groupBy.length}),r&&n.groupBy.length>0&&h.jsx("div",{className:re.cardsList,children:n.groupBy.map(u=>h.jsxs("div",{className:re.card,children:[h.jsx("span",{className:re.text,children:Wn(u)}),h.jsx("button",{className:re.closeButton,onClick:()=>o(Wn(u)),children:h.jsx(Dn,{width:20,height:20})})]},Wn(u)))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ut("groupBy"),children:[h.jsx("span",{className:"hotkey",children:"G"}),h.jsx("span",{children:"Add group by"})]})]})}function ky(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(!1),o=d=>{l(m=>({...m,columns:m.columns.filter(y=>Wn(y)!==d)}))},u=n.aggregations.length>0||n.groupBy.length>0;return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"👀 Columns",show:r,onShow:()=>i(!r),items:u?0:n.columns.length}),u&&h.jsx(zt,{variant:"warning",className:"border border-yellow-800 my-2",children:h.jsx("span",{className:re.text,children:"Columns are ignored when there is at least one aggregation or group by"})}),!u&&r&&n.columns.length>0&&h.jsx("div",{className:re.cardsList,children:n.columns.map(d=>h.jsxs("div",{className:re.card,children:[h.jsx("span",{className:re.text,children:Wn(d)}),h.jsx("button",{className:re.closeButton,onClick:()=>o(Wn(d)),children:h.jsx(Dn,{width:20,height:20})})]}))}),!u&&h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ut("columns"),children:[h.jsx("span",{className:"hotkey",children:"C"}),h.jsx("span",{children:"Show/Hide columns"})]})]})}function By(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(!0),o=u=>{const d=Wn(u);l(m=>({...m,aggregations:m.aggregations.filter(y=>y.fn!==u.fn||y.value!==u.value),orderBy:m.orderBy.filter(y=>y.column!==d)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"🔢 Aggregations",show:r,onShow:()=>i(!r),items:n.aggregations.length}),r&&n.aggregations.length>0&&h.jsx("div",{className:re.cardsList,children:n.aggregations.map(u=>h.jsxs("div",{className:re.card,children:[h.jsxs("span",{className:re.text,children:[u.fn," ",u.value]}),h.jsx("button",{className:re.closeButton,onClick:()=>o(u),children:h.jsx(Dn,{width:20,height:20})})]}))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ut("aggregate"),children:[h.jsx("span",{className:"hotkey",children:"A"}),h.jsx("span",{children:"Aggregate data"})]})]})}const u_=n=>(n==null?void 0:n.map(l=>l.value).join(", "))||"";function Hy(){const{state:n}=x.useContext(dt),{removeFilter:l}=lh(),[r,i]=x.useState(!0),o=()=>{Ut("filters")};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"🎚️ Filters",show:r,onShow:()=>i(!r),items:n.filters.length}),r&&n.filters.length>0&&h.jsx("div",{className:re.cardsList,children:n.filters.map((u,d)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:ae(re.subText,"truncate"),children:u.column}),h.jsxs("p",{className:ae(re.text,"truncate"),children:[Zd[u.operator]," ",u_(u.value)]})]}),h.jsx("button",{className:re.closeButton,onClick:()=>l(u.id),children:h.jsx(Dn,{width:20,height:20})})]},d))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:o,children:[h.jsx("span",{className:"hotkey",children:"F"}),h.jsx("span",{children:"Filter data"})]})]})}function Qy(){const{toggle:n}=ih(),{availableJoins:l}=x.useContext(sa),{state:r}=x.useContext(dt),[i,o]=x.useState(!0);return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Rr,{title:"📄 Joins",show:i,onShow:()=>o(!i),items:r.joins.length}),i&&r.joins.length>0&&h.jsx("div",{className:re.cardsList,children:r.joins.map((u,d)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsxs("p",{className:ae(re.subText,"truncate"),children:["on ",u.on]}),h.jsx("p",{className:re.text,children:u.table})]}),d===r.joins.length-1&&h.jsx("button",{className:re.closeButton,onClick:()=>n(u),children:h.jsx(Dn,{width:20,height:20})})]},u.table+u.on))}),l.length>0&&h.jsxs("button",{onClick:()=>Ut("joins"),className:re.sidebarAddAction,children:[h.jsx("span",{className:"hotkey",children:"J"}),h.jsx("span",{children:"Join table"})]})]})}function $y(){const{state:n,setState:l}=x.useContext(dt);if(!n.orderBy.length)return null;const r=i=>{l(o=>({...o,orderBy:o.orderBy.filter(u=>u.column!==i.column&&u.direction!==i.direction)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx("p",{className:re.sectionTitle,children:"Order by"}),h.jsx("div",{className:re.cardsList,children:n.orderBy.map((i,o)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:ae(re.subText,"truncate"),children:i.direction}),h.jsx("p",{className:re.text,children:i.column})]}),h.jsx("button",{className:re.closeButton,onClick:()=>r(i),children:h.jsx(Dn,{width:20,height:20})})]},o))})]})}const c_=()=>{const{state:n,setState:l}=x.useContext(dt),r=x.useCallback(o=>{l(u=>({...u,page:o}))},[l]),i=x.useCallback((o,u=!1)=>{l(d=>({...d,size:o,page:u?0:d.page}))},[l]);return{page:n.page,size:n.size,setSize:i,setPage:r}},f_=()=>Nt({mutationFn:async n=>{const{data:l}=await Oe.post("/saved-queries",n);return l.data},onSuccess:()=>{ft.invalidateQueries(["queries"]),ts()}}),d_=()=>Nt({mutationFn:async n=>Oe.delete("/saved-queries/"+n),onSuccess:()=>{ts()}}),h_=()=>Nt({mutationFn:async({id:n,payload:l})=>{const{data:r}=await Oe.patch("/queries/"+n,l);return r.data},onSuccess:n=>{ft.invalidateQueries(["query",n.id]),ts(),Z3(),n.isTrash}}),Fi=Math.min,Xl=Math.max,gu=Math.round,Xo=Math.floor,ea=n=>({x:n,y:n}),m_={left:"right",right:"left",bottom:"top",top:"bottom"},p_={start:"end",end:"start"};function Td(n,l,r){return Xl(n,Fi(l,r))}function Dr(n,l){return typeof n=="function"?n(l):n}function Pl(n){return n.split("-")[0]}function Mr(n){return n.split("-")[1]}function M1(n){return n==="x"?"y":"x"}function rh(n){return n==="y"?"height":"width"}function hl(n){return["top","bottom"].includes(Pl(n))?"y":"x"}function oh(n){return M1(hl(n))}function y_(n,l,r){r===void 0&&(r=!1);const i=Mr(n),o=oh(n),u=rh(o);let d=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[u]>l.floating[u]&&(d=bu(d)),[d,bu(d)]}function v_(n){const l=bu(n);return[Od(n),l,Od(l)]}function Od(n){return n.replace(/start|end/g,l=>p_[l])}function g_(n,l,r){const i=["left","right"],o=["right","left"],u=["top","bottom"],d=["bottom","top"];switch(n){case"top":case"bottom":return r?l?o:i:l?i:o;case"left":case"right":return l?u:d;default:return[]}}function b_(n,l,r,i){const o=Mr(n);let u=g_(Pl(n),r==="start",i);return o&&(u=u.map(d=>d+"-"+o),l&&(u=u.concat(u.map(Od)))),u}function bu(n){return n.replace(/left|right|bottom|top/g,l=>m_[l])}function x_(n){return{top:0,right:0,bottom:0,left:0,...n}}function L1(n){return typeof n!="number"?x_(n):{top:n,right:n,bottom:n,left:n}}function xu(n){const{x:l,y:r,width:i,height:o}=n;return{width:i,height:o,top:r,left:l,right:l+i,bottom:r+o,x:l,y:r}}function Yy(n,l,r){let{reference:i,floating:o}=n;const u=hl(l),d=oh(l),m=rh(d),y=Pl(l),p=u==="y",g=i.x+i.width/2-o.width/2,b=i.y+i.height/2-o.height/2,E=i[m]/2-o[m]/2;let C;switch(y){case"top":C={x:g,y:i.y-o.height};break;case"bottom":C={x:g,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:b};break;case"left":C={x:i.x-o.width,y:b};break;default:C={x:i.x,y:i.y}}switch(Mr(l)){case"start":C[d]-=E*(r&&p?-1:1);break;case"end":C[d]+=E*(r&&p?-1:1);break}return C}const S_=async(n,l,r)=>{const{placement:i="bottom",strategy:o="absolute",middleware:u=[],platform:d}=r,m=u.filter(Boolean),y=await(d.isRTL==null?void 0:d.isRTL(l));let p=await d.getElementRects({reference:n,floating:l,strategy:o}),{x:g,y:b}=Yy(p,i,y),E=i,C={},w=0;for(let O=0;O<m.length;O++){const{name:N,fn:_}=m[O],{x:A,y:j,data:B,reset:V}=await _({x:g,y:b,initialPlacement:i,placement:E,strategy:o,middlewareData:C,rects:p,platform:d,elements:{reference:n,floating:l}});g=A??g,b=j??b,C={...C,[N]:{...C[N],...B}},V&&w<=50&&(w++,typeof V=="object"&&(V.placement&&(E=V.placement),V.rects&&(p=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:o}):V.rects),{x:g,y:b}=Yy(p,E,y)),O=-1)}return{x:g,y:b,placement:E,strategy:o,middlewareData:C}};async function U1(n,l){var r;l===void 0&&(l={});const{x:i,y:o,platform:u,rects:d,elements:m,strategy:y}=n,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:E=!1,padding:C=0}=Dr(l,n),w=L1(C),N=m[E?b==="floating"?"reference":"floating":b],_=xu(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(N)))==null||r?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:p,rootBoundary:g,strategy:y})),A=b==="floating"?{x:i,y:o,width:d.floating.width,height:d.floating.height}:d.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),B=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},V=xu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:A,offsetParent:j,strategy:y}):A);return{top:(_.top-V.top+w.top)/B.y,bottom:(V.bottom-_.bottom+w.bottom)/B.y,left:(_.left-V.left+w.left)/B.x,right:(V.right-_.right+w.right)/B.x}}const w_=n=>({name:"arrow",options:n,async fn(l){const{x:r,y:i,placement:o,rects:u,platform:d,elements:m,middlewareData:y}=l,{element:p,padding:g=0}=Dr(n,l)||{};if(p==null)return{};const b=L1(g),E={x:r,y:i},C=oh(o),w=rh(C),O=await d.getDimensions(p),N=C==="y",_=N?"top":"left",A=N?"bottom":"right",j=N?"clientHeight":"clientWidth",B=u.reference[w]+u.reference[C]-E[C]-u.floating[w],V=E[C]-u.reference[C],Q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let G=Q?Q[j]:0;(!G||!await(d.isElement==null?void 0:d.isElement(Q)))&&(G=m.floating[j]||u.floating[w]);const Z=B/2-V/2,te=G/2-O[w]/2-1,pe=Fi(b[_],te),Re=Fi(b[A],te),be=pe,Ue=G-O[w]-Re,ye=G/2-O[w]/2+Z,Se=Td(be,ye,Ue),k=!y.arrow&&Mr(o)!=null&&ye!==Se&&u.reference[w]/2-(ye<be?pe:Re)-O[w]/2<0,X=k?ye<be?ye-be:ye-Ue:0;return{[C]:E[C]+X,data:{[C]:Se,centerOffset:ye-Se-X,...k&&{alignmentOffset:X}},reset:k}}}),E_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var r,i;const{placement:o,middlewareData:u,rects:d,initialPlacement:m,platform:y,elements:p}=l,{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:E,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0,...N}=Dr(n,l);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const _=Pl(o),A=hl(m),j=Pl(m)===m,B=await(y.isRTL==null?void 0:y.isRTL(p.floating)),V=E||(j||!O?[bu(m)]:v_(m)),Q=w!=="none";!E&&Q&&V.push(...b_(m,O,w,B));const G=[m,...V],Z=await U1(l,N),te=[];let pe=((i=u.flip)==null?void 0:i.overflows)||[];if(g&&te.push(Z[_]),b){const ye=y_(o,d,B);te.push(Z[ye[0]],Z[ye[1]])}if(pe=[...pe,{placement:o,overflows:te}],!te.every(ye=>ye<=0)){var Re,be;const ye=(((Re=u.flip)==null?void 0:Re.index)||0)+1,Se=G[ye];if(Se&&(!(b==="alignment"?A!==hl(Se):!1)||pe.every(J=>J.overflows[0]>0&&hl(J.placement)===A)))return{data:{index:ye,overflows:pe},reset:{placement:Se}};let k=(be=pe.filter(X=>X.overflows[0]<=0).sort((X,J)=>X.overflows[1]-J.overflows[1])[0])==null?void 0:be.placement;if(!k)switch(C){case"bestFit":{var Ue;const X=(Ue=pe.filter(J=>{if(Q){const ue=hl(J.placement);return ue===A||ue==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(ue=>ue>0).reduce((ue,R)=>ue+R,0)]).sort((J,ue)=>J[1]-ue[1])[0])==null?void 0:Ue[0];X&&(k=X);break}case"initialPlacement":k=m;break}if(o!==k)return{reset:{placement:k}}}return{}}}};async function C_(n,l){const{placement:r,platform:i,elements:o}=n,u=await(i.isRTL==null?void 0:i.isRTL(o.floating)),d=Pl(r),m=Mr(r),y=hl(r)==="y",p=["left","top"].includes(d)?-1:1,g=u&&y?-1:1,b=Dr(l,n);let{mainAxis:E,crossAxis:C,alignmentAxis:w}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return m&&typeof w=="number"&&(C=m==="end"?w*-1:w),y?{x:C*g,y:E*p}:{x:E*p,y:C*g}}const __=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var r,i;const{x:o,y:u,placement:d,middlewareData:m}=l,y=await C_(l,n);return d===((r=m.offset)==null?void 0:r.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:o+y.x,y:u+y.y,data:{...y,placement:d}}}}},N_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:r,y:i,placement:o}=l,{mainAxis:u=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:_,y:A}=N;return{x:_,y:A}}},...y}=Dr(n,l),p={x:r,y:i},g=await U1(l,y),b=hl(Pl(o)),E=M1(b);let C=p[E],w=p[b];if(u){const N=E==="y"?"top":"left",_=E==="y"?"bottom":"right",A=C+g[N],j=C-g[_];C=Td(A,C,j)}if(d){const N=b==="y"?"top":"left",_=b==="y"?"bottom":"right",A=w+g[N],j=w-g[_];w=Td(A,w,j)}const O=m.fn({...l,[E]:C,[b]:w});return{...O,data:{x:O.x-r,y:O.y-i,enabled:{[E]:u,[b]:d}}}}}};function Uu(){return typeof window<"u"}function is(n){return z1(n)?(n.nodeName||"").toLowerCase():"#document"}function fn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function oa(n){var l;return(l=(z1(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function z1(n){return Uu()?n instanceof Node||n instanceof fn(n).Node:!1}function kn(n){return Uu()?n instanceof Element||n instanceof fn(n).Element:!1}function ta(n){return Uu()?n instanceof HTMLElement||n instanceof fn(n).HTMLElement:!1}function Vy(n){return!Uu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof fn(n).ShadowRoot}function Lr(n){const{overflow:l,overflowX:r,overflowY:i,display:o}=Bn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+r)&&!["inline","contents"].includes(o)}function j_(n){return["table","td","th"].includes(is(n))}function zu(n){return[":popover-open",":modal"].some(l=>{try{return n.matches(l)}catch{return!1}})}function uh(n){const l=ch(),r=kn(n)?Bn(n):n;return["transform","translate","scale","rotate","perspective"].some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!l&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!l&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(r.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(r.contain||"").includes(i))}function A_(n){let l=vl(n);for(;ta(l)&&!Gi(l);){if(uh(l))return l;if(zu(l))return null;l=vl(l)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Gi(n){return["html","body","#document"].includes(is(n))}function Bn(n){return fn(n).getComputedStyle(n)}function qu(n){return kn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function vl(n){if(is(n)==="html")return n;const l=n.assignedSlot||n.parentNode||Vy(n)&&n.host||oa(n);return Vy(l)?l.host:l}function q1(n){const l=vl(n);return Gi(l)?n.ownerDocument?n.ownerDocument.body:n.body:ta(l)&&Lr(l)?l:q1(l)}function yr(n,l,r){var i;l===void 0&&(l=[]),r===void 0&&(r=!0);const o=q1(n),u=o===((i=n.ownerDocument)==null?void 0:i.body),d=fn(o);if(u){const m=Rd(d);return l.concat(d,d.visualViewport||[],Lr(o)?o:[],m&&r?yr(m):[])}return l.concat(o,yr(o,[],r))}function Rd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function k1(n){const l=Bn(n);let r=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const o=ta(n),u=o?n.offsetWidth:r,d=o?n.offsetHeight:i,m=gu(r)!==u||gu(i)!==d;return m&&(r=u,i=d),{width:r,height:i,$:m}}function fh(n){return kn(n)?n:n.contextElement}function $i(n){const l=fh(n);if(!ta(l))return ea(1);const r=l.getBoundingClientRect(),{width:i,height:o,$:u}=k1(l);let d=(u?gu(r.width):r.width)/i,m=(u?gu(r.height):r.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const T_=ea(0);function B1(n){const l=fn(n);return!ch()||!l.visualViewport?T_:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function O_(n,l,r){return l===void 0&&(l=!1),!r||l&&r!==fn(n)?!1:l}function Jl(n,l,r,i){l===void 0&&(l=!1),r===void 0&&(r=!1);const o=n.getBoundingClientRect(),u=fh(n);let d=ea(1);l&&(i?kn(i)&&(d=$i(i)):d=$i(n));const m=O_(u,r,i)?B1(u):ea(0);let y=(o.left+m.x)/d.x,p=(o.top+m.y)/d.y,g=o.width/d.x,b=o.height/d.y;if(u){const E=fn(u),C=i&&kn(i)?fn(i):i;let w=E,O=Rd(w);for(;O&&i&&C!==w;){const N=$i(O),_=O.getBoundingClientRect(),A=Bn(O),j=_.left+(O.clientLeft+parseFloat(A.paddingLeft))*N.x,B=_.top+(O.clientTop+parseFloat(A.paddingTop))*N.y;y*=N.x,p*=N.y,g*=N.x,b*=N.y,y+=j,p+=B,w=fn(O),O=Rd(w)}}return xu({width:g,height:b,x:y,y:p})}function dh(n,l){const r=qu(n).scrollLeft;return l?l.left+r:Jl(oa(n)).left+r}function H1(n,l,r){r===void 0&&(r=!1);const i=n.getBoundingClientRect(),o=i.left+l.scrollLeft-(r?0:dh(n,i)),u=i.top+l.scrollTop;return{x:o,y:u}}function R_(n){let{elements:l,rect:r,offsetParent:i,strategy:o}=n;const u=o==="fixed",d=oa(i),m=l?zu(l.floating):!1;if(i===d||m&&u)return r;let y={scrollLeft:0,scrollTop:0},p=ea(1);const g=ea(0),b=ta(i);if((b||!b&&!u)&&((is(i)!=="body"||Lr(d))&&(y=qu(i)),ta(i))){const C=Jl(i);p=$i(i),g.x=C.x+i.clientLeft,g.y=C.y+i.clientTop}const E=d&&!b&&!u?H1(d,y,!0):ea(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-y.scrollLeft*p.x+g.x+E.x,y:r.y*p.y-y.scrollTop*p.y+g.y+E.y}}function D_(n){return Array.from(n.getClientRects())}function M_(n){const l=oa(n),r=qu(n),i=n.ownerDocument.body,o=Xl(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),u=Xl(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-r.scrollLeft+dh(n);const m=-r.scrollTop;return Bn(i).direction==="rtl"&&(d+=Xl(l.clientWidth,i.clientWidth)-o),{width:o,height:u,x:d,y:m}}function L_(n,l){const r=fn(n),i=oa(n),o=r.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,y=0;if(o){u=o.width,d=o.height;const p=ch();(!p||p&&l==="fixed")&&(m=o.offsetLeft,y=o.offsetTop)}return{width:u,height:d,x:m,y}}function U_(n,l){const r=Jl(n,!0,l==="fixed"),i=r.top+n.clientTop,o=r.left+n.clientLeft,u=ta(n)?$i(n):ea(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,y=o*u.x,p=i*u.y;return{width:d,height:m,x:y,y:p}}function Ky(n,l,r){let i;if(l==="viewport")i=L_(n,r);else if(l==="document")i=M_(oa(n));else if(kn(l))i=U_(l,r);else{const o=B1(n);i={x:l.x-o.x,y:l.y-o.y,width:l.width,height:l.height}}return xu(i)}function Q1(n,l){const r=vl(n);return r===l||!kn(r)||Gi(r)?!1:Bn(r).position==="fixed"||Q1(r,l)}function z_(n,l){const r=l.get(n);if(r)return r;let i=yr(n,[],!1).filter(m=>kn(m)&&is(m)!=="body"),o=null;const u=Bn(n).position==="fixed";let d=u?vl(n):n;for(;kn(d)&&!Gi(d);){const m=Bn(d),y=uh(d);!y&&m.position==="fixed"&&(o=null),(u?!y&&!o:!y&&m.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Lr(d)&&!y&&Q1(n,d))?i=i.filter(g=>g!==d):o=m,d=vl(d)}return l.set(n,i),i}function q_(n){let{element:l,boundary:r,rootBoundary:i,strategy:o}=n;const d=[...r==="clippingAncestors"?zu(l)?[]:z_(l,this._c):[].concat(r),i],m=d[0],y=d.reduce((p,g)=>{const b=Ky(l,g,o);return p.top=Xl(b.top,p.top),p.right=Fi(b.right,p.right),p.bottom=Fi(b.bottom,p.bottom),p.left=Xl(b.left,p.left),p},Ky(l,m,o));return{width:y.right-y.left,height:y.bottom-y.top,x:y.left,y:y.top}}function k_(n){const{width:l,height:r}=k1(n);return{width:l,height:r}}function B_(n,l,r){const i=ta(l),o=oa(l),u=r==="fixed",d=Jl(n,!0,u,l);let m={scrollLeft:0,scrollTop:0};const y=ea(0);function p(){y.x=dh(o)}if(i||!i&&!u)if((is(l)!=="body"||Lr(o))&&(m=qu(l)),i){const C=Jl(l,!0,u,l);y.x=C.x+l.clientLeft,y.y=C.y+l.clientTop}else o&&p();u&&!i&&o&&p();const g=o&&!i&&!u?H1(o,m):ea(0),b=d.left+m.scrollLeft-y.x-g.x,E=d.top+m.scrollTop-y.y-g.y;return{x:b,y:E,width:d.width,height:d.height}}function sd(n){return Bn(n).position==="static"}function Fy(n,l){if(!ta(n)||Bn(n).position==="fixed")return null;if(l)return l(n);let r=n.offsetParent;return oa(n)===r&&(r=r.ownerDocument.body),r}function $1(n,l){const r=fn(n);if(zu(n))return r;if(!ta(n)){let o=vl(n);for(;o&&!Gi(o);){if(kn(o)&&!sd(o))return o;o=vl(o)}return r}let i=Fy(n,l);for(;i&&j_(i)&&sd(i);)i=Fy(i,l);return i&&Gi(i)&&sd(i)&&!uh(i)?r:i||A_(n)||r}const H_=async function(n){const l=this.getOffsetParent||$1,r=this.getDimensions,i=await r(n.floating);return{reference:B_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Q_(n){return Bn(n).direction==="rtl"}const $_={convertOffsetParentRelativeRectToViewportRelativeRect:R_,getDocumentElement:oa,getClippingRect:q_,getOffsetParent:$1,getElementRects:H_,getClientRects:D_,getDimensions:k_,getScale:$i,isElement:kn,isRTL:Q_};function Y1(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function Y_(n,l){let r=null,i;const o=oa(n);function u(){var m;clearTimeout(i),(m=r)==null||m.disconnect(),r=null}function d(m,y){m===void 0&&(m=!1),y===void 0&&(y=1),u();const p=n.getBoundingClientRect(),{left:g,top:b,width:E,height:C}=p;if(m||l(),!E||!C)return;const w=Xo(b),O=Xo(o.clientWidth-(g+E)),N=Xo(o.clientHeight-(b+C)),_=Xo(g),j={rootMargin:-w+"px "+-O+"px "+-N+"px "+-_+"px",threshold:Xl(0,Fi(1,y))||1};let B=!0;function V(Q){const G=Q[0].intersectionRatio;if(G!==y){if(!B)return d();G?d(!1,G):i=setTimeout(()=>{d(!1,1e-7)},1e3)}G===1&&!Y1(p,n.getBoundingClientRect())&&d(),B=!1}try{r=new IntersectionObserver(V,{...j,root:o.ownerDocument})}catch{r=new IntersectionObserver(V,j)}r.observe(n)}return d(!0),u}function V_(n,l,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:y=!1}=i,p=fh(n),g=o||u?[...p?yr(p):[],...yr(l)]:[];g.forEach(_=>{o&&_.addEventListener("scroll",r,{passive:!0}),u&&_.addEventListener("resize",r)});const b=p&&m?Y_(p,r):null;let E=-1,C=null;d&&(C=new ResizeObserver(_=>{let[A]=_;A&&A.target===p&&C&&(C.unobserve(l),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var j;(j=C)==null||j.observe(l)})),r()}),p&&!y&&C.observe(p),C.observe(l));let w,O=y?Jl(n):null;y&&N();function N(){const _=Jl(n);O&&!Y1(O,_)&&r(),O=_,w=requestAnimationFrame(N)}return r(),()=>{var _;g.forEach(A=>{o&&A.removeEventListener("scroll",r),u&&A.removeEventListener("resize",r)}),b==null||b(),(_=C)==null||_.disconnect(),C=null,y&&cancelAnimationFrame(w)}}const K_=__,F_=N_,G_=E_,X_=w_,Gy=(n,l,r)=>{const i=new Map,o={platform:$_,...r},u={...o.platform,_c:i};return S_(n,l,{...o,platform:u})};var rd={exports:{}};/*!
233
233
  Copyright (c) 2018 Jed Watson.
234
234
  Licensed under the MIT License (MIT), see
235
235
  http://jedwatson.github.io/classnames
236
- */var Xy;function X_(){return Xy||(Xy=1,function(n){(function(){var l={}.hasOwnProperty;function r(){for(var u="",d=0;d<arguments.length;d++){var m=arguments[d];m&&(u=o(u,i(m)))}return u}function i(u){if(typeof u=="string"||typeof u=="number")return u;if(typeof u!="object")return"";if(Array.isArray(u))return r.apply(null,u);if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]"))return u.toString();var d="";for(var m in u)l.call(u,m)&&u[m]&&(d=o(d,m));return d}function o(u,d){return d?u?u+" "+d:u+d:u}n.exports?(r.default=r,n.exports=r):window.classNames=r})()}(rd)),rd.exports}var Z_=X_();const Dd=Su(Z_);var Zy={};const P_="react-tooltip-core-styles",J_="react-tooltip-base-styles",Py={core:!1,base:!1};function Jy({css:n,id:l=J_,type:r="base",ref:i}){var o,u;if(!n||typeof document>"u"||Py[r]||r==="core"&&typeof process<"u"&&(!((o=process==null?void 0:Zy)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="base"&&typeof process<"u"&&(!((u=process==null?void 0:Zy)===null||u===void 0)&&u.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(l=P_),i||(i={});const{insertAt:d}=i;if(document.getElementById(l))return;const m=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.id=l,y.type="text/css",d==="top"&&m.firstChild?m.insertBefore(y,m.firstChild):m.appendChild(y),y.styleSheet?y.styleSheet.cssText=n:y.appendChild(document.createTextNode(n)),Py[r]=!0}const Iy=async({elementReference:n=null,tooltipReference:l=null,tooltipArrowReference:r=null,place:i="top",offset:o=10,strategy:u="absolute",middlewares:d=[V_(Number(o)),F_({fallbackAxisSideDirection:"start"}),K_({padding:5})],border:m,arrowSize:y=8})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};if(l===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};const p=d;return r?(p.push(G_({element:r,padding:5})),Gy(n,l,{placement:i,strategy:u,middleware:p}).then(({x:g,y:b,placement:E,middlewareData:C})=>{var w,O;const N={left:`${g}px`,top:`${b}px`,border:m},{x:_,y:A}=(w=C.arrow)!==null&&w!==void 0?w:{x:0,y:0},j=(O={top:"bottom",right:"left",bottom:"top",left:"right"}[E.split("-")[0]])!==null&&O!==void 0?O:"bottom",B=m&&{borderBottom:m,borderRight:m};let V=0;if(m){const Q=`${m}`.match(/(\d+)px/);V=Q!=null&&Q[1]?Number(Q[1]):1}return{tooltipStyles:N,tooltipArrowStyles:{left:_!=null?`${_}px`:"",top:A!=null?`${A}px`:"",right:"",bottom:"",...B,[j]:`-${y/2+V}px`},place:E}})):Gy(n,l,{placement:"bottom",strategy:u,middleware:p}).then(({x:g,y:b,placement:E})=>({tooltipStyles:{left:`${g}px`,top:`${b}px`},tooltipArrowStyles:{},place:E}))},Wy=(n,l)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,l),ev=(n,l,r)=>{let i=null;const o=function(...u){const d=()=>{i=null};!i&&(n.apply(this,u),i=setTimeout(d,l))};return o.cancel=()=>{i&&(clearTimeout(i),i=null)},o},tv=n=>n!==null&&!Array.isArray(n)&&typeof n=="object",Md=(n,l)=>{if(n===l)return!0;if(Array.isArray(n)&&Array.isArray(l))return n.length===l.length&&n.every((o,u)=>Md(o,l[u]));if(Array.isArray(n)!==Array.isArray(l))return!1;if(!tv(n)||!tv(l))return n===l;const r=Object.keys(n),i=Object.keys(l);return r.length===i.length&&r.every(o=>Md(n[o],l[o]))},I_=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const l=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(r=>{const i=l.getPropertyValue(r);return i==="auto"||i==="scroll"})},nv=n=>{if(!n)return null;let l=n.parentElement;for(;l;){if(I_(l))return l;l=l.parentElement}return document.scrollingElement||document.documentElement},W_=typeof window<"u"?x.useLayoutEffect:x.useEffect,On=n=>{n.current&&(clearTimeout(n.current),n.current=null)},e6="DEFAULT_TOOLTIP_ID",t6={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},n6=x.createContext({getTooltipData:()=>t6});function V1(n=e6){return x.useContext(n6).getTooltipData(n)}var Bi={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},od={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const a6=({forwardRef:n,id:l,className:r,classNameArrow:i,variant:o="dark",anchorId:u,anchorSelect:d,place:m="top",offset:y=10,events:p=["hover"],openOnClick:g=!1,positionStrategy:b="absolute",middlewares:E,wrapper:C,delayShow:w=0,delayHide:O=0,float:N=!1,hidden:_=!1,noArrow:A=!1,clickable:j=!1,closeOnEsc:B=!1,closeOnScroll:V=!1,closeOnResize:Q=!1,openEvents:G,closeEvents:Z,globalCloseEvents:te,imperativeModeOnly:pe,style:Re,position:be,afterShow:Ue,afterHide:ye,disableTooltip:Se,content:k,contentWrapperRef:X,isOpen:J,defaultIsOpen:ue=!1,setIsOpen:R,activeAnchor:$,setActiveAnchor:W,border:I,opacity:se,arrowColor:Ce,arrowSize:ce=8,role:St="tooltip"})=>{var qe;const Ze=x.useRef(null),Qn=x.useRef(null),jt=x.useRef(null),mn=x.useRef(null),ua=x.useRef(null),[pn,ss]=x.useState({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[kt,Bt]=x.useState(!1),[ca,$n]=x.useState(!1),[Ge,Yn]=x.useState(null),xl=x.useRef(!1),Ua=x.useRef(null),{anchorRefs:Sl,setActiveAnchor:Wl}=V1(l),yn=x.useRef(!1),[tt,Vt]=x.useState([]),it=x.useRef(!1),qa=g||p.includes("click"),rs=qa||(G==null?void 0:G.click)||(G==null?void 0:G.dblclick)||(G==null?void 0:G.mousedown),za=G?{...G}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!G&&qa&&Object.assign(za,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const vn=Z?{...Z}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!Z&&qa&&Object.assign(vn,{mouseleave:!1,blur:!1,mouseout:!1});const At=te?{...te}:{escape:B||!1,scroll:V||!1,resize:Q||!1,clickOutsideAnchor:rs||!1};pe&&(Object.assign(za,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(vn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(At,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),W_(()=>(it.current=!0,()=>{it.current=!1}),[]);const He=P=>{it.current&&(P&&$n(!0),setTimeout(()=>{it.current&&(R==null||R(P),J===void 0&&Bt(P))},10))};x.useEffect(()=>{if(J===void 0)return()=>null;J&&$n(!0);const P=setTimeout(()=>{Bt(J)},10);return()=>{clearTimeout(P)}},[J]),x.useEffect(()=>{if(kt!==xl.current)if(On(ua),xl.current=kt,kt)Ue==null||Ue();else{const P=(ne=>{const de=ne.match(/^([\d.]+)(ms|s)$/);if(!de)return 0;const[,Ie,vt]=de;return Number(Ie)*(vt==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));ua.current=setTimeout(()=>{$n(!1),Yn(null),ye==null||ye()},P+25)}},[kt]);const fa=P=>{ss(ne=>Md(ne,P)?ne:P)},Mn=(P=w)=>{On(jt),ca?He(!0):jt.current=setTimeout(()=>{He(!0)},P)},ka=(P=O)=>{On(mn),mn.current=setTimeout(()=>{yn.current||He(!1)},P)},Ba=P=>{var ne;if(!P)return;const de=(ne=P.currentTarget)!==null&&ne!==void 0?ne:P.target;if(!(de!=null&&de.isConnected))return W(null),void Wl({current:null});w?Mn():He(!0),W(de),Wl({current:de}),On(mn)},da=()=>{j?ka(O||100):O?ka():He(!1),On(jt)},Vn=({x:P,y:ne})=>{var de;const Ie={getBoundingClientRect:()=>({x:P,y:ne,width:0,height:0,top:ne,left:P,right:P,bottom:ne})};Iy({place:(de=Ge==null?void 0:Ge.place)!==null&&de!==void 0?de:m,offset:y,elementReference:Ie,tooltipReference:Ze.current,tooltipArrowReference:Qn.current,strategy:b,middlewares:E,border:I,arrowSize:ce}).then(vt=>{fa(vt)})},gn=P=>{if(!P)return;const ne=P,de={x:ne.clientX,y:ne.clientY};Vn(de),Ua.current=de},wl=P=>{var ne;if(!kt)return;const de=P.target;de.isConnected&&(!((ne=Ze.current)===null||ne===void 0)&&ne.contains(de)||[document.querySelector(`[id='${u}']`),...tt].some(Ie=>Ie==null?void 0:Ie.contains(de))||(He(!1),On(jt)))},El=ev(Ba,50),st=ev(da,50),Tt=P=>{st.cancel(),El(P)},oe=()=>{El.cancel(),st()},_e=x.useCallback(()=>{var P,ne;const de=(P=Ge==null?void 0:Ge.position)!==null&&P!==void 0?P:be;de?Vn(de):N?Ua.current&&Vn(Ua.current):$!=null&&$.isConnected&&Iy({place:(ne=Ge==null?void 0:Ge.place)!==null&&ne!==void 0?ne:m,offset:y,elementReference:$,tooltipReference:Ze.current,tooltipArrowReference:Qn.current,strategy:b,middlewares:E,border:I,arrowSize:ce}).then(Ie=>{it.current&&fa(Ie)})},[kt,$,k,Re,m,Ge==null?void 0:Ge.place,y,b,be,Ge==null?void 0:Ge.position,N,ce]);x.useEffect(()=>{var P,ne;const de=new Set(Sl);tt.forEach(Me=>{Se!=null&&Se(Me)||de.add({current:Me})});const Ie=document.querySelector(`[id='${u}']`);Ie&&!(Se!=null&&Se(Ie))&&de.add({current:Ie});const vt=()=>{He(!1)},bn=nv($),tn=nv(Ze.current);At.scroll&&(window.addEventListener("scroll",vt),bn==null||bn.addEventListener("scroll",vt),tn==null||tn.addEventListener("scroll",vt));let rt=null;At.resize?window.addEventListener("resize",vt):$&&Ze.current&&(rt=Y_($,Ze.current,_e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Rt=Me=>{Me.key==="Escape"&&He(!1)};At.escape&&window.addEventListener("keydown",Rt),At.clickOutsideAnchor&&window.addEventListener("click",wl);const De=[],nn=Me=>!!(Me!=null&&Me.target&&($!=null&&$.contains(Me.target))),Cl=Me=>{kt&&nn(Me)||Ba(Me)},Ha=Me=>{kt&&nn(Me)&&da()},ot=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],os=["click","dblclick","mousedown","mouseup"];Object.entries(za).forEach(([Me,xn])=>{xn&&(ot.includes(Me)?De.push({event:Me,listener:Tt}):os.includes(Me)&&De.push({event:Me,listener:Cl}))}),Object.entries(vn).forEach(([Me,xn])=>{xn&&(ot.includes(Me)?De.push({event:Me,listener:oe}):os.includes(Me)&&De.push({event:Me,listener:Ha}))}),N&&De.push({event:"pointermove",listener:gn});const us=()=>{yn.current=!0},Kn=()=>{yn.current=!1,da()},ha=j&&(vn.mouseout||vn.mouseleave);return ha&&((P=Ze.current)===null||P===void 0||P.addEventListener("mouseover",us),(ne=Ze.current)===null||ne===void 0||ne.addEventListener("mouseout",Kn)),De.forEach(({event:Me,listener:xn})=>{de.forEach(ei=>{var _l;(_l=ei.current)===null||_l===void 0||_l.addEventListener(Me,xn)})}),()=>{var Me,xn;At.scroll&&(window.removeEventListener("scroll",vt),bn==null||bn.removeEventListener("scroll",vt),tn==null||tn.removeEventListener("scroll",vt)),At.resize?window.removeEventListener("resize",vt):rt==null||rt(),At.clickOutsideAnchor&&window.removeEventListener("click",wl),At.escape&&window.removeEventListener("keydown",Rt),ha&&((Me=Ze.current)===null||Me===void 0||Me.removeEventListener("mouseover",us),(xn=Ze.current)===null||xn===void 0||xn.removeEventListener("mouseout",Kn)),De.forEach(({event:ei,listener:_l})=>{de.forEach(ti=>{var Qa;(Qa=ti.current)===null||Qa===void 0||Qa.removeEventListener(ei,_l)})})}},[$,_e,ca,Sl,tt,G,Z,te,qa,w,O]),x.useEffect(()=>{var P,ne;let de=(ne=(P=Ge==null?void 0:Ge.anchorSelect)!==null&&P!==void 0?P:d)!==null&&ne!==void 0?ne:"";!de&&l&&(de=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const Ie=new MutationObserver(vt=>{const bn=[],tn=[];vt.forEach(rt=>{if(rt.type==="attributes"&&rt.attributeName==="data-tooltip-id"&&(rt.target.getAttribute("data-tooltip-id")===l?bn.push(rt.target):rt.oldValue===l&&tn.push(rt.target)),rt.type==="childList"){if($){const Rt=[...rt.removedNodes].filter(De=>De.nodeType===1);if(de)try{tn.push(...Rt.filter(De=>De.matches(de))),tn.push(...Rt.flatMap(De=>[...De.querySelectorAll(de)]))}catch{}Rt.some(De=>{var nn;return!!(!((nn=De==null?void 0:De.contains)===null||nn===void 0)&&nn.call(De,$))&&($n(!1),He(!1),W(null),On(jt),On(mn),!0)})}if(de)try{const Rt=[...rt.addedNodes].filter(De=>De.nodeType===1);bn.push(...Rt.filter(De=>De.matches(de))),bn.push(...Rt.flatMap(De=>[...De.querySelectorAll(de)]))}catch{}}}),(bn.length||tn.length)&&Vt(rt=>[...rt.filter(Rt=>!tn.includes(Rt)),...bn])});return Ie.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{Ie.disconnect()}},[l,d,Ge==null?void 0:Ge.anchorSelect,$]),x.useEffect(()=>{_e()},[_e]),x.useEffect(()=>{if(!(X!=null&&X.current))return()=>null;const P=new ResizeObserver(()=>{setTimeout(()=>_e())});return P.observe(X.current),()=>{P.disconnect()}},[k,X==null?void 0:X.current]),x.useEffect(()=>{var P;const ne=document.querySelector(`[id='${u}']`),de=[...tt,ne];$&&de.includes($)||W((P=tt[0])!==null&&P!==void 0?P:ne)},[u,tt,$]),x.useEffect(()=>(ue&&He(!0),()=>{On(jt),On(mn)}),[]),x.useEffect(()=>{var P;let ne=(P=Ge==null?void 0:Ge.anchorSelect)!==null&&P!==void 0?P:d;if(!ne&&l&&(ne=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),ne)try{const de=Array.from(document.querySelectorAll(ne));Vt(de)}catch{Vt([])}},[l,d,Ge==null?void 0:Ge.anchorSelect]),x.useEffect(()=>{jt.current&&(On(jt),Mn(w))},[w]);const Ht=(qe=Ge==null?void 0:Ge.content)!==null&&qe!==void 0?qe:k,Ot=kt&&Object.keys(pn.tooltipStyles).length>0;return x.useImperativeHandle(n,()=>({open:P=>{if(P!=null&&P.anchorSelect)try{document.querySelector(P.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${P.anchorSelect}" is not a valid CSS selector`)}Yn(P??null),P!=null&&P.delay?Mn(P.delay):He(!0)},close:P=>{P!=null&&P.delay?ka(P.delay):He(!1)},activeAnchor:$,place:pn.place,isOpen:!!(ca&&!_&&Ht&&Ot)})),ca&&!_&&Ht?Ke.createElement(C,{id:l,role:St,className:Dd("react-tooltip",Bi.tooltip,od.tooltip,od[o],r,`react-tooltip__place-${pn.place}`,Bi[Ot?"show":"closing"],Ot?"react-tooltip__show":"react-tooltip__closing",b==="fixed"&&Bi.fixed,j&&Bi.clickable),onTransitionEnd:P=>{On(ua),kt||P.propertyName!=="opacity"||($n(!1),Yn(null),ye==null||ye())},style:{...Re,...pn.tooltipStyles,opacity:se!==void 0&&Ot?se:void 0},ref:Ze},Ht,Ke.createElement(C,{className:Dd("react-tooltip-arrow",Bi.arrow,od.arrow,i,A&&Bi.noArrow),style:{...pn.tooltipArrowStyles,background:Ce?`linear-gradient(to right bottom, transparent 50%, ${Ce} 50%)`:void 0,"--rt-arrow-size":`${ce}px`},ref:Qn})):null},l6=({content:n})=>Ke.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),hh=Ke.forwardRef(({id:n,anchorId:l,anchorSelect:r,content:i,html:o,render:u,className:d,classNameArrow:m,variant:y="dark",place:p="top",offset:g=10,wrapper:b="div",children:E=null,events:C=["hover"],openOnClick:w=!1,positionStrategy:O="absolute",middlewares:N,delayShow:_=0,delayHide:A=0,float:j=!1,hidden:B=!1,noArrow:V=!1,clickable:Q=!1,closeOnEsc:G=!1,closeOnScroll:Z=!1,closeOnResize:te=!1,openEvents:pe,closeEvents:Re,globalCloseEvents:be,imperativeModeOnly:Ue=!1,style:ye,position:Se,isOpen:k,defaultIsOpen:X=!1,disableStyleInjection:J=!1,border:ue,opacity:R,arrowColor:$,arrowSize:W,setIsOpen:I,afterShow:se,afterHide:Ce,disableTooltip:ce,role:St="tooltip"},qe)=>{const[Ze,Qn]=x.useState(i),[jt,mn]=x.useState(o),[ua,pn]=x.useState(p),[ss,kt]=x.useState(y),[Bt,ca]=x.useState(g),[$n,Ge]=x.useState(_),[Yn,xl]=x.useState(A),[Ua,Sl]=x.useState(j),[Wl,yn]=x.useState(B),[tt,Vt]=x.useState(b),[it,qa]=x.useState(C),[rs,za]=x.useState(O),[vn,At]=x.useState(null),[He,fa]=x.useState(null),Mn=x.useRef(J),{anchorRefs:ka,activeAnchor:Ba}=V1(n),da=st=>st==null?void 0:st.getAttributeNames().reduce((Tt,oe)=>{var _e;return oe.startsWith("data-tooltip-")&&(Tt[oe.replace(/^data-tooltip-/,"")]=(_e=st==null?void 0:st.getAttribute(oe))!==null&&_e!==void 0?_e:null),Tt},{}),Vn=st=>{const Tt={place:oe=>{var _e;pn((_e=oe)!==null&&_e!==void 0?_e:p)},content:oe=>{Qn(oe??i)},html:oe=>{mn(oe??o)},variant:oe=>{var _e;kt((_e=oe)!==null&&_e!==void 0?_e:y)},offset:oe=>{ca(oe===null?g:Number(oe))},wrapper:oe=>{var _e;Vt((_e=oe)!==null&&_e!==void 0?_e:b)},events:oe=>{const _e=oe==null?void 0:oe.split(" ");qa(_e??C)},"position-strategy":oe=>{var _e;za((_e=oe)!==null&&_e!==void 0?_e:O)},"delay-show":oe=>{Ge(oe===null?_:Number(oe))},"delay-hide":oe=>{xl(oe===null?A:Number(oe))},float:oe=>{Sl(oe===null?j:oe==="true")},hidden:oe=>{yn(oe===null?B:oe==="true")},"class-name":oe=>{At(oe)}};Object.values(Tt).forEach(oe=>oe(null)),Object.entries(st).forEach(([oe,_e])=>{var Ht;(Ht=Tt[oe])===null||Ht===void 0||Ht.call(Tt,_e)})};x.useEffect(()=>{Qn(i)},[i]),x.useEffect(()=>{mn(o)},[o]),x.useEffect(()=>{pn(p)},[p]),x.useEffect(()=>{kt(y)},[y]),x.useEffect(()=>{ca(g)},[g]),x.useEffect(()=>{Ge(_)},[_]),x.useEffect(()=>{xl(A)},[A]),x.useEffect(()=>{Sl(j)},[j]),x.useEffect(()=>{yn(B)},[B]),x.useEffect(()=>{za(O)},[O]),x.useEffect(()=>{Mn.current!==J&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[J]),x.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:J==="core",disableBase:J}}))},[]),x.useEffect(()=>{var st;const Tt=new Set(ka);let oe=r;if(!oe&&n&&(oe=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),oe)try{document.querySelectorAll(oe).forEach(ne=>{Tt.add({current:ne})})}catch{console.warn(`[react-tooltip] "${oe}" is not a valid CSS selector`)}const _e=document.querySelector(`[id='${l}']`);if(_e&&Tt.add({current:_e}),!Tt.size)return()=>null;const Ht=(st=He??_e)!==null&&st!==void 0?st:Ba.current,Ot=new MutationObserver(ne=>{ne.forEach(de=>{var Ie;if(!Ht||de.type!=="attributes"||!(!((Ie=de.attributeName)===null||Ie===void 0)&&Ie.startsWith("data-tooltip-")))return;const vt=da(Ht);Vn(vt)})}),P={attributes:!0,childList:!1,subtree:!1};if(Ht){const ne=da(Ht);Vn(ne),Ot.observe(Ht,P)}return()=>{Ot.disconnect()}},[ka,Ba,He,l,r]),x.useEffect(()=>{ye!=null&&ye.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),ue&&!Wy("border",`${ue}`)&&console.warn(`[react-tooltip] "${ue}" is not a valid \`border\`.`),ye!=null&&ye.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),R&&!Wy("opacity",`${R}`)&&console.warn(`[react-tooltip] "${R}" is not a valid \`opacity\`.`)},[]);let gn=E;const wl=x.useRef(null);if(u){const st=u({content:(He==null?void 0:He.getAttribute("data-tooltip-content"))||Ze||null,activeAnchor:He});gn=st?Ke.createElement("div",{ref:wl,className:"react-tooltip-content-wrapper"},st):null}else Ze&&(gn=Ze);jt&&(gn=Ke.createElement(l6,{content:jt}));const El={forwardRef:qe,id:n,anchorId:l,anchorSelect:r,className:Dd(d,vn),classNameArrow:m,content:gn,contentWrapperRef:wl,place:ua,variant:ss,offset:Bt,wrapper:tt,events:it,openOnClick:w,positionStrategy:rs,middlewares:N,delayShow:$n,delayHide:Yn,float:Ua,hidden:Wl,noArrow:V,clickable:Q,closeOnEsc:G,closeOnScroll:Z,closeOnResize:te,openEvents:pe,closeEvents:Re,globalCloseEvents:be,imperativeModeOnly:Ue,style:ye,position:Se,isOpen:k,defaultIsOpen:X,border:ue,opacity:R,arrowColor:$,arrowSize:W,setIsOpen:I,afterShow:se,afterHide:Ce,disableTooltip:ce,activeAnchor:He,setActiveAnchor:st=>fa(st),role:St};return Ke.createElement(a6,{...El})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||Jy({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),n.detail.disableBase||Jy({css:`
237
- .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const i6=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{d:"M320 146s24.36-12-64-12a160 160 0 10160 160",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32}),x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 58l80 80-80 80"})),s6=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("rect",{x:128,y:128,width:336,height:336,rx:57,ry:57,fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:32}),x.createElement("path",{d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24M296 216v160M376 296H216",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),r6=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("circle",{cx:128,cy:256,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),x.createElement("circle",{cx:384,cy:112,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),x.createElement("circle",{cx:384,cy:400,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M169.83 279.53l172.34 96.94M342.17 135.53l-172.34 96.94"})),K1=["shift","alt","meta","mod","ctrl","control"],o6={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function ml(n){return(o6[n.trim()]||n.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function F1(n){return K1.includes(n)}function ud(n,l=","){return n.toLowerCase().split(l)}function cd(n,l="+",r=">",i=!1,o){let u=[],d=!1;n=n.trim(),n.includes(r)?(d=!0,u=n.toLocaleLowerCase().split(r).map(p=>ml(p))):u=n.toLocaleLowerCase().split(l).map(p=>ml(p));const m={alt:u.includes("alt"),ctrl:u.includes("ctrl")||u.includes("control"),shift:u.includes("shift"),meta:u.includes("meta"),mod:u.includes("mod"),useKey:i},y=u.filter(p=>!K1.includes(p));return{...m,keys:y,description:o,isSequence:d,hotkey:n}}typeof document<"u"&&(document.addEventListener("keydown",n=>{n.code!==void 0&&G1([ml(n.code)])}),document.addEventListener("keyup",n=>{n.code!==void 0&&X1([ml(n.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Ra.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Ra.clear()},0)}));const Ra=new Set;function mh(n){return Array.isArray(n)}function u6(n,l=","){return(mh(n)?n:n.split(l)).every(r=>Ra.has(r.trim().toLowerCase()))}function G1(n){const l=Array.isArray(n)?n:[n];Ra.has("meta")&&Ra.forEach(r=>!F1(r)&&Ra.delete(r.toLowerCase())),l.forEach(r=>Ra.add(r.toLowerCase()))}function X1(n){const l=Array.isArray(n)?n:[n];n==="meta"?Ra.clear():l.forEach(r=>Ra.delete(r.toLowerCase()))}function c6(n,l,r){(typeof r=="function"&&r(n,l)||r===!0)&&n.preventDefault()}function f6(n,l,r){return typeof r=="function"?r(n,l):r===!0||r===void 0}const d6=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function h6(n){return Z1(n,d6)}function Z1(n,l=!1){const{target:r,composed:i}=n;let o,u;return m6(r)&&i?(o=n.composedPath()[0]&&n.composedPath()[0].tagName,u=n.composedPath()[0]&&n.composedPath()[0].role):(o=r&&r.tagName,u=r&&r.role),mh(l)?!!(o&&l&&l.some(d=>d.toLowerCase()===o.toLowerCase()||d===u)):!!(o&&l&&l)}function m6(n){return!!n.tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")}function p6(n,l){return n.length===0&&l?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):l?n.some(r=>l.includes(r))||n.includes("*"):!0}const y6=(n,l,r=!1)=>{const{alt:i,meta:o,mod:u,shift:d,ctrl:m,keys:y,useKey:p}=l,{code:g,key:b,ctrlKey:E,metaKey:C,shiftKey:w,altKey:O}=n,N=ml(g);if(p&&(y==null?void 0:y.length)===1&&y.includes(b))return!0;if(!(y!=null&&y.includes(N))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!r){if(i!==O&&N!=="alt"||d!==w&&N!=="shift")return!1;if(u){if(!C&&!E)return!1}else if(o!==C&&N!=="meta"&&N!=="os"||m!==E&&N!=="ctrl"&&N!=="control")return!1}return y&&y.length===1&&y.includes(N)?!0:y?u6(y):!y},v6=x.createContext(void 0),g6=()=>x.useContext(v6);function P1(n,l){return n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(n).length===Object.keys(l).length&&Object.keys(n).reduce((r,i)=>r&&P1(n[i],l[i]),!0):n===l}const b6=x.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),x6=()=>x.useContext(b6);function S6(n){const l=x.useRef(void 0);return P1(l.current,n)||(l.current=n),l.current}const av=n=>{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()},w6=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Wt(n,l,r,i){const o=x.useRef(null),u=x.useRef(!1),d=Array.isArray(r)?Array.isArray(i)?void 0:i:r,m=mh(n)?n.join(d==null?void 0:d.delimiter):n,y=Array.isArray(r)?r:Array.isArray(i)?i:void 0,p=x.useCallback(l,y??[]),g=x.useRef(p);y?g.current=p:g.current=l;const b=S6(d),{activeScopes:E}=x6(),C=g6();return w6(()=>{if((b==null?void 0:b.enabled)===!1||!p6(E,b==null?void 0:b.scopes))return;let w=[],O;const N=(B,V=!1)=>{var Q;if(!(h6(B)&&!Z1(B,b==null?void 0:b.enableOnFormTags))){if(o.current!==null){const G=o.current.getRootNode();if((G instanceof Document||G instanceof ShadowRoot)&&G.activeElement!==o.current&&!o.current.contains(G.activeElement)){av(B);return}}(Q=B.target)!=null&&Q.isContentEditable&&!(b!=null&&b.enableOnContentEditable)||ud(m,b==null?void 0:b.delimiter).forEach(G=>{var te,pe,Re,be;if(G.includes((b==null?void 0:b.splitKey)??"+")&&G.includes((b==null?void 0:b.sequenceSplitKey)??">")){console.warn(`Hotkey ${G} contains both ${(b==null?void 0:b.splitKey)??"+"} and ${(b==null?void 0:b.sequenceSplitKey)??">"} which is not supported.`);return}const Z=cd(G,b==null?void 0:b.splitKey,b==null?void 0:b.sequenceSplitKey,b==null?void 0:b.useKey,b==null?void 0:b.description);if(Z.isSequence){O=setTimeout(()=>{w=[]},(b==null?void 0:b.sequenceTimeoutMs)??1e3);const Ue=Z.useKey?B.key:ml(B.code);if(F1(Ue.toLowerCase()))return;w.push(Ue);const ye=(te=Z.keys)==null?void 0:te[w.length-1];if(Ue!==ye){w=[],O&&clearTimeout(O);return}w.length===((pe=Z.keys)==null?void 0:pe.length)&&(g.current(B,Z),O&&clearTimeout(O),w=[])}else if(y6(B,Z,b==null?void 0:b.ignoreModifiers)||(Re=Z.keys)!=null&&Re.includes("*")){if((be=b==null?void 0:b.ignoreEventWhen)!=null&&be.call(b,B)||V&&u.current)return;if(c6(B,Z,b==null?void 0:b.preventDefault),!f6(B,Z,b==null?void 0:b.enabled)){av(B);return}g.current(B,Z),V||(u.current=!0)}})}},_=B=>{B.code!==void 0&&(G1(ml(B.code)),((b==null?void 0:b.keydown)===void 0&&(b==null?void 0:b.keyup)!==!0||b!=null&&b.keydown)&&N(B))},A=B=>{B.code!==void 0&&(X1(ml(B.code)),u.current=!1,b!=null&&b.keyup&&N(B,!0))},j=o.current||(d==null?void 0:d.document)||document;return j.addEventListener("keyup",A,d==null?void 0:d.eventListenerOptions),j.addEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&ud(m,b==null?void 0:b.delimiter).forEach(B=>C.addHotkey(cd(B,b==null?void 0:b.splitKey,b==null?void 0:b.sequenceSplitKey,b==null?void 0:b.useKey,b==null?void 0:b.description))),()=>{j.removeEventListener("keyup",A,d==null?void 0:d.eventListenerOptions),j.removeEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&ud(m,b==null?void 0:b.delimiter).forEach(B=>C.removeHotkey(cd(B,b==null?void 0:b.splitKey,b==null?void 0:b.sequenceSplitKey,b==null?void 0:b.useKey,b==null?void 0:b.description))),w=[],O&&clearTimeout(O)}},[m,b,E]),o}function E6(){return h.jsxs("div",{className:"flex items-center bg-white border-b border-gray-200 overflow-auto no-scrollbar",children:[h.jsx(C6,{}),h.jsx(N6,{})]})}function C6(){const{dataSourceId:n,name:l}=x.useContext(sa),{data:r}=_r(n),{data:i}=x.useContext(ra),o=jr(Zt.EDITOR),u=c_(),{rename:d}=D1(),m=()=>{var g,b;(g=i==null?void 0:i.result.columns)!=null&&g[0].table&&Wd({table:(b=i==null?void 0:i.result.columns)==null?void 0:b[0].table,dataSourceId:n})},y=async()=>{const g=await Or("Query name",l);!g||!(i!=null&&i.result.queryHistoryId)||u.mutate({name:g,queryId:i.result.queryHistoryId})},p=()=>d(l);return Wt("s",y),Wt("r",p),h.jsxs("div",{className:ie.tableConfig,children:[h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Rename tab",onClick:p,className:ae(ie.tableAction,ie.blue,"block"),children:h.jsxs("span",{className:ie.tabName,children:["🛠️ ",l]})}),h.jsxs("button",{"data-tooltip-id":"explorer-more-actions",className:ae(ie.tableAction,ie.blue),children:[h.jsx("span",{className:"whitespace-nowrap",children:"Options"}),h.jsx(Ki,{width:16,height:16,className:"rotate-90"})]}),h.jsxs(hh,{id:"explorer-more-actions",className:"z-10 shadow-md flex flex-col",clickable:!0,variant:"light",opacity:1,children:[h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Manage filters",onClick:()=>Ut("filters"),className:ae(ie.tableAction,ie.modal,ie.blue),children:[h.jsx("span",{children:"Filters"}),h.jsx("span",{className:"hotkey",children:"F"})]}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Join tables",onClick:()=>Ut("joins"),className:ae(ie.tableAction,ie.modal,ie.blue),children:[h.jsx("span",{children:"Joins"}),h.jsx("span",{className:"hotkey",children:"J"})]}),h.jsxs("button",{onClick:()=>Ut("columns"),className:ae(ie.tableAction,ie.modal,ie.blue,"justify-between"),children:[h.jsx("span",{children:"Columns"}),h.jsx("span",{className:"hotkey",children:"C"})]}),h.jsxs("button",{onClick:()=>Ut("groupBy"),className:ae(ie.tableAction,ie.modal,ie.blue,"justify-between"),children:[h.jsx("span",{children:"Group by"}),h.jsx("span",{className:"hotkey",children:"G"})]}),h.jsxs("button",{onClick:()=>Ut("aggregate"),className:ae(ie.tableAction,ie.modal,ie.blue,"justify-between"),children:[h.jsx("span",{children:"Aggregate"}),h.jsx("span",{className:"hotkey",children:"A"})]}),o&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-0.5 my-2 bg-gray-100"}),h.jsxs("button",{onClick:y,className:ae(ie.tableAction,ie.modal,ie.blue),children:[h.jsx("span",{children:"Save query"}),h.jsx("span",{className:"hotkey",children:"S"})]}),(r==null?void 0:r.allowInsert)===!0&&h.jsx("button",{onClick:m,className:ae(ie.tableAction,ie.modal,ie.blue),children:"Insert new row"})]})]})]})}const _6=[5,10,20,50,100,200];function N6(){const{page:n,size:l,setPage:r,setSize:i}=u_(),{data:o,refetch:u,isFetching:d}=x.useContext(ra),{name:m}=x.useContext(sa),{state:y}=x.useContext(dt),p=ls(),g=zt(),b=()=>{p.mutateAsync({name:m,opts:y}).then(A=>{g(`${Fe.workbench.path}/tab/${A.id}`)})},E=()=>{if(o!=null&&o.result.queryHistoryId){const A=new URL(window.location.href);A.pathname=Fe.share.path,A.searchParams.set("shareId",o.result.queryHistoryId),navigator.clipboard.writeText(A.toString()),It.success("Share link copied to clipboard")}};Wt("d",b);const C=n*l,w=!d&&!!(o!=null&&o.result.hasMore),O=(o==null?void 0:o.result.rows.length)||0,N=()=>{n>0&&r(n-1)},_=()=>{w&&r(n+1)};return h.jsxs("div",{className:ie.tableConfig,children:[h.jsxs("span",{className:ie.paginationIndicator,"data-tooltip-id":"rows-num",children:[l," rows"]}),h.jsx("span",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:N,role:"button",children:h.jsx(Ki,{width:16,height:16,className:"rotate-180"})}),h.jsxs("span",{className:ie.paginationIndicator,children:[C+1," - ",C+O,w&&"+"]}),h.jsx("span",{"data-tooltip-content":"Next page","data-tooltip-id":"default",className:ae(ie.tableAction,w?ie.blue:"opacity-30"),onClick:_,role:"button",children:h.jsx(Ki,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Refresh data","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:()=>u(),role:"button",children:h.jsx(i6,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Share query","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:E,role:"button",children:h.jsx(r6,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Duplicate tab","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:b,role:"button",children:h.jsx(s6,{width:16,height:16})}),h.jsx(hh,{id:"rows-num",className:"z-10 shadow-md flex",clickable:!0,variant:"light",opacity:1,children:_6.map(A=>h.jsx("button",{onClick:()=>i(A,!0),className:ae(ie.tableAction,ie.blue),children:h.jsx("span",{children:A})},A))})]})}const j6="_drop-container_1e7l0_2",A6="_item_1e7l0_2",lv={dropContainer:j6,item:A6},Ld=({dataSourceId:n,focusId:l,placeholder:r="Column",onChange:i,value:o,autoFocus:u,allowTables:d})=>{const{data:m}=ns(n),y=x.useRef(null),p=x.useMemo(()=>{if(!m)return[];let _=m;return d&&(_=m.filter(A=>d.includes(A.tableName))),_.flatMap(A=>A.columns.map(j=>({value:A.tableName+"."+j.name,label:j.name,table:A.tableName,searchValue:j.name.toLowerCase()})))},[m,d]),g=x.useMemo(()=>{const _=o.toLowerCase()||"",A=[];for(let j=0;j<p.length&&A.length<10;j++)p[j].searchValue.includes(_)&&A.push(p[j]);return A},[p,o]),[b,E]=x.useState(!1),[C,w]=x.useState(0),O=_=>{var A;if(_.key==="ArrowDown")_.preventDefault(),w(j=>(j+1)%g.length);else if(_.key==="ArrowUp")_.preventDefault(),w(j=>(j-1+g.length)%g.length);else if(_.key==="Enter"&&C>=0&&C<g.length){_.preventDefault();const j=g[C].value;E(!1);const B=p.findIndex(V=>V.value===j)>-1;i(((A=g[C])==null?void 0:A.value)||j,B,!0)}};x.useEffect(()=>{var A;const _=(A=y.current)==null?void 0:A.querySelector('[data-is-active="true"]');_&&_.scrollIntoView({behavior:"smooth",block:"nearest"})},[C]);const N=_=>{const A=_.currentTarget.value,j=p.findIndex(B=>B.value===A)>-1;i(A,j,!1)};return h.jsxs("div",{className:"relative",onFocus:()=>E(!0),onBlur:()=>E(!1),children:[h.jsx("input",{autoFocus:u,onKeyDown:O,value:o,onChange:N,className:"input w-full",placeholder:r,"data-focus":l}),b&&g.length>0&&h.jsx("div",{className:lv.dropContainer,ref:y,tabIndex:-1,children:g.map((_,A)=>h.jsxs("div",{className:lv.item,"data-is-active":C===A,onMouseDownCapture:j=>{j.preventDefault(),E(!1),i(_.value,!0,!0)},children:[h.jsx("span",{className:"text-xs font-semibold truncate",children:_.table}),h.jsx("p",{className:"truncate text-sm",children:_.label})]},A))})]})},T6="_drop-container_vmrl7_2",O6="_item_vmrl7_2",iv={dropContainer:T6,item:O6};function R6(n){return v4.includes(n)?m4:g4.includes(n)?h4:b4.includes(n)?p4:Xd}const D6=({value:n,onChange:l,autoFocus:r,focusId:i,colType:o})=>{const u=x.useMemo(()=>{const E=n.toLowerCase()||"";return R6(o||"").filter(C=>C.label.includes(E))},[n,o]),d=x.useRef(null),[m,y]=x.useState(!1),[p,g]=x.useState(0),b=E=>{var C;E.key==="ArrowDown"?(E.preventDefault(),g(w=>(w+1)%u.length)):E.key==="ArrowUp"?(E.preventDefault(),g(w=>(w-1+u.length)%u.length)):E.key==="Enter"&&(p>=0&&p<u.length?(E.preventDefault(),y(!1),l(((C=u[p])==null?void 0:C.label)||"",!0)):l(n,!0))};return x.useEffect(()=>{var C;const E=(C=d.current)==null?void 0:C.querySelector('[data-is-active="true"]');E&&E.scrollIntoView({behavior:"smooth",block:"nearest"})},[p]),h.jsxs("div",{className:"relative",children:[h.jsx("input",{onKeyDown:b,value:n,onChange:E=>l(E.target.value,!1),className:"input w-full",placeholder:"Operator",autoFocus:r,onFocus:()=>y(!0),onBlur:()=>y(!1),"data-focus":i}),m&&u.length>0&&h.jsx("ul",{className:iv.dropContainer,ref:d,tabIndex:-1,children:u.map((E,C)=>h.jsx("li",{className:iv.item,"data-is-active":p===C,onMouseDownCapture:w=>{w.preventDefault(),y(!1),l(E.label,!0)},children:E.label},C))})]})},M6="_actions_13ccx_2",L6="_filter-actions_13ccx_2",J1={actions:M6,filterActions:L6},U6=["=","<",">",">=","<>","!=","<="];function q6(n){for(let l=0;l<n.length;l++){const r=n[l];if(!r.operator.length&&!r.value.length&&!r.column.length)continue;if(!r.column.includes("."))return It.error(`Filter #${l+1} has invalid column value`),!1;const i=Pd[r.operator];if(!i)return It.error(`Filter #${l+1} has invalid operator`),!1;if(r.isColumnRef&&!U6.includes(i))return It.error(`Filter #${l+1} cannot reference another column because it uses '${r.operator}' operator`),!1}return!0}function z6(n){const l=[];return n.forEach(r=>{if(!r.operator.length||!r.column.length||r.operator!=="is null"&&r.operator!=="is not null"&&!r.value.length)return;const i=Pd[r.operator];l.push({id:r.id,value:r.isColumnRef?[{value:r.value,isColumn:!0}]:y4(i,r.value),operator:i,column:r.column,isEnabled:r.isEnabled,connector:"AND"})}),l}function k6(n){let l="";if(n.value)for(let r=0;r<n.value.length;r++)l+=n.value[r].value,r<n.value.length-1&&(l+=", ");return l}const B6=({filter:n,dataSourceId:l,allowedTables:r,inspections:i,autoFocus:o,onChangeColumn:u,onChangeOperator:d,onChangeValue:m,onRemoveFilter:y,triggerIsEnabled:p,onIsColumnChange:g})=>{const b=x.useMemo(()=>{if(!i)return"";let E=null;for(const C of i)for(const w of C.columns)C.tableName+"."+w.name===n.column&&(E=w);return E!=null&&E.type?E.type:""},[n.column,i]);return h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsx("label",{children:h.jsx("input",{type:"checkbox",checked:n.isEnabled!==!1,onClick:()=>p(n.id)})}),h.jsx("label",{className:"w-full",children:h.jsx(Ld,{dataSourceId:l,onChange:E=>u(n.id,E),value:n.column,allowTables:r,focusId:"column",autoFocus:o})}),h.jsx("label",{children:h.jsx(D6,{onChange:E=>d(n.id,E),focusId:"operator",colType:b,value:n.operator})}),w1(Pd[n.operator])&&h.jsx("label",{className:"w-full",children:n.isColumnRef?h.jsx(Ld,{dataSourceId:l,onChange:E=>m(n.id,E),value:n.value,allowTables:r,focusId:"value",placeholder:"Search column"}):h.jsx("input",{className:"input w-full",placeholder:"Filter value",value:n.value,onChange:E=>m(n.id,E.currentTarget.value),"data-focus":"value"})}),h.jsxs("div",{className:J1.filterActions,children:[h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"If enabled, the value will reference another column instead of being raw string",className:ae("p-0.5 cursor-pointer rounded-lg border",n.isColumnRef?"bg-blue-50 border-blue-200":"bg-white border-white"),onClick:()=>g(n.id,!n.isColumnRef),children:"🏷️"}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove filter",className:"p-0.5 text-sm cursor-pointer",onClick:()=>y(n.id),children:h.jsx(Dn,{width:20,height:20,className:"text-red-600"})})]})]})},H6=()=>{const{state:n}=x.useContext(dt),{setFilters:l}=lh(),r=Mu(N=>N.filters),{data:i}=ns(n.dataSourceId),o=x.useMemo(()=>[n.table,...n.joins.map(N=>N.table)],[n.table,n.joins]),[u,d]=x.useState([]),m=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,column:_}:j)])},y=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,operator:_}:j)])},p=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,value:_}:j)])},g=()=>{d(N=>[...N,{id:pl(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}])},b=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,isColumnRef:_}:j)])},E=N=>{d(_=>_.filter(A=>A.id!==N))},C=()=>Lu("filters"),w=()=>{q6(u)&&(l(z6(u)),C())},O=N=>{d(_=>_.map(A=>A.id===N?{...A,isEnabled:!A.isEnabled}:A))};return x.useEffect(()=>{r&&d(()=>{const N=n.filters.map(_=>{var A,j;return{id:_.id,value:k6(_),column:_.column,operator:Zd[_.operator],isColumnRef:!!((j=(A=_.value)==null?void 0:A[0])!=null&&j.isColumn),isEnabled:_.isEnabled}});return N.push({id:pl(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}),N})},[r]),Wt("f",()=>{vu("filters")}),Wt("ctrl+f",()=>{alert("Save filters")}),h.jsxs(hn,{isVisible:r,onClose:C,portal:!0,onClosed:()=>d([]),children:[h.jsx(ia,{onClick:C}),h.jsx("h2",{className:"text-lg font-semibold",children:"Filters"}),h.jsxs("div",{className:"flex gap-4 flex-col w-full lg:w-lg my-4",children:[u.length<1&&h.jsx("p",{className:"p-1 text-center rounded-lg bg-gray-50 border border-gray-200",children:"No filters"}),u.map((N,_)=>h.jsx(B6,{filter:N,dataSourceId:n.dataSourceId,allowedTables:o,inspections:i||[],onChangeColumn:m,onChangeOperator:y,onChangeValue:p,onRemoveFilter:E,onIsColumnChange:b,triggerIsEnabled:O,autoFocus:_===u.length-1},N.id))]}),h.jsxs("div",{className:J1.actions,children:[h.jsx("button",{className:"button tertiary",onClick:g,children:"Add filter"}),h.jsx("button",{className:"button primary",onClick:w,children:"Apply filters"})]})]})},Q6="_join-modal_iuyox_2",$6={joinModal:Q6},Y6=()=>{const{isFetching:n}=x.useContext(ra),l=Mu(y=>y.joins),{toggle:r}=ih(),{availableJoins:i}=x.useContext(sa),[o,u]=x.useState(""),d=x.useMemo(()=>{const y=o.toLowerCase();return i.filter(p=>p.on.toTable.toLowerCase().includes(y))},[i,o]),m=()=>Lu("joins");return Wt("j",()=>{i.length>0?Ut("joins"):It.error("No available tables to join")}),h.jsxs(hn,{isVisible:l,onClose:m,portal:!0,children:[h.jsx(ia,{onClick:m}),h.jsxs("div",{className:$6.joinModal,children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),i.length>0?h.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:y=>u(y.target.value),value:o,disabled:n}):h.jsx(qt,{variant:"warning",children:h.jsx("p",{className:"text-sm truncate",children:"There is nothing else to join"})}),h.jsx("div",{className:`flex flex-col mt-2 overflow-y-auto ${n?"opacity-40":""}`,children:d.map(y=>h.jsx(O1,{hook:y,onClick:()=>{n||(r({table:y.on.toTable,type:"LEFT",on:y.where}),u(""),m())}},y.where))})]})]})};function V6(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}function sv(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}const K6="_container_xnji3_2",F6="_column-label_xnji3_2",G6="_not-active_xnji3_2",su={container:K6,columnLabel:F6,notActive:G6};function X6(n){if(!n)return[];const l={};return n.forEach(r=>{l[r.table]?l[r.table].push({value:r.full,ogColumn:r.column,label:dl(r.column),type:r.type}):l[r.table]=[{value:r.full,ogColumn:r.column,label:dl(r.column),type:r.type}],x4[r.type]&&["YEAR","MONTH","DAY"].forEach(i=>{l[r.table].push({value:i+" "+r.full,ogColumn:r.column,label:i+" "+dl(r.column),type:"number",nested:!0})})}),Object.entries(l).reduce((r,[i,o])=>(r.push({name:dl(i),columns:o}),r),[])}function Z6(n,l){const r=l.toLowerCase();return n.map(i=>{const o=i.columns.filter(u=>u.label.toLowerCase().includes(r)||u.ogColumn.toLowerCase().includes(r));return{...i,columns:o}}).filter(i=>i.columns.length>0)}const P6=({column:n,selected:l,onCheck:r})=>h.jsxs("label",{className:ae(su.columnLabel,l?su.active:su.notActive,n.nested&&"pl-5!"),children:[h.jsx("input",{type:"checkbox",checked:l[n.value],name:n.value,onChange:r}),h.jsxs("p",{className:"flex justify-between w-full",children:[h.jsx("span",{"data-tooltip-content":n.value,"data-tooltip-id":"default",children:n.label}),h.jsx("span",{className:"text-blue-600",children:n.type})]})]},n.value),J6={columns:"c",groupBy:"g"},rv=({mode:n})=>{const l=Mu(_=>_[n]),{allColumns:r}=x.useContext(sa),{state:i,setState:o}=x.useContext(dt),[u,d]=x.useState({}),[m,y]=x.useState(""),p=x.useMemo(()=>X6(r),[r]),g=i.aggregations.length>0||i.groupBy.length>0,b=x.useMemo(()=>m?Z6(p,m):p,[m,p]),E=_=>{d(A=>({...A,[_.target.name]:_.target.checked}))},C=_=>{const A=_.target.checked;d(j=>{for(const B of r)j[B.full]=A;return{...j}})},w=()=>{Lu(n)},O=()=>{const _=[];for(const[A,j]of Object.entries(u))if(j){const[B,V]=A.split(" ");_.push({value:V||B,fn:V?B:void 0})}o(A=>({...A,[n]:_})),w()},N=x.useMemo(()=>{for(const _ of r)if(!u[_.full])return!1;return!0},[u,r]);return Wt(J6[n],()=>{n==="columns"?g?It.error("Columns are ignored when there is at least one aggregation or group by"):vu("columns"):vu("groupBy")}),x.useEffect(()=>{if(!l){d({});return}d(()=>V6(i[n].map(_=>_.fn?_.fn+" "+_.value:_.value)))},[l,d]),h.jsxs(hn,{isVisible:l,onClose:w,portal:!0,children:[h.jsx(ia,{onClick:w}),h.jsxs("div",{className:su.container,children:[h.jsx("h2",{className:"text-lg font-semibold",children:n==="groupBy"?"Group by":"Show columns"}),h.jsx("input",{autoFocus:!0,className:"input my-2",placeholder:"Filter",value:m,onChange:_=>y(_.target.value)}),h.jsx("div",{className:"overflow-y-auto",children:b.map(_=>h.jsxs("div",{className:"my-2",children:[h.jsxs("p",{className:"font-semibold sticky top-0 bg-white p-1 z-1",children:["📄 ",_.name]}),_.columns.map(A=>h.jsx(P6,{column:A,selected:u,onCheck:E},A.value))]},_.name))}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsxs("label",{className:"button tertiary flex gap-2 items-center",children:[h.jsx("input",{type:"checkbox",checked:N,onChange:C}),h.jsx("span",{children:"Select all"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{className:"button tertiary",onClick:w,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:O,children:"Apply"})]})]})]})},I6="_options-container_9h3xl_2",W6={optionsContainer:I6},fd="COUNT all",eN=()=>{const n=Mu(w=>w.aggregate),{dataSourceId:l}=x.useContext(sa),{setState:r,state:i}=x.useContext(dt),{data:o}=x.useContext(ra),[u,d]=x.useState({fn:"",col:""}),m=w=>d({...u,fn:w.currentTarget.value}),y=w=>d({...u,col:w}),p=()=>Lu("aggregate"),g=()=>{const w=u.fn===fd?{value:"*",fn:"COUNT"}:{fn:u.fn,value:u.col,distinct:u.fn==="COUNT"};r(O=>({...O,aggregations:[...O.aggregations,w]}))},b=u.fn===fd,E=b?!1:!u.col||!u.fn,C=w=>{const O=Wn(w);r(N=>({...N,aggregations:N.aggregations.filter(_=>_.fn!==w.fn||_.value!==w.value),orderBy:N.orderBy.filter(_=>_.column!==O)}))};return Wt("a",()=>{vu("aggregate")}),h.jsxs(hn,{isVisible:n,onClose:p,backdropClose:!0,portal:!0,children:[h.jsx(ia,{onClick:p}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),yl(i.aggregations.length,0)&&h.jsx("div",{className:"flex flex-col gap-1 mt-4",children:i.aggregations.map((w,O)=>h.jsxs("p",{className:"p-2 rounded-md bg-gray-50 flex items-center justify-between",children:[h.jsx("span",{children:lu(w)}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove aggregation",className:"p-0.5 text-sm cursor-pointer",onClick:()=>C(w),children:h.jsx(Dn,{width:20,height:20,className:"text-red-600"})})]},O))}),h.jsxs("div",{className:W6.optionsContainer,children:[h.jsxs("label",{className:ae(b&&"col-span-2"),children:[h.jsx("p",{className:"font-semibold text-xs",children:"Function"}),h.jsxs("select",{className:"input w-full",value:u.fn,onChange:m,autoFocus:!0,children:[h.jsx("option",{value:"",disabled:!0,children:"Select function"}),h.jsx("option",{value:fd,children:"Count all rows"}),h.jsx("option",{value:"COUNT",children:"Count"}),h.jsx("option",{value:"SUM",children:"Sum"}),h.jsx("option",{value:"MAX",children:"Max"}),h.jsx("option",{value:"MIN",children:"Min"}),h.jsx("option",{value:"AVG",children:"Avg"})]})]}),!b&&h.jsxs("label",{children:[h.jsx("p",{className:"font-semibold text-xs",children:"Column"}),h.jsx(Ld,{dataSourceId:l,allowTables:(o==null?void 0:o.result.tables)||[],onChange:y,value:u.col})]}),h.jsx("button",{className:"button primary",disabled:E,onClick:g,children:"Add"})]})]})]})},tN="_container_1c0fp_2",nN="_yellow-pill_1c0fp_2 _pill_1c0fp_2",aN="_yellow-outline-pill_1c0fp_2 _pill_1c0fp_2",lN="_green-pill_1c0fp_2 _pill_1c0fp_2",iN="_blue-pill_1c0fp_2 _pill_1c0fp_2",sN="_blue-outline-pill_1c0fp_2 _pill_1c0fp_2",rN="_purple-pill_1c0fp_2 _pill_1c0fp_2",oN="_red-pill_1c0fp_2 _pill_1c0fp_2",uN="_black-pill_1c0fp_2 _pill_1c0fp_2",cN="_disabled-pill_1c0fp_2",In={container:tN,yellowPill:nN,yellowOutlinePill:aN,greenPill:lN,bluePill:iN,blueOutlinePill:sN,purplePill:rN,redPill:oN,blackPill:uN,disabledPill:cN},ov=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 112v288M400 256H112"}));function I1(n,l=500,r){const[i,o]=x.useState(n),u=x.useRef(r);return u.current=r,x.useEffect(()=>{const d=setTimeout(()=>{o(n),u.current&&u.current(n)},l);return()=>clearTimeout(d)},[n,l]),i}const fN=()=>{const{state:{table:n,dataSourceId:l,aggregations:r,columns:i,groupBy:o}}=x.useContext(dt),{filters:u,setFilters:d,removeFilter:m}=lh(),{toggle:y,joins:p}=ih(),{data:g}=_r(l),b=()=>Ut("joins"),E=()=>Ut("filters"),C=()=>Ut("aggregate"),w=()=>Ut("columns"),O=()=>Ut("groupBy"),N=j=>{d(u.map(B=>({...B,isEnabled:j===B.id?!B.isEnabled:B.isEnabled})),!0)},_=j=>{j.preventDefault(),j.stopPropagation(),y(p[p.length-1])},A=j=>B=>{B.preventDefault(),B.stopPropagation(),m(j)};return h.jsxs("div",{className:In.container,children:[g&&h.jsxs("button",{onClick:b,className:In.greenPill,"data-tooltip-id":"default","data-tooltip-content":n,children:[h.jsx(Tr,{size:18,type:g.dbType}),h.jsx("p",{className:"text-sm",children:g.name}),h.jsx(Ki,{width:12,height:12}),h.jsx("p",{className:"text-sm",children:n})]}),h.jsxs("button",{onClick:b,className:In.yellowOutlinePill,"data-tooltip-id":"default","data-tooltip-content":"Join table, hotkey J",children:[h.jsx(ov,{width:18,height:18}),h.jsx("p",{className:"text-sm",children:"Table"})]}),p.map((j,B)=>h.jsxs("button",{onClick:b,className:In.yellowPill,"data-tooltip-id":"default","data-tooltip-content":`Joins ${j.table} on ${j.on}`,children:[h.jsx("p",{className:"text-sm",children:j.table}),B===p.length-1&&h.jsx(Dn,{onClick:_,width:18,height:18})]},j.table)),h.jsxs("button",{onClick:E,className:In.blueOutlinePill,"data-tooltip-id":"default","data-tooltip-content":"Add filters, hotkey F",children:[h.jsx(ov,{width:18,height:18}),h.jsx("p",{className:"text-sm",children:"Filter"})]}),u.map(j=>h.jsxs("button",{onClick:()=>N(j.id),onAuxClick:()=>m(j.id),className:ae(In.bluePill,j.isEnabled===!1&&In.disabledPill),"data-tooltip-id":"default","data-tooltip-content":cE(j),children:[h.jsx("p",{className:"text-sm",children:j.column}),h.jsx("p",{className:"text-sm",children:j.operator}),h.jsx("p",{className:"text-sm",children:fE(j)}),h.jsx(Dn,{onClick:A(j.id),width:18,height:18})]},j.id)),r.map(j=>h.jsx("button",{onClick:C,className:ae(In.purplePill),"data-tooltip-id":"default","data-tooltip-content":lu(j),children:h.jsx("p",{className:"text-sm",children:lu(j)})},lu(j))),i.length>0&&h.jsx("button",{onClick:w,className:ae(In.redPill),"data-tooltip-id":"default","data-tooltip-content":"Has hidden columns",children:h.jsx("p",{className:"text-sm",children:"Hidden columns"})}),o.length>0&&h.jsx("button",{onClick:O,className:ae(In.blackPill),"data-tooltip-id":"default","data-tooltip-content":"Has GROUP BY",children:h.jsx("p",{className:"text-sm",children:"GROUP BY"})}),h.jsx(dN,{})]})};function dN(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(()=>n.searchAll);return Wt("k",()=>{Or("Search all text values for",n.searchAll||"",{type:"info",message:"This will search all text values using LIKE operator (numbers, dates and other non string values are not searched)."}).then(u=>{u!==void 0&&(l(d=>({...d,searchAll:u.length>0?u:void 0})),i(u.length>0?u:void 0))})}),I1(r,500,u=>{l(d=>({...d,searchAll:u&&u.length>0?u:void 0}))}),h.jsx("input",{className:"input text-sm","data-tooltip-id":"default","data-tooltip-content":"Search text in all columns. Can be slow when using a lot of columns.",placeholder:"Search text in all columns",value:r||"",onChange:u=>i(u.currentTarget.value)})}const hN=({options:n,updater:l,name:r,tabId:i})=>{const o=E4(n,l),u=T4(i,o.state),d=w4(u.data,o.state.dataSourceId,r,i);return h.jsx(sa,{value:d,children:h.jsx(dt,{value:o,children:h.jsxs(ra,{value:u,children:[h.jsx(E6,{}),h.jsx(fN,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden border-t border-gray-200",children:[h.jsx("div",{className:"flex-1 overflow-auto pb-24 lg:pb-12 no-scrollbar",children:h.jsx(UC,{})}),h.jsx(H6,{}),h.jsx(Y6,{}),h.jsx(rv,{mode:"columns"}),h.jsx(rv,{mode:"groupBy"}),h.jsx(eN,{}),h.jsx(r_,{})]})]})})})},W1=()=>h.jsxs("div",{role:"status",children:[h.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),h.jsx("span",{className:"sr-only",children:"Loading..."})]}),mN=({id:n})=>{const{data:l}=_4(n),r=x.useCallback(i=>{if(!l)return;const o=i(Yi(l.opts));ft.setQueryData(["workbench-tabs",l.id],{...l,opts:{...l.opts,...o}})},[l]);return l?h.jsx(hN,{updater:r,options:l.opts,name:l.name,tabId:l.id}):h.jsx("div",{className:"flex-1 flex justify-center items-center",children:h.jsx(W1,{})})},pN=()=>{const{id:n}=Jx(),l=zt(),{data:r}=Id(),i=N4(),o=ah(Du.laptop),u=y=>{if(y===n&&r){if(r.length===1)return l(Fe.home.path);if(r.length>1){const p=r.find(g=>g.id!==y);if(p)return l(`/workbench/tab/${p.id}`)}}},d=y=>{y.stopPropagation(),y.preventDefault();const p=y.currentTarget.getAttribute("data-tab-id");p&&(i.mutate(p),u(p))},m=y=>{if(y.button===1){const p=y.currentTarget.dataset.tabId;i.mutate(p),u(p)}};return Wt("ctrl+w",()=>{n&&(i.mutate(n),u(n))},{preventDefault:!0}),h.jsxs("div",{className:"h-screen max-h-screen bg-(--bg) flex flex-col",children:[n&&h.jsx(mN,{id:n}),h.jsx("div",{className:ae(or.tabs,"no-scrollbar",!o&&or.mobile),children:r==null?void 0:r.map(y=>h.jsxs("div",{onClick:()=>l(`${Fe.workbench.path}/tab/${y.id}`),className:ae(or.tab,y.id===n&&or.active),"data-tooltip-id":"default","data-tooltip-content":y.name,onAuxClick:m,children:[h.jsxs("span",{className:"truncate w-full",children:["🛠️ ",y.name]}),h.jsx("button",{"data-tab-id":y.id,className:or.closeButton,onClick:d,children:h.jsx(Dn,{width:20,height:20})})]},y.id))})]})},yN="_root_flw9l_2",vN="_down_flw9l_2",gN="_chevron_flw9l_2",bN="_table-name-container_flw9l_2",xN="_link_flw9l_2",SN="_table-name_flw9l_2",wN="_ul_flw9l_2",EN="_column-type_flw9l_2",Oa={root:yN,down:vN,chevron:gN,tableNameContainer:bN,link:xN,tableName:SN,ul:wN,columnType:EN},[Bj,CN]=dn(!1),eg=()=>CN(!1),_N=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"});function NN(n,l){if(l&&n.toLowerCase().includes(l))return"bg-yellow-200"}const jN=({insp:n,filter:l,expanded:r})=>{const i=x.useMemo(()=>r?n.columns:l.length<1?[]:n.columns.filter(o=>o.name.toLowerCase().includes(l)),[n,l,r]);return h.jsx("ul",{className:Oa.ul,children:i.map(o=>h.jsx(h.Fragment,{children:h.jsxs("li",{children:[o.isPrimary?"🔐":"🏷️"," ",h.jsx("span",{className:NN(o.name,l),children:o.name})," ",h.jsxs("span",{className:Oa.columnType,children:["[",o.type,"]"]}),o.ref&&h.jsxs("span",{children:[" ➡️ ",h.jsx("span",{className:Oa.columnType,children:o.ref.table}),".",o.ref.field]})]},o.name+o.type)}))},n.id)};function AN({id:n}){const{data:l}=_r(n),{data:r}=ns(n),i=zt(),o=t4(),u=b1(),d=n4(),m=ls(),y=x.useMemo(()=>l!=null&&l.lastInspected?_N.format(new Date(l.lastInspected)):"--",[l]),[p,g]=x.useState({}),[b,E]=x.useState(""),[C,w]=x.useState("table"),O=jr(Zt.EDITOR),N=b.toLowerCase(),_=x.useMemo(()=>{if(!N||!r)return r||[];const Z=[];for(const te of r){if(te.tableName.toLowerCase().includes(N)){Z.push(te);continue}C!=="table"&&te.columns.findIndex(pe=>pe.name.toLowerCase().includes(N))>=0&&Z.push(te)}return Z},[N,r,C]),A=Z=>{g(te=>({...te,[Z]:!te[Z]}))},j=Z=>{m.mutateAsync({name:Z,opts:Yi({table:Z,dataSourceId:n})}).then(te=>{Vi(void 0),eg(),i(`${Fe.workbench.path}/tab/${te.id}`)})},B=()=>{u.mutate(n)},V=async()=>{const Z=await Or("Enter name",l==null?void 0:l.name);Z&&o.mutate({id:n,dataSource:{name:Z}})},Q=async()=>{await _1("Are you sure you want to delete this data source?")&&(d.mutate(n),Vi(void 0))},G=C==="column";return h.jsxs("div",{className:Oa.root,children:[h.jsxs("h3",{className:"page-head flex gap-2",children:[l&&h.jsx(Tr,{size:32,type:l.dbType}),h.jsx("span",{className:"truncate",children:l==null?void 0:l.name})]}),h.jsx("p",{className:"mt-2 text-xs text-gray-800",children:"Last DB inspection"}),h.jsx("p",{className:"text-sm font-semibold",children:y}),O&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsx("button",{disabled:u.isLoading,onClick:B,className:"button tertiary flex items-center gap-1",children:"Refresh schema"}),h.jsx("button",{disabled:u.isLoading,onClick:V,className:"button tertiary",children:"Rename"}),h.jsx("button",{disabled:u.isLoading,onClick:Q,className:"button tertiary",children:"Delete"})]}),h.jsxs("div",{className:"flex gap-2 items-center mb-2 mt-4",children:[h.jsxs("select",{className:"input",value:C,onChange:Z=>w(Z.currentTarget.value),children:[h.jsx("option",{value:"table",children:"Table"}),h.jsx("option",{value:"column",children:"Column"})]}),h.jsx("input",{className:"input flex-1 bg-gray-50",placeholder:G?"Search column":"Search table",value:b,onChange:Z=>E(Z.target.value),autoFocus:!0})]}),h.jsx("div",{className:"overflow-y-auto",children:_==null?void 0:_.map(Z=>h.jsxs("div",{children:[h.jsxs("div",{className:Oa.tableNameContainer,children:[h.jsx("button",{className:ae(Oa.chevron,p[Z.id]&&Oa.down),onClick:()=>A(Z.id),children:h.jsx(Ki,{width:16,height:16})}),h.jsx("button",{className:ae(Oa.tableName,"flex-1"),onClick:()=>A(Z.id),children:Z.tableName}),h.jsx("button",{className:Oa.link,onClick:()=>j(Z.tableName),children:"↗️"})]}),(p[Z.id]||b.length>0)&&h.jsx(jN,{insp:Z,filter:G?N:"",expanded:p[Z.id]})]},Z.id))})]})}const TN=()=>{const n=tE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const i=()=>Vi(void 0);return h.jsx(R1,{isVisible:n!=null,onClose:i,onClosed:()=>r(void 0),backdropClose:!0,children:l&&h.jsx(AN,{id:l})})},ON="_search_10qni_2",RN="_entry_10qni_2",DN="_ds_10qni_2",MN="_ds-container_10qni_2",LN="_ds-entry_10qni_2",UN="_enabled_10qni_2",Hi={search:ON,entry:RN,ds:DN,dsContainer:MN,dsEntry:LN,enabled:UN};function qN(n,l,r){try{const i=r.getItem(n);if(i)return JSON.parse(i)}catch(i){console.warn("Failed to restore tabs",i)}return l}const zN=({storage:n=localStorage,localStorageKey:l,initialData:r})=>{const i=dn(qN(l,r,n));return i[2].subscribe(o=>{n.setItem(l,JSON.stringify(o))}),i},[kN,BN]=zN({initialData:[],localStorageKey:"selected-data-sources-v1"}),HN=n=>BN(l=>{const r=l.indexOf(n);return r>-1?(l.splice(r,1),[...l]):[...l,n]}),QN={table:"📄",query:"📖",tab:"🛠️"},$N=({onTable:n,onQuery:l,onWorkbenchTab:r,autoFocus:i})=>{const[o,u]=x.useState(""),[d,m]=x.useState(-1),y=I1(o,200),p=kN(),{data:g}=la(),{data:b}=Gd({teamId:g==null?void 0:g.teamId}),E=x.useMemo(()=>{const A=[],j=sv(p);if(!b||b.length===0)return[];for(const B of b)j[B.id]&&A.push(B.id);return A},[p,b]),{data:C}=P3(y,{teamId:g==null?void 0:g.teamId,selectedDataSources:E}),w=A=>{A.type==="table"?n(A.name,A.dataSourceId):A.type==="query"?l(A.id,A.dataSourceId):A.type==="tab"&&r(A.id,A.dataSourceId)},O=A=>{var j;C&&(A.key==="ArrowDown"?(A.preventDefault(),m(B=>(B+1)%C.length)):A.key==="ArrowUp"?(A.preventDefault(),m(B=>(B-1+C.length)%C.length)):A.key==="Enter"&&d>=0&&(j=C[d])!=null&&j.name&&(A.preventDefault(),w(C[d])))},N=A=>{const j=A.currentTarget.dataset.tableId,B=C==null?void 0:C.find(V=>V.id===j);B&&w(B)},_=x.useMemo(()=>sv(p),[p]);return h.jsxs("div",{className:"overflow-hidden flex flex-col w-full lg:w-lg",children:[yl(b==null?void 0:b.length,0)&&h.jsx("div",{className:Hi.dsContainer,children:b.map(A=>h.jsxs("button",{className:ae(Hi.dsEntry,_[A.id]&&Hi.enabled),onClick:()=>HN(A.id),children:[h.jsx(Tr,{size:24,type:A.dbType}),h.jsx("span",{children:A.name})]},A.id))}),h.jsx("input",{className:Hi.search,placeholder:"Search table or saved query to start from",value:o,onChange:A=>u(A.target.value),onKeyDown:O,autoFocus:i}),yl(C==null?void 0:C.length,0)&&h.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:C.map((A,j)=>h.jsxs("button",{className:Hi.entry,"data-is-active":d===j,"data-table-id":A.id,onClick:N,children:[h.jsxs("p",{className:"font-semibold",children:[QN[A.type]," ",A.name]}),h.jsxs("p",{className:Hi.ds,children:["📦 ",A.dataSourceName]})]},A.id))})]})},YN=()=>{const n=R4(),l=(u,d)=>{n==null||n.onConfirm("table",u,d)},r=(u,d)=>{n==null||n.onConfirm("query",u,d)},i=(u,d)=>{n==null||n.onConfirm("tab",u,d)},o=()=>{n==null||n.onCancel()};return h.jsxs(hn,{isVisible:!!n,onClose:o,children:[h.jsx(ia,{onClick:o}),h.jsx($N,{autoFocus:!0,onTable:l,onQuery:r,onWorkbenchTab:i})]})},VN=()=>{const n=Nr("Hotkey"),l=zt(),{pathname:r}=Yt(),{data:i}=la(),{data:o}=Id(),u=r===Fe.home.path;Wt("n",()=>{i&&n()}),Wt("w",()=>{i&&(o&&o.length>0?l(`${Fe.workbench.path}/tab/${o[0].id}`):n())},{enabled:u}),Wt("h",()=>{l(Fe.home.path)},{enabled:!u})},KN=()=>{const n=Yt();x.useEffect(()=>{},[n.pathname])},[FN,tg]=dn(!1),dd=()=>tg(!1),ng=()=>tg(!0),GN=({repeatPassword:n,password:l})=>l.length<1?null:l.length<8?h.jsx(qt,{variant:"warning",children:"New password should be at least 8 characters long"}):l!==n?h.jsx(qt,{variant:"warning",children:"Repeat password should match new password"}):null,XN=()=>{const n=FN(),{data:l}=la(),{mutateAsync:r,isLoading:i}=a4(),o=zt(),[{password:u,repeatPassword:d},{change:m,touched:y,reset:p}]=Ar({password:"",repeatPassword:""}),g=()=>{o("/"),Cr.logout().then(()=>{dd()})},b=()=>{r({password:u}).then(()=>{p(),It.success("Password successfully updated!")})},E=u.length<8||u!==d||i,C=y.includes("password");return h.jsxs(hn,{isVisible:n,onClose:dd,children:[h.jsx(ia,{onClick:dd}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[h.jsx(C1,{children:"Account settings"}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Username"}),h.jsx("input",{className:"input w-full",readOnly:!0,disabled:!0,value:l==null?void 0:l.username})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Change password"}),h.jsx("input",{className:"input w-full",type:"password",name:"newPassword",autoComplete:"new-password",value:u,onChange:m("password")})]}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Repeat password"}),h.jsx("input",{className:"input w-full",type:"password",value:d,onChange:m("repeatPassword")})]})]}),C&&h.jsx(GN,{password:u,repeatPassword:d}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsx("button",{className:"button tertiary",disabled:E,onClick:b,children:"Update password"}),h.jsx("button",{className:"button danger",onClick:g,children:"Log out"})]})]})]})},[ZN,ag]=dn(!1),lg=()=>ag(!0),uv=()=>ag(!1),PN=n=>en({queryKey:["team-users"],queryFn:async()=>{const{data:l}=await Oe.get("/teams/"+n+"/users");return l.data},enabled:!!n}),JN=()=>Nt({mutationFn:async({role:n,teamId:l,userId:r})=>(await Oe.patch("/teams/"+l+"/user-role",{role:n,userId:r}),!0),onSuccess:()=>{ft.invalidateQueries({queryKey:["team-users"]})}}),IN=()=>Nt({mutationFn:async({teamId:n,userId:l})=>(await Oe.delete("/teams/"+n,{params:{userId:l}}),!0),onSuccess:()=>{ft.invalidateQueries({queryKey:["team-users"]})}}),WN="_user-entry_kroyk_2",ej="_select-container_kroyk_2",cv={userEntry:WN,selectContainer:ej},tj=()=>{const n=ZN(),{data:l}=la(),{data:r}=PN(l==null?void 0:l.teamId),{mutate:i,isLoading:o}=l4(),{mutate:u,isLoading:d}=JN(),{mutate:m,isLoading:y}=IN(),[p,{change:g,reset:b}]=Ar({password:"",username:""}),E=()=>{i({username:p.username,password:p.password,teamId:(l==null?void 0:l.teamId)||""}),b()},C=(_,A)=>{u({teamId:l.teamId,role:A,userId:_})},w=_=>{_1("Are you sure you want to remove this user?").then(A=>{A&&m({userId:_,teamId:l.teamId})})},O=jr(Zt.ADMIN),N=o||d||y;return h.jsxs(hn,{isVisible:n,onClose:uv,backdropClose:!0,children:[h.jsx(ia,{onClick:uv}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[h.jsx(C1,{children:"Manage users"}),yl(r==null?void 0:r.length,0)&&h.jsx("div",{className:"mt-4 overflow-y-auto flex-1",children:r.map(_=>h.jsxs("div",{className:cv.userEntry,children:[h.jsx("div",{className:cv.selectContainer,children:h.jsxs("select",{value:_.role,disabled:!O||N,onChange:A=>C(_.id,A.currentTarget.value),children:[h.jsx("option",{value:Zt.OWNER,children:"Owner"}),h.jsx("option",{value:Zt.ADMIN,children:"Admin"}),h.jsx("option",{value:Zt.EDITOR,children:"Editor"}),h.jsx("option",{value:Zt.READ_ONLY,children:"Reader"})]})}),h.jsx("p",{className:"flex-1 mx-2",children:_.name}),O&&h.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>w(_.id),children:"❌"})]},_.id))}),O&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold",children:"Create new user"}),h.jsxs("div",{className:"flex flex-col lg:flex-row gap-2 lg:items-center mt-2",children:[h.jsx("input",{className:"input flex-1",onChange:g("username"),value:p.username,placeholder:"Username",disabled:N}),h.jsx("input",{className:"input",onChange:g("password"),value:p.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:N}),h.jsx("button",{className:"button primary",onClick:E,disabled:N,children:"Create user"})]}),h.jsx("p",{className:"text-xs mt-1 text-gray-600",children:"You should create default password for the new account. The user should change it after the first login."})]})]})]})},nj=()=>{const[n,l]=x.useState(""),[r,i]=x.useState(""),[o,u]=x.useState(),[d,m]=x.useState(!1),y=zt(),p=g=>{g.preventDefault(),u(void 0),Cr.login({password:r,username:n}).then(()=>{y("/",{replace:!0})}).catch(u)};return h.jsx("div",{className:"page-container bg-(--bg) h-screen",children:h.jsx("div",{className:"page-content items-center",children:h.jsxs("form",{className:"flex flex-col gap-2 w-full lg:w-lg",onSubmit:p,children:[h.jsx("p",{className:"font-semibold text-xl min-w-md",children:"Login"}),o&&h.jsx(qt,{variant:"danger",children:"Failed to login. Please verify your credentials"}),h.jsx("input",{value:n,onChange:g=>l(g.currentTarget.value),className:"input",placeholder:"User name"}),h.jsx("input",{value:r,onChange:g=>i(g.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),h.jsx("button",{type:"submit",className:"button primary",children:"Login"}),d?h.jsxs(qt,{className:"w-full border border-blue-500",children:[h.jsx("p",{children:"If this is your first login, the default credentials are:"}),h.jsxs("ul",{className:"mt-2",children:[h.jsxs("li",{children:["Username: ",h.jsx("strong",{children:"admin"})]}),h.jsxs("li",{children:["Password: ",h.jsx("strong",{children:"admin"})]})]}),h.jsx("p",{className:"mt-2",children:"Please make sure to change the default password to a secure one."})]}):h.jsx("button",{className:"button tertiary",onClick:()=>m(!0),children:"First login?"})]})})})},aj=()=>{const n=zt(),{pathname:l}=Yt(),{data:r,isLoading:i}=x1();x.useEffect(()=>{!r&&!i&&l!==Fe.login.path&&n(Fe.login.path)},[r,i,n,l])},lj=()=>{const[n]=$2(),l=zt(),r=ls(),i=n.get("shareId");return x.useEffect(()=>{i&&r.mutateAsync({queryId:i}).then(o=>{l(`${Fe.workbench.path}/tab/${o.id}`,{replace:!0})})},[i]),h.jsxs("div",{className:"page-container flex items-center justify-center h-screen",children:[r.isLoading&&h.jsxs("div",{className:"flex items-center flex-col gap-2",children:[h.jsx(W1,{}),h.jsx("p",{children:"Fetching query information"})]}),r.isError&&h.jsx(qt,{variant:"danger",children:"Failed to load query information"})]})};function ij(){return VN(),KN(),aj(),h.jsxs(h.Fragment,{children:[h.jsxs(d2,{children:[h.jsx(cr,{path:Fe.home.path,element:h.jsx(rE,{})}),h.jsx(cr,{path:`${Fe.workbench.path}/tab/:id`,element:h.jsx(pN,{})}),h.jsx(cr,{path:Fe.login.path,element:h.jsx(nj,{})}),h.jsx(cr,{path:Fe.share.path,element:h.jsx(lj,{})})]}),h.jsx(SE,{}),h.jsx(RE,{}),h.jsx(VE,{}),h.jsx(TN,{}),h.jsx(YN,{}),h.jsx(XN,{}),h.jsx(tj,{}),h.jsx(BE,{}),h.jsx(LE,{})]})}const sj="_desktop-layout_xjyyb_2",rj="_mobile-layout_xjyyb_2",oj="_nav_xjyyb_2",uj="_main_xjyyb_2",cj="_header_xjyyb_2",Xi={desktopLayout:sj,mobileLayout:rj,nav:oj,main:uj,header:cj},fj="_container_1lzv8_2",dj="_menu_1lzv8_2",ph={container:fj,menu:dj},hj=({name:n,id:l,onRename:r,onDelete:i,onOpen:o})=>{const u=A1();return h.jsxs("button",{className:ph.menu,onContextMenu:u.open,onClick:()=>o(l),children:[h.jsx(T1,{handler:u,children:h.jsxs("div",{className:"context-menu-container",children:[h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),u.close(),r(l)},className:"context-menu-item",children:"✏️ Rename"}),h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),u.close(),i(l)},className:"context-menu-item",children:"🗑️ Delete"})]})}),h.jsxs("span",{children:["📖 ",n]})]})},mj=({dataSource:n,index:l})=>{const r=()=>{Vi(n.id)};return Wt(l.toString(),()=>{Vi(i=>{if(i!==n.id)return n.id})}),h.jsxs("button",{className:ph.menu,onClick:r,children:[h.jsx(Tr,{size:20,type:n.dbType}),h.jsx("p",{className:"truncate flex-1 text-left mx-1.5",children:n.name}),h.jsx("span",{className:"hotkey",children:l})]})},pj=()=>{const n=zt(),{data:l}=la(),{data:r}=G3(l==null?void 0:l.teamId),{data:i}=X3(l==null?void 0:l.teamId),o=ls(),u=d_(),d=f_(),m=g=>{o.mutateAsync({queryId:g}).then(b=>{n(`${Fe.workbench.path}/tab/${b.id}`)})},y=async g=>{const b=i==null?void 0:i.find(C=>C.id===g),E=await Or("New name?",b==null?void 0:b.name);E&&u.mutate({id:g,payload:{name:E}})},p=g=>{var E;const b=(E=i==null?void 0:i.find(C=>C.id===g))==null?void 0:E.savedQueryId;b&&d.mutate(b)};return h.jsx("div",{className:ph.container,children:h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[yl(r==null?void 0:r.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"DATA SOURCES"}),r.map((g,b)=>h.jsx(mj,{dataSource:g,index:b+1},g.id))]}),yl(i==null?void 0:i.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"SAVED QUERIES"}),i.map(g=>h.jsx(hj,{onDelete:p,onRename:y,onOpen:m,name:g.name,id:g.id},g.savedQueryId))]})]})})},yj=()=>{const n=zt(),{pathname:l}=Yt(),{data:r}=la(),i=Nr("Desktop nav"),o=()=>{eg(),l!==Fe.home.path&&n(Fe.home.path)};return h.jsxs("nav",{className:Xi.nav,children:[r&&h.jsxs("div",{className:Xi.header,children:[h.jsxs("button",{onClick:o,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🏠 Home"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsxs("button",{onClick:i,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🔎 New query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsxs("button",{onClick:ng,children:["🪪 ",r.username]}),h.jsx("button",{onClick:lg,children:"👥 Manage users"})]}),h.jsx(pj,{})]})},vj="_root_4433m_2",gj={root:vj},bj=()=>{const{pathname:n}=Yt(),l=zt(),r=Nr("Mobile nav"),i=()=>{n!==Fe.home.path&&l(Fe.home.path)};return h.jsxs("div",{className:gj.root,children:[h.jsxs("button",{onClick:i,children:[h.jsx("p",{children:"🏠"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Home"})]}),h.jsxs("button",{onClick:r,children:[h.jsx("p",{children:"🔎"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"New query"})]}),h.jsxs("button",{onClick:ng,children:[h.jsx("p",{children:"🪪"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Account"})]}),h.jsxs("button",{onClick:lg,children:[h.jsx("p",{children:"👥"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Users"})]})]})},xj=({children:n,isLogin:l})=>h.jsxs("div",{className:Xi.desktopLayout,children:[h.jsx(hh,{id:"default",className:"z-100"}),!l&&h.jsx(yj,{}),h.jsx("main",{className:Xi.main,children:n})]}),Sj=({children:n,isLogin:l})=>h.jsxs("div",{className:Xi.mobileLayout,children:[h.jsx("main",{className:Xi.main,children:n}),!l&&h.jsx(bj,{})]}),wj=({children:n})=>{const l=ah(Du.laptop),{pathname:r}=Yt(),i=r===Fe.login.path;return l?h.jsx(xj,{isLogin:i,children:n}):h.jsx(Sj,{isLogin:i,children:n})};xx.createRoot(document.getElementById("root")).render(h.jsxs(Ke.StrictMode,{children:[h.jsx(V3,{}),h.jsx(gS,{client:ft,children:h.jsx(z2,{children:h.jsx(wj,{children:h.jsx(ij,{})})})})]}));
236
+ */var Xy;function Z_(){return Xy||(Xy=1,function(n){(function(){var l={}.hasOwnProperty;function r(){for(var u="",d=0;d<arguments.length;d++){var m=arguments[d];m&&(u=o(u,i(m)))}return u}function i(u){if(typeof u=="string"||typeof u=="number")return u;if(typeof u!="object")return"";if(Array.isArray(u))return r.apply(null,u);if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]"))return u.toString();var d="";for(var m in u)l.call(u,m)&&u[m]&&(d=o(d,m));return d}function o(u,d){return d?u?u+" "+d:u+d:u}n.exports?(r.default=r,n.exports=r):window.classNames=r})()}(rd)),rd.exports}var P_=Z_();const Dd=Su(P_);var Zy={};const J_="react-tooltip-core-styles",I_="react-tooltip-base-styles",Py={core:!1,base:!1};function Jy({css:n,id:l=I_,type:r="base",ref:i}){var o,u;if(!n||typeof document>"u"||Py[r]||r==="core"&&typeof process<"u"&&(!((o=process==null?void 0:Zy)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="base"&&typeof process<"u"&&(!((u=process==null?void 0:Zy)===null||u===void 0)&&u.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(l=J_),i||(i={});const{insertAt:d}=i;if(document.getElementById(l))return;const m=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.id=l,y.type="text/css",d==="top"&&m.firstChild?m.insertBefore(y,m.firstChild):m.appendChild(y),y.styleSheet?y.styleSheet.cssText=n:y.appendChild(document.createTextNode(n)),Py[r]=!0}const Iy=async({elementReference:n=null,tooltipReference:l=null,tooltipArrowReference:r=null,place:i="top",offset:o=10,strategy:u="absolute",middlewares:d=[K_(Number(o)),G_({fallbackAxisSideDirection:"start"}),F_({padding:5})],border:m,arrowSize:y=8})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};if(l===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};const p=d;return r?(p.push(X_({element:r,padding:5})),Gy(n,l,{placement:i,strategy:u,middleware:p}).then(({x:g,y:b,placement:E,middlewareData:C})=>{var w,O;const N={left:`${g}px`,top:`${b}px`,border:m},{x:_,y:A}=(w=C.arrow)!==null&&w!==void 0?w:{x:0,y:0},j=(O={top:"bottom",right:"left",bottom:"top",left:"right"}[E.split("-")[0]])!==null&&O!==void 0?O:"bottom",B=m&&{borderBottom:m,borderRight:m};let V=0;if(m){const Q=`${m}`.match(/(\d+)px/);V=Q!=null&&Q[1]?Number(Q[1]):1}return{tooltipStyles:N,tooltipArrowStyles:{left:_!=null?`${_}px`:"",top:A!=null?`${A}px`:"",right:"",bottom:"",...B,[j]:`-${y/2+V}px`},place:E}})):Gy(n,l,{placement:"bottom",strategy:u,middleware:p}).then(({x:g,y:b,placement:E})=>({tooltipStyles:{left:`${g}px`,top:`${b}px`},tooltipArrowStyles:{},place:E}))},Wy=(n,l)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,l),ev=(n,l,r)=>{let i=null;const o=function(...u){const d=()=>{i=null};!i&&(n.apply(this,u),i=setTimeout(d,l))};return o.cancel=()=>{i&&(clearTimeout(i),i=null)},o},tv=n=>n!==null&&!Array.isArray(n)&&typeof n=="object",Md=(n,l)=>{if(n===l)return!0;if(Array.isArray(n)&&Array.isArray(l))return n.length===l.length&&n.every((o,u)=>Md(o,l[u]));if(Array.isArray(n)!==Array.isArray(l))return!1;if(!tv(n)||!tv(l))return n===l;const r=Object.keys(n),i=Object.keys(l);return r.length===i.length&&r.every(o=>Md(n[o],l[o]))},W_=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const l=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(r=>{const i=l.getPropertyValue(r);return i==="auto"||i==="scroll"})},nv=n=>{if(!n)return null;let l=n.parentElement;for(;l;){if(W_(l))return l;l=l.parentElement}return document.scrollingElement||document.documentElement},e6=typeof window<"u"?x.useLayoutEffect:x.useEffect,On=n=>{n.current&&(clearTimeout(n.current),n.current=null)},t6="DEFAULT_TOOLTIP_ID",n6={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},a6=x.createContext({getTooltipData:()=>n6});function V1(n=t6){return x.useContext(a6).getTooltipData(n)}var Bi={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},od={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const l6=({forwardRef:n,id:l,className:r,classNameArrow:i,variant:o="dark",anchorId:u,anchorSelect:d,place:m="top",offset:y=10,events:p=["hover"],openOnClick:g=!1,positionStrategy:b="absolute",middlewares:E,wrapper:C,delayShow:w=0,delayHide:O=0,float:N=!1,hidden:_=!1,noArrow:A=!1,clickable:j=!1,closeOnEsc:B=!1,closeOnScroll:V=!1,closeOnResize:Q=!1,openEvents:G,closeEvents:Z,globalCloseEvents:te,imperativeModeOnly:pe,style:Re,position:be,afterShow:Ue,afterHide:ye,disableTooltip:Se,content:k,contentWrapperRef:X,isOpen:J,defaultIsOpen:ue=!1,setIsOpen:R,activeAnchor:$,setActiveAnchor:W,border:I,opacity:se,arrowColor:Ce,arrowSize:ce=8,role:St="tooltip"})=>{var ze;const Ze=x.useRef(null),Qn=x.useRef(null),jt=x.useRef(null),mn=x.useRef(null),ua=x.useRef(null),[pn,ss]=x.useState({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[kt,Bt]=x.useState(!1),[ca,$n]=x.useState(!1),[Ge,Yn]=x.useState(null),xl=x.useRef(!1),Ua=x.useRef(null),{anchorRefs:Sl,setActiveAnchor:Wl}=V1(l),yn=x.useRef(!1),[tt,Vt]=x.useState([]),it=x.useRef(!1),za=g||p.includes("click"),rs=za||(G==null?void 0:G.click)||(G==null?void 0:G.dblclick)||(G==null?void 0:G.mousedown),qa=G?{...G}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!G&&za&&Object.assign(qa,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const vn=Z?{...Z}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!Z&&za&&Object.assign(vn,{mouseleave:!1,blur:!1,mouseout:!1});const At=te?{...te}:{escape:B||!1,scroll:V||!1,resize:Q||!1,clickOutsideAnchor:rs||!1};pe&&(Object.assign(qa,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(vn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(At,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),e6(()=>(it.current=!0,()=>{it.current=!1}),[]);const He=P=>{it.current&&(P&&$n(!0),setTimeout(()=>{it.current&&(R==null||R(P),J===void 0&&Bt(P))},10))};x.useEffect(()=>{if(J===void 0)return()=>null;J&&$n(!0);const P=setTimeout(()=>{Bt(J)},10);return()=>{clearTimeout(P)}},[J]),x.useEffect(()=>{if(kt!==xl.current)if(On(ua),xl.current=kt,kt)Ue==null||Ue();else{const P=(ne=>{const de=ne.match(/^([\d.]+)(ms|s)$/);if(!de)return 0;const[,Ie,vt]=de;return Number(Ie)*(vt==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));ua.current=setTimeout(()=>{$n(!1),Yn(null),ye==null||ye()},P+25)}},[kt]);const fa=P=>{ss(ne=>Md(ne,P)?ne:P)},Mn=(P=w)=>{On(jt),ca?He(!0):jt.current=setTimeout(()=>{He(!0)},P)},ka=(P=O)=>{On(mn),mn.current=setTimeout(()=>{yn.current||He(!1)},P)},Ba=P=>{var ne;if(!P)return;const de=(ne=P.currentTarget)!==null&&ne!==void 0?ne:P.target;if(!(de!=null&&de.isConnected))return W(null),void Wl({current:null});w?Mn():He(!0),W(de),Wl({current:de}),On(mn)},da=()=>{j?ka(O||100):O?ka():He(!1),On(jt)},Vn=({x:P,y:ne})=>{var de;const Ie={getBoundingClientRect:()=>({x:P,y:ne,width:0,height:0,top:ne,left:P,right:P,bottom:ne})};Iy({place:(de=Ge==null?void 0:Ge.place)!==null&&de!==void 0?de:m,offset:y,elementReference:Ie,tooltipReference:Ze.current,tooltipArrowReference:Qn.current,strategy:b,middlewares:E,border:I,arrowSize:ce}).then(vt=>{fa(vt)})},gn=P=>{if(!P)return;const ne=P,de={x:ne.clientX,y:ne.clientY};Vn(de),Ua.current=de},wl=P=>{var ne;if(!kt)return;const de=P.target;de.isConnected&&(!((ne=Ze.current)===null||ne===void 0)&&ne.contains(de)||[document.querySelector(`[id='${u}']`),...tt].some(Ie=>Ie==null?void 0:Ie.contains(de))||(He(!1),On(jt)))},El=ev(Ba,50),st=ev(da,50),Tt=P=>{st.cancel(),El(P)},oe=()=>{El.cancel(),st()},_e=x.useCallback(()=>{var P,ne;const de=(P=Ge==null?void 0:Ge.position)!==null&&P!==void 0?P:be;de?Vn(de):N?Ua.current&&Vn(Ua.current):$!=null&&$.isConnected&&Iy({place:(ne=Ge==null?void 0:Ge.place)!==null&&ne!==void 0?ne:m,offset:y,elementReference:$,tooltipReference:Ze.current,tooltipArrowReference:Qn.current,strategy:b,middlewares:E,border:I,arrowSize:ce}).then(Ie=>{it.current&&fa(Ie)})},[kt,$,k,Re,m,Ge==null?void 0:Ge.place,y,b,be,Ge==null?void 0:Ge.position,N,ce]);x.useEffect(()=>{var P,ne;const de=new Set(Sl);tt.forEach(Me=>{Se!=null&&Se(Me)||de.add({current:Me})});const Ie=document.querySelector(`[id='${u}']`);Ie&&!(Se!=null&&Se(Ie))&&de.add({current:Ie});const vt=()=>{He(!1)},bn=nv($),tn=nv(Ze.current);At.scroll&&(window.addEventListener("scroll",vt),bn==null||bn.addEventListener("scroll",vt),tn==null||tn.addEventListener("scroll",vt));let rt=null;At.resize?window.addEventListener("resize",vt):$&&Ze.current&&(rt=V_($,Ze.current,_e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Rt=Me=>{Me.key==="Escape"&&He(!1)};At.escape&&window.addEventListener("keydown",Rt),At.clickOutsideAnchor&&window.addEventListener("click",wl);const De=[],nn=Me=>!!(Me!=null&&Me.target&&($!=null&&$.contains(Me.target))),Cl=Me=>{kt&&nn(Me)||Ba(Me)},Ha=Me=>{kt&&nn(Me)&&da()},ot=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],os=["click","dblclick","mousedown","mouseup"];Object.entries(qa).forEach(([Me,xn])=>{xn&&(ot.includes(Me)?De.push({event:Me,listener:Tt}):os.includes(Me)&&De.push({event:Me,listener:Cl}))}),Object.entries(vn).forEach(([Me,xn])=>{xn&&(ot.includes(Me)?De.push({event:Me,listener:oe}):os.includes(Me)&&De.push({event:Me,listener:Ha}))}),N&&De.push({event:"pointermove",listener:gn});const us=()=>{yn.current=!0},Kn=()=>{yn.current=!1,da()},ha=j&&(vn.mouseout||vn.mouseleave);return ha&&((P=Ze.current)===null||P===void 0||P.addEventListener("mouseover",us),(ne=Ze.current)===null||ne===void 0||ne.addEventListener("mouseout",Kn)),De.forEach(({event:Me,listener:xn})=>{de.forEach(ei=>{var _l;(_l=ei.current)===null||_l===void 0||_l.addEventListener(Me,xn)})}),()=>{var Me,xn;At.scroll&&(window.removeEventListener("scroll",vt),bn==null||bn.removeEventListener("scroll",vt),tn==null||tn.removeEventListener("scroll",vt)),At.resize?window.removeEventListener("resize",vt):rt==null||rt(),At.clickOutsideAnchor&&window.removeEventListener("click",wl),At.escape&&window.removeEventListener("keydown",Rt),ha&&((Me=Ze.current)===null||Me===void 0||Me.removeEventListener("mouseover",us),(xn=Ze.current)===null||xn===void 0||xn.removeEventListener("mouseout",Kn)),De.forEach(({event:ei,listener:_l})=>{de.forEach(ti=>{var Qa;(Qa=ti.current)===null||Qa===void 0||Qa.removeEventListener(ei,_l)})})}},[$,_e,ca,Sl,tt,G,Z,te,za,w,O]),x.useEffect(()=>{var P,ne;let de=(ne=(P=Ge==null?void 0:Ge.anchorSelect)!==null&&P!==void 0?P:d)!==null&&ne!==void 0?ne:"";!de&&l&&(de=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const Ie=new MutationObserver(vt=>{const bn=[],tn=[];vt.forEach(rt=>{if(rt.type==="attributes"&&rt.attributeName==="data-tooltip-id"&&(rt.target.getAttribute("data-tooltip-id")===l?bn.push(rt.target):rt.oldValue===l&&tn.push(rt.target)),rt.type==="childList"){if($){const Rt=[...rt.removedNodes].filter(De=>De.nodeType===1);if(de)try{tn.push(...Rt.filter(De=>De.matches(de))),tn.push(...Rt.flatMap(De=>[...De.querySelectorAll(de)]))}catch{}Rt.some(De=>{var nn;return!!(!((nn=De==null?void 0:De.contains)===null||nn===void 0)&&nn.call(De,$))&&($n(!1),He(!1),W(null),On(jt),On(mn),!0)})}if(de)try{const Rt=[...rt.addedNodes].filter(De=>De.nodeType===1);bn.push(...Rt.filter(De=>De.matches(de))),bn.push(...Rt.flatMap(De=>[...De.querySelectorAll(de)]))}catch{}}}),(bn.length||tn.length)&&Vt(rt=>[...rt.filter(Rt=>!tn.includes(Rt)),...bn])});return Ie.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{Ie.disconnect()}},[l,d,Ge==null?void 0:Ge.anchorSelect,$]),x.useEffect(()=>{_e()},[_e]),x.useEffect(()=>{if(!(X!=null&&X.current))return()=>null;const P=new ResizeObserver(()=>{setTimeout(()=>_e())});return P.observe(X.current),()=>{P.disconnect()}},[k,X==null?void 0:X.current]),x.useEffect(()=>{var P;const ne=document.querySelector(`[id='${u}']`),de=[...tt,ne];$&&de.includes($)||W((P=tt[0])!==null&&P!==void 0?P:ne)},[u,tt,$]),x.useEffect(()=>(ue&&He(!0),()=>{On(jt),On(mn)}),[]),x.useEffect(()=>{var P;let ne=(P=Ge==null?void 0:Ge.anchorSelect)!==null&&P!==void 0?P:d;if(!ne&&l&&(ne=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),ne)try{const de=Array.from(document.querySelectorAll(ne));Vt(de)}catch{Vt([])}},[l,d,Ge==null?void 0:Ge.anchorSelect]),x.useEffect(()=>{jt.current&&(On(jt),Mn(w))},[w]);const Ht=(ze=Ge==null?void 0:Ge.content)!==null&&ze!==void 0?ze:k,Ot=kt&&Object.keys(pn.tooltipStyles).length>0;return x.useImperativeHandle(n,()=>({open:P=>{if(P!=null&&P.anchorSelect)try{document.querySelector(P.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${P.anchorSelect}" is not a valid CSS selector`)}Yn(P??null),P!=null&&P.delay?Mn(P.delay):He(!0)},close:P=>{P!=null&&P.delay?ka(P.delay):He(!1)},activeAnchor:$,place:pn.place,isOpen:!!(ca&&!_&&Ht&&Ot)})),ca&&!_&&Ht?Ke.createElement(C,{id:l,role:St,className:Dd("react-tooltip",Bi.tooltip,od.tooltip,od[o],r,`react-tooltip__place-${pn.place}`,Bi[Ot?"show":"closing"],Ot?"react-tooltip__show":"react-tooltip__closing",b==="fixed"&&Bi.fixed,j&&Bi.clickable),onTransitionEnd:P=>{On(ua),kt||P.propertyName!=="opacity"||($n(!1),Yn(null),ye==null||ye())},style:{...Re,...pn.tooltipStyles,opacity:se!==void 0&&Ot?se:void 0},ref:Ze},Ht,Ke.createElement(C,{className:Dd("react-tooltip-arrow",Bi.arrow,od.arrow,i,A&&Bi.noArrow),style:{...pn.tooltipArrowStyles,background:Ce?`linear-gradient(to right bottom, transparent 50%, ${Ce} 50%)`:void 0,"--rt-arrow-size":`${ce}px`},ref:Qn})):null},i6=({content:n})=>Ke.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),hh=Ke.forwardRef(({id:n,anchorId:l,anchorSelect:r,content:i,html:o,render:u,className:d,classNameArrow:m,variant:y="dark",place:p="top",offset:g=10,wrapper:b="div",children:E=null,events:C=["hover"],openOnClick:w=!1,positionStrategy:O="absolute",middlewares:N,delayShow:_=0,delayHide:A=0,float:j=!1,hidden:B=!1,noArrow:V=!1,clickable:Q=!1,closeOnEsc:G=!1,closeOnScroll:Z=!1,closeOnResize:te=!1,openEvents:pe,closeEvents:Re,globalCloseEvents:be,imperativeModeOnly:Ue=!1,style:ye,position:Se,isOpen:k,defaultIsOpen:X=!1,disableStyleInjection:J=!1,border:ue,opacity:R,arrowColor:$,arrowSize:W,setIsOpen:I,afterShow:se,afterHide:Ce,disableTooltip:ce,role:St="tooltip"},ze)=>{const[Ze,Qn]=x.useState(i),[jt,mn]=x.useState(o),[ua,pn]=x.useState(p),[ss,kt]=x.useState(y),[Bt,ca]=x.useState(g),[$n,Ge]=x.useState(_),[Yn,xl]=x.useState(A),[Ua,Sl]=x.useState(j),[Wl,yn]=x.useState(B),[tt,Vt]=x.useState(b),[it,za]=x.useState(C),[rs,qa]=x.useState(O),[vn,At]=x.useState(null),[He,fa]=x.useState(null),Mn=x.useRef(J),{anchorRefs:ka,activeAnchor:Ba}=V1(n),da=st=>st==null?void 0:st.getAttributeNames().reduce((Tt,oe)=>{var _e;return oe.startsWith("data-tooltip-")&&(Tt[oe.replace(/^data-tooltip-/,"")]=(_e=st==null?void 0:st.getAttribute(oe))!==null&&_e!==void 0?_e:null),Tt},{}),Vn=st=>{const Tt={place:oe=>{var _e;pn((_e=oe)!==null&&_e!==void 0?_e:p)},content:oe=>{Qn(oe??i)},html:oe=>{mn(oe??o)},variant:oe=>{var _e;kt((_e=oe)!==null&&_e!==void 0?_e:y)},offset:oe=>{ca(oe===null?g:Number(oe))},wrapper:oe=>{var _e;Vt((_e=oe)!==null&&_e!==void 0?_e:b)},events:oe=>{const _e=oe==null?void 0:oe.split(" ");za(_e??C)},"position-strategy":oe=>{var _e;qa((_e=oe)!==null&&_e!==void 0?_e:O)},"delay-show":oe=>{Ge(oe===null?_:Number(oe))},"delay-hide":oe=>{xl(oe===null?A:Number(oe))},float:oe=>{Sl(oe===null?j:oe==="true")},hidden:oe=>{yn(oe===null?B:oe==="true")},"class-name":oe=>{At(oe)}};Object.values(Tt).forEach(oe=>oe(null)),Object.entries(st).forEach(([oe,_e])=>{var Ht;(Ht=Tt[oe])===null||Ht===void 0||Ht.call(Tt,_e)})};x.useEffect(()=>{Qn(i)},[i]),x.useEffect(()=>{mn(o)},[o]),x.useEffect(()=>{pn(p)},[p]),x.useEffect(()=>{kt(y)},[y]),x.useEffect(()=>{ca(g)},[g]),x.useEffect(()=>{Ge(_)},[_]),x.useEffect(()=>{xl(A)},[A]),x.useEffect(()=>{Sl(j)},[j]),x.useEffect(()=>{yn(B)},[B]),x.useEffect(()=>{qa(O)},[O]),x.useEffect(()=>{Mn.current!==J&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[J]),x.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:J==="core",disableBase:J}}))},[]),x.useEffect(()=>{var st;const Tt=new Set(ka);let oe=r;if(!oe&&n&&(oe=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),oe)try{document.querySelectorAll(oe).forEach(ne=>{Tt.add({current:ne})})}catch{console.warn(`[react-tooltip] "${oe}" is not a valid CSS selector`)}const _e=document.querySelector(`[id='${l}']`);if(_e&&Tt.add({current:_e}),!Tt.size)return()=>null;const Ht=(st=He??_e)!==null&&st!==void 0?st:Ba.current,Ot=new MutationObserver(ne=>{ne.forEach(de=>{var Ie;if(!Ht||de.type!=="attributes"||!(!((Ie=de.attributeName)===null||Ie===void 0)&&Ie.startsWith("data-tooltip-")))return;const vt=da(Ht);Vn(vt)})}),P={attributes:!0,childList:!1,subtree:!1};if(Ht){const ne=da(Ht);Vn(ne),Ot.observe(Ht,P)}return()=>{Ot.disconnect()}},[ka,Ba,He,l,r]),x.useEffect(()=>{ye!=null&&ye.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),ue&&!Wy("border",`${ue}`)&&console.warn(`[react-tooltip] "${ue}" is not a valid \`border\`.`),ye!=null&&ye.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),R&&!Wy("opacity",`${R}`)&&console.warn(`[react-tooltip] "${R}" is not a valid \`opacity\`.`)},[]);let gn=E;const wl=x.useRef(null);if(u){const st=u({content:(He==null?void 0:He.getAttribute("data-tooltip-content"))||Ze||null,activeAnchor:He});gn=st?Ke.createElement("div",{ref:wl,className:"react-tooltip-content-wrapper"},st):null}else Ze&&(gn=Ze);jt&&(gn=Ke.createElement(i6,{content:jt}));const El={forwardRef:ze,id:n,anchorId:l,anchorSelect:r,className:Dd(d,vn),classNameArrow:m,content:gn,contentWrapperRef:wl,place:ua,variant:ss,offset:Bt,wrapper:tt,events:it,openOnClick:w,positionStrategy:rs,middlewares:N,delayShow:$n,delayHide:Yn,float:Ua,hidden:Wl,noArrow:V,clickable:Q,closeOnEsc:G,closeOnScroll:Z,closeOnResize:te,openEvents:pe,closeEvents:Re,globalCloseEvents:be,imperativeModeOnly:Ue,style:ye,position:Se,isOpen:k,defaultIsOpen:X,border:ue,opacity:R,arrowColor:$,arrowSize:W,setIsOpen:I,afterShow:se,afterHide:Ce,disableTooltip:ce,activeAnchor:He,setActiveAnchor:st=>fa(st),role:St};return Ke.createElement(l6,{...El})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||Jy({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),n.detail.disableBase||Jy({css:`
237
+ .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const s6=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{d:"M320 146s24.36-12-64-12a160 160 0 10160 160",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32}),x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 58l80 80-80 80"})),r6=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("rect",{x:128,y:128,width:336,height:336,rx:57,ry:57,fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:32}),x.createElement("path",{d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24M296 216v160M376 296H216",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),o6=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("circle",{cx:128,cy:256,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),x.createElement("circle",{cx:384,cy:112,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),x.createElement("circle",{cx:384,cy:400,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M169.83 279.53l172.34 96.94M342.17 135.53l-172.34 96.94"})),K1=["shift","alt","meta","mod","ctrl","control"],u6={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function ml(n){return(u6[n.trim()]||n.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function F1(n){return K1.includes(n)}function ud(n,l=","){return n.toLowerCase().split(l)}function cd(n,l="+",r=">",i=!1,o){let u=[],d=!1;n=n.trim(),n.includes(r)?(d=!0,u=n.toLocaleLowerCase().split(r).map(p=>ml(p))):u=n.toLocaleLowerCase().split(l).map(p=>ml(p));const m={alt:u.includes("alt"),ctrl:u.includes("ctrl")||u.includes("control"),shift:u.includes("shift"),meta:u.includes("meta"),mod:u.includes("mod"),useKey:i},y=u.filter(p=>!K1.includes(p));return{...m,keys:y,description:o,isSequence:d,hotkey:n}}typeof document<"u"&&(document.addEventListener("keydown",n=>{n.code!==void 0&&G1([ml(n.code)])}),document.addEventListener("keyup",n=>{n.code!==void 0&&X1([ml(n.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Ra.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Ra.clear()},0)}));const Ra=new Set;function mh(n){return Array.isArray(n)}function c6(n,l=","){return(mh(n)?n:n.split(l)).every(r=>Ra.has(r.trim().toLowerCase()))}function G1(n){const l=Array.isArray(n)?n:[n];Ra.has("meta")&&Ra.forEach(r=>!F1(r)&&Ra.delete(r.toLowerCase())),l.forEach(r=>Ra.add(r.toLowerCase()))}function X1(n){const l=Array.isArray(n)?n:[n];n==="meta"?Ra.clear():l.forEach(r=>Ra.delete(r.toLowerCase()))}function f6(n,l,r){(typeof r=="function"&&r(n,l)||r===!0)&&n.preventDefault()}function d6(n,l,r){return typeof r=="function"?r(n,l):r===!0||r===void 0}const h6=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function m6(n){return Z1(n,h6)}function Z1(n,l=!1){const{target:r,composed:i}=n;let o,u;return p6(r)&&i?(o=n.composedPath()[0]&&n.composedPath()[0].tagName,u=n.composedPath()[0]&&n.composedPath()[0].role):(o=r&&r.tagName,u=r&&r.role),mh(l)?!!(o&&l&&l.some(d=>d.toLowerCase()===o.toLowerCase()||d===u)):!!(o&&l&&l)}function p6(n){return!!n.tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")}function y6(n,l){return n.length===0&&l?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):l?n.some(r=>l.includes(r))||n.includes("*"):!0}const v6=(n,l,r=!1)=>{const{alt:i,meta:o,mod:u,shift:d,ctrl:m,keys:y,useKey:p}=l,{code:g,key:b,ctrlKey:E,metaKey:C,shiftKey:w,altKey:O}=n,N=ml(g);if(p&&(y==null?void 0:y.length)===1&&y.includes(b))return!0;if(!(y!=null&&y.includes(N))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!r){if(i!==O&&N!=="alt"||d!==w&&N!=="shift")return!1;if(u){if(!C&&!E)return!1}else if(o!==C&&N!=="meta"&&N!=="os"||m!==E&&N!=="ctrl"&&N!=="control")return!1}return y&&y.length===1&&y.includes(N)?!0:y?c6(y):!y},g6=x.createContext(void 0),b6=()=>x.useContext(g6);function P1(n,l){return n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(n).length===Object.keys(l).length&&Object.keys(n).reduce((r,i)=>r&&P1(n[i],l[i]),!0):n===l}const x6=x.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),S6=()=>x.useContext(x6);function w6(n){const l=x.useRef(void 0);return P1(l.current,n)||(l.current=n),l.current}const av=n=>{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()},E6=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Wt(n,l,r,i){const o=x.useRef(null),u=x.useRef(!1),d=Array.isArray(r)?Array.isArray(i)?void 0:i:r,m=mh(n)?n.join(d==null?void 0:d.delimiter):n,y=Array.isArray(r)?r:Array.isArray(i)?i:void 0,p=x.useCallback(l,y??[]),g=x.useRef(p);y?g.current=p:g.current=l;const b=w6(d),{activeScopes:E}=S6(),C=b6();return E6(()=>{if((b==null?void 0:b.enabled)===!1||!y6(E,b==null?void 0:b.scopes))return;let w=[],O;const N=(B,V=!1)=>{var Q;if(!(m6(B)&&!Z1(B,b==null?void 0:b.enableOnFormTags))){if(o.current!==null){const G=o.current.getRootNode();if((G instanceof Document||G instanceof ShadowRoot)&&G.activeElement!==o.current&&!o.current.contains(G.activeElement)){av(B);return}}(Q=B.target)!=null&&Q.isContentEditable&&!(b!=null&&b.enableOnContentEditable)||ud(m,b==null?void 0:b.delimiter).forEach(G=>{var te,pe,Re,be;if(G.includes((b==null?void 0:b.splitKey)??"+")&&G.includes((b==null?void 0:b.sequenceSplitKey)??">")){console.warn(`Hotkey ${G} contains both ${(b==null?void 0:b.splitKey)??"+"} and ${(b==null?void 0:b.sequenceSplitKey)??">"} which is not supported.`);return}const Z=cd(G,b==null?void 0:b.splitKey,b==null?void 0:b.sequenceSplitKey,b==null?void 0:b.useKey,b==null?void 0:b.description);if(Z.isSequence){O=setTimeout(()=>{w=[]},(b==null?void 0:b.sequenceTimeoutMs)??1e3);const Ue=Z.useKey?B.key:ml(B.code);if(F1(Ue.toLowerCase()))return;w.push(Ue);const ye=(te=Z.keys)==null?void 0:te[w.length-1];if(Ue!==ye){w=[],O&&clearTimeout(O);return}w.length===((pe=Z.keys)==null?void 0:pe.length)&&(g.current(B,Z),O&&clearTimeout(O),w=[])}else if(v6(B,Z,b==null?void 0:b.ignoreModifiers)||(Re=Z.keys)!=null&&Re.includes("*")){if((be=b==null?void 0:b.ignoreEventWhen)!=null&&be.call(b,B)||V&&u.current)return;if(f6(B,Z,b==null?void 0:b.preventDefault),!d6(B,Z,b==null?void 0:b.enabled)){av(B);return}g.current(B,Z),V||(u.current=!0)}})}},_=B=>{B.code!==void 0&&(G1(ml(B.code)),((b==null?void 0:b.keydown)===void 0&&(b==null?void 0:b.keyup)!==!0||b!=null&&b.keydown)&&N(B))},A=B=>{B.code!==void 0&&(X1(ml(B.code)),u.current=!1,b!=null&&b.keyup&&N(B,!0))},j=o.current||(d==null?void 0:d.document)||document;return j.addEventListener("keyup",A,d==null?void 0:d.eventListenerOptions),j.addEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&ud(m,b==null?void 0:b.delimiter).forEach(B=>C.addHotkey(cd(B,b==null?void 0:b.splitKey,b==null?void 0:b.sequenceSplitKey,b==null?void 0:b.useKey,b==null?void 0:b.description))),()=>{j.removeEventListener("keyup",A,d==null?void 0:d.eventListenerOptions),j.removeEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&ud(m,b==null?void 0:b.delimiter).forEach(B=>C.removeHotkey(cd(B,b==null?void 0:b.splitKey,b==null?void 0:b.sequenceSplitKey,b==null?void 0:b.useKey,b==null?void 0:b.description))),w=[],O&&clearTimeout(O)}},[m,b,E]),o}function C6(){return h.jsxs("div",{className:"flex items-center bg-white border-b border-gray-200 overflow-auto no-scrollbar",children:[h.jsx(_6,{}),h.jsx(j6,{})]})}function _6(){const{dataSourceId:n,name:l}=x.useContext(sa),{data:r}=_r(n),{data:i}=x.useContext(ra),o=jr(Zt.EDITOR),u=f_(),{rename:d}=D1(),m=()=>{var g,b;(g=i==null?void 0:i.result.columns)!=null&&g[0].table&&Wd({table:(b=i==null?void 0:i.result.columns)==null?void 0:b[0].table,dataSourceId:n})},y=async()=>{const g=await Or("Query name",l);!g||!(i!=null&&i.result.queryHistoryId)||u.mutate({name:g,queryId:i.result.queryHistoryId})},p=()=>d(l);return Wt("s",y),Wt("r",p),h.jsxs("div",{className:ie.tableConfig,children:[h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Rename tab",onClick:p,className:ae(ie.tableAction,ie.blue,"block"),children:h.jsxs("span",{className:ie.tabName,children:["🛠️ ",l]})}),h.jsxs("button",{"data-tooltip-id":"explorer-more-actions",className:ae(ie.tableAction,ie.blue),children:[h.jsx("span",{className:"whitespace-nowrap",children:"Options"}),h.jsx(Ki,{width:16,height:16,className:"rotate-90"})]}),h.jsxs(hh,{id:"explorer-more-actions",className:"z-10 shadow-md flex flex-col",clickable:!0,variant:"light",opacity:1,children:[h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Manage filters",onClick:()=>Ut("filters"),className:ae(ie.tableAction,ie.modal,ie.blue),children:[h.jsx("span",{children:"Filters"}),h.jsx("span",{className:"hotkey",children:"F"})]}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Join tables",onClick:()=>Ut("joins"),className:ae(ie.tableAction,ie.modal,ie.blue),children:[h.jsx("span",{children:"Joins"}),h.jsx("span",{className:"hotkey",children:"J"})]}),h.jsxs("button",{onClick:()=>Ut("columns"),className:ae(ie.tableAction,ie.modal,ie.blue,"justify-between"),children:[h.jsx("span",{children:"Columns"}),h.jsx("span",{className:"hotkey",children:"C"})]}),h.jsxs("button",{onClick:()=>Ut("groupBy"),className:ae(ie.tableAction,ie.modal,ie.blue,"justify-between"),children:[h.jsx("span",{children:"Group by"}),h.jsx("span",{className:"hotkey",children:"G"})]}),h.jsxs("button",{onClick:()=>Ut("aggregate"),className:ae(ie.tableAction,ie.modal,ie.blue,"justify-between"),children:[h.jsx("span",{children:"Aggregate"}),h.jsx("span",{className:"hotkey",children:"A"})]}),o&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-0.5 my-2 bg-gray-100"}),h.jsxs("button",{onClick:y,className:ae(ie.tableAction,ie.modal,ie.blue),children:[h.jsx("span",{children:"Save query"}),h.jsx("span",{className:"hotkey",children:"S"})]}),(r==null?void 0:r.allowInsert)===!0&&h.jsx("button",{onClick:m,className:ae(ie.tableAction,ie.modal,ie.blue),children:"Insert new row"})]})]})]})}const N6=[5,10,20,50,100,200];function j6(){const{page:n,size:l,setPage:r,setSize:i}=c_(),{data:o,refetch:u,isFetching:d}=x.useContext(ra),{name:m}=x.useContext(sa),{state:y}=x.useContext(dt),p=ls(),g=qt(),b=()=>{p.mutateAsync({name:m,opts:y}).then(A=>{g(`${Fe.workbench.path}/tab/${A.id}`)})},E=()=>{if(o!=null&&o.result.queryHistoryId){const A=new URL(window.location.href);A.pathname=Fe.share.path,A.searchParams.set("shareId",o.result.queryHistoryId),navigator.clipboard.writeText(A.toString()),It.success("Share link copied to clipboard")}};Wt("d",b);const C=n*l,w=!d&&!!(o!=null&&o.result.hasMore),O=(o==null?void 0:o.result.rows.length)||0,N=()=>{n>0&&r(n-1)},_=()=>{w&&r(n+1)};return h.jsxs("div",{className:ie.tableConfig,children:[h.jsxs("span",{"data-tooltip-id":"rows-num",className:ie.paginationIndicator,children:[C+1," - ",C+O,w&&"+"]}),h.jsx("span",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:N,role:"button",children:h.jsx(Ki,{width:16,height:16,className:"rotate-180"})}),h.jsx("span",{"data-tooltip-content":"Next page","data-tooltip-id":"default",className:ae(ie.tableAction,w?ie.blue:"opacity-30"),onClick:_,role:"button",children:h.jsx(Ki,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Refresh data","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:()=>u(),role:"button",children:h.jsx(s6,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Share query","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:E,role:"button",children:h.jsx(o6,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Duplicate tab","data-tooltip-id":"default",className:ae(ie.tableAction,ie.blue),onClick:b,role:"button",children:h.jsx(r6,{width:16,height:16})}),h.jsx(hh,{id:"rows-num",className:"z-10 shadow-md flex gap-1",clickable:!0,variant:"light",opacity:1,children:N6.map(A=>h.jsx("button",{onClick:()=>i(A,!0),className:ae(ie.tableAction,ie.blue,A===l&&ie.selectedSize),children:h.jsx("span",{children:A})},A))})]})}const A6="_drop-container_1e7l0_2",T6="_item_1e7l0_2",lv={dropContainer:A6,item:T6},Ld=({dataSourceId:n,focusId:l,placeholder:r="Column",onChange:i,value:o,autoFocus:u,allowTables:d})=>{const{data:m}=ns(n),y=x.useRef(null),p=x.useMemo(()=>{if(!m)return[];let _=m;return d&&(_=m.filter(A=>d.includes(A.tableName))),_.flatMap(A=>A.columns.map(j=>({value:A.tableName+"."+j.name,label:j.name,table:A.tableName,searchValue:j.name.toLowerCase()})))},[m,d]),g=x.useMemo(()=>{const _=o.toLowerCase()||"",A=[];for(let j=0;j<p.length&&A.length<10;j++)p[j].searchValue.includes(_)&&A.push(p[j]);return A},[p,o]),[b,E]=x.useState(!1),[C,w]=x.useState(0),O=_=>{var A;if(_.key==="ArrowDown")_.preventDefault(),w(j=>(j+1)%g.length);else if(_.key==="ArrowUp")_.preventDefault(),w(j=>(j-1+g.length)%g.length);else if(_.key==="Enter"&&C>=0&&C<g.length){_.preventDefault();const j=g[C].value;E(!1);const B=p.findIndex(V=>V.value===j)>-1;i(((A=g[C])==null?void 0:A.value)||j,B,!0)}};x.useEffect(()=>{var A;const _=(A=y.current)==null?void 0:A.querySelector('[data-is-active="true"]');_&&_.scrollIntoView({behavior:"smooth",block:"nearest"})},[C]);const N=_=>{const A=_.currentTarget.value,j=p.findIndex(B=>B.value===A)>-1;i(A,j,!1)};return h.jsxs("div",{className:"relative",onFocus:()=>E(!0),onBlur:()=>E(!1),children:[h.jsx("input",{autoFocus:u,onKeyDown:O,value:o,onChange:N,className:"input w-full",placeholder:r,"data-focus":l}),b&&g.length>0&&h.jsx("div",{className:lv.dropContainer,ref:y,tabIndex:-1,children:g.map((_,A)=>h.jsxs("div",{className:lv.item,"data-is-active":C===A,onMouseDownCapture:j=>{j.preventDefault(),E(!1),i(_.value,!0,!0)},children:[h.jsx("span",{className:"text-xs font-semibold truncate",children:_.table}),h.jsx("p",{className:"truncate text-sm",children:_.label})]},A))})]})},O6="_drop-container_vmrl7_2",R6="_item_vmrl7_2",iv={dropContainer:O6,item:R6};function D6(n){return v4.includes(n)?m4:g4.includes(n)?h4:b4.includes(n)?p4:Xd}const M6=({value:n,onChange:l,autoFocus:r,focusId:i,colType:o})=>{const u=x.useMemo(()=>{const E=n.toLowerCase()||"";return D6(o||"").filter(C=>C.label.includes(E))},[n,o]),d=x.useRef(null),[m,y]=x.useState(!1),[p,g]=x.useState(0),b=E=>{var C;E.key==="ArrowDown"?(E.preventDefault(),g(w=>(w+1)%u.length)):E.key==="ArrowUp"?(E.preventDefault(),g(w=>(w-1+u.length)%u.length)):E.key==="Enter"&&(p>=0&&p<u.length?(E.preventDefault(),y(!1),l(((C=u[p])==null?void 0:C.label)||"",!0)):l(n,!0))};return x.useEffect(()=>{var C;const E=(C=d.current)==null?void 0:C.querySelector('[data-is-active="true"]');E&&E.scrollIntoView({behavior:"smooth",block:"nearest"})},[p]),h.jsxs("div",{className:"relative",children:[h.jsx("input",{onKeyDown:b,value:n,onChange:E=>l(E.target.value,!1),className:"input w-full",placeholder:"Operator",autoFocus:r,onFocus:()=>y(!0),onBlur:()=>y(!1),"data-focus":i}),m&&u.length>0&&h.jsx("ul",{className:iv.dropContainer,ref:d,tabIndex:-1,children:u.map((E,C)=>h.jsx("li",{className:iv.item,"data-is-active":p===C,onMouseDownCapture:w=>{w.preventDefault(),y(!1),l(E.label,!0)},children:E.label},C))})]})},L6="_actions_13ccx_2",U6="_filter-actions_13ccx_2",J1={actions:L6,filterActions:U6},z6=["=","<",">",">=","<>","!=","<="];function q6(n){for(let l=0;l<n.length;l++){const r=n[l];if(!r.operator.length&&!r.value.length&&!r.column.length)continue;if(!r.column.includes("."))return It.error(`Filter #${l+1} has invalid column value`),!1;const i=Pd[r.operator];if(!i)return It.error(`Filter #${l+1} has invalid operator`),!1;if(r.isColumnRef&&!z6.includes(i))return It.error(`Filter #${l+1} cannot reference another column because it uses '${r.operator}' operator`),!1}return!0}function k6(n){const l=[];return n.forEach(r=>{if(!r.operator.length||!r.column.length||r.operator!=="is null"&&r.operator!=="is not null"&&!r.value.length)return;const i=Pd[r.operator];l.push({id:r.id,value:r.isColumnRef?[{value:r.value,isColumn:!0}]:y4(i,r.value),operator:i,column:r.column,isEnabled:r.isEnabled,connector:"AND"})}),l}function B6(n){let l="";if(n.value)for(let r=0;r<n.value.length;r++)l+=n.value[r].value,r<n.value.length-1&&(l+=", ");return l}const H6=({filter:n,dataSourceId:l,allowedTables:r,inspections:i,autoFocus:o,onChangeColumn:u,onChangeOperator:d,onChangeValue:m,onRemoveFilter:y,triggerIsEnabled:p,onIsColumnChange:g})=>{const b=x.useMemo(()=>{if(!i)return"";let E=null;for(const C of i)for(const w of C.columns)C.tableName+"."+w.name===n.column&&(E=w);return E!=null&&E.type?E.type:""},[n.column,i]);return h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsx("label",{children:h.jsx("input",{type:"checkbox",checked:n.isEnabled!==!1,onClick:()=>p(n.id)})}),h.jsx("label",{className:"w-full",children:h.jsx(Ld,{dataSourceId:l,onChange:E=>u(n.id,E),value:n.column,allowTables:r,focusId:"column",autoFocus:o})}),h.jsx("label",{children:h.jsx(M6,{onChange:E=>d(n.id,E),focusId:"operator",colType:b,value:n.operator})}),w1(Pd[n.operator])&&h.jsx("label",{className:"w-full",children:n.isColumnRef?h.jsx(Ld,{dataSourceId:l,onChange:E=>m(n.id,E),value:n.value,allowTables:r,focusId:"value",placeholder:"Search column"}):h.jsx("input",{className:"input w-full",placeholder:"Filter value",value:n.value,onChange:E=>m(n.id,E.currentTarget.value),"data-focus":"value"})}),h.jsxs("div",{className:J1.filterActions,children:[h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"If enabled, the value will reference another column instead of being raw string",className:ae("p-0.5 cursor-pointer rounded-lg border",n.isColumnRef?"bg-blue-50 border-blue-200":"bg-white border-white"),onClick:()=>g(n.id,!n.isColumnRef),children:"🏷️"}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove filter",className:"p-0.5 text-sm cursor-pointer",onClick:()=>y(n.id),children:h.jsx(Dn,{width:20,height:20,className:"text-red-600"})})]})]})},Q6=()=>{const{state:n}=x.useContext(dt),{setFilters:l}=lh(),r=Mu(N=>N.filters),{data:i}=ns(n.dataSourceId),o=x.useMemo(()=>[n.table,...n.joins.map(N=>N.table)],[n.table,n.joins]),[u,d]=x.useState([]),m=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,column:_}:j)])},y=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,operator:_}:j)])},p=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,value:_}:j)])},g=()=>{d(N=>[...N,{id:pl(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}])},b=(N,_)=>{d(A=>[...A.map(j=>j.id===N?{...j,isColumnRef:_}:j)])},E=N=>{d(_=>_.filter(A=>A.id!==N))},C=()=>Lu("filters"),w=()=>{q6(u)&&(l(k6(u)),C())},O=N=>{d(_=>_.map(A=>A.id===N?{...A,isEnabled:!A.isEnabled}:A))};return x.useEffect(()=>{r&&d(()=>{const N=n.filters.map(_=>{var A,j;return{id:_.id,value:B6(_),column:_.column,operator:Zd[_.operator],isColumnRef:!!((j=(A=_.value)==null?void 0:A[0])!=null&&j.isColumn),isEnabled:_.isEnabled}});return N.push({id:pl(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}),N})},[r]),Wt("f",()=>{vu("filters")}),Wt("ctrl+f",()=>{alert("Save filters")}),h.jsxs(hn,{isVisible:r,onClose:C,portal:!0,onClosed:()=>d([]),children:[h.jsx(ia,{onClick:C}),h.jsx("h2",{className:"text-lg font-semibold",children:"Filters"}),h.jsxs("div",{className:"flex gap-4 flex-col w-full lg:w-lg my-4",children:[u.length<1&&h.jsx("p",{className:"p-1 text-center rounded-lg bg-gray-50 border border-gray-200",children:"No filters"}),u.map((N,_)=>h.jsx(H6,{filter:N,dataSourceId:n.dataSourceId,allowedTables:o,inspections:i||[],onChangeColumn:m,onChangeOperator:y,onChangeValue:p,onRemoveFilter:E,onIsColumnChange:b,triggerIsEnabled:O,autoFocus:_===u.length-1},N.id))]}),h.jsxs("div",{className:J1.actions,children:[h.jsx("button",{className:"button tertiary",onClick:g,children:"Add filter"}),h.jsx("button",{className:"button primary",onClick:w,children:"Apply filters"})]})]})},$6="_join-modal_iuyox_2",Y6={joinModal:$6},V6=()=>{const{isFetching:n}=x.useContext(ra),l=Mu(y=>y.joins),{toggle:r}=ih(),{availableJoins:i}=x.useContext(sa),[o,u]=x.useState(""),d=x.useMemo(()=>{const y=o.toLowerCase();return i.filter(p=>p.on.toTable.toLowerCase().includes(y))},[i,o]),m=()=>Lu("joins");return Wt("j",()=>{i.length>0?Ut("joins"):It.error("No available tables to join")}),h.jsxs(hn,{isVisible:l,onClose:m,portal:!0,children:[h.jsx(ia,{onClick:m}),h.jsxs("div",{className:Y6.joinModal,children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),i.length>0?h.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:y=>u(y.target.value),value:o,disabled:n}):h.jsx(zt,{variant:"warning",children:h.jsx("p",{className:"text-sm truncate",children:"There is nothing else to join"})}),h.jsx("div",{className:`flex flex-col mt-2 overflow-y-auto ${n?"opacity-40":""}`,children:d.map(y=>h.jsx(O1,{hook:y,onClick:()=>{n||(r({table:y.on.toTable,type:"LEFT",on:y.where}),u(""),m())}},y.where))})]})]})};function K6(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}function sv(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}const F6="_container_xnji3_2",G6="_column-label_xnji3_2",X6="_not-active_xnji3_2",su={container:F6,columnLabel:G6,notActive:X6};function Z6(n){if(!n)return[];const l={};return n.forEach(r=>{l[r.table]?l[r.table].push({value:r.full,ogColumn:r.column,label:dl(r.column),type:r.type}):l[r.table]=[{value:r.full,ogColumn:r.column,label:dl(r.column),type:r.type}],x4[r.type]&&["YEAR","MONTH","DAY"].forEach(i=>{l[r.table].push({value:i+" "+r.full,ogColumn:r.column,label:i+" "+dl(r.column),type:"number",nested:!0})})}),Object.entries(l).reduce((r,[i,o])=>(r.push({name:dl(i),columns:o}),r),[])}function P6(n,l){const r=l.toLowerCase();return n.map(i=>{const o=i.columns.filter(u=>u.label.toLowerCase().includes(r)||u.ogColumn.toLowerCase().includes(r));return{...i,columns:o}}).filter(i=>i.columns.length>0)}const J6=({column:n,selected:l,onCheck:r})=>h.jsxs("label",{className:ae(su.columnLabel,l?su.active:su.notActive,n.nested&&"pl-5!"),children:[h.jsx("input",{type:"checkbox",checked:l[n.value],name:n.value,onChange:r}),h.jsxs("p",{className:"flex justify-between w-full",children:[h.jsx("span",{"data-tooltip-content":n.value,"data-tooltip-id":"default",children:n.label}),h.jsx("span",{className:"text-blue-600",children:n.type})]})]},n.value),I6={columns:"c",groupBy:"g"},rv=({mode:n})=>{const l=Mu(_=>_[n]),{allColumns:r}=x.useContext(sa),{state:i,setState:o}=x.useContext(dt),[u,d]=x.useState({}),[m,y]=x.useState(""),p=x.useMemo(()=>Z6(r),[r]),g=i.aggregations.length>0||i.groupBy.length>0,b=x.useMemo(()=>m?P6(p,m):p,[m,p]),E=_=>{d(A=>({...A,[_.target.name]:_.target.checked}))},C=_=>{const A=_.target.checked;d(j=>{for(const B of r)j[B.full]=A;return{...j}})},w=()=>{Lu(n)},O=()=>{const _=[];for(const[A,j]of Object.entries(u))if(j){const[B,V]=A.split(" ");_.push({value:V||B,fn:V?B:void 0})}o(A=>({...A,[n]:_})),w()},N=x.useMemo(()=>{for(const _ of r)if(!u[_.full])return!1;return!0},[u,r]);return Wt(I6[n],()=>{n==="columns"?g?It.error("Columns are ignored when there is at least one aggregation or group by"):vu("columns"):vu("groupBy")}),x.useEffect(()=>{if(!l){d({});return}d(()=>K6(i[n].map(_=>_.fn?_.fn+" "+_.value:_.value)))},[l,d]),h.jsxs(hn,{isVisible:l,onClose:w,portal:!0,children:[h.jsx(ia,{onClick:w}),h.jsxs("div",{className:su.container,children:[h.jsx("h2",{className:"text-lg font-semibold",children:n==="groupBy"?"Group by":"Show columns"}),h.jsx("input",{autoFocus:!0,className:"input my-2",placeholder:"Filter",value:m,onChange:_=>y(_.target.value)}),h.jsx("div",{className:"overflow-y-auto",children:b.map(_=>h.jsxs("div",{className:"my-2",children:[h.jsxs("p",{className:"font-semibold sticky top-0 bg-white p-1 z-1",children:["📄 ",_.name]}),_.columns.map(A=>h.jsx(J6,{column:A,selected:u,onCheck:E},A.value))]},_.name))}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsxs("label",{className:"button tertiary flex gap-2 items-center",children:[h.jsx("input",{type:"checkbox",checked:N,onChange:C}),h.jsx("span",{children:"Select all"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{className:"button tertiary",onClick:w,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:O,children:"Apply"})]})]})]})},W6="_options-container_9h3xl_2",eN={optionsContainer:W6},fd="COUNT all",tN=()=>{const n=Mu(w=>w.aggregate),{dataSourceId:l}=x.useContext(sa),{setState:r,state:i}=x.useContext(dt),{data:o}=x.useContext(ra),[u,d]=x.useState({fn:"",col:""}),m=w=>d({...u,fn:w.currentTarget.value}),y=w=>d({...u,col:w}),p=()=>Lu("aggregate"),g=()=>{const w=u.fn===fd?{value:"*",fn:"COUNT"}:{fn:u.fn,value:u.col,distinct:u.fn==="COUNT"};r(O=>({...O,aggregations:[...O.aggregations,w]}))},b=u.fn===fd,E=b?!1:!u.col||!u.fn,C=w=>{const O=Wn(w);r(N=>({...N,aggregations:N.aggregations.filter(_=>_.fn!==w.fn||_.value!==w.value),orderBy:N.orderBy.filter(_=>_.column!==O)}))};return Wt("a",()=>{vu("aggregate")}),h.jsxs(hn,{isVisible:n,onClose:p,backdropClose:!0,portal:!0,children:[h.jsx(ia,{onClick:p}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),yl(i.aggregations.length,0)&&h.jsx("div",{className:"flex flex-col gap-1 mt-4",children:i.aggregations.map((w,O)=>h.jsxs("p",{className:"p-2 rounded-md bg-gray-50 flex items-center justify-between",children:[h.jsx("span",{children:lu(w)}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove aggregation",className:"p-0.5 text-sm cursor-pointer",onClick:()=>C(w),children:h.jsx(Dn,{width:20,height:20,className:"text-red-600"})})]},O))}),h.jsxs("div",{className:eN.optionsContainer,children:[h.jsxs("label",{className:ae(b&&"col-span-2"),children:[h.jsx("p",{className:"font-semibold text-xs",children:"Function"}),h.jsxs("select",{className:"input w-full",value:u.fn,onChange:m,autoFocus:!0,children:[h.jsx("option",{value:"",disabled:!0,children:"Select function"}),h.jsx("option",{value:fd,children:"Count all rows"}),h.jsx("option",{value:"COUNT",children:"Count"}),h.jsx("option",{value:"SUM",children:"Sum"}),h.jsx("option",{value:"MAX",children:"Max"}),h.jsx("option",{value:"MIN",children:"Min"}),h.jsx("option",{value:"AVG",children:"Avg"})]})]}),!b&&h.jsxs("label",{children:[h.jsx("p",{className:"font-semibold text-xs",children:"Column"}),h.jsx(Ld,{dataSourceId:l,allowTables:(o==null?void 0:o.result.tables)||[],onChange:y,value:u.col})]}),h.jsx("button",{className:"button primary",disabled:E,onClick:g,children:"Add"})]})]})]})},nN="_container_1c0fp_2",aN="_yellow-pill_1c0fp_2 _pill_1c0fp_2",lN="_yellow-outline-pill_1c0fp_2 _pill_1c0fp_2",iN="_green-pill_1c0fp_2 _pill_1c0fp_2",sN="_blue-pill_1c0fp_2 _pill_1c0fp_2",rN="_blue-outline-pill_1c0fp_2 _pill_1c0fp_2",oN="_purple-pill_1c0fp_2 _pill_1c0fp_2",uN="_red-pill_1c0fp_2 _pill_1c0fp_2",cN="_black-pill_1c0fp_2 _pill_1c0fp_2",fN="_disabled-pill_1c0fp_2",In={container:nN,yellowPill:aN,yellowOutlinePill:lN,greenPill:iN,bluePill:sN,blueOutlinePill:rN,purplePill:oN,redPill:uN,blackPill:cN,disabledPill:fN},ov=n=>x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},x.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 112v288M400 256H112"}));function I1(n,l=500,r){const[i,o]=x.useState(n),u=x.useRef(r);return u.current=r,x.useEffect(()=>{const d=setTimeout(()=>{o(n),u.current&&u.current(n)},l);return()=>clearTimeout(d)},[n,l]),i}const dN=()=>{const{state:{table:n,dataSourceId:l,aggregations:r,columns:i,groupBy:o}}=x.useContext(dt),{filters:u,setFilters:d,removeFilter:m}=lh(),{toggle:y,joins:p}=ih(),{data:g}=_r(l),b=()=>Ut("joins"),E=()=>Ut("filters"),C=()=>Ut("aggregate"),w=()=>Ut("columns"),O=()=>Ut("groupBy"),N=j=>{d(u.map(B=>({...B,isEnabled:j===B.id?!B.isEnabled:B.isEnabled})),!0)},_=j=>{j.preventDefault(),j.stopPropagation(),y(p[p.length-1])},A=j=>B=>{B.preventDefault(),B.stopPropagation(),m(j)};return h.jsxs("div",{className:In.container,children:[g&&h.jsxs("button",{onClick:b,className:In.greenPill,"data-tooltip-id":"default","data-tooltip-content":n,children:[h.jsx(Tr,{size:18,type:g.dbType}),h.jsx("p",{className:"text-sm",children:g.name}),h.jsx(Ki,{width:12,height:12}),h.jsx("p",{className:"text-sm",children:n})]}),h.jsxs("button",{onClick:b,className:In.yellowOutlinePill,"data-tooltip-id":"default","data-tooltip-content":"Join table, hotkey J",children:[h.jsx(ov,{width:18,height:18}),h.jsx("p",{className:"text-sm",children:"Table"})]}),p.map((j,B)=>h.jsxs("button",{onClick:b,className:In.yellowPill,"data-tooltip-id":"default","data-tooltip-content":`Joins ${j.table} on ${j.on}`,children:[h.jsx("p",{className:"text-sm",children:j.table}),B===p.length-1&&h.jsx(Dn,{onClick:_,width:18,height:18})]},j.table)),h.jsxs("button",{onClick:E,className:In.blueOutlinePill,"data-tooltip-id":"default","data-tooltip-content":"Add filters, hotkey F",children:[h.jsx(ov,{width:18,height:18}),h.jsx("p",{className:"text-sm",children:"Filter"})]}),u.map(j=>h.jsxs("button",{onClick:()=>N(j.id),onAuxClick:()=>m(j.id),className:ae(In.bluePill,j.isEnabled===!1&&In.disabledPill),"data-tooltip-id":"default","data-tooltip-content":cE(j),children:[h.jsx("p",{className:"text-sm",children:j.column}),h.jsx("p",{className:"text-sm",children:j.operator}),h.jsx("p",{className:"text-sm",children:fE(j)}),h.jsx(Dn,{onClick:A(j.id),width:18,height:18})]},j.id)),r.map(j=>h.jsx("button",{onClick:C,className:ae(In.purplePill),"data-tooltip-id":"default","data-tooltip-content":lu(j),children:h.jsx("p",{className:"text-sm",children:lu(j)})},lu(j))),i.length>0&&h.jsx("button",{onClick:w,className:ae(In.redPill),"data-tooltip-id":"default","data-tooltip-content":"Has hidden columns",children:h.jsx("p",{className:"text-sm",children:"Hidden columns"})}),o.length>0&&h.jsx("button",{onClick:O,className:ae(In.blackPill),"data-tooltip-id":"default","data-tooltip-content":"Has GROUP BY",children:h.jsx("p",{className:"text-sm",children:"GROUP BY"})}),h.jsx(hN,{})]})};function hN(){const{state:n,setState:l}=x.useContext(dt),[r,i]=x.useState(()=>n.searchAll);return Wt("k",()=>{Or("Search all text values for",n.searchAll||"",{type:"info",message:"This will search all text values using LIKE operator (numbers, dates and other non string values are not searched)."}).then(u=>{u!==void 0&&(l(d=>({...d,searchAll:u.length>0?u:void 0})),i(u.length>0?u:void 0))})}),I1(r,500,u=>{l(d=>({...d,searchAll:u&&u.length>0?u:void 0}))}),h.jsx("input",{className:"input text-sm","data-tooltip-id":"default","data-tooltip-content":"Search text in all columns. Can be slow when using a lot of columns.",placeholder:"Search text in all columns",value:r||"",onChange:u=>i(u.currentTarget.value)})}const mN=({options:n,updater:l,name:r,tabId:i})=>{const o=E4(n,l),u=T4(i,o.state),d=w4(u.data,o.state.dataSourceId,r,i);return h.jsx(sa,{value:d,children:h.jsx(dt,{value:o,children:h.jsxs(ra,{value:u,children:[h.jsx(C6,{}),h.jsx(dN,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden border-t border-gray-200",children:[h.jsx("div",{className:"flex-1 overflow-auto pb-24 lg:pb-12 no-scrollbar",children:h.jsx(zC,{})}),h.jsx(Q6,{}),h.jsx(V6,{}),h.jsx(rv,{mode:"columns"}),h.jsx(rv,{mode:"groupBy"}),h.jsx(tN,{}),h.jsx(o_,{})]})]})})})},W1=()=>h.jsxs("div",{role:"status",children:[h.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),h.jsx("span",{className:"sr-only",children:"Loading..."})]}),pN=({id:n})=>{const{data:l}=_4(n),r=x.useCallback(i=>{if(!l)return;const o=i(Yi(l.opts));ft.setQueryData(["workbench-tabs",l.id],{...l,opts:{...l.opts,...o}})},[l]);return l?h.jsx(mN,{updater:r,options:l.opts,name:l.name,tabId:l.id}):h.jsx("div",{className:"flex-1 flex justify-center items-center",children:h.jsx(W1,{})})},yN=()=>{const{id:n}=Jx(),l=qt(),{data:r}=Id(),i=N4(),o=ah(Du.laptop),u=y=>{if(y===n&&r){if(r.length===1)return l(Fe.home.path);if(r.length>1){const p=r.find(g=>g.id!==y);if(p)return l(`/workbench/tab/${p.id}`)}}},d=y=>{y.stopPropagation(),y.preventDefault();const p=y.currentTarget.getAttribute("data-tab-id");p&&(i.mutate(p),u(p))},m=y=>{i.mutate(y),u(y)};return Wt("ctrl+w",()=>{n&&(i.mutate(n),u(n))},{preventDefault:!0}),h.jsxs("div",{className:"h-screen max-h-screen bg-(--bg) flex flex-col",children:[n&&h.jsx(pN,{id:n}),h.jsx("div",{className:ae(or.tabs,"no-scrollbar",!o&&or.mobile),children:r==null?void 0:r.map(y=>h.jsxs("div",{onClick:()=>l(`${Fe.workbench.path}/tab/${y.id}`),className:ae(or.tab,y.id===n&&or.active),"data-tooltip-id":"default","data-tooltip-content":y.name,onAuxClick:()=>m(y.id),children:[h.jsxs("span",{className:"truncate w-full",children:["🛠️ ",y.name]}),h.jsx("button",{"data-tab-id":y.id,className:or.closeButton,onClick:d,children:h.jsx(Dn,{width:20,height:20})})]},y.id))})]})},vN="_root_flw9l_2",gN="_down_flw9l_2",bN="_chevron_flw9l_2",xN="_table-name-container_flw9l_2",SN="_link_flw9l_2",wN="_table-name_flw9l_2",EN="_ul_flw9l_2",CN="_column-type_flw9l_2",Oa={root:vN,down:gN,chevron:bN,tableNameContainer:xN,link:SN,tableName:wN,ul:EN,columnType:CN},[Hj,_N]=dn(!1),eg=()=>_N(!1),NN=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"});function jN(n,l){if(l&&n.toLowerCase().includes(l))return"bg-yellow-200"}const AN=({insp:n,filter:l,expanded:r})=>{const i=x.useMemo(()=>r?n.columns:l.length<1?[]:n.columns.filter(o=>o.name.toLowerCase().includes(l)),[n,l,r]);return h.jsx("ul",{className:Oa.ul,children:i.map(o=>h.jsx(h.Fragment,{children:h.jsxs("li",{children:[o.isPrimary?"🔐":"🏷️"," ",h.jsx("span",{className:jN(o.name,l),children:o.name})," ",h.jsxs("span",{className:Oa.columnType,children:["[",o.type,"]"]}),o.ref&&h.jsxs("span",{children:[" ➡️ ",h.jsx("span",{className:Oa.columnType,children:o.ref.table}),".",o.ref.field]})]},o.name+o.type)}))},n.id)};function TN({id:n}){const{data:l}=_r(n),{data:r}=ns(n),i=qt(),o=t4(),u=b1(),d=n4(),m=ls(),y=x.useMemo(()=>l!=null&&l.lastInspected?NN.format(new Date(l.lastInspected)):"--",[l]),[p,g]=x.useState({}),[b,E]=x.useState(""),[C,w]=x.useState("table"),O=jr(Zt.EDITOR),N=b.toLowerCase(),_=x.useMemo(()=>{if(!N||!r)return r||[];const Z=[];for(const te of r){if(te.tableName.toLowerCase().includes(N)){Z.push(te);continue}C!=="table"&&te.columns.findIndex(pe=>pe.name.toLowerCase().includes(N))>=0&&Z.push(te)}return Z},[N,r,C]),A=Z=>{g(te=>({...te,[Z]:!te[Z]}))},j=Z=>{m.mutateAsync({name:Z,opts:Yi({table:Z,dataSourceId:n})}).then(te=>{Vi(void 0),eg(),i(`${Fe.workbench.path}/tab/${te.id}`)})},B=()=>{u.mutate(n)},V=async()=>{const Z=await Or("Enter name",l==null?void 0:l.name);Z&&o.mutate({id:n,dataSource:{name:Z}})},Q=async()=>{await _1("Are you sure you want to delete this data source?")&&(d.mutate(n),Vi(void 0))},G=C==="column";return h.jsxs("div",{className:Oa.root,children:[h.jsxs("h3",{className:"page-head flex gap-2",children:[l&&h.jsx(Tr,{size:32,type:l.dbType}),h.jsx("span",{className:"truncate",children:l==null?void 0:l.name})]}),h.jsx("p",{className:"mt-2 text-xs text-gray-800",children:"Last DB inspection"}),h.jsx("p",{className:"text-sm font-semibold",children:y}),O&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsx("button",{disabled:u.isLoading,onClick:B,className:"button tertiary flex items-center gap-1",children:"Refresh schema"}),h.jsx("button",{disabled:u.isLoading,onClick:V,className:"button tertiary",children:"Rename"}),h.jsx("button",{disabled:u.isLoading,onClick:Q,className:"button tertiary",children:"Delete"})]}),h.jsxs("div",{className:"flex gap-2 items-center mb-2 mt-4",children:[h.jsxs("select",{className:"input",value:C,onChange:Z=>w(Z.currentTarget.value),children:[h.jsx("option",{value:"table",children:"Table"}),h.jsx("option",{value:"column",children:"Column"})]}),h.jsx("input",{className:"input flex-1 bg-gray-50",placeholder:G?"Search column":"Search table",value:b,onChange:Z=>E(Z.target.value),autoFocus:!0})]}),h.jsx("div",{className:"overflow-y-auto",children:_==null?void 0:_.map(Z=>h.jsxs("div",{children:[h.jsxs("div",{className:Oa.tableNameContainer,children:[h.jsx("button",{className:ae(Oa.chevron,p[Z.id]&&Oa.down),onClick:()=>A(Z.id),children:h.jsx(Ki,{width:16,height:16})}),h.jsx("button",{className:ae(Oa.tableName,"flex-1"),onClick:()=>A(Z.id),children:Z.tableName}),h.jsx("button",{className:Oa.link,onClick:()=>j(Z.tableName),children:"↗️"})]}),(p[Z.id]||b.length>0)&&h.jsx(AN,{insp:Z,filter:G?N:"",expanded:p[Z.id]})]},Z.id))})]})}const ON=()=>{const n=tE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const i=()=>Vi(void 0);return h.jsx(R1,{isVisible:n!=null,onClose:i,onClosed:()=>r(void 0),backdropClose:!0,children:l&&h.jsx(TN,{id:l})})},RN="_search_10qni_2",DN="_entry_10qni_2",MN="_ds_10qni_2",LN="_ds-container_10qni_2",UN="_ds-entry_10qni_2",zN="_enabled_10qni_2",Hi={search:RN,entry:DN,ds:MN,dsContainer:LN,dsEntry:UN,enabled:zN};function qN(n,l,r){try{const i=r.getItem(n);if(i)return JSON.parse(i)}catch(i){console.warn("Failed to restore tabs",i)}return l}const kN=({storage:n=localStorage,localStorageKey:l,initialData:r})=>{const i=dn(qN(l,r,n));return i[2].subscribe(o=>{n.setItem(l,JSON.stringify(o))}),i},[BN,HN]=kN({initialData:[],localStorageKey:"selected-data-sources-v1"}),QN=n=>HN(l=>{const r=l.indexOf(n);return r>-1?(l.splice(r,1),[...l]):[...l,n]}),$N={table:"📄",query:"📖",tab:"🛠️"},YN=({onTable:n,onQuery:l,onWorkbenchTab:r,autoFocus:i})=>{const[o,u]=x.useState(""),[d,m]=x.useState(-1),y=I1(o,200),p=BN(),{data:g}=la(),{data:b}=Gd({teamId:g==null?void 0:g.teamId}),E=x.useMemo(()=>{const A=[],j=sv(p);if(!b||b.length===0)return[];for(const B of b)j[B.id]&&A.push(B.id);return A},[p,b]),{data:C}=P3(y,{teamId:g==null?void 0:g.teamId,selectedDataSources:E}),w=A=>{A.type==="table"?n(A.name,A.dataSourceId):A.type==="query"?l(A.id,A.dataSourceId):A.type==="tab"&&r(A.id,A.dataSourceId)},O=A=>{var j;C&&(A.key==="ArrowDown"?(A.preventDefault(),m(B=>(B+1)%C.length)):A.key==="ArrowUp"?(A.preventDefault(),m(B=>(B-1+C.length)%C.length)):A.key==="Enter"&&d>=0&&(j=C[d])!=null&&j.name&&(A.preventDefault(),w(C[d])))},N=A=>{const j=A.currentTarget.dataset.tableId,B=C==null?void 0:C.find(V=>V.id===j);B&&w(B)},_=x.useMemo(()=>sv(p),[p]);return h.jsxs("div",{className:"overflow-hidden flex flex-col w-full lg:w-lg",children:[yl(b==null?void 0:b.length,0)&&h.jsx("div",{className:Hi.dsContainer,children:b.map(A=>h.jsxs("button",{className:ae(Hi.dsEntry,_[A.id]&&Hi.enabled),onClick:()=>QN(A.id),children:[h.jsx(Tr,{size:24,type:A.dbType}),h.jsx("span",{children:A.name})]},A.id))}),h.jsx("input",{className:Hi.search,placeholder:"Search table or saved query to start from",value:o,onChange:A=>u(A.target.value),onKeyDown:O,autoFocus:i}),yl(C==null?void 0:C.length,0)&&h.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:C.map((A,j)=>h.jsxs("button",{className:Hi.entry,"data-is-active":d===j,"data-table-id":A.id,onClick:N,children:[h.jsxs("p",{className:"font-semibold",children:[$N[A.type]," ",A.name]}),h.jsxs("p",{className:Hi.ds,children:["📦 ",A.dataSourceName]})]},A.id))})]})},VN=()=>{const n=R4(),l=(u,d)=>{n==null||n.onConfirm("table",u,d)},r=(u,d)=>{n==null||n.onConfirm("query",u,d)},i=(u,d)=>{n==null||n.onConfirm("tab",u,d)},o=()=>{n==null||n.onCancel()};return h.jsxs(hn,{isVisible:!!n,onClose:o,children:[h.jsx(ia,{onClick:o}),h.jsx(YN,{autoFocus:!0,onTable:l,onQuery:r,onWorkbenchTab:i})]})},KN=()=>{const n=Nr("Hotkey"),l=qt(),{pathname:r}=Yt(),{data:i}=la(),{data:o}=Id(),u=r===Fe.home.path;Wt("n",()=>{i&&n()}),Wt("w",()=>{i&&(o&&o.length>0?l(`${Fe.workbench.path}/tab/${o[0].id}`):n())},{enabled:u}),Wt("h",()=>{l(Fe.home.path)},{enabled:!u})},FN=()=>{const n=Yt();x.useEffect(()=>{},[n.pathname])},[GN,tg]=dn(!1),dd=()=>tg(!1),ng=()=>tg(!0),XN=({repeatPassword:n,password:l})=>l.length<1?null:l.length<8?h.jsx(zt,{variant:"warning",children:"New password should be at least 8 characters long"}):l!==n?h.jsx(zt,{variant:"warning",children:"Repeat password should match new password"}):null,ZN=()=>{const n=GN(),{data:l}=la(),{mutateAsync:r,isLoading:i}=a4(),o=qt(),[{password:u,repeatPassword:d},{change:m,touched:y,reset:p}]=Ar({password:"",repeatPassword:""}),g=()=>{o("/"),Cr.logout().then(()=>{dd()})},b=()=>{r({password:u}).then(()=>{p(),It.success("Password successfully updated!")})},E=u.length<8||u!==d||i,C=y.includes("password");return h.jsxs(hn,{isVisible:n,onClose:dd,children:[h.jsx(ia,{onClick:dd}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[h.jsx(C1,{children:"Account settings"}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Username"}),h.jsx("input",{className:"input w-full",readOnly:!0,disabled:!0,value:l==null?void 0:l.username})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Change password"}),h.jsx("input",{className:"input w-full",type:"password",name:"newPassword",autoComplete:"new-password",value:u,onChange:m("password")})]}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Repeat password"}),h.jsx("input",{className:"input w-full",type:"password",value:d,onChange:m("repeatPassword")})]})]}),C&&h.jsx(XN,{password:u,repeatPassword:d}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsx("button",{className:"button tertiary",disabled:E,onClick:b,children:"Update password"}),h.jsx("button",{className:"button danger",onClick:g,children:"Log out"})]})]})]})},[PN,ag]=dn(!1),lg=()=>ag(!0),uv=()=>ag(!1),JN=n=>en({queryKey:["team-users"],queryFn:async()=>{const{data:l}=await Oe.get("/teams/"+n+"/users");return l.data},enabled:!!n}),IN=()=>Nt({mutationFn:async({role:n,teamId:l,userId:r})=>(await Oe.patch("/teams/"+l+"/user-role",{role:n,userId:r}),!0),onSuccess:()=>{ft.invalidateQueries({queryKey:["team-users"]})}}),WN=()=>Nt({mutationFn:async({teamId:n,userId:l})=>(await Oe.delete("/teams/"+n,{params:{userId:l}}),!0),onSuccess:()=>{ft.invalidateQueries({queryKey:["team-users"]})}}),ej="_user-entry_kroyk_2",tj="_select-container_kroyk_2",cv={userEntry:ej,selectContainer:tj},nj=()=>{const n=PN(),{data:l}=la(),{data:r}=JN(l==null?void 0:l.teamId),{mutate:i,isLoading:o}=l4(),{mutate:u,isLoading:d}=IN(),{mutate:m,isLoading:y}=WN(),[p,{change:g,reset:b}]=Ar({password:"",username:""}),E=()=>{i({username:p.username,password:p.password,teamId:(l==null?void 0:l.teamId)||""}),b()},C=(_,A)=>{u({teamId:l.teamId,role:A,userId:_})},w=_=>{_1("Are you sure you want to remove this user?").then(A=>{A&&m({userId:_,teamId:l.teamId})})},O=jr(Zt.ADMIN),N=o||d||y;return h.jsxs(hn,{isVisible:n,onClose:uv,backdropClose:!0,children:[h.jsx(ia,{onClick:uv}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[h.jsx(C1,{children:"Manage users"}),yl(r==null?void 0:r.length,0)&&h.jsx("div",{className:"mt-4 overflow-y-auto flex-1",children:r.map(_=>h.jsxs("div",{className:cv.userEntry,children:[h.jsx("div",{className:cv.selectContainer,children:h.jsxs("select",{value:_.role,disabled:!O||N,onChange:A=>C(_.id,A.currentTarget.value),children:[h.jsx("option",{value:Zt.OWNER,children:"Owner"}),h.jsx("option",{value:Zt.ADMIN,children:"Admin"}),h.jsx("option",{value:Zt.EDITOR,children:"Editor"}),h.jsx("option",{value:Zt.READ_ONLY,children:"Reader"})]})}),h.jsx("p",{className:"flex-1 mx-2",children:_.name}),O&&h.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>w(_.id),children:"❌"})]},_.id))}),O&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold",children:"Create new user"}),h.jsxs("div",{className:"flex flex-col lg:flex-row gap-2 lg:items-center mt-2",children:[h.jsx("input",{className:"input flex-1",onChange:g("username"),value:p.username,placeholder:"Username",disabled:N}),h.jsx("input",{className:"input",onChange:g("password"),value:p.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:N}),h.jsx("button",{className:"button primary",onClick:E,disabled:N,children:"Create user"})]}),h.jsx("p",{className:"text-xs mt-1 text-gray-600",children:"You should create default password for the new account. The user should change it after the first login."})]})]})]})},aj=()=>{const[n,l]=x.useState(""),[r,i]=x.useState(""),[o,u]=x.useState(),[d,m]=x.useState(!1),y=qt(),p=g=>{g.preventDefault(),u(void 0),Cr.login({password:r,username:n}).then(()=>{y("/",{replace:!0})}).catch(u)};return h.jsx("div",{className:"page-container bg-(--bg) h-screen",children:h.jsx("div",{className:"page-content items-center",children:h.jsxs("form",{className:"flex flex-col gap-2 w-full lg:w-lg",onSubmit:p,children:[h.jsx("p",{className:"font-semibold text-xl min-w-md",children:"Login"}),o&&h.jsx(zt,{variant:"danger",children:"Failed to login. Please verify your credentials"}),h.jsx("input",{value:n,onChange:g=>l(g.currentTarget.value),className:"input",placeholder:"User name"}),h.jsx("input",{value:r,onChange:g=>i(g.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),h.jsx("button",{type:"submit",className:"button primary",children:"Login"}),d?h.jsxs(zt,{className:"w-full border border-blue-500",children:[h.jsx("p",{children:"If this is your first login, the default credentials are:"}),h.jsxs("ul",{className:"mt-2",children:[h.jsxs("li",{children:["Username: ",h.jsx("strong",{children:"admin"})]}),h.jsxs("li",{children:["Password: ",h.jsx("strong",{children:"admin"})]})]}),h.jsx("p",{className:"mt-2",children:"Please make sure to change the default password to a secure one."})]}):h.jsx("button",{className:"button tertiary",onClick:()=>m(!0),children:"First login?"})]})})})},lj=()=>{const n=qt(),{pathname:l}=Yt(),{data:r,isLoading:i}=x1();x.useEffect(()=>{!r&&!i&&l!==Fe.login.path&&n(Fe.login.path)},[r,i,n,l])},ij=()=>{const[n]=$2(),l=qt(),r=ls(),i=n.get("shareId");return x.useEffect(()=>{i&&r.mutateAsync({queryId:i}).then(o=>{l(`${Fe.workbench.path}/tab/${o.id}`,{replace:!0})})},[i]),h.jsxs("div",{className:"page-container flex items-center justify-center h-screen",children:[r.isLoading&&h.jsxs("div",{className:"flex items-center flex-col gap-2",children:[h.jsx(W1,{}),h.jsx("p",{children:"Fetching query information"})]}),r.isError&&h.jsx(zt,{variant:"danger",children:"Failed to load query information"})]})};function sj(){return KN(),FN(),lj(),h.jsxs(h.Fragment,{children:[h.jsxs(d2,{children:[h.jsx(cr,{path:Fe.home.path,element:h.jsx(rE,{})}),h.jsx(cr,{path:`${Fe.workbench.path}/tab/:id`,element:h.jsx(yN,{})}),h.jsx(cr,{path:Fe.login.path,element:h.jsx(aj,{})}),h.jsx(cr,{path:Fe.share.path,element:h.jsx(ij,{})})]}),h.jsx(SE,{}),h.jsx(RE,{}),h.jsx(VE,{}),h.jsx(ON,{}),h.jsx(VN,{}),h.jsx(ZN,{}),h.jsx(nj,{}),h.jsx(BE,{}),h.jsx(LE,{})]})}const rj="_desktop-layout_xjyyb_2",oj="_mobile-layout_xjyyb_2",uj="_nav_xjyyb_2",cj="_main_xjyyb_2",fj="_header_xjyyb_2",Xi={desktopLayout:rj,mobileLayout:oj,nav:uj,main:cj,header:fj},dj="_container_1lzv8_2",hj="_menu_1lzv8_2",ph={container:dj,menu:hj},mj=({name:n,id:l,onRename:r,onDelete:i,onOpen:o})=>{const u=A1();return h.jsxs("button",{className:ph.menu,onContextMenu:u.open,onClick:()=>o(l),children:[h.jsx(T1,{handler:u,children:h.jsxs("div",{className:"context-menu-container",children:[h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),u.close(),r(l)},className:"context-menu-item",children:"✏️ Rename"}),h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),u.close(),i(l)},className:"context-menu-item",children:"🗑️ Delete"})]})}),h.jsxs("span",{children:["📖 ",n]})]})},pj=({dataSource:n,index:l})=>{const r=()=>{Vi(n.id)};return Wt(l.toString(),()=>{Vi(i=>{if(i!==n.id)return n.id})}),h.jsxs("button",{className:ph.menu,onClick:r,children:[h.jsx(Tr,{size:20,type:n.dbType}),h.jsx("p",{className:"truncate flex-1 text-left mx-1.5",children:n.name}),h.jsx("span",{className:"hotkey",children:l})]})},yj=()=>{const n=qt(),{data:l}=la(),{data:r}=G3(l==null?void 0:l.teamId),{data:i}=X3(l==null?void 0:l.teamId),o=ls(),u=h_(),d=d_(),m=g=>{o.mutateAsync({queryId:g}).then(b=>{n(`${Fe.workbench.path}/tab/${b.id}`)})},y=async g=>{const b=i==null?void 0:i.find(C=>C.id===g),E=await Or("New name?",b==null?void 0:b.name);E&&u.mutate({id:g,payload:{name:E}})},p=g=>{var E;const b=(E=i==null?void 0:i.find(C=>C.id===g))==null?void 0:E.savedQueryId;b&&d.mutate(b)};return h.jsx("div",{className:ph.container,children:h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[yl(r==null?void 0:r.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"DATA SOURCES"}),r.map((g,b)=>h.jsx(pj,{dataSource:g,index:b+1},g.id))]}),yl(i==null?void 0:i.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"SAVED QUERIES"}),i.map(g=>h.jsx(mj,{onDelete:p,onRename:y,onOpen:m,name:g.name,id:g.id},g.savedQueryId))]})]})})},vj=()=>{const n=qt(),{pathname:l}=Yt(),{data:r}=la(),i=Nr("Desktop nav"),o=()=>{eg(),l!==Fe.home.path&&n(Fe.home.path)};return h.jsxs("nav",{className:Xi.nav,children:[r&&h.jsxs("div",{className:Xi.header,children:[h.jsxs("button",{onClick:o,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🏠 Home"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsxs("button",{onClick:i,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🔎 New query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsxs("button",{onClick:ng,children:["🪪 ",r.username]}),h.jsx("button",{onClick:lg,children:"👥 Manage users"})]}),h.jsx(yj,{})]})},gj="_root_4433m_2",bj={root:gj},xj=()=>{const{pathname:n}=Yt(),l=qt(),r=Nr("Mobile nav"),i=()=>{n!==Fe.home.path&&l(Fe.home.path)};return h.jsxs("div",{className:bj.root,children:[h.jsxs("button",{onClick:i,children:[h.jsx("p",{children:"🏠"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Home"})]}),h.jsxs("button",{onClick:r,children:[h.jsx("p",{children:"🔎"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"New query"})]}),h.jsxs("button",{onClick:ng,children:[h.jsx("p",{children:"🪪"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Account"})]}),h.jsxs("button",{onClick:lg,children:[h.jsx("p",{children:"👥"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Users"})]})]})},Sj=({children:n,isLogin:l})=>h.jsxs("div",{className:Xi.desktopLayout,children:[h.jsx(hh,{id:"default",className:"z-100"}),!l&&h.jsx(vj,{}),h.jsx("main",{className:Xi.main,children:n})]}),wj=({children:n,isLogin:l})=>h.jsxs("div",{className:Xi.mobileLayout,children:[h.jsx("main",{className:Xi.main,children:n}),!l&&h.jsx(xj,{})]}),Ej=({children:n})=>{const l=ah(Du.laptop),{pathname:r}=Yt(),i=r===Fe.login.path;return l?h.jsx(Sj,{isLogin:i,children:n}):h.jsx(wj,{isLogin:i,children:n})};xx.createRoot(document.getElementById("root")).render(h.jsxs(Ke.StrictMode,{children:[h.jsx(V3,{}),h.jsx(gS,{client:ft,children:h.jsx(q2,{children:h.jsx(Ej,{children:h.jsx(sj,{})})})})]}));