@dataramen/cli 0.0.53-beta.2 → 0.0.53-beta.4

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.
@@ -1,4 +1,4 @@
1
- (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const o of u)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function r(u){const o={};return u.integrity&&(o.integrity=u.integrity),u.referrerPolicy&&(o.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?o.credentials="include":u.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(u){if(u.ep)return;u.ep=!0;const o=r(u);fetch(u.href,o)}})();function vo(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Wi={};/**
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function r(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(o){if(o.ep)return;o.ep=!0;const u=r(o);fetch(o.href,u)}})();function vu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Wi={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var G0;function cx(){if(G0)return Wi;G0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(s,u,o){var d=null;if(o!==void 0&&(d=""+o),u.key!==void 0&&(d=""+u.key),"key"in u){o={};for(var m in u)m!=="key"&&(o[m]=u[m])}else o=u;return u=o.ref,{$$typeof:n,type:s,key:d,ref:u!==void 0?u:null,props:o}}return Wi.Fragment=l,Wi.jsx=r,Wi.jsxs=r,Wi}var X0;function fx(){return X0||(X0=1,Yf.exports=cx()),Yf.exports}var h=fx(),Vf={exports:{}},be={};/**
9
+ */var G0;function cx(){if(G0)return Wi;G0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(s,o,u){var d=null;if(u!==void 0&&(d=""+u),o.key!==void 0&&(d=""+o.key),"key"in o){u={};for(var m in o)m!=="key"&&(u[m]=o[m])}else u=o;return o=u.ref,{$$typeof:n,type:s,key:d,ref:o!==void 0?o:null,props:u}}return Wi.Fragment=l,Wi.jsx=r,Wi.jsxs=r,Wi}var X0;function fx(){return X0||(X0=1,Yf.exports=cx()),Yf.exports}var h=fx(),Vf={exports:{}},be={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -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 Z0;function dx(){if(Z0)return be;Z0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=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"),b=Symbol.for("react.lazy"),g=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=g&&R[g]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function N(R,Q,W){this.props=R,this.context=Q,this.refs=A,this.updater=W||C}N.prototype.isReactComponent={},N.prototype.setState=function(R,Q){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,Q,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=N.prototype;function O(R,Q,W){this.props=R,this.context=Q,this.refs=A,this.updater=W||C}var T=O.prototype=new _;T.constructor=O,E(T,N.prototype),T.isPureReactComponent=!0;var $=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},H=Object.prototype.hasOwnProperty;function G(R,Q,W,I,ie,Ce){return W=Ce.ref,{$$typeof:n,type:R,key:Q,ref:W!==void 0?W:null,props:Ce}}function Z(R,Q){return G(R.type,Q,void 0,void 0,void 0,R.props)}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function pe(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(W){return Q[W]})}var Re=/\/+/g;function ge(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?pe(""+R.key):Q.toString(36)}function Le(){}function ye(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Le,Le):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function Se(R,Q,W,I,ie){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 b:return ce=R._init,Se(ce(R._payload),Q,W,I,ie)}}if(ce)return ie=ie(R),ce=I===""?"."+ge(R,0):I,$(ie)?(W="",ce!=null&&(W=ce.replace(Re,"$&/")+"/"),Se(ie,Q,W,"",function(Ze){return Ze})):ie!=null&&(te(ie)&&(ie=Z(ie,W+(ie.key==null||R&&R.key===ie.key?"":(""+ie.key).replace(Re,"$&/")+"/")+ce)),Q.push(ie)),1;ce=0;var St=I===""?".":I+":";if($(R))for(var qe=0;qe<R.length;qe++)I=R[qe],Ce=St+ge(I,qe),ce+=Se(I,Q,W,Ce,ie);else if(qe=w(R),typeof qe=="function")for(R=qe.call(R),qe=0;!(I=R.next()).done;)I=I.value,Ce=St+ge(I,qe++),ce+=Se(I,Q,W,Ce,ie);else if(Ce==="object"){if(typeof R.then=="function")return Se(ye(R),Q,W,I,ie);throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ce}function B(R,Q,W){if(R==null)return R;var I=[],ie=0;return Se(R,I,"","",function(Ce){return Q.call(W,Ce,ie++)}),I}function X(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.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=Q)}if(R._status===1)return R._result.default;throw R._result}var P=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function oe(){}return be.Children={map:B,forEach:function(R,Q,W){B(R,function(){Q.apply(this,arguments)},W)},count:function(R){var Q=0;return B(R,function(){Q++}),Q},toArray:function(R){return B(R,function(Q){return Q})||[]},only:function(R){if(!te(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},be.Component=N,be.Fragment=r,be.Profiler=u,be.PureComponent=O,be.StrictMode=s,be.Suspense=y,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,be.__COMPILER_RUNTIME={__proto__:null,c:function(R){return V.H.useMemoCache(R)}},be.cache=function(R){return function(){return R.apply(null,arguments)}},be.cloneElement=function(R,Q,W){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var I=E({},R.props),ie=R.key,Ce=void 0;if(Q!=null)for(ce in Q.ref!==void 0&&(Ce=void 0),Q.key!==void 0&&(ie=""+Q.key),Q)!H.call(Q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&Q.ref===void 0||(I[ce]=Q[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,ie,void 0,void 0,Ce,I)},be.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},be.createElement=function(R,Q,W){var I,ie={},Ce=null;if(Q!=null)for(I in Q.key!==void 0&&(Ce=""+Q.key),Q)H.call(Q,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ie[I]=Q[I]);var ce=arguments.length-2;if(ce===1)ie.children=W;else if(1<ce){for(var St=Array(ce),qe=0;qe<ce;qe++)St[qe]=arguments[qe+2];ie.children=St}if(R&&R.defaultProps)for(I in ce=R.defaultProps,ce)ie[I]===void 0&&(ie[I]=ce[I]);return G(R,Ce,void 0,void 0,null,ie)},be.createRef=function(){return{current:null}},be.forwardRef=function(R){return{$$typeof:m,render:R}},be.isValidElement=te,be.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:X}},be.memo=function(R,Q){return{$$typeof:p,type:R,compare:Q===void 0?null:Q}},be.startTransition=function(R){var Q=V.T,W={};V.T=W;try{var I=R(),ie=V.S;ie!==null&&ie(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(oe,P)}catch(Ce){P(Ce)}finally{V.T=Q}},be.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},be.use=function(R){return V.H.use(R)},be.useActionState=function(R,Q,W){return V.H.useActionState(R,Q,W)},be.useCallback=function(R,Q){return V.H.useCallback(R,Q)},be.useContext=function(R){return V.H.useContext(R)},be.useDebugValue=function(){},be.useDeferredValue=function(R,Q){return V.H.useDeferredValue(R,Q)},be.useEffect=function(R,Q,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,Q)},be.useId=function(){return V.H.useId()},be.useImperativeHandle=function(R,Q,W){return V.H.useImperativeHandle(R,Q,W)},be.useInsertionEffect=function(R,Q){return V.H.useInsertionEffect(R,Q)},be.useLayoutEffect=function(R,Q){return V.H.useLayoutEffect(R,Q)},be.useMemo=function(R,Q){return V.H.useMemo(R,Q)},be.useOptimistic=function(R,Q){return V.H.useOptimistic(R,Q)},be.useReducer=function(R,Q,W){return V.H.useReducer(R,Q,W)},be.useRef=function(R){return V.H.useRef(R)},be.useState=function(R){return V.H.useState(R)},be.useSyncExternalStore=function(R,Q,W){return V.H.useSyncExternalStore(R,Q,W)},be.useTransition=function(){return V.H.useTransition()},be.version="19.1.0",be}var J0;function Md(){return J0||(J0=1,Vf.exports=dx()),Vf.exports}var x=Md();const Ke=vo(x);var Kf={exports:{}},er={},Ff={exports:{}},Gf={};/**
17
+ */var Z0;function dx(){if(Z0)return be;Z0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=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"),b=Symbol.for("react.lazy"),g=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=g&&R[g]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function N(R,Q,W){this.props=R,this.context=Q,this.refs=A,this.updater=W||C}N.prototype.isReactComponent={},N.prototype.setState=function(R,Q){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,Q,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=N.prototype;function O(R,Q,W){this.props=R,this.context=Q,this.refs=A,this.updater=W||C}var T=O.prototype=new _;T.constructor=O,E(T,N.prototype),T.isPureReactComponent=!0;var $=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},H=Object.prototype.hasOwnProperty;function G(R,Q,W,I,ie,Ce){return W=Ce.ref,{$$typeof:n,type:R,key:Q,ref:W!==void 0?W:null,props:Ce}}function Z(R,Q){return G(R.type,Q,void 0,void 0,void 0,R.props)}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function pe(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(W){return Q[W]})}var Re=/\/+/g;function ge(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?pe(""+R.key):Q.toString(36)}function Le(){}function ye(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Le,Le):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function Se(R,Q,W,I,ie){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 b:return ce=R._init,Se(ce(R._payload),Q,W,I,ie)}}if(ce)return ie=ie(R),ce=I===""?"."+ge(R,0):I,$(ie)?(W="",ce!=null&&(W=ce.replace(Re,"$&/")+"/"),Se(ie,Q,W,"",function(Ze){return Ze})):ie!=null&&(te(ie)&&(ie=Z(ie,W+(ie.key==null||R&&R.key===ie.key?"":(""+ie.key).replace(Re,"$&/")+"/")+ce)),Q.push(ie)),1;ce=0;var St=I===""?".":I+":";if($(R))for(var qe=0;qe<R.length;qe++)I=R[qe],Ce=St+ge(I,qe),ce+=Se(I,Q,W,Ce,ie);else if(qe=w(R),typeof qe=="function")for(R=qe.call(R),qe=0;!(I=R.next()).done;)I=I.value,Ce=St+ge(I,qe++),ce+=Se(I,Q,W,Ce,ie);else if(Ce==="object"){if(typeof R.then=="function")return Se(ye(R),Q,W,I,ie);throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ce}function B(R,Q,W){if(R==null)return R;var I=[],ie=0;return Se(R,I,"","",function(Ce){return Q.call(W,Ce,ie++)}),I}function X(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.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=Q)}if(R._status===1)return R._result.default;throw R._result}var P=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function ue(){}return be.Children={map:B,forEach:function(R,Q,W){B(R,function(){Q.apply(this,arguments)},W)},count:function(R){var Q=0;return B(R,function(){Q++}),Q},toArray:function(R){return B(R,function(Q){return Q})||[]},only:function(R){if(!te(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},be.Component=N,be.Fragment=r,be.Profiler=o,be.PureComponent=O,be.StrictMode=s,be.Suspense=y,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,be.__COMPILER_RUNTIME={__proto__:null,c:function(R){return V.H.useMemoCache(R)}},be.cache=function(R){return function(){return R.apply(null,arguments)}},be.cloneElement=function(R,Q,W){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var I=E({},R.props),ie=R.key,Ce=void 0;if(Q!=null)for(ce in Q.ref!==void 0&&(Ce=void 0),Q.key!==void 0&&(ie=""+Q.key),Q)!H.call(Q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&Q.ref===void 0||(I[ce]=Q[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,ie,void 0,void 0,Ce,I)},be.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},be.createElement=function(R,Q,W){var I,ie={},Ce=null;if(Q!=null)for(I in Q.key!==void 0&&(Ce=""+Q.key),Q)H.call(Q,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ie[I]=Q[I]);var ce=arguments.length-2;if(ce===1)ie.children=W;else if(1<ce){for(var St=Array(ce),qe=0;qe<ce;qe++)St[qe]=arguments[qe+2];ie.children=St}if(R&&R.defaultProps)for(I in ce=R.defaultProps,ce)ie[I]===void 0&&(ie[I]=ce[I]);return G(R,Ce,void 0,void 0,null,ie)},be.createRef=function(){return{current:null}},be.forwardRef=function(R){return{$$typeof:m,render:R}},be.isValidElement=te,be.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:X}},be.memo=function(R,Q){return{$$typeof:p,type:R,compare:Q===void 0?null:Q}},be.startTransition=function(R){var Q=V.T,W={};V.T=W;try{var I=R(),ie=V.S;ie!==null&&ie(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(ue,P)}catch(Ce){P(Ce)}finally{V.T=Q}},be.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},be.use=function(R){return V.H.use(R)},be.useActionState=function(R,Q,W){return V.H.useActionState(R,Q,W)},be.useCallback=function(R,Q){return V.H.useCallback(R,Q)},be.useContext=function(R){return V.H.useContext(R)},be.useDebugValue=function(){},be.useDeferredValue=function(R,Q){return V.H.useDeferredValue(R,Q)},be.useEffect=function(R,Q,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,Q)},be.useId=function(){return V.H.useId()},be.useImperativeHandle=function(R,Q,W){return V.H.useImperativeHandle(R,Q,W)},be.useInsertionEffect=function(R,Q){return V.H.useInsertionEffect(R,Q)},be.useLayoutEffect=function(R,Q){return V.H.useLayoutEffect(R,Q)},be.useMemo=function(R,Q){return V.H.useMemo(R,Q)},be.useOptimistic=function(R,Q){return V.H.useOptimistic(R,Q)},be.useReducer=function(R,Q,W){return V.H.useReducer(R,Q,W)},be.useRef=function(R){return V.H.useRef(R)},be.useState=function(R){return V.H.useState(R)},be.useSyncExternalStore=function(R,Q,W){return V.H.useSyncExternalStore(R,Q,W)},be.useTransition=function(){return V.H.useTransition()},be.version="19.1.0",be}var J0;function Md(){return J0||(J0=1,Vf.exports=dx()),Vf.exports}var x=Md();const Ke=vu(x);var Kf={exports:{}},er={},Ff={exports:{}},Gf={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var P0;function hx(){return P0||(P0=1,function(n){function l(B,X){var P=B.length;B.push(X);e:for(;0<P;){var oe=P-1>>>1,R=B[oe];if(0<u(R,X))B[oe]=X,B[P]=R,P=oe;else break e}}function r(B){return B.length===0?null:B[0]}function s(B){if(B.length===0)return null;var X=B[0],P=B.pop();if(P!==X){B[0]=P;e:for(var oe=0,R=B.length,Q=R>>>1;oe<Q;){var W=2*(oe+1)-1,I=B[W],ie=W+1,Ce=B[ie];if(0>u(I,P))ie<R&&0>u(Ce,I)?(B[oe]=Ce,B[ie]=P,oe=ie):(B[oe]=I,B[W]=P,oe=W);else if(ie<R&&0>u(Ce,P))B[oe]=Ce,B[ie]=P,oe=ie;else break e}}return X}function u(B,X){var P=B.sortIndex-X.sortIndex;return P!==0?P:B.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var y=[],p=[],b=1,g=null,w=3,C=!1,E=!1,A=!1,N=!1,_=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function $(B){for(var X=r(p);X!==null;){if(X.callback===null)s(p);else if(X.startTime<=B)s(p),X.sortIndex=X.expirationTime,l(y,X);else break;X=r(p)}}function V(B){if(A=!1,$(B),!E)if(r(y)!==null)E=!0,H||(H=!0,ge());else{var X=r(p);X!==null&&Se(V,X.startTime-B)}}var H=!1,G=-1,Z=5,te=-1;function pe(){return N?!0:!(n.unstable_now()-te<Z)}function Re(){if(N=!1,H){var B=n.unstable_now();te=B;var X=!0;try{e:{E=!1,A&&(A=!1,O(G),G=-1),C=!0;var P=w;try{t:{for($(B),g=r(y);g!==null&&!(g.expirationTime>B&&pe());){var oe=g.callback;if(typeof oe=="function"){g.callback=null,w=g.priorityLevel;var R=oe(g.expirationTime<=B);if(B=n.unstable_now(),typeof R=="function"){g.callback=R,$(B),X=!0;break t}g===r(y)&&s(y),$(B)}else s(y);g=r(y)}if(g!==null)X=!0;else{var Q=r(p);Q!==null&&Se(V,Q.startTime-B),X=!1}}break e}finally{g=null,w=P,C=!1}X=void 0}}finally{X?ge():H=!1}}}var ge;if(typeof T=="function")ge=function(){T(Re)};else if(typeof MessageChannel<"u"){var Le=new MessageChannel,ye=Le.port2;Le.port1.onmessage=Re,ge=function(){ye.postMessage(null)}}else ge=function(){_(Re,0)};function Se(B,X){G=_(function(){B(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(B){switch(w){case 1:case 2:case 3:var X=3;break;default:X=w}var P=w;w=X;try{return B()}finally{w=P}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var P=w;w=B;try{return X()}finally{w=P}},n.unstable_scheduleCallback=function(B,X,P){var oe=n.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?oe+P:oe):P=oe,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=P+R,B={id:b++,callback:X,priorityLevel:B,startTime:P,expirationTime:R,sortIndex:-1},P>oe?(B.sortIndex=P,l(p,B),r(y)===null&&B===r(p)&&(A?(O(G),G=-1):A=!0,Se(V,P-oe))):(B.sortIndex=R,l(y,B),E||C||(E=!0,H||(H=!0,ge()))),B},n.unstable_shouldYield=pe,n.unstable_wrapCallback=function(B){var X=w;return function(){var P=w;w=X;try{return B.apply(this,arguments)}finally{w=P}}}}(Gf)),Gf}var I0;function mx(){return I0||(I0=1,Ff.exports=hx()),Ff.exports}var Xf={exports:{}},Dt={};/**
25
+ */var P0;function hx(){return P0||(P0=1,function(n){function l(B,X){var P=B.length;B.push(X);e:for(;0<P;){var ue=P-1>>>1,R=B[ue];if(0<o(R,X))B[ue]=X,B[P]=R,P=ue;else break e}}function r(B){return B.length===0?null:B[0]}function s(B){if(B.length===0)return null;var X=B[0],P=B.pop();if(P!==X){B[0]=P;e:for(var ue=0,R=B.length,Q=R>>>1;ue<Q;){var W=2*(ue+1)-1,I=B[W],ie=W+1,Ce=B[ie];if(0>o(I,P))ie<R&&0>o(Ce,I)?(B[ue]=Ce,B[ie]=P,ue=ie):(B[ue]=I,B[W]=P,ue=W);else if(ie<R&&0>o(Ce,P))B[ue]=Ce,B[ie]=P,ue=ie;else break e}}return X}function o(B,X){var P=B.sortIndex-X.sortIndex;return P!==0?P:B.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var y=[],p=[],b=1,g=null,w=3,C=!1,E=!1,A=!1,N=!1,_=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function $(B){for(var X=r(p);X!==null;){if(X.callback===null)s(p);else if(X.startTime<=B)s(p),X.sortIndex=X.expirationTime,l(y,X);else break;X=r(p)}}function V(B){if(A=!1,$(B),!E)if(r(y)!==null)E=!0,H||(H=!0,ge());else{var X=r(p);X!==null&&Se(V,X.startTime-B)}}var H=!1,G=-1,Z=5,te=-1;function pe(){return N?!0:!(n.unstable_now()-te<Z)}function Re(){if(N=!1,H){var B=n.unstable_now();te=B;var X=!0;try{e:{E=!1,A&&(A=!1,O(G),G=-1),C=!0;var P=w;try{t:{for($(B),g=r(y);g!==null&&!(g.expirationTime>B&&pe());){var ue=g.callback;if(typeof ue=="function"){g.callback=null,w=g.priorityLevel;var R=ue(g.expirationTime<=B);if(B=n.unstable_now(),typeof R=="function"){g.callback=R,$(B),X=!0;break t}g===r(y)&&s(y),$(B)}else s(y);g=r(y)}if(g!==null)X=!0;else{var Q=r(p);Q!==null&&Se(V,Q.startTime-B),X=!1}}break e}finally{g=null,w=P,C=!1}X=void 0}}finally{X?ge():H=!1}}}var ge;if(typeof T=="function")ge=function(){T(Re)};else if(typeof MessageChannel<"u"){var Le=new MessageChannel,ye=Le.port2;Le.port1.onmessage=Re,ge=function(){ye.postMessage(null)}}else ge=function(){_(Re,0)};function Se(B,X){G=_(function(){B(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(B){switch(w){case 1:case 2:case 3:var X=3;break;default:X=w}var P=w;w=X;try{return B()}finally{w=P}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var P=w;w=B;try{return X()}finally{w=P}},n.unstable_scheduleCallback=function(B,X,P){var ue=n.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ue+P:ue):P=ue,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=P+R,B={id:b++,callback:X,priorityLevel:B,startTime:P,expirationTime:R,sortIndex:-1},P>ue?(B.sortIndex=P,l(p,B),r(y)===null&&B===r(p)&&(A?(O(G),G=-1):A=!0,Se(V,P-ue))):(B.sortIndex=R,l(y,B),E||C||(E=!0,H||(H=!0,ge()))),B},n.unstable_shouldYield=pe,n.unstable_wrapCallback=function(B){var X=w;return function(){var P=w;w=X;try{return B.apply(this,arguments)}finally{w=P}}}}(Gf)),Gf}var I0;function mx(){return I0||(I0=1,Ff.exports=hx()),Ff.exports}var Xf={exports:{}},Dt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var W0;function px(){if(W0)return Dt;W0=1;var n=Md();function l(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},u=Symbol.for("react.portal");function o(y,p,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:g==null?null:""+g,children:y,containerInfo:p,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Dt.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return o(y,p,null,b)},Dt.flushSync=function(y){var p=d.T,b=s.p;try{if(d.T=null,s.p=2,y)return y()}finally{d.T=p,s.p=b,s.d.f()}},Dt.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(y,p))},Dt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Dt.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,g=m(b,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:C}):b==="script"&&s.d.X(y,{crossOrigin:g,integrity:w,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Dt.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);s.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(y)},Dt.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,g=m(b,p.crossOrigin);s.d.L(y,b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Dt.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=m(p.as,p.crossOrigin);s.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(y)},Dt.requestFormReset=function(y){s.d.r(y)},Dt.unstable_batchedUpdates=function(y,p){return y(p)},Dt.useFormState=function(y,p,b){return d.H.useFormState(y,p,b)},Dt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Dt.version="19.1.0",Dt}var ey;function uv(){if(ey)return Xf.exports;ey=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(),Xf.exports=px(),Xf.exports}/**
33
+ */var W0;function px(){if(W0)return Dt;W0=1;var n=Md();function l(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(y,p,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:y,containerInfo:p,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Dt.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return u(y,p,null,b)},Dt.flushSync=function(y){var p=d.T,b=s.p;try{if(d.T=null,s.p=2,y)return y()}finally{d.T=p,s.p=b,s.d.f()}},Dt.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(y,p))},Dt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Dt.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,g=m(b,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:C}):b==="script"&&s.d.X(y,{crossOrigin:g,integrity:w,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Dt.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);s.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(y)},Dt.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,g=m(b,p.crossOrigin);s.d.L(y,b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Dt.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=m(p.as,p.crossOrigin);s.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(y)},Dt.requestFormReset=function(y){s.d.r(y)},Dt.unstable_batchedUpdates=function(y,p){return y(p)},Dt.useFormState=function(y,p,b){return d.H.useFormState(y,p,b)},Dt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Dt.version="19.1.0",Dt}var ey;function ov(){if(ey)return Xf.exports;ey=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(),Xf.exports=px(),Xf.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -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 ty;function yx(){if(ty)return er;ty=1;var n=mx(),l=Md(),r=uv();function s(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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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(o(e)!==e)throw Error(s(188))}function y(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,i=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return m(c),e;if(f===i)return m(c),t;f=f.sibling}throw Error(s(188))}if(a.return!==i.return)a=c,i=f;else{for(var v=!1,S=c.child;S;){if(S===a){v=!0,a=c,i=f;break}if(S===i){v=!0,i=c,a=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===a){v=!0,a=f,i=c;break}if(S===i){v=!0,i=f,a=c;break}S=S.sibling}if(!v)throw Error(s(189))}}if(a.alternate!==i)throw Error(s(190))}if(a.tag!==3)throw Error(s(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 b=Object.assign,g=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),H=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 ge(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case N:return"Profiler";case A:return"StrictMode";case V:return"Suspense";case H:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case T:return(e.displayName||"Context")+".Provider";case O:return(e._context.displayName||"Context")+".Consumer";case $: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,B=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,P={pending:!1,data:null,method:null,action:null},oe=[],R=-1;function Q(e){return{current:e}}function W(e){0>R||(e.current=oe[R],oe[R]=null,R--)}function I(e,t){R++,oe[R]=e.current,e.current=t}var ie=Q(null),Ce=Q(null),ce=Q(null),St=Q(null);function qe(e,t){switch(I(ce,t),I(Ce,e),I(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?S0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=S0(t),e=w0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ie),I(ie,e)}function Ze(){W(ie),W(Ce),W(ce)}function $n(e){e.memoizedState!==null&&I(St,e);var t=ie.current,a=w0(t,e.type);t!==a&&(I(Ce,e),I(ie,a))}function Nt(e){Ce.current===e&&(W(ie),W(Ce)),St.current===e&&(W(St),Xi._currentValue=P)}var hn=Object.prototype.hasOwnProperty,ua=n.unstable_scheduleCallback,mn=n.unstable_cancelCallback,ai=n.unstable_shouldYield,zt=n.unstable_requestPaint,Bt=n.unstable_now,oa=n.unstable_getCurrentPriorityLevel,Yn=n.unstable_ImmediatePriority,Fe=n.unstable_UserBlockingPriority,Vn=n.unstable_NormalPriority,bl=n.unstable_LowPriority,Ua=n.unstable_IdlePriority,gl=n.log,Il=n.unstable_setDisableYieldValue,pn=null,tt=null;function Vt(e){if(typeof gl=="function"&&Il(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(pn,e)}catch{}}var st=Math.clz32?Math.clz32:qa,La=Math.log,li=Math.LN2;function qa(e){return e>>>=0,e===0?32:31-(La(e)/li|0)|0}var yn=256,jt=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 ca(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=i&134217727;return S!==0?(i=S&~f,i!==0?c=He(i):(v&=S,v!==0?c=He(v):a||(a=S&~e,a!==0&&(c=He(a))))):(S=i&~f,S!==0?c=He(S):v!==0?c=He(v):a||(a=i&~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 On(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function za(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=yn;return yn<<=1,(yn&4194048)===0&&(yn=256),e}function fa(){var e=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),e}function Kn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function vn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xl(e,t,a,i,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,j=e.expirationTimes,L=e.hiddenUpdates;for(a=v&~a;0<a;){var Y=31-st(a),F=1<<Y;S[Y]=0,j[Y]=-1;var q=L[Y];if(q!==null)for(L[Y]=null,Y=0;Y<q.length;Y++){var z=q[Y];z!==null&&(z.lane&=-536870913)}a&=~F}i!==0&&Sl(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function Sl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-st(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&4194090}function it(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-st(a),c=1<<i;c&t|e[i]&t&&(e[i]|=t),a&=~c}}function At(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 ue(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:Q0(e.type))}function kt(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var Tt=Math.random().toString(36).slice(2),J="__reactFiber$"+Tt,ne="__reactProps$"+Tt,de="__reactContainer$"+Tt,Ie="__reactEvents$"+Tt,vt="__reactListeners$"+Tt,bn="__reactHandles$"+Tt,en="__reactResources$"+Tt,rt="__reactMarker$"+Tt;function Rt(e){delete e[J],delete e[ne],delete e[Ie],delete e[vt],delete e[bn]}function Oe(e){var t=e[J];if(t)return t;for(var a=e.parentNode;a;){if(t=a[de]||a[J]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=N0(e);e!==null;){if(a=e[J])return a;e=N0(e)}return t}e=a,a=e.parentNode}return null}function tn(e){if(e=e[J]||e[de]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function wl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function ka(e){var t=e[en];return t||(t=e[en]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[rt]=!0}var si=new Set,ii={};function Fn(e,t){da(e,t),da(e+"Capture",t)}function da(e,t){for(ii[e]=t,e=0;e<t.length;e++)si.add(t[e])}var De=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]*$"),gn={},Wl={};function El(e){return hn.call(Wl,e)?!0:hn.call(gn,e)?!1:De.test(e)?Wl[e]=!0:(gn[e]=!0,!1)}function es(e,t,a){if(El(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ha(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 ha(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}var qo,mh;function ts(e){if(qo===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);qo=t&&t[1]||"",mh=-1<a.stack.indexOf(`
41
+ */var ty;function yx(){if(ty)return er;ty=1;var n=mx(),l=Md(),r=ov();function s(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(s(188))}function y(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,i=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return m(c),e;if(f===i)return m(c),t;f=f.sibling}throw Error(s(188))}if(a.return!==i.return)a=c,i=f;else{for(var v=!1,S=c.child;S;){if(S===a){v=!0,a=c,i=f;break}if(S===i){v=!0,i=c,a=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===a){v=!0,a=f,i=c;break}if(S===i){v=!0,i=f,a=c;break}S=S.sibling}if(!v)throw Error(s(189))}}if(a.alternate!==i)throw Error(s(190))}if(a.tag!==3)throw Error(s(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 b=Object.assign,g=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),H=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 ge(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case N:return"Profiler";case A:return"StrictMode";case V:return"Suspense";case H:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case T:return(e.displayName||"Context")+".Provider";case O:return(e._context.displayName||"Context")+".Consumer";case $: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,B=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,P={pending:!1,data:null,method:null,action:null},ue=[],R=-1;function Q(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 ie=Q(null),Ce=Q(null),ce=Q(null),St=Q(null);function qe(e,t){switch(I(ce,t),I(Ce,e),I(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?S0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=S0(t),e=w0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ie),I(ie,e)}function Ze(){W(ie),W(Ce),W(ce)}function $n(e){e.memoizedState!==null&&I(St,e);var t=ie.current,a=w0(t,e.type);t!==a&&(I(Ce,e),I(ie,a))}function Nt(e){Ce.current===e&&(W(ie),W(Ce)),St.current===e&&(W(St),Xi._currentValue=P)}var hn=Object.prototype.hasOwnProperty,oa=n.unstable_scheduleCallback,mn=n.unstable_cancelCallback,ai=n.unstable_shouldYield,zt=n.unstable_requestPaint,Bt=n.unstable_now,ua=n.unstable_getCurrentPriorityLevel,Yn=n.unstable_ImmediatePriority,Fe=n.unstable_UserBlockingPriority,Vn=n.unstable_NormalPriority,gl=n.unstable_LowPriority,Ua=n.unstable_IdlePriority,xl=n.log,Il=n.unstable_setDisableYieldValue,pn=null,tt=null;function Vt(e){if(typeof xl=="function"&&Il(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(pn,e)}catch{}}var st=Math.clz32?Math.clz32:qa,La=Math.log,li=Math.LN2;function qa(e){return e>>>=0,e===0?32:31-(La(e)/li|0)|0}var yn=256,jt=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 ca(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=i&134217727;return S!==0?(i=S&~f,i!==0?c=He(i):(v&=S,v!==0?c=He(v):a||(a=S&~e,a!==0&&(c=He(a))))):(S=i&~f,S!==0?c=He(S):v!==0?c=He(v):a||(a=i&~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 On(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function za(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=yn;return yn<<=1,(yn&4194048)===0&&(yn=256),e}function fa(){var e=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),e}function Kn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function vn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sl(e,t,a,i,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,j=e.expirationTimes,L=e.hiddenUpdates;for(a=v&~a;0<a;){var Y=31-st(a),F=1<<Y;S[Y]=0,j[Y]=-1;var q=L[Y];if(q!==null)for(L[Y]=null,Y=0;Y<q.length;Y++){var z=q[Y];z!==null&&(z.lane&=-536870913)}a&=~F}i!==0&&wl(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function wl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-st(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&4194090}function it(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-st(a),c=1<<i;c&t|e[i]&t&&(e[i]|=t),a&=~c}}function At(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:Q0(e.type))}function kt(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var Tt=Math.random().toString(36).slice(2),J="__reactFiber$"+Tt,ne="__reactProps$"+Tt,de="__reactContainer$"+Tt,Ie="__reactEvents$"+Tt,vt="__reactListeners$"+Tt,bn="__reactHandles$"+Tt,en="__reactResources$"+Tt,rt="__reactMarker$"+Tt;function Rt(e){delete e[J],delete e[ne],delete e[Ie],delete e[vt],delete e[bn]}function Oe(e){var t=e[J];if(t)return t;for(var a=e.parentNode;a;){if(t=a[de]||a[J]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=N0(e);e!==null;){if(a=e[J])return a;e=N0(e)}return t}e=a,a=e.parentNode}return null}function tn(e){if(e=e[J]||e[de]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function El(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function ka(e){var t=e[en];return t||(t=e[en]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ot(e){e[rt]=!0}var si=new Set,ii={};function Fn(e,t){da(e,t),da(e+"Capture",t)}function da(e,t){for(ii[e]=t,e=0;e<t.length;e++)si.add(t[e])}var De=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]*$"),gn={},Wl={};function Cl(e){return hn.call(Wl,e)?!0:hn.call(gn,e)?!1:De.test(e)?Wl[e]=!0:(gn[e]=!0,!1)}function es(e,t,a){if(Cl(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ha(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 ha(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}var qu,mh;function ts(e){if(qu===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);qu=t&&t[1]||"",mh=-1<a.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+qo+e+mh}var zo=!1;function Bo(e,t){if(!e||zo)return"";zo=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={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]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var j=v.split(`
43
+ `+qu+e+mh}var zu=!1;function Bu(e,t){if(!e||zu)return"";zu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={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]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var j=v.split(`
44
44
  `),L=S.split(`
45
45
  `);for(c=i=0;i<j.length&&!j[i].includes("DetermineComponentFrameRoot");)i++;for(;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;if(i===j.length||c===L.length)for(i=j.length-1,c=L.length-1;1<=i&&0<=c&&j[i]!==L[c];)c--;for(;1<=i&&0<=c;i--,c--)if(j[i]!==L[c]){if(i!==1||c!==1)do if(i--,c--,0>c||j[i]!==L[c]){var Y=`
46
- `+j[i].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=i&&0<=c);break}}}finally{zo=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ts(a):""}function lb(e){switch(e.tag){case 26:case 27:case 5:return ts(e.type);case 16:return ts("Lazy");case 13:return ts("Suspense");case 19:return ts("SuspenseList");case 0:case 15:return Bo(e.type,!1);case 11:return Bo(e.type.render,!1);case 1:return Bo(e.type,!0);case 31:return ts("Activity");default:return""}}function ph(e){try{var t="";do t+=lb(e),e=e.return;while(e);return t}catch(a){return`
46
+ `+j[i].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=i&&0<=c);break}}}finally{zu=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ts(a):""}function lb(e){switch(e.tag){case 26:case 27:case 5:return ts(e.type);case 16:return ts("Lazy");case 13:return ts("Suspense");case 19:return ts("SuspenseList");case 0:case 15:return Bu(e.type,!1);case 11:return Bu(e.type.render,!1);case 1:return Bu(e.type,!0);case 31:return ts("Activity");default:return""}}function ph(e){try{var t="";do t+=lb(e),e=e.return;while(e);return t}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
- `+a.stack}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sb(e){var t=yh(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+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){i=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rr(e){e._valueTracker||(e._valueTracker=sb(e))}function vh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=yh(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function Or(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 ib=/[\n"\\]/g;function Sn(e){return e.replace(ib,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ko(e,t,a,i,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=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Ho(e,v,xn(t)):a!=null?Ho(e,v,xn(a)):i!=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=""+xn(S):e.removeAttribute("name")}function bh(e,t,a,i,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?""+xn(a):"",t=t!=null?""+xn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=S?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function Ho(e,t,a){t==="number"&&Or(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ns(e,t,a,i){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&&i&&(e[a].defaultSelected=!0)}else{for(a=""+xn(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function gh(e,t,a){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+xn(a):""}function xh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(s(92));if(Se(i)){if(1<i.length)throw Error(s(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=xn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i)}function as(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var rb=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 Sh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||rb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function wh(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&a[c]!==i&&Sh(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&Sh(e,f,t[f])}function Qo(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 ub=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"]]),ob=/^[\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 Dr(e){return ob.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var $o=null;function Yo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ls=null,ss=null;function Eh(e){var t=tn(e);if(t&&(e=t.stateNode)){var a=e[ne]||null;e:switch(e=t.stateNode,t.type){case"input":if(ko(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="'+Sn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var c=i[ne]||null;if(!c)throw Error(s(90));ko(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&vh(i)}break e;case"textarea":gh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ns(e,!!a.multiple,t,!1)}}}var Vo=!1;function Ch(e,t,a){if(Vo)return e(t,a);Vo=!0;try{var i=e(t);return i}finally{if(Vo=!1,(ls!==null||ss!==null)&&(vu(),ls&&(t=ls,e=ss,ss=ls=null,Eh(t),e)))for(t=0;t<e.length;t++)Eh(e[t])}}function ri(e,t){var a=e.stateNode;if(a===null)return null;var i=a[ne]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ko=!1;if(ma)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Ko=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Ko=!1}var Qa=null,Fo=null,Mr=null;function _h(){if(Mr)return Mr;var e,t=Fo,a=t.length,i,c="value"in Qa?Qa.value:Qa.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var v=a-e;for(i=1;i<=v&&t[a-i]===c[f-i];i++);return Mr=c.slice(e,1<i?1-i:void 0)}function Ur(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 Lr(){return!0}function Nh(){return!1}function Kt(e){function t(a,i,c,f,v){this._reactName=a,this._targetInst=c,this.type=i,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)?Lr:Nh,this.isPropagationStopped=Nh,this}return b(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=Lr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),t}var Cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qr=Kt(Cl),oi=b({},Cl,{view:0,detail:0}),cb=Kt(oi),Go,Xo,ci,zr=b({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jo,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!==ci&&(ci&&e.type==="mousemove"?(Go=e.screenX-ci.screenX,Xo=e.screenY-ci.screenY):Xo=Go=0,ci=e),Go)},movementY:function(e){return"movementY"in e?e.movementY:Xo}}),jh=Kt(zr),fb=b({},zr,{dataTransfer:0}),db=Kt(fb),hb=b({},oi,{relatedTarget:0}),Zo=Kt(hb),mb=b({},Cl,{animationName:0,elapsedTime:0,pseudoElement:0}),pb=Kt(mb),yb=b({},Cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vb=Kt(yb),bb=b({},Cl,{data:0}),Ah=Kt(bb),gb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xb={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"},Sb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sb[e])?!!t[e]:!1}function Jo(){return wb}var Eb=b({},oi,{key:function(e){if(e.key){var t=gb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jo,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cb=Kt(Eb),_b=b({},zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Kt(_b),Nb=b({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jo}),jb=Kt(Nb),Ab=b({},Cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tb=Kt(Ab),Rb=b({},zr,{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}),Ob=Kt(Rb),Db=b({},Cl,{newState:0,oldState:0}),Mb=Kt(Db),Ub=[9,13,27,32],Po=ma&&"CompositionEvent"in window,fi=null;ma&&"documentMode"in document&&(fi=document.documentMode);var Lb=ma&&"TextEvent"in window&&!fi,Rh=ma&&(!Po||fi&&8<fi&&11>=fi),Oh=" ",Dh=!1;function Mh(e,t){switch(e){case"keyup":return Ub.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var is=!1;function qb(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(Dh=!0,Oh);case"textInput":return e=t.data,e===Oh&&Dh?null:e;default:return null}}function zb(e,t){if(is)return e==="compositionend"||!Po&&Mh(e,t)?(e=_h(),Mr=Fo=Qa=null,is=!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 Rh&&t.locale!=="ko"?null:t.data;default:return null}}var Bb={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 Lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bb[e.type]:t==="textarea"}function qh(e,t,a,i){ls?ss?ss.push(i):ss=[i]:ls=i,t=Eu(t,"onChange"),0<t.length&&(a=new qr("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var di=null,hi=null;function kb(e){y0(e,0)}function Br(e){var t=wl(e);if(vh(t))return e}function zh(e,t){if(e==="change")return t}var Bh=!1;if(ma){var Io;if(ma){var Wo="oninput"in document;if(!Wo){var kh=document.createElement("div");kh.setAttribute("oninput","return;"),Wo=typeof kh.oninput=="function"}Io=Wo}else Io=!1;Bh=Io&&(!document.documentMode||9<document.documentMode)}function Hh(){di&&(di.detachEvent("onpropertychange",Qh),hi=di=null)}function Qh(e){if(e.propertyName==="value"&&Br(hi)){var t=[];qh(t,hi,e,Yo(e)),Ch(kb,t)}}function Hb(e,t,a){e==="focusin"?(Hh(),di=t,hi=a,di.attachEvent("onpropertychange",Qh)):e==="focusout"&&Hh()}function Qb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Br(hi)}function $b(e,t){if(e==="click")return Br(t)}function Yb(e,t){if(e==="input"||e==="change")return Br(t)}function Vb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:Vb;function mi(e,t){if(nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var c=a[i];if(!hn.call(t,c)||!nn(e[c],t[c]))return!1}return!0}function $h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yh(e,t){var a=$h(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=$h(a)}}function Vh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Or(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=Or(e.document)}return t}function ec(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 Kb=ma&&"documentMode"in document&&11>=document.documentMode,rs=null,tc=null,pi=null,nc=!1;function Fh(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;nc||rs==null||rs!==Or(i)||(i=rs,"selectionStart"in i&&ec(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),pi&&mi(pi,i)||(pi=i,i=Eu(tc,"onSelect"),0<i.length&&(t=new qr("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=rs)))}function _l(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var us={animationend:_l("Animation","AnimationEnd"),animationiteration:_l("Animation","AnimationIteration"),animationstart:_l("Animation","AnimationStart"),transitionrun:_l("Transition","TransitionRun"),transitionstart:_l("Transition","TransitionStart"),transitioncancel:_l("Transition","TransitionCancel"),transitionend:_l("Transition","TransitionEnd")},ac={},Gh={};ma&&(Gh=document.createElement("div").style,"AnimationEvent"in window||(delete us.animationend.animation,delete us.animationiteration.animation,delete us.animationstart.animation),"TransitionEvent"in window||delete us.transitionend.transition);function Nl(e){if(ac[e])return ac[e];if(!us[e])return e;var t=us[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gh)return ac[e]=t[a];return e}var Xh=Nl("animationend"),Zh=Nl("animationiteration"),Jh=Nl("animationstart"),Fb=Nl("transitionrun"),Gb=Nl("transitionstart"),Xb=Nl("transitioncancel"),Ph=Nl("transitionend"),Ih=new Map,lc="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(" ");lc.push("scrollEnd");function Dn(e,t){Ih.set(e,t),Fn(t,[e])}var Wh=new WeakMap;function wn(e,t){if(typeof e=="object"&&e!==null){var a=Wh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ph(t)},Wh.set(e,t),t)}return{value:e,source:t,stack:ph(t)}}var En=[],os=0,sc=0;function kr(){for(var e=os,t=sc=os=0;t<e;){var a=En[t];En[t++]=null;var i=En[t];En[t++]=null;var c=En[t];En[t++]=null;var f=En[t];if(En[t++]=null,i!==null&&c!==null){var v=i.pending;v===null?c.next=c:(c.next=v.next,v.next=c),i.pending=c}f!==0&&em(a,c,f)}}function Hr(e,t,a,i){En[os++]=e,En[os++]=t,En[os++]=a,En[os++]=i,sc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function ic(e,t,a,i){return Hr(e,t,a,i),Qr(e)}function cs(e,t){return Hr(e,null,null,t),Qr(e)}function em(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,i=f.alternate,i!==null&&(i.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-st(a),e=f.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=a|536870912),f):null}function Qr(e){if(50<Hi)throw Hi=0,hf=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fs={};function Zb(e,t,a,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,a,i){return new Zb(e,t,a,i)}function rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pa(e,t){var a=e.alternate;return a===null?(a=an(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 tm(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 $r(e,t,a,i,c,f){var v=0;if(i=e,typeof e=="function")rc(e)&&(v=1);else if(typeof e=="string")v=Pg(e,a,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=an(31,a,t,c),e.elementType=te,e.lanes=f,e;case E:return jl(a.children,c,f,t);case A:v=8,c|=24;break;case N:return e=an(12,a,t,c|2),e.elementType=N,e.lanes=f,e;case V:return e=an(13,a,t,c),e.elementType=V,e.lanes=f,e;case H:return e=an(19,a,t,c),e.elementType=H,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:case T:v=10;break e;case O:v=9;break e;case $:v=11;break e;case G:v=14;break e;case Z:v=16,i=null;break e}v=29,a=Error(s(130,e===null?"null":typeof e,"")),i=null}return t=an(v,a,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function jl(e,t,a,i){return e=an(7,e,i,t),e.lanes=a,e}function uc(e,t,a){return e=an(6,e,null,t),e.lanes=a,e}function oc(e,t,a){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ds=[],hs=0,Yr=null,Vr=0,Cn=[],_n=0,Al=null,ya=1,va="";function Tl(e,t){ds[hs++]=Vr,ds[hs++]=Yr,Yr=e,Vr=t}function nm(e,t,a){Cn[_n++]=ya,Cn[_n++]=va,Cn[_n++]=Al,Al=e;var i=ya;e=va;var c=32-st(i)-1;i&=~(1<<c),a+=1;var f=32-st(t)+c;if(30<f){var v=c-c%5;f=(i&(1<<v)-1).toString(32),i>>=v,c-=v,ya=1<<32-st(t)+c|a<<c|i,va=f+e}else ya=1<<f|a<<c|i,va=e}function cc(e){e.return!==null&&(Tl(e,1),nm(e,1,0))}function fc(e){for(;e===Yr;)Yr=ds[--hs],ds[hs]=null,Vr=ds[--hs],ds[hs]=null;for(;e===Al;)Al=Cn[--_n],Cn[_n]=null,va=Cn[--_n],Cn[_n]=null,ya=Cn[--_n],Cn[_n]=null}var Ht=null,nt=null,Me=!1,Rl=null,Gn=!1,dc=Error(s(519));function Ol(e){var t=Error(s(418,""));throw bi(wn(t,e)),dc}function am(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[J]=e,t[ne]=i,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<$i.length;a++)je($i[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),bh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),Rr(t);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),xh(t,i.value,i.defaultValue,i.children),Rr(t)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||x0(t.textContent,a)?(i.popover!=null&&(je("beforetoggle",t),je("toggle",t)),i.onScroll!=null&&je("scroll",t),i.onScrollEnd!=null&&je("scrollend",t),i.onClick!=null&&(t.onclick=Cu),t=!0):t=!1,t||Ol(e)}function lm(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Ht=Ht.return}}function yi(e){if(e!==Ht)return!1;if(!Me)return lm(e),Me=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Tf(e.type,e.memoizedProps)),a=!a),a&&nt&&Ol(e),lm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){nt=Un(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}nt=null}}else t===27?(t=nt,al(e.type)?(e=Mf,Mf=null,nt=e):nt=t):nt=Ht?Un(e.stateNode.nextSibling):null;return!0}function vi(){nt=Ht=null,Me=!1}function sm(){var e=Rl;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),Rl=null),e}function bi(e){Rl===null?Rl=[e]:Rl.push(e)}var hc=Q(null),Dl=null,ba=null;function $a(e,t,a){I(hc,t._currentValue),t._currentValue=a}function ga(e){e._currentValue=hc.current,W(hc)}function mc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function pc(e,t,a,i){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 j=0;j<t.length;j++)if(S.context===t[j]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),mc(f.return,a,e),i||(v=null);break e}f=S.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(s(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),mc(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 gi(e,t,a,i){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(s(387));if(v=v.memoizedProps,v!==null){var S=c.type;nn(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(s(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Xi):e=[Xi])}c=c.return}e!==null&&pc(t,e,a,i),t.flags|=262144}function Kr(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ml(e){Dl=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return im(Dl,e)}function Fr(e,t){return Dl===null&&Ml(e),im(e,t)}function im(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ba===null){if(e===null)throw Error(s(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return a}var Jb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Pb=n.unstable_scheduleCallback,Ib=n.unstable_NormalPriority,pt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new Jb,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&Pb(Ib,function(){e.controller.abort()})}var Si=null,vc=0,ms=0,ps=null;function Wb(e,t){if(Si===null){var a=Si=[];vc=0,ms=xf(),ps={status:"pending",value:void 0,then:function(i){a.push(i)}}}return vc++,t.then(rm,rm),t}function rm(){if(--vc===0&&Si!==null){ps!==null&&(ps.status="fulfilled");var e=Si;Si=null,ms=0,ps=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eg(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var um=B.S;B.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wb(e,t),um!==null&&um(e,t)};var Ul=Q(null);function bc(){var e=Ul.current;return e!==null?e:Ge.pooledCache}function Gr(e,t){t===null?I(Ul,Ul.current):I(Ul,t.pool)}function om(){var e=bc();return e===null?null:{parent:pt._currentValue,pool:e}}var wi=Error(s(460)),cm=Error(s(474)),Xr=Error(s(542)),gc={then:function(){}};function fm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zr(){}function dm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zr,Zr),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mm(e),e;default:if(typeof t.status=="string")t.then(Zr,Zr);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mm(e),e}throw Ei=t,wi}}var Ei=null;function hm(){if(Ei===null)throw Error(s(459));var e=Ei;return Ei=null,e}function mm(e){if(e===wi||e===Xr)throw Error(s(483))}var Ya=!1;function xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ze&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Qr(e),em(e,null,a),t}return Hr(e,i,t,a),Qr(e)}function Ci(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,it(e,a)}}function wc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){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:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ec=!1;function _i(){if(Ec){var e=ps;if(e!==null)throw e}}function Ni(e,t,a,i){Ec=!1;var c=e.updateQueue;Ya=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var j=S,L=j.next;j.next=null,v===null?f=L:v.next=L,v=j;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==v&&(S===null?Y.firstBaseUpdate=L:S.next=L,Y.lastBaseUpdate=j))}if(f!==null){var F=c.baseState;v=0,Y=L=j=null,S=f;do{var q=S.lane&-536870913,z=q!==S.lane;if(z?(Ae&q)===q:(i&q)===q){q!==0&&q===ms&&(Ec=!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=b({},F,q);break e;case 2:Ya=!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?(L=Y=z,j=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&&(j=F),c.baseState=j,c.firstBaseUpdate=L,c.lastBaseUpdate=Y,f===null&&(c.shared.lanes=0),Wa|=v,e.lanes=v,e.memoizedState=F}}function pm(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function ym(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)pm(a[e],t)}var ys=Q(null),Jr=Q(0);function vm(e,t){e=Na,I(Jr,e),I(ys,t),Na=e|t.baseLanes}function Cc(){I(Jr,Na),I(ys,ys.current)}function _c(){Na=Jr.current,W(ys),W(Jr)}var Fa=0,xe=null,Qe=null,ft=null,Pr=!1,vs=!1,Ll=!1,Ir=0,ji=0,bs=null,tg=0;function ot(){throw Error(s(321))}function Nc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!nn(e[a],t[a]))return!1;return!0}function jc(e,t,a,i,c,f){return Fa=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?ep:tp,Ll=!1,f=a(i,c),Ll=!1,vs&&(f=gm(t,a,i,c)),bm(e),f}function bm(e){B.H=lu;var t=Qe!==null&&Qe.next!==null;if(Fa=0,ft=Qe=xe=null,Pr=!1,ji=0,bs=null,t)throw Error(s(300));e===null||bt||(e=e.dependencies,e!==null&&Kr(e)&&(bt=!0))}function gm(e,t,a,i){xe=e;var c=0;do{if(vs&&(bs=null),ji=0,vs=!1,25<=c)throw Error(s(301));if(c+=1,ft=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)}B.H=ug,f=t(a,i)}while(vs);return f}function ng(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Ai(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Ac(){var e=Ir!==0;return Ir=0,e}function Tc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Rc(e){if(Pr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pr=!1}Fa=0,ft=Qe=xe=null,vs=!1,ji=Ir=0,bs=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?xe.memoizedState=ft=e:ft=ft.next=e,ft}function dt(){if(Qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=ft===null?xe.memoizedState:ft.next;if(t!==null)ft=t,Qe=e;else{if(e===null)throw xe.alternate===null?Error(s(467)):Error(s(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},ft===null?xe.memoizedState=ft=e:ft=ft.next=e}return ft}function Oc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ai(e){var t=ji;return ji+=1,bs===null&&(bs=[]),e=dm(bs,e,t),t=xe,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?ep:tp),e}function Wr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ai(e);if(e.$$typeof===T)return Ot(e)}throw Error(s(438,String(e)))}function Dc(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=xe.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Oc(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=pe;return t.index++,a}function xa(e,t){return typeof t=="function"?t(e):t}function eu(e){var t=dt();return Mc(t,Qe,e)}function Mc(e,t,a){var i=e.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=a;var c=e.baseQueue,f=i.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,i.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var S=v=null,j=null,L=t,Y=!1;do{var F=L.lane&-536870913;if(F!==L.lane?(Ae&F)===F:(Fa&F)===F){var q=L.revertLane;if(q===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),F===ms&&(Y=!0);else if((Fa&q)===q){L=L.next,q===ms&&(Y=!0);continue}else F={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},j===null?(S=j=F,v=f):j=j.next=F,xe.lanes|=q,Wa|=q;F=L.action,Ll&&a(f,F),f=L.hasEagerState?L.eagerState:a(f,F)}else q={lane:F,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},j===null?(S=j=q,v=f):j=j.next=q,xe.lanes|=F,Wa|=F;L=L.next}while(L!==null&&L!==t);if(j===null?v=f:j.next=S,!nn(f,e.memoizedState)&&(bt=!0,Y&&(a=ps,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=j,i.lastRenderedState=f}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Uc(e){var t=dt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var i=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);nn(f,t.memoizedState)||(bt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,i]}function xm(e,t,a){var i=xe,c=dt(),f=Me;if(f){if(a===void 0)throw Error(s(407));a=a()}else a=t();var v=!nn((Qe||c).memoizedState,a);v&&(c.memoizedState=a,bt=!0),c=c.queue;var S=Em.bind(null,i,c,e);if(Ti(2048,8,S,[e]),c.getSnapshot!==t||v||ft!==null&&ft.memoizedState.tag&1){if(i.flags|=2048,gs(9,tu(),wm.bind(null,i,c,a,t),null),Ge===null)throw Error(s(349));f||(Fa&124)!==0||Sm(i,t,a)}return a}function Sm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=xe.updateQueue,t===null?(t=Oc(),xe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function wm(e,t,a,i){t.value=a,t.getSnapshot=i,Cm(t)&&_m(e)}function Em(e,t,a){return a(function(){Cm(t)&&_m(e)})}function Cm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!nn(e,a)}catch{return!0}}function _m(e){var t=cs(e,2);t!==null&&on(t,e,2)}function Lc(e){var t=Ft();if(typeof e=="function"){var a=e;if(e=a(),Ll){Vt(!0);try{a()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t}function Nm(e,t,a,i){return e.baseState=a,Mc(e,Qe,typeof i=="function"?i:xa)}function ag(e,t,a,i,c){if(au(e))throw Error(s(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)}};B.T!==null?a(!0):f.isTransition=!1,i(f),a=t.pending,a===null?(f.next=t.pending=f,jm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function jm(e,t){var a=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=B.T,v={};B.T=v;try{var S=a(c,i),j=B.S;j!==null&&j(v,S),Am(e,t,S)}catch(L){qc(e,t,L)}finally{B.T=f}}else try{f=a(c,i),Am(e,t,f)}catch(L){qc(e,t,L)}}function Am(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Tm(e,t,i)},function(i){return qc(e,t,i)}):Tm(e,t,a)}function Tm(e,t,a){t.status="fulfilled",t.value=a,Rm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,jm(e,a)))}function qc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Rm(t),t=t.next;while(t!==i)}e.action=null}function Rm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Om(e,t){return t}function Dm(e,t){if(Me){var a=Ge.formState;if(a!==null){e:{var i=xe;if(Me){if(nt){t:{for(var c=nt,f=Gn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Un(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){nt=Un(c.nextSibling),i=c.data==="F!";break e}}Ol(i)}i=!1}i&&(t=a[0])}}return a=Ft(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Om,lastRenderedState:t},a.queue=i,a=Pm.bind(null,xe,i),i.dispatch=a,i=Lc(!1),f=Qc.bind(null,xe,!1,i.queue),i=Ft(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,a=ag.bind(null,xe,c,f,a),c.dispatch=a,i.memoizedState=e,[t,a,!1]}function Mm(e){var t=dt();return Um(t,Qe,e)}function Um(e,t,a){if(t=Mc(e,t,Om)[0],e=eu(xa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ai(t)}catch(v){throw v===wi?Xr:v}else i=t;t=dt();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,gs(9,tu(),lg.bind(null,c,a),null)),[i,f,e]}function lg(e,t){e.action=t}function Lm(e){var t=dt(),a=Qe;if(a!==null)return Um(t,a,e);dt(),t=t.memoizedState,a=dt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function gs(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Oc(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function tu(){return{destroy:void 0,resource:void 0}}function qm(){return dt().memoizedState}function nu(e,t,a,i){var c=Ft();i=i===void 0?null:i,xe.flags|=e,c.memoizedState=gs(1|t,tu(),a,i)}function Ti(e,t,a,i){var c=dt();i=i===void 0?null:i;var f=c.memoizedState.inst;Qe!==null&&i!==null&&Nc(i,Qe.memoizedState.deps)?c.memoizedState=gs(t,f,a,i):(xe.flags|=e,c.memoizedState=gs(1|t,f,a,i))}function zm(e,t){nu(8390656,8,e,t)}function Bm(e,t){Ti(2048,8,e,t)}function km(e,t){return Ti(4,2,e,t)}function Hm(e,t){return Ti(4,4,e,t)}function Qm(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 $m(e,t,a){a=a!=null?a.concat([e]):null,Ti(4,4,Qm.bind(null,t,e),a)}function zc(){}function Ym(e,t){var a=dt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Nc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Vm(e,t){var a=dt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Nc(t,i[1]))return i[0];if(i=e(),Ll){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[i,t],i}function Bc(e,t,a){return a===void 0||(Fa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Gp(),xe.lanes|=e,Wa|=e,a)}function Km(e,t,a,i){return nn(a,t)?a:ys.current!==null?(e=Bc(e,a,i),nn(e,t)||(bt=!0),e):(Fa&42)===0?(bt=!0,e.memoizedState=a):(e=Gp(),xe.lanes|=e,Wa|=e,t)}function Fm(e,t,a,i,c){var f=X.p;X.p=f!==0&&8>f?f:8;var v=B.T,S={};B.T=S,Qc(e,!1,t,a);try{var j=c(),L=B.S;if(L!==null&&L(S,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var Y=eg(j,i);Ri(e,t,Y,un(e))}else Ri(e,t,i,un(e))}catch(F){Ri(e,t,{then:function(){},status:"rejected",reason:F},un())}finally{X.p=f,B.T=v}}function sg(){}function kc(e,t,a,i){if(e.tag!==5)throw Error(s(476));var c=Gm(e).queue;Fm(e,c,t,P,a===null?sg:function(){return Xm(e),a(i)})}function Gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:P},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xm(e){var t=Gm(e).next.queue;Ri(e,t,{},un())}function Hc(){return Ot(Xi)}function Zm(){return dt().memoizedState}function Jm(){return dt().memoizedState}function ig(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=un();e=Va(a);var i=Ka(t,e,a);i!==null&&(on(i,t,a),Ci(i,t,a)),t={cache:yc()},e.payload=t;return}t=t.return}}function rg(e,t,a){var i=un();a={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},au(e)?Im(t,a):(a=ic(e,t,a,i),a!==null&&(on(a,e,i),Wm(a,t,i)))}function Pm(e,t,a){var i=un();Ri(e,t,a,i)}function Ri(e,t,a,i){var c={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(au(e))Im(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,nn(S,v))return Hr(e,t,c,0),Ge===null&&kr(),!1}catch{}finally{}if(a=ic(e,t,c,i),a!==null)return on(a,e,i),Wm(a,t,i),!0}return!1}function Qc(e,t,a,i){if(i={lane:2,revertLane:xf(),action:i,hasEagerState:!1,eagerState:null,next:null},au(e)){if(t)throw Error(s(479))}else t=ic(e,a,i,2),t!==null&&on(t,e,2)}function au(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Im(e,t){vs=Pr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wm(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,it(e,a)}}var lu={readContext:Ot,use:Wr,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot},ep={readContext:Ot,use:Wr,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:zm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,nu(4194308,4,Qm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return nu(4194308,4,e,t)},useInsertionEffect:function(e,t){nu(4,2,e,t)},useMemo:function(e,t){var a=Ft();t=t===void 0?null:t;var i=e();if(Ll){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Ft();if(a!==void 0){var c=a(t);if(Ll){Vt(!0);try{a(t)}finally{Vt(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=rg.bind(null,xe,e),[i.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,a=Pm.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:zc,useDeferredValue:function(e,t){var a=Ft();return Bc(a,e,t)},useTransition:function(){var e=Lc(!1);return e=Fm.bind(null,xe,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=xe,c=Ft();if(Me){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),Ge===null)throw Error(s(349));(Ae&124)!==0||Sm(i,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,zm(Em.bind(null,i,f,e),[e]),i.flags|=2048,gs(9,tu(),wm.bind(null,i,f,a,t),null),a},useId:function(){var e=Ft(),t=Ge.identifierPrefix;if(Me){var a=va,i=ya;a=(i&~(1<<32-st(i)-1)).toString(32)+a,t="«"+t+"R"+a,a=Ir++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=tg++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Hc,useFormState:Dm,useActionState:Dm,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=Qc.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Dc,useCacheRefresh:function(){return Ft().memoizedState=ig.bind(null,xe)}},tp={readContext:Ot,use:Wr,useCallback:Ym,useContext:Ot,useEffect:Bm,useImperativeHandle:$m,useInsertionEffect:km,useLayoutEffect:Hm,useMemo:Vm,useReducer:eu,useRef:qm,useState:function(){return eu(xa)},useDebugValue:zc,useDeferredValue:function(e,t){var a=dt();return Km(a,Qe.memoizedState,e,t)},useTransition:function(){var e=eu(xa)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:xm,useId:Zm,useHostTransitionStatus:Hc,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,t){var a=dt();return Nm(a,Qe,e,t)},useMemoCache:Dc,useCacheRefresh:Jm},ug={readContext:Ot,use:Wr,useCallback:Ym,useContext:Ot,useEffect:Bm,useImperativeHandle:$m,useInsertionEffect:km,useLayoutEffect:Hm,useMemo:Vm,useReducer:Uc,useRef:qm,useState:function(){return Uc(xa)},useDebugValue:zc,useDeferredValue:function(e,t){var a=dt();return Qe===null?Bc(a,e,t):Km(a,Qe.memoizedState,e,t)},useTransition:function(){var e=Uc(xa)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:xm,useId:Zm,useHostTransitionStatus:Hc,useFormState:Lm,useActionState:Lm,useOptimistic:function(e,t){var a=dt();return Qe!==null?Nm(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Jm},xs=null,Oi=0;function su(e){var t=Oi;return Oi+=1,xs===null&&(xs=[]),dm(xs,e,t)}function Di(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function iu(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function np(e){var t=e._init;return t(e._payload)}function ap(e){function t(M,D){if(e){var U=M.deletions;U===null?(M.deletions=[D],M.flags|=16):U.push(D)}}function a(M,D){if(!e)return null;for(;D!==null;)t(M,D),D=D.sibling;return null}function i(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=pa(M,D),M.index=0,M.sibling=null,M}function f(M,D,U){return M.index=U,e?(U=M.alternate,U!==null?(U=U.index,U<D?(M.flags|=67108866,D):U):(M.flags|=67108866,D)):(M.flags|=1048576,D)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,D,U,K){return D===null||D.tag!==6?(D=uc(U,M.mode,K),D.return=M,D):(D=c(D,U),D.return=M,D)}function j(M,D,U,K){var ee=U.type;return ee===E?Y(M,D,U.props.children,K,U.key):D!==null&&(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&np(ee)===D.type)?(D=c(D,U.props),Di(D,U),D.return=M,D):(D=$r(U.type,U.key,U.props,null,M.mode,K),Di(D,U),D.return=M,D)}function L(M,D,U,K){return D===null||D.tag!==4||D.stateNode.containerInfo!==U.containerInfo||D.stateNode.implementation!==U.implementation?(D=oc(U,M.mode,K),D.return=M,D):(D=c(D,U.children||[]),D.return=M,D)}function Y(M,D,U,K,ee){return D===null||D.tag!==7?(D=jl(U,M.mode,K,ee),D.return=M,D):(D=c(D,U),D.return=M,D)}function F(M,D,U){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=uc(""+D,M.mode,U),D.return=M,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case w:return U=$r(D.type,D.key,D.props,null,M.mode,U),Di(U,D),U.return=M,U;case C:return D=oc(D,M.mode,U),D.return=M,D;case Z:var K=D._init;return D=K(D._payload),F(M,D,U)}if(Se(D)||ge(D))return D=jl(D,M.mode,U,null),D.return=M,D;if(typeof D.then=="function")return F(M,su(D),U);if(D.$$typeof===T)return F(M,Fr(M,D),U);iu(M,D)}return null}function q(M,D,U,K){var ee=D!==null?D.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ee!==null?null:S(M,D,""+U,K);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return U.key===ee?j(M,D,U,K):null;case C:return U.key===ee?L(M,D,U,K):null;case Z:return ee=U._init,U=ee(U._payload),q(M,D,U,K)}if(Se(U)||ge(U))return ee!==null?null:Y(M,D,U,K,null);if(typeof U.then=="function")return q(M,D,su(U),K);if(U.$$typeof===T)return q(M,D,Fr(M,U),K);iu(M,U)}return null}function z(M,D,U,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return M=M.get(U)||null,S(D,M,""+K,ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return M=M.get(K.key===null?U:K.key)||null,j(D,M,K,ee);case C:return M=M.get(K.key===null?U:K.key)||null,L(D,M,K,ee);case Z:var we=K._init;return K=we(K._payload),z(M,D,U,K,ee)}if(Se(K)||ge(K))return M=M.get(U)||null,Y(D,M,K,ee,null);if(typeof K.then=="function")return z(M,D,U,su(K),ee);if(K.$$typeof===T)return z(M,D,U,Fr(D,K),ee);iu(D,K)}return null}function me(M,D,U,K){for(var ee=null,we=null,se=D,he=D=0,xt=null;se!==null&&he<U.length;he++){se.index>he?(xt=se,se=null):xt=se.sibling;var Te=q(M,se,U[he],K);if(Te===null){se===null&&(se=xt);break}e&&se&&Te.alternate===null&&t(M,se),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te,se=xt}if(he===U.length)return a(M,se),Me&&Tl(M,he),ee;if(se===null){for(;he<U.length;he++)se=F(M,U[he],K),se!==null&&(D=f(se,D,he),we===null?ee=se:we.sibling=se,we=se);return Me&&Tl(M,he),ee}for(se=i(se);he<U.length;he++)xt=z(se,M,he,U[he],K),xt!==null&&(e&&xt.alternate!==null&&se.delete(xt.key===null?he:xt.key),D=f(xt,D,he),we===null?ee=xt:we.sibling=xt,we=xt);return e&&se.forEach(function(ul){return t(M,ul)}),Me&&Tl(M,he),ee}function fe(M,D,U,K){if(U==null)throw Error(s(151));for(var ee=null,we=null,se=D,he=D=0,xt=null,Te=U.next();se!==null&&!Te.done;he++,Te=U.next()){se.index>he?(xt=se,se=null):xt=se.sibling;var ul=q(M,se,Te.value,K);if(ul===null){se===null&&(se=xt);break}e&&se&&ul.alternate===null&&t(M,se),D=f(ul,D,he),we===null?ee=ul:we.sibling=ul,we=ul,se=xt}if(Te.done)return a(M,se),Me&&Tl(M,he),ee;if(se===null){for(;!Te.done;he++,Te=U.next())Te=F(M,Te.value,K),Te!==null&&(D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return Me&&Tl(M,he),ee}for(se=i(se);!Te.done;he++,Te=U.next())Te=z(se,M,he,Te.value,K),Te!==null&&(e&&Te.alternate!==null&&se.delete(Te.key===null?he:Te.key),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return e&&se.forEach(function(ox){return t(M,ox)}),Me&&Tl(M,he),ee}function Ye(M,D,U,K){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:e:{for(var ee=U.key;D!==null;){if(D.key===ee){if(ee=U.type,ee===E){if(D.tag===7){a(M,D.sibling),K=c(D,U.props.children),K.return=M,M=K;break e}}else if(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&np(ee)===D.type){a(M,D.sibling),K=c(D,U.props),Di(K,U),K.return=M,M=K;break e}a(M,D);break}else t(M,D);D=D.sibling}U.type===E?(K=jl(U.props.children,M.mode,K,U.key),K.return=M,M=K):(K=$r(U.type,U.key,U.props,null,M.mode,K),Di(K,U),K.return=M,M=K)}return v(M);case C:e:{for(ee=U.key;D!==null;){if(D.key===ee)if(D.tag===4&&D.stateNode.containerInfo===U.containerInfo&&D.stateNode.implementation===U.implementation){a(M,D.sibling),K=c(D,U.children||[]),K.return=M,M=K;break e}else{a(M,D);break}else t(M,D);D=D.sibling}K=oc(U,M.mode,K),K.return=M,M=K}return v(M);case Z:return ee=U._init,U=ee(U._payload),Ye(M,D,U,K)}if(Se(U))return me(M,D,U,K);if(ge(U)){if(ee=ge(U),typeof ee!="function")throw Error(s(150));return U=ee.call(U),fe(M,D,U,K)}if(typeof U.then=="function")return Ye(M,D,su(U),K);if(U.$$typeof===T)return Ye(M,D,Fr(M,U),K);iu(M,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,D!==null&&D.tag===6?(a(M,D.sibling),K=c(D,U),K.return=M,M=K):(a(M,D),K=uc(U,M.mode,K),K.return=M,M=K),v(M)):a(M,D)}return function(M,D,U,K){try{Oi=0;var ee=Ye(M,D,U,K);return xs=null,ee}catch(se){if(se===wi||se===Xr)throw se;var we=an(29,se,null,M.mode);return we.lanes=K,we.return=M,we}finally{}}}var Ss=ap(!0),lp=ap(!1),Nn=Q(null),Xn=null;function Ga(e){var t=e.alternate;I(yt,yt.current&1),I(Nn,e),Xn===null&&(t===null||ys.current!==null||t.memoizedState!==null)&&(Xn=e)}function sp(e){if(e.tag===22){if(I(yt,yt.current),I(Nn,e),Xn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Xn=e)}}else Xa()}function Xa(){I(yt,yt.current),I(Nn,Nn.current)}function Sa(e){W(Nn),Xn===e&&(Xn=null),W(yt)}var yt=Q(0);function ru(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==="$?"||Df(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 $c(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Yc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=un(),c=Va(i);c.payload=t,a!=null&&(c.callback=a),t=Ka(e,c,i),t!==null&&(on(t,e,i),Ci(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=un(),c=Va(i);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Ka(e,c,i),t!==null&&(on(t,e,i),Ci(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=un(),i=Va(a);i.tag=2,t!=null&&(i.callback=t),t=Ka(e,i,a),t!==null&&(on(t,e,a),Ci(t,e,a))}};function ip(e,t,a,i,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,v):t.prototype&&t.prototype.isPureReactComponent?!mi(a,i)||!mi(c,f):!0}function rp(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Yc.enqueueReplaceState(t,t.state,null)}function ql(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}var uu=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 up(e){uu(e)}function op(e){console.error(e)}function cp(e){uu(e)}function ou(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function fp(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Vc(e,t,a){return a=Va(a),a.tag=3,a.payload={element:null},a.callback=function(){ou(e,t)},a}function dp(e){return e=Va(e),e.tag=3,e}function hp(e,t,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=i.value;e.payload=function(){return c(f)},e.callback=function(){fp(t,a,i)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){fp(t,a,i),typeof c!="function"&&(el===null?el=new Set([this]):el.add(this));var S=i.stack;this.componentDidCatch(i.value,{componentStack:S!==null?S:""})})}function og(e,t,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&gi(t,a,c,!0),a=Nn.current,a!==null){switch(a.tag){case 13:return Xn===null?pf():a.alternate===null&&at===0&&(at=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===gc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),vf(e,i,c)),!1;case 22:return a.flags|=65536,i===gc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),vf(e,i,c)),!1}throw Error(s(435,a.tag))}return vf(e,i,c),pf(),!1}if(Me)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==dc&&(e=Error(s(422),{cause:i}),bi(wn(e,a)))):(i!==dc&&(t=Error(s(423),{cause:i}),bi(wn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=wn(i,a),c=Vc(e.stateNode,i,c),wc(e,c),at!==4&&(at=2)),!1;var f=Error(s(520),{cause:i});if(f=wn(f,a),ki===null?ki=[f]:ki.push(f),at!==4&&(at=2),t===null)return!0;i=wn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Vc(a.stateNode,i,e),wc(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"&&(el===null||!el.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=dp(c),hp(c,e,a,i),wc(a,c),!1}a=a.return}while(a!==null);return!1}var mp=Error(s(461)),bt=!1;function wt(e,t,a,i){t.child=e===null?lp(t,null,a,i):Ss(t,e.child,a,i)}function pp(e,t,a,i,c){a=a.render;var f=t.ref;if("ref"in i){var v={};for(var S in i)S!=="ref"&&(v[S]=i[S])}else v=i;return Ml(t),i=jc(e,t,a,v,f,c),S=Ac(),e!==null&&!bt?(Tc(e,t,c),wa(e,t,c)):(Me&&S&&cc(t),t.flags|=1,wt(e,t,i,c),t.child)}function yp(e,t,a,i,c){if(e===null){var f=a.type;return typeof f=="function"&&!rc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,vp(e,t,f,i,c)):(e=$r(a.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ic(e,c)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:mi,a(v,i)&&e.ref===t.ref)return wa(e,t,c)}return t.flags|=1,e=pa(f,i),e.ref=t.ref,e.return=t,t.child=e}function vp(e,t,a,i,c){if(e!==null){var f=e.memoizedProps;if(mi(f,i)&&e.ref===t.ref)if(bt=!1,t.pendingProps=i=f,Ic(e,c))(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,wa(e,t,c)}return Kc(e,t,a,i,c)}function bp(e,t,a){var i=t.pendingProps,c=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=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&~i}else t.childLanes=0,t.child=null;return gp(e,t,i,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gr(t,f!==null?f.cachePool:null),f!==null?vm(t,f):Cc(),sp(t);else return t.lanes=t.childLanes=536870912,gp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(Gr(t,f.cachePool),vm(t,f),Xa(),t.memoizedState=null):(e!==null&&Gr(t,null),Cc(),Xa());return wt(e,t,c,a),t.child}function gp(e,t,a,i){var c=bc();return c=c===null?null:{parent:pt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Gr(t,null),Cc(),sp(t),e!==null&&gi(e,t,i,!0),null}function cu(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(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Kc(e,t,a,i,c){return Ml(t),a=jc(e,t,a,i,void 0,c),i=Ac(),e!==null&&!bt?(Tc(e,t,c),wa(e,t,c)):(Me&&i&&cc(t),t.flags|=1,wt(e,t,a,c),t.child)}function xp(e,t,a,i,c,f){return Ml(t),t.updateQueue=null,a=gm(t,i,a,c),bm(e),i=Ac(),e!==null&&!bt?(Tc(e,t,f),wa(e,t,f)):(Me&&i&&cc(t),t.flags|=1,wt(e,t,a,f),t.child)}function Sp(e,t,a,i,c){if(Ml(t),t.stateNode===null){var f=fs,v=a.contextType;typeof v=="object"&&v!==null&&(f=Ot(v)),f=new a(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Yc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},xc(t),v=a.contextType,f.context=typeof v=="object"&&v!==null?Ot(v):fs,f.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&($c(t,a,v,i),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&&Yc.enqueueReplaceState(f,f.state,null),Ni(t,i,f,c),_i(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,j=ql(a,S);f.props=j;var L=f.context,Y=a.contextType;v=fs,typeof Y=="object"&&Y!==null&&(v=Ot(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||L!==v)&&rp(t,f,i,v),Ya=!1;var q=t.memoizedState;f.state=q,Ni(t,i,f,c),_i(),L=t.memoizedState,S||q!==L||Ya?(typeof F=="function"&&($c(t,a,F,i),L=t.memoizedState),(j=Ya||ip(t,a,j,i,q,L,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=i,t.memoizedState=L),f.props=i,f.state=L,f.context=v,i=j):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,Sc(e,t),v=t.memoizedProps,Y=ql(a,v),f.props=Y,F=t.pendingProps,q=f.context,L=a.contextType,j=fs,typeof L=="object"&&L!==null&&(j=Ot(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==F||q!==j)&&rp(t,f,i,j),Ya=!1,q=t.memoizedState,f.state=q,Ni(t,i,f,c),_i();var z=t.memoizedState;v!==F||q!==z||Ya||e!==null&&e.dependencies!==null&&Kr(e.dependencies)?(typeof S=="function"&&($c(t,a,S,i),z=t.memoizedState),(Y=Ya||ip(t,a,Y,i,q,z,j)||e!==null&&e.dependencies!==null&&Kr(e.dependencies))?(L||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,z,j),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,z,j)),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=i,t.memoizedState=z),f.props=i,f.state=z,f.context=j,i=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),i=!1)}return f=i,cu(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Ss(t,e.child,null,c),t.child=Ss(t,null,a,c)):wt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=wa(e,t,c),e}function wp(e,t,a,i){return vi(),t.flags|=256,wt(e,t,a,i),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:om()}}function Xc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=jn),e}function Ep(e,t,a){var i=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(Me){if(c?Ga(t):Xa(),Me){var S=nt,j;if(j=S){e:{for(j=S,S=Gn;j.nodeType!==8;){if(!S){S=null;break e}if(j=Un(j.nextSibling),j===null){S=null;break e}}S=j}S!==null?(t.memoizedState={dehydrated:S,treeContext:Al!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},j=an(18,null,null,0),j.stateNode=S,j.return=t,t.child=j,Ht=t,nt=null,j=!0):j=!1}j||Ol(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Df(S)?t.lanes=32:t.lanes=536870912,null;Sa(t)}return S=i.children,i=i.fallback,c?(Xa(),c=t.mode,S=fu({mode:"hidden",children:S},c),i=jl(i,c,a,null),S.return=t,i.return=t,S.sibling=i,t.child=S,c=t.child,c.memoizedState=Gc(a),c.childLanes=Xc(e,v,a),t.memoizedState=Fc,i):(Ga(t),Zc(t,S))}if(j=e.memoizedState,j!==null&&(S=j.dehydrated,S!==null)){if(f)t.flags&256?(Ga(t),t.flags&=-257,t=Jc(e,t,a)):t.memoizedState!==null?(Xa(),t.child=e.child,t.flags|=128,t=null):(Xa(),c=i.fallback,S=t.mode,i=fu({mode:"visible",children:i.children},S),c=jl(c,S,a,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,Ss(t,e.child,null,a),i=t.child,i.memoizedState=Gc(a),i.childLanes=Xc(e,v,a),t.memoizedState=Fc,t=c);else if(Ga(t),Df(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var L=v.dgst;v=L,i=Error(s(419)),i.stack="",i.digest=v,bi({value:i,source:null,stack:null}),t=Jc(e,t,a)}else if(bt||gi(e,t,a,!1),v=(a&e.childLanes)!==0,bt||v){if(v=Ge,v!==null&&(i=a&-a,i=(i&42)!==0?1:At(i),i=(i&(v.suspendedLanes|a))!==0?0:i,i!==0&&i!==j.retryLane))throw j.retryLane=i,cs(e,i),on(v,e,i),mp;S.data==="$?"||pf(),t=Jc(e,t,a)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,nt=Un(S.nextSibling),Ht=t,Me=!0,Rl=null,Gn=!1,e!==null&&(Cn[_n++]=ya,Cn[_n++]=va,Cn[_n++]=Al,ya=e.id,va=e.overflow,Al=t),t=Zc(t,i.children),t.flags|=4096);return t}return c?(Xa(),c=i.fallback,S=t.mode,j=e.child,L=j.sibling,i=pa(j,{mode:"hidden",children:i.children}),i.subtreeFlags=j.subtreeFlags&65011712,L!==null?c=pa(L,c):(c=jl(c,S,a,null),c.flags|=2),c.return=t,i.return=t,i.sibling=c,t.child=i,i=c,c=t.child,S=e.child.memoizedState,S===null?S=Gc(a):(j=S.cachePool,j!==null?(L=pt._currentValue,j=j.parent!==L?{parent:L,pool:L}:j):j=om(),S={baseLanes:S.baseLanes|a,cachePool:j}),c.memoizedState=S,c.childLanes=Xc(e,v,a),t.memoizedState=Fc,i):(Ga(t),a=e.child,e=a.sibling,a=pa(a,{mode:"visible",children:i.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 Zc(e,t){return t=fu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fu(e,t){return e=an(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Jc(e,t,a){return Ss(t,e.child,null,a),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),mc(e.return,t,a)}function Pc(e,t,a,i,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=a,f.tailMode=c)}function _p(e,t,a){var i=t.pendingProps,c=i.revealOrder,f=i.tail;if(wt(e,t,i.children,a),i=yt.current,(i&2)!==0)i=i&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&&Cp(e,a,t);else if(e.tag===19)Cp(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}i&=1}switch(I(yt,i),c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&ru(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Pc(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&&ru(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Pc(t,!0,a,null,f);break;case"together":Pc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Wa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(gi(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=pa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=pa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Kr(e)))}function cg(e,t,a){switch(t.tag){case 3:qe(t,t.stateNode.containerInfo),$a(t,pt,e.memoizedState.cache),vi();break;case 27:case 5:$n(t);break;case 4:qe(t,t.stateNode.containerInfo);break;case 10:$a(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Ga(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ep(e,t,a):(Ga(t),e=wa(e,t,a),e!==null?e.sibling:null);Ga(t);break;case 19:var c=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(gi(e,t,a,!1),i=(a&t.childLanes)!==0),c){if(i)return _p(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),i)break;return null;case 22:case 23:return t.lanes=0,bp(e,t,a);case 24:$a(t,pt,e.memoizedState.cache)}return wa(e,t,a)}function Np(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!Ic(e,a)&&(t.flags&128)===0)return bt=!1,cg(e,t,a);bt=(e.flags&131072)!==0}else bt=!1,Me&&(t.flags&1048576)!==0&&nm(t,Vr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,c=i._init;if(i=c(i._payload),t.type=i,typeof i=="function")rc(i)?(e=ql(i,e),t.tag=1,t=Sp(null,t,i,e,a)):(t.tag=0,t=Kc(null,t,i,e,a));else{if(i!=null){if(c=i.$$typeof,c===$){t.tag=11,t=pp(null,t,i,e,a);break e}else if(c===G){t.tag=14,t=yp(null,t,i,e,a);break e}}throw t=ye(i)||i,Error(s(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,c=ql(i,t.pendingProps),Sp(e,t,i,c,a);case 3:e:{if(qe(t,t.stateNode.containerInfo),e===null)throw Error(s(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,Sc(e,t),Ni(t,i,null,a);var v=t.memoizedState;if(i=v.cache,$a(t,pt,i),i!==f.cache&&pc(t,[pt],a,!0),_i(),i=v.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=wp(e,t,i,a);break e}else if(i!==c){c=wn(Error(s(424)),t),bi(c),t=wp(e,t,i,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=Un(e.firstChild),Ht=t,Me=!0,Rl=null,Gn=!0,a=lp(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vi(),i===c){t=wa(e,t,a);break e}wt(e,t,i,a)}t=t.child}return t;case 26:return cu(e,t),e===null?(a=R0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Me||(a=t.type,e=t.pendingProps,i=_u(ce.current).createElement(a),i[J]=t,i[ne]=e,Ct(i,a,e),ut(i),t.stateNode=i):t.memoizedState=R0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $n(t),e===null&&Me&&(i=t.stateNode=j0(t.type,t.pendingProps,ce.current),Ht=t,Gn=!0,c=nt,al(t.type)?(Mf=c,nt=Un(i.firstChild)):nt=c),wt(e,t,t.pendingProps.children,a),cu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((c=i=nt)&&(i=Bg(i,t.type,t.pendingProps,Gn),i!==null?(t.stateNode=i,Ht=t,nt=Un(i.firstChild),Gn=!1,c=!0):c=!1),c||Ol(t)),$n(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,i=f.children,Tf(c,f)?i=null:v!==null&&Tf(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=jc(e,t,ng,null,null,a),Xi._currentValue=c),cu(e,t),wt(e,t,i,a),t.child;case 6:return e===null&&Me&&((e=a=nt)&&(a=kg(a,t.pendingProps,Gn),a!==null?(t.stateNode=a,Ht=t,nt=null,e=!0):e=!1),e||Ol(t)),null;case 13:return Ep(e,t,a);case 4:return qe(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ss(t,null,i,a):wt(e,t,i,a),t.child;case 11:return pp(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 i=t.pendingProps,$a(t,t.type,i.value),wt(e,t,i.children,a),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Ml(t),c=Ot(c),i=i(c),t.flags|=1,wt(e,t,i,a),t.child;case 14:return yp(e,t,t.type,t.pendingProps,a);case 15:return vp(e,t,t.type,t.pendingProps,a);case 19:return _p(e,t,a);case 31:return i=t.pendingProps,a=t.mode,i={mode:i.mode,children:i.children},e===null?(a=fu(i,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=pa(e.child,i),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return bp(e,t,a);case 24:return Ml(t),i=Ot(pt),e===null?(c=bc(),c===null&&(c=Ge,f=yc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:i,cache:c},xc(t),$a(t,pt,c)):((e.lanes&a)!==0&&(Sc(e,t),Ni(t,null,null,a),_i()),c=e.memoizedState,f=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),$a(t,pt,i)):(i=f.cache,$a(t,pt,i),i!==c.cache&&pc(t,[pt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Ea(e){e.flags|=4}function jp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L0(t)){if(t=Nn.current,t!==null&&((Ae&4194048)===Ae?Xn!==null:(Ae&62914560)!==Ae&&(Ae&536870912)===0||t!==Xn))throw Ei=gc,cm;e.flags|=8192}}function du(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?fa():536870912,e.lanes|=t,_s|=t)}function Mi(e,t){if(!Me)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 i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function fg(e,t,a){var i=t.pendingProps;switch(fc(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,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ga(pt),Ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(yi(t)?Ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sm())),We(t),null;case 26:return a=t.memoizedState,e===null?(Ea(t),a!==null?(We(t),jp(t,a)):(We(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Ea(t),We(t),jp(t,a)):(We(t),t.flags&=-16777217):(e.memoizedProps!==i&&Ea(t),We(t),t.flags&=-16777217),null;case 27:Nt(t),a=ce.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return We(t),null}e=ie.current,yi(t)?am(t):(e=j0(c,i,a),t.stateNode=e,Ea(t))}return We(t),null;case 5:if(Nt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return We(t),null}if(e=ie.current,yi(t))am(t);else{switch(c=_u(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 i.is=="string"?c.createElement("select",{is:i.is}):c.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?c.createElement(a,{is:i.is}):c.createElement(a)}}e[J]=t,e[ne]=i;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,i),a){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ea(t)}}return We(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(e=ce.current,yi(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,c=Ht,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[J]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||x0(e.nodeValue,a)),e||Ol(t)}else e=_u(e).createTextNode(i),e[J]=t,t.stateNode=e}return We(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=yi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[J]=t}else vi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),c=!1}else c=sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Sa(t),t):(Sa(t),null)}if(Sa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=i!==null,e=e!==null&&e.memoizedState!==null,a){i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool);var f=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==c&&(i.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),du(t,t.updateQueue),We(t),null;case 4:return Ze(),e===null&&Cf(t.stateNode.containerInfo),We(t),null;case 10:return ga(t.type),We(t),null;case 19:if(W(yt),c=t.memoizedState,c===null)return We(t),null;if(i=(t.flags&128)!==0,f=c.rendering,f===null)if(i)Mi(c,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=ru(e),f!==null){for(t.flags|=128,Mi(c,!1),e=f.updateQueue,t.updateQueue=e,du(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)tm(a,e),a=a.sibling;return I(yt,yt.current&1|2),t.child}e=e.sibling}c.tail!==null&&Bt()>pu&&(t.flags|=128,i=!0,Mi(c,!1),t.lanes=4194304)}else{if(!i)if(e=ru(f),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,du(t,e),Mi(c,!0),c.tail===null&&c.tailMode==="hidden"&&!f.alternate&&!Me)return We(t),null}else 2*Bt()-c.renderingStartTime>pu&&a!==536870912&&(t.flags|=128,i=!0,Mi(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,i?e&1|2:e&1),t):(We(t),null);case 22:case 23:return Sa(t),_c(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),a=t.updateQueue,a!==null&&du(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&W(Ul),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ga(pt),We(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function dg(e,t){switch(fc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(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 Nt(t),null;case 13:if(Sa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));vi()}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 ga(t.type),null;case 22:case 23:return Sa(t),_c(),e!==null&&W(Ul),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(pt),null;case 25:return null;default:return null}}function Ap(e,t){switch(fc(t),t.tag){case 3:ga(pt),Ze();break;case 26:case 27:case 5:Nt(t);break;case 4:Ze();break;case 13:Sa(t);break;case 19:W(yt);break;case 10:ga(t.type);break;case 22:case 23:Sa(t),_c(),e!==null&&W(Ul);break;case 24:ga(pt)}}function Ui(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){i=void 0;var f=a.create,v=a.inst;i=f(),v.destroy=i}a=a.next}while(a!==c)}}catch(S){Ve(t,t.return,S)}}function Za(e,t,a){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&e)===e){var v=i.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,c=t;var j=a,L=S;try{L()}catch(Y){Ve(c,j,Y)}}}i=i.next}while(i!==f)}}catch(Y){Ve(t,t.return,Y)}}function Tp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ym(t,a)}catch(i){Ve(e,e.return,i)}}}function Rp(e,t,a){a.props=ql(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Ve(e,t,i)}}function Li(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(c){Ve(e,t,c)}}function Zn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}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 Op(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(c){Ve(e,e.return,c)}}function Wc(e,t,a){try{var i=e.stateNode;Mg(i,e.type,a,t),i[ne]=t}catch(c){Ve(e,e.return,c)}}function Dp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&al(e.type)||e.tag===4}function ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dp(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&&al(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 tf(e,t,a){var i=e.tag;if(i===5||i===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=Cu));else if(i!==4&&(i===27&&al(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(tf(e,t,a),e=e.sibling;e!==null;)tf(e,t,a),e=e.sibling}function hu(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&al(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(hu(e,t,a),e=e.sibling;e!==null;)hu(e,t,a),e=e.sibling}function Mp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ct(t,i,a),t[J]=e,t[ne]=a}catch(f){Ve(e,e.return,f)}}var Ca=!1,ct=!1,nf=!1,Up=typeof WeakSet=="function"?WeakSet:Set,gt=null;function hg(e,t){if(e=e.containerInfo,jf=Ou,e=Kh(e),ec(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,S=-1,j=-1,L=0,Y=0,F=e,q=null;t:for(;;){for(var z;F!==a||c!==0&&F.nodeType!==3||(S=v+c),F!==f||i!==0&&F.nodeType!==3||(j=v+i),F.nodeType===3&&(v+=F.nodeValue.length),(z=F.firstChild)!==null;)q=F,F=z;for(;;){if(F===e)break t;if(q===a&&++L===c&&(S=v),q===f&&++Y===i&&(j=v),(z=F.nextSibling)!==null)break;F=q,q=F.parentNode}F=z}a=S===-1||j===-1?null:{start:S,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Af={focusedElem:e,selectionRange:a},Ou=!1,gt=t;gt!==null;)if(t=gt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,gt=e;else for(;gt!==null;){switch(t=gt,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,i=a.stateNode;try{var me=ql(a.type,c,a.elementType===a.type);e=i.getSnapshotBeforeUpdate(me,f),i.__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)Of(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Of(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,gt=e;break}gt=t.return}}function Lp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),i&4&&Ui(5,a);break;case 1:if(Ja(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){Ve(a,a.return,v)}else{var c=ql(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ve(a,a.return,v)}}i&64&&Tp(a),i&512&&Li(a,a.return);break;case 3:if(Ja(e,a),i&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{ym(e,t)}catch(v){Ve(a,a.return,v)}}break;case 27:t===null&&i&4&&Mp(a);case 26:case 5:Ja(e,a),t===null&&i&4&&Op(a),i&512&&Li(a,a.return);break;case 12:Ja(e,a);break;case 13:Ja(e,a),i&4&&Bp(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wg.bind(null,a),Hg(e,a))));break;case 22:if(i=a.memoizedState!==null||Ca,!i){t=t!==null&&t.memoizedState!==null||ct,c=Ca;var f=ct;Ca=i,(ct=t)&&!f?Pa(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),Ca=c,ct=f}break;case 30:break;default:Ja(e,a)}}function qp(e){var t=e.alternate;t!==null&&(e.alternate=null,qp(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 Je=null,Gt=!1;function _a(e,t,a){for(a=a.child;a!==null;)zp(e,t,a),a=a.sibling}function zp(e,t,a){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(pn,a)}catch{}switch(a.tag){case 26:ct||Zn(a,t),_a(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||Zn(a,t);var i=Je,c=Gt;al(a.type)&&(Je=a.stateNode,Gt=!1),_a(e,t,a),Vi(a.stateNode),Je=i,Gt=c;break;case 5:ct||Zn(a,t);case 6:if(i=Je,c=Gt,Je=null,_a(e,t,a),Je=i,Gt=c,Je!==null)if(Gt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(a.stateNode)}catch(f){Ve(a,t,f)}else try{Je.removeChild(a.stateNode)}catch(f){Ve(a,t,f)}break;case 18:Je!==null&&(Gt?(e=Je,_0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ii(e)):_0(Je,a.stateNode));break;case 4:i=Je,c=Gt,Je=a.stateNode.containerInfo,Gt=!0,_a(e,t,a),Je=i,Gt=c;break;case 0:case 11:case 14:case 15:ct||Za(2,a,t),ct||Za(4,a,t),_a(e,t,a);break;case 1:ct||(Zn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Rp(a,t,i)),_a(e,t,a);break;case 21:_a(e,t,a);break;case 22:ct=(i=ct)||a.memoizedState!==null,_a(e,t,a),ct=i;break;default:_a(e,t,a)}}function Bp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ii(e)}catch(a){Ve(t,t.return,a)}}function mg(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(s(435,e.tag))}}function af(e,t){var a=mg(e);t.forEach(function(i){var c=Eg.bind(null,e,i);a.has(i)||(a.add(i),i.then(c,c))})}function ln(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],f=e,v=t,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(al(S.type)){Je=S.stateNode,Gt=!1;break e}break;case 5:Je=S.stateNode,Gt=!1;break e;case 3:case 4:Je=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(Je===null)throw Error(s(160));zp(f,v,c),Je=null,Gt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)kp(t,e),t=t.sibling}var Mn=null;function kp(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ln(t,e),sn(e),i&4&&(Za(3,e,e.return),Ui(3,e),Za(5,e,e.return));break;case 1:ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),i&64&&Ca&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var c=Mn;if(ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),i&4){var f=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":f=c.getElementsByTagName("title")[0],(!f||f[rt]||f[J]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),Ct(f,i,a),f[J]=e,ut(f),i=f;break e;case"link":var v=M0("link","href",c).get(i+(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(i),Ct(f,i,a),c.head.appendChild(f);break;case"meta":if(v=M0("meta","content",c).get(i+(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(i),Ct(f,i,a),c.head.appendChild(f);break;default:throw Error(s(468,i))}f[J]=e,ut(f),i=f}e.stateNode=i}else U0(c,e.type,e.stateNode);else e.stateNode=D0(c,i,e.memoizedProps);else f!==i?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,i===null?U0(c,e.type,e.stateNode):D0(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,a.memoizedProps)}break;case 27:ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),a!==null&&i&4&&Wc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),e.flags&32){c=e.stateNode;try{as(c,"")}catch(z){Ve(e,e.return,z)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,Wc(e,c,a!==null?a.memoizedProps:c)),i&1024&&(nf=!0);break;case 6:if(ln(t,e),sn(e),i&4){if(e.stateNode===null)throw Error(s(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(z){Ve(e,e.return,z)}}break;case 3:if(Au=null,c=Mn,Mn=Nu(t.containerInfo),ln(t,e),Mn=c,sn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Ii(t.containerInfo)}catch(z){Ve(e,e.return,z)}nf&&(nf=!1,Hp(e));break;case 4:i=Mn,Mn=Nu(e.stateNode.containerInfo),ln(t,e),sn(e),Mn=i;break;case 12:ln(t,e),sn(e);break;case 13:ln(t,e),sn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(cf=Bt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,af(e,i)));break;case 22:c=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,L=Ca,Y=ct;if(Ca=L||c,ct=Y||j,ln(t,e),ct=Y,Ca=L,sn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||j||Ca||ct||zl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(f=j.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=j.stateNode;var F=j.memoizedProps.style,q=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(z){Ve(j,j.return,z)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=c?"":j.memoizedProps}catch(z){Ve(j,j.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}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,af(e,a))));break;case 19:ln(t,e),sn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,af(e,i)));break;case 30:break;case 21:break;default:ln(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Dp(i)){a=i;break}i=i.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var c=a.stateNode,f=ef(e);hu(e,f,c);break;case 5:var v=a.stateNode;a.flags&32&&(as(v,""),a.flags&=-33);var S=ef(e);hu(e,S,v);break;case 3:case 4:var j=a.stateNode.containerInfo,L=ef(e);tf(e,L,j);break;default:throw Error(s(161))}}catch(Y){Ve(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Hp(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;)Lp(e,t.alternate,t),t=t.sibling}function zl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Za(4,t,t.return),zl(t);break;case 1:Zn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Rp(t,t.return,a),zl(t);break;case 27:Vi(t.stateNode);case 26:case 5:Zn(t,t.return),zl(t);break;case 22:t.memoizedState===null&&zl(t);break;case 30:zl(t);break;default:zl(t)}e=e.sibling}}function Pa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:Pa(c,f,a),Ui(4,f);break;case 1:if(Pa(c,f,a),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(L){Ve(i,i.return,L)}if(i=f,c=i.updateQueue,c!==null){var S=i.stateNode;try{var j=c.shared.hiddenCallbacks;if(j!==null)for(c.shared.hiddenCallbacks=null,c=0;c<j.length;c++)pm(j[c],S)}catch(L){Ve(i,i.return,L)}}a&&v&64&&Tp(f),Li(f,f.return);break;case 27:Mp(f);case 26:case 5:Pa(c,f,a),a&&i===null&&v&4&&Op(f),Li(f,f.return);break;case 12:Pa(c,f,a);break;case 13:Pa(c,f,a),a&&v&4&&Bp(c,f);break;case 22:f.memoizedState===null&&Pa(c,f,a),Li(f,f.return);break;case 30:break;default:Pa(c,f,a)}t=t.sibling}}function lf(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&&xi(a))}function sf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function Jn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,a,i),t=t.sibling}function Qp(e,t,a,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,a,i),c&2048&&Ui(9,t);break;case 1:Jn(e,t,a,i);break;case 3:Jn(e,t,a,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e)));break;case 12:if(c&2048){Jn(e,t,a,i),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(j){Ve(t,t.return,j)}}else Jn(e,t,a,i);break;case 13:Jn(e,t,a,i);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Jn(e,t,a,i):qi(e,t):f._visibility&2?Jn(e,t,a,i):(f._visibility|=2,ws(e,t,a,i,(t.subtreeFlags&10256)!==0)),c&2048&&lf(v,t);break;case 24:Jn(e,t,a,i),c&2048&&sf(t.alternate,t);break;default:Jn(e,t,a,i)}}function ws(e,t,a,i,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var f=e,v=t,S=a,j=i,L=v.flags;switch(v.tag){case 0:case 11:case 15:ws(f,v,S,j,c),Ui(8,v);break;case 23:break;case 22:var Y=v.stateNode;v.memoizedState!==null?Y._visibility&2?ws(f,v,S,j,c):qi(f,v):(Y._visibility|=2,ws(f,v,S,j,c)),c&&L&2048&&lf(v.alternate,v);break;case 24:ws(f,v,S,j,c),c&&L&2048&&sf(v.alternate,v);break;default:ws(f,v,S,j,c)}t=t.sibling}}function qi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,c=i.flags;switch(i.tag){case 22:qi(a,i),c&2048&&lf(i.alternate,i);break;case 24:qi(a,i),c&2048&&sf(i.alternate,i);break;default:qi(a,i)}t=t.sibling}}var zi=8192;function Es(e){if(e.subtreeFlags&zi)for(e=e.child;e!==null;)$p(e),e=e.sibling}function $p(e){switch(e.tag){case 26:Es(e),e.flags&zi&&e.memoizedState!==null&&Wg(Mn,e.memoizedState,e.memoizedProps);break;case 5:Es(e);break;case 3:case 4:var t=Mn;Mn=Nu(e.stateNode.containerInfo),Es(e),Mn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=zi,zi=16777216,Es(e),zi=t):Es(e));break;default:Es(e)}}function Yp(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 Bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];gt=i,Kp(i,e)}Yp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vp(e),e=e.sibling}function Vp(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&Za(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mu(e)):Bi(e);break;default:Bi(e)}}function mu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];gt=i,Kp(i,e)}Yp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Za(8,t,t.return),mu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,mu(t));break;default:mu(t)}e=e.sibling}}function Kp(e,t){for(;gt!==null;){var a=gt;switch(a.tag){case 0:case 11:case 15:Za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:xi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,gt=i;else e:for(a=e;gt!==null;){i=gt;var c=i.sibling,f=i.return;if(qp(i),i===a){gt=null;break e}if(c!==null){c.return=f,gt=c;break e}gt=f}}}var pg={getCacheForType:function(e){var t=Ot(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},yg=typeof WeakMap=="function"?WeakMap:Map,ze=0,Ge=null,Ne=null,Ae=0,Be=0,rn=null,Ia=!1,Cs=!1,rf=!1,Na=0,at=0,Wa=0,Bl=0,uf=0,jn=0,_s=0,ki=null,Xt=null,of=!1,cf=0,pu=1/0,yu=null,el=null,Et=0,tl=null,Ns=null,js=0,ff=0,df=null,Fp=null,Hi=0,hf=null;function un(){if((ze&2)!==0&&Ae!==0)return Ae&-Ae;if(B.T!==null){var e=ms;return e!==0?e:xf()}return _e()}function Gp(){jn===0&&(jn=(Ae&536870912)===0||Me?Ba():536870912);var e=Nn.current;return e!==null&&(e.flags|=32),jn}function on(e,t,a){(e===Ge&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(As(e,0),nl(e,Ae,jn,!1)),vn(e,a),((ze&2)===0||e!==Ge)&&(e===Ge&&((ze&2)===0&&(Bl|=a),at===4&&nl(e,Ae,jn,!1)),Pn(e))}function Xp(e,t,a){if((ze&6)!==0)throw Error(s(327));var i=!a&&(t&124)===0&&(t&e.expiredLanes)===0||On(e,t),c=i?gg(e,t):yf(e,t,!0),f=i;do{if(c===0){Cs&&!i&&nl(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!vg(a)){c=yf(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=ki;var j=S.current.memoizedState.isDehydrated;if(j&&(As(S,v).flags|=256),v=yf(S,v,!1),v!==2){if(rf&&!j){S.errorRecoveryDisabledLanes|=f,Bl|=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){As(e,0),nl(e,t,0,!0);break}e:{switch(i=e,f=c,f){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:nl(i,t,jn,!Ia);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(c=cf+300-Bt(),10<c)){if(nl(i,t,jn,!Ia),ca(i,0,!0)!==0)break e;i.timeoutHandle=E0(Zp.bind(null,i,a,Xt,yu,of,t,jn,Bl,_s,Ia,f,2,-0,0),c);break e}Zp(i,a,Xt,yu,of,t,jn,Bl,_s,Ia,f,0,-0,0)}}break}while(!0);Pn(e)}function Zp(e,t,a,i,c,f,v,S,j,L,Y,F,q,z){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(Gi={stylesheets:null,count:0,unsuspend:Ig},$p(t),F=ex(),F!==null)){e.cancelPendingCommit=F(n0.bind(null,e,t,f,a,i,c,v,S,j,Y,1,q,z)),nl(e,f,v,!L);return}n0(e,t,f,a,i,c,v,S,j)}function vg(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 i=0;i<a.length;i++){var c=a[i],f=c.getSnapshot;c=c.value;try{if(!nn(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 nl(e,t,a,i){t&=~uf,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var f=31-st(c),v=1<<f;i[f]=-1,c&=~v}a!==0&&Sl(e,a,t)}function vu(){return(ze&6)===0?(Qi(0),!1):!0}function mf(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,ba=Dl=null,Rc(e),xs=null,Oi=0,e=Ne;for(;e!==null;)Ap(e.alternate,e),e=e.return;Ne=null}}function As(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Lg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),mf(),Ge=e,Ne=a=pa(e.current,null),Ae=t,Be=0,rn=null,Ia=!1,Cs=On(e,t),rf=!1,_s=jn=uf=Bl=Wa=at=0,Xt=ki=null,of=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-st(i),f=1<<c;t|=e[c],i&=~f}return Na=t,kr(),a}function Jp(e,t){xe=null,B.H=lu,t===wi||t===Xr?(t=hm(),Be=3):t===cm?(t=hm(),Be=4):Be=t===mp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,Ne===null&&(at=1,ou(e,wn(t,e.current)))}function Pp(){var e=B.H;return B.H=lu,e===null?lu:e}function Ip(){var e=B.A;return B.A=pg,e}function pf(){at=4,Ia||(Ae&4194048)!==Ae&&Nn.current!==null||(Cs=!0),(Wa&134217727)===0&&(Bl&134217727)===0||Ge===null||nl(Ge,Ae,jn,!1)}function yf(e,t,a){var i=ze;ze|=2;var c=Pp(),f=Ip();(Ge!==e||Ae!==t)&&(yu=null,As(e,t)),t=!1;var v=at;e:do try{if(Be!==0&&Ne!==null){var S=Ne,j=rn;switch(Be){case 8:mf(),v=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var L=Be;if(Be=0,rn=null,Ts(e,S,j,L),a&&Cs){v=0;break e}break;default:L=Be,Be=0,rn=null,Ts(e,S,j,L)}}bg(),v=at;break}catch(Y){Jp(e,Y)}while(!0);return t&&e.shellSuspendCounter++,ba=Dl=null,ze=i,B.H=c,B.A=f,Ne===null&&(Ge=null,Ae=0,kr()),v}function bg(){for(;Ne!==null;)Wp(Ne)}function gg(e,t){var a=ze;ze|=2;var i=Pp(),c=Ip();Ge!==e||Ae!==t?(yu=null,pu=Bt()+500,As(e,t)):Cs=On(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var f=rn;t:switch(Be){case 1:Be=0,rn=null,Ts(e,t,f,1);break;case 2:case 9:if(fm(f)){Be=0,rn=null,e0(t);break}t=function(){Be!==2&&Be!==9||Ge!==e||(Be=7),Pn(e)},f.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:fm(f)?(Be=0,rn=null,e0(t)):(Be=0,rn=null,Ts(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||L0(v)){Be=0,rn=null;var j=S.sibling;if(j!==null)Ne=j;else{var L=S.return;L!==null?(Ne=L,bu(L)):Ne=null}break t}}Be=0,rn=null,Ts(e,t,f,5);break;case 6:Be=0,rn=null,Ts(e,t,f,6);break;case 8:mf(),at=6;break e;default:throw Error(s(462))}}xg();break}catch(Y){Jp(e,Y)}while(!0);return ba=Dl=null,B.H=i,B.A=c,ze=a,Ne!==null?0:(Ge=null,Ae=0,kr(),at)}function xg(){for(;Ne!==null&&!ai();)Wp(Ne)}function Wp(e){var t=Np(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?bu(e):Ne=t}function e0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xp(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=xp(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Rc(t);default:Ap(a,t),t=Ne=tm(t,Na),t=Np(a,t,Na)}e.memoizedProps=e.pendingProps,t===null?bu(e):Ne=t}function Ts(e,t,a,i){ba=Dl=null,Rc(t),xs=null,Oi=0;var c=t.return;try{if(og(e,c,t,a,Ae)){at=1,ou(e,wn(a,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;at=1,ou(e,wn(a,e.current)),Ne=null;return}t.flags&32768?(Me||i===1?e=!0:Cs||(Ae&536870912)!==0?e=!1:(Ia=e=!0,(i===2||i===9||i===3||i===6)&&(i=Nn.current,i!==null&&i.tag===13&&(i.flags|=16384))),t0(t,e)):bu(t)}function bu(e){var t=e;do{if((t.flags&32768)!==0){t0(t,Ia);return}e=t.return;var a=fg(t.alternate,t,Na);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 t0(e,t){do{var a=dg(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 n0(e,t,a,i,c,f,v,S,j){e.cancelPendingCommit=null;do gu();while(Et!==0);if((ze&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(f=t.lanes|t.childLanes,f|=sc,xl(e,a,f,v,S,j),e===Ge&&(Ne=Ge=null,Ae=0),Ns=t,tl=e,js=a,ff=f,df=c,Fp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Cg(Vn,function(){return r0(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=B.T,B.T=null,c=X.p,X.p=2,v=ze,ze|=4;try{hg(e,t,a)}finally{ze=v,X.p=c,B.T=i}}Et=1,a0(),l0(),s0()}}function a0(){if(Et===1){Et=0;var e=tl,t=Ns,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var i=X.p;X.p=2;var c=ze;ze|=4;try{kp(t,e);var f=Af,v=Kh(e.containerInfo),S=f.focusedElem,j=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Vh(S.ownerDocument.documentElement,S)){if(j!==null&&ec(S)){var L=j.start,Y=j.end;if(Y===void 0&&(Y=L),"selectionStart"in S)S.selectionStart=L,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(j.start,me),Ye=j.end===void 0?fe:Math.min(j.end,me);!z.extend&&fe>Ye&&(v=Ye,Ye=fe,fe=v);var M=Yh(S,fe),D=Yh(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 U=F.createRange();U.setStart(M.node,M.offset),z.removeAllRanges(),fe>Ye?(z.addRange(U),z.extend(D.node,D.offset)):(U.setEnd(D.node,D.offset),z.addRange(U))}}}}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}}Ou=!!jf,Af=jf=null}finally{ze=c,X.p=i,B.T=a}}e.current=t,Et=2}}function l0(){if(Et===2){Et=0;var e=tl,t=Ns,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var i=X.p;X.p=2;var c=ze;ze|=4;try{Lp(e,t.alternate,t)}finally{ze=c,X.p=i,B.T=a}}Et=3}}function s0(){if(Et===4||Et===3){Et=0,zt();var e=tl,t=Ns,a=js,i=Fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,Ns=tl=null,i0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(el=null),ue(a),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(pn,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=B.T,c=X.p,X.p=2,B.T=null;try{for(var f=e.onRecoverableError,v=0;v<i.length;v++){var S=i[v];f(S.value,{componentStack:S.stack})}}finally{B.T=t,X.p=c}}(js&3)!==0&&gu(),Pn(e),c=e.pendingLanes,(a&4194090)!==0&&(c&42)!==0?e===hf?Hi++:(Hi=0,hf=e):Hi=0,Qi(0)}}function i0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function gu(e){return a0(),l0(),s0(),r0()}function r0(){if(Et!==5)return!1;var e=tl,t=ff;ff=0;var a=ue(js),i=B.T,c=X.p;try{X.p=32>a?32:a,B.T=null,a=df,df=null;var f=tl,v=js;if(Et=0,Ns=tl=null,js=0,(ze&6)!==0)throw Error(s(331));var S=ze;if(ze|=4,Vp(f.current),Qp(f,f.current,v,a),ze=S,Qi(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(pn,f)}catch{}return!0}finally{X.p=c,B.T=i,i0(e,t)}}function u0(e,t,a){t=wn(a,t),t=Vc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(vn(e,2),Pn(e))}function Ve(e,t,a){if(e.tag===3)u0(e,e,a);else for(;t!==null;){if(t.tag===3){u0(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(el===null||!el.has(i))){e=wn(a,e),a=dp(2),i=Ka(t,a,2),i!==null&&(hp(a,i,t,e),vn(i,2),Pn(i));break}}t=t.return}}function vf(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new yg;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(a)||(rf=!0,c.add(a),e=Sg.bind(null,e,t,a),t.then(e,e))}function Sg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ge===e&&(Ae&a)===a&&(at===4||at===3&&(Ae&62914560)===Ae&&300>Bt()-cf?(ze&2)===0&&As(e,0):uf|=a,_s===Ae&&(_s=0)),Pn(e)}function o0(e,t){t===0&&(t=fa()),e=cs(e,t),e!==null&&(vn(e,t),Pn(e))}function wg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),o0(e,a)}function Eg(e,t){var a=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(s(314))}i!==null&&i.delete(t),o0(e,a)}function Cg(e,t){return ua(e,t)}var xu=null,Rs=null,bf=!1,Su=!1,gf=!1,kl=0;function Pn(e){e!==Rs&&e.next===null&&(Rs===null?xu=Rs=e:Rs=Rs.next=e),Su=!0,bf||(bf=!0,Ng())}function Qi(e,t){if(!gf&&Su){gf=!0;do for(var a=!1,i=xu;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var v=i.suspendedLanes,S=i.pingedLanes;f=(1<<31-st(42|e)+1)-1,f&=c&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,h0(i,f))}else f=Ae,f=ca(i,i===Ge?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||On(i,f)||(a=!0,h0(i,f));i=i.next}while(a);gf=!1}}function _g(){c0()}function c0(){Su=bf=!1;var e=0;kl!==0&&(Ug()&&(e=kl),kl=0);for(var t=Bt(),a=null,i=xu;i!==null;){var c=i.next,f=f0(i,t);f===0?(i.next=null,a===null?xu=c:a.next=c,c===null&&(Rs=a)):(a=i,(e!==0||(f&3)!==0)&&(Su=!0)),i=c}Qi(e)}function f0(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-st(f),S=1<<v,j=c[v];j===-1?((S&a)===0||(S&i)!==0)&&(c[v]=za(S,t)):j<=t&&(e.expiredLanes|=S),f&=~S}if(t=Ge,a=Ae,a=ca(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&mn(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||On(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&mn(i),ue(a)){case 2:case 8:a=Fe;break;case 32:a=Vn;break;case 268435456:a=Ua;break;default:a=Vn}return i=d0.bind(null,e),a=ua(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&mn(i),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(gu()&&e.callbackNode!==a)return null;var i=Ae;return i=ca(e,e===Ge?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Xp(e,i,t),f0(e,Bt()),e.callbackNode!=null&&e.callbackNode===a?d0.bind(null,e):null)}function h0(e,t){if(gu())return null;Xp(e,t,!0)}function Ng(){qg(function(){(ze&6)!==0?ua(Yn,_g):c0()})}function xf(){return kl===0&&(kl=Ba()),kl}function m0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Dr(""+e)}function p0(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 jg(e,t,a,i,c){if(t==="submit"&&a&&a.stateNode===c){var f=m0((c[ne]||null).action),v=i.submitter;v&&(t=(t=v[ne]||null)?m0(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var S=new qr("action","action",null,i,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(kl!==0){var j=v?p0(c,v):new FormData(c);kc(a,{pending:!0,data:j,method:c.method,action:f},null,j)}}else typeof f=="function"&&(S.preventDefault(),j=v?p0(c,v):new FormData(c),kc(a,{pending:!0,data:j,method:c.method,action:f},f,j))},currentTarget:c}]})}}for(var Sf=0;Sf<lc.length;Sf++){var wf=lc[Sf],Ag=wf.toLowerCase(),Tg=wf[0].toUpperCase()+wf.slice(1);Dn(Ag,"on"+Tg)}Dn(Xh,"onAnimationEnd"),Dn(Zh,"onAnimationIteration"),Dn(Jh,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Fb,"onTransitionRun"),Dn(Gb,"onTransitionStart"),Dn(Xb,"onTransitionCancel"),Dn(Ph,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $i="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(" "),Rg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($i));function y0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var v=i.length-1;0<=v;v--){var S=i[v],j=S.instance,L=S.currentTarget;if(S=S.listener,j!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=L;try{f(c)}catch(Y){uu(Y)}c.currentTarget=null,f=j}else for(v=0;v<i.length;v++){if(S=i[v],j=S.instance,L=S.currentTarget,S=S.listener,j!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=L;try{f(c)}catch(Y){uu(Y)}c.currentTarget=null,f=j}}}}function je(e,t){var a=t[Ie];a===void 0&&(a=t[Ie]=new Set);var i=e+"__bubble";a.has(i)||(v0(t,e,2,!1),a.add(i))}function Ef(e,t,a){var i=0;t&&(i|=4),v0(a,e,i,t)}var wu="_reactListening"+Math.random().toString(36).slice(2);function Cf(e){if(!e[wu]){e[wu]=!0,si.forEach(function(a){a!=="selectionchange"&&(Rg.has(a)||Ef(a,!1,e),Ef(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wu]||(t[wu]=!0,Ef("selectionchange",!1,t))}}function v0(e,t,a,i){switch(Q0(t)){case 2:var c=ax;break;case 8:c=lx;break;default:c=Bf}a=c.bind(null,t,a,e),c=void 0,!Ko||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?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 _f(e,t,a,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var v=i.tag;if(v===3||v===4){var S=i.stateNode.containerInfo;if(S===c)break;if(v===4)for(v=i.return;v!==null;){var j=v.tag;if((j===3||j===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;S!==null;){if(v=Oe(S),v===null)return;if(j=v.tag,j===5||j===6||j===26||j===27){i=f=v;continue e}S=S.parentNode}}i=i.return}Ch(function(){var L=f,Y=Yo(a),F=[];e:{var q=Ih.get(e);if(q!==void 0){var z=qr,me=e;switch(e){case"keypress":if(Ur(a)===0)break e;case"keydown":case"keyup":z=Cb;break;case"focusin":me="focus",z=Zo;break;case"focusout":me="blur",z=Zo;break;case"beforeblur":case"afterblur":z=Zo;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=jh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=db;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=jb;break;case Xh:case Zh:case Jh:z=pb;break;case Ph:z=Tb;break;case"scroll":case"scrollend":z=cb;break;case"wheel":z=Ob;break;case"copy":case"cut":case"paste":z=vb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Th;break;case"toggle":case"beforetoggle":z=Mb}var fe=(t&4)!==0,Ye=!fe&&(e==="scroll"||e==="scrollend"),M=fe?q!==null?q+"Capture":null:q;fe=[];for(var D=L,U;D!==null;){var K=D;if(U=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||U===null||M===null||(K=ri(D,M),K!=null&&fe.push(Yi(D,K,U))),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!==$o&&(me=a.relatedTarget||a.fromElement)&&(Oe(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=L,me=me?Oe(me):null,me!==null&&(Ye=o(me),fe=me.tag,me!==Ye||fe!==5&&fe!==27&&fe!==6)&&(me=null)):(z=null,me=L),z!==me)){if(fe=jh,K="onMouseLeave",M="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(fe=Th,K="onPointerLeave",M="onPointerEnter",D="pointer"),Ye=z==null?q:wl(z),U=me==null?q:wl(me),q=new fe(K,D+"leave",z,a,Y),q.target=Ye,q.relatedTarget=U,K=null,Oe(Y)===L&&(fe=new fe(M,D+"enter",me,a,Y),fe.target=U,fe.relatedTarget=Ye,K=fe),Ye=K,z&&me)t:{for(fe=z,M=me,D=0,U=fe;U;U=Os(U))D++;for(U=0,K=M;K;K=Os(K))U++;for(;0<D-U;)fe=Os(fe),D--;for(;0<U-D;)M=Os(M),U--;for(;D--;){if(fe===M||M!==null&&fe===M.alternate)break t;fe=Os(fe),M=Os(M)}fe=null}else fe=null;z!==null&&b0(F,q,z,fe,!1),me!==null&&Ye!==null&&b0(F,Ye,me,fe,!0)}}e:{if(q=L?wl(L):window,z=q.nodeName&&q.nodeName.toLowerCase(),z==="select"||z==="input"&&q.type==="file")var ee=zh;else if(Lh(q))if(Bh)ee=Yb;else{ee=Qb;var we=Hb}else z=q.nodeName,!z||z.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?L&&Qo(L.elementType)&&(ee=zh):ee=$b;if(ee&&(ee=ee(e,L))){qh(F,ee,a,Y);break e}we&&we(e,q,L),e==="focusout"&&L&&q.type==="number"&&L.memoizedProps.value!=null&&Ho(q,"number",q.value)}switch(we=L?wl(L):window,e){case"focusin":(Lh(we)||we.contentEditable==="true")&&(rs=we,tc=L,pi=null);break;case"focusout":pi=tc=rs=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,Fh(F,a,Y);break;case"selectionchange":if(Kb)break;case"keydown":case"keyup":Fh(F,a,Y)}var se;if(Po)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 is?Mh(e,a)&&(he="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(Rh&&a.locale!=="ko"&&(is||he!=="onCompositionStart"?he==="onCompositionEnd"&&is&&(se=_h()):(Qa=Y,Fo="value"in Qa?Qa.value:Qa.textContent,is=!0)),we=Eu(L,he),0<we.length&&(he=new Ah(he,e,null,a,Y),F.push({event:he,listeners:we}),se?he.data=se:(se=Uh(a),se!==null&&(he.data=se)))),(se=Lb?qb(e,a):zb(e,a))&&(he=Eu(L,"onBeforeInput"),0<he.length&&(we=new Ah("onBeforeInput","beforeinput",null,a,Y),F.push({event:we,listeners:he}),we.data=se)),jg(F,e,L,a,Y)}y0(F,t)})}function Yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Eu(e,t){for(var a=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=ri(e,a),c!=null&&i.unshift(Yi(e,c,f)),c=ri(e,t),c!=null&&i.push(Yi(e,c,f))),e.tag===3)return i;e=e.return}return[]}function Os(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function b0(e,t,a,i,c){for(var f=t._reactName,v=[];a!==null&&a!==i;){var S=a,j=S.alternate,L=S.stateNode;if(S=S.tag,j!==null&&j===i)break;S!==5&&S!==26&&S!==27||L===null||(j=L,c?(L=ri(a,f),L!=null&&v.unshift(Yi(a,L,j))):c||(L=ri(a,f),L!=null&&v.push(Yi(a,L,j)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var Og=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function g0(e){return(typeof e=="string"?e:""+e).replace(Og,`
49
- `).replace(Dg,"")}function x0(e,t){return t=g0(t),g0(e)===t}function Cu(){}function $e(e,t,a,i,c,f){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||as(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&as(e,""+i);break;case"className":Ha(e,"class",i);break;case"tabIndex":Ha(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ha(e,a,i);break;case"style":wh(e,i,f);break;case"data":if(t!=="object"){Ha(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Dr(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="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(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Dr(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Cu);break;case"onScroll":i!=null&&je("scroll",e);break;case"onScrollEnd":i!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=Dr(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":je("beforetoggle",e),je("toggle",e),es(e,"popover",i);break;case"xlinkActuate":ha(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ha(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ha(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ha(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ha(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ha(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ha(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ha(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ha(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":es(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ub.get(a)||a,es(e,a,i))}}function Nf(e,t,a,i,c,f){switch(a){case"style":wh(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof i=="string"?as(e,i):(typeof i=="number"||typeof i=="bigint")&&as(e,""+i);break;case"onScroll":i!=null&&je("scroll",e);break;case"onScrollEnd":i!=null&&je("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Cu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ii.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 i=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):es(e,a,i)}}}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 i=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:$e(e,t,f,v,a,null)}}c&&$e(e,t,"srcSet",a.srcSet,a,null),i&&$e(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var S=f=v=c=null,j=null,L=null;for(i in a)if(a.hasOwnProperty(i)){var Y=a[i];if(Y!=null)switch(i){case"name":c=Y;break;case"type":v=Y;break;case"checked":j=Y;break;case"defaultChecked":L=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:$e(e,t,i,Y,a,null)}}bh(e,f,S,j,L,v,c,!1),Rr(e);return;case"select":je("invalid",e),i=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":i=S;default:$e(e,t,c,S,a,null)}t=f,a=v,e.multiple=!!i,t!=null?ns(e,!!i,t,!1):a!=null&&ns(e,!!i,a,!0);return;case"textarea":je("invalid",e),f=c=i=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":i=S;break;case"defaultValue":c=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:$e(e,t,v,S,a,null)}xh(e,i,c,f),Rr(e);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(i=a[j],i!=null))switch(j){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:$e(e,t,j,i,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(i=0;i<$i.length;i++)je($i[i],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(L in a)if(a.hasOwnProperty(L)&&(i=a[L],i!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:$e(e,t,L,i,a,null)}return;default:if(Qo(t)){for(Y in a)a.hasOwnProperty(Y)&&(i=a[Y],i!==void 0&&Nf(e,t,Y,i,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(i=a[S],i!=null&&$e(e,t,S,i,a,null))}function Mg(e,t,a,i){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,j=null,L=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":j=F;default:i.hasOwnProperty(z)||$e(e,t,z,null,i,F)}}for(var q in i){var z=i[q];if(F=a[q],i.hasOwnProperty(q)&&(z!=null||F!=null))switch(q){case"type":f=z;break;case"name":c=z;break;case"checked":L=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(s(137,t));break;default:z!==F&&$e(e,t,q,z,i,F)}}ko(e,v,S,j,L,Y,f,c);return;case"select":z=v=S=q=null;for(f in a)if(j=a[f],a.hasOwnProperty(f)&&j!=null)switch(f){case"value":break;case"multiple":z=j;default:i.hasOwnProperty(f)||$e(e,t,f,null,i,j)}for(c in i)if(f=i[c],j=a[c],i.hasOwnProperty(c)&&(f!=null||j!=null))switch(c){case"value":q=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==j&&$e(e,t,c,f,i,j)}t=S,a=v,i=z,q!=null?ns(e,!!a,q,!1):!!i!=!!a&&(t!=null?ns(e,!!a,t,!0):ns(e,!!a,a?[]:"",!1));return;case"textarea":z=q=null;for(S in a)if(c=a[S],a.hasOwnProperty(S)&&c!=null&&!i.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(e,t,S,null,i,c)}for(v in i)if(c=i[v],f=a[v],i.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(s(91));break;default:c!==f&&$e(e,t,v,c,i,f)}gh(e,q,z);return;case"option":for(var me in a)if(q=a[me],a.hasOwnProperty(me)&&q!=null&&!i.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:$e(e,t,me,null,i,q)}for(j in i)if(q=i[j],z=a[j],i.hasOwnProperty(j)&&q!==z&&(q!=null||z!=null))switch(j){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:$e(e,t,j,q,i,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&&!i.hasOwnProperty(fe)&&$e(e,t,fe,null,i,q);for(L in i)if(q=i[L],z=a[L],i.hasOwnProperty(L)&&q!==z&&(q!=null||z!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:$e(e,t,L,q,i,z)}return;default:if(Qo(t)){for(var Ye in a)q=a[Ye],a.hasOwnProperty(Ye)&&q!==void 0&&!i.hasOwnProperty(Ye)&&Nf(e,t,Ye,void 0,i,q);for(Y in i)q=i[Y],z=a[Y],!i.hasOwnProperty(Y)||q===z||q===void 0&&z===void 0||Nf(e,t,Y,q,i,z);return}}for(var M in a)q=a[M],a.hasOwnProperty(M)&&q!=null&&!i.hasOwnProperty(M)&&$e(e,t,M,null,i,q);for(F in i)q=i[F],z=a[F],!i.hasOwnProperty(F)||q===z||q==null&&z==null||$e(e,t,F,q,i,z)}var jf=null,Af=null;function _u(e){return e.nodeType===9?e:e.ownerDocument}function S0(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 w0(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 Tf(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 Rf=null;function Ug(){var e=window.event;return e&&e.type==="popstate"?e===Rf?!1:(Rf=e,!0):(Rf=null,!1)}var E0=typeof setTimeout=="function"?setTimeout:void 0,Lg=typeof clearTimeout=="function"?clearTimeout:void 0,C0=typeof Promise=="function"?Promise:void 0,qg=typeof queueMicrotask=="function"?queueMicrotask:typeof C0<"u"?function(e){return C0.resolve(null).then(e).catch(zg)}:E0;function zg(e){setTimeout(function(){throw e})}function al(e){return e==="head"}function _0(e,t){var a=t,i=0,c=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(0<i&&8>i){a=i;var v=e.ownerDocument;if(a&1&&Vi(v.documentElement),a&2&&Vi(v.body),a&4)for(a=v.head,Vi(a),v=a.firstChild;v;){var S=v.nextSibling,j=v.nodeName;v[rt]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=S}}if(c===0){e.removeChild(f),Ii(t);return}c--}else a==="$"||a==="$?"||a==="$!"?c++:i=a.charCodeAt(0)-48;else i=0;a=f}while(a);Ii(t)}function Of(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":Of(a),Rt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Bg(e,t,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){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=Un(e.nextSibling),e===null)break}return null}function kg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Un(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Hg(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Un(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 Mf=null;function N0(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 j0(e,t,a){switch(t=_u(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Vi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rt(e)}var An=new Map,A0=new Set;function Nu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ja=X.d;X.d={f:Qg,r:$g,D:Yg,C:Vg,L:Kg,m:Fg,X:Xg,S:Gg,M:Zg};function Qg(){var e=ja.f(),t=vu();return e||t}function $g(e){var t=tn(e);t!==null&&t.tag===5&&t.type==="form"?Xm(t):ja.r(e)}var Ds=typeof document>"u"?null:document;function T0(e,t,a){var i=Ds;if(i&&typeof t=="string"&&t){var c=Sn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),A0.has(c)||(A0.add(c),e={rel:e,crossOrigin:a,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Ct(t,"link",e),ut(t),i.head.appendChild(t)))}}function Yg(e){ja.D(e),T0("dns-prefetch",e,null)}function Vg(e,t){ja.C(e,t),T0("preconnect",e,t)}function Kg(e,t,a){ja.L(e,t,a);var i=Ds;if(i&&e&&t){var c='link[rel="preload"][as="'+Sn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Sn(a.imageSizes)+'"]')):c+='[href="'+Sn(e)+'"]';var f=c;switch(t){case"style":f=Ms(e);break;case"script":f=Us(e)}An.has(f)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),An.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Ki(f))||t==="script"&&i.querySelector(Fi(f))||(t=i.createElement("link"),Ct(t,"link",e),ut(t),i.head.appendChild(t)))}}function Fg(e,t){ja.m(e,t);var a=Ds;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Sn(i)+'"][href="'+Sn(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Us(e)}if(!An.has(f)&&(e=b({rel:"modulepreload",href:e},t),An.set(f,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fi(f)))return}i=a.createElement("link"),Ct(i,"link",e),ut(i),a.head.appendChild(i)}}}function Gg(e,t,a){ja.S(e,t,a);var i=Ds;if(i&&e){var c=ka(i).hoistableStyles,f=Ms(e);t=t||"default";var v=c.get(f);if(!v){var S={loading:0,preload:null};if(v=i.querySelector(Ki(f)))S.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=An.get(f))&&Uf(e,a);var j=v=i.createElement("link");ut(j),Ct(j,"link",e),j._p=new Promise(function(L,Y){j.onload=L,j.onerror=Y}),j.addEventListener("load",function(){S.loading|=1}),j.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ju(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:S},c.set(f,v)}}}function Xg(e,t){ja.X(e,t);var a=Ds;if(a&&e){var i=ka(a).hoistableScripts,c=Us(e),f=i.get(c);f||(f=a.querySelector(Fi(c)),f||(e=b({src:e,async:!0},t),(t=An.get(c))&&Lf(e,t),f=a.createElement("script"),ut(f),Ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Zg(e,t){ja.M(e,t);var a=Ds;if(a&&e){var i=ka(a).hoistableScripts,c=Us(e),f=i.get(c);f||(f=a.querySelector(Fi(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=An.get(c))&&Lf(e,t),f=a.createElement("script"),ut(f),Ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function R0(e,t,a,i){var c=(c=ce.current)?Nu(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ms(a.href),a=ka(c).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ms(a.href);var f=ka(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(Ki(e)))&&!f._p&&(v.instance=f,v.state.loading=5),An.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},An.set(e,a),f||Jg(c,e,a,v.state))),t&&i===null)throw Error(s(528,""));return v}if(t&&i!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Us(a),a=ka(c).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Ms(e){return'href="'+Sn(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function O0(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Jg(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ct(t,"link",a),ut(t),e.head.appendChild(t))}function Us(e){return'[src="'+Sn(e)+'"]'}function Fi(e){return"script[async]"+e}function D0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Sn(a.href)+'"]');if(i)return t.instance=i,ut(i),i;var c=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),ut(i),Ct(i,"style",c),ju(i,a.precedence,e),t.instance=i;case"stylesheet":c=Ms(a.href);var f=e.querySelector(Ki(c));if(f)return t.state.loading|=4,t.instance=f,ut(f),f;i=O0(a),(c=An.get(c))&&Uf(i,c),f=(e.ownerDocument||e).createElement("link"),ut(f);var v=f;return v._p=new Promise(function(S,j){v.onload=S,v.onerror=j}),Ct(f,"link",i),t.state.loading|=4,ju(f,a.precedence,e),t.instance=f;case"script":return f=Us(a.src),(c=e.querySelector(Fi(f)))?(t.instance=c,ut(c),c):(i=a,(c=An.get(f))&&(i=b({},a),Lf(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),ut(c),Ct(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,ju(i,a.precedence,e));return t.instance}function ju(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,f=c,v=0;v<i.length;v++){var S=i[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 Uf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Au=null;function M0(e,t,a){if(Au===null){var i=new Map,c=Au=new Map;c.set(a,i)}else c=Au,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[rt]||f[J]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var S=i.get(v);S?S.push(f):i.set(v,[f])}}return i}function U0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Pg(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 L0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Gi=null;function Ig(){}function Wg(e,t,a){if(Gi===null)throw Error(s(475));var i=Gi;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Ms(a.href),f=e.querySelector(Ki(c));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Tu.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=f,ut(f);return}f=e.ownerDocument||e,a=O0(a),(c=An.get(c))&&Uf(a,c),f=f.createElement("link"),ut(f);var v=f;v._p=new Promise(function(S,j){v.onload=S,v.onerror=j}),Ct(f,"link",a),t.instance=f}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=Tu.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function ex(){if(Gi===null)throw Error(s(475));var e=Gi;return e.stylesheets&&e.count===0&&qf(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&qf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Tu(){if(this.count--,this.count===0){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ru=null;function qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ru=new Map,t.forEach(tx,e),Ru=null,Tu.call(e))}function tx(e,t){if(!(t.state.loading&4)){var a=Ru.get(e);if(a)var i=a.get(null);else{a=new Map,Ru.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),i=v)}i&&a.set(null,i)}c=t.instance,v=c.getAttribute("data-precedence"),f=a.get(v)||i,f===i&&a.set(null,c),a.set(v,c),this.count++,i=Tu.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xi={$$typeof:T,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function nx(e,t,a,i,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=Kn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kn(0),this.hiddenUpdates=Kn(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function q0(e,t,a,i,c,f,v,S,j,L,Y,F){return e=new nx(e,t,a,v,S,j,L,F),t=1,f===!0&&(t|=24),f=an(3,null,null,t),e.current=f,f.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:a,cache:t},xc(f),e}function z0(e){return e?(e=fs,e):fs}function B0(e,t,a,i,c,f){c=z0(c),i.context===null?i.context=c:i.pendingContext=c,i=Va(t),i.payload={element:a},f=f===void 0?null:f,f!==null&&(i.callback=f),a=Ka(e,i,t),a!==null&&(on(a,e,t),Ci(a,e,t))}function k0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function zf(e,t){k0(e,t),(e=e.alternate)&&k0(e,t)}function H0(e){if(e.tag===13){var t=cs(e,67108864);t!==null&&on(t,e,67108864),zf(e,67108864)}}var Ou=!0;function ax(e,t,a,i){var c=B.T;B.T=null;var f=X.p;try{X.p=2,Bf(e,t,a,i)}finally{X.p=f,B.T=c}}function lx(e,t,a,i){var c=B.T;B.T=null;var f=X.p;try{X.p=8,Bf(e,t,a,i)}finally{X.p=f,B.T=c}}function Bf(e,t,a,i){if(Ou){var c=kf(i);if(c===null)_f(e,t,i,Du,a),$0(e,i);else if(ix(c,e,t,a,i))i.stopPropagation();else if($0(e,i),t&4&&-1<sx.indexOf(e)){for(;c!==null;){var f=tn(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 j=1<<31-st(v);S.entanglements[1]|=j,v&=~j}Pn(f),(ze&6)===0&&(pu=Bt()+500,Qi(0))}}break;case 13:S=cs(f,2),S!==null&&on(S,f,2),vu(),zf(f,2)}if(f=kf(i),f===null&&_f(e,t,i,Du,a),f===c)break;c=f}c!==null&&i.stopPropagation()}else _f(e,t,i,null,a)}}function kf(e){return e=Yo(e),Hf(e)}var Du=null;function Hf(e){if(Du=null,e=Oe(e),e!==null){var t=o(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 Du=e,null}function Q0(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(oa()){case Yn:return 2;case Fe:return 8;case Vn:case bl:return 32;case Ua:return 268435456;default:return 32}default:return 32}}var Qf=!1,ll=null,sl=null,il=null,Zi=new Map,Ji=new Map,rl=[],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 $0(e,t){switch(e){case"focusin":case"focusout":ll=null;break;case"dragenter":case"dragleave":sl=null;break;case"mouseover":case"mouseout":il=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function Pi(e,t,a,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=tn(t),t!==null&&H0(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function ix(e,t,a,i,c){switch(t){case"focusin":return ll=Pi(ll,e,t,a,i,c),!0;case"dragenter":return sl=Pi(sl,e,t,a,i,c),!0;case"mouseover":return il=Pi(il,e,t,a,i,c),!0;case"pointerover":var f=c.pointerId;return Zi.set(f,Pi(Zi.get(f)||null,e,t,a,i,c)),!0;case"gotpointercapture":return f=c.pointerId,Ji.set(f,Pi(Ji.get(f)||null,e,t,a,i,c)),!0}return!1}function Y0(e){var t=Oe(e.target);if(t!==null){var a=o(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,kt(e.priority,function(){if(a.tag===13){var i=un();i=At(i);var c=cs(a,i);c!==null&&on(c,a,i),zf(a,i)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=kf(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);$o=i,a.target.dispatchEvent(i),$o=null}else return t=tn(a),t!==null&&H0(t),e.blockedOn=a,!1;t.shift()}return!0}function V0(e,t,a){Mu(e)&&a.delete(t)}function rx(){Qf=!1,ll!==null&&Mu(ll)&&(ll=null),sl!==null&&Mu(sl)&&(sl=null),il!==null&&Mu(il)&&(il=null),Zi.forEach(V0),Ji.forEach(V0)}function Uu(e,t){e.blockedOn===t&&(e.blockedOn=null,Qf||(Qf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,rx)))}var Lu=null;function K0(e){Lu!==e&&(Lu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Lu===e&&(Lu=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(Hf(i||a)===null)continue;break}var f=tn(a);f!==null&&(e.splice(t,3),t-=3,kc(f,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function Ii(e){function t(j){return Uu(j,e)}ll!==null&&Uu(ll,e),sl!==null&&Uu(sl,e),il!==null&&Uu(il,e),Zi.forEach(t),Ji.forEach(t);for(var a=0;a<rl.length;a++){var i=rl[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<rl.length&&(a=rl[0],a.blockedOn===null);)Y0(a),a.blockedOn===null&&rl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],f=a[i+1],v=c[ne]||null;if(typeof f=="function")v||K0(a);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[ne]||null)S=v.formAction;else if(Hf(c)!==null)continue}else S=v.action;typeof S=="function"?a[i+1]=S:(a.splice(i,3),i-=3),K0(a)}}}function $f(e){this._internalRoot=e}qu.prototype.render=$f.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,i=un();B0(a,i,e,t,null,null)},qu.prototype.unmount=$f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;B0(e.current,2,null,e,null,null),vu(),t[de]=null}};function qu(e){this._internalRoot=e}qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=_e();e={blockedOn:null,target:e,priority:t};for(var a=0;a<rl.length&&t!==0&&t<rl[a].priority;a++);rl.splice(a,0,e),a===0&&Y0(e)}};var F0=l.version;if(F0!=="19.1.0")throw Error(s(527,F0,"19.1.0"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(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:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{pn=zu.inject(ux),tt=zu}catch{}}return er.createRoot=function(e,t){if(!u(e))throw Error(s(299));var a=!1,i="",c=up,f=op,v=cp,S=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=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=q0(e,1,!1,null,null,a,i,c,f,v,S,null),e[de]=t.current,Cf(e),new $f(t)},er.hydrateRoot=function(e,t,a){if(!u(e))throw Error(s(299));var i=!1,c="",f=up,v=op,S=cp,j=null,L=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!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&&(j=a.unstable_transitionCallbacks),a.formState!==void 0&&(L=a.formState)),t=q0(e,1,!0,t,a??null,i,c,f,v,S,j,L),t.context=z0(null),a=t.current,i=un(),i=At(i),c=Va(i),c.callback=null,Ka(a,c,i),a=i,t.current.lanes=a,vn(t,a),Pn(t),e[de]=t.current,Cf(e),new qu(t)},er.version="19.1.0",er}var ny;function vx(){if(ny)return Kf.exports;ny=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(),Kf.exports=yx(),Kf.exports}var bx=vx();const gx=vo(bx);var tr={},ay;function xx(){if(ay)return tr;ay=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.parse=d,tr.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,s=/^[\u0020-\u003A\u003D-\u007E]*$/,u=Object.prototype.toString,o=(()=>{const w=function(){};return w.prototype=Object.create(null),w})();function d(w,C){const E=new o,A=w.length;if(A<2)return E;const N=(C==null?void 0:C.decode)||b;let _=0;do{const O=w.indexOf("=",_);if(O===-1)break;const T=w.indexOf(";",_),$=T===-1?A:T;if(O>$){_=w.lastIndexOf(";",O-1)+1;continue}const V=m(w,_,O),H=y(w,O,V),G=w.slice(V,H);if(E[G]===void 0){let Z=m(w,O+1,$),te=y(w,$,Z);const pe=N(w.slice(Z,te));E[G]=pe}_=$+1}while(_<A);return E}function m(w,C,E){do{const A=w.charCodeAt(C);if(A!==32&&A!==9)return C}while(++C<E);return E}function y(w,C,E){for(;C>E;){const A=w.charCodeAt(--C);if(A!==32&&A!==9)return C+1}return E}function p(w,C,E){const A=(E==null?void 0:E.encode)||encodeURIComponent;if(!n.test(w))throw new TypeError(`argument name is invalid: ${w}`);const N=A(C);if(!l.test(N))throw new TypeError(`argument val is invalid: ${C}`);let _=w+"="+N;if(!E)return _;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);_+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);_+="; Domain="+E.domain}if(E.path){if(!s.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);_+="; Path="+E.path}if(E.expires){if(!g(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);_+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(_+="; HttpOnly"),E.secure&&(_+="; Secure"),E.partitioned&&(_+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.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: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.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: ${E.sameSite}`)}return _}function b(w){if(w.indexOf("%")===-1)return w;try{return decodeURIComponent(w)}catch{return w}}function g(w){return u.call(w)==="[object Date]"}return tr}xx();var ly="popstate";function Sx(n={}){function l(s,u){let{pathname:o,search:d,hash:m}=s.location;return fd("",{pathname:o,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function r(s,u){return typeof u=="string"?u:cr(u)}return Ex(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 wx(){return Math.random().toString(36).substring(2,10)}function sy(n,l){return{usr:n.state,key:n.key,idx:l}}function fd(n,l,r=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Fs(l):l,state:r,key:l&&l.key||s||wx()}}function cr({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 Fs(n){let l={};if(n){let r=n.indexOf("#");r>=0&&(l.hash=n.substring(r),n=n.substring(0,r));let s=n.indexOf("?");s>=0&&(l.search=n.substring(s),n=n.substring(0,s)),n&&(l.pathname=n)}return l}function Ex(n,l,r,s={}){let{window:u=document.defaultView,v5Compat:o=!1}=s,d=u.history,m="POP",y=null,p=b();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function b(){return(d.state||{idx:null}).idx}function g(){m="POP";let N=b(),_=N==null?null:N-p;p=N,y&&y({action:m,location:A.location,delta:_})}function w(N,_){m="PUSH";let O=fd(A.location,N,_);p=b()+1;let T=sy(O,p),$=A.createHref(O);try{d.pushState(T,"",$)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;u.location.assign($)}o&&y&&y({action:m,location:A.location,delta:1})}function C(N,_){m="REPLACE";let O=fd(A.location,N,_);p=b();let T=sy(O,p),$=A.createHref(O);d.replaceState(T,"",$),o&&y&&y({action:m,location:A.location,delta:0})}function E(N){return Cx(N)}let A={get action(){return m},get location(){return n(u,d)},listen(N){if(y)throw new Error("A history only accepts one active listener");return u.addEventListener(ly,g),y=N,()=>{u.removeEventListener(ly,g),y=null}},createHref(N){return l(u,N)},createURL:E,encodeLocation(N){let _=E(N);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:w,replace:C,go(N){return d.go(N)}};return A}function Cx(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 s=typeof n=="string"?n:cr(n);return s=s.replace(/ $/,"%20"),!l&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function ov(n,l,r="/"){return _x(n,l,r,!1)}function _x(n,l,r,s){let u=typeof l=="string"?Fs(l):l,o=Da(u.pathname||"/",r);if(o==null)return null;let d=cv(n);Nx(d);let m=null;for(let y=0;m==null&&y<d.length;++y){let p=zx(o);m=Lx(d[y],p,s)}return m}function cv(n,l=[],r=[],s=""){let u=(o,d,m)=>{let y={relativePath:m===void 0?o.path||"":m,caseSensitive:o.caseSensitive===!0,childrenIndex:d,route:o};y.relativePath.startsWith("/")&&(et(y.relativePath.startsWith(s),`Absolute route path "${y.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(s.length));let p=Oa([s,y.relativePath]),b=r.concat(y);o.children&&o.children.length>0&&(et(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),cv(o.children,l,b,p)),!(o.path==null&&!o.index)&&l.push({path:p,score:Mx(p,o.index),routesMeta:b})};return n.forEach((o,d)=>{var m;if(o.path===""||!((m=o.path)!=null&&m.includes("?")))u(o,d);else for(let y of fv(o.path))u(o,d,y)}),l}function fv(n){let l=n.split("/");if(l.length===0)return[];let[r,...s]=l,u=r.endsWith("?"),o=r.replace(/\?$/,"");if(s.length===0)return u?[o,""]:[o];let d=fv(s.join("/")),m=[];return m.push(...d.map(y=>y===""?o:[o,y].join("/"))),u&&m.push(...d),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function Nx(n){n.sort((l,r)=>l.score!==r.score?r.score-l.score:Ux(l.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var jx=/^:[\w-]+$/,Ax=3,Tx=2,Rx=1,Ox=10,Dx=-2,iy=n=>n==="*";function Mx(n,l){let r=n.split("/"),s=r.length;return r.some(iy)&&(s+=Dx),l&&(s+=Tx),r.filter(u=>!iy(u)).reduce((u,o)=>u+(jx.test(o)?Ax:o===""?Rx:Ox),s)}function Ux(n,l){return n.length===l.length&&n.slice(0,-1).every((s,u)=>s===l[u])?n[n.length-1]-l[l.length-1]:0}function Lx(n,l,r=!1){let{routesMeta:s}=n,u={},o="/",d=[];for(let m=0;m<s.length;++m){let y=s[m],p=m===s.length-1,b=o==="/"?l:l.slice(o.length)||"/",g=fr({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},b),w=y.route;if(!g&&p&&r&&!s[s.length-1].route.index&&(g=fr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!g)return null;Object.assign(u,g.params),d.push({params:u,pathname:Oa([o,g.pathname]),pathnameBase:Qx(Oa([o,g.pathnameBase])),route:w}),g.pathnameBase!=="/"&&(o=Oa([o,g.pathnameBase]))}return d}function fr(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=qx(n.path,n.caseSensitive,n.end),u=l.match(r);if(!u)return null;let o=u[0],d=o.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:s.reduce((p,{paramName:b,isOptional:g},w)=>{if(b==="*"){let E=m[w]||"";d=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const C=m[w];return g&&!C?p[b]=void 0:p[b]=(C||"").replace(/%2F/g,"/"),p},{}),pathname:o,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 s=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,y)=>(s.push({paramName:m,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(s.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),s]}function zx(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 Da(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,s=n.charAt(r);return s&&s!=="/"?null:n.slice(r)||"/"}function Bx(n,l="/"){let{pathname:r,search:s="",hash:u=""}=typeof n=="string"?Fs(n):n;return{pathname:r?r.startsWith("/")?r:kx(r,l):l,search:$x(s),hash:Yx(u)}}function kx(n,l){let r=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?r.length>1&&r.pop():u!=="."&&r.push(u)}),r.length>1?r.join("/"):"/"}function Zf(n,l,r,s){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(s)}]. 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 Hx(n){return n.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function dv(n){let l=Hx(n);return l.map((r,s)=>s===l.length-1?r.pathname:r.pathnameBase)}function hv(n,l,r,s=!1){let u;typeof n=="string"?u=Fs(n):(u={...n},et(!u.pathname||!u.pathname.includes("?"),Zf("?","pathname","search",u)),et(!u.pathname||!u.pathname.includes("#"),Zf("#","pathname","hash",u)),et(!u.search||!u.search.includes("#"),Zf("#","search","hash",u)));let o=n===""||u.pathname==="",d=o?"/":u.pathname,m;if(d==null)m=r;else{let g=l.length-1;if(!s&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),g-=1;u.pathname=w.join("/")}m=g>=0?l[g]:"/"}let y=Bx(u,m),p=d&&d!=="/"&&d.endsWith("/"),b=(o||d===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||b)&&(y.pathname+="/"),y}var Oa=n=>n.join("/").replace(/\/\/+/g,"/"),Qx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),$x=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Yx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Vx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var mv=["POST","PUT","PATCH","DELETE"];new Set(mv);var Kx=["GET",...mv];new Set(Kx);var Gs=x.createContext(null);Gs.displayName="DataRouter";var bo=x.createContext(null);bo.displayName="DataRouterState";var pv=x.createContext({isTransitioning:!1});pv.displayName="ViewTransition";var Fx=x.createContext(new Map);Fx.displayName="Fetchers";var Gx=x.createContext(null);Gx.displayName="Await";var na=x.createContext(null);na.displayName="Navigation";var mr=x.createContext(null);mr.displayName="Location";var aa=x.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var Ud=x.createContext(null);Ud.displayName="RouteError";function Xx(n,{relative:l}={}){et(pr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=x.useContext(na),{hash:u,pathname:o,search:d}=yr(n,{relative:l}),m=o;return r!=="/"&&(m=o==="/"?r:Oa([r,o])),s.createHref({pathname:m,search:d,hash:u})}function pr(){return x.useContext(mr)!=null}function Yt(){return et(pr(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(mr).location}var yv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vv(n){x.useContext(na).static||x.useLayoutEffect(n)}function Lt(){let{isDataRoute:n}=x.useContext(aa);return n?u2():Zx()}function Zx(){et(pr(),"useNavigate() may be used only in the context of a <Router> component.");let n=x.useContext(Gs),{basename:l,navigator:r}=x.useContext(na),{matches:s}=x.useContext(aa),{pathname:u}=Yt(),o=JSON.stringify(dv(s)),d=x.useRef(!1);return vv(()=>{d.current=!0}),x.useCallback((y,p={})=>{if(qn(d.current,yv),!d.current)return;if(typeof y=="number"){r.go(y);return}let b=hv(y,JSON.parse(o),u,p.relative==="path");n==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:Oa([l,b.pathname])),(p.replace?r.replace:r.push)(b,p.state,p)},[l,r,o,u,n])}x.createContext(null);function Jx(){let{matches:n}=x.useContext(aa),l=n[n.length-1];return l?l.params:{}}function yr(n,{relative:l}={}){let{matches:r}=x.useContext(aa),{pathname:s}=Yt(),u=JSON.stringify(dv(r));return x.useMemo(()=>hv(n,JSON.parse(u),s,l==="path"),[n,u,s,l])}function Px(n,l){return bv(n,l)}function bv(n,l,r,s){var O;et(pr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u,static:o}=x.useContext(na),{matches:d}=x.useContext(aa),m=d[d.length-1],y=m?m.params:{},p=m?m.pathname:"/",b=m?m.pathnameBase:"/",g=m&&m.route;{let T=g&&g.path||"";gv(p,!g||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${T}">) 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 xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sb(e){var t=yh(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+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){i=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rr(e){e._valueTracker||(e._valueTracker=sb(e))}function vh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=yh(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function Or(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 ib=/[\n"\\]/g;function Sn(e){return e.replace(ib,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ku(e,t,a,i,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=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,v,xn(t)):a!=null?Hu(e,v,xn(a)):i!=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=""+xn(S):e.removeAttribute("name")}function bh(e,t,a,i,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?""+xn(a):"",t=t!=null?""+xn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=S?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function Hu(e,t,a){t==="number"&&Or(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ns(e,t,a,i){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&&i&&(e[a].defaultSelected=!0)}else{for(a=""+xn(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function gh(e,t,a){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+xn(a):""}function xh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(s(92));if(Se(i)){if(1<i.length)throw Error(s(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=xn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i)}function as(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var rb=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 Sh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||rb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function wh(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&a[c]!==i&&Sh(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&Sh(e,f,t[f])}function Qu(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 ob=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"]]),ub=/^[\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 Dr(e){return ub.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var $u=null;function Yu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ls=null,ss=null;function Eh(e){var t=tn(e);if(t&&(e=t.stateNode)){var a=e[ne]||null;e:switch(e=t.stateNode,t.type){case"input":if(ku(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="'+Sn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var c=i[ne]||null;if(!c)throw Error(s(90));ku(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&vh(i)}break e;case"textarea":gh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ns(e,!!a.multiple,t,!1)}}}var Vu=!1;function Ch(e,t,a){if(Vu)return e(t,a);Vu=!0;try{var i=e(t);return i}finally{if(Vu=!1,(ls!==null||ss!==null)&&(bo(),ls&&(t=ls,e=ss,ss=ls=null,Eh(t),e)))for(t=0;t<e.length;t++)Eh(e[t])}}function ri(e,t){var a=e.stateNode;if(a===null)return null;var i=a[ne]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ku=!1;if(ma)try{var oi={};Object.defineProperty(oi,"passive",{get:function(){Ku=!0}}),window.addEventListener("test",oi,oi),window.removeEventListener("test",oi,oi)}catch{Ku=!1}var Qa=null,Fu=null,Mr=null;function _h(){if(Mr)return Mr;var e,t=Fu,a=t.length,i,c="value"in Qa?Qa.value:Qa.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var v=a-e;for(i=1;i<=v&&t[a-i]===c[f-i];i++);return Mr=c.slice(e,1<i?1-i:void 0)}function Ur(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 Lr(){return!0}function Nh(){return!1}function Kt(e){function t(a,i,c,f,v){this._reactName=a,this._targetInst=c,this.type=i,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)?Lr:Nh,this.isPropagationStopped=Nh,this}return b(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=Lr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),t}var _l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qr=Kt(_l),ui=b({},_l,{view:0,detail:0}),cb=Kt(ui),Gu,Xu,ci,zr=b({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,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!==ci&&(ci&&e.type==="mousemove"?(Gu=e.screenX-ci.screenX,Xu=e.screenY-ci.screenY):Xu=Gu=0,ci=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Xu}}),jh=Kt(zr),fb=b({},zr,{dataTransfer:0}),db=Kt(fb),hb=b({},ui,{relatedTarget:0}),Zu=Kt(hb),mb=b({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),pb=Kt(mb),yb=b({},_l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vb=Kt(yb),bb=b({},_l,{data:0}),Ah=Kt(bb),gb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xb={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"},Sb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sb[e])?!!t[e]:!1}function Ju(){return wb}var Eb=b({},ui,{key:function(e){if(e.key){var t=gb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cb=Kt(Eb),_b=b({},zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Kt(_b),Nb=b({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),jb=Kt(Nb),Ab=b({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tb=Kt(Ab),Rb=b({},zr,{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}),Ob=Kt(Rb),Db=b({},_l,{newState:0,oldState:0}),Mb=Kt(Db),Ub=[9,13,27,32],Pu=ma&&"CompositionEvent"in window,fi=null;ma&&"documentMode"in document&&(fi=document.documentMode);var Lb=ma&&"TextEvent"in window&&!fi,Rh=ma&&(!Pu||fi&&8<fi&&11>=fi),Oh=" ",Dh=!1;function Mh(e,t){switch(e){case"keyup":return Ub.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var is=!1;function qb(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(Dh=!0,Oh);case"textInput":return e=t.data,e===Oh&&Dh?null:e;default:return null}}function zb(e,t){if(is)return e==="compositionend"||!Pu&&Mh(e,t)?(e=_h(),Mr=Fu=Qa=null,is=!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 Rh&&t.locale!=="ko"?null:t.data;default:return null}}var Bb={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 Lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bb[e.type]:t==="textarea"}function qh(e,t,a,i){ls?ss?ss.push(i):ss=[i]:ls=i,t=Co(t,"onChange"),0<t.length&&(a=new qr("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var di=null,hi=null;function kb(e){y0(e,0)}function Br(e){var t=El(e);if(vh(t))return e}function zh(e,t){if(e==="change")return t}var Bh=!1;if(ma){var Iu;if(ma){var Wu="oninput"in document;if(!Wu){var kh=document.createElement("div");kh.setAttribute("oninput","return;"),Wu=typeof kh.oninput=="function"}Iu=Wu}else Iu=!1;Bh=Iu&&(!document.documentMode||9<document.documentMode)}function Hh(){di&&(di.detachEvent("onpropertychange",Qh),hi=di=null)}function Qh(e){if(e.propertyName==="value"&&Br(hi)){var t=[];qh(t,hi,e,Yu(e)),Ch(kb,t)}}function Hb(e,t,a){e==="focusin"?(Hh(),di=t,hi=a,di.attachEvent("onpropertychange",Qh)):e==="focusout"&&Hh()}function Qb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Br(hi)}function $b(e,t){if(e==="click")return Br(t)}function Yb(e,t){if(e==="input"||e==="change")return Br(t)}function Vb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:Vb;function mi(e,t){if(nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var c=a[i];if(!hn.call(t,c)||!nn(e[c],t[c]))return!1}return!0}function $h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yh(e,t){var a=$h(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=$h(a)}}function Vh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Or(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=Or(e.document)}return t}function ec(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 Kb=ma&&"documentMode"in document&&11>=document.documentMode,rs=null,tc=null,pi=null,nc=!1;function Fh(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;nc||rs==null||rs!==Or(i)||(i=rs,"selectionStart"in i&&ec(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),pi&&mi(pi,i)||(pi=i,i=Co(tc,"onSelect"),0<i.length&&(t=new qr("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=rs)))}function Nl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var os={animationend:Nl("Animation","AnimationEnd"),animationiteration:Nl("Animation","AnimationIteration"),animationstart:Nl("Animation","AnimationStart"),transitionrun:Nl("Transition","TransitionRun"),transitionstart:Nl("Transition","TransitionStart"),transitioncancel:Nl("Transition","TransitionCancel"),transitionend:Nl("Transition","TransitionEnd")},ac={},Gh={};ma&&(Gh=document.createElement("div").style,"AnimationEvent"in window||(delete os.animationend.animation,delete os.animationiteration.animation,delete os.animationstart.animation),"TransitionEvent"in window||delete os.transitionend.transition);function jl(e){if(ac[e])return ac[e];if(!os[e])return e;var t=os[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gh)return ac[e]=t[a];return e}var Xh=jl("animationend"),Zh=jl("animationiteration"),Jh=jl("animationstart"),Fb=jl("transitionrun"),Gb=jl("transitionstart"),Xb=jl("transitioncancel"),Ph=jl("transitionend"),Ih=new Map,lc="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(" ");lc.push("scrollEnd");function Dn(e,t){Ih.set(e,t),Fn(t,[e])}var Wh=new WeakMap;function wn(e,t){if(typeof e=="object"&&e!==null){var a=Wh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ph(t)},Wh.set(e,t),t)}return{value:e,source:t,stack:ph(t)}}var En=[],us=0,sc=0;function kr(){for(var e=us,t=sc=us=0;t<e;){var a=En[t];En[t++]=null;var i=En[t];En[t++]=null;var c=En[t];En[t++]=null;var f=En[t];if(En[t++]=null,i!==null&&c!==null){var v=i.pending;v===null?c.next=c:(c.next=v.next,v.next=c),i.pending=c}f!==0&&em(a,c,f)}}function Hr(e,t,a,i){En[us++]=e,En[us++]=t,En[us++]=a,En[us++]=i,sc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function ic(e,t,a,i){return Hr(e,t,a,i),Qr(e)}function cs(e,t){return Hr(e,null,null,t),Qr(e)}function em(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,i=f.alternate,i!==null&&(i.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-st(a),e=f.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=a|536870912),f):null}function Qr(e){if(50<Hi)throw Hi=0,hf=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fs={};function Zb(e,t,a,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,a,i){return new Zb(e,t,a,i)}function rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pa(e,t){var a=e.alternate;return a===null?(a=an(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 tm(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 $r(e,t,a,i,c,f){var v=0;if(i=e,typeof e=="function")rc(e)&&(v=1);else if(typeof e=="string")v=Pg(e,a,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=an(31,a,t,c),e.elementType=te,e.lanes=f,e;case E:return Al(a.children,c,f,t);case A:v=8,c|=24;break;case N:return e=an(12,a,t,c|2),e.elementType=N,e.lanes=f,e;case V:return e=an(13,a,t,c),e.elementType=V,e.lanes=f,e;case H:return e=an(19,a,t,c),e.elementType=H,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:case T:v=10;break e;case O:v=9;break e;case $:v=11;break e;case G:v=14;break e;case Z:v=16,i=null;break e}v=29,a=Error(s(130,e===null?"null":typeof e,"")),i=null}return t=an(v,a,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function Al(e,t,a,i){return e=an(7,e,i,t),e.lanes=a,e}function oc(e,t,a){return e=an(6,e,null,t),e.lanes=a,e}function uc(e,t,a){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ds=[],hs=0,Yr=null,Vr=0,Cn=[],_n=0,Tl=null,ya=1,va="";function Rl(e,t){ds[hs++]=Vr,ds[hs++]=Yr,Yr=e,Vr=t}function nm(e,t,a){Cn[_n++]=ya,Cn[_n++]=va,Cn[_n++]=Tl,Tl=e;var i=ya;e=va;var c=32-st(i)-1;i&=~(1<<c),a+=1;var f=32-st(t)+c;if(30<f){var v=c-c%5;f=(i&(1<<v)-1).toString(32),i>>=v,c-=v,ya=1<<32-st(t)+c|a<<c|i,va=f+e}else ya=1<<f|a<<c|i,va=e}function cc(e){e.return!==null&&(Rl(e,1),nm(e,1,0))}function fc(e){for(;e===Yr;)Yr=ds[--hs],ds[hs]=null,Vr=ds[--hs],ds[hs]=null;for(;e===Tl;)Tl=Cn[--_n],Cn[_n]=null,va=Cn[--_n],Cn[_n]=null,ya=Cn[--_n],Cn[_n]=null}var Ht=null,nt=null,Me=!1,Ol=null,Gn=!1,dc=Error(s(519));function Dl(e){var t=Error(s(418,""));throw bi(wn(t,e)),dc}function am(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[J]=e,t[ne]=i,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<$i.length;a++)je($i[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),bh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),Rr(t);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),xh(t,i.value,i.defaultValue,i.children),Rr(t)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||x0(t.textContent,a)?(i.popover!=null&&(je("beforetoggle",t),je("toggle",t)),i.onScroll!=null&&je("scroll",t),i.onScrollEnd!=null&&je("scrollend",t),i.onClick!=null&&(t.onclick=_o),t=!0):t=!1,t||Dl(e)}function lm(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Ht=Ht.return}}function yi(e){if(e!==Ht)return!1;if(!Me)return lm(e),Me=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Tf(e.type,e.memoizedProps)),a=!a),a&&nt&&Dl(e),lm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){nt=Un(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}nt=null}}else t===27?(t=nt,al(e.type)?(e=Mf,Mf=null,nt=e):nt=t):nt=Ht?Un(e.stateNode.nextSibling):null;return!0}function vi(){nt=Ht=null,Me=!1}function sm(){var e=Ol;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),Ol=null),e}function bi(e){Ol===null?Ol=[e]:Ol.push(e)}var hc=Q(null),Ml=null,ba=null;function $a(e,t,a){I(hc,t._currentValue),t._currentValue=a}function ga(e){e._currentValue=hc.current,W(hc)}function mc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function pc(e,t,a,i){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 j=0;j<t.length;j++)if(S.context===t[j]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),mc(f.return,a,e),i||(v=null);break e}f=S.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(s(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),mc(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 gi(e,t,a,i){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(s(387));if(v=v.memoizedProps,v!==null){var S=c.type;nn(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(s(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Xi):e=[Xi])}c=c.return}e!==null&&pc(t,e,a,i),t.flags|=262144}function Kr(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Ml=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return im(Ml,e)}function Fr(e,t){return Ml===null&&Ul(e),im(e,t)}function im(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ba===null){if(e===null)throw Error(s(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return a}var Jb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Pb=n.unstable_scheduleCallback,Ib=n.unstable_NormalPriority,pt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new Jb,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&Pb(Ib,function(){e.controller.abort()})}var Si=null,vc=0,ms=0,ps=null;function Wb(e,t){if(Si===null){var a=Si=[];vc=0,ms=xf(),ps={status:"pending",value:void 0,then:function(i){a.push(i)}}}return vc++,t.then(rm,rm),t}function rm(){if(--vc===0&&Si!==null){ps!==null&&(ps.status="fulfilled");var e=Si;Si=null,ms=0,ps=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eg(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var om=B.S;B.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wb(e,t),om!==null&&om(e,t)};var Ll=Q(null);function bc(){var e=Ll.current;return e!==null?e:Ge.pooledCache}function Gr(e,t){t===null?I(Ll,Ll.current):I(Ll,t.pool)}function um(){var e=bc();return e===null?null:{parent:pt._currentValue,pool:e}}var wi=Error(s(460)),cm=Error(s(474)),Xr=Error(s(542)),gc={then:function(){}};function fm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zr(){}function dm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zr,Zr),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mm(e),e;default:if(typeof t.status=="string")t.then(Zr,Zr);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mm(e),e}throw Ei=t,wi}}var Ei=null;function hm(){if(Ei===null)throw Error(s(459));var e=Ei;return Ei=null,e}function mm(e){if(e===wi||e===Xr)throw Error(s(483))}var Ya=!1;function xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ze&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Qr(e),em(e,null,a),t}return Hr(e,i,t,a),Qr(e)}function Ci(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,it(e,a)}}function wc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){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:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ec=!1;function _i(){if(Ec){var e=ps;if(e!==null)throw e}}function Ni(e,t,a,i){Ec=!1;var c=e.updateQueue;Ya=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var j=S,L=j.next;j.next=null,v===null?f=L:v.next=L,v=j;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==v&&(S===null?Y.firstBaseUpdate=L:S.next=L,Y.lastBaseUpdate=j))}if(f!==null){var F=c.baseState;v=0,Y=L=j=null,S=f;do{var q=S.lane&-536870913,z=q!==S.lane;if(z?(Ae&q)===q:(i&q)===q){q!==0&&q===ms&&(Ec=!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=b({},F,q);break e;case 2:Ya=!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?(L=Y=z,j=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&&(j=F),c.baseState=j,c.firstBaseUpdate=L,c.lastBaseUpdate=Y,f===null&&(c.shared.lanes=0),Wa|=v,e.lanes=v,e.memoizedState=F}}function pm(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function ym(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)pm(a[e],t)}var ys=Q(null),Jr=Q(0);function vm(e,t){e=Na,I(Jr,e),I(ys,t),Na=e|t.baseLanes}function Cc(){I(Jr,Na),I(ys,ys.current)}function _c(){Na=Jr.current,W(ys),W(Jr)}var Fa=0,xe=null,Qe=null,ft=null,Pr=!1,vs=!1,ql=!1,Ir=0,ji=0,bs=null,tg=0;function ut(){throw Error(s(321))}function Nc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!nn(e[a],t[a]))return!1;return!0}function jc(e,t,a,i,c,f){return Fa=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?ep:tp,ql=!1,f=a(i,c),ql=!1,vs&&(f=gm(t,a,i,c)),bm(e),f}function bm(e){B.H=lo;var t=Qe!==null&&Qe.next!==null;if(Fa=0,ft=Qe=xe=null,Pr=!1,ji=0,bs=null,t)throw Error(s(300));e===null||bt||(e=e.dependencies,e!==null&&Kr(e)&&(bt=!0))}function gm(e,t,a,i){xe=e;var c=0;do{if(vs&&(bs=null),ji=0,vs=!1,25<=c)throw Error(s(301));if(c+=1,ft=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)}B.H=og,f=t(a,i)}while(vs);return f}function ng(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Ai(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Ac(){var e=Ir!==0;return Ir=0,e}function Tc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Rc(e){if(Pr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pr=!1}Fa=0,ft=Qe=xe=null,vs=!1,ji=Ir=0,bs=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?xe.memoizedState=ft=e:ft=ft.next=e,ft}function dt(){if(Qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=ft===null?xe.memoizedState:ft.next;if(t!==null)ft=t,Qe=e;else{if(e===null)throw xe.alternate===null?Error(s(467)):Error(s(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},ft===null?xe.memoizedState=ft=e:ft=ft.next=e}return ft}function Oc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ai(e){var t=ji;return ji+=1,bs===null&&(bs=[]),e=dm(bs,e,t),t=xe,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?ep:tp),e}function Wr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ai(e);if(e.$$typeof===T)return Ot(e)}throw Error(s(438,String(e)))}function Dc(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=xe.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Oc(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=pe;return t.index++,a}function xa(e,t){return typeof t=="function"?t(e):t}function eo(e){var t=dt();return Mc(t,Qe,e)}function Mc(e,t,a){var i=e.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=a;var c=e.baseQueue,f=i.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,i.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var S=v=null,j=null,L=t,Y=!1;do{var F=L.lane&-536870913;if(F!==L.lane?(Ae&F)===F:(Fa&F)===F){var q=L.revertLane;if(q===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),F===ms&&(Y=!0);else if((Fa&q)===q){L=L.next,q===ms&&(Y=!0);continue}else F={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},j===null?(S=j=F,v=f):j=j.next=F,xe.lanes|=q,Wa|=q;F=L.action,ql&&a(f,F),f=L.hasEagerState?L.eagerState:a(f,F)}else q={lane:F,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},j===null?(S=j=q,v=f):j=j.next=q,xe.lanes|=F,Wa|=F;L=L.next}while(L!==null&&L!==t);if(j===null?v=f:j.next=S,!nn(f,e.memoizedState)&&(bt=!0,Y&&(a=ps,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=j,i.lastRenderedState=f}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Uc(e){var t=dt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var i=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);nn(f,t.memoizedState)||(bt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,i]}function xm(e,t,a){var i=xe,c=dt(),f=Me;if(f){if(a===void 0)throw Error(s(407));a=a()}else a=t();var v=!nn((Qe||c).memoizedState,a);v&&(c.memoizedState=a,bt=!0),c=c.queue;var S=Em.bind(null,i,c,e);if(Ti(2048,8,S,[e]),c.getSnapshot!==t||v||ft!==null&&ft.memoizedState.tag&1){if(i.flags|=2048,gs(9,to(),wm.bind(null,i,c,a,t),null),Ge===null)throw Error(s(349));f||(Fa&124)!==0||Sm(i,t,a)}return a}function Sm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=xe.updateQueue,t===null?(t=Oc(),xe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function wm(e,t,a,i){t.value=a,t.getSnapshot=i,Cm(t)&&_m(e)}function Em(e,t,a){return a(function(){Cm(t)&&_m(e)})}function Cm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!nn(e,a)}catch{return!0}}function _m(e){var t=cs(e,2);t!==null&&un(t,e,2)}function Lc(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:xa,lastRenderedState:e},t}function Nm(e,t,a,i){return e.baseState=a,Mc(e,Qe,typeof i=="function"?i:xa)}function ag(e,t,a,i,c){if(ao(e))throw Error(s(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)}};B.T!==null?a(!0):f.isTransition=!1,i(f),a=t.pending,a===null?(f.next=t.pending=f,jm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function jm(e,t){var a=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=B.T,v={};B.T=v;try{var S=a(c,i),j=B.S;j!==null&&j(v,S),Am(e,t,S)}catch(L){qc(e,t,L)}finally{B.T=f}}else try{f=a(c,i),Am(e,t,f)}catch(L){qc(e,t,L)}}function Am(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Tm(e,t,i)},function(i){return qc(e,t,i)}):Tm(e,t,a)}function Tm(e,t,a){t.status="fulfilled",t.value=a,Rm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,jm(e,a)))}function qc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Rm(t),t=t.next;while(t!==i)}e.action=null}function Rm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Om(e,t){return t}function Dm(e,t){if(Me){var a=Ge.formState;if(a!==null){e:{var i=xe;if(Me){if(nt){t:{for(var c=nt,f=Gn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Un(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){nt=Un(c.nextSibling),i=c.data==="F!";break e}}Dl(i)}i=!1}i&&(t=a[0])}}return a=Ft(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Om,lastRenderedState:t},a.queue=i,a=Pm.bind(null,xe,i),i.dispatch=a,i=Lc(!1),f=Qc.bind(null,xe,!1,i.queue),i=Ft(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,a=ag.bind(null,xe,c,f,a),c.dispatch=a,i.memoizedState=e,[t,a,!1]}function Mm(e){var t=dt();return Um(t,Qe,e)}function Um(e,t,a){if(t=Mc(e,t,Om)[0],e=eo(xa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ai(t)}catch(v){throw v===wi?Xr:v}else i=t;t=dt();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,gs(9,to(),lg.bind(null,c,a),null)),[i,f,e]}function lg(e,t){e.action=t}function Lm(e){var t=dt(),a=Qe;if(a!==null)return Um(t,a,e);dt(),t=t.memoizedState,a=dt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function gs(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Oc(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function to(){return{destroy:void 0,resource:void 0}}function qm(){return dt().memoizedState}function no(e,t,a,i){var c=Ft();i=i===void 0?null:i,xe.flags|=e,c.memoizedState=gs(1|t,to(),a,i)}function Ti(e,t,a,i){var c=dt();i=i===void 0?null:i;var f=c.memoizedState.inst;Qe!==null&&i!==null&&Nc(i,Qe.memoizedState.deps)?c.memoizedState=gs(t,f,a,i):(xe.flags|=e,c.memoizedState=gs(1|t,f,a,i))}function zm(e,t){no(8390656,8,e,t)}function Bm(e,t){Ti(2048,8,e,t)}function km(e,t){return Ti(4,2,e,t)}function Hm(e,t){return Ti(4,4,e,t)}function Qm(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 $m(e,t,a){a=a!=null?a.concat([e]):null,Ti(4,4,Qm.bind(null,t,e),a)}function zc(){}function Ym(e,t){var a=dt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Nc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Vm(e,t){var a=dt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Nc(t,i[1]))return i[0];if(i=e(),ql){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[i,t],i}function Bc(e,t,a){return a===void 0||(Fa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Gp(),xe.lanes|=e,Wa|=e,a)}function Km(e,t,a,i){return nn(a,t)?a:ys.current!==null?(e=Bc(e,a,i),nn(e,t)||(bt=!0),e):(Fa&42)===0?(bt=!0,e.memoizedState=a):(e=Gp(),xe.lanes|=e,Wa|=e,t)}function Fm(e,t,a,i,c){var f=X.p;X.p=f!==0&&8>f?f:8;var v=B.T,S={};B.T=S,Qc(e,!1,t,a);try{var j=c(),L=B.S;if(L!==null&&L(S,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var Y=eg(j,i);Ri(e,t,Y,on(e))}else Ri(e,t,i,on(e))}catch(F){Ri(e,t,{then:function(){},status:"rejected",reason:F},on())}finally{X.p=f,B.T=v}}function sg(){}function kc(e,t,a,i){if(e.tag!==5)throw Error(s(476));var c=Gm(e).queue;Fm(e,c,t,P,a===null?sg:function(){return Xm(e),a(i)})}function Gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:P},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xm(e){var t=Gm(e).next.queue;Ri(e,t,{},on())}function Hc(){return Ot(Xi)}function Zm(){return dt().memoizedState}function Jm(){return dt().memoizedState}function ig(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=on();e=Va(a);var i=Ka(t,e,a);i!==null&&(un(i,t,a),Ci(i,t,a)),t={cache:yc()},e.payload=t;return}t=t.return}}function rg(e,t,a){var i=on();a={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},ao(e)?Im(t,a):(a=ic(e,t,a,i),a!==null&&(un(a,e,i),Wm(a,t,i)))}function Pm(e,t,a){var i=on();Ri(e,t,a,i)}function Ri(e,t,a,i){var c={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(ao(e))Im(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,nn(S,v))return Hr(e,t,c,0),Ge===null&&kr(),!1}catch{}finally{}if(a=ic(e,t,c,i),a!==null)return un(a,e,i),Wm(a,t,i),!0}return!1}function Qc(e,t,a,i){if(i={lane:2,revertLane:xf(),action:i,hasEagerState:!1,eagerState:null,next:null},ao(e)){if(t)throw Error(s(479))}else t=ic(e,a,i,2),t!==null&&un(t,e,2)}function ao(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Im(e,t){vs=Pr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wm(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,it(e,a)}}var lo={readContext:Ot,use:Wr,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},ep={readContext:Ot,use:Wr,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:zm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,no(4194308,4,Qm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return no(4194308,4,e,t)},useInsertionEffect:function(e,t){no(4,2,e,t)},useMemo:function(e,t){var a=Ft();t=t===void 0?null:t;var i=e();if(ql){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Ft();if(a!==void 0){var c=a(t);if(ql){Vt(!0);try{a(t)}finally{Vt(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=rg.bind(null,xe,e),[i.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,a=Pm.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:zc,useDeferredValue:function(e,t){var a=Ft();return Bc(a,e,t)},useTransition:function(){var e=Lc(!1);return e=Fm.bind(null,xe,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=xe,c=Ft();if(Me){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),Ge===null)throw Error(s(349));(Ae&124)!==0||Sm(i,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,zm(Em.bind(null,i,f,e),[e]),i.flags|=2048,gs(9,to(),wm.bind(null,i,f,a,t),null),a},useId:function(){var e=Ft(),t=Ge.identifierPrefix;if(Me){var a=va,i=ya;a=(i&~(1<<32-st(i)-1)).toString(32)+a,t="«"+t+"R"+a,a=Ir++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=tg++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Hc,useFormState:Dm,useActionState:Dm,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=Qc.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Dc,useCacheRefresh:function(){return Ft().memoizedState=ig.bind(null,xe)}},tp={readContext:Ot,use:Wr,useCallback:Ym,useContext:Ot,useEffect:Bm,useImperativeHandle:$m,useInsertionEffect:km,useLayoutEffect:Hm,useMemo:Vm,useReducer:eo,useRef:qm,useState:function(){return eo(xa)},useDebugValue:zc,useDeferredValue:function(e,t){var a=dt();return Km(a,Qe.memoizedState,e,t)},useTransition:function(){var e=eo(xa)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:xm,useId:Zm,useHostTransitionStatus:Hc,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,t){var a=dt();return Nm(a,Qe,e,t)},useMemoCache:Dc,useCacheRefresh:Jm},og={readContext:Ot,use:Wr,useCallback:Ym,useContext:Ot,useEffect:Bm,useImperativeHandle:$m,useInsertionEffect:km,useLayoutEffect:Hm,useMemo:Vm,useReducer:Uc,useRef:qm,useState:function(){return Uc(xa)},useDebugValue:zc,useDeferredValue:function(e,t){var a=dt();return Qe===null?Bc(a,e,t):Km(a,Qe.memoizedState,e,t)},useTransition:function(){var e=Uc(xa)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:xm,useId:Zm,useHostTransitionStatus:Hc,useFormState:Lm,useActionState:Lm,useOptimistic:function(e,t){var a=dt();return Qe!==null?Nm(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Jm},xs=null,Oi=0;function so(e){var t=Oi;return Oi+=1,xs===null&&(xs=[]),dm(xs,e,t)}function Di(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function io(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function np(e){var t=e._init;return t(e._payload)}function ap(e){function t(M,D){if(e){var U=M.deletions;U===null?(M.deletions=[D],M.flags|=16):U.push(D)}}function a(M,D){if(!e)return null;for(;D!==null;)t(M,D),D=D.sibling;return null}function i(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=pa(M,D),M.index=0,M.sibling=null,M}function f(M,D,U){return M.index=U,e?(U=M.alternate,U!==null?(U=U.index,U<D?(M.flags|=67108866,D):U):(M.flags|=67108866,D)):(M.flags|=1048576,D)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,D,U,K){return D===null||D.tag!==6?(D=oc(U,M.mode,K),D.return=M,D):(D=c(D,U),D.return=M,D)}function j(M,D,U,K){var ee=U.type;return ee===E?Y(M,D,U.props.children,K,U.key):D!==null&&(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&np(ee)===D.type)?(D=c(D,U.props),Di(D,U),D.return=M,D):(D=$r(U.type,U.key,U.props,null,M.mode,K),Di(D,U),D.return=M,D)}function L(M,D,U,K){return D===null||D.tag!==4||D.stateNode.containerInfo!==U.containerInfo||D.stateNode.implementation!==U.implementation?(D=uc(U,M.mode,K),D.return=M,D):(D=c(D,U.children||[]),D.return=M,D)}function Y(M,D,U,K,ee){return D===null||D.tag!==7?(D=Al(U,M.mode,K,ee),D.return=M,D):(D=c(D,U),D.return=M,D)}function F(M,D,U){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=oc(""+D,M.mode,U),D.return=M,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case w:return U=$r(D.type,D.key,D.props,null,M.mode,U),Di(U,D),U.return=M,U;case C:return D=uc(D,M.mode,U),D.return=M,D;case Z:var K=D._init;return D=K(D._payload),F(M,D,U)}if(Se(D)||ge(D))return D=Al(D,M.mode,U,null),D.return=M,D;if(typeof D.then=="function")return F(M,so(D),U);if(D.$$typeof===T)return F(M,Fr(M,D),U);io(M,D)}return null}function q(M,D,U,K){var ee=D!==null?D.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ee!==null?null:S(M,D,""+U,K);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return U.key===ee?j(M,D,U,K):null;case C:return U.key===ee?L(M,D,U,K):null;case Z:return ee=U._init,U=ee(U._payload),q(M,D,U,K)}if(Se(U)||ge(U))return ee!==null?null:Y(M,D,U,K,null);if(typeof U.then=="function")return q(M,D,so(U),K);if(U.$$typeof===T)return q(M,D,Fr(M,U),K);io(M,U)}return null}function z(M,D,U,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return M=M.get(U)||null,S(D,M,""+K,ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return M=M.get(K.key===null?U:K.key)||null,j(D,M,K,ee);case C:return M=M.get(K.key===null?U:K.key)||null,L(D,M,K,ee);case Z:var we=K._init;return K=we(K._payload),z(M,D,U,K,ee)}if(Se(K)||ge(K))return M=M.get(U)||null,Y(D,M,K,ee,null);if(typeof K.then=="function")return z(M,D,U,so(K),ee);if(K.$$typeof===T)return z(M,D,U,Fr(D,K),ee);io(D,K)}return null}function me(M,D,U,K){for(var ee=null,we=null,se=D,he=D=0,xt=null;se!==null&&he<U.length;he++){se.index>he?(xt=se,se=null):xt=se.sibling;var Te=q(M,se,U[he],K);if(Te===null){se===null&&(se=xt);break}e&&se&&Te.alternate===null&&t(M,se),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te,se=xt}if(he===U.length)return a(M,se),Me&&Rl(M,he),ee;if(se===null){for(;he<U.length;he++)se=F(M,U[he],K),se!==null&&(D=f(se,D,he),we===null?ee=se:we.sibling=se,we=se);return Me&&Rl(M,he),ee}for(se=i(se);he<U.length;he++)xt=z(se,M,he,U[he],K),xt!==null&&(e&&xt.alternate!==null&&se.delete(xt.key===null?he:xt.key),D=f(xt,D,he),we===null?ee=xt:we.sibling=xt,we=xt);return e&&se.forEach(function(ol){return t(M,ol)}),Me&&Rl(M,he),ee}function fe(M,D,U,K){if(U==null)throw Error(s(151));for(var ee=null,we=null,se=D,he=D=0,xt=null,Te=U.next();se!==null&&!Te.done;he++,Te=U.next()){se.index>he?(xt=se,se=null):xt=se.sibling;var ol=q(M,se,Te.value,K);if(ol===null){se===null&&(se=xt);break}e&&se&&ol.alternate===null&&t(M,se),D=f(ol,D,he),we===null?ee=ol:we.sibling=ol,we=ol,se=xt}if(Te.done)return a(M,se),Me&&Rl(M,he),ee;if(se===null){for(;!Te.done;he++,Te=U.next())Te=F(M,Te.value,K),Te!==null&&(D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return Me&&Rl(M,he),ee}for(se=i(se);!Te.done;he++,Te=U.next())Te=z(se,M,he,Te.value,K),Te!==null&&(e&&Te.alternate!==null&&se.delete(Te.key===null?he:Te.key),D=f(Te,D,he),we===null?ee=Te:we.sibling=Te,we=Te);return e&&se.forEach(function(ux){return t(M,ux)}),Me&&Rl(M,he),ee}function Ye(M,D,U,K){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:e:{for(var ee=U.key;D!==null;){if(D.key===ee){if(ee=U.type,ee===E){if(D.tag===7){a(M,D.sibling),K=c(D,U.props.children),K.return=M,M=K;break e}}else if(D.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Z&&np(ee)===D.type){a(M,D.sibling),K=c(D,U.props),Di(K,U),K.return=M,M=K;break e}a(M,D);break}else t(M,D);D=D.sibling}U.type===E?(K=Al(U.props.children,M.mode,K,U.key),K.return=M,M=K):(K=$r(U.type,U.key,U.props,null,M.mode,K),Di(K,U),K.return=M,M=K)}return v(M);case C:e:{for(ee=U.key;D!==null;){if(D.key===ee)if(D.tag===4&&D.stateNode.containerInfo===U.containerInfo&&D.stateNode.implementation===U.implementation){a(M,D.sibling),K=c(D,U.children||[]),K.return=M,M=K;break e}else{a(M,D);break}else t(M,D);D=D.sibling}K=uc(U,M.mode,K),K.return=M,M=K}return v(M);case Z:return ee=U._init,U=ee(U._payload),Ye(M,D,U,K)}if(Se(U))return me(M,D,U,K);if(ge(U)){if(ee=ge(U),typeof ee!="function")throw Error(s(150));return U=ee.call(U),fe(M,D,U,K)}if(typeof U.then=="function")return Ye(M,D,so(U),K);if(U.$$typeof===T)return Ye(M,D,Fr(M,U),K);io(M,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,D!==null&&D.tag===6?(a(M,D.sibling),K=c(D,U),K.return=M,M=K):(a(M,D),K=oc(U,M.mode,K),K.return=M,M=K),v(M)):a(M,D)}return function(M,D,U,K){try{Oi=0;var ee=Ye(M,D,U,K);return xs=null,ee}catch(se){if(se===wi||se===Xr)throw se;var we=an(29,se,null,M.mode);return we.lanes=K,we.return=M,we}finally{}}}var Ss=ap(!0),lp=ap(!1),Nn=Q(null),Xn=null;function Ga(e){var t=e.alternate;I(yt,yt.current&1),I(Nn,e),Xn===null&&(t===null||ys.current!==null||t.memoizedState!==null)&&(Xn=e)}function sp(e){if(e.tag===22){if(I(yt,yt.current),I(Nn,e),Xn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Xn=e)}}else Xa()}function Xa(){I(yt,yt.current),I(Nn,Nn.current)}function Sa(e){W(Nn),Xn===e&&(Xn=null),W(yt)}var yt=Q(0);function ro(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==="$?"||Df(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 $c(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Yc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=on(),c=Va(i);c.payload=t,a!=null&&(c.callback=a),t=Ka(e,c,i),t!==null&&(un(t,e,i),Ci(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=on(),c=Va(i);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Ka(e,c,i),t!==null&&(un(t,e,i),Ci(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=on(),i=Va(a);i.tag=2,t!=null&&(i.callback=t),t=Ka(e,i,a),t!==null&&(un(t,e,a),Ci(t,e,a))}};function ip(e,t,a,i,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,v):t.prototype&&t.prototype.isPureReactComponent?!mi(a,i)||!mi(c,f):!0}function rp(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Yc.enqueueReplaceState(t,t.state,null)}function zl(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}var oo=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 op(e){oo(e)}function up(e){console.error(e)}function cp(e){oo(e)}function uo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function fp(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Vc(e,t,a){return a=Va(a),a.tag=3,a.payload={element:null},a.callback=function(){uo(e,t)},a}function dp(e){return e=Va(e),e.tag=3,e}function hp(e,t,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=i.value;e.payload=function(){return c(f)},e.callback=function(){fp(t,a,i)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){fp(t,a,i),typeof c!="function"&&(el===null?el=new Set([this]):el.add(this));var S=i.stack;this.componentDidCatch(i.value,{componentStack:S!==null?S:""})})}function ug(e,t,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&gi(t,a,c,!0),a=Nn.current,a!==null){switch(a.tag){case 13:return Xn===null?pf():a.alternate===null&&at===0&&(at=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===gc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),vf(e,i,c)),!1;case 22:return a.flags|=65536,i===gc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),vf(e,i,c)),!1}throw Error(s(435,a.tag))}return vf(e,i,c),pf(),!1}if(Me)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==dc&&(e=Error(s(422),{cause:i}),bi(wn(e,a)))):(i!==dc&&(t=Error(s(423),{cause:i}),bi(wn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=wn(i,a),c=Vc(e.stateNode,i,c),wc(e,c),at!==4&&(at=2)),!1;var f=Error(s(520),{cause:i});if(f=wn(f,a),ki===null?ki=[f]:ki.push(f),at!==4&&(at=2),t===null)return!0;i=wn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Vc(a.stateNode,i,e),wc(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"&&(el===null||!el.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=dp(c),hp(c,e,a,i),wc(a,c),!1}a=a.return}while(a!==null);return!1}var mp=Error(s(461)),bt=!1;function wt(e,t,a,i){t.child=e===null?lp(t,null,a,i):Ss(t,e.child,a,i)}function pp(e,t,a,i,c){a=a.render;var f=t.ref;if("ref"in i){var v={};for(var S in i)S!=="ref"&&(v[S]=i[S])}else v=i;return Ul(t),i=jc(e,t,a,v,f,c),S=Ac(),e!==null&&!bt?(Tc(e,t,c),wa(e,t,c)):(Me&&S&&cc(t),t.flags|=1,wt(e,t,i,c),t.child)}function yp(e,t,a,i,c){if(e===null){var f=a.type;return typeof f=="function"&&!rc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,vp(e,t,f,i,c)):(e=$r(a.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ic(e,c)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:mi,a(v,i)&&e.ref===t.ref)return wa(e,t,c)}return t.flags|=1,e=pa(f,i),e.ref=t.ref,e.return=t,t.child=e}function vp(e,t,a,i,c){if(e!==null){var f=e.memoizedProps;if(mi(f,i)&&e.ref===t.ref)if(bt=!1,t.pendingProps=i=f,Ic(e,c))(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,wa(e,t,c)}return Kc(e,t,a,i,c)}function bp(e,t,a){var i=t.pendingProps,c=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=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&~i}else t.childLanes=0,t.child=null;return gp(e,t,i,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gr(t,f!==null?f.cachePool:null),f!==null?vm(t,f):Cc(),sp(t);else return t.lanes=t.childLanes=536870912,gp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(Gr(t,f.cachePool),vm(t,f),Xa(),t.memoizedState=null):(e!==null&&Gr(t,null),Cc(),Xa());return wt(e,t,c,a),t.child}function gp(e,t,a,i){var c=bc();return c=c===null?null:{parent:pt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Gr(t,null),Cc(),sp(t),e!==null&&gi(e,t,i,!0),null}function co(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(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Kc(e,t,a,i,c){return Ul(t),a=jc(e,t,a,i,void 0,c),i=Ac(),e!==null&&!bt?(Tc(e,t,c),wa(e,t,c)):(Me&&i&&cc(t),t.flags|=1,wt(e,t,a,c),t.child)}function xp(e,t,a,i,c,f){return Ul(t),t.updateQueue=null,a=gm(t,i,a,c),bm(e),i=Ac(),e!==null&&!bt?(Tc(e,t,f),wa(e,t,f)):(Me&&i&&cc(t),t.flags|=1,wt(e,t,a,f),t.child)}function Sp(e,t,a,i,c){if(Ul(t),t.stateNode===null){var f=fs,v=a.contextType;typeof v=="object"&&v!==null&&(f=Ot(v)),f=new a(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Yc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},xc(t),v=a.contextType,f.context=typeof v=="object"&&v!==null?Ot(v):fs,f.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&($c(t,a,v,i),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&&Yc.enqueueReplaceState(f,f.state,null),Ni(t,i,f,c),_i(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,j=zl(a,S);f.props=j;var L=f.context,Y=a.contextType;v=fs,typeof Y=="object"&&Y!==null&&(v=Ot(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||L!==v)&&rp(t,f,i,v),Ya=!1;var q=t.memoizedState;f.state=q,Ni(t,i,f,c),_i(),L=t.memoizedState,S||q!==L||Ya?(typeof F=="function"&&($c(t,a,F,i),L=t.memoizedState),(j=Ya||ip(t,a,j,i,q,L,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=i,t.memoizedState=L),f.props=i,f.state=L,f.context=v,i=j):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,Sc(e,t),v=t.memoizedProps,Y=zl(a,v),f.props=Y,F=t.pendingProps,q=f.context,L=a.contextType,j=fs,typeof L=="object"&&L!==null&&(j=Ot(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==F||q!==j)&&rp(t,f,i,j),Ya=!1,q=t.memoizedState,f.state=q,Ni(t,i,f,c),_i();var z=t.memoizedState;v!==F||q!==z||Ya||e!==null&&e.dependencies!==null&&Kr(e.dependencies)?(typeof S=="function"&&($c(t,a,S,i),z=t.memoizedState),(Y=Ya||ip(t,a,Y,i,q,z,j)||e!==null&&e.dependencies!==null&&Kr(e.dependencies))?(L||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,z,j),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,z,j)),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=i,t.memoizedState=z),f.props=i,f.state=z,f.context=j,i=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),i=!1)}return f=i,co(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Ss(t,e.child,null,c),t.child=Ss(t,null,a,c)):wt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=wa(e,t,c),e}function wp(e,t,a,i){return vi(),t.flags|=256,wt(e,t,a,i),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:um()}}function Xc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=jn),e}function Ep(e,t,a){var i=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(Me){if(c?Ga(t):Xa(),Me){var S=nt,j;if(j=S){e:{for(j=S,S=Gn;j.nodeType!==8;){if(!S){S=null;break e}if(j=Un(j.nextSibling),j===null){S=null;break e}}S=j}S!==null?(t.memoizedState={dehydrated:S,treeContext:Tl!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},j=an(18,null,null,0),j.stateNode=S,j.return=t,t.child=j,Ht=t,nt=null,j=!0):j=!1}j||Dl(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Df(S)?t.lanes=32:t.lanes=536870912,null;Sa(t)}return S=i.children,i=i.fallback,c?(Xa(),c=t.mode,S=fo({mode:"hidden",children:S},c),i=Al(i,c,a,null),S.return=t,i.return=t,S.sibling=i,t.child=S,c=t.child,c.memoizedState=Gc(a),c.childLanes=Xc(e,v,a),t.memoizedState=Fc,i):(Ga(t),Zc(t,S))}if(j=e.memoizedState,j!==null&&(S=j.dehydrated,S!==null)){if(f)t.flags&256?(Ga(t),t.flags&=-257,t=Jc(e,t,a)):t.memoizedState!==null?(Xa(),t.child=e.child,t.flags|=128,t=null):(Xa(),c=i.fallback,S=t.mode,i=fo({mode:"visible",children:i.children},S),c=Al(c,S,a,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,Ss(t,e.child,null,a),i=t.child,i.memoizedState=Gc(a),i.childLanes=Xc(e,v,a),t.memoizedState=Fc,t=c);else if(Ga(t),Df(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var L=v.dgst;v=L,i=Error(s(419)),i.stack="",i.digest=v,bi({value:i,source:null,stack:null}),t=Jc(e,t,a)}else if(bt||gi(e,t,a,!1),v=(a&e.childLanes)!==0,bt||v){if(v=Ge,v!==null&&(i=a&-a,i=(i&42)!==0?1:At(i),i=(i&(v.suspendedLanes|a))!==0?0:i,i!==0&&i!==j.retryLane))throw j.retryLane=i,cs(e,i),un(v,e,i),mp;S.data==="$?"||pf(),t=Jc(e,t,a)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,nt=Un(S.nextSibling),Ht=t,Me=!0,Ol=null,Gn=!1,e!==null&&(Cn[_n++]=ya,Cn[_n++]=va,Cn[_n++]=Tl,ya=e.id,va=e.overflow,Tl=t),t=Zc(t,i.children),t.flags|=4096);return t}return c?(Xa(),c=i.fallback,S=t.mode,j=e.child,L=j.sibling,i=pa(j,{mode:"hidden",children:i.children}),i.subtreeFlags=j.subtreeFlags&65011712,L!==null?c=pa(L,c):(c=Al(c,S,a,null),c.flags|=2),c.return=t,i.return=t,i.sibling=c,t.child=i,i=c,c=t.child,S=e.child.memoizedState,S===null?S=Gc(a):(j=S.cachePool,j!==null?(L=pt._currentValue,j=j.parent!==L?{parent:L,pool:L}:j):j=um(),S={baseLanes:S.baseLanes|a,cachePool:j}),c.memoizedState=S,c.childLanes=Xc(e,v,a),t.memoizedState=Fc,i):(Ga(t),a=e.child,e=a.sibling,a=pa(a,{mode:"visible",children:i.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 Zc(e,t){return t=fo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fo(e,t){return e=an(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Jc(e,t,a){return Ss(t,e.child,null,a),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),mc(e.return,t,a)}function Pc(e,t,a,i,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=a,f.tailMode=c)}function _p(e,t,a){var i=t.pendingProps,c=i.revealOrder,f=i.tail;if(wt(e,t,i.children,a),i=yt.current,(i&2)!==0)i=i&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&&Cp(e,a,t);else if(e.tag===19)Cp(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}i&=1}switch(I(yt,i),c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&ro(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Pc(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&&ro(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Pc(t,!0,a,null,f);break;case"together":Pc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Wa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(gi(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=pa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=pa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Kr(e)))}function cg(e,t,a){switch(t.tag){case 3:qe(t,t.stateNode.containerInfo),$a(t,pt,e.memoizedState.cache),vi();break;case 27:case 5:$n(t);break;case 4:qe(t,t.stateNode.containerInfo);break;case 10:$a(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Ga(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ep(e,t,a):(Ga(t),e=wa(e,t,a),e!==null?e.sibling:null);Ga(t);break;case 19:var c=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(gi(e,t,a,!1),i=(a&t.childLanes)!==0),c){if(i)return _p(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),i)break;return null;case 22:case 23:return t.lanes=0,bp(e,t,a);case 24:$a(t,pt,e.memoizedState.cache)}return wa(e,t,a)}function Np(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!Ic(e,a)&&(t.flags&128)===0)return bt=!1,cg(e,t,a);bt=(e.flags&131072)!==0}else bt=!1,Me&&(t.flags&1048576)!==0&&nm(t,Vr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,c=i._init;if(i=c(i._payload),t.type=i,typeof i=="function")rc(i)?(e=zl(i,e),t.tag=1,t=Sp(null,t,i,e,a)):(t.tag=0,t=Kc(null,t,i,e,a));else{if(i!=null){if(c=i.$$typeof,c===$){t.tag=11,t=pp(null,t,i,e,a);break e}else if(c===G){t.tag=14,t=yp(null,t,i,e,a);break e}}throw t=ye(i)||i,Error(s(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,c=zl(i,t.pendingProps),Sp(e,t,i,c,a);case 3:e:{if(qe(t,t.stateNode.containerInfo),e===null)throw Error(s(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,Sc(e,t),Ni(t,i,null,a);var v=t.memoizedState;if(i=v.cache,$a(t,pt,i),i!==f.cache&&pc(t,[pt],a,!0),_i(),i=v.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=wp(e,t,i,a);break e}else if(i!==c){c=wn(Error(s(424)),t),bi(c),t=wp(e,t,i,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=Un(e.firstChild),Ht=t,Me=!0,Ol=null,Gn=!0,a=lp(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vi(),i===c){t=wa(e,t,a);break e}wt(e,t,i,a)}t=t.child}return t;case 26:return co(e,t),e===null?(a=R0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Me||(a=t.type,e=t.pendingProps,i=No(ce.current).createElement(a),i[J]=t,i[ne]=e,Ct(i,a,e),ot(i),t.stateNode=i):t.memoizedState=R0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $n(t),e===null&&Me&&(i=t.stateNode=j0(t.type,t.pendingProps,ce.current),Ht=t,Gn=!0,c=nt,al(t.type)?(Mf=c,nt=Un(i.firstChild)):nt=c),wt(e,t,t.pendingProps.children,a),co(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((c=i=nt)&&(i=Bg(i,t.type,t.pendingProps,Gn),i!==null?(t.stateNode=i,Ht=t,nt=Un(i.firstChild),Gn=!1,c=!0):c=!1),c||Dl(t)),$n(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,i=f.children,Tf(c,f)?i=null:v!==null&&Tf(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=jc(e,t,ng,null,null,a),Xi._currentValue=c),co(e,t),wt(e,t,i,a),t.child;case 6:return e===null&&Me&&((e=a=nt)&&(a=kg(a,t.pendingProps,Gn),a!==null?(t.stateNode=a,Ht=t,nt=null,e=!0):e=!1),e||Dl(t)),null;case 13:return Ep(e,t,a);case 4:return qe(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ss(t,null,i,a):wt(e,t,i,a),t.child;case 11:return pp(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 i=t.pendingProps,$a(t,t.type,i.value),wt(e,t,i.children,a),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Ul(t),c=Ot(c),i=i(c),t.flags|=1,wt(e,t,i,a),t.child;case 14:return yp(e,t,t.type,t.pendingProps,a);case 15:return vp(e,t,t.type,t.pendingProps,a);case 19:return _p(e,t,a);case 31:return i=t.pendingProps,a=t.mode,i={mode:i.mode,children:i.children},e===null?(a=fo(i,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=pa(e.child,i),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return bp(e,t,a);case 24:return Ul(t),i=Ot(pt),e===null?(c=bc(),c===null&&(c=Ge,f=yc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:i,cache:c},xc(t),$a(t,pt,c)):((e.lanes&a)!==0&&(Sc(e,t),Ni(t,null,null,a),_i()),c=e.memoizedState,f=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),$a(t,pt,i)):(i=f.cache,$a(t,pt,i),i!==c.cache&&pc(t,[pt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Ea(e){e.flags|=4}function jp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L0(t)){if(t=Nn.current,t!==null&&((Ae&4194048)===Ae?Xn!==null:(Ae&62914560)!==Ae&&(Ae&536870912)===0||t!==Xn))throw Ei=gc,cm;e.flags|=8192}}function ho(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?fa():536870912,e.lanes|=t,_s|=t)}function Mi(e,t){if(!Me)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 i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function fg(e,t,a){var i=t.pendingProps;switch(fc(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,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ga(pt),Ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(yi(t)?Ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sm())),We(t),null;case 26:return a=t.memoizedState,e===null?(Ea(t),a!==null?(We(t),jp(t,a)):(We(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Ea(t),We(t),jp(t,a)):(We(t),t.flags&=-16777217):(e.memoizedProps!==i&&Ea(t),We(t),t.flags&=-16777217),null;case 27:Nt(t),a=ce.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return We(t),null}e=ie.current,yi(t)?am(t):(e=j0(c,i,a),t.stateNode=e,Ea(t))}return We(t),null;case 5:if(Nt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return We(t),null}if(e=ie.current,yi(t))am(t);else{switch(c=No(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 i.is=="string"?c.createElement("select",{is:i.is}):c.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?c.createElement(a,{is:i.is}):c.createElement(a)}}e[J]=t,e[ne]=i;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,i),a){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ea(t)}}return We(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ea(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(e=ce.current,yi(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,c=Ht,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[J]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||x0(e.nodeValue,a)),e||Dl(t)}else e=No(e).createTextNode(i),e[J]=t,t.stateNode=e}return We(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=yi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[J]=t}else vi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),c=!1}else c=sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Sa(t),t):(Sa(t),null)}if(Sa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=i!==null,e=e!==null&&e.memoizedState!==null,a){i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool);var f=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==c&&(i.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),ho(t,t.updateQueue),We(t),null;case 4:return Ze(),e===null&&Cf(t.stateNode.containerInfo),We(t),null;case 10:return ga(t.type),We(t),null;case 19:if(W(yt),c=t.memoizedState,c===null)return We(t),null;if(i=(t.flags&128)!==0,f=c.rendering,f===null)if(i)Mi(c,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=ro(e),f!==null){for(t.flags|=128,Mi(c,!1),e=f.updateQueue,t.updateQueue=e,ho(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)tm(a,e),a=a.sibling;return I(yt,yt.current&1|2),t.child}e=e.sibling}c.tail!==null&&Bt()>yo&&(t.flags|=128,i=!0,Mi(c,!1),t.lanes=4194304)}else{if(!i)if(e=ro(f),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ho(t,e),Mi(c,!0),c.tail===null&&c.tailMode==="hidden"&&!f.alternate&&!Me)return We(t),null}else 2*Bt()-c.renderingStartTime>yo&&a!==536870912&&(t.flags|=128,i=!0,Mi(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,i?e&1|2:e&1),t):(We(t),null);case 22:case 23:return Sa(t),_c(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),a=t.updateQueue,a!==null&&ho(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&W(Ll),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ga(pt),We(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function dg(e,t){switch(fc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(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 Nt(t),null;case 13:if(Sa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));vi()}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 ga(t.type),null;case 22:case 23:return Sa(t),_c(),e!==null&&W(Ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(pt),null;case 25:return null;default:return null}}function Ap(e,t){switch(fc(t),t.tag){case 3:ga(pt),Ze();break;case 26:case 27:case 5:Nt(t);break;case 4:Ze();break;case 13:Sa(t);break;case 19:W(yt);break;case 10:ga(t.type);break;case 22:case 23:Sa(t),_c(),e!==null&&W(Ll);break;case 24:ga(pt)}}function Ui(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){i=void 0;var f=a.create,v=a.inst;i=f(),v.destroy=i}a=a.next}while(a!==c)}}catch(S){Ve(t,t.return,S)}}function Za(e,t,a){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&e)===e){var v=i.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,c=t;var j=a,L=S;try{L()}catch(Y){Ve(c,j,Y)}}}i=i.next}while(i!==f)}}catch(Y){Ve(t,t.return,Y)}}function Tp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ym(t,a)}catch(i){Ve(e,e.return,i)}}}function Rp(e,t,a){a.props=zl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Ve(e,t,i)}}function Li(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(c){Ve(e,t,c)}}function Zn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}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 Op(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(c){Ve(e,e.return,c)}}function Wc(e,t,a){try{var i=e.stateNode;Mg(i,e.type,a,t),i[ne]=t}catch(c){Ve(e,e.return,c)}}function Dp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&al(e.type)||e.tag===4}function ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dp(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&&al(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 tf(e,t,a){var i=e.tag;if(i===5||i===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=_o));else if(i!==4&&(i===27&&al(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(tf(e,t,a),e=e.sibling;e!==null;)tf(e,t,a),e=e.sibling}function mo(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&al(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mo(e,t,a),e=e.sibling;e!==null;)mo(e,t,a),e=e.sibling}function Mp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ct(t,i,a),t[J]=e,t[ne]=a}catch(f){Ve(e,e.return,f)}}var Ca=!1,ct=!1,nf=!1,Up=typeof WeakSet=="function"?WeakSet:Set,gt=null;function hg(e,t){if(e=e.containerInfo,jf=Do,e=Kh(e),ec(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,S=-1,j=-1,L=0,Y=0,F=e,q=null;t:for(;;){for(var z;F!==a||c!==0&&F.nodeType!==3||(S=v+c),F!==f||i!==0&&F.nodeType!==3||(j=v+i),F.nodeType===3&&(v+=F.nodeValue.length),(z=F.firstChild)!==null;)q=F,F=z;for(;;){if(F===e)break t;if(q===a&&++L===c&&(S=v),q===f&&++Y===i&&(j=v),(z=F.nextSibling)!==null)break;F=q,q=F.parentNode}F=z}a=S===-1||j===-1?null:{start:S,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Af={focusedElem:e,selectionRange:a},Do=!1,gt=t;gt!==null;)if(t=gt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,gt=e;else for(;gt!==null;){switch(t=gt,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,i=a.stateNode;try{var me=zl(a.type,c,a.elementType===a.type);e=i.getSnapshotBeforeUpdate(me,f),i.__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)Of(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Of(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,gt=e;break}gt=t.return}}function Lp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),i&4&&Ui(5,a);break;case 1:if(Ja(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){Ve(a,a.return,v)}else{var c=zl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ve(a,a.return,v)}}i&64&&Tp(a),i&512&&Li(a,a.return);break;case 3:if(Ja(e,a),i&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{ym(e,t)}catch(v){Ve(a,a.return,v)}}break;case 27:t===null&&i&4&&Mp(a);case 26:case 5:Ja(e,a),t===null&&i&4&&Op(a),i&512&&Li(a,a.return);break;case 12:Ja(e,a);break;case 13:Ja(e,a),i&4&&Bp(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wg.bind(null,a),Hg(e,a))));break;case 22:if(i=a.memoizedState!==null||Ca,!i){t=t!==null&&t.memoizedState!==null||ct,c=Ca;var f=ct;Ca=i,(ct=t)&&!f?Pa(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),Ca=c,ct=f}break;case 30:break;default:Ja(e,a)}}function qp(e){var t=e.alternate;t!==null&&(e.alternate=null,qp(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 Je=null,Gt=!1;function _a(e,t,a){for(a=a.child;a!==null;)zp(e,t,a),a=a.sibling}function zp(e,t,a){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(pn,a)}catch{}switch(a.tag){case 26:ct||Zn(a,t),_a(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||Zn(a,t);var i=Je,c=Gt;al(a.type)&&(Je=a.stateNode,Gt=!1),_a(e,t,a),Vi(a.stateNode),Je=i,Gt=c;break;case 5:ct||Zn(a,t);case 6:if(i=Je,c=Gt,Je=null,_a(e,t,a),Je=i,Gt=c,Je!==null)if(Gt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(a.stateNode)}catch(f){Ve(a,t,f)}else try{Je.removeChild(a.stateNode)}catch(f){Ve(a,t,f)}break;case 18:Je!==null&&(Gt?(e=Je,_0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ii(e)):_0(Je,a.stateNode));break;case 4:i=Je,c=Gt,Je=a.stateNode.containerInfo,Gt=!0,_a(e,t,a),Je=i,Gt=c;break;case 0:case 11:case 14:case 15:ct||Za(2,a,t),ct||Za(4,a,t),_a(e,t,a);break;case 1:ct||(Zn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Rp(a,t,i)),_a(e,t,a);break;case 21:_a(e,t,a);break;case 22:ct=(i=ct)||a.memoizedState!==null,_a(e,t,a),ct=i;break;default:_a(e,t,a)}}function Bp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ii(e)}catch(a){Ve(t,t.return,a)}}function mg(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(s(435,e.tag))}}function af(e,t){var a=mg(e);t.forEach(function(i){var c=Eg.bind(null,e,i);a.has(i)||(a.add(i),i.then(c,c))})}function ln(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],f=e,v=t,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(al(S.type)){Je=S.stateNode,Gt=!1;break e}break;case 5:Je=S.stateNode,Gt=!1;break e;case 3:case 4:Je=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(Je===null)throw Error(s(160));zp(f,v,c),Je=null,Gt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)kp(t,e),t=t.sibling}var Mn=null;function kp(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ln(t,e),sn(e),i&4&&(Za(3,e,e.return),Ui(3,e),Za(5,e,e.return));break;case 1:ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),i&64&&Ca&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var c=Mn;if(ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),i&4){var f=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":f=c.getElementsByTagName("title")[0],(!f||f[rt]||f[J]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),Ct(f,i,a),f[J]=e,ot(f),i=f;break e;case"link":var v=M0("link","href",c).get(i+(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(i),Ct(f,i,a),c.head.appendChild(f);break;case"meta":if(v=M0("meta","content",c).get(i+(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(i),Ct(f,i,a),c.head.appendChild(f);break;default:throw Error(s(468,i))}f[J]=e,ot(f),i=f}e.stateNode=i}else U0(c,e.type,e.stateNode);else e.stateNode=D0(c,i,e.memoizedProps);else f!==i?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,i===null?U0(c,e.type,e.stateNode):D0(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,a.memoizedProps)}break;case 27:ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),a!==null&&i&4&&Wc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ln(t,e),sn(e),i&512&&(ct||a===null||Zn(a,a.return)),e.flags&32){c=e.stateNode;try{as(c,"")}catch(z){Ve(e,e.return,z)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,Wc(e,c,a!==null?a.memoizedProps:c)),i&1024&&(nf=!0);break;case 6:if(ln(t,e),sn(e),i&4){if(e.stateNode===null)throw Error(s(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(z){Ve(e,e.return,z)}}break;case 3:if(To=null,c=Mn,Mn=jo(t.containerInfo),ln(t,e),Mn=c,sn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Ii(t.containerInfo)}catch(z){Ve(e,e.return,z)}nf&&(nf=!1,Hp(e));break;case 4:i=Mn,Mn=jo(e.stateNode.containerInfo),ln(t,e),sn(e),Mn=i;break;case 12:ln(t,e),sn(e);break;case 13:ln(t,e),sn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(cf=Bt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,af(e,i)));break;case 22:c=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,L=Ca,Y=ct;if(Ca=L||c,ct=Y||j,ln(t,e),ct=Y,Ca=L,sn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||j||Ca||ct||Bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(f=j.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=j.stateNode;var F=j.memoizedProps.style,q=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(z){Ve(j,j.return,z)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=c?"":j.memoizedProps}catch(z){Ve(j,j.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}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,af(e,a))));break;case 19:ln(t,e),sn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,af(e,i)));break;case 30:break;case 21:break;default:ln(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Dp(i)){a=i;break}i=i.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var c=a.stateNode,f=ef(e);mo(e,f,c);break;case 5:var v=a.stateNode;a.flags&32&&(as(v,""),a.flags&=-33);var S=ef(e);mo(e,S,v);break;case 3:case 4:var j=a.stateNode.containerInfo,L=ef(e);tf(e,L,j);break;default:throw Error(s(161))}}catch(Y){Ve(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Hp(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;)Lp(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:Za(4,t,t.return),Bl(t);break;case 1:Zn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Rp(t,t.return,a),Bl(t);break;case 27:Vi(t.stateNode);case 26:case 5:Zn(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 Pa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:Pa(c,f,a),Ui(4,f);break;case 1:if(Pa(c,f,a),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(L){Ve(i,i.return,L)}if(i=f,c=i.updateQueue,c!==null){var S=i.stateNode;try{var j=c.shared.hiddenCallbacks;if(j!==null)for(c.shared.hiddenCallbacks=null,c=0;c<j.length;c++)pm(j[c],S)}catch(L){Ve(i,i.return,L)}}a&&v&64&&Tp(f),Li(f,f.return);break;case 27:Mp(f);case 26:case 5:Pa(c,f,a),a&&i===null&&v&4&&Op(f),Li(f,f.return);break;case 12:Pa(c,f,a);break;case 13:Pa(c,f,a),a&&v&4&&Bp(c,f);break;case 22:f.memoizedState===null&&Pa(c,f,a),Li(f,f.return);break;case 30:break;default:Pa(c,f,a)}t=t.sibling}}function lf(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&&xi(a))}function sf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function Jn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,a,i),t=t.sibling}function Qp(e,t,a,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,a,i),c&2048&&Ui(9,t);break;case 1:Jn(e,t,a,i);break;case 3:Jn(e,t,a,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e)));break;case 12:if(c&2048){Jn(e,t,a,i),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(j){Ve(t,t.return,j)}}else Jn(e,t,a,i);break;case 13:Jn(e,t,a,i);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Jn(e,t,a,i):qi(e,t):f._visibility&2?Jn(e,t,a,i):(f._visibility|=2,ws(e,t,a,i,(t.subtreeFlags&10256)!==0)),c&2048&&lf(v,t);break;case 24:Jn(e,t,a,i),c&2048&&sf(t.alternate,t);break;default:Jn(e,t,a,i)}}function ws(e,t,a,i,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var f=e,v=t,S=a,j=i,L=v.flags;switch(v.tag){case 0:case 11:case 15:ws(f,v,S,j,c),Ui(8,v);break;case 23:break;case 22:var Y=v.stateNode;v.memoizedState!==null?Y._visibility&2?ws(f,v,S,j,c):qi(f,v):(Y._visibility|=2,ws(f,v,S,j,c)),c&&L&2048&&lf(v.alternate,v);break;case 24:ws(f,v,S,j,c),c&&L&2048&&sf(v.alternate,v);break;default:ws(f,v,S,j,c)}t=t.sibling}}function qi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,c=i.flags;switch(i.tag){case 22:qi(a,i),c&2048&&lf(i.alternate,i);break;case 24:qi(a,i),c&2048&&sf(i.alternate,i);break;default:qi(a,i)}t=t.sibling}}var zi=8192;function Es(e){if(e.subtreeFlags&zi)for(e=e.child;e!==null;)$p(e),e=e.sibling}function $p(e){switch(e.tag){case 26:Es(e),e.flags&zi&&e.memoizedState!==null&&Wg(Mn,e.memoizedState,e.memoizedProps);break;case 5:Es(e);break;case 3:case 4:var t=Mn;Mn=jo(e.stateNode.containerInfo),Es(e),Mn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=zi,zi=16777216,Es(e),zi=t):Es(e));break;default:Es(e)}}function Yp(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 Bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];gt=i,Kp(i,e)}Yp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vp(e),e=e.sibling}function Vp(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&Za(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,po(e)):Bi(e);break;default:Bi(e)}}function po(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];gt=i,Kp(i,e)}Yp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Za(8,t,t.return),po(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,po(t));break;default:po(t)}e=e.sibling}}function Kp(e,t){for(;gt!==null;){var a=gt;switch(a.tag){case 0:case 11:case 15:Za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:xi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,gt=i;else e:for(a=e;gt!==null;){i=gt;var c=i.sibling,f=i.return;if(qp(i),i===a){gt=null;break e}if(c!==null){c.return=f,gt=c;break e}gt=f}}}var pg={getCacheForType:function(e){var t=Ot(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},yg=typeof WeakMap=="function"?WeakMap:Map,ze=0,Ge=null,Ne=null,Ae=0,Be=0,rn=null,Ia=!1,Cs=!1,rf=!1,Na=0,at=0,Wa=0,kl=0,of=0,jn=0,_s=0,ki=null,Xt=null,uf=!1,cf=0,yo=1/0,vo=null,el=null,Et=0,tl=null,Ns=null,js=0,ff=0,df=null,Fp=null,Hi=0,hf=null;function on(){if((ze&2)!==0&&Ae!==0)return Ae&-Ae;if(B.T!==null){var e=ms;return e!==0?e:xf()}return _e()}function Gp(){jn===0&&(jn=(Ae&536870912)===0||Me?Ba():536870912);var e=Nn.current;return e!==null&&(e.flags|=32),jn}function un(e,t,a){(e===Ge&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(As(e,0),nl(e,Ae,jn,!1)),vn(e,a),((ze&2)===0||e!==Ge)&&(e===Ge&&((ze&2)===0&&(kl|=a),at===4&&nl(e,Ae,jn,!1)),Pn(e))}function Xp(e,t,a){if((ze&6)!==0)throw Error(s(327));var i=!a&&(t&124)===0&&(t&e.expiredLanes)===0||On(e,t),c=i?gg(e,t):yf(e,t,!0),f=i;do{if(c===0){Cs&&!i&&nl(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!vg(a)){c=yf(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=ki;var j=S.current.memoizedState.isDehydrated;if(j&&(As(S,v).flags|=256),v=yf(S,v,!1),v!==2){if(rf&&!j){S.errorRecoveryDisabledLanes|=f,kl|=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){As(e,0),nl(e,t,0,!0);break}e:{switch(i=e,f=c,f){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:nl(i,t,jn,!Ia);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(c=cf+300-Bt(),10<c)){if(nl(i,t,jn,!Ia),ca(i,0,!0)!==0)break e;i.timeoutHandle=E0(Zp.bind(null,i,a,Xt,vo,uf,t,jn,kl,_s,Ia,f,2,-0,0),c);break e}Zp(i,a,Xt,vo,uf,t,jn,kl,_s,Ia,f,0,-0,0)}}break}while(!0);Pn(e)}function Zp(e,t,a,i,c,f,v,S,j,L,Y,F,q,z){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(Gi={stylesheets:null,count:0,unsuspend:Ig},$p(t),F=ex(),F!==null)){e.cancelPendingCommit=F(n0.bind(null,e,t,f,a,i,c,v,S,j,Y,1,q,z)),nl(e,f,v,!L);return}n0(e,t,f,a,i,c,v,S,j)}function vg(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 i=0;i<a.length;i++){var c=a[i],f=c.getSnapshot;c=c.value;try{if(!nn(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 nl(e,t,a,i){t&=~of,t&=~kl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var f=31-st(c),v=1<<f;i[f]=-1,c&=~v}a!==0&&wl(e,a,t)}function bo(){return(ze&6)===0?(Qi(0),!1):!0}function mf(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,ba=Ml=null,Rc(e),xs=null,Oi=0,e=Ne;for(;e!==null;)Ap(e.alternate,e),e=e.return;Ne=null}}function As(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Lg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),mf(),Ge=e,Ne=a=pa(e.current,null),Ae=t,Be=0,rn=null,Ia=!1,Cs=On(e,t),rf=!1,_s=jn=of=kl=Wa=at=0,Xt=ki=null,uf=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-st(i),f=1<<c;t|=e[c],i&=~f}return Na=t,kr(),a}function Jp(e,t){xe=null,B.H=lo,t===wi||t===Xr?(t=hm(),Be=3):t===cm?(t=hm(),Be=4):Be=t===mp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,Ne===null&&(at=1,uo(e,wn(t,e.current)))}function Pp(){var e=B.H;return B.H=lo,e===null?lo:e}function Ip(){var e=B.A;return B.A=pg,e}function pf(){at=4,Ia||(Ae&4194048)!==Ae&&Nn.current!==null||(Cs=!0),(Wa&134217727)===0&&(kl&134217727)===0||Ge===null||nl(Ge,Ae,jn,!1)}function yf(e,t,a){var i=ze;ze|=2;var c=Pp(),f=Ip();(Ge!==e||Ae!==t)&&(vo=null,As(e,t)),t=!1;var v=at;e:do try{if(Be!==0&&Ne!==null){var S=Ne,j=rn;switch(Be){case 8:mf(),v=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var L=Be;if(Be=0,rn=null,Ts(e,S,j,L),a&&Cs){v=0;break e}break;default:L=Be,Be=0,rn=null,Ts(e,S,j,L)}}bg(),v=at;break}catch(Y){Jp(e,Y)}while(!0);return t&&e.shellSuspendCounter++,ba=Ml=null,ze=i,B.H=c,B.A=f,Ne===null&&(Ge=null,Ae=0,kr()),v}function bg(){for(;Ne!==null;)Wp(Ne)}function gg(e,t){var a=ze;ze|=2;var i=Pp(),c=Ip();Ge!==e||Ae!==t?(vo=null,yo=Bt()+500,As(e,t)):Cs=On(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var f=rn;t:switch(Be){case 1:Be=0,rn=null,Ts(e,t,f,1);break;case 2:case 9:if(fm(f)){Be=0,rn=null,e0(t);break}t=function(){Be!==2&&Be!==9||Ge!==e||(Be=7),Pn(e)},f.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:fm(f)?(Be=0,rn=null,e0(t)):(Be=0,rn=null,Ts(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||L0(v)){Be=0,rn=null;var j=S.sibling;if(j!==null)Ne=j;else{var L=S.return;L!==null?(Ne=L,go(L)):Ne=null}break t}}Be=0,rn=null,Ts(e,t,f,5);break;case 6:Be=0,rn=null,Ts(e,t,f,6);break;case 8:mf(),at=6;break e;default:throw Error(s(462))}}xg();break}catch(Y){Jp(e,Y)}while(!0);return ba=Ml=null,B.H=i,B.A=c,ze=a,Ne!==null?0:(Ge=null,Ae=0,kr(),at)}function xg(){for(;Ne!==null&&!ai();)Wp(Ne)}function Wp(e){var t=Np(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?go(e):Ne=t}function e0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xp(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=xp(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Rc(t);default:Ap(a,t),t=Ne=tm(t,Na),t=Np(a,t,Na)}e.memoizedProps=e.pendingProps,t===null?go(e):Ne=t}function Ts(e,t,a,i){ba=Ml=null,Rc(t),xs=null,Oi=0;var c=t.return;try{if(ug(e,c,t,a,Ae)){at=1,uo(e,wn(a,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;at=1,uo(e,wn(a,e.current)),Ne=null;return}t.flags&32768?(Me||i===1?e=!0:Cs||(Ae&536870912)!==0?e=!1:(Ia=e=!0,(i===2||i===9||i===3||i===6)&&(i=Nn.current,i!==null&&i.tag===13&&(i.flags|=16384))),t0(t,e)):go(t)}function go(e){var t=e;do{if((t.flags&32768)!==0){t0(t,Ia);return}e=t.return;var a=fg(t.alternate,t,Na);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 t0(e,t){do{var a=dg(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 n0(e,t,a,i,c,f,v,S,j){e.cancelPendingCommit=null;do xo();while(Et!==0);if((ze&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(f=t.lanes|t.childLanes,f|=sc,Sl(e,a,f,v,S,j),e===Ge&&(Ne=Ge=null,Ae=0),Ns=t,tl=e,js=a,ff=f,df=c,Fp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Cg(Vn,function(){return r0(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=B.T,B.T=null,c=X.p,X.p=2,v=ze,ze|=4;try{hg(e,t,a)}finally{ze=v,X.p=c,B.T=i}}Et=1,a0(),l0(),s0()}}function a0(){if(Et===1){Et=0;var e=tl,t=Ns,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var i=X.p;X.p=2;var c=ze;ze|=4;try{kp(t,e);var f=Af,v=Kh(e.containerInfo),S=f.focusedElem,j=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Vh(S.ownerDocument.documentElement,S)){if(j!==null&&ec(S)){var L=j.start,Y=j.end;if(Y===void 0&&(Y=L),"selectionStart"in S)S.selectionStart=L,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(j.start,me),Ye=j.end===void 0?fe:Math.min(j.end,me);!z.extend&&fe>Ye&&(v=Ye,Ye=fe,fe=v);var M=Yh(S,fe),D=Yh(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 U=F.createRange();U.setStart(M.node,M.offset),z.removeAllRanges(),fe>Ye?(z.addRange(U),z.extend(D.node,D.offset)):(U.setEnd(D.node,D.offset),z.addRange(U))}}}}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}}Do=!!jf,Af=jf=null}finally{ze=c,X.p=i,B.T=a}}e.current=t,Et=2}}function l0(){if(Et===2){Et=0;var e=tl,t=Ns,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var i=X.p;X.p=2;var c=ze;ze|=4;try{Lp(e,t.alternate,t)}finally{ze=c,X.p=i,B.T=a}}Et=3}}function s0(){if(Et===4||Et===3){Et=0,zt();var e=tl,t=Ns,a=js,i=Fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,Ns=tl=null,i0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(el=null),oe(a),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(pn,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=B.T,c=X.p,X.p=2,B.T=null;try{for(var f=e.onRecoverableError,v=0;v<i.length;v++){var S=i[v];f(S.value,{componentStack:S.stack})}}finally{B.T=t,X.p=c}}(js&3)!==0&&xo(),Pn(e),c=e.pendingLanes,(a&4194090)!==0&&(c&42)!==0?e===hf?Hi++:(Hi=0,hf=e):Hi=0,Qi(0)}}function i0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function xo(e){return a0(),l0(),s0(),r0()}function r0(){if(Et!==5)return!1;var e=tl,t=ff;ff=0;var a=oe(js),i=B.T,c=X.p;try{X.p=32>a?32:a,B.T=null,a=df,df=null;var f=tl,v=js;if(Et=0,Ns=tl=null,js=0,(ze&6)!==0)throw Error(s(331));var S=ze;if(ze|=4,Vp(f.current),Qp(f,f.current,v,a),ze=S,Qi(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(pn,f)}catch{}return!0}finally{X.p=c,B.T=i,i0(e,t)}}function o0(e,t,a){t=wn(a,t),t=Vc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(vn(e,2),Pn(e))}function Ve(e,t,a){if(e.tag===3)o0(e,e,a);else for(;t!==null;){if(t.tag===3){o0(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(el===null||!el.has(i))){e=wn(a,e),a=dp(2),i=Ka(t,a,2),i!==null&&(hp(a,i,t,e),vn(i,2),Pn(i));break}}t=t.return}}function vf(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new yg;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(a)||(rf=!0,c.add(a),e=Sg.bind(null,e,t,a),t.then(e,e))}function Sg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ge===e&&(Ae&a)===a&&(at===4||at===3&&(Ae&62914560)===Ae&&300>Bt()-cf?(ze&2)===0&&As(e,0):of|=a,_s===Ae&&(_s=0)),Pn(e)}function u0(e,t){t===0&&(t=fa()),e=cs(e,t),e!==null&&(vn(e,t),Pn(e))}function wg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),u0(e,a)}function Eg(e,t){var a=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(s(314))}i!==null&&i.delete(t),u0(e,a)}function Cg(e,t){return oa(e,t)}var So=null,Rs=null,bf=!1,wo=!1,gf=!1,Hl=0;function Pn(e){e!==Rs&&e.next===null&&(Rs===null?So=Rs=e:Rs=Rs.next=e),wo=!0,bf||(bf=!0,Ng())}function Qi(e,t){if(!gf&&wo){gf=!0;do for(var a=!1,i=So;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var v=i.suspendedLanes,S=i.pingedLanes;f=(1<<31-st(42|e)+1)-1,f&=c&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,h0(i,f))}else f=Ae,f=ca(i,i===Ge?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||On(i,f)||(a=!0,h0(i,f));i=i.next}while(a);gf=!1}}function _g(){c0()}function c0(){wo=bf=!1;var e=0;Hl!==0&&(Ug()&&(e=Hl),Hl=0);for(var t=Bt(),a=null,i=So;i!==null;){var c=i.next,f=f0(i,t);f===0?(i.next=null,a===null?So=c:a.next=c,c===null&&(Rs=a)):(a=i,(e!==0||(f&3)!==0)&&(wo=!0)),i=c}Qi(e)}function f0(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-st(f),S=1<<v,j=c[v];j===-1?((S&a)===0||(S&i)!==0)&&(c[v]=za(S,t)):j<=t&&(e.expiredLanes|=S),f&=~S}if(t=Ge,a=Ae,a=ca(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&mn(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||On(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&mn(i),oe(a)){case 2:case 8:a=Fe;break;case 32:a=Vn;break;case 268435456:a=Ua;break;default:a=Vn}return i=d0.bind(null,e),a=oa(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&mn(i),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xo()&&e.callbackNode!==a)return null;var i=Ae;return i=ca(e,e===Ge?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Xp(e,i,t),f0(e,Bt()),e.callbackNode!=null&&e.callbackNode===a?d0.bind(null,e):null)}function h0(e,t){if(xo())return null;Xp(e,t,!0)}function Ng(){qg(function(){(ze&6)!==0?oa(Yn,_g):c0()})}function xf(){return Hl===0&&(Hl=Ba()),Hl}function m0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Dr(""+e)}function p0(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 jg(e,t,a,i,c){if(t==="submit"&&a&&a.stateNode===c){var f=m0((c[ne]||null).action),v=i.submitter;v&&(t=(t=v[ne]||null)?m0(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var S=new qr("action","action",null,i,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Hl!==0){var j=v?p0(c,v):new FormData(c);kc(a,{pending:!0,data:j,method:c.method,action:f},null,j)}}else typeof f=="function"&&(S.preventDefault(),j=v?p0(c,v):new FormData(c),kc(a,{pending:!0,data:j,method:c.method,action:f},f,j))},currentTarget:c}]})}}for(var Sf=0;Sf<lc.length;Sf++){var wf=lc[Sf],Ag=wf.toLowerCase(),Tg=wf[0].toUpperCase()+wf.slice(1);Dn(Ag,"on"+Tg)}Dn(Xh,"onAnimationEnd"),Dn(Zh,"onAnimationIteration"),Dn(Jh,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Fb,"onTransitionRun"),Dn(Gb,"onTransitionStart"),Dn(Xb,"onTransitionCancel"),Dn(Ph,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $i="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(" "),Rg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($i));function y0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var v=i.length-1;0<=v;v--){var S=i[v],j=S.instance,L=S.currentTarget;if(S=S.listener,j!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=L;try{f(c)}catch(Y){oo(Y)}c.currentTarget=null,f=j}else for(v=0;v<i.length;v++){if(S=i[v],j=S.instance,L=S.currentTarget,S=S.listener,j!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=L;try{f(c)}catch(Y){oo(Y)}c.currentTarget=null,f=j}}}}function je(e,t){var a=t[Ie];a===void 0&&(a=t[Ie]=new Set);var i=e+"__bubble";a.has(i)||(v0(t,e,2,!1),a.add(i))}function Ef(e,t,a){var i=0;t&&(i|=4),v0(a,e,i,t)}var Eo="_reactListening"+Math.random().toString(36).slice(2);function Cf(e){if(!e[Eo]){e[Eo]=!0,si.forEach(function(a){a!=="selectionchange"&&(Rg.has(a)||Ef(a,!1,e),Ef(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eo]||(t[Eo]=!0,Ef("selectionchange",!1,t))}}function v0(e,t,a,i){switch(Q0(t)){case 2:var c=ax;break;case 8:c=lx;break;default:c=Bf}a=c.bind(null,t,a,e),c=void 0,!Ku||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?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 _f(e,t,a,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var v=i.tag;if(v===3||v===4){var S=i.stateNode.containerInfo;if(S===c)break;if(v===4)for(v=i.return;v!==null;){var j=v.tag;if((j===3||j===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;S!==null;){if(v=Oe(S),v===null)return;if(j=v.tag,j===5||j===6||j===26||j===27){i=f=v;continue e}S=S.parentNode}}i=i.return}Ch(function(){var L=f,Y=Yu(a),F=[];e:{var q=Ih.get(e);if(q!==void 0){var z=qr,me=e;switch(e){case"keypress":if(Ur(a)===0)break e;case"keydown":case"keyup":z=Cb;break;case"focusin":me="focus",z=Zu;break;case"focusout":me="blur",z=Zu;break;case"beforeblur":case"afterblur":z=Zu;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=jh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=db;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=jb;break;case Xh:case Zh:case Jh:z=pb;break;case Ph:z=Tb;break;case"scroll":case"scrollend":z=cb;break;case"wheel":z=Ob;break;case"copy":case"cut":case"paste":z=vb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Th;break;case"toggle":case"beforetoggle":z=Mb}var fe=(t&4)!==0,Ye=!fe&&(e==="scroll"||e==="scrollend"),M=fe?q!==null?q+"Capture":null:q;fe=[];for(var D=L,U;D!==null;){var K=D;if(U=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||U===null||M===null||(K=ri(D,M),K!=null&&fe.push(Yi(D,K,U))),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!==$u&&(me=a.relatedTarget||a.fromElement)&&(Oe(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=L,me=me?Oe(me):null,me!==null&&(Ye=u(me),fe=me.tag,me!==Ye||fe!==5&&fe!==27&&fe!==6)&&(me=null)):(z=null,me=L),z!==me)){if(fe=jh,K="onMouseLeave",M="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(fe=Th,K="onPointerLeave",M="onPointerEnter",D="pointer"),Ye=z==null?q:El(z),U=me==null?q:El(me),q=new fe(K,D+"leave",z,a,Y),q.target=Ye,q.relatedTarget=U,K=null,Oe(Y)===L&&(fe=new fe(M,D+"enter",me,a,Y),fe.target=U,fe.relatedTarget=Ye,K=fe),Ye=K,z&&me)t:{for(fe=z,M=me,D=0,U=fe;U;U=Os(U))D++;for(U=0,K=M;K;K=Os(K))U++;for(;0<D-U;)fe=Os(fe),D--;for(;0<U-D;)M=Os(M),U--;for(;D--;){if(fe===M||M!==null&&fe===M.alternate)break t;fe=Os(fe),M=Os(M)}fe=null}else fe=null;z!==null&&b0(F,q,z,fe,!1),me!==null&&Ye!==null&&b0(F,Ye,me,fe,!0)}}e:{if(q=L?El(L):window,z=q.nodeName&&q.nodeName.toLowerCase(),z==="select"||z==="input"&&q.type==="file")var ee=zh;else if(Lh(q))if(Bh)ee=Yb;else{ee=Qb;var we=Hb}else z=q.nodeName,!z||z.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?L&&Qu(L.elementType)&&(ee=zh):ee=$b;if(ee&&(ee=ee(e,L))){qh(F,ee,a,Y);break e}we&&we(e,q,L),e==="focusout"&&L&&q.type==="number"&&L.memoizedProps.value!=null&&Hu(q,"number",q.value)}switch(we=L?El(L):window,e){case"focusin":(Lh(we)||we.contentEditable==="true")&&(rs=we,tc=L,pi=null);break;case"focusout":pi=tc=rs=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,Fh(F,a,Y);break;case"selectionchange":if(Kb)break;case"keydown":case"keyup":Fh(F,a,Y)}var se;if(Pu)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 is?Mh(e,a)&&(he="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(Rh&&a.locale!=="ko"&&(is||he!=="onCompositionStart"?he==="onCompositionEnd"&&is&&(se=_h()):(Qa=Y,Fu="value"in Qa?Qa.value:Qa.textContent,is=!0)),we=Co(L,he),0<we.length&&(he=new Ah(he,e,null,a,Y),F.push({event:he,listeners:we}),se?he.data=se:(se=Uh(a),se!==null&&(he.data=se)))),(se=Lb?qb(e,a):zb(e,a))&&(he=Co(L,"onBeforeInput"),0<he.length&&(we=new Ah("onBeforeInput","beforeinput",null,a,Y),F.push({event:we,listeners:he}),we.data=se)),jg(F,e,L,a,Y)}y0(F,t)})}function Yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Co(e,t){for(var a=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=ri(e,a),c!=null&&i.unshift(Yi(e,c,f)),c=ri(e,t),c!=null&&i.push(Yi(e,c,f))),e.tag===3)return i;e=e.return}return[]}function Os(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function b0(e,t,a,i,c){for(var f=t._reactName,v=[];a!==null&&a!==i;){var S=a,j=S.alternate,L=S.stateNode;if(S=S.tag,j!==null&&j===i)break;S!==5&&S!==26&&S!==27||L===null||(j=L,c?(L=ri(a,f),L!=null&&v.unshift(Yi(a,L,j))):c||(L=ri(a,f),L!=null&&v.push(Yi(a,L,j)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var Og=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function g0(e){return(typeof e=="string"?e:""+e).replace(Og,`
49
+ `).replace(Dg,"")}function x0(e,t){return t=g0(t),g0(e)===t}function _o(){}function $e(e,t,a,i,c,f){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||as(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&as(e,""+i);break;case"className":Ha(e,"class",i);break;case"tabIndex":Ha(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ha(e,a,i);break;case"style":wh(e,i,f);break;case"data":if(t!=="object"){Ha(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Dr(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="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(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Dr(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=_o);break;case"onScroll":i!=null&&je("scroll",e);break;case"onScrollEnd":i!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=Dr(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":je("beforetoggle",e),je("toggle",e),es(e,"popover",i);break;case"xlinkActuate":ha(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ha(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ha(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ha(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ha(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ha(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ha(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ha(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ha(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":es(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ob.get(a)||a,es(e,a,i))}}function Nf(e,t,a,i,c,f){switch(a){case"style":wh(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof i=="string"?as(e,i):(typeof i=="number"||typeof i=="bigint")&&as(e,""+i);break;case"onScroll":i!=null&&je("scroll",e);break;case"onScrollEnd":i!=null&&je("scrollend",e);break;case"onClick":i!=null&&(e.onclick=_o);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ii.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 i=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):es(e,a,i)}}}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 i=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:$e(e,t,f,v,a,null)}}c&&$e(e,t,"srcSet",a.srcSet,a,null),i&&$e(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var S=f=v=c=null,j=null,L=null;for(i in a)if(a.hasOwnProperty(i)){var Y=a[i];if(Y!=null)switch(i){case"name":c=Y;break;case"type":v=Y;break;case"checked":j=Y;break;case"defaultChecked":L=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:$e(e,t,i,Y,a,null)}}bh(e,f,S,j,L,v,c,!1),Rr(e);return;case"select":je("invalid",e),i=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":i=S;default:$e(e,t,c,S,a,null)}t=f,a=v,e.multiple=!!i,t!=null?ns(e,!!i,t,!1):a!=null&&ns(e,!!i,a,!0);return;case"textarea":je("invalid",e),f=c=i=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":i=S;break;case"defaultValue":c=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:$e(e,t,v,S,a,null)}xh(e,i,c,f),Rr(e);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(i=a[j],i!=null))switch(j){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:$e(e,t,j,i,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(i=0;i<$i.length;i++)je($i[i],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(L in a)if(a.hasOwnProperty(L)&&(i=a[L],i!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:$e(e,t,L,i,a,null)}return;default:if(Qu(t)){for(Y in a)a.hasOwnProperty(Y)&&(i=a[Y],i!==void 0&&Nf(e,t,Y,i,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(i=a[S],i!=null&&$e(e,t,S,i,a,null))}function Mg(e,t,a,i){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,j=null,L=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":j=F;default:i.hasOwnProperty(z)||$e(e,t,z,null,i,F)}}for(var q in i){var z=i[q];if(F=a[q],i.hasOwnProperty(q)&&(z!=null||F!=null))switch(q){case"type":f=z;break;case"name":c=z;break;case"checked":L=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(s(137,t));break;default:z!==F&&$e(e,t,q,z,i,F)}}ku(e,v,S,j,L,Y,f,c);return;case"select":z=v=S=q=null;for(f in a)if(j=a[f],a.hasOwnProperty(f)&&j!=null)switch(f){case"value":break;case"multiple":z=j;default:i.hasOwnProperty(f)||$e(e,t,f,null,i,j)}for(c in i)if(f=i[c],j=a[c],i.hasOwnProperty(c)&&(f!=null||j!=null))switch(c){case"value":q=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==j&&$e(e,t,c,f,i,j)}t=S,a=v,i=z,q!=null?ns(e,!!a,q,!1):!!i!=!!a&&(t!=null?ns(e,!!a,t,!0):ns(e,!!a,a?[]:"",!1));return;case"textarea":z=q=null;for(S in a)if(c=a[S],a.hasOwnProperty(S)&&c!=null&&!i.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(e,t,S,null,i,c)}for(v in i)if(c=i[v],f=a[v],i.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(s(91));break;default:c!==f&&$e(e,t,v,c,i,f)}gh(e,q,z);return;case"option":for(var me in a)if(q=a[me],a.hasOwnProperty(me)&&q!=null&&!i.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:$e(e,t,me,null,i,q)}for(j in i)if(q=i[j],z=a[j],i.hasOwnProperty(j)&&q!==z&&(q!=null||z!=null))switch(j){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:$e(e,t,j,q,i,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&&!i.hasOwnProperty(fe)&&$e(e,t,fe,null,i,q);for(L in i)if(q=i[L],z=a[L],i.hasOwnProperty(L)&&q!==z&&(q!=null||z!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:$e(e,t,L,q,i,z)}return;default:if(Qu(t)){for(var Ye in a)q=a[Ye],a.hasOwnProperty(Ye)&&q!==void 0&&!i.hasOwnProperty(Ye)&&Nf(e,t,Ye,void 0,i,q);for(Y in i)q=i[Y],z=a[Y],!i.hasOwnProperty(Y)||q===z||q===void 0&&z===void 0||Nf(e,t,Y,q,i,z);return}}for(var M in a)q=a[M],a.hasOwnProperty(M)&&q!=null&&!i.hasOwnProperty(M)&&$e(e,t,M,null,i,q);for(F in i)q=i[F],z=a[F],!i.hasOwnProperty(F)||q===z||q==null&&z==null||$e(e,t,F,q,i,z)}var jf=null,Af=null;function No(e){return e.nodeType===9?e:e.ownerDocument}function S0(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 w0(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 Tf(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 Rf=null;function Ug(){var e=window.event;return e&&e.type==="popstate"?e===Rf?!1:(Rf=e,!0):(Rf=null,!1)}var E0=typeof setTimeout=="function"?setTimeout:void 0,Lg=typeof clearTimeout=="function"?clearTimeout:void 0,C0=typeof Promise=="function"?Promise:void 0,qg=typeof queueMicrotask=="function"?queueMicrotask:typeof C0<"u"?function(e){return C0.resolve(null).then(e).catch(zg)}:E0;function zg(e){setTimeout(function(){throw e})}function al(e){return e==="head"}function _0(e,t){var a=t,i=0,c=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(0<i&&8>i){a=i;var v=e.ownerDocument;if(a&1&&Vi(v.documentElement),a&2&&Vi(v.body),a&4)for(a=v.head,Vi(a),v=a.firstChild;v;){var S=v.nextSibling,j=v.nodeName;v[rt]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=S}}if(c===0){e.removeChild(f),Ii(t);return}c--}else a==="$"||a==="$?"||a==="$!"?c++:i=a.charCodeAt(0)-48;else i=0;a=f}while(a);Ii(t)}function Of(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":Of(a),Rt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Bg(e,t,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){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=Un(e.nextSibling),e===null)break}return null}function kg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Un(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Hg(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Un(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 Mf=null;function N0(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 j0(e,t,a){switch(t=No(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Vi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rt(e)}var An=new Map,A0=new Set;function jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ja=X.d;X.d={f:Qg,r:$g,D:Yg,C:Vg,L:Kg,m:Fg,X:Xg,S:Gg,M:Zg};function Qg(){var e=ja.f(),t=bo();return e||t}function $g(e){var t=tn(e);t!==null&&t.tag===5&&t.type==="form"?Xm(t):ja.r(e)}var Ds=typeof document>"u"?null:document;function T0(e,t,a){var i=Ds;if(i&&typeof t=="string"&&t){var c=Sn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),A0.has(c)||(A0.add(c),e={rel:e,crossOrigin:a,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Ct(t,"link",e),ot(t),i.head.appendChild(t)))}}function Yg(e){ja.D(e),T0("dns-prefetch",e,null)}function Vg(e,t){ja.C(e,t),T0("preconnect",e,t)}function Kg(e,t,a){ja.L(e,t,a);var i=Ds;if(i&&e&&t){var c='link[rel="preload"][as="'+Sn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Sn(a.imageSizes)+'"]')):c+='[href="'+Sn(e)+'"]';var f=c;switch(t){case"style":f=Ms(e);break;case"script":f=Us(e)}An.has(f)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),An.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Ki(f))||t==="script"&&i.querySelector(Fi(f))||(t=i.createElement("link"),Ct(t,"link",e),ot(t),i.head.appendChild(t)))}}function Fg(e,t){ja.m(e,t);var a=Ds;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Sn(i)+'"][href="'+Sn(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Us(e)}if(!An.has(f)&&(e=b({rel:"modulepreload",href:e},t),An.set(f,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fi(f)))return}i=a.createElement("link"),Ct(i,"link",e),ot(i),a.head.appendChild(i)}}}function Gg(e,t,a){ja.S(e,t,a);var i=Ds;if(i&&e){var c=ka(i).hoistableStyles,f=Ms(e);t=t||"default";var v=c.get(f);if(!v){var S={loading:0,preload:null};if(v=i.querySelector(Ki(f)))S.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=An.get(f))&&Uf(e,a);var j=v=i.createElement("link");ot(j),Ct(j,"link",e),j._p=new Promise(function(L,Y){j.onload=L,j.onerror=Y}),j.addEventListener("load",function(){S.loading|=1}),j.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Ao(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:S},c.set(f,v)}}}function Xg(e,t){ja.X(e,t);var a=Ds;if(a&&e){var i=ka(a).hoistableScripts,c=Us(e),f=i.get(c);f||(f=a.querySelector(Fi(c)),f||(e=b({src:e,async:!0},t),(t=An.get(c))&&Lf(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},i.set(c,f))}}function Zg(e,t){ja.M(e,t);var a=Ds;if(a&&e){var i=ka(a).hoistableScripts,c=Us(e),f=i.get(c);f||(f=a.querySelector(Fi(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=An.get(c))&&Lf(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},i.set(c,f))}}function R0(e,t,a,i){var c=(c=ce.current)?jo(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ms(a.href),a=ka(c).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ms(a.href);var f=ka(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(Ki(e)))&&!f._p&&(v.instance=f,v.state.loading=5),An.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},An.set(e,a),f||Jg(c,e,a,v.state))),t&&i===null)throw Error(s(528,""));return v}if(t&&i!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Us(a),a=ka(c).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Ms(e){return'href="'+Sn(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function O0(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Jg(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ct(t,"link",a),ot(t),e.head.appendChild(t))}function Us(e){return'[src="'+Sn(e)+'"]'}function Fi(e){return"script[async]"+e}function D0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Sn(a.href)+'"]');if(i)return t.instance=i,ot(i),i;var c=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),ot(i),Ct(i,"style",c),Ao(i,a.precedence,e),t.instance=i;case"stylesheet":c=Ms(a.href);var f=e.querySelector(Ki(c));if(f)return t.state.loading|=4,t.instance=f,ot(f),f;i=O0(a),(c=An.get(c))&&Uf(i,c),f=(e.ownerDocument||e).createElement("link"),ot(f);var v=f;return v._p=new Promise(function(S,j){v.onload=S,v.onerror=j}),Ct(f,"link",i),t.state.loading|=4,Ao(f,a.precedence,e),t.instance=f;case"script":return f=Us(a.src),(c=e.querySelector(Fi(f)))?(t.instance=c,ot(c),c):(i=a,(c=An.get(f))&&(i=b({},a),Lf(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),ot(c),Ct(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Ao(i,a.precedence,e));return t.instance}function Ao(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,f=c,v=0;v<i.length;v++){var S=i[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 Uf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var To=null;function M0(e,t,a){if(To===null){var i=new Map,c=To=new Map;c.set(a,i)}else c=To,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[rt]||f[J]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var S=i.get(v);S?S.push(f):i.set(v,[f])}}return i}function U0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Pg(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 L0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Gi=null;function Ig(){}function Wg(e,t,a){if(Gi===null)throw Error(s(475));var i=Gi;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Ms(a.href),f=e.querySelector(Ki(c));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Ro.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=f,ot(f);return}f=e.ownerDocument||e,a=O0(a),(c=An.get(c))&&Uf(a,c),f=f.createElement("link"),ot(f);var v=f;v._p=new Promise(function(S,j){v.onload=S,v.onerror=j}),Ct(f,"link",a),t.instance=f}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=Ro.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function ex(){if(Gi===null)throw Error(s(475));var e=Gi;return e.stylesheets&&e.count===0&&qf(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&qf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Ro(){if(this.count--,this.count===0){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Oo=null;function qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Oo=new Map,t.forEach(tx,e),Oo=null,Ro.call(e))}function tx(e,t){if(!(t.state.loading&4)){var a=Oo.get(e);if(a)var i=a.get(null);else{a=new Map,Oo.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),i=v)}i&&a.set(null,i)}c=t.instance,v=c.getAttribute("data-precedence"),f=a.get(v)||i,f===i&&a.set(null,c),a.set(v,c),this.count++,i=Ro.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xi={$$typeof:T,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function nx(e,t,a,i,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=Kn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kn(0),this.hiddenUpdates=Kn(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function q0(e,t,a,i,c,f,v,S,j,L,Y,F){return e=new nx(e,t,a,v,S,j,L,F),t=1,f===!0&&(t|=24),f=an(3,null,null,t),e.current=f,f.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:a,cache:t},xc(f),e}function z0(e){return e?(e=fs,e):fs}function B0(e,t,a,i,c,f){c=z0(c),i.context===null?i.context=c:i.pendingContext=c,i=Va(t),i.payload={element:a},f=f===void 0?null:f,f!==null&&(i.callback=f),a=Ka(e,i,t),a!==null&&(un(a,e,t),Ci(a,e,t))}function k0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function zf(e,t){k0(e,t),(e=e.alternate)&&k0(e,t)}function H0(e){if(e.tag===13){var t=cs(e,67108864);t!==null&&un(t,e,67108864),zf(e,67108864)}}var Do=!0;function ax(e,t,a,i){var c=B.T;B.T=null;var f=X.p;try{X.p=2,Bf(e,t,a,i)}finally{X.p=f,B.T=c}}function lx(e,t,a,i){var c=B.T;B.T=null;var f=X.p;try{X.p=8,Bf(e,t,a,i)}finally{X.p=f,B.T=c}}function Bf(e,t,a,i){if(Do){var c=kf(i);if(c===null)_f(e,t,i,Mo,a),$0(e,i);else if(ix(c,e,t,a,i))i.stopPropagation();else if($0(e,i),t&4&&-1<sx.indexOf(e)){for(;c!==null;){var f=tn(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 j=1<<31-st(v);S.entanglements[1]|=j,v&=~j}Pn(f),(ze&6)===0&&(yo=Bt()+500,Qi(0))}}break;case 13:S=cs(f,2),S!==null&&un(S,f,2),bo(),zf(f,2)}if(f=kf(i),f===null&&_f(e,t,i,Mo,a),f===c)break;c=f}c!==null&&i.stopPropagation()}else _f(e,t,i,null,a)}}function kf(e){return e=Yu(e),Hf(e)}var Mo=null;function Hf(e){if(Mo=null,e=Oe(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 Mo=e,null}function Q0(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(ua()){case Yn:return 2;case Fe:return 8;case Vn:case gl:return 32;case Ua:return 268435456;default:return 32}default:return 32}}var Qf=!1,ll=null,sl=null,il=null,Zi=new Map,Ji=new Map,rl=[],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 $0(e,t){switch(e){case"focusin":case"focusout":ll=null;break;case"dragenter":case"dragleave":sl=null;break;case"mouseover":case"mouseout":il=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function Pi(e,t,a,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=tn(t),t!==null&&H0(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function ix(e,t,a,i,c){switch(t){case"focusin":return ll=Pi(ll,e,t,a,i,c),!0;case"dragenter":return sl=Pi(sl,e,t,a,i,c),!0;case"mouseover":return il=Pi(il,e,t,a,i,c),!0;case"pointerover":var f=c.pointerId;return Zi.set(f,Pi(Zi.get(f)||null,e,t,a,i,c)),!0;case"gotpointercapture":return f=c.pointerId,Ji.set(f,Pi(Ji.get(f)||null,e,t,a,i,c)),!0}return!1}function Y0(e){var t=Oe(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,kt(e.priority,function(){if(a.tag===13){var i=on();i=At(i);var c=cs(a,i);c!==null&&un(c,a,i),zf(a,i)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=kf(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);$u=i,a.target.dispatchEvent(i),$u=null}else return t=tn(a),t!==null&&H0(t),e.blockedOn=a,!1;t.shift()}return!0}function V0(e,t,a){Uo(e)&&a.delete(t)}function rx(){Qf=!1,ll!==null&&Uo(ll)&&(ll=null),sl!==null&&Uo(sl)&&(sl=null),il!==null&&Uo(il)&&(il=null),Zi.forEach(V0),Ji.forEach(V0)}function Lo(e,t){e.blockedOn===t&&(e.blockedOn=null,Qf||(Qf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,rx)))}var qo=null;function K0(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],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(Hf(i||a)===null)continue;break}var f=tn(a);f!==null&&(e.splice(t,3),t-=3,kc(f,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function Ii(e){function t(j){return Lo(j,e)}ll!==null&&Lo(ll,e),sl!==null&&Lo(sl,e),il!==null&&Lo(il,e),Zi.forEach(t),Ji.forEach(t);for(var a=0;a<rl.length;a++){var i=rl[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<rl.length&&(a=rl[0],a.blockedOn===null);)Y0(a),a.blockedOn===null&&rl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],f=a[i+1],v=c[ne]||null;if(typeof f=="function")v||K0(a);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[ne]||null)S=v.formAction;else if(Hf(c)!==null)continue}else S=v.action;typeof S=="function"?a[i+1]=S:(a.splice(i,3),i-=3),K0(a)}}}function $f(e){this._internalRoot=e}zo.prototype.render=$f.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,i=on();B0(a,i,e,t,null,null)},zo.prototype.unmount=$f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;B0(e.current,2,null,e,null,null),bo(),t[de]=null}};function zo(e){this._internalRoot=e}zo.prototype.unstable_scheduleHydration=function(e){if(e){var t=_e();e={blockedOn:null,target:e,priority:t};for(var a=0;a<rl.length&&t!==0&&t<rl[a].priority;a++);rl.splice(a,0,e),a===0&&Y0(e)}};var F0=l.version;if(F0!=="19.1.0")throw Error(s(527,F0,"19.1.0"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=y(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var ox={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bo.isDisabled&&Bo.supportsFiber)try{pn=Bo.inject(ox),tt=Bo}catch{}}return er.createRoot=function(e,t){if(!o(e))throw Error(s(299));var a=!1,i="",c=op,f=up,v=cp,S=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=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=q0(e,1,!1,null,null,a,i,c,f,v,S,null),e[de]=t.current,Cf(e),new $f(t)},er.hydrateRoot=function(e,t,a){if(!o(e))throw Error(s(299));var i=!1,c="",f=op,v=up,S=cp,j=null,L=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!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&&(j=a.unstable_transitionCallbacks),a.formState!==void 0&&(L=a.formState)),t=q0(e,1,!0,t,a??null,i,c,f,v,S,j,L),t.context=z0(null),a=t.current,i=on(),i=At(i),c=Va(i),c.callback=null,Ka(a,c,i),a=i,t.current.lanes=a,vn(t,a),Pn(t),e[de]=t.current,Cf(e),new zo(t)},er.version="19.1.0",er}var ny;function vx(){if(ny)return Kf.exports;ny=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(),Kf.exports=yx(),Kf.exports}var bx=vx();const gx=vu(bx);var tr={},ay;function xx(){if(ay)return tr;ay=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.parse=d,tr.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,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,u=(()=>{const w=function(){};return w.prototype=Object.create(null),w})();function d(w,C){const E=new u,A=w.length;if(A<2)return E;const N=(C==null?void 0:C.decode)||b;let _=0;do{const O=w.indexOf("=",_);if(O===-1)break;const T=w.indexOf(";",_),$=T===-1?A:T;if(O>$){_=w.lastIndexOf(";",O-1)+1;continue}const V=m(w,_,O),H=y(w,O,V),G=w.slice(V,H);if(E[G]===void 0){let Z=m(w,O+1,$),te=y(w,$,Z);const pe=N(w.slice(Z,te));E[G]=pe}_=$+1}while(_<A);return E}function m(w,C,E){do{const A=w.charCodeAt(C);if(A!==32&&A!==9)return C}while(++C<E);return E}function y(w,C,E){for(;C>E;){const A=w.charCodeAt(--C);if(A!==32&&A!==9)return C+1}return E}function p(w,C,E){const A=(E==null?void 0:E.encode)||encodeURIComponent;if(!n.test(w))throw new TypeError(`argument name is invalid: ${w}`);const N=A(C);if(!l.test(N))throw new TypeError(`argument val is invalid: ${C}`);let _=w+"="+N;if(!E)return _;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);_+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);_+="; Domain="+E.domain}if(E.path){if(!s.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);_+="; Path="+E.path}if(E.expires){if(!g(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);_+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(_+="; HttpOnly"),E.secure&&(_+="; Secure"),E.partitioned&&(_+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.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: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.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: ${E.sameSite}`)}return _}function b(w){if(w.indexOf("%")===-1)return w;try{return decodeURIComponent(w)}catch{return w}}function g(w){return o.call(w)==="[object Date]"}return tr}xx();var ly="popstate";function Sx(n={}){function l(s,o){let{pathname:u,search:d,hash:m}=s.location;return fd("",{pathname:u,search:d,hash:m},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(s,o){return typeof o=="string"?o:cr(o)}return Ex(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 wx(){return Math.random().toString(36).substring(2,10)}function sy(n,l){return{usr:n.state,key:n.key,idx:l}}function fd(n,l,r=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Fs(l):l,state:r,key:l&&l.key||s||wx()}}function cr({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 Fs(n){let l={};if(n){let r=n.indexOf("#");r>=0&&(l.hash=n.substring(r),n=n.substring(0,r));let s=n.indexOf("?");s>=0&&(l.search=n.substring(s),n=n.substring(0,s)),n&&(l.pathname=n)}return l}function Ex(n,l,r,s={}){let{window:o=document.defaultView,v5Compat:u=!1}=s,d=o.history,m="POP",y=null,p=b();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function b(){return(d.state||{idx:null}).idx}function g(){m="POP";let N=b(),_=N==null?null:N-p;p=N,y&&y({action:m,location:A.location,delta:_})}function w(N,_){m="PUSH";let O=fd(A.location,N,_);p=b()+1;let T=sy(O,p),$=A.createHref(O);try{d.pushState(T,"",$)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;o.location.assign($)}u&&y&&y({action:m,location:A.location,delta:1})}function C(N,_){m="REPLACE";let O=fd(A.location,N,_);p=b();let T=sy(O,p),$=A.createHref(O);d.replaceState(T,"",$),u&&y&&y({action:m,location:A.location,delta:0})}function E(N){return Cx(N)}let A={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(ly,g),y=N,()=>{o.removeEventListener(ly,g),y=null}},createHref(N){return l(o,N)},createURL:E,encodeLocation(N){let _=E(N);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:w,replace:C,go(N){return d.go(N)}};return A}function Cx(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 s=typeof n=="string"?n:cr(n);return s=s.replace(/ $/,"%20"),!l&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function uv(n,l,r="/"){return _x(n,l,r,!1)}function _x(n,l,r,s){let o=typeof l=="string"?Fs(l):l,u=Da(o.pathname||"/",r);if(u==null)return null;let d=cv(n);Nx(d);let m=null;for(let y=0;m==null&&y<d.length;++y){let p=zx(u);m=Lx(d[y],p,s)}return m}function cv(n,l=[],r=[],s=""){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(s),`Absolute route path "${y.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(s.length));let p=Oa([s,y.relativePath]),b=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}".`),cv(u.children,l,b,p)),!(u.path==null&&!u.index)&&l.push({path:p,score:Mx(p,u.index),routesMeta:b})};return n.forEach((u,d)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))o(u,d);else for(let y of fv(u.path))o(u,d,y)}),l}function fv(n){let l=n.split("/");if(l.length===0)return[];let[r,...s]=l,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(s.length===0)return o?[u,""]:[u];let d=fv(s.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 Nx(n){n.sort((l,r)=>l.score!==r.score?r.score-l.score:Ux(l.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var jx=/^:[\w-]+$/,Ax=3,Tx=2,Rx=1,Ox=10,Dx=-2,iy=n=>n==="*";function Mx(n,l){let r=n.split("/"),s=r.length;return r.some(iy)&&(s+=Dx),l&&(s+=Tx),r.filter(o=>!iy(o)).reduce((o,u)=>o+(jx.test(u)?Ax:u===""?Rx:Ox),s)}function Ux(n,l){return n.length===l.length&&n.slice(0,-1).every((s,o)=>s===l[o])?n[n.length-1]-l[l.length-1]:0}function Lx(n,l,r=!1){let{routesMeta:s}=n,o={},u="/",d=[];for(let m=0;m<s.length;++m){let y=s[m],p=m===s.length-1,b=u==="/"?l:l.slice(u.length)||"/",g=fr({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},b),w=y.route;if(!g&&p&&r&&!s[s.length-1].route.index&&(g=fr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!g)return null;Object.assign(o,g.params),d.push({params:o,pathname:Oa([u,g.pathname]),pathnameBase:Qx(Oa([u,g.pathnameBase])),route:w}),g.pathnameBase!=="/"&&(u=Oa([u,g.pathnameBase]))}return d}function fr(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=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:s.reduce((p,{paramName:b,isOptional:g},w)=>{if(b==="*"){let E=m[w]||"";d=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const C=m[w];return g&&!C?p[b]=void 0:p[b]=(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 s=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,y)=>(s.push({paramName:m,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(s.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),s]}function zx(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 Da(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,s=n.charAt(r);return s&&s!=="/"?null:n.slice(r)||"/"}function Bx(n,l="/"){let{pathname:r,search:s="",hash:o=""}=typeof n=="string"?Fs(n):n;return{pathname:r?r.startsWith("/")?r:kx(r,l):l,search:$x(s),hash:Yx(o)}}function kx(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 Zf(n,l,r,s){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(s)}]. 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 Hx(n){return n.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function dv(n){let l=Hx(n);return l.map((r,s)=>s===l.length-1?r.pathname:r.pathnameBase)}function hv(n,l,r,s=!1){let o;typeof n=="string"?o=Fs(n):(o={...n},et(!o.pathname||!o.pathname.includes("?"),Zf("?","pathname","search",o)),et(!o.pathname||!o.pathname.includes("#"),Zf("#","pathname","hash",o)),et(!o.search||!o.search.includes("#"),Zf("#","search","hash",o)));let u=n===""||o.pathname==="",d=u?"/":o.pathname,m;if(d==null)m=r;else{let g=l.length-1;if(!s&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),g-=1;o.pathname=w.join("/")}m=g>=0?l[g]:"/"}let y=Bx(o,m),p=d&&d!=="/"&&d.endsWith("/"),b=(u||d===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(p||b)&&(y.pathname+="/"),y}var Oa=n=>n.join("/").replace(/\/\/+/g,"/"),Qx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),$x=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Yx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Vx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var mv=["POST","PUT","PATCH","DELETE"];new Set(mv);var Kx=["GET",...mv];new Set(Kx);var Gs=x.createContext(null);Gs.displayName="DataRouter";var bu=x.createContext(null);bu.displayName="DataRouterState";var pv=x.createContext({isTransitioning:!1});pv.displayName="ViewTransition";var Fx=x.createContext(new Map);Fx.displayName="Fetchers";var Gx=x.createContext(null);Gx.displayName="Await";var na=x.createContext(null);na.displayName="Navigation";var mr=x.createContext(null);mr.displayName="Location";var aa=x.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var Ud=x.createContext(null);Ud.displayName="RouteError";function Xx(n,{relative:l}={}){et(pr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=x.useContext(na),{hash:o,pathname:u,search:d}=yr(n,{relative:l}),m=u;return r!=="/"&&(m=u==="/"?r:Oa([r,u])),s.createHref({pathname:m,search:d,hash:o})}function pr(){return x.useContext(mr)!=null}function Yt(){return et(pr(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(mr).location}var yv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vv(n){x.useContext(na).static||x.useLayoutEffect(n)}function Lt(){let{isDataRoute:n}=x.useContext(aa);return n?o2():Zx()}function Zx(){et(pr(),"useNavigate() may be used only in the context of a <Router> component.");let n=x.useContext(Gs),{basename:l,navigator:r}=x.useContext(na),{matches:s}=x.useContext(aa),{pathname:o}=Yt(),u=JSON.stringify(dv(s)),d=x.useRef(!1);return vv(()=>{d.current=!0}),x.useCallback((y,p={})=>{if(qn(d.current,yv),!d.current)return;if(typeof y=="number"){r.go(y);return}let b=hv(y,JSON.parse(u),o,p.relative==="path");n==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:Oa([l,b.pathname])),(p.replace?r.replace:r.push)(b,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 yr(n,{relative:l}={}){let{matches:r}=x.useContext(aa),{pathname:s}=Yt(),o=JSON.stringify(dv(r));return x.useMemo(()=>hv(n,JSON.parse(o),s,l==="path"),[n,o,s,l])}function Px(n,l){return bv(n,l)}function bv(n,l,r,s){var O;et(pr(),"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:"/",b=m?m.pathnameBase:"/",g=m&&m.route;{let T=g&&g.path||"";gv(p,!g||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${T}">) 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="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let w=Yt(),C;if(l){let T=typeof l=="string"?Fs(l):l;et(b==="/"||((O=T.pathname)==null?void 0:O.startsWith(b)),`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 "${b}" but pathname "${T.pathname}" was given in the \`location\` prop.`),C=T}else C=w;let E=C.pathname||"/",A=E;if(b!=="/"){let T=b.replace(/^\//,"").split("/");A="/"+E.replace(/^\//,"").split("/").slice(T.length).join("/")}let N=!o&&r&&r.matches&&r.matches.length>0?r.matches:ov(n,{pathname:A});qn(g||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 _=n2(N&&N.map(T=>Object.assign({},T,{params:Object.assign({},y,T.params),pathname:Oa([b,u.encodeLocation?u.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?b:Oa([b,u.encodeLocation?u.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),d,r,s);return l&&_?x.createElement(mr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},_):_}function Ix(){let n=r2(),l=Vx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:s},o={padding:"2px 4px",backgroundColor:s},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:o},"ErrorBoundary")," or"," ",x.createElement("code",{style:o},"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:u},r):null,d)}var Wx=x.createElement(Ix,null),e2=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(Ud.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function t2({routeContext:n,match:l,children:r}){let s=x.useContext(Gs);return s&&s.static&&s.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=l.route.id),x.createElement(aa.Provider,{value:n},r)}function n2(n,l=[],r=null,s=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 u=n,o=r==null?void 0:r.errors;if(o!=null){let y=u.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);et(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),u=u.slice(0,Math.min(u.length,y+1))}let d=!1,m=-1;if(r)for(let y=0;y<u.length;y++){let p=u[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(m=y),p.route.id){let{loaderData:b,errors:g}=r,w=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||w){d=!0,m>=0?u=u.slice(0,m+1):u=[u[0]];break}}}return u.reduceRight((y,p,b)=>{let g,w=!1,C=null,E=null;r&&(g=o&&p.route.id?o[p.route.id]:void 0,C=p.route.errorElement||Wx,d&&(m<0&&b===0?(gv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):m===b&&(w=!0,E=p.route.hydrateFallbackElement||null)));let A=l.concat(u.slice(0,b+1)),N=()=>{let _;return g?_=C:w?_=E:p.route.Component?_=x.createElement(p.route.Component,null):p.route.element?_=p.route.element:_=y,x.createElement(t2,{match:p,routeContext:{outlet:y,matches:A,isDataRoute:r!=null},children:_})};return r&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?x.createElement(e2,{location:r.location,revalidation:r.revalidation,component:C,error:g,children:N(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):N()},null)}function Ld(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function a2(n){let l=x.useContext(Gs);return et(l,Ld(n)),l}function l2(n){let l=x.useContext(bo);return et(l,Ld(n)),l}function s2(n){let l=x.useContext(aa);return et(l,Ld(n)),l}function qd(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 i2(){return qd("useRouteId")}function r2(){var s;let n=x.useContext(Ud),l=l2("useRouteError"),r=qd("useRouteError");return n!==void 0?n:(s=l.errors)==null?void 0:s[r]}function u2(){let{router:n}=a2("useNavigate"),l=qd("useNavigate"),r=x.useRef(!1);return vv(()=>{r.current=!0}),x.useCallback(async(u,o={})=>{qn(r.current,yv),r.current&&(typeof u=="number"?n.navigate(u):await n.navigate(u,{fromRouteId:l,...o}))},[n,l])}var ry={};function gv(n,l,r){!l&&!ry[n]&&(ry[n]=!0,qn(!1,r))}x.memo(o2);function o2({routes:n,future:l,state:r}){return bv(n,void 0,r,l)}function rr(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 c2({basename:n="/",children:l=null,location:r,navigationType:s="POP",navigator:u,static:o=!1}){et(!pr(),"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:u,static:o,future:{}}),[d,u,o]);typeof r=="string"&&(r=Fs(r));let{pathname:y="/",search:p="",hash:b="",state:g=null,key:w="default"}=r,C=x.useMemo(()=>{let E=Da(y,d);return E==null?null:{location:{pathname:E,search:p,hash:b,state:g,key:w},navigationType:s}},[d,y,p,b,g,w,s]);return qn(C!=null,`<Router basename="${d}"> is not able to match the URL "${y}${p}${b}" 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(mr.Provider,{children:l,value:C}))}function f2({children:n,location:l}){return Px(dd(n),l)}function dd(n,l=[]){let r=[];return x.Children.forEach(n,(s,u)=>{if(!x.isValidElement(s))return;let o=[...l,u];if(s.type===x.Fragment){r.push.apply(r,dd(s.props.children,o));return}et(s.type===rr,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),et(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||o.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=dd(s.props.children,o)),r.push(d)}),r}var Ku="get",Fu="application/x-www-form-urlencoded";function go(n){return n!=null&&typeof n.tagName=="string"}function d2(n){return go(n)&&n.tagName.toLowerCase()==="button"}function h2(n){return go(n)&&n.tagName.toLowerCase()==="form"}function m2(n){return go(n)&&n.tagName.toLowerCase()==="input"}function p2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function y2(n,l){return n.button===0&&(!l||l==="_self")&&!p2(n)}function hd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,r)=>{let s=n[r];return l.concat(Array.isArray(s)?s.map(u=>[r,u]):[[r,s]])},[]))}function v2(n,l){let r=hd(n);return l&&l.forEach((s,u)=>{r.has(u)||l.getAll(u).forEach(o=>{r.append(u,o)})}),r}var Bu=null;function b2(){if(Bu===null)try{new FormData(document.createElement("form"),0),Bu=!1}catch{Bu=!0}return Bu}var g2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jf(n){return n!=null&&!g2.has(n)?(qn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fu}"`),null):n}function x2(n,l){let r,s,u,o,d;if(h2(n)){let m=n.getAttribute("action");s=m?Da(m,l):null,r=n.getAttribute("method")||Ku,u=Jf(n.getAttribute("enctype"))||Fu,o=new FormData(n)}else if(d2(n)||m2(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(s=y?Da(y,l):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Ku,u=Jf(n.getAttribute("formenctype"))||Jf(m.getAttribute("enctype"))||Fu,o=new FormData(m,n),!b2()){let{name:p,type:b,value:g}=n;if(b==="image"){let w=p?`${p}.`:"";o.append(`${w}x`,"0"),o.append(`${w}y`,"0")}else p&&o.append(p,g)}}else{if(go(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ku,s=null,u=Fu,d=n}return o&&u==="text/plain"&&(d=o,o=void 0),{action:s,method:r.toLowerCase(),encType:u,formData:o,body:d}}function zd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}async function S2(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 w2(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 E2(n,l,r){let s=await Promise.all(n.map(async u=>{let o=l.routes[u.route.id];if(o){let d=await S2(o,r);return d.links?d.links():[]}return[]}));return j2(s.flat(1).filter(w2).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function uy(n,l,r,s,u,o){let d=(y,p)=>r[p]?y.route.id!==r[p].route.id:!0,m=(y,p)=>{var b;return r[p].pathname!==y.pathname||((b=r[p].route.path)==null?void 0:b.endsWith("*"))&&r[p].params["*"]!==y.params["*"]};return o==="assets"?l.filter((y,p)=>d(y,p)||m(y,p)):o==="data"?l.filter((y,p)=>{var g;let b=s.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(d(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let w=y.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((g=r[0])==null?void 0:g.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function C2(n,l,{includeHydrateFallback:r}={}){return _2(n.map(s=>{let u=l.routes[s.route.id];if(!u)return[];let o=[u.module];return u.clientActionModule&&(o=o.concat(u.clientActionModule)),u.clientLoaderModule&&(o=o.concat(u.clientLoaderModule)),r&&u.hydrateFallbackModule&&(o=o.concat(u.hydrateFallbackModule)),u.imports&&(o=o.concat(u.imports)),o}).flat(1))}function _2(n){return[...new Set(n)]}function N2(n){let l={},r=Object.keys(n).sort();for(let s of r)l[s]=n[s];return l}function j2(n,l){let r=new Set;return new Set(l),n.reduce((s,u)=>{let o=JSON.stringify(N2(u));return r.has(o)||(r.add(o),s.push({key:o,link:u})),s},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var A2=new Set([100,101,204,205]);function T2(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&&Da(r.pathname,l)==="/"?r.pathname=`${l.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function xv(){let n=x.useContext(Gs);return zd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function R2(){let n=x.useContext(bo);return zd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Bd=x.createContext(void 0);Bd.displayName="FrameworkContext";function Sv(){let n=x.useContext(Bd);return zd(n,"You must render this element inside a <HydratedRouter> element"),n}function O2(n,l){let r=x.useContext(Bd),[s,u]=x.useState(!1),[o,d]=x.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:b,onTouchStart:g}=l,w=x.useRef(null);x.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let A=_=>{_.forEach(O=>{d(O.isIntersecting)})},N=new IntersectionObserver(A,{threshold:.5});return w.current&&N.observe(w.current),()=>{N.disconnect()}}},[n]),x.useEffect(()=>{if(s){let A=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(A)}}},[s]);let C=()=>{u(!0)},E=()=>{u(!1),d(!1)};return r?n!=="intent"?[o,w,{}]:[o,w,{onFocus:nr(m,C),onBlur:nr(y,E),onMouseEnter:nr(p,C),onMouseLeave:nr(b,E),onTouchStart:nr(g,C)}]:[!1,w,{}]}function nr(n,l){return r=>{n&&n(r),r.defaultPrevented||l(r)}}function D2({page:n,...l}){let{router:r}=xv(),s=x.useMemo(()=>ov(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?x.createElement(U2,{page:n,matches:s,...l}):null}function M2(n){let{manifest:l,routeModules:r}=Sv(),[s,u]=x.useState([]);return x.useEffect(()=>{let o=!1;return E2(n,l,r).then(d=>{o||u(d)}),()=>{o=!0}},[n,l,r]),s}function U2({page:n,matches:l,...r}){let s=Yt(),{manifest:u,routeModules:o}=Sv(),{basename:d}=xv(),{loaderData:m,matches:y}=R2(),p=x.useMemo(()=>uy(n,l,y,u,s,"data"),[n,l,y,u,s]),b=x.useMemo(()=>uy(n,l,y,u,s,"assets"),[n,l,y,u,s]),g=x.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let E=new Set,A=!1;if(l.forEach(_=>{var T;let O=u.routes[_.route.id];!O||!O.hasLoader||(!p.some($=>$.route.id===_.route.id)&&_.route.id in m&&((T=o[_.route.id])!=null&&T.shouldRevalidate)||O.hasClientLoader?A=!0:E.add(_.route.id))}),E.size===0)return[];let N=T2(n,d);return A&&E.size>0&&N.searchParams.set("_routes",l.filter(_=>E.has(_.route.id)).map(_=>_.route.id).join(",")),[N.pathname+N.search]},[d,m,s,u,p,l,n,o]),w=x.useMemo(()=>C2(b,u),[b,u]),C=M2(b);return x.createElement(x.Fragment,null,g.map(E=>x.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),w.map(E=>x.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),C.map(({key:E,link:A})=>x.createElement("link",{key:E,...A})))}function L2(...n){return l=>{n.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var wv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wv&&(window.__reactRouterVersion="7.6.0")}catch{}function q2({basename:n,children:l,window:r}){let s=x.useRef();s.current==null&&(s.current=Sx({window:r,v5Compat:!0}));let u=s.current,[o,d]=x.useState({action:u.action,location:u.location}),m=x.useCallback(y=>{x.startTransition(()=>d(y))},[d]);return x.useLayoutEffect(()=>u.listen(m),[u,m]),x.createElement(c2,{basename:n,children:l,location:o.location,navigationType:o.action,navigator:u})}var Ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cv=x.forwardRef(function({onClick:l,discover:r="render",prefetch:s="none",relative:u,reloadDocument:o,replace:d,state:m,target:y,to:p,preventScrollReset:b,viewTransition:g,...w},C){let{basename:E}=x.useContext(na),A=typeof p=="string"&&Ev.test(p),N,_=!1;if(typeof p=="string"&&A&&(N=p,wv))try{let te=new URL(window.location.href),pe=p.startsWith("//")?new URL(te.protocol+p):new URL(p),Re=Da(pe.pathname,E);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 O=Xx(p,{relative:u}),[T,$,V]=O2(s,w),H=H2(p,{replace:d,state:m,target:y,preventScrollReset:b,relative:u,viewTransition:g});function G(te){l&&l(te),te.defaultPrevented||H(te)}let Z=x.createElement("a",{...w,...V,href:N||O,onClick:_||o?l:G,ref:L2(C,$),target:y,"data-discover":!A&&r==="render"?"true":void 0});return T&&!A?x.createElement(x.Fragment,null,Z,x.createElement(D2,{page:O})):Z});Cv.displayName="Link";var z2=x.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:s="",end:u=!1,style:o,to:d,viewTransition:m,children:y,...p},b){let g=yr(d,{relative:p.relative}),w=Yt(),C=x.useContext(bo),{navigator:E,basename:A}=x.useContext(na),N=C!=null&&F2(g)&&m===!0,_=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,O=w.pathname,T=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;r||(O=O.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&A&&(T=Da(T,A)||T);const $=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let V=O===_||!u&&O.startsWith(_)&&O.charAt($)==="/",H=T!=null&&(T===_||!u&&T.startsWith(_)&&T.charAt(_.length)==="/"),G={isActive:V,isPending:H,isTransitioning:N},Z=V?l:void 0,te;typeof s=="function"?te=s(G):te=[s,V?"active":null,H?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let pe=typeof o=="function"?o(G):o;return x.createElement(Cv,{...p,"aria-current":Z,className:te,ref:b,style:pe,to:d,viewTransition:m},typeof y=="function"?y(G):y)});z2.displayName="NavLink";var B2=x.forwardRef(({discover:n="render",fetcherKey:l,navigate:r,reloadDocument:s,replace:u,state:o,method:d=Ku,action:m,onSubmit:y,relative:p,preventScrollReset:b,viewTransition:g,...w},C)=>{let E=V2(),A=K2(m,{relative:p}),N=d.toLowerCase()==="get"?"get":"post",_=typeof m=="string"&&Ev.test(m),O=T=>{if(y&&y(T),T.defaultPrevented)return;T.preventDefault();let $=T.nativeEvent.submitter,V=($==null?void 0:$.getAttribute("formmethod"))||d;E($||T.currentTarget,{fetcherKey:l,method:V,navigate:r,replace:u,state:o,relative:p,preventScrollReset:b,viewTransition:g})};return x.createElement("form",{ref:C,method:N,action:A,onSubmit:s?y:O,...w,"data-discover":!_&&n==="render"?"true":void 0})});B2.displayName="Form";function k2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _v(n){let l=x.useContext(Gs);return et(l,k2(n)),l}function H2(n,{target:l,replace:r,state:s,preventScrollReset:u,relative:o,viewTransition:d}={}){let m=Lt(),y=Yt(),p=yr(n,{relative:o});return x.useCallback(b=>{if(y2(b,l)){b.preventDefault();let g=r!==void 0?r:cr(y)===cr(p);m(n,{replace:g,state:s,preventScrollReset:u,relative:o,viewTransition:d})}},[y,m,p,r,s,l,n,u,o,d])}function Q2(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(hd(n)),r=x.useRef(!1),s=Yt(),u=x.useMemo(()=>v2(s.search,r.current?null:l.current),[s.search]),o=Lt(),d=x.useCallback((m,y)=>{const p=hd(typeof m=="function"?m(u):m);r.current=!0,o("?"+p,y)},[o,u]);return[u,d]}var $2=0,Y2=()=>`__${String(++$2)}__`;function V2(){let{router:n}=_v("useSubmit"),{basename:l}=x.useContext(na),r=i2();return x.useCallback(async(s,u={})=>{let{action:o,method:d,encType:m,formData:y,body:p}=x2(s,l);if(u.navigate===!1){let b=u.fetcherKey||Y2();await n.fetch(b,r,u.action||o,{preventScrollReset:u.preventScrollReset,formData:y,body:p,formMethod:u.method||d,formEncType:u.encType||m,flushSync:u.flushSync})}else await n.navigate(u.action||o,{preventScrollReset:u.preventScrollReset,formData:y,body:p,formMethod:u.method||d,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:r,flushSync:u.flushSync,viewTransition:u.viewTransition})},[n,l,r])}function K2(n,{relative:l}={}){let{basename:r}=x.useContext(na),s=x.useContext(aa);et(s,"useFormAction must be used inside a RouteContext");let[u]=s.matches.slice(-1),o={...yr(n||".",{relative:l})},d=Yt();if(n==null){o.search=d.search;let m=new URLSearchParams(o.search),y=m.getAll("index");if(y.some(b=>b==="")){m.delete("index"),y.filter(g=>g).forEach(g=>m.append("index",g));let b=m.toString();o.search=b?`?${b}`:""}}return(!n||n===".")&&u.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Oa([r,o.pathname])),cr(o)}function F2(n,l={}){let r=x.useContext(pv);et(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=_v("useViewTransitionState"),u=yr(n,{relative:l.relative});if(!r.isTransitioning)return!1;let o=Da(r.currentLocation.pathname,s)||r.currentLocation.pathname,d=Da(r.nextLocation.pathname,s)||r.nextLocation.pathname;return fr(u.pathname,d)!=null||fr(u.pathname,o)!=null}[...A2];var Nv=uv();const G2=vo(Nv);function md(n,l){return md=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},md(n,l)}function Xs(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,md(n,l)}var Zs=function(){function n(){this.listeners=[]}var l=n.prototype;return l.subscribe=function(s){var u=this,o=s||function(){};return this.listeners.push(o),this.onSubscribe(),function(){u.listeners=u.listeners.filter(function(d){return d!==o}),u.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 s in r)({}).hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Ee.apply(null,arguments)}var no=typeof window>"u";function _t(){}function X2(n,l){return typeof n=="function"?n(l):n}function pd(n){return typeof n=="number"&&n>=0&&n!==1/0}function ao(n){return Array.isArray(n)?n:[n]}function jv(n,l){return Math.max(n+(l||0)-Date.now(),0)}function Gu(n,l,r){return vr(n)?typeof l=="function"?Ee({},r,{queryKey:n,queryFn:l}):Ee({},l,{queryKey:n}):n}function Z2(n,l,r){return vr(n)?typeof l=="function"?Ee({},r,{mutationKey:n,mutationFn:l}):Ee({},l,{mutationKey:n}):typeof n=="function"?Ee({},l,{mutationFn:n}):Ee({},n)}function ol(n,l,r){return vr(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 oy(n,l){var r=n.active,s=n.exact,u=n.fetching,o=n.inactive,d=n.predicate,m=n.queryKey,y=n.stale;if(vr(m)){if(s){if(l.queryHash!==kd(m,l.options))return!1}else if(!lo(l.queryKey,m))return!1}var p=J2(r,o);if(p==="none")return!1;if(p!=="all"){var b=l.isActive();if(p==="active"&&!b||p==="inactive"&&b)return!1}return!(typeof y=="boolean"&&l.isStale()!==y||typeof u=="boolean"&&l.isFetching()!==u||d&&!d(l))}function cy(n,l){var r=n.exact,s=n.fetching,u=n.predicate,o=n.mutationKey;if(vr(o)){if(!l.options.mutationKey)return!1;if(r){if(Ql(l.options.mutationKey)!==Ql(o))return!1}else if(!lo(l.options.mutationKey,o))return!1}return!(typeof s=="boolean"&&l.state.status==="loading"!==s||u&&!u(l))}function kd(n,l){var r=(l==null?void 0:l.queryKeyHashFn)||Ql;return r(n)}function Ql(n){var l=ao(n);return P2(l)}function P2(n){return JSON.stringify(n,function(l,r){return yd(r)?Object.keys(r).sort().reduce(function(s,u){return s[u]=r[u],s},{}):r})}function lo(n,l){return Av(ao(n),ao(l))}function Av(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!Av(n[r],l[r])}):!1}function so(n,l){if(n===l)return n;var r=Array.isArray(n)&&Array.isArray(l);if(r||yd(n)&&yd(l)){for(var s=r?n.length:Object.keys(n).length,u=r?l:Object.keys(l),o=u.length,d=r?[]:{},m=0,y=0;y<o;y++){var p=r?y:u[y];d[p]=so(n[p],l[p]),d[p]===n[p]&&m++}return s===o&&m===s?n:d}return l}function I2(n,l){if(n&&!l||l&&!n)return!1;for(var r in n)if(n[r]!==l[r])return!1;return!0}function yd(n){if(!fy(n))return!1;var l=n.constructor;if(typeof l>"u")return!0;var r=l.prototype;return!(!fy(r)||!r.hasOwnProperty("isPrototypeOf"))}function fy(n){return Object.prototype.toString.call(n)==="[object Object]"}function vr(n){return typeof n=="string"||Array.isArray(n)}function W2(n){return new Promise(function(l){setTimeout(l,n)})}function dy(n){Promise.resolve().then(n).catch(function(l){return setTimeout(function(){throw l})})}function Tv(){if(typeof AbortController=="function")return new AbortController}var eS=function(n){Xs(l,n);function l(){var s;return s=n.call(this)||this,s.setup=function(u){var o;if(!no&&((o=window)!=null&&o.addEventListener)){var d=function(){return u()};return window.addEventListener("visibilitychange",d,!1),window.addEventListener("focus",d,!1),function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("focus",d)}}},s}var r=l.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var u;(u=this.cleanup)==null||u.call(this),this.cleanup=void 0}},r.setEventListener=function(u){var o,d=this;this.setup=u,(o=this.cleanup)==null||o.call(this),this.cleanup=u(function(m){typeof m=="boolean"?d.setFocused(m):d.onFocus()})},r.setFocused=function(u){this.focused=u,u&&this.onFocus()},r.onFocus=function(){this.listeners.forEach(function(u){u()})},r.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},l}(Zs),ur=new eS,tS=function(n){Xs(l,n);function l(){var s;return s=n.call(this)||this,s.setup=function(u){var o;if(!no&&((o=window)!=null&&o.addEventListener)){var d=function(){return u()};return window.addEventListener("online",d,!1),window.addEventListener("offline",d,!1),function(){window.removeEventListener("online",d),window.removeEventListener("offline",d)}}},s}var r=l.prototype;return r.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},r.onUnsubscribe=function(){if(!this.hasListeners()){var u;(u=this.cleanup)==null||u.call(this),this.cleanup=void 0}},r.setEventListener=function(u){var o,d=this;this.setup=u,(o=this.cleanup)==null||o.call(this),this.cleanup=u(function(m){typeof m=="boolean"?d.setOnline(m):d.onOnline()})},r.setOnline=function(u){this.online=u,u&&this.onOnline()},r.onOnline=function(){this.listeners.forEach(function(u){u()})},r.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},l}(Zs),Xu=new tS;function nS(n){return Math.min(1e3*Math.pow(2,n),3e4)}function io(n){return typeof(n==null?void 0:n.cancel)=="function"}var Rv=function(l){this.revert=l==null?void 0:l.revert,this.silent=l==null?void 0:l.silent};function Zu(n){return n instanceof Rv}var Ov=function(l){var r=this,s=!1,u,o,d,m;this.abort=l.abort,this.cancel=function(w){return u==null?void 0:u(w)},this.cancelRetry=function(){s=!0},this.continueRetry=function(){s=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(w,C){d=w,m=C});var y=function(C){r.isResolved||(r.isResolved=!0,l.onSuccess==null||l.onSuccess(C),o==null||o(),d(C))},p=function(C){r.isResolved||(r.isResolved=!0,l.onError==null||l.onError(C),o==null||o(),m(C))},b=function(){return new Promise(function(C){o=C,r.isPaused=!0,l.onPause==null||l.onPause()}).then(function(){o=void 0,r.isPaused=!1,l.onContinue==null||l.onContinue()})},g=function w(){if(!r.isResolved){var C;try{C=l.fn()}catch(E){C=Promise.reject(E)}u=function(A){if(!r.isResolved&&(p(new Rv(A)),r.abort==null||r.abort(),io(C)))try{C.cancel()}catch{}},r.isTransportCancelable=io(C),Promise.resolve(C).then(y).catch(function(E){var A,N;if(!r.isResolved){var _=(A=l.retry)!=null?A:3,O=(N=l.retryDelay)!=null?N:nS,T=typeof O=="function"?O(r.failureCount,E):O,$=_===!0||typeof _=="number"&&r.failureCount<_||typeof _=="function"&&_(r.failureCount,E);if(s||!$){p(E);return}r.failureCount++,l.onFail==null||l.onFail(r.failureCount,E),W2(T).then(function(){if(!ur.isFocused()||!Xu.isOnline())return b()}).then(function(){s?p(E):w()})}})}};g()},aS=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(s){var u;this.transactions++;try{u=s()}finally{this.transactions--,this.transactions||this.flush()}return u},l.schedule=function(s){var u=this;this.transactions?this.queue.push(s):dy(function(){u.notifyFn(s)})},l.batchCalls=function(s){var u=this;return function(){for(var o=arguments.length,d=new Array(o),m=0;m<o;m++)d[m]=arguments[m];u.schedule(function(){s.apply(void 0,d)})}},l.flush=function(){var s=this,u=this.queue;this.queue=[],u.length&&dy(function(){s.batchNotifyFn(function(){u.forEach(function(o){s.notifyFn(o)})})})},l.setNotifyFunction=function(s){this.notifyFn=s},l.setBatchNotifyFunction=function(s){this.batchNotifyFn=s},n}(),Pe=new aS,Dv=console;function ro(){return Dv}function lS(n){Dv=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(s){var u;this.options=Ee({},this.defaultOptions,s),this.meta=s==null?void 0:s.meta,this.cacheTime=Math.max(this.cacheTime||0,(u=this.options.cacheTime)!=null?u:5*60*1e3)},l.setDefaultOptions=function(s){this.defaultOptions=s},l.scheduleGc=function(){var s=this;this.clearGcTimeout(),pd(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){s.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(s,u){var o,d,m=this.state.data,y=X2(s,m);return(o=(d=this.options).isDataEqual)!=null&&o.call(d,m,y)?y=m:this.options.structuralSharing!==!1&&(y=so(m,y)),this.dispatch({data:y,type:"success",dataUpdatedAt:u==null?void 0:u.updatedAt}),y},l.setState=function(s,u){this.dispatch({type:"setState",state:s,setStateOptions:u})},l.cancel=function(s){var u,o=this.promise;return(u=this.retryer)==null||u.cancel(s),o?o.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(s){return s.options.enabled!==!1})},l.isFetching=function(){return this.state.isFetching},l.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(s){return s.getCurrentResult().isStale})},l.isStaleByTime=function(s){return s===void 0&&(s=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!jv(this.state.dataUpdatedAt,s)},l.onFocus=function(){var s,u=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});u&&u.refetch(),(s=this.retryer)==null||s.continue()},l.onOnline=function(){var s,u=this.observers.find(function(o){return o.shouldFetchOnReconnect()});u&&u.refetch(),(s=this.retryer)==null||s.continue()},l.addObserver=function(s){this.observers.indexOf(s)===-1&&(this.observers.push(s),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:s}))},l.removeObserver=function(s){this.observers.indexOf(s)!==-1&&(this.observers=this.observers.filter(function(u){return u!==s}),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:s}))},l.getObserversCount=function(){return this.observers.length},l.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},l.fetch=function(s,u){var o=this,d,m,y;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(u!=null&&u.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var p;return(p=this.retryer)==null||p.continueRetry(),this.promise}}if(s&&this.setOptions(s),!this.options.queryFn){var b=this.observers.find(function(O){return O.options.queryFn});b&&this.setOptions(b.options)}var g=ao(this.queryKey),w=Tv(),C={queryKey:g,pageParam:void 0,meta:this.meta};Object.defineProperty(C,"signal",{enumerable:!0,get:function(){if(w)return o.abortSignalConsumed=!0,w.signal}});var E=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(C)):Promise.reject("Missing queryFn")},A={fetchOptions:u,options:this.options,queryKey:g,state:this.state,fetchFn:E,meta:this.meta};if((d=this.options.behavior)!=null&&d.onFetch){var N;(N=this.options.behavior)==null||N.onFetch(A)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((m=A.fetchOptions)==null?void 0:m.meta)){var _;this.dispatch({type:"fetch",meta:(_=A.fetchOptions)==null?void 0:_.meta})}return this.retryer=new Ov({fn:A.fetchFn,abort:w==null||(y=w.abort)==null?void 0:y.bind(w),onSuccess:function(T){o.setData(T),o.cache.config.onSuccess==null||o.cache.config.onSuccess(T,o),o.cacheTime===0&&o.optionalRemove()},onError:function(T){Zu(T)&&T.silent||o.dispatch({type:"error",error:T}),Zu(T)||(o.cache.config.onError==null||o.cache.config.onError(T,o),ro().error(T)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:A.options.retry,retryDelay:A.options.retryDelay}),this.promise=this.retryer.promise,this.promise},l.dispatch=function(s){var u=this;this.state=this.reducer(this.state,s),Pe.batch(function(){u.observers.forEach(function(o){o.onQueryUpdate(s)}),u.cache.notify({query:u,type:"queryUpdated",action:s})})},l.getDefaultState=function(s){var u=typeof s.initialData=="function"?s.initialData():s.initialData,o=typeof s.initialData<"u",d=o?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0,m=typeof u<"u";return{data:u,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(s,u){var o,d;switch(u.type){case"failed":return Ee({},s,{fetchFailureCount:s.fetchFailureCount+1});case"pause":return Ee({},s,{isPaused:!0});case"continue":return Ee({},s,{isPaused:!1});case"fetch":return Ee({},s,{fetchFailureCount:0,fetchMeta:(o=u.meta)!=null?o:null,isFetching:!0,isPaused:!1},!s.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ee({},s,{data:u.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:(d=u.dataUpdatedAt)!=null?d:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var m=u.error;return Zu(m)&&m.revert&&this.revertState?Ee({},this.revertState):Ee({},s,{error:m,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Ee({},s,{isInvalidated:!0});case"setState":return Ee({},s,u.state);default:return s}},n}(),iS=function(n){Xs(l,n);function l(s){var u;return u=n.call(this)||this,u.config=s||{},u.queries=[],u.queriesMap={},u}var r=l.prototype;return r.build=function(u,o,d){var m,y=o.queryKey,p=(m=o.queryHash)!=null?m:kd(y,o),b=this.get(p);return b||(b=new sS({cache:this,queryKey:y,queryHash:p,options:u.defaultQueryOptions(o),state:d,defaultOptions:u.getQueryDefaults(y),meta:o.meta}),this.add(b)),b},r.add=function(u){this.queriesMap[u.queryHash]||(this.queriesMap[u.queryHash]=u,this.queries.push(u),this.notify({type:"queryAdded",query:u}))},r.remove=function(u){var o=this.queriesMap[u.queryHash];o&&(u.destroy(),this.queries=this.queries.filter(function(d){return d!==u}),o===u&&delete this.queriesMap[u.queryHash],this.notify({type:"queryRemoved",query:u}))},r.clear=function(){var u=this;Pe.batch(function(){u.queries.forEach(function(o){u.remove(o)})})},r.get=function(u){return this.queriesMap[u]},r.getAll=function(){return this.queries},r.find=function(u,o){var d=ol(u,o),m=d[0];return typeof m.exact>"u"&&(m.exact=!0),this.queries.find(function(y){return oy(m,y)})},r.findAll=function(u,o){var d=ol(u,o),m=d[0];return Object.keys(m).length>0?this.queries.filter(function(y){return oy(m,y)}):this.queries},r.notify=function(u){var o=this;Pe.batch(function(){o.listeners.forEach(function(d){d(u)})})},r.onFocus=function(){var u=this;Pe.batch(function(){u.queries.forEach(function(o){o.onFocus()})})},r.onOnline=function(){var u=this;Pe.batch(function(){u.queries.forEach(function(o){o.onOnline()})})},l}(Zs),rS=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||Mv(),this.meta=r.meta}var l=n.prototype;return l.setState=function(s){this.dispatch({type:"setState",state:s})},l.addObserver=function(s){this.observers.indexOf(s)===-1&&this.observers.push(s)},l.removeObserver=function(s){this.observers=this.observers.filter(function(u){return u!==s})},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 s=this,u,o=this.state.status==="loading",d=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),d=d.then(function(){s.mutationCache.config.onMutate==null||s.mutationCache.config.onMutate(s.state.variables,s)}).then(function(){return s.options.onMutate==null?void 0:s.options.onMutate(s.state.variables)}).then(function(m){m!==s.state.context&&s.dispatch({type:"loading",context:m,variables:s.state.variables})})),d.then(function(){return s.executeMutation()}).then(function(m){u=m,s.mutationCache.config.onSuccess==null||s.mutationCache.config.onSuccess(u,s.state.variables,s.state.context,s)}).then(function(){return s.options.onSuccess==null?void 0:s.options.onSuccess(u,s.state.variables,s.state.context)}).then(function(){return s.options.onSettled==null?void 0:s.options.onSettled(u,null,s.state.variables,s.state.context)}).then(function(){return s.dispatch({type:"success",data:u}),u}).catch(function(m){return s.mutationCache.config.onError==null||s.mutationCache.config.onError(m,s.state.variables,s.state.context,s),ro().error(m),Promise.resolve().then(function(){return s.options.onError==null?void 0:s.options.onError(m,s.state.variables,s.state.context)}).then(function(){return s.options.onSettled==null?void 0:s.options.onSettled(void 0,m,s.state.variables,s.state.context)}).then(function(){throw s.dispatch({type:"error",error:m}),m})})},l.executeMutation=function(){var s=this,u;return this.retryer=new Ov({fn:function(){return s.options.mutationFn?s.options.mutationFn(s.state.variables):Promise.reject("No mutationFn found")},onFail:function(){s.dispatch({type:"failed"})},onPause:function(){s.dispatch({type:"pause"})},onContinue:function(){s.dispatch({type:"continue"})},retry:(u=this.options.retry)!=null?u:0,retryDelay:this.options.retryDelay}),this.retryer.promise},l.dispatch=function(s){var u=this;this.state=uS(this.state,s),Pe.batch(function(){u.observers.forEach(function(o){o.onMutationUpdate(s)}),u.mutationCache.notify(u)})},n}();function Mv(){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 Uv=function(n){Xs(l,n);function l(s){var u;return u=n.call(this)||this,u.config=s||{},u.mutations=[],u.mutationId=0,u}var r=l.prototype;return r.build=function(u,o,d){var m=new rS({mutationCache:this,mutationId:++this.mutationId,options:u.defaultMutationOptions(o),state:d,defaultOptions:o.mutationKey?u.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(m),m},r.add=function(u){this.mutations.push(u),this.notify(u)},r.remove=function(u){this.mutations=this.mutations.filter(function(o){return o!==u}),u.cancel(),this.notify(u)},r.clear=function(){var u=this;Pe.batch(function(){u.mutations.forEach(function(o){u.remove(o)})})},r.getAll=function(){return this.mutations},r.find=function(u){return typeof u.exact>"u"&&(u.exact=!0),this.mutations.find(function(o){return cy(u,o)})},r.findAll=function(u){return this.mutations.filter(function(o){return cy(u,o)})},r.notify=function(u){var o=this;Pe.batch(function(){o.listeners.forEach(function(d){d(u)})})},r.onFocus=function(){this.resumePausedMutations()},r.onOnline=function(){this.resumePausedMutations()},r.resumePausedMutations=function(){var u=this.mutations.filter(function(o){return o.state.isPaused});return Pe.batch(function(){return u.reduce(function(o,d){return o.then(function(){return d.continue().catch(_t)})},Promise.resolve())})},l}(Zs);function oS(){return{onFetch:function(l){l.fetchFn=function(){var r,s,u,o,d,m,y=(r=l.fetchOptions)==null||(s=r.meta)==null?void 0:s.refetchPage,p=(u=l.fetchOptions)==null||(o=u.meta)==null?void 0:o.fetchMore,b=p==null?void 0:p.pageParam,g=(p==null?void 0:p.direction)==="forward",w=(p==null?void 0:p.direction)==="backward",C=((d=l.state.data)==null?void 0:d.pages)||[],E=((m=l.state.data)==null?void 0:m.pageParams)||[],A=Tv(),N=A==null?void 0:A.signal,_=E,O=!1,T=l.options.queryFn||function(){return Promise.reject("Missing queryFn")},$=function(ye,Se,B,X){return _=X?[Se].concat(_):[].concat(_,[Se]),X?[B].concat(ye):[].concat(ye,[B])},V=function(ye,Se,B,X){if(O)return Promise.reject("Cancelled");if(typeof B>"u"&&!Se&&ye.length)return Promise.resolve(ye);var P={queryKey:l.queryKey,signal:N,pageParam:B,meta:l.meta},oe=T(P),R=Promise.resolve(oe).then(function(W){return $(ye,B,W,X)});if(io(oe)){var Q=R;Q.cancel=oe.cancel}return R},H;if(!C.length)H=V([]);else if(g){var G=typeof b<"u",Z=G?b:hy(l.options,C);H=V(C,G,Z)}else if(w){var te=typeof b<"u",pe=te?b:cS(l.options,C);H=V(C,te,pe,!0)}else(function(){_=[];var Le=typeof l.options.getNextPageParam>"u",ye=y&&C[0]?y(C[0],0,C):!0;H=ye?V([],Le,E[0]):Promise.resolve($([],E[0],C[0]));for(var Se=function(P){H=H.then(function(oe){var R=y&&C[P]?y(C[P],P,C):!0;if(R){var Q=Le?E[P]:hy(l.options,oe);return V(oe,Le,Q)}return Promise.resolve($(oe,E[P],C[P]))})},B=1;B<C.length;B++)Se(B)})();var Re=H.then(function(Le){return{pages:Le,pageParams:_}}),ge=Re;return ge.cancel=function(){O=!0,A==null||A.abort(),io(H)&&H.cancel()},Re}}}}function hy(n,l){return n.getNextPageParam==null?void 0:n.getNextPageParam(l[l.length-1],l)}function cS(n,l){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(l[0],l)}var fS=function(){function n(r){r===void 0&&(r={}),this.queryCache=r.queryCache||new iS,this.mutationCache=r.mutationCache||new Uv,this.defaultOptions=r.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var l=n.prototype;return l.mount=function(){var s=this;this.unsubscribeFocus=ur.subscribe(function(){ur.isFocused()&&Xu.isOnline()&&(s.mutationCache.onFocus(),s.queryCache.onFocus())}),this.unsubscribeOnline=Xu.subscribe(function(){ur.isFocused()&&Xu.isOnline()&&(s.mutationCache.onOnline(),s.queryCache.onOnline())})},l.unmount=function(){var s,u;(s=this.unsubscribeFocus)==null||s.call(this),(u=this.unsubscribeOnline)==null||u.call(this)},l.isFetching=function(s,u){var o=ol(s,u),d=o[0];return d.fetching=!0,this.queryCache.findAll(d).length},l.isMutating=function(s){return this.mutationCache.findAll(Ee({},s,{fetching:!0})).length},l.getQueryData=function(s,u){var o;return(o=this.queryCache.find(s,u))==null?void 0:o.state.data},l.getQueriesData=function(s){return this.getQueryCache().findAll(s).map(function(u){var o=u.queryKey,d=u.state,m=d.data;return[o,m]})},l.setQueryData=function(s,u,o){var d=Gu(s),m=this.defaultQueryOptions(d);return this.queryCache.build(this,m).setData(u,o)},l.setQueriesData=function(s,u,o){var d=this;return Pe.batch(function(){return d.getQueryCache().findAll(s).map(function(m){var y=m.queryKey;return[y,d.setQueryData(y,u,o)]})})},l.getQueryState=function(s,u){var o;return(o=this.queryCache.find(s,u))==null?void 0:o.state},l.removeQueries=function(s,u){var o=ol(s,u),d=o[0],m=this.queryCache;Pe.batch(function(){m.findAll(d).forEach(function(y){m.remove(y)})})},l.resetQueries=function(s,u,o){var d=this,m=ol(s,u,o),y=m[0],p=m[1],b=this.queryCache,g=Ee({},y,{active:!0});return Pe.batch(function(){return b.findAll(y).forEach(function(w){w.reset()}),d.refetchQueries(g,p)})},l.cancelQueries=function(s,u,o){var d=this,m=ol(s,u,o),y=m[0],p=m[1],b=p===void 0?{}:p;typeof b.revert>"u"&&(b.revert=!0);var g=Pe.batch(function(){return d.queryCache.findAll(y).map(function(w){return w.cancel(b)})});return Promise.all(g).then(_t).catch(_t)},l.invalidateQueries=function(s,u,o){var d,m,y,p=this,b=ol(s,u,o),g=b[0],w=b[1],C=Ee({},g,{active:(d=(m=g.refetchActive)!=null?m:g.active)!=null?d:!0,inactive:(y=g.refetchInactive)!=null?y:!1});return Pe.batch(function(){return p.queryCache.findAll(g).forEach(function(E){E.invalidate()}),p.refetchQueries(C,w)})},l.refetchQueries=function(s,u,o){var d=this,m=ol(s,u,o),y=m[0],p=m[1],b=Pe.batch(function(){return d.queryCache.findAll(y).map(function(w){return w.fetch(void 0,Ee({},p,{meta:{refetchPage:y==null?void 0:y.refetchPage}}))})}),g=Promise.all(b).then(_t);return p!=null&&p.throwOnError||(g=g.catch(_t)),g},l.fetchQuery=function(s,u,o){var d=Gu(s,u,o),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(s,u,o){return this.fetchQuery(s,u,o).then(_t).catch(_t)},l.fetchInfiniteQuery=function(s,u,o){var d=Gu(s,u,o);return d.behavior=oS(),this.fetchQuery(d)},l.prefetchInfiniteQuery=function(s,u,o){return this.fetchInfiniteQuery(s,u,o).then(_t).catch(_t)},l.cancelMutations=function(){var s=this,u=Pe.batch(function(){return s.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(u).then(_t).catch(_t)},l.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},l.executeMutation=function(s){return this.mutationCache.build(this,s).execute()},l.getQueryCache=function(){return this.queryCache},l.getMutationCache=function(){return this.mutationCache},l.getDefaultOptions=function(){return this.defaultOptions},l.setDefaultOptions=function(s){this.defaultOptions=s},l.setQueryDefaults=function(s,u){var o=this.queryDefaults.find(function(d){return Ql(s)===Ql(d.queryKey)});o?o.defaultOptions=u:this.queryDefaults.push({queryKey:s,defaultOptions:u})},l.getQueryDefaults=function(s){var u;return s?(u=this.queryDefaults.find(function(o){return lo(s,o.queryKey)}))==null?void 0:u.defaultOptions:void 0},l.setMutationDefaults=function(s,u){var o=this.mutationDefaults.find(function(d){return Ql(s)===Ql(d.mutationKey)});o?o.defaultOptions=u:this.mutationDefaults.push({mutationKey:s,defaultOptions:u})},l.getMutationDefaults=function(s){var u;return s?(u=this.mutationDefaults.find(function(o){return lo(s,o.mutationKey)}))==null?void 0:u.defaultOptions:void 0},l.defaultQueryOptions=function(s){if(s!=null&&s._defaulted)return s;var u=Ee({},this.defaultOptions.queries,this.getQueryDefaults(s==null?void 0:s.queryKey),s,{_defaulted:!0});return!u.queryHash&&u.queryKey&&(u.queryHash=kd(u.queryKey,u)),u},l.defaultQueryObserverOptions=function(s){return this.defaultQueryOptions(s)},l.defaultMutationOptions=function(s){return s!=null&&s._defaulted?s:Ee({},this.defaultOptions.mutations,this.getMutationDefaults(s==null?void 0:s.mutationKey),s,{_defaulted:!0})},l.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),dS=function(n){Xs(l,n);function l(s,u){var o;return o=n.call(this)||this,o.client=s,o.options=u,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(u),o}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),my(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},r.onUnsubscribe=function(){this.listeners.length||this.destroy()},r.shouldFetchOnReconnect=function(){return vd(this.currentQuery,this.options,this.options.refetchOnReconnect)},r.shouldFetchOnWindowFocus=function(){return vd(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},r.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},r.setOptions=function(u,o){var d=this.options,m=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(u),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&&py(this.currentQuery,m,this.options,d)&&this.executeFetch(),this.updateResult(o),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(u){var o=this.client.defaultQueryObserverOptions(u),d=this.client.getQueryCache().build(this.client,o);return this.createResult(d,o)},r.getCurrentResult=function(){return this.currentResult},r.trackResult=function(u,o){var d=this,m={},y=function(b){d.trackedProps.includes(b)||d.trackedProps.push(b)};return Object.keys(u).forEach(function(p){Object.defineProperty(m,p,{configurable:!1,enumerable:!0,get:function(){return y(p),u[p]}})}),(o.useErrorBoundary||o.suspense)&&y("error"),m},r.getNextResult=function(u){var o=this;return new Promise(function(d,m){var y=o.subscribe(function(p){p.isFetching||(y(),p.isError&&(u!=null&&u.throwOnError)?m(p.error):d(p))})})},r.getCurrentQuery=function(){return this.currentQuery},r.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},r.refetch=function(u){return this.fetch(Ee({},u,{meta:{refetchPage:u==null?void 0:u.refetchPage}}))},r.fetchOptimistic=function(u){var o=this,d=this.client.defaultQueryObserverOptions(u),m=this.client.getQueryCache().build(this.client,d);return m.fetch().then(function(){return o.createResult(m,d)})},r.fetch=function(u){var o=this;return this.executeFetch(u).then(function(){return o.updateResult(),o.currentResult})},r.executeFetch=function(u){this.updateQuery();var o=this.currentQuery.fetch(this.options,u);return u!=null&&u.throwOnError||(o=o.catch(_t)),o},r.updateStaleTimeout=function(){var u=this;if(this.clearStaleTimeout(),!(no||this.currentResult.isStale||!pd(this.options.staleTime))){var o=jv(this.currentResult.dataUpdatedAt,this.options.staleTime),d=o+1;this.staleTimeoutId=setTimeout(function(){u.currentResult.isStale||u.updateResult()},d)}},r.computeRefetchInterval=function(){var u;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(u=this.options.refetchInterval)!=null?u:!1},r.updateRefetchInterval=function(u){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=u,!(no||this.options.enabled===!1||!pd(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||ur.isFocused())&&o.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(u,o){var d=this.currentQuery,m=this.options,y=this.currentResult,p=this.currentResultState,b=this.currentResultOptions,g=u!==d,w=g?u.state:this.currentQueryInitialState,C=g?this.currentResult:this.previousQueryResult,E=u.state,A=E.dataUpdatedAt,N=E.error,_=E.errorUpdatedAt,O=E.isFetching,T=E.status,$=!1,V=!1,H;if(o.optimisticResults){var G=this.hasListeners(),Z=!G&&my(u,o),te=G&&py(u,d,o,m);(Z||te)&&(O=!0,A||(T="loading"))}if(o.keepPreviousData&&!E.dataUpdateCount&&(C!=null&&C.isSuccess)&&T!=="error")H=C.data,A=C.dataUpdatedAt,T=C.status,$=!0;else if(o.select&&typeof E.data<"u")if(y&&E.data===(p==null?void 0:p.data)&&o.select===this.selectFn)H=this.selectResult;else try{this.selectFn=o.select,H=o.select(E.data),o.structuralSharing!==!1&&(H=so(y==null?void 0:y.data,H)),this.selectResult=H,this.selectError=null}catch(ge){ro().error(ge),this.selectError=ge}else H=E.data;if(typeof o.placeholderData<"u"&&typeof H>"u"&&(T==="loading"||T==="idle")){var pe;if(y!=null&&y.isPlaceholderData&&o.placeholderData===(b==null?void 0:b.placeholderData))pe=y.data;else if(pe=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof pe<"u")try{pe=o.select(pe),o.structuralSharing!==!1&&(pe=so(y==null?void 0:y.data,pe)),this.selectError=null}catch(ge){ro().error(ge),this.selectError=ge}typeof pe<"u"&&(T="success",H=pe,V=!0)}this.selectError&&(N=this.selectError,H=this.selectResult,_=Date.now(),T="error");var Re={status:T,isLoading:T==="loading",isSuccess:T==="success",isError:T==="error",isIdle:T==="idle",data:H,dataUpdatedAt:A,error:N,errorUpdatedAt:_,failureCount:E.fetchFailureCount,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>w.dataUpdateCount||E.errorUpdateCount>w.errorUpdateCount,isFetching:O,isRefetching:O&&T!=="loading",isLoadingError:T==="error"&&E.dataUpdatedAt===0,isPlaceholderData:V,isPreviousData:$,isRefetchError:T==="error"&&E.dataUpdatedAt!==0,isStale:Hd(u,o),refetch:this.refetch,remove:this.remove};return Re},r.shouldNotifyListeners=function(u,o){if(!o)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(u).some(function(b){var g=b,w=u[g]!==o[g],C=p==null?void 0:p.some(function(A){return A===b}),E=y==null?void 0:y.some(function(A){return A===b});return w&&!E&&(!p||C)})},r.updateResult=function(u){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!I2(this.currentResult,o)){var d={cache:!0};(u==null?void 0:u.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(d.listeners=!0),this.notify(Ee({},d,u))}},r.updateQuery=function(){var u=this.client.getQueryCache().build(this.client,this.options);if(u!==this.currentQuery){var o=this.currentQuery;this.currentQuery=u,this.currentQueryInitialState=u.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),u.addObserver(this))}},r.onQueryUpdate=function(u){var o={};u.type==="success"?o.onSuccess=!0:u.type==="error"&&!Zu(u.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},r.notify=function(u){var o=this;Pe.batch(function(){u.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):u.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),u.listeners&&o.listeners.forEach(function(d){d(o.currentResult)}),u.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},l}(Zs);function hS(n,l){return l.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&l.retryOnMount===!1)}function my(n,l){return hS(n,l)||n.state.dataUpdatedAt>0&&vd(n,l,l.refetchOnMount)}function vd(n,l,r){if(l.enabled!==!1){var s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&Hd(n,l)}return!1}function py(n,l,r,s){return r.enabled!==!1&&(n!==l||s.enabled===!1)&&(!r.suspense||n.state.status!=="error")&&Hd(n,r)}function Hd(n,l){return n.isStaleByTime(l.staleTime)}var mS=function(n){Xs(l,n);function l(s,u){var o;return o=n.call(this)||this,o.client=s,o.setOptions(u),o.bindMethods(),o.updateResult(),o}var r=l.prototype;return r.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},r.setOptions=function(u){this.options=this.client.defaultMutationOptions(u)},r.onUnsubscribe=function(){if(!this.listeners.length){var u;(u=this.currentMutation)==null||u.removeObserver(this)}},r.onMutationUpdate=function(u){this.updateResult();var o={listeners:!0};u.type==="success"?o.onSuccess=!0:u.type==="error"&&(o.onError=!0),this.notify(o)},r.getCurrentResult=function(){return this.currentResult},r.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},r.mutate=function(u,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Ee({},this.options,{variables:typeof u<"u"?u:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},r.updateResult=function(){var u=this.currentMutation?this.currentMutation.state:Mv(),o=Ee({},u,{isLoading:u.status==="loading",isSuccess:u.status==="success",isError:u.status==="error",isIdle:u.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},r.notify=function(u){var o=this;Pe.batch(function(){o.mutateOptions&&(u.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):u.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),u.listeners&&o.listeners.forEach(function(d){d(o.currentResult)})})},l}(Zs),pS=G2.unstable_batchedUpdates;Pe.setBatchNotifyFunction(pS);var yS=console;lS(yS);var yy=Ke.createContext(void 0),Lv=Ke.createContext(!1);function qv(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=yy),window.ReactQueryClientContext):yy}var zv=function(){var l=Ke.useContext(qv(Ke.useContext(Lv)));if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},vS=function(l){var r=l.client,s=l.contextSharing,u=s===void 0?!1:s,o=l.children;Ke.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]);var d=qv(u);return Ke.createElement(Lv.Provider,{value:u},Ke.createElement(d.Provider,{value:r},o))};function bS(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var gS=Ke.createContext(bS()),xS=function(){return Ke.useContext(gS)};function Bv(n,l,r){return typeof l=="function"?l.apply(void 0,r):typeof l=="boolean"?l:!!n}function qt(n,l,r){var s=Ke.useRef(!1),u=Ke.useState(0),o=u[1],d=Z2(n,l,r),m=zv(),y=Ke.useRef();y.current?y.current.setOptions(d):y.current=new mS(m,d);var p=y.current.getCurrentResult();Ke.useEffect(function(){s.current=!0;var g=y.current.subscribe(Pe.batchCalls(function(){s.current&&o(function(w){return w+1})}));return function(){s.current=!1,g()}},[]);var b=Ke.useCallback(function(g,w){y.current.mutate(g,w).catch(_t)},[]);if(p.error&&Bv(void 0,y.current.options.useErrorBoundary,[p.error]))throw p.error;return Ee({},p,{mutate:b,mutateAsync:p.mutate})}function SS(n,l){var r=Ke.useRef(!1),s=Ke.useState(0),u=s[1],o=zv(),d=xS(),m=o.defaultQueryObserverOptions(n);m.optimisticResults=!0,m.onError&&(m.onError=Pe.batchCalls(m.onError)),m.onSuccess&&(m.onSuccess=Pe.batchCalls(m.onSuccess)),m.onSettled&&(m.onSettled=Pe.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(o,m)}),p=y[0],b=p.getOptimisticResult(m);if(Ke.useEffect(function(){r.current=!0,d.clearReset();var g=p.subscribe(Pe.batchCalls(function(){r.current&&u(function(w){return w+1})}));return p.updateResult(),function(){r.current=!1,g()}},[d,p]),Ke.useEffect(function(){p.setOptions(m,{listeners:!1})},[m,p]),m.suspense&&b.isLoading)throw p.fetchOptimistic(m).then(function(g){var w=g.data;m.onSuccess==null||m.onSuccess(w),m.onSettled==null||m.onSettled(w,null)}).catch(function(g){d.clearReset(),m.onError==null||m.onError(g),m.onSettled==null||m.onSettled(void 0,g)});if(b.isError&&!d.isReset()&&!b.isFetching&&Bv(m.suspense,m.useErrorBoundary,[b.error,p.getCurrentQuery()]))throw b.error;return m.notifyOnChangeProps==="tracked"&&(b=p.trackResult(b,m)),b}function Wt(n,l,r){var s=Gu(n,l,r);return SS(s,dS)}function kv(n,l){return function(){return n.apply(l,arguments)}}const{toString:wS}=Object.prototype,{getPrototypeOf:Qd}=Object,{iterator:xo,toStringTag:Hv}=Symbol,So=(n=>l=>{const r=wS.call(l);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kn=n=>(n=n.toLowerCase(),l=>So(l)===n),wo=n=>l=>typeof l===n,{isArray:Js}=Array,dr=wo("undefined");function ES(n){return n!==null&&!dr(n)&&n.constructor!==null&&!dr(n.constructor)&&Jt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Qv=kn("ArrayBuffer");function CS(n){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(n):l=n&&n.buffer&&Qv(n.buffer),l}const _S=wo("string"),Jt=wo("function"),$v=wo("number"),Eo=n=>n!==null&&typeof n=="object",NS=n=>n===!0||n===!1,Ju=n=>{if(So(n)!=="object")return!1;const l=Qd(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Hv in n)&&!(xo in n)},jS=kn("Date"),AS=kn("File"),TS=kn("Blob"),RS=kn("FileList"),OS=n=>Eo(n)&&Jt(n.pipe),DS=n=>{let l;return n&&(typeof FormData=="function"&&n instanceof FormData||Jt(n.append)&&((l=So(n))==="formdata"||l==="object"&&Jt(n.toString)&&n.toString()==="[object FormData]"))},MS=kn("URLSearchParams"),[US,LS,qS,zS]=["ReadableStream","Request","Response","Headers"].map(kn),BS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function br(n,l,{allOwnKeys:r=!1}={}){if(n===null||typeof n>"u")return;let s,u;if(typeof n!="object"&&(n=[n]),Js(n))for(s=0,u=n.length;s<u;s++)l.call(null,n[s],s,n);else{const o=r?Object.getOwnPropertyNames(n):Object.keys(n),d=o.length;let m;for(s=0;s<d;s++)m=o[s],l.call(null,n[m],m,n)}}function Yv(n,l){l=l.toLowerCase();const r=Object.keys(n);let s=r.length,u;for(;s-- >0;)if(u=r[s],l===u.toLowerCase())return u;return null}const $l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vv=n=>!dr(n)&&n!==$l;function bd(){const{caseless:n}=Vv(this)&&this||{},l={},r=(s,u)=>{const o=n&&Yv(l,u)||u;Ju(l[o])&&Ju(s)?l[o]=bd(l[o],s):Ju(s)?l[o]=bd({},s):Js(s)?l[o]=s.slice():l[o]=s};for(let s=0,u=arguments.length;s<u;s++)arguments[s]&&br(arguments[s],r);return l}const kS=(n,l,r,{allOwnKeys:s}={})=>(br(l,(u,o)=>{r&&Jt(u)?n[o]=kv(u,r):n[o]=u},{allOwnKeys:s}),n),HS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),QS=(n,l,r,s)=>{n.prototype=Object.create(l.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:l.prototype}),r&&Object.assign(n.prototype,r)},$S=(n,l,r,s)=>{let u,o,d;const m={};if(l=l||{},n==null)return l;do{for(u=Object.getOwnPropertyNames(n),o=u.length;o-- >0;)d=u[o],(!s||s(d,n,l))&&!m[d]&&(l[d]=n[d],m[d]=!0);n=r!==!1&&Qd(n)}while(n&&(!r||r(n,l))&&n!==Object.prototype);return l},YS=(n,l,r)=>{n=String(n),(r===void 0||r>n.length)&&(r=n.length),r-=l.length;const s=n.indexOf(l,r);return s!==-1&&s===r},VS=n=>{if(!n)return null;if(Js(n))return n;let l=n.length;if(!$v(l))return null;const r=new Array(l);for(;l-- >0;)r[l]=n[l];return r},KS=(n=>l=>n&&l instanceof n)(typeof Uint8Array<"u"&&Qd(Uint8Array)),FS=(n,l)=>{const s=(n&&n[xo]).call(n);let u;for(;(u=s.next())&&!u.done;){const o=u.value;l.call(n,o[0],o[1])}},GS=(n,l)=>{let r;const s=[];for(;(r=n.exec(l))!==null;)s.push(r);return s},XS=kn("HTMLFormElement"),ZS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,u){return s.toUpperCase()+u}),vy=(({hasOwnProperty:n})=>(l,r)=>n.call(l,r))(Object.prototype),JS=kn("RegExp"),Kv=(n,l)=>{const r=Object.getOwnPropertyDescriptors(n),s={};br(r,(u,o)=>{let d;(d=l(u,o,n))!==!1&&(s[o]=d||u)}),Object.defineProperties(n,s)},PS=n=>{Kv(n,(l,r)=>{if(Jt(n)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=n[r];if(Jt(s)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},IS=(n,l)=>{const r={},s=u=>{u.forEach(o=>{r[o]=!0})};return Js(n)?s(n):s(String(n).split(l)),r},WS=()=>{},ew=(n,l)=>n!=null&&Number.isFinite(n=+n)?n:l;function tw(n){return!!(n&&Jt(n.append)&&n[Hv]==="FormData"&&n[xo])}const nw=n=>{const l=new Array(10),r=(s,u)=>{if(Eo(s)){if(l.indexOf(s)>=0)return;if(!("toJSON"in s)){l[u]=s;const o=Js(s)?[]:{};return br(s,(d,m)=>{const y=r(d,u+1);!dr(y)&&(o[m]=y)}),l[u]=void 0,o}}return s};return r(n,0)},aw=kn("AsyncFunction"),lw=n=>n&&(Eo(n)||Jt(n))&&Jt(n.then)&&Jt(n.catch),Fv=((n,l)=>n?setImmediate:l?((r,s)=>($l.addEventListener("message",({source:u,data:o})=>{u===$l&&o===r&&s.length&&s.shift()()},!1),u=>{s.push(u),$l.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Jt($l.postMessage)),sw=typeof queueMicrotask<"u"?queueMicrotask.bind($l):typeof process<"u"&&process.nextTick||Fv,iw=n=>n!=null&&Jt(n[xo]),k={isArray:Js,isArrayBuffer:Qv,isBuffer:ES,isFormData:DS,isArrayBufferView:CS,isString:_S,isNumber:$v,isBoolean:NS,isObject:Eo,isPlainObject:Ju,isReadableStream:US,isRequest:LS,isResponse:qS,isHeaders:zS,isUndefined:dr,isDate:jS,isFile:AS,isBlob:TS,isRegExp:JS,isFunction:Jt,isStream:OS,isURLSearchParams:MS,isTypedArray:KS,isFileList:RS,forEach:br,merge:bd,extend:kS,trim:BS,stripBOM:HS,inherits:QS,toFlatObject:$S,kindOf:So,kindOfTest:kn,endsWith:YS,toArray:VS,forEachEntry:FS,matchAll:GS,isHTMLForm:XS,hasOwnProperty:vy,hasOwnProp:vy,reduceDescriptors:Kv,freezeMethods:PS,toObjectSet:IS,toCamelCase:ZS,noop:WS,toFiniteNumber:ew,findKey:Yv,global:$l,isContextDefined:Vv,isSpecCompliantForm:tw,toJSONObject:nw,isAsyncFn:aw,isThenable:lw,setImmediate:Fv,asap:sw,isIterable:iw};function ve(n,l,r,s,u){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),s&&(this.request=s),u&&(this.response=u,this.status=u.status?u.status:null)}k.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:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Gv=ve.prototype,Xv={};["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=>{Xv[n]={value:n}});Object.defineProperties(ve,Xv);Object.defineProperty(Gv,"isAxiosError",{value:!0});ve.from=(n,l,r,s,u,o)=>{const d=Object.create(Gv);return k.toFlatObject(n,d,function(y){return y!==Error.prototype},m=>m!=="isAxiosError"),ve.call(d,n.message,l,r,s,u),d.cause=n,d.name=n.name,o&&Object.assign(d,o),d};const rw=null;function gd(n){return k.isPlainObject(n)||k.isArray(n)}function Zv(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function by(n,l,r){return n?n.concat(l).map(function(u,o){return u=Zv(u),!r&&o?"["+u+"]":u}).join(r?".":""):l}function uw(n){return k.isArray(n)&&!n.some(gd)}const ow=k.toFlatObject(k,{},null,function(l){return/^is[A-Z]/.test(l)});function Co(n,l,r){if(!k.isObject(n))throw new TypeError("target must be an object");l=l||new FormData,r=k.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,N){return!k.isUndefined(N[A])});const s=r.metaTokens,u=r.visitor||b,o=r.dots,d=r.indexes,y=(r.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(l);if(!k.isFunction(u))throw new TypeError("visitor must be a function");function p(E){if(E===null)return"";if(k.isDate(E))return E.toISOString();if(!y&&k.isBlob(E))throw new ve("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(E)||k.isTypedArray(E)?y&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function b(E,A,N){let _=E;if(E&&!N&&typeof E=="object"){if(k.endsWith(A,"{}"))A=s?A:A.slice(0,-2),E=JSON.stringify(E);else if(k.isArray(E)&&uw(E)||(k.isFileList(E)||k.endsWith(A,"[]"))&&(_=k.toArray(E)))return A=Zv(A),_.forEach(function(T,$){!(k.isUndefined(T)||T===null)&&l.append(d===!0?by([A],$,o):d===null?A:A+"[]",p(T))}),!1}return gd(E)?!0:(l.append(by(N,A,o),p(E)),!1)}const g=[],w=Object.assign(ow,{defaultVisitor:b,convertValue:p,isVisitable:gd});function C(E,A){if(!k.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+A.join("."));g.push(E),k.forEach(E,function(_,O){(!(k.isUndefined(_)||_===null)&&u.call(l,_,k.isString(O)?O.trim():O,A,w))===!0&&C(_,A?A.concat(O):[O])}),g.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return C(n),l}function gy(n){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return l[s]})}function $d(n,l){this._pairs=[],n&&Co(n,this,l)}const Jv=$d.prototype;Jv.append=function(l,r){this._pairs.push([l,r])};Jv.toString=function(l){const r=l?function(s){return l.call(this,s,gy)}:gy;return this._pairs.map(function(u){return r(u[0])+"="+r(u[1])},"").join("&")};function cw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pv(n,l,r){if(!l)return n;const s=r&&r.encode||cw;k.isFunction(r)&&(r={serialize:r});const u=r&&r.serialize;let o;if(u?o=u(l,r):o=k.isURLSearchParams(l)?l.toString():new $d(l,r).toString(s),o){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}class xy{constructor(){this.handlers=[]}use(l,r,s){return this.handlers.push({fulfilled:l,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){k.forEach(this.handlers,function(s){s!==null&&l(s)})}}const Iv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fw=typeof URLSearchParams<"u"?URLSearchParams:$d,dw=typeof FormData<"u"?FormData:null,hw=typeof Blob<"u"?Blob:null,mw={isBrowser:!0,classes:{URLSearchParams:fw,FormData:dw,Blob:hw},protocols:["http","https","file","blob","url","data"]},Yd=typeof window<"u"&&typeof document<"u",xd=typeof navigator=="object"&&navigator||void 0,pw=Yd&&(!xd||["ReactNative","NativeScript","NS"].indexOf(xd.product)<0),yw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vw=Yd&&window.location.href||"http://localhost",bw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yd,hasStandardBrowserEnv:pw,hasStandardBrowserWebWorkerEnv:yw,navigator:xd,origin:vw},Symbol.toStringTag,{value:"Module"})),Mt={...bw,...mw};function gw(n,l){return Co(n,new Mt.classes.URLSearchParams,Object.assign({visitor:function(r,s,u,o){return Mt.isNode&&k.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},l))}function xw(n){return k.matchAll(/\w+|\[(\w*)]/g,n).map(l=>l[0]==="[]"?"":l[1]||l[0])}function Sw(n){const l={},r=Object.keys(n);let s;const u=r.length;let o;for(s=0;s<u;s++)o=r[s],l[o]=n[o];return l}function Wv(n){function l(r,s,u,o){let d=r[o++];if(d==="__proto__")return!0;const m=Number.isFinite(+d),y=o>=r.length;return d=!d&&k.isArray(u)?u.length:d,y?(k.hasOwnProp(u,d)?u[d]=[u[d],s]:u[d]=s,!m):((!u[d]||!k.isObject(u[d]))&&(u[d]=[]),l(r,s,u[d],o)&&k.isArray(u[d])&&(u[d]=Sw(u[d])),!m)}if(k.isFormData(n)&&k.isFunction(n.entries)){const r={};return k.forEachEntry(n,(s,u)=>{l(xw(s),u,r,0)}),r}return null}function ww(n,l,r){if(k.isString(n))try{return(l||JSON.parse)(n),k.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(n)}const gr={transitional:Iv,adapter:["xhr","http","fetch"],transformRequest:[function(l,r){const s=r.getContentType()||"",u=s.indexOf("application/json")>-1,o=k.isObject(l);if(o&&k.isHTMLForm(l)&&(l=new FormData(l)),k.isFormData(l))return u?JSON.stringify(Wv(l)):l;if(k.isArrayBuffer(l)||k.isBuffer(l)||k.isStream(l)||k.isFile(l)||k.isBlob(l)||k.isReadableStream(l))return l;if(k.isArrayBufferView(l))return l.buffer;if(k.isURLSearchParams(l))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let m;if(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return gw(l,this.formSerializer).toString();if((m=k.isFileList(l))||s.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Co(m?{"files[]":l}:l,y&&new y,this.formSerializer)}}return o||u?(r.setContentType("application/json",!1),ww(l)):l}],transformResponse:[function(l){const r=this.transitional||gr.transitional,s=r&&r.forcedJSONParsing,u=this.responseType==="json";if(k.isResponse(l)||k.isReadableStream(l))return l;if(l&&k.isString(l)&&(s&&!this.responseType||u)){const d=!(r&&r.silentJSONParsing)&&u;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:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],n=>{gr.headers[n]={}});const Ew=k.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"]),Cw=n=>{const l={};let r,s,u;return n&&n.split(`
52
- `).forEach(function(d){u=d.indexOf(":"),r=d.substring(0,u).trim().toLowerCase(),s=d.substring(u+1).trim(),!(!r||l[r]&&Ew[r])&&(r==="set-cookie"?l[r]?l[r].push(s):l[r]=[s]:l[r]=l[r]?l[r]+", "+s:s)}),l},Sy=Symbol("internals");function ar(n){return n&&String(n).trim().toLowerCase()}function Pu(n){return n===!1||n==null?n:k.isArray(n)?n.map(Pu):String(n)}function _w(n){const l=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(n);)l[s[1]]=s[2];return l}const Nw=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Pf(n,l,r,s,u){if(k.isFunction(s))return s.call(this,l,r);if(u&&(l=r),!!k.isString(l)){if(k.isString(s))return l.indexOf(s)!==-1;if(k.isRegExp(s))return s.test(l)}}function jw(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,r,s)=>r.toUpperCase()+s)}function Aw(n,l){const r=k.toCamelCase(" "+l);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+r,{value:function(u,o,d){return this[s].call(this,l,u,o,d)},configurable:!0})})}let Pt=class{constructor(l){l&&this.set(l)}set(l,r,s){const u=this;function o(m,y,p){const b=ar(y);if(!b)throw new Error("header name must be a non-empty string");const g=k.findKey(u,b);(!g||u[g]===void 0||p===!0||p===void 0&&u[g]!==!1)&&(u[g||y]=Pu(m))}const d=(m,y)=>k.forEach(m,(p,b)=>o(p,b,y));if(k.isPlainObject(l)||l instanceof this.constructor)d(l,r);else if(k.isString(l)&&(l=l.trim())&&!Nw(l))d(Cw(l),r);else if(k.isObject(l)&&k.isIterable(l)){let m={},y,p;for(const b of l){if(!k.isArray(b))throw TypeError("Object iterator must return a key-value pair");m[p=b[0]]=(y=m[p])?k.isArray(y)?[...y,b[1]]:[y,b[1]]:b[1]}d(m,r)}else l!=null&&o(r,l,s);return this}get(l,r){if(l=ar(l),l){const s=k.findKey(this,l);if(s){const u=this[s];if(!r)return u;if(r===!0)return _w(u);if(k.isFunction(r))return r.call(this,u,s);if(k.isRegExp(r))return r.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,r){if(l=ar(l),l){const s=k.findKey(this,l);return!!(s&&this[s]!==void 0&&(!r||Pf(this,this[s],s,r)))}return!1}delete(l,r){const s=this;let u=!1;function o(d){if(d=ar(d),d){const m=k.findKey(s,d);m&&(!r||Pf(s,s[m],m,r))&&(delete s[m],u=!0)}}return k.isArray(l)?l.forEach(o):o(l),u}clear(l){const r=Object.keys(this);let s=r.length,u=!1;for(;s--;){const o=r[s];(!l||Pf(this,this[o],o,l,!0))&&(delete this[o],u=!0)}return u}normalize(l){const r=this,s={};return k.forEach(this,(u,o)=>{const d=k.findKey(s,o);if(d){r[d]=Pu(u),delete r[o];return}const m=l?jw(o):String(o).trim();m!==o&&delete r[o],r[m]=Pu(u),s[m]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const r=Object.create(null);return k.forEach(this,(s,u)=>{s!=null&&s!==!1&&(r[u]=l&&k.isArray(s)?s.join(", "):s)}),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 s=new this(l);return r.forEach(u=>s.set(u)),s}static accessor(l){const s=(this[Sy]=this[Sy]={accessors:{}}).accessors,u=this.prototype;function o(d){const m=ar(d);s[m]||(Aw(u,d),s[m]=!0)}return k.isArray(l)?l.forEach(o):o(l),this}};Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Pt.prototype,({value:n},l)=>{let r=l[0].toUpperCase()+l.slice(1);return{get:()=>n,set(s){this[r]=s}}});k.freezeMethods(Pt);function If(n,l){const r=this||gr,s=l||r,u=Pt.from(s.headers);let o=s.data;return k.forEach(n,function(m){o=m.call(r,o,u.normalize(),l?l.status:void 0)}),u.normalize(),o}function e1(n){return!!(n&&n.__CANCEL__)}function Ps(n,l,r){ve.call(this,n??"canceled",ve.ERR_CANCELED,l,r),this.name="CanceledError"}k.inherits(Ps,ve,{__CANCEL__:!0});function t1(n,l,r){const s=r.config.validateStatus;!r.status||!s||s(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 Tw(n){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return l&&l[1]||""}function Rw(n,l){n=n||10;const r=new Array(n),s=new Array(n);let u=0,o=0,d;return l=l!==void 0?l:1e3,function(y){const p=Date.now(),b=s[o];d||(d=p),r[u]=y,s[u]=p;let g=o,w=0;for(;g!==u;)w+=r[g++],g=g%n;if(u=(u+1)%n,u===o&&(o=(o+1)%n),p-d<l)return;const C=b&&p-b;return C?Math.round(w*1e3/C):void 0}}function Ow(n,l){let r=0,s=1e3/l,u,o;const d=(p,b=Date.now())=>{r=b,u=null,o&&(clearTimeout(o),o=null),n.apply(null,p)};return[(...p)=>{const b=Date.now(),g=b-r;g>=s?d(p,b):(u=p,o||(o=setTimeout(()=>{o=null,d(u)},s-g)))},()=>u&&d(u)]}const uo=(n,l,r=3)=>{let s=0;const u=Rw(50,250);return Ow(o=>{const d=o.loaded,m=o.lengthComputable?o.total:void 0,y=d-s,p=u(y),b=d<=m;s=d;const g={loaded:d,total:m,progress:m?d/m:void 0,bytes:y,rate:p||void 0,estimated:p&&m&&b?(m-d)/p:void 0,event:o,lengthComputable:m!=null,[l?"download":"upload"]:!0};n(g)},r)},wy=(n,l)=>{const r=n!=null;return[s=>l[0]({lengthComputable:r,total:n,loaded:s}),l[1]]},Ey=n=>(...l)=>k.asap(()=>n(...l)),Dw=Mt.hasStandardBrowserEnv?((n,l)=>r=>(r=new URL(r,Mt.origin),n.protocol===r.protocol&&n.host===r.host&&(l||n.port===r.port)))(new URL(Mt.origin),Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent)):()=>!0,Mw=Mt.hasStandardBrowserEnv?{write(n,l,r,s,u,o){const d=[n+"="+encodeURIComponent(l)];k.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),k.isString(s)&&d.push("path="+s),k.isString(u)&&d.push("domain="+u),o===!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 Lw(n,l){return l?n.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):n}function n1(n,l,r){let s=!Uw(l);return n&&(s||r==!1)?Lw(n,l):l}const Cy=n=>n instanceof Pt?{...n}:n;function Gl(n,l){l=l||{};const r={};function s(p,b,g,w){return k.isPlainObject(p)&&k.isPlainObject(b)?k.merge.call({caseless:w},p,b):k.isPlainObject(b)?k.merge({},b):k.isArray(b)?b.slice():b}function u(p,b,g,w){if(k.isUndefined(b)){if(!k.isUndefined(p))return s(void 0,p,g,w)}else return s(p,b,g,w)}function o(p,b){if(!k.isUndefined(b))return s(void 0,b)}function d(p,b){if(k.isUndefined(b)){if(!k.isUndefined(p))return s(void 0,p)}else return s(void 0,b)}function m(p,b,g){if(g in l)return s(p,b);if(g in n)return s(void 0,p)}const y={url:o,method:o,data:o,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,b,g)=>u(Cy(p),Cy(b),g,!0)};return k.forEach(Object.keys(Object.assign({},n,l)),function(b){const g=y[b]||u,w=g(n[b],l[b],b);k.isUndefined(w)&&g!==m||(r[b]=w)}),r}const a1=n=>{const l=Gl({},n);let{data:r,withXSRFToken:s,xsrfHeaderName:u,xsrfCookieName:o,headers:d,auth:m}=l;l.headers=d=Pt.from(d),l.url=Pv(n1(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(k.isFormData(r)){if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((y=d.getContentType())!==!1){const[p,...b]=y?y.split(";").map(g=>g.trim()).filter(Boolean):[];d.setContentType([p||"multipart/form-data",...b].join("; "))}}if(Mt.hasStandardBrowserEnv&&(s&&k.isFunction(s)&&(s=s(l)),s||s!==!1&&Dw(l.url))){const p=u&&o&&Mw.read(o);p&&d.set(u,p)}return l},qw=typeof XMLHttpRequest<"u",zw=qw&&function(n){return new Promise(function(r,s){const u=a1(n);let o=u.data;const d=Pt.from(u.headers).normalize();let{responseType:m,onUploadProgress:y,onDownloadProgress:p}=u,b,g,w,C,E;function A(){C&&C(),E&&E(),u.cancelToken&&u.cancelToken.unsubscribe(b),u.signal&&u.signal.removeEventListener("abort",b)}let N=new XMLHttpRequest;N.open(u.method.toUpperCase(),u.url,!0),N.timeout=u.timeout;function _(){if(!N)return;const T=Pt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),V={data:!m||m==="text"||m==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:T,config:n,request:N};t1(function(G){r(G),A()},function(G){s(G),A()},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&&(s(new ve("Request aborted",ve.ECONNABORTED,n,N)),N=null)},N.onerror=function(){s(new ve("Network Error",ve.ERR_NETWORK,n,N)),N=null},N.ontimeout=function(){let $=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const V=u.transitional||Iv;u.timeoutErrorMessage&&($=u.timeoutErrorMessage),s(new ve($,V.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,n,N)),N=null},o===void 0&&d.setContentType(null),"setRequestHeader"in N&&k.forEach(d.toJSON(),function($,V){N.setRequestHeader(V,$)}),k.isUndefined(u.withCredentials)||(N.withCredentials=!!u.withCredentials),m&&m!=="json"&&(N.responseType=u.responseType),p&&([w,E]=uo(p,!0),N.addEventListener("progress",w)),y&&N.upload&&([g,C]=uo(y),N.upload.addEventListener("progress",g),N.upload.addEventListener("loadend",C)),(u.cancelToken||u.signal)&&(b=T=>{N&&(s(!T||T.type?new Ps(null,n,N):T),N.abort(),N=null)},u.cancelToken&&u.cancelToken.subscribe(b),u.signal&&(u.signal.aborted?b():u.signal.addEventListener("abort",b)));const O=Tw(u.url);if(O&&Mt.protocols.indexOf(O)===-1){s(new ve("Unsupported protocol "+O+":",ve.ERR_BAD_REQUEST,n));return}N.send(o||null)})},Bw=(n,l)=>{const{length:r}=n=n?n.filter(Boolean):[];if(l||r){let s=new AbortController,u;const o=function(p){if(!u){u=!0,m();const b=p instanceof Error?p:this.reason;s.abort(b instanceof ve?b:new Ps(b instanceof Error?b.message:b))}};let d=l&&setTimeout(()=>{d=null,o(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(o):p.removeEventListener("abort",o)}),n=null)};n.forEach(p=>p.addEventListener("abort",o));const{signal:y}=s;return y.unsubscribe=()=>k.asap(m),y}},kw=function*(n,l){let r=n.byteLength;if(r<l){yield n;return}let s=0,u;for(;s<r;)u=s+l,yield n.slice(s,u),s=u},Hw=async function*(n,l){for await(const r of Qw(n))yield*kw(r,l)},Qw=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const l=n.getReader();try{for(;;){const{done:r,value:s}=await l.read();if(r)break;yield s}}finally{await l.cancel()}},_y=(n,l,r,s)=>{const u=Hw(n,l);let o=0,d,m=y=>{d||(d=!0,s&&s(y))};return new ReadableStream({async pull(y){try{const{done:p,value:b}=await u.next();if(p){m(),y.close();return}let g=b.byteLength;if(r){let w=o+=g;r(w)}y.enqueue(new Uint8Array(b))}catch(p){throw m(p),p}},cancel(y){return m(y),u.return()}},{highWaterMark:2})},_o=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",l1=_o&&typeof ReadableStream=="function",$w=_o&&(typeof TextEncoder=="function"?(n=>l=>n.encode(l))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),s1=(n,...l)=>{try{return!!n(...l)}catch{return!1}},Yw=l1&&s1(()=>{let n=!1;const l=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!l}),Ny=64*1024,Sd=l1&&s1(()=>k.isReadableStream(new Response("").body)),oo={stream:Sd&&(n=>n.body)};_o&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!oo[l]&&(oo[l]=k.isFunction(n[l])?r=>r[l]():(r,s)=>{throw new ve(`Response type '${l}' is not supported`,ve.ERR_NOT_SUPPORT,s)})})})(new Response);const Vw=async n=>{if(n==null)return 0;if(k.isBlob(n))return n.size;if(k.isSpecCompliantForm(n))return(await new Request(Mt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(k.isArrayBufferView(n)||k.isArrayBuffer(n))return n.byteLength;if(k.isURLSearchParams(n)&&(n=n+""),k.isString(n))return(await $w(n)).byteLength},Kw=async(n,l)=>{const r=k.toFiniteNumber(n.getContentLength());return r??Vw(l)},Fw=_o&&(async n=>{let{url:l,method:r,data:s,signal:u,cancelToken:o,timeout:d,onDownloadProgress:m,onUploadProgress:y,responseType:p,headers:b,withCredentials:g="same-origin",fetchOptions:w}=a1(n);p=p?(p+"").toLowerCase():"text";let C=Bw([u,o&&o.toAbortSignal()],d),E;const A=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let N;try{if(y&&Yw&&r!=="get"&&r!=="head"&&(N=await Kw(b,s))!==0){let V=new Request(l,{method:"POST",body:s,duplex:"half"}),H;if(k.isFormData(s)&&(H=V.headers.get("content-type"))&&b.setContentType(H),V.body){const[G,Z]=wy(N,uo(Ey(y)));s=_y(V.body,Ny,G,Z)}}k.isString(g)||(g=g?"include":"omit");const _="credentials"in Request.prototype;E=new Request(l,{...w,signal:C,method:r.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:_?g:void 0});let O=await fetch(E);const T=Sd&&(p==="stream"||p==="response");if(Sd&&(m||T&&A)){const V={};["status","statusText","headers"].forEach(te=>{V[te]=O[te]});const H=k.toFiniteNumber(O.headers.get("content-length")),[G,Z]=m&&wy(H,uo(Ey(m),!0))||[];O=new Response(_y(O.body,Ny,G,()=>{Z&&Z(),A&&A()}),V)}p=p||"text";let $=await oo[k.findKey(oo,p)||"text"](O,n);return!T&&A&&A(),await new Promise((V,H)=>{t1(V,H,{data:$,headers:Pt.from(O.headers),status:O.status,statusText:O.statusText,config:n,request:E})})}catch(_){throw A&&A(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,n,E),{cause:_.cause||_}):ve.from(_,_&&_.code,n,E)}}),wd={http:rw,xhr:zw,fetch:Fw};k.forEach(wd,(n,l)=>{if(n){try{Object.defineProperty(n,"name",{value:l})}catch{}Object.defineProperty(n,"adapterName",{value:l})}});const jy=n=>`- ${n}`,Gw=n=>k.isFunction(n)||n===null||n===!1,i1={getAdapter:n=>{n=k.isArray(n)?n:[n];const{length:l}=n;let r,s;const u={};for(let o=0;o<l;o++){r=n[o];let d;if(s=r,!Gw(r)&&(s=wd[(d=String(r)).toLowerCase()],s===void 0))throw new ve(`Unknown adapter '${d}'`);if(s)break;u[d||"#"+o]=s}if(!s){const o=Object.entries(u).map(([m,y])=>`adapter ${m} `+(y===!1?"is not supported by the environment":"is not available in the build"));let d=l?o.length>1?`since :
54
- `+o.map(jy).join(`
55
- `):" "+jy(o[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return s},adapters:wd};function Wf(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ps(null,n)}function Ay(n){return Wf(n),n.headers=Pt.from(n.headers),n.data=If.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),i1.getAdapter(n.adapter||gr.adapter)(n).then(function(s){return Wf(n),s.data=If.call(n,n.transformResponse,s),s.headers=Pt.from(s.headers),s},function(s){return e1(s)||(Wf(n),s&&s.response&&(s.response.data=If.call(n,n.transformResponse,s.response),s.response.headers=Pt.from(s.response.headers))),Promise.reject(s)})}const r1="1.9.0",No={};["object","boolean","number","function","string","symbol"].forEach((n,l)=>{No[n]=function(s){return typeof s===n||"a"+(l<1?"n ":" ")+n}});const Ty={};No.transitional=function(l,r,s){function u(o,d){return"[Axios v"+r1+"] Transitional option '"+o+"'"+d+(s?". "+s:"")}return(o,d,m)=>{if(l===!1)throw new ve(u(d," has been removed"+(r?" in "+r:"")),ve.ERR_DEPRECATED);return r&&!Ty[d]&&(Ty[d]=!0,console.warn(u(d," has been deprecated since v"+r+" and will be removed in the near future"))),l?l(o,d,m):!0}};No.spelling=function(l){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${l}`),!0)};function Xw(n,l,r){if(typeof n!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let u=s.length;for(;u-- >0;){const o=s[u],d=l[o];if(d){const m=n[o],y=m===void 0||d(m,o,n);if(y!==!0)throw new ve("option "+o+" must be "+y,ve.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ve("Unknown option "+o,ve.ERR_BAD_OPTION)}}const Iu={assertOptions:Xw,validators:No},In=Iu.validators;let Vl=class{constructor(l){this.defaults=l||{},this.interceptors={request:new xy,response:new xy}}async request(l,r){try{return await this._request(l,r)}catch(s){if(s instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const o=u.stack?u.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=`
56
- `+o):s.stack=o}catch{}}throw s}}_request(l,r){typeof l=="string"?(r=r||{},r.url=l):r=l||{},r=Gl(this.defaults,r);const{transitional:s,paramsSerializer:u,headers:o}=r;s!==void 0&&Iu.assertOptions(s,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1),u!=null&&(k.isFunction(u)?r.paramsSerializer={serialize:u}:Iu.assertOptions(u,{encode:In.function,serialize:In.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Iu.assertOptions(r,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d=o&&k.merge(o.common,o[r.method]);o&&k.forEach(["delete","get","head","post","put","patch","common"],E=>{delete o[E]}),r.headers=Pt.concat(d,o);const m=[];let y=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(r)===!1||(y=y&&A.synchronous,m.unshift(A.fulfilled,A.rejected))});const p=[];this.interceptors.response.forEach(function(A){p.push(A.fulfilled,A.rejected)});let b,g=0,w;if(!y){const E=[Ay.bind(this),void 0];for(E.unshift.apply(E,m),E.push.apply(E,p),w=E.length,b=Promise.resolve(r);g<w;)b=b.then(E[g++],E[g++]);return b}w=m.length;let C=r;for(g=0;g<w;){const E=m[g++],A=m[g++];try{C=E(C)}catch(N){A.call(this,N);break}}try{b=Ay.call(this,C)}catch(E){return Promise.reject(E)}for(g=0,w=p.length;g<w;)b=b.then(p[g++],p[g++]);return b}getUri(l){l=Gl(this.defaults,l);const r=n1(l.baseURL,l.url,l.allowAbsoluteUrls);return Pv(r,l.params,l.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(l){Vl.prototype[l]=function(r,s){return this.request(Gl(s||{},{method:l,url:r,data:(s||{}).data}))}});k.forEach(["post","put","patch"],function(l){function r(s){return function(o,d,m){return this.request(Gl(m||{},{method:l,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:d}))}}Vl.prototype[l]=r(),Vl.prototype[l+"Form"]=r(!0)});let Zw=class u1{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const s=this;this.promise.then(u=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](u);s._listeners=null}),this.promise.then=u=>{let o;const d=new Promise(m=>{s.subscribe(m),o=m}).then(u);return d.cancel=function(){s.unsubscribe(o)},d},l(function(o,d,m){s.reason||(s.reason=new Ps(o,d,m),r(s.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=s=>{l.abort(s)};return this.subscribe(r),l.signal.unsubscribe=()=>this.unsubscribe(r),l.signal}static source(){let l;return{token:new u1(function(u){l=u}),cancel:l}}};function Jw(n){return function(r){return n.apply(null,r)}}function Pw(n){return k.isObject(n)&&n.isAxiosError===!0}const Ed={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(Ed).forEach(([n,l])=>{Ed[l]=n});function o1(n){const l=new Vl(n),r=kv(Vl.prototype.request,l);return k.extend(r,Vl.prototype,l,{allOwnKeys:!0}),k.extend(r,l,null,{allOwnKeys:!0}),r.create=function(u){return o1(Gl(n,u))},r}const lt=o1(gr);lt.Axios=Vl;lt.CanceledError=Ps;lt.CancelToken=Zw;lt.isCancel=e1;lt.VERSION=r1;lt.toFormData=Co;lt.AxiosError=ve;lt.Cancel=lt.CanceledError;lt.all=function(l){return Promise.all(l)};lt.spread=Jw;lt.isAxiosError=Pw;lt.mergeConfig=Gl;lt.AxiosHeaders=Pt;lt.formToJSON=n=>Wv(k.isHTMLForm(n)?new FormData(n):n);lt.getAdapter=i1.getAdapter;lt.HttpStatusCode=Ed;lt.default=lt;const{Axios:ij,AxiosError:Iw,CanceledError:rj,isCancel:uj,CancelToken:oj,VERSION:cj,all:fj,Cancel:dj,isAxiosError:co,spread:hj,toFormData:mj,AxiosHeaders:pj,HttpStatusCode:yj,formToJSON:vj,getAdapter:bj,mergeConfig:gj}=lt,Cd="__access_token__",Ww=()=>{try{const n=localStorage.getItem(Cd);return n||void 0}catch{return}},ku=n=>{n?localStorage.setItem(Cd,n):localStorage.removeItem(Cd)};let e3={data:""},t3=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||e3,n3=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a3=/\/\*[^]*?\*\/| +/g,Ry=/\n+/g,cl=(n,l)=>{let r="",s="",u="";for(let o in n){let d=n[o];o[0]=="@"?o[1]=="i"?r=o+" "+d+";":s+=o[1]=="f"?cl(d,o):o+"{"+cl(d,o[1]=="k"?"":l)+"}":typeof d=="object"?s+=cl(d,l?l.replace(/([^,])+/g,m=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,y=>/&/.test(y)?y.replace(/&/g,m):m?m+" "+y:y)):o):d!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),u+=cl.p?cl.p(o,d):o+":"+d+";")}return r+(l&&u?l+"{"+u+"}":u)+s},Aa={},c1=n=>{if(typeof n=="object"){let l="";for(let r in n)l+=r+c1(n[r]);return l}return n},l3=(n,l,r,s,u)=>{let o=c1(n),d=Aa[o]||(Aa[o]=(y=>{let p=0,b=11;for(;p<y.length;)b=101*b+y.charCodeAt(p++)>>>0;return"go"+b})(o));if(!Aa[d]){let y=o!==n?n:(p=>{let b,g,w=[{}];for(;b=n3.exec(p.replace(a3,""));)b[4]?w.shift():b[3]?(g=b[3].replace(Ry," ").trim(),w.unshift(w[0][g]=w[0][g]||{})):w[0][b[1]]=b[2].replace(Ry," ").trim();return w[0]})(n);Aa[d]=cl(u?{["@keyframes "+d]:y}:y,r?"":"."+d)}let m=r&&Aa.g?Aa.g:null;return r&&(Aa.g=Aa[d]),((y,p,b,g)=>{g?p.data=p.data.replace(g,y):p.data.indexOf(y)===-1&&(p.data=b?y+p.data:p.data+y)})(Aa[d],l,s,m),d},s3=(n,l,r)=>n.reduce((s,u,o)=>{let d=l[o];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?"":cl(m,""):m===!1?"":m}return s+u+(d??"")},"");function jo(n){let l=this||{},r=n.call?n(l.p):n;return l3(r.unshift?r.raw?s3(r,[].slice.call(arguments,1),l.p):r.reduce((s,u)=>Object.assign(s,u&&u.call?u(l.p):u),{}):r,t3(l.target),l.g,l.o,l.k)}let f1,_d,Nd;jo.bind({g:1});let Ma=jo.bind({k:1});function i3(n,l,r,s){cl.p=l,f1=n,_d=r,Nd=s}function yl(n,l){let r=this||{};return function(){let s=arguments;function u(o,d){let m=Object.assign({},o),y=m.className||u.className;r.p=Object.assign({theme:_d&&_d()},m),r.o=/ *go\d+/.test(y),m.className=jo.apply(r,s)+(y?" "+y:"");let p=n;return n[0]&&(p=m.as||n,delete m.as),Nd&&p[0]&&Nd(m),f1(p,m)}return u}}var r3=n=>typeof n=="function",fo=(n,l)=>r3(n)?n(l):n,u3=(()=>{let n=0;return()=>(++n).toString()})(),d1=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");n=!l||l.matches}return n}})(),o3=20,h1=(n,l)=>{switch(l.type){case 0:return{...n,toasts:[l.toast,...n.toasts].slice(0,o3)};case 1:return{...n,toasts:n.toasts.map(o=>o.id===l.toast.id?{...o,...l.toast}:o)};case 2:let{toast:r}=l;return h1(n,{type:n.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:s}=l;return{...n,toasts:n.toasts.map(o=>o.id===s||s===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return l.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(o=>o.id!==l.toastId)};case 5:return{...n,pausedAt:l.time};case 6:let u=l.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+u}))}}},Wu=[],Yl={toasts:[],pausedAt:void 0},Pl=n=>{Yl=h1(Yl,n),Wu.forEach(l=>{l(Yl)})},c3={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},f3=(n={})=>{let[l,r]=x.useState(Yl),s=x.useRef(Yl);x.useEffect(()=>(s.current!==Yl&&r(Yl),Wu.push(r),()=>{let o=Wu.indexOf(r);o>-1&&Wu.splice(o,1)}),[]);let u=l.toasts.map(o=>{var d,m,y;return{...n,...n[o.type],...o,removeDelay:o.removeDelay||((d=n[o.type])==null?void 0:d.removeDelay)||(n==null?void 0:n.removeDelay),duration:o.duration||((m=n[o.type])==null?void 0:m.duration)||(n==null?void 0:n.duration)||c3[o.type],style:{...n.style,...(y=n[o.type])==null?void 0:y.style,...o.style}}});return{...l,toasts:u}},d3=(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()}),xr=n=>(l,r)=>{let s=d3(l,n,r);return Pl({type:2,toast:s}),s.id},Qt=(n,l)=>xr("blank")(n,l);Qt.error=xr("error");Qt.success=xr("success");Qt.loading=xr("loading");Qt.custom=xr("custom");Qt.dismiss=n=>{Pl({type:3,toastId:n})};Qt.remove=n=>Pl({type:4,toastId:n});Qt.promise=(n,l,r)=>{let s=Qt.loading(l.loading,{...r,...r==null?void 0:r.loading});return typeof n=="function"&&(n=n()),n.then(u=>{let o=l.success?fo(l.success,u):void 0;return o?Qt.success(o,{id:s,...r,...r==null?void 0:r.success}):Qt.dismiss(s),u}).catch(u=>{let o=l.error?fo(l.error,u):void 0;o?Qt.error(o,{id:s,...r,...r==null?void 0:r.error}):Qt.dismiss(s)}),n};var h3=(n,l)=>{Pl({type:1,toast:{id:n,height:l}})},m3=()=>{Pl({type:5,time:Date.now()})},or=new Map,p3=1e3,y3=(n,l=p3)=>{if(or.has(n))return;let r=setTimeout(()=>{or.delete(n),Pl({type:4,toastId:n})},l);or.set(n,r)},v3=n=>{let{toasts:l,pausedAt:r}=f3(n);x.useEffect(()=>{if(r)return;let o=Date.now(),d=l.map(m=>{if(m.duration===1/0)return;let y=(m.duration||0)+m.pauseDuration-(o-m.createdAt);if(y<0){m.visible&&Qt.dismiss(m.id);return}return setTimeout(()=>Qt.dismiss(m.id),y)});return()=>{d.forEach(m=>m&&clearTimeout(m))}},[l,r]);let s=x.useCallback(()=>{r&&Pl({type:6,time:Date.now()})},[r]),u=x.useCallback((o,d)=>{let{reverseOrder:m=!1,gutter:y=8,defaultPosition:p}=d||{},b=l.filter(C=>(C.position||p)===(o.position||p)&&C.height),g=b.findIndex(C=>C.id===o.id),w=b.filter((C,E)=>E<g&&C.visible).length;return b.filter(C=>C.visible).slice(...m?[w+1]:[0,w]).reduce((C,E)=>C+(E.height||0)+y,0)},[l]);return x.useEffect(()=>{l.forEach(o=>{if(o.dismissed)y3(o.id,o.removeDelay);else{let d=or.get(o.id);d&&(clearTimeout(d),or.delete(o.id))}})},[l]),{toasts:l,handlers:{updateHeight:h3,startPause:m3,endPause:s,calculateOffset:u}}},b3=Ma`
51
+ Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let w=Yt(),C;if(l){let T=typeof l=="string"?Fs(l):l;et(b==="/"||((O=T.pathname)==null?void 0:O.startsWith(b)),`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 "${b}" but pathname "${T.pathname}" was given in the \`location\` prop.`),C=T}else C=w;let E=C.pathname||"/",A=E;if(b!=="/"){let T=b.replace(/^\//,"").split("/");A="/"+E.replace(/^\//,"").split("/").slice(T.length).join("/")}let N=!u&&r&&r.matches&&r.matches.length>0?r.matches:uv(n,{pathname:A});qn(g||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 _=n2(N&&N.map(T=>Object.assign({},T,{params:Object.assign({},y,T.params),pathname:Oa([b,o.encodeLocation?o.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?b:Oa([b,o.encodeLocation?o.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),d,r,s);return l&&_?x.createElement(mr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},_):_}function Ix(){let n=r2(),l=Vx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},u={padding:"2px 4px",backgroundColor:s},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 Wx=x.createElement(Ix,null),e2=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(Ud.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function t2({routeContext:n,match:l,children:r}){let s=x.useContext(Gs);return s&&s.static&&s.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=l.route.id),x.createElement(aa.Provider,{value:n},r)}function n2(n,l=[],r=null,s=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:b,errors:g}=r,w=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!g||g[p.route.id]===void 0);if(p.route.lazy||w){d=!0,m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}return o.reduceRight((y,p,b)=>{let g,w=!1,C=null,E=null;r&&(g=u&&p.route.id?u[p.route.id]:void 0,C=p.route.errorElement||Wx,d&&(m<0&&b===0?(gv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):m===b&&(w=!0,E=p.route.hydrateFallbackElement||null)));let A=l.concat(o.slice(0,b+1)),N=()=>{let _;return g?_=C:w?_=E:p.route.Component?_=x.createElement(p.route.Component,null):p.route.element?_=p.route.element:_=y,x.createElement(t2,{match:p,routeContext:{outlet:y,matches:A,isDataRoute:r!=null},children:_})};return r&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?x.createElement(e2,{location:r.location,revalidation:r.revalidation,component:C,error:g,children:N(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):N()},null)}function Ld(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function a2(n){let l=x.useContext(Gs);return et(l,Ld(n)),l}function l2(n){let l=x.useContext(bu);return et(l,Ld(n)),l}function s2(n){let l=x.useContext(aa);return et(l,Ld(n)),l}function qd(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 i2(){return qd("useRouteId")}function r2(){var s;let n=x.useContext(Ud),l=l2("useRouteError"),r=qd("useRouteError");return n!==void 0?n:(s=l.errors)==null?void 0:s[r]}function o2(){let{router:n}=a2("useNavigate"),l=qd("useNavigate"),r=x.useRef(!1);return vv(()=>{r.current=!0}),x.useCallback(async(o,u={})=>{qn(r.current,yv),r.current&&(typeof o=="number"?n.navigate(o):await n.navigate(o,{fromRouteId:l,...u}))},[n,l])}var ry={};function gv(n,l,r){!l&&!ry[n]&&(ry[n]=!0,qn(!1,r))}x.memo(u2);function u2({routes:n,future:l,state:r}){return bv(n,void 0,r,l)}function rr(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 c2({basename:n="/",children:l=null,location:r,navigationType:s="POP",navigator:o,static:u=!1}){et(!pr(),"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=Fs(r));let{pathname:y="/",search:p="",hash:b="",state:g=null,key:w="default"}=r,C=x.useMemo(()=>{let E=Da(y,d);return E==null?null:{location:{pathname:E,search:p,hash:b,state:g,key:w},navigationType:s}},[d,y,p,b,g,w,s]);return qn(C!=null,`<Router basename="${d}"> is not able to match the URL "${y}${p}${b}" 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(mr.Provider,{children:l,value:C}))}function f2({children:n,location:l}){return Px(dd(n),l)}function dd(n,l=[]){let r=[];return x.Children.forEach(n,(s,o)=>{if(!x.isValidElement(s))return;let u=[...l,o];if(s.type===x.Fragment){r.push.apply(r,dd(s.props.children,u));return}et(s.type===rr,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),et(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||u.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=dd(s.props.children,u)),r.push(d)}),r}var Fo="get",Go="application/x-www-form-urlencoded";function gu(n){return n!=null&&typeof n.tagName=="string"}function d2(n){return gu(n)&&n.tagName.toLowerCase()==="button"}function h2(n){return gu(n)&&n.tagName.toLowerCase()==="form"}function m2(n){return gu(n)&&n.tagName.toLowerCase()==="input"}function p2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function y2(n,l){return n.button===0&&(!l||l==="_self")&&!p2(n)}function hd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,r)=>{let s=n[r];return l.concat(Array.isArray(s)?s.map(o=>[r,o]):[[r,s]])},[]))}function v2(n,l){let r=hd(n);return l&&l.forEach((s,o)=>{r.has(o)||l.getAll(o).forEach(u=>{r.append(o,u)})}),r}var ko=null;function b2(){if(ko===null)try{new FormData(document.createElement("form"),0),ko=!1}catch{ko=!0}return ko}var g2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jf(n){return n!=null&&!g2.has(n)?(qn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Go}"`),null):n}function x2(n,l){let r,s,o,u,d;if(h2(n)){let m=n.getAttribute("action");s=m?Da(m,l):null,r=n.getAttribute("method")||Fo,o=Jf(n.getAttribute("enctype"))||Go,u=new FormData(n)}else if(d2(n)||m2(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(s=y?Da(y,l):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Fo,o=Jf(n.getAttribute("formenctype"))||Jf(m.getAttribute("enctype"))||Go,u=new FormData(m,n),!b2()){let{name:p,type:b,value:g}=n;if(b==="image"){let w=p?`${p}.`:"";u.append(`${w}x`,"0"),u.append(`${w}y`,"0")}else p&&u.append(p,g)}}else{if(gu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Fo,s=null,o=Go,d=n}return u&&o==="text/plain"&&(d=u,u=void 0),{action:s,method:r.toLowerCase(),encType:o,formData:u,body:d}}function zd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}async function S2(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 w2(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 E2(n,l,r){let s=await Promise.all(n.map(async o=>{let u=l.routes[o.route.id];if(u){let d=await S2(u,r);return d.links?d.links():[]}return[]}));return j2(s.flat(1).filter(w2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function oy(n,l,r,s,o,u){let d=(y,p)=>r[p]?y.route.id!==r[p].route.id:!0,m=(y,p)=>{var b;return r[p].pathname!==y.pathname||((b=r[p].route.path)==null?void 0:b.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 g;let b=s.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(d(y,p)||m(y,p))return!0;if(y.route.shouldRevalidate){let w=y.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=r[0])==null?void 0:g.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function C2(n,l,{includeHydrateFallback:r}={}){return _2(n.map(s=>{let o=l.routes[s.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 _2(n){return[...new Set(n)]}function N2(n){let l={},r=Object.keys(n).sort();for(let s of r)l[s]=n[s];return l}function j2(n,l){let r=new Set;return new Set(l),n.reduce((s,o)=>{let u=JSON.stringify(N2(o));return r.has(u)||(r.add(u),s.push({key:u,link:o})),s},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var A2=new Set([100,101,204,205]);function T2(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&&Da(r.pathname,l)==="/"?r.pathname=`${l.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function xv(){let n=x.useContext(Gs);return zd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function R2(){let n=x.useContext(bu);return zd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Bd=x.createContext(void 0);Bd.displayName="FrameworkContext";function Sv(){let n=x.useContext(Bd);return zd(n,"You must render this element inside a <HydratedRouter> element"),n}function O2(n,l){let r=x.useContext(Bd),[s,o]=x.useState(!1),[u,d]=x.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:p,onMouseLeave:b,onTouchStart:g}=l,w=x.useRef(null);x.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let A=_=>{_.forEach(O=>{d(O.isIntersecting)})},N=new IntersectionObserver(A,{threshold:.5});return w.current&&N.observe(w.current),()=>{N.disconnect()}}},[n]),x.useEffect(()=>{if(s){let A=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(A)}}},[s]);let C=()=>{o(!0)},E=()=>{o(!1),d(!1)};return r?n!=="intent"?[u,w,{}]:[u,w,{onFocus:nr(m,C),onBlur:nr(y,E),onMouseEnter:nr(p,C),onMouseLeave:nr(b,E),onTouchStart:nr(g,C)}]:[!1,w,{}]}function nr(n,l){return r=>{n&&n(r),r.defaultPrevented||l(r)}}function D2({page:n,...l}){let{router:r}=xv(),s=x.useMemo(()=>uv(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?x.createElement(U2,{page:n,matches:s,...l}):null}function M2(n){let{manifest:l,routeModules:r}=Sv(),[s,o]=x.useState([]);return x.useEffect(()=>{let u=!1;return E2(n,l,r).then(d=>{u||o(d)}),()=>{u=!0}},[n,l,r]),s}function U2({page:n,matches:l,...r}){let s=Yt(),{manifest:o,routeModules:u}=Sv(),{basename:d}=xv(),{loaderData:m,matches:y}=R2(),p=x.useMemo(()=>oy(n,l,y,o,s,"data"),[n,l,y,o,s]),b=x.useMemo(()=>oy(n,l,y,o,s,"assets"),[n,l,y,o,s]),g=x.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let E=new Set,A=!1;if(l.forEach(_=>{var T;let O=o.routes[_.route.id];!O||!O.hasLoader||(!p.some($=>$.route.id===_.route.id)&&_.route.id in m&&((T=u[_.route.id])!=null&&T.shouldRevalidate)||O.hasClientLoader?A=!0:E.add(_.route.id))}),E.size===0)return[];let N=T2(n,d);return A&&E.size>0&&N.searchParams.set("_routes",l.filter(_=>E.has(_.route.id)).map(_=>_.route.id).join(",")),[N.pathname+N.search]},[d,m,s,o,p,l,n,u]),w=x.useMemo(()=>C2(b,o),[b,o]),C=M2(b);return x.createElement(x.Fragment,null,g.map(E=>x.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),w.map(E=>x.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),C.map(({key:E,link:A})=>x.createElement("link",{key:E,...A})))}function L2(...n){return l=>{n.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var wv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wv&&(window.__reactRouterVersion="7.6.0")}catch{}function q2({basename:n,children:l,window:r}){let s=x.useRef();s.current==null&&(s.current=Sx({window:r,v5Compat:!0}));let o=s.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(c2,{basename:n,children:l,location:u.location,navigationType:u.action,navigator:o})}var Ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cv=x.forwardRef(function({onClick:l,discover:r="render",prefetch:s="none",relative:o,reloadDocument:u,replace:d,state:m,target:y,to:p,preventScrollReset:b,viewTransition:g,...w},C){let{basename:E}=x.useContext(na),A=typeof p=="string"&&Ev.test(p),N,_=!1;if(typeof p=="string"&&A&&(N=p,wv))try{let te=new URL(window.location.href),pe=p.startsWith("//")?new URL(te.protocol+p):new URL(p),Re=Da(pe.pathname,E);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 O=Xx(p,{relative:o}),[T,$,V]=O2(s,w),H=H2(p,{replace:d,state:m,target:y,preventScrollReset:b,relative:o,viewTransition:g});function G(te){l&&l(te),te.defaultPrevented||H(te)}let Z=x.createElement("a",{...w,...V,href:N||O,onClick:_||u?l:G,ref:L2(C,$),target:y,"data-discover":!A&&r==="render"?"true":void 0});return T&&!A?x.createElement(x.Fragment,null,Z,x.createElement(D2,{page:O})):Z});Cv.displayName="Link";var z2=x.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:s="",end:o=!1,style:u,to:d,viewTransition:m,children:y,...p},b){let g=yr(d,{relative:p.relative}),w=Yt(),C=x.useContext(bu),{navigator:E,basename:A}=x.useContext(na),N=C!=null&&F2(g)&&m===!0,_=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,O=w.pathname,T=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;r||(O=O.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&A&&(T=Da(T,A)||T);const $=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let V=O===_||!o&&O.startsWith(_)&&O.charAt($)==="/",H=T!=null&&(T===_||!o&&T.startsWith(_)&&T.charAt(_.length)==="/"),G={isActive:V,isPending:H,isTransitioning:N},Z=V?l:void 0,te;typeof s=="function"?te=s(G):te=[s,V?"active":null,H?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let pe=typeof u=="function"?u(G):u;return x.createElement(Cv,{...p,"aria-current":Z,className:te,ref:b,style:pe,to:d,viewTransition:m},typeof y=="function"?y(G):y)});z2.displayName="NavLink";var B2=x.forwardRef(({discover:n="render",fetcherKey:l,navigate:r,reloadDocument:s,replace:o,state:u,method:d=Fo,action:m,onSubmit:y,relative:p,preventScrollReset:b,viewTransition:g,...w},C)=>{let E=V2(),A=K2(m,{relative:p}),N=d.toLowerCase()==="get"?"get":"post",_=typeof m=="string"&&Ev.test(m),O=T=>{if(y&&y(T),T.defaultPrevented)return;T.preventDefault();let $=T.nativeEvent.submitter,V=($==null?void 0:$.getAttribute("formmethod"))||d;E($||T.currentTarget,{fetcherKey:l,method:V,navigate:r,replace:o,state:u,relative:p,preventScrollReset:b,viewTransition:g})};return x.createElement("form",{ref:C,method:N,action:A,onSubmit:s?y:O,...w,"data-discover":!_&&n==="render"?"true":void 0})});B2.displayName="Form";function k2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _v(n){let l=x.useContext(Gs);return et(l,k2(n)),l}function H2(n,{target:l,replace:r,state:s,preventScrollReset:o,relative:u,viewTransition:d}={}){let m=Lt(),y=Yt(),p=yr(n,{relative:u});return x.useCallback(b=>{if(y2(b,l)){b.preventDefault();let g=r!==void 0?r:cr(y)===cr(p);m(n,{replace:g,state:s,preventScrollReset:o,relative:u,viewTransition:d})}},[y,m,p,r,s,l,n,o,u,d])}function Q2(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(hd(n)),r=x.useRef(!1),s=Yt(),o=x.useMemo(()=>v2(s.search,r.current?null:l.current),[s.search]),u=Lt(),d=x.useCallback((m,y)=>{const p=hd(typeof m=="function"?m(o):m);r.current=!0,u("?"+p,y)},[u,o]);return[o,d]}var $2=0,Y2=()=>`__${String(++$2)}__`;function V2(){let{router:n}=_v("useSubmit"),{basename:l}=x.useContext(na),r=i2();return x.useCallback(async(s,o={})=>{let{action:u,method:d,encType:m,formData:y,body:p}=x2(s,l);if(o.navigate===!1){let b=o.fetcherKey||Y2();await n.fetch(b,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 K2(n,{relative:l}={}){let{basename:r}=x.useContext(na),s=x.useContext(aa);et(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),u={...yr(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(b=>b==="")){m.delete("index"),y.filter(g=>g).forEach(g=>m.append("index",g));let b=m.toString();u.search=b?`?${b}`:""}}return(!n||n===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:Oa([r,u.pathname])),cr(u)}function F2(n,l={}){let r=x.useContext(pv);et(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=_v("useViewTransitionState"),o=yr(n,{relative:l.relative});if(!r.isTransitioning)return!1;let u=Da(r.currentLocation.pathname,s)||r.currentLocation.pathname,d=Da(r.nextLocation.pathname,s)||r.nextLocation.pathname;return fr(o.pathname,d)!=null||fr(o.pathname,u)!=null}[...A2];var Nv=ov();const G2=vu(Nv);function md(n,l){return md=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},md(n,l)}function Xs(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,md(n,l)}var Zs=function(){function n(){this.listeners=[]}var l=n.prototype;return l.subscribe=function(s){var o=this,u=s||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 s in r)({}).hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Ee.apply(null,arguments)}var au=typeof window>"u";function _t(){}function X2(n,l){return typeof n=="function"?n(l):n}function pd(n){return typeof n=="number"&&n>=0&&n!==1/0}function lu(n){return Array.isArray(n)?n:[n]}function jv(n,l){return Math.max(n+(l||0)-Date.now(),0)}function Xo(n,l,r){return vr(n)?typeof l=="function"?Ee({},r,{queryKey:n,queryFn:l}):Ee({},l,{queryKey:n}):n}function Z2(n,l,r){return vr(n)?typeof l=="function"?Ee({},r,{mutationKey:n,mutationFn:l}):Ee({},l,{mutationKey:n}):typeof n=="function"?Ee({},l,{mutationFn:n}):Ee({},n)}function ul(n,l,r){return vr(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 uy(n,l){var r=n.active,s=n.exact,o=n.fetching,u=n.inactive,d=n.predicate,m=n.queryKey,y=n.stale;if(vr(m)){if(s){if(l.queryHash!==kd(m,l.options))return!1}else if(!su(l.queryKey,m))return!1}var p=J2(r,u);if(p==="none")return!1;if(p!=="all"){var b=l.isActive();if(p==="active"&&!b||p==="inactive"&&b)return!1}return!(typeof y=="boolean"&&l.isStale()!==y||typeof o=="boolean"&&l.isFetching()!==o||d&&!d(l))}function cy(n,l){var r=n.exact,s=n.fetching,o=n.predicate,u=n.mutationKey;if(vr(u)){if(!l.options.mutationKey)return!1;if(r){if($l(l.options.mutationKey)!==$l(u))return!1}else if(!su(l.options.mutationKey,u))return!1}return!(typeof s=="boolean"&&l.state.status==="loading"!==s||o&&!o(l))}function kd(n,l){var r=(l==null?void 0:l.queryKeyHashFn)||$l;return r(n)}function $l(n){var l=lu(n);return P2(l)}function P2(n){return JSON.stringify(n,function(l,r){return yd(r)?Object.keys(r).sort().reduce(function(s,o){return s[o]=r[o],s},{}):r})}function su(n,l){return Av(lu(n),lu(l))}function Av(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!Av(n[r],l[r])}):!1}function iu(n,l){if(n===l)return n;var r=Array.isArray(n)&&Array.isArray(l);if(r||yd(n)&&yd(l)){for(var s=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]=iu(n[p],l[p]),d[p]===n[p]&&m++}return s===u&&m===s?n:d}return l}function I2(n,l){if(n&&!l||l&&!n)return!1;for(var r in n)if(n[r]!==l[r])return!1;return!0}function yd(n){if(!fy(n))return!1;var l=n.constructor;if(typeof l>"u")return!0;var r=l.prototype;return!(!fy(r)||!r.hasOwnProperty("isPrototypeOf"))}function fy(n){return Object.prototype.toString.call(n)==="[object Object]"}function vr(n){return typeof n=="string"||Array.isArray(n)}function W2(n){return new Promise(function(l){setTimeout(l,n)})}function dy(n){Promise.resolve().then(n).catch(function(l){return setTimeout(function(){throw l})})}function Tv(){if(typeof AbortController=="function")return new AbortController}var eS=function(n){Xs(l,n);function l(){var s;return s=n.call(this)||this,s.setup=function(o){var u;if(!au&&((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)}}},s}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}(Zs),or=new eS,tS=function(n){Xs(l,n);function l(){var s;return s=n.call(this)||this,s.setup=function(o){var u;if(!au&&((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)}}},s}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}(Zs),Zo=new tS;function nS(n){return Math.min(1e3*Math.pow(2,n),3e4)}function ru(n){return typeof(n==null?void 0:n.cancel)=="function"}var Rv=function(l){this.revert=l==null?void 0:l.revert,this.silent=l==null?void 0:l.silent};function Jo(n){return n instanceof Rv}var Ov=function(l){var r=this,s=!1,o,u,d,m;this.abort=l.abort,this.cancel=function(w){return o==null?void 0:o(w)},this.cancelRetry=function(){s=!0},this.continueRetry=function(){s=!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(w,C){d=w,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))},b=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()})},g=function w(){if(!r.isResolved){var C;try{C=l.fn()}catch(E){C=Promise.reject(E)}o=function(A){if(!r.isResolved&&(p(new Rv(A)),r.abort==null||r.abort(),ru(C)))try{C.cancel()}catch{}},r.isTransportCancelable=ru(C),Promise.resolve(C).then(y).catch(function(E){var A,N;if(!r.isResolved){var _=(A=l.retry)!=null?A:3,O=(N=l.retryDelay)!=null?N:nS,T=typeof O=="function"?O(r.failureCount,E):O,$=_===!0||typeof _=="number"&&r.failureCount<_||typeof _=="function"&&_(r.failureCount,E);if(s||!$){p(E);return}r.failureCount++,l.onFail==null||l.onFail(r.failureCount,E),W2(T).then(function(){if(!or.isFocused()||!Zo.isOnline())return b()}).then(function(){s?p(E):w()})}})}};g()},aS=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(s){var o;this.transactions++;try{o=s()}finally{this.transactions--,this.transactions||this.flush()}return o},l.schedule=function(s){var o=this;this.transactions?this.queue.push(s):dy(function(){o.notifyFn(s)})},l.batchCalls=function(s){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(){s.apply(void 0,d)})}},l.flush=function(){var s=this,o=this.queue;this.queue=[],o.length&&dy(function(){s.batchNotifyFn(function(){o.forEach(function(u){s.notifyFn(u)})})})},l.setNotifyFunction=function(s){this.notifyFn=s},l.setBatchNotifyFunction=function(s){this.batchNotifyFn=s},n}(),Pe=new aS,Dv=console;function ou(){return Dv}function lS(n){Dv=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(s){var o;this.options=Ee({},this.defaultOptions,s),this.meta=s==null?void 0:s.meta,this.cacheTime=Math.max(this.cacheTime||0,(o=this.options.cacheTime)!=null?o:5*60*1e3)},l.setDefaultOptions=function(s){this.defaultOptions=s},l.scheduleGc=function(){var s=this;this.clearGcTimeout(),pd(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){s.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(s,o){var u,d,m=this.state.data,y=X2(s,m);return(u=(d=this.options).isDataEqual)!=null&&u.call(d,m,y)?y=m:this.options.structuralSharing!==!1&&(y=iu(m,y)),this.dispatch({data:y,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt}),y},l.setState=function(s,o){this.dispatch({type:"setState",state:s,setStateOptions:o})},l.cancel=function(s){var o,u=this.promise;return(o=this.retryer)==null||o.cancel(s),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(s){return s.options.enabled!==!1})},l.isFetching=function(){return this.state.isFetching},l.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(s){return s.getCurrentResult().isStale})},l.isStaleByTime=function(s){return s===void 0&&(s=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!jv(this.state.dataUpdatedAt,s)},l.onFocus=function(){var s,o=this.observers.find(function(u){return u.shouldFetchOnWindowFocus()});o&&o.refetch(),(s=this.retryer)==null||s.continue()},l.onOnline=function(){var s,o=this.observers.find(function(u){return u.shouldFetchOnReconnect()});o&&o.refetch(),(s=this.retryer)==null||s.continue()},l.addObserver=function(s){this.observers.indexOf(s)===-1&&(this.observers.push(s),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:s}))},l.removeObserver=function(s){this.observers.indexOf(s)!==-1&&(this.observers=this.observers.filter(function(o){return o!==s}),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:s}))},l.getObserversCount=function(){return this.observers.length},l.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},l.fetch=function(s,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(s&&this.setOptions(s),!this.options.queryFn){var b=this.observers.find(function(O){return O.options.queryFn});b&&this.setOptions(b.options)}var g=lu(this.queryKey),w=Tv(),C={queryKey:g,pageParam:void 0,meta:this.meta};Object.defineProperty(C,"signal",{enumerable:!0,get:function(){if(w)return u.abortSignalConsumed=!0,w.signal}});var E=function(){return u.options.queryFn?(u.abortSignalConsumed=!1,u.options.queryFn(C)):Promise.reject("Missing queryFn")},A={fetchOptions:o,options:this.options,queryKey:g,state:this.state,fetchFn:E,meta:this.meta};if((d=this.options.behavior)!=null&&d.onFetch){var N;(N=this.options.behavior)==null||N.onFetch(A)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((m=A.fetchOptions)==null?void 0:m.meta)){var _;this.dispatch({type:"fetch",meta:(_=A.fetchOptions)==null?void 0:_.meta})}return this.retryer=new Ov({fn:A.fetchFn,abort:w==null||(y=w.abort)==null?void 0:y.bind(w),onSuccess:function(T){u.setData(T),u.cache.config.onSuccess==null||u.cache.config.onSuccess(T,u),u.cacheTime===0&&u.optionalRemove()},onError:function(T){Jo(T)&&T.silent||u.dispatch({type:"error",error:T}),Jo(T)||(u.cache.config.onError==null||u.cache.config.onError(T,u),ou().error(T)),u.cacheTime===0&&u.optionalRemove()},onFail:function(){u.dispatch({type:"failed"})},onPause:function(){u.dispatch({type:"pause"})},onContinue:function(){u.dispatch({type:"continue"})},retry:A.options.retry,retryDelay:A.options.retryDelay}),this.promise=this.retryer.promise,this.promise},l.dispatch=function(s){var o=this;this.state=this.reducer(this.state,s),Pe.batch(function(){o.observers.forEach(function(u){u.onQueryUpdate(s)}),o.cache.notify({query:o,type:"queryUpdated",action:s})})},l.getDefaultState=function(s){var o=typeof s.initialData=="function"?s.initialData():s.initialData,u=typeof s.initialData<"u",d=u?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.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(s,o){var u,d;switch(o.type){case"failed":return Ee({},s,{fetchFailureCount:s.fetchFailureCount+1});case"pause":return Ee({},s,{isPaused:!0});case"continue":return Ee({},s,{isPaused:!1});case"fetch":return Ee({},s,{fetchFailureCount:0,fetchMeta:(u=o.meta)!=null?u:null,isFetching:!0,isPaused:!1},!s.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ee({},s,{data:o.data,dataUpdateCount:s.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 Jo(m)&&m.revert&&this.revertState?Ee({},this.revertState):Ee({},s,{error:m,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Ee({},s,{isInvalidated:!0});case"setState":return Ee({},s,o.state);default:return s}},n}(),iS=function(n){Xs(l,n);function l(s){var o;return o=n.call(this)||this,o.config=s||{},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:kd(y,u),b=this.get(p);return b||(b=new sS({cache:this,queryKey:y,queryHash:p,options:o.defaultQueryOptions(u),state:d,defaultOptions:o.getQueryDefaults(y),meta:u.meta}),this.add(b)),b},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;Pe.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=ul(o,u),m=d[0];return typeof m.exact>"u"&&(m.exact=!0),this.queries.find(function(y){return uy(m,y)})},r.findAll=function(o,u){var d=ul(o,u),m=d[0];return Object.keys(m).length>0?this.queries.filter(function(y){return uy(m,y)}):this.queries},r.notify=function(o){var u=this;Pe.batch(function(){u.listeners.forEach(function(d){d(o)})})},r.onFocus=function(){var o=this;Pe.batch(function(){o.queries.forEach(function(u){u.onFocus()})})},r.onOnline=function(){var o=this;Pe.batch(function(){o.queries.forEach(function(u){u.onOnline()})})},l}(Zs),rS=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||Mv(),this.meta=r.meta}var l=n.prototype;return l.setState=function(s){this.dispatch({type:"setState",state:s})},l.addObserver=function(s){this.observers.indexOf(s)===-1&&this.observers.push(s)},l.removeObserver=function(s){this.observers=this.observers.filter(function(o){return o!==s})},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 s=this,o,u=this.state.status==="loading",d=Promise.resolve();return u||(this.dispatch({type:"loading",variables:this.options.variables}),d=d.then(function(){s.mutationCache.config.onMutate==null||s.mutationCache.config.onMutate(s.state.variables,s)}).then(function(){return s.options.onMutate==null?void 0:s.options.onMutate(s.state.variables)}).then(function(m){m!==s.state.context&&s.dispatch({type:"loading",context:m,variables:s.state.variables})})),d.then(function(){return s.executeMutation()}).then(function(m){o=m,s.mutationCache.config.onSuccess==null||s.mutationCache.config.onSuccess(o,s.state.variables,s.state.context,s)}).then(function(){return s.options.onSuccess==null?void 0:s.options.onSuccess(o,s.state.variables,s.state.context)}).then(function(){return s.options.onSettled==null?void 0:s.options.onSettled(o,null,s.state.variables,s.state.context)}).then(function(){return s.dispatch({type:"success",data:o}),o}).catch(function(m){return s.mutationCache.config.onError==null||s.mutationCache.config.onError(m,s.state.variables,s.state.context,s),ou().error(m),Promise.resolve().then(function(){return s.options.onError==null?void 0:s.options.onError(m,s.state.variables,s.state.context)}).then(function(){return s.options.onSettled==null?void 0:s.options.onSettled(void 0,m,s.state.variables,s.state.context)}).then(function(){throw s.dispatch({type:"error",error:m}),m})})},l.executeMutation=function(){var s=this,o;return this.retryer=new Ov({fn:function(){return s.options.mutationFn?s.options.mutationFn(s.state.variables):Promise.reject("No mutationFn found")},onFail:function(){s.dispatch({type:"failed"})},onPause:function(){s.dispatch({type:"pause"})},onContinue:function(){s.dispatch({type:"continue"})},retry:(o=this.options.retry)!=null?o:0,retryDelay:this.options.retryDelay}),this.retryer.promise},l.dispatch=function(s){var o=this;this.state=oS(this.state,s),Pe.batch(function(){o.observers.forEach(function(u){u.onMutationUpdate(s)}),o.mutationCache.notify(o)})},n}();function Mv(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function oS(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 Uv=function(n){Xs(l,n);function l(s){var o;return o=n.call(this)||this,o.config=s||{},o.mutations=[],o.mutationId=0,o}var r=l.prototype;return r.build=function(o,u,d){var m=new rS({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;Pe.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 cy(o,u)})},r.findAll=function(o){return this.mutations.filter(function(u){return cy(o,u)})},r.notify=function(o){var u=this;Pe.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 Pe.batch(function(){return o.reduce(function(u,d){return u.then(function(){return d.continue().catch(_t)})},Promise.resolve())})},l}(Zs);function uS(){return{onFetch:function(l){l.fetchFn=function(){var r,s,o,u,d,m,y=(r=l.fetchOptions)==null||(s=r.meta)==null?void 0:s.refetchPage,p=(o=l.fetchOptions)==null||(u=o.meta)==null?void 0:u.fetchMore,b=p==null?void 0:p.pageParam,g=(p==null?void 0:p.direction)==="forward",w=(p==null?void 0:p.direction)==="backward",C=((d=l.state.data)==null?void 0:d.pages)||[],E=((m=l.state.data)==null?void 0:m.pageParams)||[],A=Tv(),N=A==null?void 0:A.signal,_=E,O=!1,T=l.options.queryFn||function(){return Promise.reject("Missing queryFn")},$=function(ye,Se,B,X){return _=X?[Se].concat(_):[].concat(_,[Se]),X?[B].concat(ye):[].concat(ye,[B])},V=function(ye,Se,B,X){if(O)return Promise.reject("Cancelled");if(typeof B>"u"&&!Se&&ye.length)return Promise.resolve(ye);var P={queryKey:l.queryKey,signal:N,pageParam:B,meta:l.meta},ue=T(P),R=Promise.resolve(ue).then(function(W){return $(ye,B,W,X)});if(ru(ue)){var Q=R;Q.cancel=ue.cancel}return R},H;if(!C.length)H=V([]);else if(g){var G=typeof b<"u",Z=G?b:hy(l.options,C);H=V(C,G,Z)}else if(w){var te=typeof b<"u",pe=te?b:cS(l.options,C);H=V(C,te,pe,!0)}else(function(){_=[];var Le=typeof l.options.getNextPageParam>"u",ye=y&&C[0]?y(C[0],0,C):!0;H=ye?V([],Le,E[0]):Promise.resolve($([],E[0],C[0]));for(var Se=function(P){H=H.then(function(ue){var R=y&&C[P]?y(C[P],P,C):!0;if(R){var Q=Le?E[P]:hy(l.options,ue);return V(ue,Le,Q)}return Promise.resolve($(ue,E[P],C[P]))})},B=1;B<C.length;B++)Se(B)})();var Re=H.then(function(Le){return{pages:Le,pageParams:_}}),ge=Re;return ge.cancel=function(){O=!0,A==null||A.abort(),ru(H)&&H.cancel()},Re}}}}function hy(n,l){return n.getNextPageParam==null?void 0:n.getNextPageParam(l[l.length-1],l)}function cS(n,l){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(l[0],l)}var fS=function(){function n(r){r===void 0&&(r={}),this.queryCache=r.queryCache||new iS,this.mutationCache=r.mutationCache||new Uv,this.defaultOptions=r.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var l=n.prototype;return l.mount=function(){var s=this;this.unsubscribeFocus=or.subscribe(function(){or.isFocused()&&Zo.isOnline()&&(s.mutationCache.onFocus(),s.queryCache.onFocus())}),this.unsubscribeOnline=Zo.subscribe(function(){or.isFocused()&&Zo.isOnline()&&(s.mutationCache.onOnline(),s.queryCache.onOnline())})},l.unmount=function(){var s,o;(s=this.unsubscribeFocus)==null||s.call(this),(o=this.unsubscribeOnline)==null||o.call(this)},l.isFetching=function(s,o){var u=ul(s,o),d=u[0];return d.fetching=!0,this.queryCache.findAll(d).length},l.isMutating=function(s){return this.mutationCache.findAll(Ee({},s,{fetching:!0})).length},l.getQueryData=function(s,o){var u;return(u=this.queryCache.find(s,o))==null?void 0:u.state.data},l.getQueriesData=function(s){return this.getQueryCache().findAll(s).map(function(o){var u=o.queryKey,d=o.state,m=d.data;return[u,m]})},l.setQueryData=function(s,o,u){var d=Xo(s),m=this.defaultQueryOptions(d);return this.queryCache.build(this,m).setData(o,u)},l.setQueriesData=function(s,o,u){var d=this;return Pe.batch(function(){return d.getQueryCache().findAll(s).map(function(m){var y=m.queryKey;return[y,d.setQueryData(y,o,u)]})})},l.getQueryState=function(s,o){var u;return(u=this.queryCache.find(s,o))==null?void 0:u.state},l.removeQueries=function(s,o){var u=ul(s,o),d=u[0],m=this.queryCache;Pe.batch(function(){m.findAll(d).forEach(function(y){m.remove(y)})})},l.resetQueries=function(s,o,u){var d=this,m=ul(s,o,u),y=m[0],p=m[1],b=this.queryCache,g=Ee({},y,{active:!0});return Pe.batch(function(){return b.findAll(y).forEach(function(w){w.reset()}),d.refetchQueries(g,p)})},l.cancelQueries=function(s,o,u){var d=this,m=ul(s,o,u),y=m[0],p=m[1],b=p===void 0?{}:p;typeof b.revert>"u"&&(b.revert=!0);var g=Pe.batch(function(){return d.queryCache.findAll(y).map(function(w){return w.cancel(b)})});return Promise.all(g).then(_t).catch(_t)},l.invalidateQueries=function(s,o,u){var d,m,y,p=this,b=ul(s,o,u),g=b[0],w=b[1],C=Ee({},g,{active:(d=(m=g.refetchActive)!=null?m:g.active)!=null?d:!0,inactive:(y=g.refetchInactive)!=null?y:!1});return Pe.batch(function(){return p.queryCache.findAll(g).forEach(function(E){E.invalidate()}),p.refetchQueries(C,w)})},l.refetchQueries=function(s,o,u){var d=this,m=ul(s,o,u),y=m[0],p=m[1],b=Pe.batch(function(){return d.queryCache.findAll(y).map(function(w){return w.fetch(void 0,Ee({},p,{meta:{refetchPage:y==null?void 0:y.refetchPage}}))})}),g=Promise.all(b).then(_t);return p!=null&&p.throwOnError||(g=g.catch(_t)),g},l.fetchQuery=function(s,o,u){var d=Xo(s,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(s,o,u){return this.fetchQuery(s,o,u).then(_t).catch(_t)},l.fetchInfiniteQuery=function(s,o,u){var d=Xo(s,o,u);return d.behavior=uS(),this.fetchQuery(d)},l.prefetchInfiniteQuery=function(s,o,u){return this.fetchInfiniteQuery(s,o,u).then(_t).catch(_t)},l.cancelMutations=function(){var s=this,o=Pe.batch(function(){return s.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(s){return this.mutationCache.build(this,s).execute()},l.getQueryCache=function(){return this.queryCache},l.getMutationCache=function(){return this.mutationCache},l.getDefaultOptions=function(){return this.defaultOptions},l.setDefaultOptions=function(s){this.defaultOptions=s},l.setQueryDefaults=function(s,o){var u=this.queryDefaults.find(function(d){return $l(s)===$l(d.queryKey)});u?u.defaultOptions=o:this.queryDefaults.push({queryKey:s,defaultOptions:o})},l.getQueryDefaults=function(s){var o;return s?(o=this.queryDefaults.find(function(u){return su(s,u.queryKey)}))==null?void 0:o.defaultOptions:void 0},l.setMutationDefaults=function(s,o){var u=this.mutationDefaults.find(function(d){return $l(s)===$l(d.mutationKey)});u?u.defaultOptions=o:this.mutationDefaults.push({mutationKey:s,defaultOptions:o})},l.getMutationDefaults=function(s){var o;return s?(o=this.mutationDefaults.find(function(u){return su(s,u.mutationKey)}))==null?void 0:o.defaultOptions:void 0},l.defaultQueryOptions=function(s){if(s!=null&&s._defaulted)return s;var o=Ee({},this.defaultOptions.queries,this.getQueryDefaults(s==null?void 0:s.queryKey),s,{_defaulted:!0});return!o.queryHash&&o.queryKey&&(o.queryHash=kd(o.queryKey,o)),o},l.defaultQueryObserverOptions=function(s){return this.defaultQueryOptions(s)},l.defaultMutationOptions=function(s){return s!=null&&s._defaulted?s:Ee({},this.defaultOptions.mutations,this.getMutationDefaults(s==null?void 0:s.mutationKey),s,{_defaulted:!0})},l.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n}(),dS=function(n){Xs(l,n);function l(s,o){var u;return u=n.call(this)||this,u.client=s,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),my(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},r.onUnsubscribe=function(){this.listeners.length||this.destroy()},r.shouldFetchOnReconnect=function(){return vd(this.currentQuery,this.options,this.options.refetchOnReconnect)},r.shouldFetchOnWindowFocus=function(){return vd(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&&py(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(b){d.trackedProps.includes(b)||d.trackedProps.push(b)};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(),!(au||this.currentResult.isStale||!pd(this.options.staleTime))){var u=jv(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,!(au||this.options.enabled===!1||!pd(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(u.options.refetchIntervalInBackground||or.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,b=this.currentResultOptions,g=o!==d,w=g?o.state:this.currentQueryInitialState,C=g?this.currentResult:this.previousQueryResult,E=o.state,A=E.dataUpdatedAt,N=E.error,_=E.errorUpdatedAt,O=E.isFetching,T=E.status,$=!1,V=!1,H;if(u.optimisticResults){var G=this.hasListeners(),Z=!G&&my(o,u),te=G&&py(o,d,u,m);(Z||te)&&(O=!0,A||(T="loading"))}if(u.keepPreviousData&&!E.dataUpdateCount&&(C!=null&&C.isSuccess)&&T!=="error")H=C.data,A=C.dataUpdatedAt,T=C.status,$=!0;else if(u.select&&typeof E.data<"u")if(y&&E.data===(p==null?void 0:p.data)&&u.select===this.selectFn)H=this.selectResult;else try{this.selectFn=u.select,H=u.select(E.data),u.structuralSharing!==!1&&(H=iu(y==null?void 0:y.data,H)),this.selectResult=H,this.selectError=null}catch(ge){ou().error(ge),this.selectError=ge}else H=E.data;if(typeof u.placeholderData<"u"&&typeof H>"u"&&(T==="loading"||T==="idle")){var pe;if(y!=null&&y.isPlaceholderData&&u.placeholderData===(b==null?void 0:b.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=iu(y==null?void 0:y.data,pe)),this.selectError=null}catch(ge){ou().error(ge),this.selectError=ge}typeof pe<"u"&&(T="success",H=pe,V=!0)}this.selectError&&(N=this.selectError,H=this.selectResult,_=Date.now(),T="error");var Re={status:T,isLoading:T==="loading",isSuccess:T==="success",isError:T==="error",isIdle:T==="idle",data:H,dataUpdatedAt:A,error:N,errorUpdatedAt:_,failureCount:E.fetchFailureCount,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>w.dataUpdateCount||E.errorUpdateCount>w.errorUpdateCount,isFetching:O,isRefetching:O&&T!=="loading",isLoadingError:T==="error"&&E.dataUpdatedAt===0,isPlaceholderData:V,isPreviousData:$,isRefetchError:T==="error"&&E.dataUpdatedAt!==0,isStale:Hd(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(b){var g=b,w=o[g]!==u[g],C=p==null?void 0:p.some(function(A){return A===b}),E=y==null?void 0:y.some(function(A){return A===b});return w&&!E&&(!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,!I2(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"&&!Jo(o.error)&&(u.onError=!0),this.updateResult(u),this.hasListeners()&&this.updateTimers()},r.notify=function(o){var u=this;Pe.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}(Zs);function hS(n,l){return l.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&l.retryOnMount===!1)}function my(n,l){return hS(n,l)||n.state.dataUpdatedAt>0&&vd(n,l,l.refetchOnMount)}function vd(n,l,r){if(l.enabled!==!1){var s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&Hd(n,l)}return!1}function py(n,l,r,s){return r.enabled!==!1&&(n!==l||s.enabled===!1)&&(!r.suspense||n.state.status!=="error")&&Hd(n,r)}function Hd(n,l){return n.isStaleByTime(l.staleTime)}var mS=function(n){Xs(l,n);function l(s,o){var u;return u=n.call(this)||this,u.client=s,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:Mv(),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;Pe.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}(Zs),pS=G2.unstable_batchedUpdates;Pe.setBatchNotifyFunction(pS);var yS=console;lS(yS);var yy=Ke.createContext(void 0),Lv=Ke.createContext(!1);function qv(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=yy),window.ReactQueryClientContext):yy}var zv=function(){var l=Ke.useContext(qv(Ke.useContext(Lv)));if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},vS=function(l){var r=l.client,s=l.contextSharing,o=s===void 0?!1:s,u=l.children;Ke.useEffect(function(){return r.mount(),function(){r.unmount()}},[r]);var d=qv(o);return Ke.createElement(Lv.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 gS=Ke.createContext(bS()),xS=function(){return Ke.useContext(gS)};function Bv(n,l,r){return typeof l=="function"?l.apply(void 0,r):typeof l=="boolean"?l:!!n}function qt(n,l,r){var s=Ke.useRef(!1),o=Ke.useState(0),u=o[1],d=Z2(n,l,r),m=zv(),y=Ke.useRef();y.current?y.current.setOptions(d):y.current=new mS(m,d);var p=y.current.getCurrentResult();Ke.useEffect(function(){s.current=!0;var g=y.current.subscribe(Pe.batchCalls(function(){s.current&&u(function(w){return w+1})}));return function(){s.current=!1,g()}},[]);var b=Ke.useCallback(function(g,w){y.current.mutate(g,w).catch(_t)},[]);if(p.error&&Bv(void 0,y.current.options.useErrorBoundary,[p.error]))throw p.error;return Ee({},p,{mutate:b,mutateAsync:p.mutate})}function SS(n,l){var r=Ke.useRef(!1),s=Ke.useState(0),o=s[1],u=zv(),d=xS(),m=u.defaultQueryObserverOptions(n);m.optimisticResults=!0,m.onError&&(m.onError=Pe.batchCalls(m.onError)),m.onSuccess&&(m.onSuccess=Pe.batchCalls(m.onSuccess)),m.onSettled&&(m.onSettled=Pe.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],b=p.getOptimisticResult(m);if(Ke.useEffect(function(){r.current=!0,d.clearReset();var g=p.subscribe(Pe.batchCalls(function(){r.current&&o(function(w){return w+1})}));return p.updateResult(),function(){r.current=!1,g()}},[d,p]),Ke.useEffect(function(){p.setOptions(m,{listeners:!1})},[m,p]),m.suspense&&b.isLoading)throw p.fetchOptimistic(m).then(function(g){var w=g.data;m.onSuccess==null||m.onSuccess(w),m.onSettled==null||m.onSettled(w,null)}).catch(function(g){d.clearReset(),m.onError==null||m.onError(g),m.onSettled==null||m.onSettled(void 0,g)});if(b.isError&&!d.isReset()&&!b.isFetching&&Bv(m.suspense,m.useErrorBoundary,[b.error,p.getCurrentQuery()]))throw b.error;return m.notifyOnChangeProps==="tracked"&&(b=p.trackResult(b,m)),b}function Wt(n,l,r){var s=Xo(n,l,r);return SS(s,dS)}function kv(n,l){return function(){return n.apply(l,arguments)}}const{toString:wS}=Object.prototype,{getPrototypeOf:Qd}=Object,{iterator:xu,toStringTag:Hv}=Symbol,Su=(n=>l=>{const r=wS.call(l);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kn=n=>(n=n.toLowerCase(),l=>Su(l)===n),wu=n=>l=>typeof l===n,{isArray:Js}=Array,dr=wu("undefined");function ES(n){return n!==null&&!dr(n)&&n.constructor!==null&&!dr(n.constructor)&&Jt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Qv=kn("ArrayBuffer");function CS(n){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(n):l=n&&n.buffer&&Qv(n.buffer),l}const _S=wu("string"),Jt=wu("function"),$v=wu("number"),Eu=n=>n!==null&&typeof n=="object",NS=n=>n===!0||n===!1,Po=n=>{if(Su(n)!=="object")return!1;const l=Qd(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Hv in n)&&!(xu in n)},jS=kn("Date"),AS=kn("File"),TS=kn("Blob"),RS=kn("FileList"),OS=n=>Eu(n)&&Jt(n.pipe),DS=n=>{let l;return n&&(typeof FormData=="function"&&n instanceof FormData||Jt(n.append)&&((l=Su(n))==="formdata"||l==="object"&&Jt(n.toString)&&n.toString()==="[object FormData]"))},MS=kn("URLSearchParams"),[US,LS,qS,zS]=["ReadableStream","Request","Response","Headers"].map(kn),BS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function br(n,l,{allOwnKeys:r=!1}={}){if(n===null||typeof n>"u")return;let s,o;if(typeof n!="object"&&(n=[n]),Js(n))for(s=0,o=n.length;s<o;s++)l.call(null,n[s],s,n);else{const u=r?Object.getOwnPropertyNames(n):Object.keys(n),d=u.length;let m;for(s=0;s<d;s++)m=u[s],l.call(null,n[m],m,n)}}function Yv(n,l){l=l.toLowerCase();const r=Object.keys(n);let s=r.length,o;for(;s-- >0;)if(o=r[s],l===o.toLowerCase())return o;return null}const Yl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vv=n=>!dr(n)&&n!==Yl;function bd(){const{caseless:n}=Vv(this)&&this||{},l={},r=(s,o)=>{const u=n&&Yv(l,o)||o;Po(l[u])&&Po(s)?l[u]=bd(l[u],s):Po(s)?l[u]=bd({},s):Js(s)?l[u]=s.slice():l[u]=s};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&br(arguments[s],r);return l}const kS=(n,l,r,{allOwnKeys:s}={})=>(br(l,(o,u)=>{r&&Jt(o)?n[u]=kv(o,r):n[u]=o},{allOwnKeys:s}),n),HS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),QS=(n,l,r,s)=>{n.prototype=Object.create(l.prototype,s),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:l.prototype}),r&&Object.assign(n.prototype,r)},$S=(n,l,r,s)=>{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],(!s||s(d,n,l))&&!m[d]&&(l[d]=n[d],m[d]=!0);n=r!==!1&&Qd(n)}while(n&&(!r||r(n,l))&&n!==Object.prototype);return l},YS=(n,l,r)=>{n=String(n),(r===void 0||r>n.length)&&(r=n.length),r-=l.length;const s=n.indexOf(l,r);return s!==-1&&s===r},VS=n=>{if(!n)return null;if(Js(n))return n;let l=n.length;if(!$v(l))return null;const r=new Array(l);for(;l-- >0;)r[l]=n[l];return r},KS=(n=>l=>n&&l instanceof n)(typeof Uint8Array<"u"&&Qd(Uint8Array)),FS=(n,l)=>{const s=(n&&n[xu]).call(n);let o;for(;(o=s.next())&&!o.done;){const u=o.value;l.call(n,u[0],u[1])}},GS=(n,l)=>{let r;const s=[];for(;(r=n.exec(l))!==null;)s.push(r);return s},XS=kn("HTMLFormElement"),ZS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),vy=(({hasOwnProperty:n})=>(l,r)=>n.call(l,r))(Object.prototype),JS=kn("RegExp"),Kv=(n,l)=>{const r=Object.getOwnPropertyDescriptors(n),s={};br(r,(o,u)=>{let d;(d=l(o,u,n))!==!1&&(s[u]=d||o)}),Object.defineProperties(n,s)},PS=n=>{Kv(n,(l,r)=>{if(Jt(n)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=n[r];if(Jt(s)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},IS=(n,l)=>{const r={},s=o=>{o.forEach(u=>{r[u]=!0})};return Js(n)?s(n):s(String(n).split(l)),r},WS=()=>{},ew=(n,l)=>n!=null&&Number.isFinite(n=+n)?n:l;function tw(n){return!!(n&&Jt(n.append)&&n[Hv]==="FormData"&&n[xu])}const nw=n=>{const l=new Array(10),r=(s,o)=>{if(Eu(s)){if(l.indexOf(s)>=0)return;if(!("toJSON"in s)){l[o]=s;const u=Js(s)?[]:{};return br(s,(d,m)=>{const y=r(d,o+1);!dr(y)&&(u[m]=y)}),l[o]=void 0,u}}return s};return r(n,0)},aw=kn("AsyncFunction"),lw=n=>n&&(Eu(n)||Jt(n))&&Jt(n.then)&&Jt(n.catch),Fv=((n,l)=>n?setImmediate:l?((r,s)=>(Yl.addEventListener("message",({source:o,data:u})=>{o===Yl&&u===r&&s.length&&s.shift()()},!1),o=>{s.push(o),Yl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Jt(Yl.postMessage)),sw=typeof queueMicrotask<"u"?queueMicrotask.bind(Yl):typeof process<"u"&&process.nextTick||Fv,iw=n=>n!=null&&Jt(n[xu]),k={isArray:Js,isArrayBuffer:Qv,isBuffer:ES,isFormData:DS,isArrayBufferView:CS,isString:_S,isNumber:$v,isBoolean:NS,isObject:Eu,isPlainObject:Po,isReadableStream:US,isRequest:LS,isResponse:qS,isHeaders:zS,isUndefined:dr,isDate:jS,isFile:AS,isBlob:TS,isRegExp:JS,isFunction:Jt,isStream:OS,isURLSearchParams:MS,isTypedArray:KS,isFileList:RS,forEach:br,merge:bd,extend:kS,trim:BS,stripBOM:HS,inherits:QS,toFlatObject:$S,kindOf:Su,kindOfTest:kn,endsWith:YS,toArray:VS,forEachEntry:FS,matchAll:GS,isHTMLForm:XS,hasOwnProperty:vy,hasOwnProp:vy,reduceDescriptors:Kv,freezeMethods:PS,toObjectSet:IS,toCamelCase:ZS,noop:WS,toFiniteNumber:ew,findKey:Yv,global:Yl,isContextDefined:Vv,isSpecCompliantForm:tw,toJSONObject:nw,isAsyncFn:aw,isThenable:lw,setImmediate:Fv,asap:sw,isIterable:iw};function ve(n,l,r,s,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),s&&(this.request=s),o&&(this.response=o,this.status=o.status?o.status:null)}k.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:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Gv=ve.prototype,Xv={};["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=>{Xv[n]={value:n}});Object.defineProperties(ve,Xv);Object.defineProperty(Gv,"isAxiosError",{value:!0});ve.from=(n,l,r,s,o,u)=>{const d=Object.create(Gv);return k.toFlatObject(n,d,function(y){return y!==Error.prototype},m=>m!=="isAxiosError"),ve.call(d,n.message,l,r,s,o),d.cause=n,d.name=n.name,u&&Object.assign(d,u),d};const rw=null;function gd(n){return k.isPlainObject(n)||k.isArray(n)}function Zv(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function by(n,l,r){return n?n.concat(l).map(function(o,u){return o=Zv(o),!r&&u?"["+o+"]":o}).join(r?".":""):l}function ow(n){return k.isArray(n)&&!n.some(gd)}const uw=k.toFlatObject(k,{},null,function(l){return/^is[A-Z]/.test(l)});function Cu(n,l,r){if(!k.isObject(n))throw new TypeError("target must be an object");l=l||new FormData,r=k.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,N){return!k.isUndefined(N[A])});const s=r.metaTokens,o=r.visitor||b,u=r.dots,d=r.indexes,y=(r.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(l);if(!k.isFunction(o))throw new TypeError("visitor must be a function");function p(E){if(E===null)return"";if(k.isDate(E))return E.toISOString();if(!y&&k.isBlob(E))throw new ve("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(E)||k.isTypedArray(E)?y&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function b(E,A,N){let _=E;if(E&&!N&&typeof E=="object"){if(k.endsWith(A,"{}"))A=s?A:A.slice(0,-2),E=JSON.stringify(E);else if(k.isArray(E)&&ow(E)||(k.isFileList(E)||k.endsWith(A,"[]"))&&(_=k.toArray(E)))return A=Zv(A),_.forEach(function(T,$){!(k.isUndefined(T)||T===null)&&l.append(d===!0?by([A],$,u):d===null?A:A+"[]",p(T))}),!1}return gd(E)?!0:(l.append(by(N,A,u),p(E)),!1)}const g=[],w=Object.assign(uw,{defaultVisitor:b,convertValue:p,isVisitable:gd});function C(E,A){if(!k.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+A.join("."));g.push(E),k.forEach(E,function(_,O){(!(k.isUndefined(_)||_===null)&&o.call(l,_,k.isString(O)?O.trim():O,A,w))===!0&&C(_,A?A.concat(O):[O])}),g.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return C(n),l}function gy(n){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(s){return l[s]})}function $d(n,l){this._pairs=[],n&&Cu(n,this,l)}const Jv=$d.prototype;Jv.append=function(l,r){this._pairs.push([l,r])};Jv.toString=function(l){const r=l?function(s){return l.call(this,s,gy)}:gy;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function cw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pv(n,l,r){if(!l)return n;const s=r&&r.encode||cw;k.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let u;if(o?u=o(l,r):u=k.isURLSearchParams(l)?l.toString():new $d(l,r).toString(s),u){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+u}return n}class xy{constructor(){this.handlers=[]}use(l,r,s){return this.handlers.push({fulfilled:l,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){k.forEach(this.handlers,function(s){s!==null&&l(s)})}}const Iv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fw=typeof URLSearchParams<"u"?URLSearchParams:$d,dw=typeof FormData<"u"?FormData:null,hw=typeof Blob<"u"?Blob:null,mw={isBrowser:!0,classes:{URLSearchParams:fw,FormData:dw,Blob:hw},protocols:["http","https","file","blob","url","data"]},Yd=typeof window<"u"&&typeof document<"u",xd=typeof navigator=="object"&&navigator||void 0,pw=Yd&&(!xd||["ReactNative","NativeScript","NS"].indexOf(xd.product)<0),yw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vw=Yd&&window.location.href||"http://localhost",bw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yd,hasStandardBrowserEnv:pw,hasStandardBrowserWebWorkerEnv:yw,navigator:xd,origin:vw},Symbol.toStringTag,{value:"Module"})),Mt={...bw,...mw};function gw(n,l){return Cu(n,new Mt.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,u){return Mt.isNode&&k.isBuffer(r)?(this.append(s,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},l))}function xw(n){return k.matchAll(/\w+|\[(\w*)]/g,n).map(l=>l[0]==="[]"?"":l[1]||l[0])}function Sw(n){const l={},r=Object.keys(n);let s;const o=r.length;let u;for(s=0;s<o;s++)u=r[s],l[u]=n[u];return l}function Wv(n){function l(r,s,o,u){let d=r[u++];if(d==="__proto__")return!0;const m=Number.isFinite(+d),y=u>=r.length;return d=!d&&k.isArray(o)?o.length:d,y?(k.hasOwnProp(o,d)?o[d]=[o[d],s]:o[d]=s,!m):((!o[d]||!k.isObject(o[d]))&&(o[d]=[]),l(r,s,o[d],u)&&k.isArray(o[d])&&(o[d]=Sw(o[d])),!m)}if(k.isFormData(n)&&k.isFunction(n.entries)){const r={};return k.forEachEntry(n,(s,o)=>{l(xw(s),o,r,0)}),r}return null}function ww(n,l,r){if(k.isString(n))try{return(l||JSON.parse)(n),k.trim(n)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(n)}const gr={transitional:Iv,adapter:["xhr","http","fetch"],transformRequest:[function(l,r){const s=r.getContentType()||"",o=s.indexOf("application/json")>-1,u=k.isObject(l);if(u&&k.isHTMLForm(l)&&(l=new FormData(l)),k.isFormData(l))return o?JSON.stringify(Wv(l)):l;if(k.isArrayBuffer(l)||k.isBuffer(l)||k.isStream(l)||k.isFile(l)||k.isBlob(l)||k.isReadableStream(l))return l;if(k.isArrayBufferView(l))return l.buffer;if(k.isURLSearchParams(l))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let m;if(u){if(s.indexOf("application/x-www-form-urlencoded")>-1)return gw(l,this.formSerializer).toString();if((m=k.isFileList(l))||s.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Cu(m?{"files[]":l}:l,y&&new y,this.formSerializer)}}return u||o?(r.setContentType("application/json",!1),ww(l)):l}],transformResponse:[function(l){const r=this.transitional||gr.transitional,s=r&&r.forcedJSONParsing,o=this.responseType==="json";if(k.isResponse(l)||k.isReadableStream(l))return l;if(l&&k.isString(l)&&(s&&!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:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],n=>{gr.headers[n]={}});const Ew=k.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"]),Cw=n=>{const l={};let r,s,o;return n&&n.split(`
52
+ `).forEach(function(d){o=d.indexOf(":"),r=d.substring(0,o).trim().toLowerCase(),s=d.substring(o+1).trim(),!(!r||l[r]&&Ew[r])&&(r==="set-cookie"?l[r]?l[r].push(s):l[r]=[s]:l[r]=l[r]?l[r]+", "+s:s)}),l},Sy=Symbol("internals");function ar(n){return n&&String(n).trim().toLowerCase()}function Io(n){return n===!1||n==null?n:k.isArray(n)?n.map(Io):String(n)}function _w(n){const l=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(n);)l[s[1]]=s[2];return l}const Nw=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Pf(n,l,r,s,o){if(k.isFunction(s))return s.call(this,l,r);if(o&&(l=r),!!k.isString(l)){if(k.isString(s))return l.indexOf(s)!==-1;if(k.isRegExp(s))return s.test(l)}}function jw(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,r,s)=>r.toUpperCase()+s)}function Aw(n,l){const r=k.toCamelCase(" "+l);["get","set","has"].forEach(s=>{Object.defineProperty(n,s+r,{value:function(o,u,d){return this[s].call(this,l,o,u,d)},configurable:!0})})}let Pt=class{constructor(l){l&&this.set(l)}set(l,r,s){const o=this;function u(m,y,p){const b=ar(y);if(!b)throw new Error("header name must be a non-empty string");const g=k.findKey(o,b);(!g||o[g]===void 0||p===!0||p===void 0&&o[g]!==!1)&&(o[g||y]=Io(m))}const d=(m,y)=>k.forEach(m,(p,b)=>u(p,b,y));if(k.isPlainObject(l)||l instanceof this.constructor)d(l,r);else if(k.isString(l)&&(l=l.trim())&&!Nw(l))d(Cw(l),r);else if(k.isObject(l)&&k.isIterable(l)){let m={},y,p;for(const b of l){if(!k.isArray(b))throw TypeError("Object iterator must return a key-value pair");m[p=b[0]]=(y=m[p])?k.isArray(y)?[...y,b[1]]:[y,b[1]]:b[1]}d(m,r)}else l!=null&&u(r,l,s);return this}get(l,r){if(l=ar(l),l){const s=k.findKey(this,l);if(s){const o=this[s];if(!r)return o;if(r===!0)return _w(o);if(k.isFunction(r))return r.call(this,o,s);if(k.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,r){if(l=ar(l),l){const s=k.findKey(this,l);return!!(s&&this[s]!==void 0&&(!r||Pf(this,this[s],s,r)))}return!1}delete(l,r){const s=this;let o=!1;function u(d){if(d=ar(d),d){const m=k.findKey(s,d);m&&(!r||Pf(s,s[m],m,r))&&(delete s[m],o=!0)}}return k.isArray(l)?l.forEach(u):u(l),o}clear(l){const r=Object.keys(this);let s=r.length,o=!1;for(;s--;){const u=r[s];(!l||Pf(this,this[u],u,l,!0))&&(delete this[u],o=!0)}return o}normalize(l){const r=this,s={};return k.forEach(this,(o,u)=>{const d=k.findKey(s,u);if(d){r[d]=Io(o),delete r[u];return}const m=l?jw(u):String(u).trim();m!==u&&delete r[u],r[m]=Io(o),s[m]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const r=Object.create(null);return k.forEach(this,(s,o)=>{s!=null&&s!==!1&&(r[o]=l&&k.isArray(s)?s.join(", "):s)}),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 s=new this(l);return r.forEach(o=>s.set(o)),s}static accessor(l){const s=(this[Sy]=this[Sy]={accessors:{}}).accessors,o=this.prototype;function u(d){const m=ar(d);s[m]||(Aw(o,d),s[m]=!0)}return k.isArray(l)?l.forEach(u):u(l),this}};Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Pt.prototype,({value:n},l)=>{let r=l[0].toUpperCase()+l.slice(1);return{get:()=>n,set(s){this[r]=s}}});k.freezeMethods(Pt);function If(n,l){const r=this||gr,s=l||r,o=Pt.from(s.headers);let u=s.data;return k.forEach(n,function(m){u=m.call(r,u,o.normalize(),l?l.status:void 0)}),o.normalize(),u}function e1(n){return!!(n&&n.__CANCEL__)}function Ps(n,l,r){ve.call(this,n??"canceled",ve.ERR_CANCELED,l,r),this.name="CanceledError"}k.inherits(Ps,ve,{__CANCEL__:!0});function t1(n,l,r){const s=r.config.validateStatus;!r.status||!s||s(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 Tw(n){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return l&&l[1]||""}function Rw(n,l){n=n||10;const r=new Array(n),s=new Array(n);let o=0,u=0,d;return l=l!==void 0?l:1e3,function(y){const p=Date.now(),b=s[u];d||(d=p),r[o]=y,s[o]=p;let g=u,w=0;for(;g!==o;)w+=r[g++],g=g%n;if(o=(o+1)%n,o===u&&(u=(u+1)%n),p-d<l)return;const C=b&&p-b;return C?Math.round(w*1e3/C):void 0}}function Ow(n,l){let r=0,s=1e3/l,o,u;const d=(p,b=Date.now())=>{r=b,o=null,u&&(clearTimeout(u),u=null),n.apply(null,p)};return[(...p)=>{const b=Date.now(),g=b-r;g>=s?d(p,b):(o=p,u||(u=setTimeout(()=>{u=null,d(o)},s-g)))},()=>o&&d(o)]}const uu=(n,l,r=3)=>{let s=0;const o=Rw(50,250);return Ow(u=>{const d=u.loaded,m=u.lengthComputable?u.total:void 0,y=d-s,p=o(y),b=d<=m;s=d;const g={loaded:d,total:m,progress:m?d/m:void 0,bytes:y,rate:p||void 0,estimated:p&&m&&b?(m-d)/p:void 0,event:u,lengthComputable:m!=null,[l?"download":"upload"]:!0};n(g)},r)},wy=(n,l)=>{const r=n!=null;return[s=>l[0]({lengthComputable:r,total:n,loaded:s}),l[1]]},Ey=n=>(...l)=>k.asap(()=>n(...l)),Dw=Mt.hasStandardBrowserEnv?((n,l)=>r=>(r=new URL(r,Mt.origin),n.protocol===r.protocol&&n.host===r.host&&(l||n.port===r.port)))(new URL(Mt.origin),Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent)):()=>!0,Mw=Mt.hasStandardBrowserEnv?{write(n,l,r,s,o,u){const d=[n+"="+encodeURIComponent(l)];k.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),k.isString(s)&&d.push("path="+s),k.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 Lw(n,l){return l?n.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):n}function n1(n,l,r){let s=!Uw(l);return n&&(s||r==!1)?Lw(n,l):l}const Cy=n=>n instanceof Pt?{...n}:n;function Xl(n,l){l=l||{};const r={};function s(p,b,g,w){return k.isPlainObject(p)&&k.isPlainObject(b)?k.merge.call({caseless:w},p,b):k.isPlainObject(b)?k.merge({},b):k.isArray(b)?b.slice():b}function o(p,b,g,w){if(k.isUndefined(b)){if(!k.isUndefined(p))return s(void 0,p,g,w)}else return s(p,b,g,w)}function u(p,b){if(!k.isUndefined(b))return s(void 0,b)}function d(p,b){if(k.isUndefined(b)){if(!k.isUndefined(p))return s(void 0,p)}else return s(void 0,b)}function m(p,b,g){if(g in l)return s(p,b);if(g in n)return s(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,b,g)=>o(Cy(p),Cy(b),g,!0)};return k.forEach(Object.keys(Object.assign({},n,l)),function(b){const g=y[b]||o,w=g(n[b],l[b],b);k.isUndefined(w)&&g!==m||(r[b]=w)}),r}const a1=n=>{const l=Xl({},n);let{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:u,headers:d,auth:m}=l;l.headers=d=Pt.from(d),l.url=Pv(n1(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(k.isFormData(r)){if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((y=d.getContentType())!==!1){const[p,...b]=y?y.split(";").map(g=>g.trim()).filter(Boolean):[];d.setContentType([p||"multipart/form-data",...b].join("; "))}}if(Mt.hasStandardBrowserEnv&&(s&&k.isFunction(s)&&(s=s(l)),s||s!==!1&&Dw(l.url))){const p=o&&u&&Mw.read(u);p&&d.set(o,p)}return l},qw=typeof XMLHttpRequest<"u",zw=qw&&function(n){return new Promise(function(r,s){const o=a1(n);let u=o.data;const d=Pt.from(o.headers).normalize();let{responseType:m,onUploadProgress:y,onDownloadProgress:p}=o,b,g,w,C,E;function A(){C&&C(),E&&E(),o.cancelToken&&o.cancelToken.unsubscribe(b),o.signal&&o.signal.removeEventListener("abort",b)}let N=new XMLHttpRequest;N.open(o.method.toUpperCase(),o.url,!0),N.timeout=o.timeout;function _(){if(!N)return;const T=Pt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),V={data:!m||m==="text"||m==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:T,config:n,request:N};t1(function(G){r(G),A()},function(G){s(G),A()},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&&(s(new ve("Request aborted",ve.ECONNABORTED,n,N)),N=null)},N.onerror=function(){s(new ve("Network Error",ve.ERR_NETWORK,n,N)),N=null},N.ontimeout=function(){let $=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||Iv;o.timeoutErrorMessage&&($=o.timeoutErrorMessage),s(new ve($,V.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,n,N)),N=null},u===void 0&&d.setContentType(null),"setRequestHeader"in N&&k.forEach(d.toJSON(),function($,V){N.setRequestHeader(V,$)}),k.isUndefined(o.withCredentials)||(N.withCredentials=!!o.withCredentials),m&&m!=="json"&&(N.responseType=o.responseType),p&&([w,E]=uu(p,!0),N.addEventListener("progress",w)),y&&N.upload&&([g,C]=uu(y),N.upload.addEventListener("progress",g),N.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(b=T=>{N&&(s(!T||T.type?new Ps(null,n,N):T),N.abort(),N=null)},o.cancelToken&&o.cancelToken.subscribe(b),o.signal&&(o.signal.aborted?b():o.signal.addEventListener("abort",b)));const O=Tw(o.url);if(O&&Mt.protocols.indexOf(O)===-1){s(new ve("Unsupported protocol "+O+":",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 s=new AbortController,o;const u=function(p){if(!o){o=!0,m();const b=p instanceof Error?p:this.reason;s.abort(b instanceof ve?b:new Ps(b instanceof Error?b.message:b))}};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}=s;return y.unsubscribe=()=>k.asap(m),y}},kw=function*(n,l){let r=n.byteLength;if(r<l){yield n;return}let s=0,o;for(;s<r;)o=s+l,yield n.slice(s,o),s=o},Hw=async function*(n,l){for await(const r of Qw(n))yield*kw(r,l)},Qw=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const l=n.getReader();try{for(;;){const{done:r,value:s}=await l.read();if(r)break;yield s}}finally{await l.cancel()}},_y=(n,l,r,s)=>{const o=Hw(n,l);let u=0,d,m=y=>{d||(d=!0,s&&s(y))};return new ReadableStream({async pull(y){try{const{done:p,value:b}=await o.next();if(p){m(),y.close();return}let g=b.byteLength;if(r){let w=u+=g;r(w)}y.enqueue(new Uint8Array(b))}catch(p){throw m(p),p}},cancel(y){return m(y),o.return()}},{highWaterMark:2})},_u=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",l1=_u&&typeof ReadableStream=="function",$w=_u&&(typeof TextEncoder=="function"?(n=>l=>n.encode(l))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),s1=(n,...l)=>{try{return!!n(...l)}catch{return!1}},Yw=l1&&s1(()=>{let n=!1;const l=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!l}),Ny=64*1024,Sd=l1&&s1(()=>k.isReadableStream(new Response("").body)),cu={stream:Sd&&(n=>n.body)};_u&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!cu[l]&&(cu[l]=k.isFunction(n[l])?r=>r[l]():(r,s)=>{throw new ve(`Response type '${l}' is not supported`,ve.ERR_NOT_SUPPORT,s)})})})(new Response);const Vw=async n=>{if(n==null)return 0;if(k.isBlob(n))return n.size;if(k.isSpecCompliantForm(n))return(await new Request(Mt.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(k.isArrayBufferView(n)||k.isArrayBuffer(n))return n.byteLength;if(k.isURLSearchParams(n)&&(n=n+""),k.isString(n))return(await $w(n)).byteLength},Kw=async(n,l)=>{const r=k.toFiniteNumber(n.getContentLength());return r??Vw(l)},Fw=_u&&(async n=>{let{url:l,method:r,data:s,signal:o,cancelToken:u,timeout:d,onDownloadProgress:m,onUploadProgress:y,responseType:p,headers:b,withCredentials:g="same-origin",fetchOptions:w}=a1(n);p=p?(p+"").toLowerCase():"text";let C=Bw([o,u&&u.toAbortSignal()],d),E;const A=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let N;try{if(y&&Yw&&r!=="get"&&r!=="head"&&(N=await Kw(b,s))!==0){let V=new Request(l,{method:"POST",body:s,duplex:"half"}),H;if(k.isFormData(s)&&(H=V.headers.get("content-type"))&&b.setContentType(H),V.body){const[G,Z]=wy(N,uu(Ey(y)));s=_y(V.body,Ny,G,Z)}}k.isString(g)||(g=g?"include":"omit");const _="credentials"in Request.prototype;E=new Request(l,{...w,signal:C,method:r.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:_?g:void 0});let O=await fetch(E);const T=Sd&&(p==="stream"||p==="response");if(Sd&&(m||T&&A)){const V={};["status","statusText","headers"].forEach(te=>{V[te]=O[te]});const H=k.toFiniteNumber(O.headers.get("content-length")),[G,Z]=m&&wy(H,uu(Ey(m),!0))||[];O=new Response(_y(O.body,Ny,G,()=>{Z&&Z(),A&&A()}),V)}p=p||"text";let $=await cu[k.findKey(cu,p)||"text"](O,n);return!T&&A&&A(),await new Promise((V,H)=>{t1(V,H,{data:$,headers:Pt.from(O.headers),status:O.status,statusText:O.statusText,config:n,request:E})})}catch(_){throw A&&A(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,n,E),{cause:_.cause||_}):ve.from(_,_&&_.code,n,E)}}),wd={http:rw,xhr:zw,fetch:Fw};k.forEach(wd,(n,l)=>{if(n){try{Object.defineProperty(n,"name",{value:l})}catch{}Object.defineProperty(n,"adapterName",{value:l})}});const jy=n=>`- ${n}`,Gw=n=>k.isFunction(n)||n===null||n===!1,i1={getAdapter:n=>{n=k.isArray(n)?n:[n];const{length:l}=n;let r,s;const o={};for(let u=0;u<l;u++){r=n[u];let d;if(s=r,!Gw(r)&&(s=wd[(d=String(r)).toLowerCase()],s===void 0))throw new ve(`Unknown adapter '${d}'`);if(s)break;o[d||"#"+u]=s}if(!s){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
+ `+u.map(jy).join(`
55
+ `):" "+jy(u[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return s},adapters:wd};function Wf(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ps(null,n)}function Ay(n){return Wf(n),n.headers=Pt.from(n.headers),n.data=If.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),i1.getAdapter(n.adapter||gr.adapter)(n).then(function(s){return Wf(n),s.data=If.call(n,n.transformResponse,s),s.headers=Pt.from(s.headers),s},function(s){return e1(s)||(Wf(n),s&&s.response&&(s.response.data=If.call(n,n.transformResponse,s.response),s.response.headers=Pt.from(s.response.headers))),Promise.reject(s)})}const r1="1.9.0",Nu={};["object","boolean","number","function","string","symbol"].forEach((n,l)=>{Nu[n]=function(s){return typeof s===n||"a"+(l<1?"n ":" ")+n}});const Ty={};Nu.transitional=function(l,r,s){function o(u,d){return"[Axios v"+r1+"] Transitional option '"+u+"'"+d+(s?". "+s:"")}return(u,d,m)=>{if(l===!1)throw new ve(o(d," has been removed"+(r?" in "+r:"")),ve.ERR_DEPRECATED);return r&&!Ty[d]&&(Ty[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}};Nu.spelling=function(l){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${l}`),!0)};function Xw(n,l,r){if(typeof n!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let o=s.length;for(;o-- >0;){const u=s[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 Wo={assertOptions:Xw,validators:Nu},In=Wo.validators;let Kl=class{constructor(l){this.defaults=l||{},this.interceptors={request:new xy,response:new xy}}async request(l,r){try{return await this._request(l,r)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=o.stack?o.stack.replace(/^.+\n/,""):"";try{s.stack?u&&!String(s.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(s.stack+=`
56
+ `+u):s.stack=u}catch{}}throw s}}_request(l,r){typeof l=="string"?(r=r||{},r.url=l):r=l||{},r=Xl(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:u}=r;s!==void 0&&Wo.assertOptions(s,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1),o!=null&&(k.isFunction(o)?r.paramsSerializer={serialize:o}:Wo.assertOptions(o,{encode:In.function,serialize:In.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Wo.assertOptions(r,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d=u&&k.merge(u.common,u[r.method]);u&&k.forEach(["delete","get","head","post","put","patch","common"],E=>{delete u[E]}),r.headers=Pt.concat(d,u);const m=[];let y=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(r)===!1||(y=y&&A.synchronous,m.unshift(A.fulfilled,A.rejected))});const p=[];this.interceptors.response.forEach(function(A){p.push(A.fulfilled,A.rejected)});let b,g=0,w;if(!y){const E=[Ay.bind(this),void 0];for(E.unshift.apply(E,m),E.push.apply(E,p),w=E.length,b=Promise.resolve(r);g<w;)b=b.then(E[g++],E[g++]);return b}w=m.length;let C=r;for(g=0;g<w;){const E=m[g++],A=m[g++];try{C=E(C)}catch(N){A.call(this,N);break}}try{b=Ay.call(this,C)}catch(E){return Promise.reject(E)}for(g=0,w=p.length;g<w;)b=b.then(p[g++],p[g++]);return b}getUri(l){l=Xl(this.defaults,l);const r=n1(l.baseURL,l.url,l.allowAbsoluteUrls);return Pv(r,l.params,l.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(l){Kl.prototype[l]=function(r,s){return this.request(Xl(s||{},{method:l,url:r,data:(s||{}).data}))}});k.forEach(["post","put","patch"],function(l){function r(s){return function(u,d,m){return this.request(Xl(m||{},{method:l,headers:s?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Kl.prototype[l]=r(),Kl.prototype[l+"Form"]=r(!0)});let Zw=class o1{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 s=this;this.promise.then(o=>{if(!s._listeners)return;let u=s._listeners.length;for(;u-- >0;)s._listeners[u](o);s._listeners=null}),this.promise.then=o=>{let u;const d=new Promise(m=>{s.subscribe(m),u=m}).then(o);return d.cancel=function(){s.unsubscribe(u)},d},l(function(u,d,m){s.reason||(s.reason=new Ps(u,d,m),r(s.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=s=>{l.abort(s)};return this.subscribe(r),l.signal.unsubscribe=()=>this.unsubscribe(r),l.signal}static source(){let l;return{token:new o1(function(o){l=o}),cancel:l}}};function Jw(n){return function(r){return n.apply(null,r)}}function Pw(n){return k.isObject(n)&&n.isAxiosError===!0}const Ed={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(Ed).forEach(([n,l])=>{Ed[l]=n});function u1(n){const l=new Kl(n),r=kv(Kl.prototype.request,l);return k.extend(r,Kl.prototype,l,{allOwnKeys:!0}),k.extend(r,l,null,{allOwnKeys:!0}),r.create=function(o){return u1(Xl(n,o))},r}const lt=u1(gr);lt.Axios=Kl;lt.CanceledError=Ps;lt.CancelToken=Zw;lt.isCancel=e1;lt.VERSION=r1;lt.toFormData=Cu;lt.AxiosError=ve;lt.Cancel=lt.CanceledError;lt.all=function(l){return Promise.all(l)};lt.spread=Jw;lt.isAxiosError=Pw;lt.mergeConfig=Xl;lt.AxiosHeaders=Pt;lt.formToJSON=n=>Wv(k.isHTMLForm(n)?new FormData(n):n);lt.getAdapter=i1.getAdapter;lt.HttpStatusCode=Ed;lt.default=lt;const{Axios:rj,AxiosError:Iw,CanceledError:oj,isCancel:uj,CancelToken:cj,VERSION:fj,all:dj,Cancel:hj,isAxiosError:fu,spread:mj,toFormData:pj,AxiosHeaders:yj,HttpStatusCode:vj,formToJSON:bj,getAdapter:gj,mergeConfig:xj}=lt,Cd="__access_token__",Ww=()=>{try{const n=localStorage.getItem(Cd);return n||void 0}catch{return}},Ho=n=>{n?localStorage.setItem(Cd,n):localStorage.removeItem(Cd)};let e3={data:""},t3=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||e3,n3=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a3=/\/\*[^]*?\*\/| +/g,Ry=/\n+/g,cl=(n,l)=>{let r="",s="",o="";for(let u in n){let d=n[u];u[0]=="@"?u[1]=="i"?r=u+" "+d+";":s+=u[1]=="f"?cl(d,u):u+"{"+cl(d,u[1]=="k"?"":l)+"}":typeof d=="object"?s+=cl(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+=cl.p?cl.p(u,d):u+":"+d+";")}return r+(l&&o?l+"{"+o+"}":o)+s},Aa={},c1=n=>{if(typeof n=="object"){let l="";for(let r in n)l+=r+c1(n[r]);return l}return n},l3=(n,l,r,s,o)=>{let u=c1(n),d=Aa[u]||(Aa[u]=(y=>{let p=0,b=11;for(;p<y.length;)b=101*b+y.charCodeAt(p++)>>>0;return"go"+b})(u));if(!Aa[d]){let y=u!==n?n:(p=>{let b,g,w=[{}];for(;b=n3.exec(p.replace(a3,""));)b[4]?w.shift():b[3]?(g=b[3].replace(Ry," ").trim(),w.unshift(w[0][g]=w[0][g]||{})):w[0][b[1]]=b[2].replace(Ry," ").trim();return w[0]})(n);Aa[d]=cl(o?{["@keyframes "+d]:y}:y,r?"":"."+d)}let m=r&&Aa.g?Aa.g:null;return r&&(Aa.g=Aa[d]),((y,p,b,g)=>{g?p.data=p.data.replace(g,y):p.data.indexOf(y)===-1&&(p.data=b?y+p.data:p.data+y)})(Aa[d],l,s,m),d},s3=(n,l,r)=>n.reduce((s,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?"":cl(m,""):m===!1?"":m}return s+o+(d??"")},"");function ju(n){let l=this||{},r=n.call?n(l.p):n;return l3(r.unshift?r.raw?s3(r,[].slice.call(arguments,1),l.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(l.p):o),{}):r,t3(l.target),l.g,l.o,l.k)}let f1,_d,Nd;ju.bind({g:1});let Ma=ju.bind({k:1});function i3(n,l,r,s){cl.p=l,f1=n,_d=r,Nd=s}function vl(n,l){let r=this||{};return function(){let s=arguments;function o(u,d){let m=Object.assign({},u),y=m.className||o.className;r.p=Object.assign({theme:_d&&_d()},m),r.o=/ *go\d+/.test(y),m.className=ju.apply(r,s)+(y?" "+y:"");let p=n;return n[0]&&(p=m.as||n,delete m.as),Nd&&p[0]&&Nd(m),f1(p,m)}return o}}var r3=n=>typeof n=="function",du=(n,l)=>r3(n)?n(l):n,o3=(()=>{let n=0;return()=>(++n).toString()})(),d1=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");n=!l||l.matches}return n}})(),u3=20,h1=(n,l)=>{switch(l.type){case 0:return{...n,toasts:[l.toast,...n.toasts].slice(0,u3)};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 h1(n,{type:n.toasts.find(u=>u.id===r.id)?1:0,toast:r});case 3:let{toastId:s}=l;return{...n,toasts:n.toasts.map(u=>u.id===s||s===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}))}}},eu=[],Vl={toasts:[],pausedAt:void 0},Pl=n=>{Vl=h1(Vl,n),eu.forEach(l=>{l(Vl)})},c3={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},f3=(n={})=>{let[l,r]=x.useState(Vl),s=x.useRef(Vl);x.useEffect(()=>(s.current!==Vl&&r(Vl),eu.push(r),()=>{let u=eu.indexOf(r);u>-1&&eu.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)||c3[u.type],style:{...n.style,...(y=n[u.type])==null?void 0:y.style,...u.style}}});return{...l,toasts:o}},d3=(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)||o3()}),xr=n=>(l,r)=>{let s=d3(l,n,r);return Pl({type:2,toast:s}),s.id},Qt=(n,l)=>xr("blank")(n,l);Qt.error=xr("error");Qt.success=xr("success");Qt.loading=xr("loading");Qt.custom=xr("custom");Qt.dismiss=n=>{Pl({type:3,toastId:n})};Qt.remove=n=>Pl({type:4,toastId:n});Qt.promise=(n,l,r)=>{let s=Qt.loading(l.loading,{...r,...r==null?void 0:r.loading});return typeof n=="function"&&(n=n()),n.then(o=>{let u=l.success?du(l.success,o):void 0;return u?Qt.success(u,{id:s,...r,...r==null?void 0:r.success}):Qt.dismiss(s),o}).catch(o=>{let u=l.error?du(l.error,o):void 0;u?Qt.error(u,{id:s,...r,...r==null?void 0:r.error}):Qt.dismiss(s)}),n};var h3=(n,l)=>{Pl({type:1,toast:{id:n,height:l}})},m3=()=>{Pl({type:5,time:Date.now()})},ur=new Map,p3=1e3,y3=(n,l=p3)=>{if(ur.has(n))return;let r=setTimeout(()=>{ur.delete(n),Pl({type:4,toastId:n})},l);ur.set(n,r)},v3=n=>{let{toasts:l,pausedAt:r}=f3(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&&Qt.dismiss(m.id);return}return setTimeout(()=>Qt.dismiss(m.id),y)});return()=>{d.forEach(m=>m&&clearTimeout(m))}},[l,r]);let s=x.useCallback(()=>{r&&Pl({type:6,time:Date.now()})},[r]),o=x.useCallback((u,d)=>{let{reverseOrder:m=!1,gutter:y=8,defaultPosition:p}=d||{},b=l.filter(C=>(C.position||p)===(u.position||p)&&C.height),g=b.findIndex(C=>C.id===u.id),w=b.filter((C,E)=>E<g&&C.visible).length;return b.filter(C=>C.visible).slice(...m?[w+1]:[0,w]).reduce((C,E)=>C+(E.height||0)+y,0)},[l]);return x.useEffect(()=>{l.forEach(u=>{if(u.dismissed)y3(u.id,u.removeDelay);else{let d=ur.get(u.id);d&&(clearTimeout(d),ur.delete(u.id))}})},[l]),{toasts:l,handlers:{updateHeight:h3,startPause:m3,endPause:s,calculateOffset:o}}},b3=Ma`
57
57
  from {
58
58
  transform: scale(0) rotate(45deg);
59
59
  opacity: 0;
@@ -77,7 +77,7 @@ from {
77
77
  to {
78
78
  transform: scale(1) rotate(90deg);
79
79
  opacity: 1;
80
- }`,S3=yl("div")`
80
+ }`,S3=vl("div")`
81
81
  width: 20px;
82
82
  opacity: 0;
83
83
  height: 20px;
@@ -117,7 +117,7 @@ to {
117
117
  to {
118
118
  transform: rotate(360deg);
119
119
  }
120
- `,E3=yl("div")`
120
+ `,E3=vl("div")`
121
121
  width: 12px;
122
122
  height: 12px;
123
123
  box-sizing: border-box;
@@ -148,7 +148,7 @@ to {
148
148
  100% {
149
149
  opacity: 1;
150
150
  height: 10px;
151
- }`,N3=yl("div")`
151
+ }`,N3=vl("div")`
152
152
  width: 20px;
153
153
  opacity: 0;
154
154
  height: 20px;
@@ -175,9 +175,9 @@ to {
175
175
  height: 10px;
176
176
  width: 6px;
177
177
  }
178
- `,j3=yl("div")`
178
+ `,j3=vl("div")`
179
179
  position: absolute;
180
- `,A3=yl("div")`
180
+ `,A3=vl("div")`
181
181
  position: relative;
182
182
  display: flex;
183
183
  justify-content: center;
@@ -192,7 +192,7 @@ from {
192
192
  to {
193
193
  transform: scale(1);
194
194
  opacity: 1;
195
- }`,R3=yl("div")`
195
+ }`,R3=vl("div")`
196
196
  position: relative;
197
197
  transform: scale(0.6);
198
198
  opacity: 0.4;
@@ -205,7 +205,7 @@ to {
205
205
  `,M3=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;}",L3="0%{opacity:1;} 100%{opacity:0;}",q3=yl("div")`
208
+ `,U3="0%{opacity:0;} 100%{opacity:1;}",L3="0%{opacity:1;} 100%{opacity:0;}",q3=vl("div")`
209
209
  display: flex;
210
210
  align-items: center;
211
211
  background: #fff;
@@ -217,21 +217,21 @@ to {
217
217
  pointer-events: auto;
218
218
  padding: 8px 10px;
219
219
  border-radius: 8px;
220
- `,z3=yl("div")`
220
+ `,z3=vl("div")`
221
221
  display: flex;
222
222
  justify-content: center;
223
223
  margin: 4px 10px;
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,[s,u]=d1()?[U3,L3]:[D3(r),M3(r)];return{animation:l?`${Ma(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ma(u)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},k3=x.memo(({toast:n,position:l,style:r,children:s})=>{let u=n.height?B3(n.position||l||"top-center",n.visible):{opacity:0},o=x.createElement(O3,{toast:n}),d=x.createElement(z3,{...n.ariaProps},fo(n.message,n));return x.createElement(q3,{className:n.className,style:{...u,...r,...n.style}},typeof s=="function"?s({icon:o,message:d}):x.createElement(x.Fragment,null,o,d))});i3(x.createElement);var H3=({id:n,className:l,style:r,onHeightUpdate:s,children:u})=>{let o=x.useCallback(d=>{if(d){let m=()=>{let y=d.getBoundingClientRect().height;s(n,y)};m(),new MutationObserver(m).observe(d,{subtree:!0,childList:!0,characterData:!0})}},[n,s]);return x.createElement("div",{ref:o,className:l,style:r},u)},Q3=(n,l)=>{let r=n.includes("top"),s=r?{top:0}:{bottom:0},u=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:d1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(r?1:-1)}px)`,...s,...u}},$3=jo`
227
+ `,B3=(n,l)=>{let r=n.includes("top")?1:-1,[s,o]=d1()?[U3,L3]:[D3(r),M3(r)];return{animation:l?`${Ma(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ma(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},k3=x.memo(({toast:n,position:l,style:r,children:s})=>{let o=n.height?B3(n.position||l||"top-center",n.visible):{opacity:0},u=x.createElement(O3,{toast:n}),d=x.createElement(z3,{...n.ariaProps},du(n.message,n));return x.createElement(q3,{className:n.className,style:{...o,...r,...n.style}},typeof s=="function"?s({icon:u,message:d}):x.createElement(x.Fragment,null,u,d))});i3(x.createElement);var H3=({id:n,className:l,style:r,onHeightUpdate:s,children:o})=>{let u=x.useCallback(d=>{if(d){let m=()=>{let y=d.getBoundingClientRect().height;s(n,y)};m(),new MutationObserver(m).observe(d,{subtree:!0,childList:!0,characterData:!0})}},[n,s]);return x.createElement("div",{ref:u,className:l,style:r},o)},Q3=(n,l)=>{let r=n.includes("top"),s=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:d1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(r?1:-1)}px)`,...s,...o}},$3=ju`
228
228
  z-index: 9999;
229
229
  > * {
230
230
  pointer-events: auto;
231
231
  }
232
- `,Hu=16,Y3=({reverseOrder:n,position:l="top-center",toastOptions:r,gutter:s,children:u,containerStyle:o,containerClassName:d})=>{let{toasts:m,handlers:y}=v3(r);return x.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Hu,left:Hu,right:Hu,bottom:Hu,pointerEvents:"none",...o},className:d,onMouseEnter:y.startPause,onMouseLeave:y.endPause},m.map(p=>{let b=p.position||l,g=y.calculateOffset(p,{reverseOrder:n,gutter:s,defaultPosition:l}),w=Q3(b,g);return x.createElement(H3,{id:p.id,key:p.id,onHeightUpdate:y.updateHeight,className:p.visible?$3:"",style:w},p.type==="custom"?fo(p.message,p):u?u(p):x.createElement(k3,{toast:p,position:b}))}))},It=Qt;const ht=new fS({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(n,l)=>{var r;return co(l)&&((r=l.response)==null?void 0:r.status)===404?!1:n<3}}},mutationCache:new Uv({onError:n=>{var l;co(n)&&n.status&&n.status>=400&&n.status<500&&(l=n.response)!=null&&l.data.error&&It.error(n.response.data.error)}})}),V3=async()=>{const{data:n}=await Vd.post("/auth/refresh");return n.data.accessToken},K3=async n=>{const{data:l}=await Vd.post("/auth/login",n);return l.data.accessToken},ed=()=>{ht.invalidateQueries({queryKey:["accessToken"]})},Sr=(()=>{let n=Promise.resolve(Ww()),l=!1;const r=async()=>{await Vd.post("/auth/logout"),ku(void 0),window.location.reload()};return{get:async()=>n.then(d=>(ed(),d)),refresh:()=>(l||(l=!0,n=V3().then(d=>(ku(d),d)).catch(()=>{ku(void 0),r()}).finally(()=>{l=!1,ed()})),n),login:d=>(l||(l=!0,n=K3(d).then(m=>(ku(m),m)).finally(()=>{l=!1,ed()})),n),logout:r}})(),m1=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",Ue=lt.create({baseURL:m1,withCredentials:!0});Ue.interceptors.request.use(async n=>{const l=await Sr.get();return l&&(n.headers.Authorization=`Bearer ${l}`),n});Ue.interceptors.response.use(n=>n,n=>{var l;return co(n)&&n.status===401&&((l=n==null?void 0:n.response)==null?void 0:l.data.error)!=="Missing auth token"&&Sr.refresh(),Promise.reject(n)});const Vd=lt.create({baseURL:m1,withCredentials:!0}),vl="data-sources",p1="auth-user",F3=n=>Wt({queryKey:["project","datasources",n],queryFn:async()=>{const{data:l}=await Ue.get(`/project/team/${n}/datasources`);return l.data},enabled:!!n}),G3=n=>Wt({queryKey:["project","saved-queries",n],queryFn:async()=>{const{data:l}=await Ue.get(`/project/team/${n}/queries`);return l.data},enabled:!!n}),Is=n=>{const l=["project","datasources"],r=["project","saved-queries"];return Promise.all([ht.invalidateQueries(l),ht.invalidateQueries(r)])},X3=n=>{const l=["trash","team"];return ht.invalidateQueries(l)},Z3=(n,l)=>Wt({queryKey:["project",l.teamId,"tables",n,l.selectedDataSources],queryFn:async()=>{const{data:r}=await Ue.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)=>{},P3=()=>{},I3={event:J3,pageView:P3},Ao=n=>Wt([vl,n],async()=>{const{data:l}=await Ue.get("/data-sources/"+n);return l.data},{enabled:!!n}),Kd=n=>Wt({queryKey:[vl,n.teamId],queryFn:async()=>{const{data:l}=await Ue.get("/data-sources",{params:n});return l.data},enabled:n.teamId!==void 0}),Ws=n=>Wt({queryKey:[vl,n,"inspections"],queryFn:async()=>{const{data:l}=await Ue.get(`/data-sources/${n}/inspections`);return l.data},enabled:!!n}),W3=()=>qt(async n=>{const{data:l}=await Ue.post("/data-sources",n);return l.data},{onSuccess:()=>{ht.invalidateQueries([vl]),Is()},onError:()=>{}}),e4=()=>qt({mutationFn:async({dataSource:n,id:l})=>{const{data:r}=await Ue.put(`/data-sources/${l}`,n);return r.data},onSuccess:()=>{ht.invalidateQueries([vl]),Is()}}),y1=()=>qt({mutationFn:async n=>{await Ue.post(`/data-sources/${n}/inspect`)},onSuccess:()=>{ht.invalidateQueries([vl])}}),t4=()=>qt({mutationFn:async n=>{await Ue.delete(`/data-sources/${n}`)},onSuccess:()=>{ht.invalidateQueries([vl]),Is()}}),v1=()=>Wt(["accessToken"],Sr.get),la=()=>{const{data:n}=v1();return Wt({queryKey:[p1],queryFn:async()=>{const{data:l}=await Ue.get("/users");return l.data},enabled:!!n,retry:(l,r)=>co(r)&&r.code==="ERR_NETWORK"?!1:l<3})},n4=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.patch("/users",n);return l.data},onSuccess:async n=>{ht.setQueryData([p1],n)}}),a4=()=>qt({mutationFn:async n=>(await Ue.post("/users",n),!0),onSuccess:()=>{ht.invalidateQueries({queryKey:["team-users"]})}}),l4="_alert_1ln3w_2",s4="_info_1ln3w_2",i4="_danger_1ln3w_2",r4="_success_1ln3w_2",u4="_warning_1ln3w_2",o4="_dark_1ln3w_2",Ls={alert:l4,info:s4,danger:i4,success:r4,warning:u4,dark:o4};function b1(n){var l,r,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(r=b1(n[l]))&&(s&&(s+=" "),s+=r)}else for(r in n)n[r]&&(s&&(s+=" "),s+=r);return s}function le(){for(var n,l,r=0,s="",u=arguments.length;r<u;r++)(n=arguments[r])&&(l=b1(n))&&(s&&(s+=" "),s+=l);return s}const Ut=({variant:n,noRounded:l,className:r,children:s,...u})=>h.jsx("div",{className:le(Ls.alert,!l&&"rounded-lg",(n==="info"||!n)&&Ls.info,n==="danger"&&Ls.danger,n==="dark"&&Ls.dark,n==="warning"&&Ls.warning,n==="success"&&Ls.success,r),role:"alert",...u,children:s}),fn=n=>{const l=new Set;let r=n;const s=m=>(l.add(m),()=>l.delete(m)),u=m=>(l.forEach(y=>y(m)),!0),o=m=>{r=typeof m=="function"?m(r):m,u(r)},d=m=>()=>m?m(r):r;return[m=>x.useSyncExternalStore(s,d(m),d(m)),o,{get:()=>r,subscribe:m=>(m(r),s(m))}]};function c4(n){const l=[];for(const r of n)for(const s of r.columns)s.ref&&(l.push({id:`${r.tableName}->${s.ref.table}.${s.ref.field}`,name:`${r.tableName} in ${s.ref.table}`,where:`${r.tableName}.${s.name} = ${s.ref.table}.${s.ref.field}`,on:{fromTable:s.ref.table,toTable:r.tableName,fromColumn:s.ref.field,toColumn:s.name}}),l.push({id:`${s.ref.table}->${r.tableName}.${s.name}`,name:`${s.ref.table} in ${r.tableName}`,where:`${s.ref.table}.${s.ref.field} = ${r.tableName}.${s.name}`,on:{fromTable:r.tableName,toTable:s.ref.table,fromColumn:s.name,toColumn:s.ref.field}}));return l}const f4=n=>Wt({queryKey:["hooks",n],queryFn:async()=>{const l=await ht.fetchQuery({queryKey:[vl,n,"inspections"],queryFn:async()=>{const{data:r}=await Ue.get(`/data-sources/${n}/inspections`);return r.data}});return c4(l)},enabled:!!n}),Fd=[{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"}],Gd=Fd.reduce((n,l)=>(n[l.value]=l.label,n),{}),Xd=Fd.reduce((n,l)=>(n[l.label]=l.value,n),{}),ei=n=>n.map(l=>({label:Gd[l],value:l})),d4=ei(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]),h4=ei(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);ei(["=","<>","IS NULL","IS NOT NULL"]);const m4=ei(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);ei(["IS NULL","IS NOT NULL"]);ei(["IN","NOT IN"]);const g1=n=>n!=="IS NULL"&&n!=="IS NOT NULL",p4=(n,l)=>g1(n)?n==="IN"||n==="NOT IN"?l.split(",").map(r=>({value:r.trim(),isColumn:!1})):[{value:l,isColumn:!1}]:[],y4=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],v4=["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"],g4=["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 Oy={[Zt.READ_ONLY]:10,[Zt.EDITOR]:20,[Zt.ADMIN]:30,[Zt.OWNER]:40};function x4(n,l){if(!n||!l)return{};const r=new Set;for(const u of l)u.table&&r.add(u.table);const s={};for(const u of r){const o=n.find(d=>d.tableName===u);if(o){s[u]=[];const d=o.columns.filter(m=>m.isPrimary);for(const m of d)if(l.find(p=>p.table===u&&p.column===m.name))s[u].push(m.name);else{delete s[u];break}}}return s}function S4(n,l,r,s){const{data:u}=f4(l),{data:o}=Ws(l);return x.useMemo(()=>{const d=x4(o,n==null?void 0:n.result.columns);return{name:r,tabId:s,hooks:(()=>{const m=[];if(!u||!n||!n.result.columns)return m;for(const y of u)(n.result.tables.includes(y.on.toTable)||n.result.tables.includes(y.on.fromTable))&&m.push(y);return m})(),availableJoins:(()=>{const m=[];if(!u||!n||!n.result.columns)return m;for(const y of u)!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 g;const p=Wn(y),b=(g=n==null?void 0:n.result.columns)==null?void 0:g.findIndex(w=>w.full===p);if(b!=null&&b>-1)return m[b]},getEntityKey:(m,y)=>d[m].reduce((p,b)=>{var w;const g=(w=n==null?void 0:n.result.columns)==null?void 0:w.findIndex(C=>C.column===b&&C.table===m);return g!=null&&g>-1&&p.push([b,y[g]]),p},[]),getColumnType:m=>{const y=n==null?void 0:n.result.allColumns.find(p=>p.full===m);if(y)return y.type}}},[n,l,u,o,r])}function w4(n,l){return x.useMemo(()=>({state:n,setState:l}),[n,l])}function Qs(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 Xe={home:{path:"/"},workbench:{path:"/workbench"},share:{path:"/share"},login:{path:"/login"}},Zd=n=>{ht.setQueryData(["workbench-tabs"],l=>n(l||[]))},E4=(n,l)=>{ht.setQueryData(["workbench-tabs",n],r=>r&&l(r))},Jd=()=>Wt({queryKey:["workbench-tabs"],queryFn:async()=>{const{data:n}=await Ue.get("/workbench-tabs");return n.data}}),C4=n=>Wt({queryKey:["workbench-tabs",n],queryFn:async()=>{const{data:l}=await Ue.get(`/workbench-tabs/${n}`);return l.data}}),ti=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/workbench-tabs",n);return l.data},onSuccess:async n=>{Zd(l=>[...l,n])}}),_4=()=>qt({mutationFn:async n=>(await Ue.patch(`/workbench-tabs/${n}`,{archived:!0}),n),onMutate:n=>{Zd(l=>l.filter(r=>r.id!==n))}}),N4=()=>qt({mutationFn:async({id:n,payload:l})=>(await Ue.patch(`/workbench-tabs/${n}`,l),!0),onMutate:({id:n,payload:l})=>{E4(n,r=>({...r,...l})),Zd(r=>r.map(s=>s.id!==n?s:{...s,name:l.name||s.name}))}}),j4=(n,l)=>{const{dataSourceId:r,searchAll:s,table:u,filters:o,joins:d,orderBy:m,groupBy:y,columns:p,aggregations:b,page:g=0,size:w=20}=l;return Wt({queryKey:["workbench-tab-runner",n,r,u,g,w,o,b,d,m,y,p,s],queryFn:async()=>{const{data:C}=await Ue.post(`/workbench-tabs/${n}/run`,l);return C.data},retry:1,enabled:!!u&&!!r,cacheTime:0})},x1=n=>ht.invalidateQueries({queryKey:["workbench-tab-runner",n]}),[A4,td,T4]=fn(void 0),R4=async()=>new Promise(n=>{td({onCancel:()=>{td(void 0),n(void 0)},onConfirm:(l,r,s)=>{td(void 0),n({dsId:s,id:r,type:l})}})}),wr=n=>{const l=Lt(),r=ti();return x.useEffect(()=>{var s;(s=r==null?void 0:r.data)!=null&&s.id&&l(`${Xe.workbench.path}/tab/${r.data.id}`)},[r.data]),x.useCallback(()=>{T4.get()||R4().then(u=>{(u==null?void 0:u.type)==="table"?r.mutate({name:u.id,opts:Qs({table:u.id,dataSourceId:u.dsId})}):(u==null?void 0:u.type)==="query"&&r.mutate({queryId:u.id})})},[l,n])},Er=n=>{const{data:l}=la();return x.useMemo(()=>l?Oy[l.teamRole]>=Oy[n]:!1,[l,n])},O4="_input_1iwkq_2",D4="_small_1iwkq_2",M4="_content_1iwkq_2",U4="_form_1iwkq_2",L4="_mode-select_1iwkq_2",ke={input:O4,small:D4,content:M4,form:U4,switch:"_switch_1iwkq_2",modeSelect:L4},q4="_modal_15vd9_2",z4="_modal-visible_15vd9_2",B4="_modal-invisible_15vd9_2",k4="_backdrop_15vd9_2",H4="_modal-container_15vd9_2",Q4="_close-button_15vd9_2",ks={modal:q4,modalVisible:z4,modalInvisible:B4,backdrop:k4,modalContainer:H4,closeButton:Q4},Hn=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"})),dn=({children:n,backdropClose:l,isVisible:r,onClose:s,onClosed:u,noPadding:o=!1,portal:d=!1})=>{const[m,y]=x.useState(!1),p=()=>{l&&s()},b=w=>{r||getComputedStyle(w.currentTarget).opacity==="0"&&(y(!1),u&&u())};x.useEffect(()=>{r&&y(!0)},[r]);const g=h.jsxs("div",{onTransitionEnd:b,className:le(ks.modal,r?ks.modalVisible:ks.modalInvisible),children:[h.jsx("div",{onClick:p,className:ks.backdrop}),h.jsx("div",{className:le(ks.modalContainer,o!==!0&&"p-4"),children:m&&n})]});return d?Nv.createPortal(g,document.body):g},sa=({onClick:n})=>{const l=x.useRef(n);return l.current=n,x.useEffect(()=>{const r=s=>{var u;s.key==="Escape"&&((u=l.current)==null||u.call(l))};return window.addEventListener("keyup",r),()=>{window.removeEventListener("keyup",r)}},[]),h.jsx("button",{className:ks.closeButton,onClick:n,children:h.jsx(Hn,{width:20,height:20})})},S1=({children:n})=>h.jsx("h2",{className:"text-xl font-semibold",children:n}),Cr=n=>{const[l,r]=x.useState(n),[s,u]=x.useState([]),o=x.useRef(n),d=x.useCallback((p,b)=>{r(g=>({...g,[p]:b}))},[]),m=x.useCallback(p=>b=>{b.target.type==="checkbox"?d(p,b.target.checked):d(p,b.target.value),u(g=>g.includes(p)?g:[...g,p])},[d]),y=x.useCallback(()=>{r(o.current),u([])},[]);return[l,{set:d,change:m,reset:y,touched:s}]},$4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.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:le(ke.input,ke.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]})]}),Y4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.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:le(ke.input,ke.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Schema"}),h.jsx("input",{value:n.dbSchema,onChange:l("dbSchema"),className:"input"})]})]}),qs=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],V4=({show:n,onClose:l,dbType:r="postgres"})=>{const s=W3(),u=y1(),{data:o}=la(),[d,{change:m,set:y}]=Cr({name:"",dbType:r,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),p=async()=>{const E=await s.mutateAsync({...d,dbPort:Number(d.dbPort),teamId:o.teamId,ownerId:o.id});await u.mutateAsync(E.id),l(),I3.event("Create Datasource",{dbType:d.dbType})},b=E=>{y("allowInsert",!E),y("allowUpdate",!E)},g=()=>{l()},w=s.isLoading||u.isLoading,C=!d.allowInsert&&!d.allowUpdate;return h.jsxs(dn,{isVisible:n,onClose:g,children:[h.jsx(sa,{onClick:g}),h.jsxs(Ut,{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"}),"."]}),s.isError&&h.jsx(Ut,{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."})}),s.isLoading&&h.jsx(Ut,{className:"mb-2",variant:"info",children:"Creating connection"}),u.isLoading&&h.jsx(Ut,{className:"mb-2",variant:"info",children:"Inspecting connection"}),h.jsxs("div",{className:ke.switch,children:[h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===qs[0].tag,onChange:()=>y("dbType",qs[0].tag)}),h.jsx("span",{children:qs[0].label})]}),h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===qs[1].tag,onChange:()=>y("dbType",qs[1].tag)}),h.jsx("span",{children:qs[1].label})]})]}),h.jsxs("div",{className:"overflow-y-auto mt-2",children:[h.jsx("div",{className:ke.content,children:h.jsxs("div",{className:ke.form,children:[h.jsxs("div",{className:le(ke.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:le(ke.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($4,{form:d,change:m}),d.dbType==="postgres"&&h.jsx(Y4,{form:d,change:m})]})}),h.jsxs("div",{className:"mt-4",children:[h.jsxs("label",{className:ke.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:C,onChange:()=>b(!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:ke.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!C,onChange:()=>b(!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:g,className:"button tertiary",disabled:w,children:"Cancel"}),h.jsx("button",{onClick:p,className:"button primary",disabled:w,children:"Create"})]})]})},K4="_data-source-entry_100fy_2",F4="_action-title_100fy_2",G4="_action-subtext_100fy_2",X4="_dev-tag_100fy_2",Z4="_prod-tag_100fy_2",Rn={dataSourceEntry:K4,actionTitle:F4,actionSubtext:G4,devTag:X4,prodTag:Z4},J4=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"})),P4=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"}})),Pd=({size:n,type:l})=>l==="mysql"?h.jsx(J4,{width:n,height:n}):h.jsx(P4,{width:n,height:n}),[I4,$s]=fn(void 0),W4=()=>{const n=wr("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"})]})},eE=()=>{const[n,l]=x.useState(void 0),r=Er(Zt.EDITOR),s=u=>{r?l(u):It.error("You don't have permission to connect new data sources in this team")};return h.jsxs("div",{children:[n&&h.jsx(V4,{show:!0,dbType:n,onClose:()=>l(void 0)}),h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>s("postgres"),children:[h.jsx("p",{className:Rn.actionTitle,children:"🧙‍♂️ Connection wizard"}),h.jsx("p",{className:Rn.actionSubtext,children:"Configure new database connection."})]})]})},tE=()=>{const n=Lt(),{data:l}=Jd(),r=wr("Home"),s=()=>{l&&l.length>0?n(`${Xe.workbench.path}/tab/${l[0].id}`):r()};return h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:s,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."})]})},nE=()=>{const{data:n}=la(),{data:l}=Kd({teamId:n==null?void 0:n.teamId}),r=s=>{$s(s)};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(s=>h.jsxs("div",{className:Rn.dataSourceEntry,onClick:()=>r(s.id),tabIndex:0,children:[h.jsx(Pd,{size:32,type:s.dbType}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:s.name}),s.allowInsert?h.jsx("span",{className:Rn.devTag,children:"dev"}):h.jsx("span",{className:Rn.prodTag,children:"prod"})]})]},s.id))})]})},aE=()=>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"})]})]})]}),lE=()=>{const{data:n}=la(),{data:l}=Kd({teamId:n==null?void 0:n.teamId}),r=!!l&&l.length>0,s=!!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"}),s&&!r&&h.jsx(Ut,{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(W4,{}),h.jsx(eE,{}),s&&h.jsx(tE,{})]}),s&&h.jsx(nE,{}),h.jsx(aE,{})]})})},[sE,Id]=fn(void 0),iE=()=>Id(void 0);function Kl(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 fl=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},rE="_container_frmz8_2",uE="_header_frmz8_2",oE="_fields-container_frmz8_2",cE="_field-label_frmz8_2",fE="_actions_frmz8_2",lr={container:rE,header:uE,fieldsContainer:oE,fieldLabel:cE,actions:fE},ml=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),dE=(n,l,r)=>Wt({queryKey:["entity",n,l,r],queryFn:async()=>{const s=r?r.map(([o,d])=>({id:ml(),column:o,operator:"=",value:[{value:d}],connector:"AND"})):[],{data:u}=await Ue.post("/runner/select",{datasourceId:n,opts:{table:l,filters:s,joins:[],columns:[],orderBy:[],groupBy:[],aggregations:[]},size:1,page:0,name:`Select ${l}: [${r==null?void 0:r.join()}]`});return u.data},retry:1,enabled:!!l&&!!n&&!!r,staleTime:0,cacheTime:0}),hE=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/runner/update",n);return l.data}}),mE=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/runner/insert",n);return l.data}}),Wd=n=>x.useMemo(()=>{var l,r,s;if(n)return n instanceof Iw?(l=n.response)!=null&&l.data.error?n.response.data.error:(s=(r=n.response)==null?void 0:r.data)!=null&&s.message?n.response.data.message:n.message:n instanceof Error?n.message:"Undefined error"},[n]),eh=()=>{const{pathname:n}=Yt();return x.useMemo(()=>{const l=fr({path:`${Xe.workbench.path}/tab/:id`,end:!1},n);return l==null?void 0:l.params.id},[n])},pE=({data:n})=>{const[l,{change:r,touched:s}]=Cr({}),u=eh(),{mutateAsync:o,error:d}=mE(),m=Wd(d),{data:y}=Ws(n.dataSourceId),[p,b]=x.useState(""),g=x.useMemo(()=>y==null?void 0:y.find(E=>E.tableName===n.table),[y,n.table]),w=x.useMemo(()=>{if(!g)return[];if(!p)return g.columns.map(A=>({...A,label:fl(A.name)}));const E=p.toLowerCase();return g.columns.filter(A=>A.name.toLowerCase().includes(E)).map(A=>({...A,label:fl(A.name)}))},[p,g]),C=()=>{const E=[];for(const A of s)E.push({value:l[A],column:A});o({datasourceId:n.dataSourceId,table:n.table,values:E}).then(()=>{iE(),u&&x1(u)})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:lr.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(Ut,{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:lr.container,children:h.jsx("div",{className:lr.fieldsContainer,children:w.map(E=>h.jsxs("label",{className:lr.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[E.isPrimary?"🔐":"🏷️"," ",E.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",E.name,": ",E.type,"]"]})]}),h.jsx("input",{className:"input w-full",value:Kl(l[E.name]),onChange:r(E.name),placeholder:E.name})]},E.name))})}),h.jsxs("div",{className:lr.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:p,onChange:E=>b(E.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{disabled:!s.length,className:"button primary",onClick:C,children:"Run insert"})]})]})},yE=()=>{const n=sE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const s=()=>Id(void 0);return h.jsxs(dn,{isVisible:n!=null,onClose:s,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(sa,{onClick:s}),l&&h.jsx(pE,{data:l})]})},[vE,th]=fn(void 0),bE=()=>th(void 0),gE="_container_164s4_2",xE="_header_164s4_2",SE="_key_164s4_2",wE="_fields-container_164s4_2",EE="_field-label_164s4_2",CE="_actions_164s4_2",zs={container:gE,header:xE,key:SE,fieldsContainer:wE,fieldLabel:EE,actions:CE},_E=({data:n})=>{const[l,{change:r,set:s,reset:u,touched:o}]=Cr({}),d=eh(),[m,y]=x.useState(""),{data:p,isLoading:b}=dE(n.dataSourceId,n.tableName,n.entityId),{mutateAsync:g,error:w}=hE(),C=Wd(w),E=Er(Zt.EDITOR),{data:A}=Ws(n.dataSourceId),{data:N}=Ao(n.dataSourceId),_=x.useMemo(()=>A==null?void 0:A.find(H=>H.tableName===n.tableName),[n.tableName,A]),O=x.useMemo(()=>{if(!_)return[];if(!m)return _.columns.map(G=>({...G,label:fl(G.name)}));const H=m.toLowerCase();return _.columns.filter(G=>G.name.toLowerCase().includes(H)).map(G=>({...G,label:fl(G.name)}))},[m,_]);x.useEffect(()=>{const H=p==null?void 0:p.rows[0];if(u(),H&&(p!=null&&p.columns))for(let G=0;G<p.columns.length;G++){const Z=p.columns[G];s(Z.column,Kl(H[G]))}},[p,s,u]);const T=()=>{const H=[];for(const G of o)H.push({value:l[G],column:G});g({datasourceId:n.dataSourceId,table:n.tableName,filters:n.entityId.map(G=>({id:ml(),value:[{value:G[1]}],column:G[0],connector:"AND",operator:"="})),values:H}).then(()=>{bE(),d&&x1(d)})},$=n.entityId.map(([H,G])=>`${H} = ${G}`).join(", ")||"",V=!(N!=null&&N.allowUpdate)||!E;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:zs.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:zs.key,children:$}),C&&h.jsx(Ut,{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:zs.container,children:h.jsx("div",{className:zs.fieldsContainer,children:O.map(H=>h.jsxs("label",{className:zs.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[H.isPrimary?"🔐":"🏷️"," ",H.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",H.name,": ",H.type,"]"]})]}),h.jsx("input",{disabled:H.isPrimary||b||V,className:"input w-full",value:Kl(l[H.name]),onChange:r(H.name),placeholder:H.name})]},H.name))})}),h.jsxs("div",{className:zs.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:m,onChange:H=>y(H.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),!V&&h.jsx("button",{disabled:!o.length,className:"button primary",onClick:T,children:"Run update"})]})]})},NE=()=>{const n=vE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const s=()=>th(void 0);return h.jsxs(dn,{isVisible:n!=null,onClose:s,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(sa,{onClick:s}),l&&h.jsx(_E,{data:l})]})},[jE,nd]=fn(void 0),w1=async n=>new Promise(l=>{nd({message:n,onCancel:()=>{l(!1),nd(void 0)},onConfirm:()=>{l(!0),nd(void 0)}})}),AE=({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"})]})]}),TE=()=>{const n=jE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(dn,{isVisible:!!n,onClose:()=>n==null?void 0:n.onCancel(),onClosed:()=>r(void 0),children:l&&h.jsx(AE,{confirm:l})})},[RE,eo]=fn(void 0),_r=async(n,l,r)=>new Promise(s=>{eo({message:n,defaultValue:l,alert:r,onCancel:()=>{eo(void 0),s(void 0)},onConfirm:u=>{eo(void 0),s(u)}})}),OE="_root_12mtw_1",DE={root:OE},ME=({data:n})=>{const[l,r]=x.useState("");x.useEffect(()=>{n.defaultValue&&r(n.defaultValue)},[n]);const s=o=>{r(o.target.value)},u=o=>{o.key==="Enter"&&(o.preventDefault(),n.onConfirm(l)),o.key==="Escape"&&(o.preventDefault(),n.onCancel())};return h.jsxs("div",{className:DE.root,children:[h.jsx("h2",{className:"text-xl font-semibold",children:n.message}),n.alert&&h.jsx(Ut,{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:s,onKeyDown:u}),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"})]})]})},UE=()=>{const n=RE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(dn,{isVisible:!!n,onClose:()=>eo(void 0),onClosed:()=>r(void 0),children:l&&h.jsx(ME,{data:l})})},[LE,qE]=fn(void 0),E1=n=>{qE(n)},zE="_textarea_a0xu9_2",BE={textarea:zE},kE=()=>{const n=LE(),l=()=>{n&&(navigator.clipboard.writeText(n.toString()),It.success("Copied!"))},r=()=>E1(void 0);return h.jsxs(dn,{isVisible:!!n,onClose:r,backdropClose:!0,children:[h.jsx("textarea",{className:BE.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"})]})]})},HE="_tabs_ymbqh_2",QE="_mobile_ymbqh_2",$E="_tab_ymbqh_2",YE="_active_ymbqh_2",VE="_close-button_ymbqh_2",sr={tabs:HE,mobile:QE,tab:$E,active:YE,closeButton:VE},Dy=n=>window.matchMedia(n).matches;function nh(n,{defaultValue:l=!1,initializeWithValue:r=!0}={}){const[s,u]=x.useState(()=>r?Dy(n):l);return x.useLayoutEffect(()=>{const o=window.matchMedia(n);function d(){u(()=>Dy(n))}return d(),o.addListener?o.addListener(d):o.addEventListener("change",d),()=>{o.removeListener?o.removeListener(d):o.removeEventListener("change",d)}},[n]),s}const To={laptop:"(min-width: 1024px)"},KE=()=>window.matchMedia(To.laptop).matches,FE="_table_1w6nu_2",GE="_semi-transparent_1w6nu_2",XE="_table-loading_1w6nu_2",ZE="_table-empty_1w6nu_2",JE="_table-row-cells_1w6nu_2",PE="_header-cell_1w6nu_2",IE="_header-actions_1w6nu_2",WE="_cell_1w6nu_2",eC="_cell-actions_1w6nu_2",tC="_table-config_1w6nu_2",nC="_table-action_1w6nu_2",aC="_blue_1w6nu_2",lC="_red_1w6nu_2",sC="_modal_1w6nu_2",iC="_size_1w6nu_2",rC="_options-container_1w6nu_2",uC="_underlying-rows-btn_1w6nu_2",oC="_option-item_1w6nu_2",ae={table:FE,semiTransparent:GE,tableLoading:XE,tableEmpty:ZE,tableRowCells:JE,headerCell:PE,headerActions:IE,cell:WE,cellActions:eC,tableConfig:tC,tableAction:nC,blue:aC,red:lC,modal:sC,size:iC,optionsContainer:rC,underlyingRowsBtn:uC,optionItem:oC},ia=x.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),mt=x.createContext({state:Qs({}),setState:()=>{}}),Qn=x.createContext({}),C1={ON_ANIMATION_END:Symbol("ON_TRANSITION_END")},_1=()=>{const[n,l]=x.useState(),[r,s]=x.useState("hidden");return x.useMemo(()=>{const u=m=>{m.preventDefault(),s("in"),l({x:m.clientX-1,y:m.clientY-1})},o=()=>{s("out")},d=m=>{console.log("onAnimationEnd",m),r==="in"?s("visible"):r==="out"&&(l(void 0),s("hidden"))};return{show:!!n,position:n,state:r,open:u,close:o,[C1.ON_ANIMATION_END]:d}},[n,r])},cC=n=>{if(n==="ASC")return"DESC";if(n!=="DESC")return"ASC"},fC=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(s=>{l(u=>{const o=u.orderBy[0];if(o&&o.column===s){const d=cC(o.direction);return d?{...u,orderBy:[{column:s,direction:d}]}:{...u,orderBy:[]}}return{...u,orderBy:[{column:s,direction:"ASC"}]}})},[l]);return{orderBy:n.orderBy,updateOrderBy:r}};function dC(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 ad(n,l,r){var o,d,m;const s=(d=(o=n==null?void 0:n.rows)==null?void 0:o[l])==null?void 0:d[r],u=(m=n==null?void 0:n.columns)==null?void 0:m[r];return{value:s,column:u}}const hC=()=>{const{data:n}=x.useContext(Qn),{getColumnType:l}=x.useContext(ia),{setState:r}=x.useContext(mt),s=m=>{const{value:y,column:p}=ad(n==null?void 0:n.result,m.row,m.col);if(p){const b=Kl(y,l(p.full));navigator.clipboard.writeText(b),It.success("Copied!")}},u=m=>{const{value:y,column:p}=ad(n==null?void 0:n.result,m.row,m.col);if(p){const b=Kl(y,l(p.full));E1(b)}},o=m=>{const{value:y,column:p}=ad(n==null?void 0:n.result,m.row,m.col);let b=(p==null?void 0:p.full)||"",g;if((p==null?void 0:p.table)===""){It.error("Filtering on aggregated column is not supported yet");return}if(b){let w;if(y==null)w={id:ml(),isEnabled:!0,column:b,connector:"AND",operator:"IS NULL"};else{const C=Kl(y,l(b));w={id:ml(),isEnabled:!0,column:b,connector:"AND",operator:"=",fn:g,value:[{value:C}]}}r(C=>({...C,filters:[...C.filters,w]})),It.success(`Added new filter on column ${p==null?void 0:p.alias}`)}};return m=>{const y=dC(m);y&&(y.action==="copy"?s(y):y.action==="show"?u(y):y.action==="filter"&&o(y))}},mC="_container_1059n_2",pC="_animate-show_1059n_2",yC="_animate-hide_1059n_2",vC="_content_1059n_2",bC="_backdrop_1059n_2",Hl={container:mC,animateShow:pC,animateHide:yC,content:vC,backdrop:bC},N1=({children:n,handler:l})=>{const r=x.useRef(l.close);r.current=l.close,console.log(l);const s=x.useMemo(()=>{if(!l.position)return;const u={};if(typeof window<"u"){const o=l.position.y>window.innerHeight/2,d=l.position.x>window.innerWidth/2;o?u.bottom=window.innerHeight-l.position.y:u.top=l.position.y,KE()?d?u.right=window.innerWidth-l.position.x:u.left=l.position.x:(u.right=36,u.left=36)}return u},[l.position]);return x.useEffect(()=>{const u=o=>{o.code==="Escape"&&r.current()};return window.addEventListener("keyup",u),()=>{window.removeEventListener("keyup",u)}},[]),s?h.jsxs("div",{className:le(Hl.container,l.state==="out"&&Hl.animateHide,l.state==="in"&&Hl.animateShow),onAnimationEnd:l[C1.ON_ANIMATION_END],children:[h.jsx("div",{className:Hl.backdrop,onClick:u=>{u.stopPropagation(),u.preventDefault(),l.close()}}),h.jsx("div",{className:le(Hl.content,l.state==="out"&&Hl.animateHide,l.state==="in"&&Hl.animateShow),style:s,children:n})]}):null},gC="_table_1hlv0_2",xC="_root_1hlv0_2",SC="_content_1hlv0_2",wC="_sub_1hlv0_2",Qu={table:gC,root:xC,content:SC,sub:wC},j1=({hook:n,onClick:l})=>h.jsxs("button",{className:Qu.root,onClick:l,children:[h.jsx("span",{children:"📄"}),h.jsxs("div",{className:Qu.content,children:[h.jsxs("p",{className:Qu.table,children:[" ",n.on.toTable]}),h.jsxs("span",{className:Qu.sub,children:[n.on.toColumn," = ",n.on.fromTable,".",n.on.fromColumn]})]})]},n.where),Xl=(n,l)=>n!=null&&n>l,EC=({handler:n,rowIndex:l})=>{const{hooks:r,entities:s,dataSourceId:u,getEntityKey:o,getValue:d}=x.useContext(ia),{state:m}=x.useContext(mt),{data:y}=x.useContext(Qn),[p,b]=x.useState(""),[g,w]=x.useState(""),C=x.useMemo(()=>y==null?void 0:y.result.rows[l],[y,l]),E=ti(),A=Lt(),N=()=>{C&&E.mutateAsync({name:"⬇️ "+m.table,opts:Qs({joins:m.joins,table:m.table,dataSourceId:m.dataSourceId,filters:[...m.filters,...m.groupBy.map(H=>({id:ml(),connector:"AND",column:H.value,operator:"=",value:[{value:d(C,H)}]}))]})}).then(H=>{A(`${Xe.workbench.path}/tab/${H.id}`),n.close()})},_=H=>{if(!C)return;const G=d(C,{value:`${H.on.fromTable}.${H.on.fromColumn}`});E.mutateAsync({name:`↗️ ${H.on.toColumn} equals ${G}`,opts:Qs({table:H.on.toTable,dataSourceId:u,filters:[{id:ml(),column:`${H.on.toTable}.${H.on.toColumn}`,operator:G==null?"IS NULL":"=",connector:"AND",value:G!=null?[{value:G,isColumn:!1}]:void 0}]})}).then(Z=>{A(`${Xe.workbench.path}/tab/${Z.id}`),n.close()})},O=H=>{if(!C)return;const G=o(H,C);n.close(),th({tableName:H,dataSourceId:u,entityId:G}),n.close()},T=x.useMemo(()=>p?s.filter(H=>H.includes(p)):s,[s,p]),$=x.useMemo(()=>{if(!y)return[];const H=g.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(H):!1)},[g,r,y]),V=m.groupBy.length>0;return h.jsxs(N1,{handler:n,children:[s.length>0&&h.jsxs("div",{className:ae.optionsContainer,children:[h.jsxs("label",{className:"flex items-center gap-2 border-b border-b-gray-200 p-2 bg-(--bg)",children:[h.jsx("span",{className:"font-semibold",children:"📝"}),h.jsx("input",{className:"flex-1 outline-0",placeholder:"Edit/View row",value:p,onChange:H=>b(H.target.value)})]}),h.jsx("div",{className:"flex flex-col overflow-y-auto",children:Xl(T.length,0)?T.map(H=>h.jsx("button",{className:le(ae.optionItem,"font-semibold"),onClick:()=>O(H),children:h.jsxs("span",{children:["📄 ",H]})},H)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),r.length>0&&h.jsxs("div",{className:ae.optionsContainer,children:[h.jsxs("label",{className:"flex items-center gap-2 border-b border-b-gray-200 p-2 bg-(--bg)",children:[h.jsx("span",{className:"font-semibold",children:"↗️"}),h.jsx("input",{className:"flex-1 outline-0",placeholder:"Connected tables",value:g,onChange:H=>w(H.target.value)})]}),h.jsx("div",{className:"flex flex-col overflow-y-auto",children:$.length>0?$.map(H=>h.jsx(j1,{hook:H,onClick:()=>_(H)},H.where)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),V&&h.jsx("button",{onClick:N,className:ae.underlyingRowsBtn,children:"🎯 Underlying rows"})]})},CC={ASC:"⬆️",DESC:"⬇️"},_C=()=>{const{data:n}=x.useContext(Qn),{orderBy:l,updateOrderBy:r}=fC(),s=(n==null?void 0:n.result.columns)||[],u=l[0];return h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("td",{className:"p-1 text-center w-8 text-sm text-gray-600",children:"#"}),s.map(o=>h.jsxs("td",{className:ae.headerCell,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"text-xs truncate",children:o.table||"-"}),h.jsx("p",{className:"text-sm font-bold truncate",children:o.column})]}),h.jsx("div",{className:ae.headerActions,children:h.jsx("button",{onClick:()=>r(o.full),children:(u==null?void 0:u.column)===o.full?CC[u.direction]:"↕️"})})]},o.full))]})})};function NC({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 s=Kl(n);return h.jsxs(h.Fragment,{children:[h.jsx("span",{"data-row":l,className:"truncate block pointer-events-none",children:s}),h.jsxs("div",{className:ae.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 jC=x.memo(({row:n,isLastRow:l,index:r,offset:s})=>h.jsxs("tr",{className:le(ae.tableRowCells,l&&"rounded-b-lg"),children:[h.jsx("td",{className:"p-1 text-center align-middle text-xs w-8 text-blue-500",children:r+1+s}),n.map((u,o)=>h.jsx("td",{className:ae.cell,"data-row":r,children:h.jsx(NC,{value:u,col:o,row:r})},o))]})),AC=()=>{var C,E;const{data:n,error:l,isLoading:r,isFetching:s}=x.useContext(Qn),{state:{page:u,size:o}}=x.useContext(mt),d=Wd(l),m=hC(),y=_1(),[p,b]=x.useState(void 0),g=A=>{var O;const N=(O=A.target)==null?void 0:O.dataset,_=N==null?void 0:N.row;_!=null&&(b(parseInt(_)),y.open(A))},w=u*o;return h.jsxs(h.Fragment,{children:[p!=null&&y.show&&h.jsx(EC,{handler:y,rowIndex:p}),d&&h.jsx(Ut,{className:"my-4",variant:"danger",children:d}),r&&h.jsx("div",{className:ae.tableLoading,children:"Loading data"}),n&&h.jsxs("table",{className:le(ae.table,s&&ae.semiTransparent),onContextMenu:g,onClick:m,children:[h.jsx(_C,{}),h.jsxs("tbody",{children:[((C=n.result.rows)==null?void 0:C.length)<1&&h.jsx("tr",{className:ae.tableEmpty,children:h.jsx("td",{colSpan:n.result.columns.length+1,children:"No data"})}),(E=n.result.rows)==null?void 0:E.map((A,N)=>h.jsx(jC,{index:N,offset:w,row:A,isLastRow:N===n.result.rows.length-1},N))]})]})]})},TC="_root_5bgyw_2",RC="_root-show_5bgyw_2",OC="_content-desktop_5bgyw_2",DC="_content-mobile_5bgyw_2",MC="_card_5bgyw_2",UC="_cards-list_5bgyw_2",LC="_sub-text_5bgyw_2",qC="_text_5bgyw_2",zC="_section-title_5bgyw_2",BC="_sidebar-action_5bgyw_2",kC="_sidebar-add-action_5bgyw_2",HC="_section-container_5bgyw_2",QC="_close-button_5bgyw_2",$C="_section-open-btn_5bgyw_2",YC="_show_5bgyw_2",re={root:TC,rootShow:RC,contentDesktop:OC,contentMobile:DC,card:MC,cardsList:UC,subText:LC,text:qC,sectionTitle:zC,sidebarAction:BC,sidebarAddAction:kC,sectionContainer:HC,closeButton:QC,sectionOpenBtn:$C,show:YC};function VC(n,l){if(!n&&!l)return!0;if(!n||!l||n.length!==l.length)return!1;for(let r=0;r<n.length;r++)if(n[r]!==l[r])return!1;return!0}const A1=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(u=>{l(o=>({...o,filters:u}))},[l]),s=x.useCallback(u=>{l(o=>({...o,filters:o.filters.filter(d=>!(u.column===d.column&&u.operator===d.operator&&VC(u.value,d.value)))}))},[l]);return{filters:n.filters,removeFilter:s,setFilters:r}},KC=(n,l)=>n.type!==l.type||n.on!==l.on||n.table!==l.table,FC=(n,l)=>n.type===l.type&&n.on===l.on&&n.table===l.table,T1=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(s=>{l(u=>{const o=u.joins;if(o.some(m=>FC(m,s))){const m=s.table+".";return{...u,joins:o.filter(y=>KC(y,s)),columns:u.columns.filter(y=>!y.value.startsWith(m)),groupBy:u.groupBy.filter(y=>!y.value.startsWith(m)),orderBy:u.orderBy.filter(y=>!y.column.startsWith(m)),aggregations:u.aggregations.filter(y=>!y.value.startsWith(m)),filters:u.filters.filter(y=>!y.column.startsWith(m))}}return{...u,joins:[...o,s]}})},[l]);return{joins:n.joins,toggle:r}},Ro=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"})),[GC,XC]=fn(!1),ah=()=>XC(n=>!n),ZC="_sidebar_s1p4u_2",JC="_sidebar-visible_s1p4u_2",PC="_sidebar-container_s1p4u_2",IC="_sidebar-invisible_s1p4u_2",WC="_backdrop_s1p4u_2",ir={sidebar:ZC,sidebarVisible:JC,sidebarContainer:PC,sidebarInvisible:IC,backdrop:WC},R1=({children:n,backdropClose:l,isVisible:r,onClose:s,onClosed:u,contentClassName:o})=>{const[d,m]=x.useState(!1),y=x.useRef(s);y.current=s;const p=()=>{l&&s()},b=g=>{r||getComputedStyle(g.currentTarget).opacity==="0"&&(m(!1),u&&u())};return x.useEffect(()=>{r&&m(!0)},[r]),x.useEffect(()=>{const g=w=>{r&&w.key==="Escape"&&y.current()};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[r]),h.jsxs("div",{onTransitionEnd:b,className:le(ir.sidebar,r?ir.sidebarVisible:ir.sidebarInvisible),children:[h.jsx("div",{onClick:p,className:ir.backdrop}),h.jsx("div",{className:le(ir.sidebarContainer,o),children:d&&n})]})},[Oo,lh]=fn({filters:!1,joins:!1,columns:!1,groupBy:!1,aggregate:!1}),Ln=n=>lh(l=>({...l,[n]:!0})),Do=n=>lh(l=>({...l,[n]:!1})),ho=n=>lh(l=>({...l,[n]:!l[n]})),O1=()=>{const n=eh(),l=N4();return{rename:async s=>{if(n){const u=await _r("New tab name",s);u&&await l.mutateAsync({id:n,payload:{name:u}})}return Promise.resolve()}}},e_=()=>{const n=GC();return nh(To.laptop)?h.jsx("div",{className:le(re.root,n&&re.rootShow),children:h.jsxs("div",{className:le(re.contentDesktop,"no-scrollbar"),children:[h.jsx(Uy,{}),h.jsx(My,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(qy,{}),h.jsx(zy,{}),h.jsx(Ly,{})]})}):h.jsx(R1,{isVisible:n,onClose:ah,backdropClose:!0,children:h.jsxs("div",{className:re.contentMobile,children:[h.jsx(Uy,{}),h.jsx(My,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(qy,{}),h.jsx(zy,{}),h.jsx(Ly,{})]})})};function Nr({onShow:n,show:l,title:r,items:s}){return h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("p",{className:re.sectionTitle,children:r}),s>0&&h.jsxs("button",{className:le(re.sectionOpenBtn,l&&re.show),onClick:n,children:[h.jsx("span",{children:s}),h.jsx(Ro,{width:16,height:16})]})]})}function My(){const{name:n}=x.useContext(ia),{data:l}=x.useContext(Qn),{rename:r}=O1(),s=()=>{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:s,children:h.jsx("span",{children:"🖋️ Copy SQL"})})]})}function Uy(){const{state:n}=x.useContext(mt),{data:l}=Ao(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:le(re.text,"text-blue-600"),children:n.table})]})}),h.jsx("div",{className:le(re.card,"mt-2"),children:h.jsxs("div",{children:[h.jsx("p",{className:re.subText,children:"📦 Data source"}),h.jsx("p",{className:le(re.text,"text-blue-600"),children:l==null?void 0:l.name})]})})]})}function Ly(){const{state:n,setState:l}=x.useContext(mt),[r,s]=x.useState(!0),u=o=>{l(d=>({...d,groupBy:d.groupBy.filter(m=>Wn(m)!==o)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"📚 Group by",show:r,onShow:()=>s(!r),items:n.groupBy.length}),r&&n.groupBy.length>0&&h.jsx("div",{className:re.cardsList,children:n.groupBy.map(o=>h.jsxs("div",{className:re.card,children:[h.jsx("span",{className:re.text,children:Wn(o)}),h.jsx("button",{className:re.closeButton,onClick:()=>u(Wn(o)),children:h.jsx(Hn,{width:20,height:20})})]},Wn(o)))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ln("groupBy"),children:[h.jsx("span",{className:"hotkey",children:"G"}),h.jsx("span",{children:"Add group by"})]})]})}function qy(){const{state:n,setState:l}=x.useContext(mt),[r,s]=x.useState(!1),u=d=>{l(m=>({...m,columns:m.columns.filter(y=>Wn(y)!==d)}))},o=n.aggregations.length>0||n.groupBy.length>0;return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"👀 Columns",show:r,onShow:()=>s(!r),items:o?0:n.columns.length}),o&&h.jsx(Ut,{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"})}),!o&&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:()=>u(Wn(d)),children:h.jsx(Hn,{width:20,height:20})})]}))}),!o&&h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ln("columns"),children:[h.jsx("span",{className:"hotkey",children:"C"}),h.jsx("span",{children:"Show/Hide columns"})]})]})}function zy(){const{state:n,setState:l}=x.useContext(mt),[r,s]=x.useState(!0),u=o=>{const d=Wn(o);l(m=>({...m,aggregations:m.aggregations.filter(y=>y.fn!==o.fn||y.value!==o.value),orderBy:m.orderBy.filter(y=>y.column!==d)}))};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"🔢 Aggregations",show:r,onShow:()=>s(!r),items:n.aggregations.length}),r&&n.aggregations.length>0&&h.jsx("div",{className:re.cardsList,children:n.aggregations.map(o=>h.jsxs("div",{className:re.card,children:[h.jsxs("span",{className:re.text,children:[o.fn," ",o.value]}),h.jsx("button",{className:re.closeButton,onClick:()=>u(o),children:h.jsx(Hn,{width:20,height:20})})]}))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ln("aggregate"),children:[h.jsx("span",{className:"hotkey",children:"A"}),h.jsx("span",{children:"Aggregate data"})]})]})}const t_=n=>(n==null?void 0:n.map(l=>l.value).join(", "))||"";function By(){const{state:n}=x.useContext(mt),{removeFilter:l}=A1(),[r,s]=x.useState(!0),u=()=>{Ln("filters")};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"🎚️ Filters",show:r,onShow:()=>s(!r),items:n.filters.length}),r&&n.filters.length>0&&h.jsx("div",{className:re.cardsList,children:n.filters.map((o,d)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:le(re.subText,"truncate"),children:o.column}),h.jsxs("p",{className:le(re.text,"truncate"),children:[Gd[o.operator]," ",t_(o.value)]})]}),h.jsx("button",{className:re.closeButton,onClick:()=>l(o),children:h.jsx(Hn,{width:20,height:20})})]},d))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:u,children:[h.jsx("span",{className:"hotkey",children:"F"}),h.jsx("span",{children:"Filter data"})]})]})}function ky(){const{toggle:n}=T1(),{availableJoins:l}=x.useContext(ia),{state:r}=x.useContext(mt),[s,u]=x.useState(!0);return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"📄 Joins",show:s,onShow:()=>u(!s),items:r.joins.length}),s&&r.joins.length>0&&h.jsx("div",{className:re.cardsList,children:r.joins.map((o,d)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsxs("p",{className:le(re.subText,"truncate"),children:["on ",o.on]}),h.jsx("p",{className:re.text,children:o.table})]}),d===r.joins.length-1&&h.jsx("button",{className:re.closeButton,onClick:()=>n(o),children:h.jsx(Hn,{width:20,height:20})})]},o.table+o.on))}),l.length>0&&h.jsxs("button",{onClick:()=>Ln("joins"),className:re.sidebarAddAction,children:[h.jsx("span",{className:"hotkey",children:"J"}),h.jsx("span",{children:"Join table"})]})]})}function Hy(){const{state:n,setState:l}=x.useContext(mt);if(!n.orderBy.length)return null;const r=s=>{l(u=>({...u,orderBy:u.orderBy.filter(o=>o.column!==s.column&&o.direction!==s.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((s,u)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:le(re.subText,"truncate"),children:s.direction}),h.jsx("p",{className:re.text,children:s.column})]}),h.jsx("button",{className:re.closeButton,onClick:()=>r(s),children:h.jsx(Hn,{width:20,height:20})})]},u))})]})}const D1=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(u=>{l(o=>({...o,page:u}))},[l]),s=x.useCallback(u=>{l(o=>({...o,size:u}))},[l]);return{page:n.page,size:n.size,setSize:s,setPage:r}},n_=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/saved-queries",n);return l.data},onSuccess:()=>{ht.invalidateQueries(["queries"]),Is()}}),a_=()=>qt({mutationFn:async n=>Ue.delete("/saved-queries/"+n),onSuccess:()=>{Is()}}),l_=()=>qt({mutationFn:async({id:n,payload:l})=>{const{data:r}=await Ue.patch("/queries/"+n,l);return r.data},onSuccess:n=>{ht.invalidateQueries(["query",n.id]),Is(),X3(),n.isTrash}}),Ys=Math.min,Fl=Math.max,mo=Math.round,$u=Math.floor,ea=n=>({x:n,y:n}),s_={left:"right",right:"left",bottom:"top",top:"bottom"},i_={start:"end",end:"start"};function jd(n,l,r){return Fl(n,Ys(l,r))}function jr(n,l){return typeof n=="function"?n(l):n}function Zl(n){return n.split("-")[0]}function Ar(n){return n.split("-")[1]}function M1(n){return n==="x"?"y":"x"}function sh(n){return n==="y"?"height":"width"}function dl(n){return["top","bottom"].includes(Zl(n))?"y":"x"}function ih(n){return M1(dl(n))}function r_(n,l,r){r===void 0&&(r=!1);const s=Ar(n),u=ih(n),o=sh(u);let d=u==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return l.reference[o]>l.floating[o]&&(d=po(d)),[d,po(d)]}function u_(n){const l=po(n);return[Ad(n),l,Ad(l)]}function Ad(n){return n.replace(/start|end/g,l=>i_[l])}function o_(n,l,r){const s=["left","right"],u=["right","left"],o=["top","bottom"],d=["bottom","top"];switch(n){case"top":case"bottom":return r?l?u:s:l?s:u;case"left":case"right":return l?o:d;default:return[]}}function c_(n,l,r,s){const u=Ar(n);let o=o_(Zl(n),r==="start",s);return u&&(o=o.map(d=>d+"-"+u),l&&(o=o.concat(o.map(Ad)))),o}function po(n){return n.replace(/left|right|bottom|top/g,l=>s_[l])}function f_(n){return{top:0,right:0,bottom:0,left:0,...n}}function U1(n){return typeof n!="number"?f_(n):{top:n,right:n,bottom:n,left:n}}function yo(n){const{x:l,y:r,width:s,height:u}=n;return{width:s,height:u,top:r,left:l,right:l+s,bottom:r+u,x:l,y:r}}function Qy(n,l,r){let{reference:s,floating:u}=n;const o=dl(l),d=ih(l),m=sh(d),y=Zl(l),p=o==="y",b=s.x+s.width/2-u.width/2,g=s.y+s.height/2-u.height/2,w=s[m]/2-u[m]/2;let C;switch(y){case"top":C={x:b,y:s.y-u.height};break;case"bottom":C={x:b,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:g};break;case"left":C={x:s.x-u.width,y:g};break;default:C={x:s.x,y:s.y}}switch(Ar(l)){case"start":C[d]-=w*(r&&p?-1:1);break;case"end":C[d]+=w*(r&&p?-1:1);break}return C}const d_=async(n,l,r)=>{const{placement:s="bottom",strategy:u="absolute",middleware:o=[],platform:d}=r,m=o.filter(Boolean),y=await(d.isRTL==null?void 0:d.isRTL(l));let p=await d.getElementRects({reference:n,floating:l,strategy:u}),{x:b,y:g}=Qy(p,s,y),w=s,C={},E=0;for(let A=0;A<m.length;A++){const{name:N,fn:_}=m[A],{x:O,y:T,data:$,reset:V}=await _({x:b,y:g,initialPlacement:s,placement:w,strategy:u,middlewareData:C,rects:p,platform:d,elements:{reference:n,floating:l}});b=O??b,g=T??g,C={...C,[N]:{...C[N],...$}},V&&E<=50&&(E++,typeof V=="object"&&(V.placement&&(w=V.placement),V.rects&&(p=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:u}):V.rects),{x:b,y:g}=Qy(p,w,y)),A=-1)}return{x:b,y:g,placement:w,strategy:u,middlewareData:C}};async function L1(n,l){var r;l===void 0&&(l={});const{x:s,y:u,platform:o,rects:d,elements:m,strategy:y}=n,{boundary:p="clippingAncestors",rootBoundary:b="viewport",elementContext:g="floating",altBoundary:w=!1,padding:C=0}=jr(l,n),E=U1(C),N=m[w?g==="floating"?"reference":"floating":g],_=yo(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(N)))==null||r?N:N.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(m.floating)),boundary:p,rootBoundary:b,strategy:y})),O=g==="floating"?{x:s,y:u,width:d.floating.width,height:d.floating.height}:d.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(m.floating)),$=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},V=yo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:T,strategy:y}):O);return{top:(_.top-V.top+E.top)/$.y,bottom:(V.bottom-_.bottom+E.bottom)/$.y,left:(_.left-V.left+E.left)/$.x,right:(V.right-_.right+E.right)/$.x}}const h_=n=>({name:"arrow",options:n,async fn(l){const{x:r,y:s,placement:u,rects:o,platform:d,elements:m,middlewareData:y}=l,{element:p,padding:b=0}=jr(n,l)||{};if(p==null)return{};const g=U1(b),w={x:r,y:s},C=ih(u),E=sh(C),A=await d.getDimensions(p),N=C==="y",_=N?"top":"left",O=N?"bottom":"right",T=N?"clientHeight":"clientWidth",$=o.reference[E]+o.reference[C]-w[C]-o.floating[E],V=w[C]-o.reference[C],H=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let G=H?H[T]:0;(!G||!await(d.isElement==null?void 0:d.isElement(H)))&&(G=m.floating[T]||o.floating[E]);const Z=$/2-V/2,te=G/2-A[E]/2-1,pe=Ys(g[_],te),Re=Ys(g[O],te),ge=pe,Le=G-A[E]-Re,ye=G/2-A[E]/2+Z,Se=jd(ge,ye,Le),B=!y.arrow&&Ar(u)!=null&&ye!==Se&&o.reference[E]/2-(ye<ge?pe:Re)-A[E]/2<0,X=B?ye<ge?ye-ge:ye-Le:0;return{[C]:w[C]+X,data:{[C]:Se,centerOffset:ye-Se-X,...B&&{alignmentOffset:X}},reset:B}}}),m_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var r,s;const{placement:u,middlewareData:o,rects:d,initialPlacement:m,platform:y,elements:p}=l,{mainAxis:b=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:A=!0,...N}=jr(n,l);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const _=Zl(u),O=dl(m),T=Zl(m)===m,$=await(y.isRTL==null?void 0:y.isRTL(p.floating)),V=w||(T||!A?[po(m)]:u_(m)),H=E!=="none";!w&&H&&V.push(...c_(m,A,E,$));const G=[m,...V],Z=await L1(l,N),te=[];let pe=((s=o.flip)==null?void 0:s.overflows)||[];if(b&&te.push(Z[_]),g){const ye=r_(u,d,$);te.push(Z[ye[0]],Z[ye[1]])}if(pe=[...pe,{placement:u,overflows:te}],!te.every(ye=>ye<=0)){var Re,ge;const ye=(((Re=o.flip)==null?void 0:Re.index)||0)+1,Se=G[ye];if(Se&&(!(g==="alignment"?O!==dl(Se):!1)||pe.every(P=>P.overflows[0]>0&&dl(P.placement)===O)))return{data:{index:ye,overflows:pe},reset:{placement:Se}};let B=(ge=pe.filter(X=>X.overflows[0]<=0).sort((X,P)=>X.overflows[1]-P.overflows[1])[0])==null?void 0:ge.placement;if(!B)switch(C){case"bestFit":{var Le;const X=(Le=pe.filter(P=>{if(H){const oe=dl(P.placement);return oe===O||oe==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(oe=>oe>0).reduce((oe,R)=>oe+R,0)]).sort((P,oe)=>P[1]-oe[1])[0])==null?void 0:Le[0];X&&(B=X);break}case"initialPlacement":B=m;break}if(u!==B)return{reset:{placement:B}}}return{}}}};async function p_(n,l){const{placement:r,platform:s,elements:u}=n,o=await(s.isRTL==null?void 0:s.isRTL(u.floating)),d=Zl(r),m=Ar(r),y=dl(r)==="y",p=["left","top"].includes(d)?-1:1,b=o&&y?-1:1,g=jr(l,n);let{mainAxis:w,crossAxis:C,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return m&&typeof E=="number"&&(C=m==="end"?E*-1:E),y?{x:C*b,y:w*p}:{x:w*p,y:C*b}}const y_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var r,s;const{x:u,y:o,placement:d,middlewareData:m}=l,y=await p_(l,n);return d===((r=m.offset)==null?void 0:r.placement)&&(s=m.arrow)!=null&&s.alignmentOffset?{}:{x:u+y.x,y:o+y.y,data:{...y,placement:d}}}}},v_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:r,y:s,placement:u}=l,{mainAxis:o=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:_,y:O}=N;return{x:_,y:O}}},...y}=jr(n,l),p={x:r,y:s},b=await L1(l,y),g=dl(Zl(u)),w=M1(g);let C=p[w],E=p[g];if(o){const N=w==="y"?"top":"left",_=w==="y"?"bottom":"right",O=C+b[N],T=C-b[_];C=jd(O,C,T)}if(d){const N=g==="y"?"top":"left",_=g==="y"?"bottom":"right",O=E+b[N],T=E-b[_];E=jd(O,E,T)}const A=m.fn({...l,[w]:C,[g]:E});return{...A,data:{x:A.x-r,y:A.y-s,enabled:{[w]:o,[g]:d}}}}}};function Mo(){return typeof window<"u"}function ni(n){return q1(n)?(n.nodeName||"").toLowerCase():"#document"}function cn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function ra(n){var l;return(l=(q1(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function q1(n){return Mo()?n instanceof Node||n instanceof cn(n).Node:!1}function zn(n){return Mo()?n instanceof Element||n instanceof cn(n).Element:!1}function ta(n){return Mo()?n instanceof HTMLElement||n instanceof cn(n).HTMLElement:!1}function $y(n){return!Mo()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof cn(n).ShadowRoot}function Tr(n){const{overflow:l,overflowX:r,overflowY:s,display:u}=Bn(n);return/auto|scroll|overlay|hidden|clip/.test(l+s+r)&&!["inline","contents"].includes(u)}function b_(n){return["table","td","th"].includes(ni(n))}function Uo(n){return[":popover-open",":modal"].some(l=>{try{return n.matches(l)}catch{return!1}})}function rh(n){const l=uh(),r=zn(n)?Bn(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>r[s]?r[s]!=="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(s=>(r.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(r.contain||"").includes(s))}function g_(n){let l=pl(n);for(;ta(l)&&!Vs(l);){if(rh(l))return l;if(Uo(l))return null;l=pl(l)}return null}function uh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vs(n){return["html","body","#document"].includes(ni(n))}function Bn(n){return cn(n).getComputedStyle(n)}function Lo(n){return zn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function pl(n){if(ni(n)==="html")return n;const l=n.assignedSlot||n.parentNode||$y(n)&&n.host||ra(n);return $y(l)?l.host:l}function z1(n){const l=pl(n);return Vs(l)?n.ownerDocument?n.ownerDocument.body:n.body:ta(l)&&Tr(l)?l:z1(l)}function hr(n,l,r){var s;l===void 0&&(l=[]),r===void 0&&(r=!0);const u=z1(n),o=u===((s=n.ownerDocument)==null?void 0:s.body),d=cn(u);if(o){const m=Td(d);return l.concat(d,d.visualViewport||[],Tr(u)?u:[],m&&r?hr(m):[])}return l.concat(u,hr(u,[],r))}function Td(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function B1(n){const l=Bn(n);let r=parseFloat(l.width)||0,s=parseFloat(l.height)||0;const u=ta(n),o=u?n.offsetWidth:r,d=u?n.offsetHeight:s,m=mo(r)!==o||mo(s)!==d;return m&&(r=o,s=d),{width:r,height:s,$:m}}function oh(n){return zn(n)?n:n.contextElement}function Hs(n){const l=oh(n);if(!ta(l))return ea(1);const r=l.getBoundingClientRect(),{width:s,height:u,$:o}=B1(l);let d=(o?mo(r.width):r.width)/s,m=(o?mo(r.height):r.height)/u;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const x_=ea(0);function k1(n){const l=cn(n);return!uh()||!l.visualViewport?x_:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function S_(n,l,r){return l===void 0&&(l=!1),!r||l&&r!==cn(n)?!1:l}function Jl(n,l,r,s){l===void 0&&(l=!1),r===void 0&&(r=!1);const u=n.getBoundingClientRect(),o=oh(n);let d=ea(1);l&&(s?zn(s)&&(d=Hs(s)):d=Hs(n));const m=S_(o,r,s)?k1(o):ea(0);let y=(u.left+m.x)/d.x,p=(u.top+m.y)/d.y,b=u.width/d.x,g=u.height/d.y;if(o){const w=cn(o),C=s&&zn(s)?cn(s):s;let E=w,A=Td(E);for(;A&&s&&C!==E;){const N=Hs(A),_=A.getBoundingClientRect(),O=Bn(A),T=_.left+(A.clientLeft+parseFloat(O.paddingLeft))*N.x,$=_.top+(A.clientTop+parseFloat(O.paddingTop))*N.y;y*=N.x,p*=N.y,b*=N.x,g*=N.y,y+=T,p+=$,E=cn(A),A=Td(E)}}return yo({width:b,height:g,x:y,y:p})}function ch(n,l){const r=Lo(n).scrollLeft;return l?l.left+r:Jl(ra(n)).left+r}function H1(n,l,r){r===void 0&&(r=!1);const s=n.getBoundingClientRect(),u=s.left+l.scrollLeft-(r?0:ch(n,s)),o=s.top+l.scrollTop;return{x:u,y:o}}function w_(n){let{elements:l,rect:r,offsetParent:s,strategy:u}=n;const o=u==="fixed",d=ra(s),m=l?Uo(l.floating):!1;if(s===d||m&&o)return r;let y={scrollLeft:0,scrollTop:0},p=ea(1);const b=ea(0),g=ta(s);if((g||!g&&!o)&&((ni(s)!=="body"||Tr(d))&&(y=Lo(s)),ta(s))){const C=Jl(s);p=Hs(s),b.x=C.x+s.clientLeft,b.y=C.y+s.clientTop}const w=d&&!g&&!o?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+b.x+w.x,y:r.y*p.y-y.scrollTop*p.y+b.y+w.y}}function E_(n){return Array.from(n.getClientRects())}function C_(n){const l=ra(n),r=Lo(n),s=n.ownerDocument.body,u=Fl(l.scrollWidth,l.clientWidth,s.scrollWidth,s.clientWidth),o=Fl(l.scrollHeight,l.clientHeight,s.scrollHeight,s.clientHeight);let d=-r.scrollLeft+ch(n);const m=-r.scrollTop;return Bn(s).direction==="rtl"&&(d+=Fl(l.clientWidth,s.clientWidth)-u),{width:u,height:o,x:d,y:m}}function __(n,l){const r=cn(n),s=ra(n),u=r.visualViewport;let o=s.clientWidth,d=s.clientHeight,m=0,y=0;if(u){o=u.width,d=u.height;const p=uh();(!p||p&&l==="fixed")&&(m=u.offsetLeft,y=u.offsetTop)}return{width:o,height:d,x:m,y}}function N_(n,l){const r=Jl(n,!0,l==="fixed"),s=r.top+n.clientTop,u=r.left+n.clientLeft,o=ta(n)?Hs(n):ea(1),d=n.clientWidth*o.x,m=n.clientHeight*o.y,y=u*o.x,p=s*o.y;return{width:d,height:m,x:y,y:p}}function Yy(n,l,r){let s;if(l==="viewport")s=__(n,r);else if(l==="document")s=C_(ra(n));else if(zn(l))s=N_(l,r);else{const u=k1(n);s={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return yo(s)}function Q1(n,l){const r=pl(n);return r===l||!zn(r)||Vs(r)?!1:Bn(r).position==="fixed"||Q1(r,l)}function j_(n,l){const r=l.get(n);if(r)return r;let s=hr(n,[],!1).filter(m=>zn(m)&&ni(m)!=="body"),u=null;const o=Bn(n).position==="fixed";let d=o?pl(n):n;for(;zn(d)&&!Vs(d);){const m=Bn(d),y=rh(d);!y&&m.position==="fixed"&&(u=null),(o?!y&&!u:!y&&m.position==="static"&&!!u&&["absolute","fixed"].includes(u.position)||Tr(d)&&!y&&Q1(n,d))?s=s.filter(b=>b!==d):u=m,d=pl(d)}return l.set(n,s),s}function A_(n){let{element:l,boundary:r,rootBoundary:s,strategy:u}=n;const d=[...r==="clippingAncestors"?Uo(l)?[]:j_(l,this._c):[].concat(r),s],m=d[0],y=d.reduce((p,b)=>{const g=Yy(l,b,u);return p.top=Fl(g.top,p.top),p.right=Ys(g.right,p.right),p.bottom=Ys(g.bottom,p.bottom),p.left=Fl(g.left,p.left),p},Yy(l,m,u));return{width:y.right-y.left,height:y.bottom-y.top,x:y.left,y:y.top}}function T_(n){const{width:l,height:r}=B1(n);return{width:l,height:r}}function R_(n,l,r){const s=ta(l),u=ra(l),o=r==="fixed",d=Jl(n,!0,o,l);let m={scrollLeft:0,scrollTop:0};const y=ea(0);function p(){y.x=ch(u)}if(s||!s&&!o)if((ni(l)!=="body"||Tr(u))&&(m=Lo(l)),s){const C=Jl(l,!0,o,l);y.x=C.x+l.clientLeft,y.y=C.y+l.clientTop}else u&&p();o&&!s&&u&&p();const b=u&&!s&&!o?H1(u,m):ea(0),g=d.left+m.scrollLeft-y.x-b.x,w=d.top+m.scrollTop-y.y-b.y;return{x:g,y:w,width:d.width,height:d.height}}function ld(n){return Bn(n).position==="static"}function Vy(n,l){if(!ta(n)||Bn(n).position==="fixed")return null;if(l)return l(n);let r=n.offsetParent;return ra(n)===r&&(r=r.ownerDocument.body),r}function $1(n,l){const r=cn(n);if(Uo(n))return r;if(!ta(n)){let u=pl(n);for(;u&&!Vs(u);){if(zn(u)&&!ld(u))return u;u=pl(u)}return r}let s=Vy(n,l);for(;s&&b_(s)&&ld(s);)s=Vy(s,l);return s&&Vs(s)&&ld(s)&&!rh(s)?r:s||g_(n)||r}const O_=async function(n){const l=this.getOffsetParent||$1,r=this.getDimensions,s=await r(n.floating);return{reference:R_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function D_(n){return Bn(n).direction==="rtl"}const M_={convertOffsetParentRelativeRectToViewportRelativeRect:w_,getDocumentElement:ra,getClippingRect:A_,getOffsetParent:$1,getElementRects:O_,getClientRects:E_,getDimensions:T_,getScale:Hs,isElement:zn,isRTL:D_};function Y1(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function U_(n,l){let r=null,s;const u=ra(n);function o(){var m;clearTimeout(s),(m=r)==null||m.disconnect(),r=null}function d(m,y){m===void 0&&(m=!1),y===void 0&&(y=1),o();const p=n.getBoundingClientRect(),{left:b,top:g,width:w,height:C}=p;if(m||l(),!w||!C)return;const E=$u(g),A=$u(u.clientWidth-(b+w)),N=$u(u.clientHeight-(g+C)),_=$u(b),T={rootMargin:-E+"px "+-A+"px "+-N+"px "+-_+"px",threshold:Fl(0,Ys(1,y))||1};let $=!0;function V(H){const G=H[0].intersectionRatio;if(G!==y){if(!$)return d();G?d(!1,G):s=setTimeout(()=>{d(!1,1e-7)},1e3)}G===1&&!Y1(p,n.getBoundingClientRect())&&d(),$=!1}try{r=new IntersectionObserver(V,{...T,root:u.ownerDocument})}catch{r=new IntersectionObserver(V,T)}r.observe(n)}return d(!0),o}function L_(n,l,r,s){s===void 0&&(s={});const{ancestorScroll:u=!0,ancestorResize:o=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:y=!1}=s,p=oh(n),b=u||o?[...p?hr(p):[],...hr(l)]:[];b.forEach(_=>{u&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});const g=p&&m?U_(p,r):null;let w=-1,C=null;d&&(C=new ResizeObserver(_=>{let[O]=_;O&&O.target===p&&C&&(C.unobserve(l),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var T;(T=C)==null||T.observe(l)})),r()}),p&&!y&&C.observe(p),C.observe(l));let E,A=y?Jl(n):null;y&&N();function N(){const _=Jl(n);A&&!Y1(A,_)&&r(),A=_,E=requestAnimationFrame(N)}return r(),()=>{var _;b.forEach(O=>{u&&O.removeEventListener("scroll",r),o&&O.removeEventListener("resize",r)}),g==null||g(),(_=C)==null||_.disconnect(),C=null,y&&cancelAnimationFrame(E)}}const q_=y_,z_=v_,B_=m_,k_=h_,Ky=(n,l,r)=>{const s=new Map,u={platform:M_,...r},o={...u.platform,_c:s};return d_(n,l,{...u,platform:o})};var sd={exports:{}};/*!
232
+ `,Qo=16,Y3=({reverseOrder:n,position:l="top-center",toastOptions:r,gutter:s,children:o,containerStyle:u,containerClassName:d})=>{let{toasts:m,handlers:y}=v3(r);return x.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Qo,left:Qo,right:Qo,bottom:Qo,pointerEvents:"none",...u},className:d,onMouseEnter:y.startPause,onMouseLeave:y.endPause},m.map(p=>{let b=p.position||l,g=y.calculateOffset(p,{reverseOrder:n,gutter:s,defaultPosition:l}),w=Q3(b,g);return x.createElement(H3,{id:p.id,key:p.id,onHeightUpdate:y.updateHeight,className:p.visible?$3:"",style:w},p.type==="custom"?du(p.message,p):o?o(p):x.createElement(k3,{toast:p,position:b}))}))},It=Qt;const ht=new fS({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(n,l)=>{var r;return fu(l)&&((r=l.response)==null?void 0:r.status)===404?!1:n<3}}},mutationCache:new Uv({onError:n=>{var l;fu(n)&&n.status&&n.status>=400&&n.status<500&&(l=n.response)!=null&&l.data.error&&It.error(n.response.data.error)}})}),V3=async()=>{const{data:n}=await Vd.post("/auth/refresh");return n.data.accessToken},K3=async n=>{const{data:l}=await Vd.post("/auth/login",n);return l.data.accessToken},ed=()=>{ht.invalidateQueries({queryKey:["accessToken"]})},Sr=(()=>{let n=Promise.resolve(Ww()),l=!1;const r=async()=>{await Vd.post("/auth/logout"),Ho(void 0),window.location.reload()};return{get:async()=>n.then(d=>(ed(),d)),refresh:()=>(l||(l=!0,n=V3().then(d=>(Ho(d),d)).catch(()=>{Ho(void 0),r()}).finally(()=>{l=!1,ed()})),n),login:d=>(l||(l=!0,n=K3(d).then(m=>(Ho(m),m)).finally(()=>{l=!1,ed()})),n),logout:r}})(),m1=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",Ue=lt.create({baseURL:m1,withCredentials:!0});Ue.interceptors.request.use(async n=>{const l=await Sr.get();return l&&(n.headers.Authorization=`Bearer ${l}`),n});Ue.interceptors.response.use(n=>n,n=>{var l;return fu(n)&&n.status===401&&((l=n==null?void 0:n.response)==null?void 0:l.data.error)!=="Missing auth token"&&Sr.refresh(),Promise.reject(n)});const Vd=lt.create({baseURL:m1,withCredentials:!0}),bl="data-sources",p1="auth-user",F3=n=>Wt({queryKey:["project","datasources",n],queryFn:async()=>{const{data:l}=await Ue.get(`/project/team/${n}/datasources`);return l.data},enabled:!!n}),G3=n=>Wt({queryKey:["project","saved-queries",n],queryFn:async()=>{const{data:l}=await Ue.get(`/project/team/${n}/queries`);return l.data},enabled:!!n}),Is=n=>{const l=["project","datasources"],r=["project","saved-queries"];return Promise.all([ht.invalidateQueries(l),ht.invalidateQueries(r)])},X3=n=>{const l=["trash","team"];return ht.invalidateQueries(l)},Z3=(n,l)=>Wt({queryKey:["project",l.teamId,"tables",n,l.selectedDataSources],queryFn:async()=>{const{data:r}=await Ue.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)=>{},P3=()=>{},I3={event:J3,pageView:P3},Au=n=>Wt([bl,n],async()=>{const{data:l}=await Ue.get("/data-sources/"+n);return l.data},{enabled:!!n}),Kd=n=>Wt({queryKey:[bl,n.teamId],queryFn:async()=>{const{data:l}=await Ue.get("/data-sources",{params:n});return l.data},enabled:n.teamId!==void 0}),Ws=n=>Wt({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:l}=await Ue.get(`/data-sources/${n}/inspections`);return l.data},enabled:!!n}),W3=()=>qt(async n=>{const{data:l}=await Ue.post("/data-sources",n);return l.data},{onSuccess:()=>{ht.invalidateQueries([bl]),Is()},onError:()=>{}}),e4=()=>qt({mutationFn:async({dataSource:n,id:l})=>{const{data:r}=await Ue.put(`/data-sources/${l}`,n);return r.data},onSuccess:()=>{ht.invalidateQueries([bl]),Is()}}),y1=()=>qt({mutationFn:async n=>{await Ue.post(`/data-sources/${n}/inspect`)},onSuccess:()=>{ht.invalidateQueries([bl])}}),t4=()=>qt({mutationFn:async n=>{await Ue.delete(`/data-sources/${n}`)},onSuccess:()=>{ht.invalidateQueries([bl]),Is()}}),v1=()=>Wt(["accessToken"],Sr.get),la=()=>{const{data:n}=v1();return Wt({queryKey:[p1],queryFn:async()=>{const{data:l}=await Ue.get("/users");return l.data},enabled:!!n,retry:(l,r)=>fu(r)&&r.code==="ERR_NETWORK"?!1:l<3})},n4=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.patch("/users",n);return l.data},onSuccess:async n=>{ht.setQueryData([p1],n)}}),a4=()=>qt({mutationFn:async n=>(await Ue.post("/users",n),!0),onSuccess:()=>{ht.invalidateQueries({queryKey:["team-users"]})}}),l4="_alert_1fhq9_2",s4="_info_1fhq9_2",i4="_danger_1fhq9_2",r4="_success_1fhq9_2",o4="_warning_1fhq9_2",u4="_dark_1fhq9_2",Ls={alert:l4,info:s4,danger:i4,success:r4,warning:o4,dark:u4};function b1(n){var l,r,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(l=0;l<o;l++)n[l]&&(r=b1(n[l]))&&(s&&(s+=" "),s+=r)}else for(r in n)n[r]&&(s&&(s+=" "),s+=r);return s}function le(){for(var n,l,r=0,s="",o=arguments.length;r<o;r++)(n=arguments[r])&&(l=b1(n))&&(s&&(s+=" "),s+=l);return s}const Ut=({variant:n,noRounded:l,className:r,children:s,...o})=>h.jsx("div",{className:le(Ls.alert,!l&&"rounded-lg",(n==="info"||!n)&&Ls.info,n==="danger"&&Ls.danger,n==="dark"&&Ls.dark,n==="warning"&&Ls.warning,n==="success"&&Ls.success,r),role:"alert",...o,children:s}),fn=n=>{const l=new Set;let r=n;const s=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(s,d(m),d(m)),u,{get:()=>r,subscribe:m=>(m(r),s(m))}]};function c4(n){const l=[];for(const r of n)for(const s of r.columns)s.ref&&(l.push({id:`${r.tableName}->${s.ref.table}.${s.ref.field}`,name:`${r.tableName} in ${s.ref.table}`,where:`${r.tableName}.${s.name} = ${s.ref.table}.${s.ref.field}`,on:{fromTable:s.ref.table,toTable:r.tableName,fromColumn:s.ref.field,toColumn:s.name}}),l.push({id:`${s.ref.table}->${r.tableName}.${s.name}`,name:`${s.ref.table} in ${r.tableName}`,where:`${s.ref.table}.${s.ref.field} = ${r.tableName}.${s.name}`,on:{fromTable:r.tableName,toTable:s.ref.table,fromColumn:s.name,toColumn:s.ref.field}}));return l}const f4=n=>Wt({queryKey:["hooks",n],queryFn:async()=>{const l=await ht.fetchQuery({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:r}=await Ue.get(`/data-sources/${n}/inspections`);return r.data}});return c4(l)},enabled:!!n}),Fd=[{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"}],Gd=Fd.reduce((n,l)=>(n[l.value]=l.label,n),{}),Xd=Fd.reduce((n,l)=>(n[l.label]=l.value,n),{}),ei=n=>n.map(l=>({label:Gd[l],value:l})),d4=ei(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]),h4=ei(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);ei(["=","<>","IS NULL","IS NOT NULL"]);const m4=ei(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);ei(["IS NULL","IS NOT NULL"]);ei(["IN","NOT IN"]);const g1=n=>n!=="IS NULL"&&n!=="IS NOT NULL",p4=(n,l)=>g1(n)?n==="IN"||n==="NOT IN"?l.split(",").map(r=>({value:r.trim(),isColumn:!1})):[{value:l,isColumn:!1}]:[],y4=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],v4=["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"],g4=["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 Oy={[Zt.READ_ONLY]:10,[Zt.EDITOR]:20,[Zt.ADMIN]:30,[Zt.OWNER]:40};function x4(n,l){if(!n||!l)return{};const r=new Set;for(const o of l)o.table&&r.add(o.table);const s={};for(const o of r){const u=n.find(d=>d.tableName===o);if(u){s[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))s[o].push(m.name);else{delete s[o];break}}}return s}function S4(n,l,r,s){const{data:o}=f4(l),{data:u}=Ws(l);return x.useMemo(()=>{const d=x4(u,n==null?void 0:n.result.columns);return{name:r,tabId:s,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 g;const p=Wn(y),b=(g=n==null?void 0:n.result.columns)==null?void 0:g.findIndex(w=>w.full===p);if(b!=null&&b>-1)return m[b]},getEntityKey:(m,y)=>d[m].reduce((p,b)=>{var w;const g=(w=n==null?void 0:n.result.columns)==null?void 0:w.findIndex(C=>C.column===b&&C.table===m);return g!=null&&g>-1&&p.push([b,y[g]]),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 w4(n,l){return x.useMemo(()=>({state:n,setState:l}),[n,l])}function Qs(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 Xe={home:{path:"/"},workbench:{path:"/workbench"},share:{path:"/share"},login:{path:"/login"}},Zd=n=>{ht.setQueryData(["workbench-tabs"],l=>n(l||[]))},E4=(n,l)=>{ht.setQueryData(["workbench-tabs",n],r=>r&&l(r))},Jd=()=>Wt({queryKey:["workbench-tabs"],queryFn:async()=>{const{data:n}=await Ue.get("/workbench-tabs");return n.data}}),C4=n=>Wt({queryKey:["workbench-tabs",n],queryFn:async()=>{const{data:l}=await Ue.get(`/workbench-tabs/${n}`);return l.data}}),ti=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/workbench-tabs",n);return l.data},onSuccess:async n=>{Zd(l=>[...l,n])}}),_4=()=>qt({mutationFn:async n=>(await Ue.patch(`/workbench-tabs/${n}`,{archived:!0}),n),onMutate:n=>{Zd(l=>l.filter(r=>r.id!==n))}}),N4=()=>qt({mutationFn:async({id:n,payload:l})=>(await Ue.patch(`/workbench-tabs/${n}`,l),!0),onMutate:({id:n,payload:l})=>{E4(n,r=>({...r,...l})),Zd(r=>r.map(s=>s.id!==n?s:{...s,name:l.name||s.name}))}}),j4=(n,l)=>{const{dataSourceId:r,searchAll:s,table:o,filters:u,joins:d,orderBy:m,groupBy:y,columns:p,aggregations:b,page:g=0,size:w=20}=l;return Wt({queryKey:["workbench-tab-runner",n,r,o,g,w,u,b,d,m,y,p,s],queryFn:async()=>{const{data:C}=await Ue.post(`/workbench-tabs/${n}/run`,l);return C.data},retry:1,enabled:!!o&&!!r,cacheTime:0})},x1=n=>ht.invalidateQueries({queryKey:["workbench-tab-runner",n]}),[A4,td,T4]=fn(void 0),R4=async()=>new Promise(n=>{td({onCancel:()=>{td(void 0),n(void 0)},onConfirm:(l,r,s)=>{td(void 0),n({dsId:s,id:r,type:l})}})}),wr=n=>{const l=Lt(),r=ti();return x.useEffect(()=>{var s;(s=r==null?void 0:r.data)!=null&&s.id&&l(`${Xe.workbench.path}/tab/${r.data.id}`)},[r.data]),x.useCallback(()=>{T4.get()||R4().then(o=>{(o==null?void 0:o.type)==="table"?r.mutate({name:o.id,opts:Qs({table:o.id,dataSourceId:o.dsId})}):(o==null?void 0:o.type)==="query"&&r.mutate({queryId:o.id})})},[l,n])},Er=n=>{const{data:l}=la();return x.useMemo(()=>l?Oy[l.teamRole]>=Oy[n]:!1,[l,n])},O4="_input_w7ac8_2",D4="_small_w7ac8_2",M4="_content_w7ac8_2",U4="_form_w7ac8_2",L4="_mode-select_w7ac8_2",ke={input:O4,small:D4,content:M4,form:U4,switch:"_switch_w7ac8_2",modeSelect:L4},q4="_modal_v1nct_2",z4="_modal-visible_v1nct_2",B4="_modal-invisible_v1nct_2",k4="_backdrop_v1nct_2",H4="_modal-container_v1nct_2",Q4="_close-button_v1nct_2",ks={modal:q4,modalVisible:z4,modalInvisible:B4,backdrop:k4,modalContainer:H4,closeButton:Q4},Hn=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"})),dn=({children:n,backdropClose:l,isVisible:r,onClose:s,onClosed:o,noPadding:u=!1,portal:d=!1})=>{const[m,y]=x.useState(!1),p=()=>{l&&s()},b=w=>{r||getComputedStyle(w.currentTarget).opacity==="0"&&(y(!1),o&&o())};x.useEffect(()=>{r&&y(!0)},[r]);const g=h.jsxs("div",{onTransitionEnd:b,className:le(ks.modal,r?ks.modalVisible:ks.modalInvisible),children:[h.jsx("div",{onClick:p,className:ks.backdrop}),h.jsx("div",{className:le(ks.modalContainer,u!==!0&&"p-4"),children:m&&n})]});return d?Nv.createPortal(g,document.body):g},sa=({onClick:n})=>{const l=x.useRef(n);return l.current=n,x.useEffect(()=>{const r=s=>{var o;s.key==="Escape"&&((o=l.current)==null||o.call(l))};return window.addEventListener("keyup",r),()=>{window.removeEventListener("keyup",r)}},[]),h.jsx("button",{className:ks.closeButton,onClick:n,children:h.jsx(Hn,{width:20,height:20})})},S1=({children:n})=>h.jsx("h2",{className:"text-xl font-semibold",children:n}),Cr=n=>{const[l,r]=x.useState(n),[s,o]=x.useState([]),u=x.useRef(n),d=x.useCallback((p,b)=>{r(g=>({...g,[p]:b}))},[]),m=x.useCallback(p=>b=>{b.target.type==="checkbox"?d(p,b.target.checked):d(p,b.target.value),o(g=>g.includes(p)?g:[...g,p])},[d]),y=x.useCallback(()=>{r(u.current),o([])},[]);return[l,{set:d,change:m,reset:y,touched:s}]},$4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.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:le(ke.input,ke.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]})]}),Y4=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.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:le(ke.input,ke.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]}),h.jsxs("div",{className:le(ke.input,ke.small),children:[h.jsx("label",{children:"Schema"}),h.jsx("input",{value:n.dbSchema,onChange:l("dbSchema"),className:"input"})]})]}),qs=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],V4=({show:n,onClose:l,dbType:r="postgres"})=>{const s=W3(),o=y1(),{data:u}=la(),[d,{change:m,set:y}]=Cr({name:"",dbType:r,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),p=async()=>{const E=await s.mutateAsync({...d,dbPort:Number(d.dbPort),teamId:u.teamId,ownerId:u.id});await o.mutateAsync(E.id),l(),I3.event("Create Datasource",{dbType:d.dbType})},b=E=>{y("allowInsert",!E),y("allowUpdate",!E)},g=()=>{l()},w=s.isLoading||o.isLoading,C=!d.allowInsert&&!d.allowUpdate;return h.jsxs(dn,{isVisible:n,onClose:g,children:[h.jsx(sa,{onClick:g}),h.jsxs(Ut,{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"}),"."]}),s.isError&&h.jsx(Ut,{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."})}),s.isLoading&&h.jsx(Ut,{className:"mb-2",variant:"info",children:"Creating connection"}),o.isLoading&&h.jsx(Ut,{className:"mb-2",variant:"info",children:"Inspecting connection"}),h.jsxs("div",{className:ke.switch,children:[h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===qs[0].tag,onChange:()=>y("dbType",qs[0].tag)}),h.jsx("span",{children:qs[0].label})]}),h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===qs[1].tag,onChange:()=>y("dbType",qs[1].tag)}),h.jsx("span",{children:qs[1].label})]})]}),h.jsxs("div",{className:"overflow-y-auto mt-2",children:[h.jsx("div",{className:ke.content,children:h.jsxs("div",{className:ke.form,children:[h.jsxs("div",{className:le(ke.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:le(ke.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($4,{form:d,change:m}),d.dbType==="postgres"&&h.jsx(Y4,{form:d,change:m})]})}),h.jsxs("div",{className:"mt-4",children:[h.jsxs("label",{className:ke.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:C,onChange:()=>b(!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:ke.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!C,onChange:()=>b(!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:g,className:"button tertiary",disabled:w,children:"Cancel"}),h.jsx("button",{onClick:p,className:"button primary",disabled:w,children:"Create"})]})]})},K4="_data-source-entry_129br_2",F4="_action-title_129br_2",G4="_action-subtext_129br_2",X4="_dev-tag_129br_2",Z4="_prod-tag_129br_2",Rn={dataSourceEntry:K4,actionTitle:F4,actionSubtext:G4,devTag:X4,prodTag:Z4},J4=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"})),P4=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"}})),Pd=({size:n,type:l})=>l==="mysql"?h.jsx(J4,{width:n,height:n}):h.jsx(P4,{width:n,height:n}),[I4,$s]=fn(void 0),W4=()=>{const n=wr("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"})]})},eE=()=>{const[n,l]=x.useState(void 0),r=Er(Zt.EDITOR),s=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(V4,{show:!0,dbType:n,onClose:()=>l(void 0)}),h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>s("postgres"),children:[h.jsx("p",{className:Rn.actionTitle,children:"🧙‍♂️ Connection wizard"}),h.jsx("p",{className:Rn.actionSubtext,children:"Configure new database connection."})]})]})},tE=()=>{const n=Lt(),{data:l}=Jd(),r=wr("Home"),s=()=>{l&&l.length>0?n(`${Xe.workbench.path}/tab/${l[0].id}`):r()};return h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:s,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."})]})},nE=()=>{const{data:n}=la(),{data:l}=Kd({teamId:n==null?void 0:n.teamId}),r=s=>{$s(s)};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(s=>h.jsxs("div",{className:Rn.dataSourceEntry,onClick:()=>r(s.id),tabIndex:0,children:[h.jsx(Pd,{size:32,type:s.dbType}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:s.name}),s.allowInsert?h.jsx("span",{className:Rn.devTag,children:"dev"}):h.jsx("span",{className:Rn.prodTag,children:"prod"})]})]},s.id))})]})},aE=()=>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"})]})]})]}),lE=()=>{const{data:n}=la(),{data:l}=Kd({teamId:n==null?void 0:n.teamId}),r=!!l&&l.length>0,s=!!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"}),s&&!r&&h.jsx(Ut,{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(W4,{}),h.jsx(eE,{}),s&&h.jsx(tE,{})]}),s&&h.jsx(nE,{}),h.jsx(aE,{})]})})},[sE,Id]=fn(void 0),iE=()=>Id(void 0);function Fl(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 fl=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},rE="_container_f8byr_2",oE="_header_f8byr_2",uE="_fields-container_f8byr_2",cE="_field-label_f8byr_2",fE="_actions_f8byr_2",lr={container:rE,header:oE,fieldsContainer:uE,fieldLabel:cE,actions:fE},ml=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),dE=(n,l,r)=>Wt({queryKey:["entity",n,l,r],queryFn:async()=>{const s=r?r.map(([u,d])=>({id:ml(),column:u,operator:"=",value:[{value:d}],connector:"AND"})):[],{data:o}=await Ue.post("/runner/select",{datasourceId:n,opts:{table:l,filters:s,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}),hE=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/runner/update",n);return l.data}}),mE=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/runner/insert",n);return l.data}}),Wd=n=>x.useMemo(()=>{var l,r,s;if(n)return n instanceof Iw?(l=n.response)!=null&&l.data.error?n.response.data.error:(s=(r=n.response)==null?void 0:r.data)!=null&&s.message?n.response.data.message:n.message:n instanceof Error?n.message:"Undefined error"},[n]),eh=()=>{const{pathname:n}=Yt();return x.useMemo(()=>{const l=fr({path:`${Xe.workbench.path}/tab/:id`,end:!1},n);return l==null?void 0:l.params.id},[n])},pE=({data:n})=>{const[l,{change:r,touched:s}]=Cr({}),o=eh(),{mutateAsync:u,error:d}=mE(),m=Wd(d),{data:y}=Ws(n.dataSourceId),[p,b]=x.useState(""),g=x.useMemo(()=>y==null?void 0:y.find(E=>E.tableName===n.table),[y,n.table]),w=x.useMemo(()=>{if(!g)return[];if(!p)return g.columns.map(A=>({...A,label:fl(A.name)}));const E=p.toLowerCase();return g.columns.filter(A=>A.name.toLowerCase().includes(E)).map(A=>({...A,label:fl(A.name)}))},[p,g]),C=()=>{const E=[];for(const A of s)E.push({value:l[A],column:A});u({datasourceId:n.dataSourceId,table:n.table,values:E}).then(()=>{iE(),o&&x1(o)})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:lr.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(Ut,{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:lr.container,children:h.jsx("div",{className:lr.fieldsContainer,children:w.map(E=>h.jsxs("label",{className:lr.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[E.isPrimary?"🔐":"🏷️"," ",E.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",E.name,": ",E.type,"]"]})]}),h.jsx("input",{className:"input w-full",value:Fl(l[E.name]),onChange:r(E.name),placeholder:E.name})]},E.name))})}),h.jsxs("div",{className:lr.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:p,onChange:E=>b(E.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{disabled:!s.length,className:"button primary",onClick:C,children:"Run insert"})]})]})},yE=()=>{const n=sE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const s=()=>Id(void 0);return h.jsxs(dn,{isVisible:n!=null,onClose:s,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(sa,{onClick:s}),l&&h.jsx(pE,{data:l})]})},[vE,th]=fn(void 0),bE=()=>th(void 0),gE="_container_nx8fv_2",xE="_header_nx8fv_2",SE="_key_nx8fv_2",wE="_fields-container_nx8fv_2",EE="_field-label_nx8fv_2",CE="_actions_nx8fv_2",zs={container:gE,header:xE,key:SE,fieldsContainer:wE,fieldLabel:EE,actions:CE},_E=({data:n})=>{const[l,{change:r,set:s,reset:o,touched:u}]=Cr({}),d=eh(),[m,y]=x.useState(""),{data:p,isLoading:b}=dE(n.dataSourceId,n.tableName,n.entityId),{mutateAsync:g,error:w}=hE(),C=Wd(w),E=Er(Zt.EDITOR),{data:A}=Ws(n.dataSourceId),{data:N}=Au(n.dataSourceId),_=x.useMemo(()=>A==null?void 0:A.find(H=>H.tableName===n.tableName),[n.tableName,A]),O=x.useMemo(()=>{if(!_)return[];if(!m)return _.columns.map(G=>({...G,label:fl(G.name)}));const H=m.toLowerCase();return _.columns.filter(G=>G.name.toLowerCase().includes(H)).map(G=>({...G,label:fl(G.name)}))},[m,_]);x.useEffect(()=>{const H=p==null?void 0:p.rows[0];if(o(),H&&(p!=null&&p.columns))for(let G=0;G<p.columns.length;G++){const Z=p.columns[G];s(Z.column,Fl(H[G]))}},[p,s,o]);const T=()=>{const H=[];for(const G of u)H.push({value:l[G],column:G});g({datasourceId:n.dataSourceId,table:n.tableName,filters:n.entityId.map(G=>({id:ml(),value:[{value:G[1]}],column:G[0],connector:"AND",operator:"="})),values:H}).then(()=>{bE(),d&&x1(d)})},$=n.entityId.map(([H,G])=>`${H} = ${G}`).join(", ")||"",V=!(N!=null&&N.allowUpdate)||!E;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:zs.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:zs.key,children:$}),C&&h.jsx(Ut,{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:zs.container,children:h.jsx("div",{className:zs.fieldsContainer,children:O.map(H=>h.jsxs("label",{className:zs.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[H.isPrimary?"🔐":"🏷️"," ",H.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",H.name,": ",H.type,"]"]})]}),h.jsx("input",{disabled:H.isPrimary||b||V,className:"input w-full",value:Fl(l[H.name]),onChange:r(H.name),placeholder:H.name})]},H.name))})}),h.jsxs("div",{className:zs.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:m,onChange:H=>y(H.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),!V&&h.jsx("button",{disabled:!u.length,className:"button primary",onClick:T,children:"Run update"})]})]})},NE=()=>{const n=vE(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const s=()=>th(void 0);return h.jsxs(dn,{isVisible:n!=null,onClose:s,onClosed:()=>r(void 0),noPadding:!0,children:[h.jsx(sa,{onClick:s}),l&&h.jsx(_E,{data:l})]})},[jE,nd]=fn(void 0),w1=async n=>new Promise(l=>{nd({message:n,onCancel:()=>{l(!1),nd(void 0)},onConfirm:()=>{l(!0),nd(void 0)}})}),AE=({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"})]})]}),TE=()=>{const n=jE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(dn,{isVisible:!!n,onClose:()=>n==null?void 0:n.onCancel(),onClosed:()=>r(void 0),children:l&&h.jsx(AE,{confirm:l})})},[RE,tu]=fn(void 0),_r=async(n,l,r)=>new Promise(s=>{tu({message:n,defaultValue:l,alert:r,onCancel:()=>{tu(void 0),s(void 0)},onConfirm:o=>{tu(void 0),s(o)}})}),OE="_root_12mtw_1",DE={root:OE},ME=({data:n})=>{const[l,r]=x.useState("");x.useEffect(()=>{n.defaultValue&&r(n.defaultValue)},[n]);const s=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:DE.root,children:[h.jsx("h2",{className:"text-xl font-semibold",children:n.message}),n.alert&&h.jsx(Ut,{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:s,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"})]})]})},UE=()=>{const n=RE(),[l,r]=x.useState(void 0);return x.useEffect(()=>{n&&r(n)},[n]),h.jsx(dn,{isVisible:!!n,onClose:()=>tu(void 0),onClosed:()=>r(void 0),children:l&&h.jsx(ME,{data:l})})},[LE,qE]=fn(void 0),E1=n=>{qE(n)},zE="_textarea_1ej8m_2",BE={textarea:zE},kE=()=>{const n=LE(),l=()=>{n&&(navigator.clipboard.writeText(n.toString()),It.success("Copied!"))},r=()=>E1(void 0);return h.jsxs(dn,{isVisible:!!n,onClose:r,backdropClose:!0,children:[h.jsx("textarea",{className:BE.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"})]})]})},HE="_tabs_emj2e_2",QE="_mobile_emj2e_2",$E="_tab_emj2e_2",YE="_active_emj2e_2",VE="_close-button_emj2e_2",sr={tabs:HE,mobile:QE,tab:$E,active:YE,closeButton:VE},Dy=n=>window.matchMedia(n).matches;function nh(n,{defaultValue:l=!1,initializeWithValue:r=!0}={}){const[s,o]=x.useState(()=>r?Dy(n):l);return x.useLayoutEffect(()=>{const u=window.matchMedia(n);function d(){o(()=>Dy(n))}return d(),u.addListener?u.addListener(d):u.addEventListener("change",d),()=>{u.removeListener?u.removeListener(d):u.removeEventListener("change",d)}},[n]),s}const Tu={laptop:"(min-width: 1024px)"},KE=()=>window.matchMedia(Tu.laptop).matches,FE="_table_1ts3r_2",GE="_semi-transparent_1ts3r_2",XE="_table-loading_1ts3r_2",ZE="_table-empty_1ts3r_2",JE="_table-row-cells_1ts3r_2",PE="_header-cell_1ts3r_2",IE="_header-actions_1ts3r_2",WE="_cell_1ts3r_2",eC="_cell-actions_1ts3r_2",tC="_value_1ts3r_2",nC="_table-config_1ts3r_2",aC="_table-action_1ts3r_2",lC="_blue_1ts3r_2",sC="_red_1ts3r_2",iC="_modal_1ts3r_2",rC="_size_1ts3r_2",oC="_options-container_1ts3r_2",uC="_underlying-rows-btn_1ts3r_2",cC="_option-item_1ts3r_2",ae={table:FE,semiTransparent:GE,tableLoading:XE,tableEmpty:ZE,tableRowCells:JE,headerCell:PE,headerActions:IE,cell:WE,cellActions:eC,value:tC,tableConfig:nC,tableAction:aC,blue:lC,red:sC,modal:iC,size:rC,optionsContainer:oC,underlyingRowsBtn:uC,optionItem:cC},ia=x.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),mt=x.createContext({state:Qs({}),setState:()=>{}}),Qn=x.createContext({}),C1={ON_ANIMATION_END:Symbol("ON_TRANSITION_END")},_1=()=>{const[n,l]=x.useState(),[r,s]=x.useState("hidden");return x.useMemo(()=>{const o=m=>{m.preventDefault(),s("in"),l({x:m.clientX-1,y:m.clientY-1})},u=()=>{s("out")},d=m=>{console.log("onAnimationEnd",m),r==="in"?s("visible"):r==="out"&&(l(void 0),s("hidden"))};return{show:!!n,position:n,state:r,open:o,close:u,[C1.ON_ANIMATION_END]:d}},[n,r])},fC=n=>{if(n==="ASC")return"DESC";if(n!=="DESC")return"ASC"},dC=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(s=>{l(o=>{const u=o.orderBy[0];if(u&&u.column===s){const d=fC(u.direction);return d?{...o,orderBy:[{column:s,direction:d}]}:{...o,orderBy:[]}}return{...o,orderBy:[{column:s,direction:"ASC"}]}})},[l]);return{orderBy:n.orderBy,updateOrderBy:r}};function hC(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 ad(n,l,r){var u,d,m;const s=(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:s,column:o}}const mC=()=>{const{data:n}=x.useContext(Qn),{getColumnType:l}=x.useContext(ia),{setState:r}=x.useContext(mt),s=m=>{const{value:y,column:p}=ad(n==null?void 0:n.result,m.row,m.col);if(p){const b=Fl(y,l(p.full));navigator.clipboard.writeText(b),It.success("Copied!")}},o=m=>{const{value:y,column:p}=ad(n==null?void 0:n.result,m.row,m.col);if(p){const b=Fl(y,l(p.full));E1(b)}},u=m=>{const{value:y,column:p}=ad(n==null?void 0:n.result,m.row,m.col);let b=(p==null?void 0:p.full)||"",g;if((p==null?void 0:p.table)===""){It.error("Filtering on aggregated column is not supported yet");return}if(b){let w;if(y==null)w={id:ml(),isEnabled:!0,column:b,connector:"AND",operator:"IS NULL"};else{const C=Fl(y,l(b));w={id:ml(),isEnabled:!0,column:b,connector:"AND",operator:"=",fn:g,value:[{value:C}]}}r(C=>({...C,filters:[...C.filters,w]})),It.success(`Added new filter on column ${p==null?void 0:p.alias}`)}};return m=>{const y=hC(m);y&&(y.action==="copy"?s(y):y.action==="show"?o(y):y.action==="filter"&&u(y))}},pC="_container_18z77_2",yC="_animate-show_18z77_2",vC="_animate-hide_18z77_2",bC="_content_18z77_2",gC="_backdrop_18z77_2",Ql={container:pC,animateShow:yC,animateHide:vC,content:bC,backdrop:gC},N1=({children:n,handler:l})=>{const r=x.useRef(l.close);r.current=l.close,console.log(l);const s=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,KE()?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)}},[]),s?h.jsxs("div",{className:le(Ql.container,l.state==="out"&&Ql.animateHide,l.state==="in"&&Ql.animateShow),onAnimationEnd:l[C1.ON_ANIMATION_END],children:[h.jsx("div",{className:Ql.backdrop,onClick:o=>{o.stopPropagation(),o.preventDefault(),l.close()}}),h.jsx("div",{className:le(Ql.content,l.state==="out"&&Ql.animateHide,l.state==="in"&&Ql.animateShow),style:s,children:n})]}):null},xC="_table_78jm6_2",SC="_root_78jm6_2",wC="_content_78jm6_2",EC="_sub_78jm6_2",$o={table:xC,root:SC,content:wC,sub:EC},j1=({hook:n,onClick:l})=>h.jsxs("button",{className:$o.root,onClick:l,children:[h.jsx("span",{children:"📄"}),h.jsxs("div",{className:$o.content,children:[h.jsxs("p",{className:$o.table,children:[" ",n.on.toTable]}),h.jsxs("span",{className:$o.sub,children:[n.on.toColumn," = ",n.on.fromTable,".",n.on.fromColumn]})]})]},n.where),pl=(n,l)=>n!=null&&n>l,CC=({handler:n,rowIndex:l})=>{const{hooks:r,entities:s,dataSourceId:o,getEntityKey:u,getValue:d}=x.useContext(ia),{state:m}=x.useContext(mt),{data:y}=x.useContext(Qn),[p,b]=x.useState(""),[g,w]=x.useState(""),C=x.useMemo(()=>y==null?void 0:y.result.rows[l],[y,l]),E=ti(),A=Lt(),N=()=>{C&&E.mutateAsync({name:"⬇️ "+m.table,opts:Qs({joins:m.joins,table:m.table,dataSourceId:m.dataSourceId,filters:[...m.filters,...m.groupBy.map(H=>({id:ml(),connector:"AND",column:H.value,operator:"=",value:[{value:d(C,H)}]}))]})}).then(H=>{A(`${Xe.workbench.path}/tab/${H.id}`),n.close()})},_=H=>{if(!C)return;const G=d(C,{value:`${H.on.fromTable}.${H.on.fromColumn}`});E.mutateAsync({name:`↗️ ${H.on.toColumn} equals ${G}`,opts:Qs({table:H.on.toTable,dataSourceId:o,filters:[{id:ml(),column:`${H.on.toTable}.${H.on.toColumn}`,operator:G==null?"IS NULL":"=",connector:"AND",value:G!=null?[{value:G,isColumn:!1}]:void 0}]})}).then(Z=>{A(`${Xe.workbench.path}/tab/${Z.id}`),n.close()})},O=H=>{if(!C)return;const G=u(H,C);n.close(),th({tableName:H,dataSourceId:o,entityId:G}),n.close()},T=x.useMemo(()=>p?s.filter(H=>H.includes(p)):s,[s,p]),$=x.useMemo(()=>{if(!y)return[];const H=g.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(H):!1)},[g,r,y]),V=m.groupBy.length>0;return h.jsxs(N1,{handler:n,children:[s.length>0&&h.jsxs("div",{className:ae.optionsContainer,children:[h.jsxs("label",{className:"flex items-center justify-between gap-2 border-b border-b-gray-200 p-2",children:[h.jsx("span",{className:"font-semibold",children:"📝 Edit row"}),h.jsx("input",{className:"input",placeholder:"Filter entities",value:p,onChange:H=>b(H.target.value)})]}),h.jsx("div",{className:"flex flex-col overflow-y-auto",children:pl(T.length,0)?T.map(H=>h.jsx("button",{className:le(ae.optionItem,"font-semibold"),onClick:()=>O(H),children:h.jsxs("span",{children:["📄 ",H]})},H)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),r.length>0&&h.jsxs("div",{className:ae.optionsContainer,children:[h.jsxs("label",{className:"flex items-center justify-between gap-2 border-b border-b-gray-200 p-2",children:[h.jsx("span",{className:"font-semibold",children:"↗️ Connected tables"}),h.jsx("input",{className:"input",placeholder:"Filter tables",value:g,onChange:H=>w(H.target.value)})]}),h.jsx("div",{className:"flex flex-col overflow-y-auto",children:$.length>0?$.map(H=>h.jsx(j1,{hook:H,onClick:()=>_(H)},H.where)):h.jsx("p",{className:"text-center p-2 text-gray-800",children:"Empty"})})]}),V&&h.jsx("button",{onClick:N,className:ae.underlyingRowsBtn,children:"🎯 Underlying rows"})]})},_C={ASC:"⬆️",DESC:"⬇️"},NC=()=>{const{data:n}=x.useContext(Qn),{orderBy:l,updateOrderBy:r}=dC(),s=(n==null?void 0:n.result.columns)||[],o=l[0],u=pl(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:"#"}),s.map(d=>h.jsxs("td",{className:ae.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:ae.headerActions,children:h.jsx("button",{onClick:()=>r(d.full),children:(o==null?void 0:o.column)===d.full?_C[o.direction]:"↕️"})})]},d.full))]})})};function jC({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 s=Fl(n);return h.jsxs(h.Fragment,{children:[h.jsx("span",{"data-row":l,className:ae.value,children:s}),h.jsxs("div",{className:ae.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 AC=x.memo(({row:n,isLastRow:l,index:r,offset:s})=>h.jsxs("tr",{className:le(ae.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+s}),n.map((o,u)=>h.jsx("td",{className:ae.cell,"data-row":r,children:h.jsx(jC,{value:o,col:u,row:r})},u))]})),TC=()=>{var C,E;const{data:n,error:l,isLoading:r,isFetching:s}=x.useContext(Qn),{state:{page:o,size:u}}=x.useContext(mt),d=Wd(l),m=mC(),y=_1(),[p,b]=x.useState(void 0),g=A=>{var O;const N=(O=A.target)==null?void 0:O.dataset,_=N==null?void 0:N.row;_!=null&&(b(parseInt(_)),y.open(A))},w=o*u;return h.jsxs(h.Fragment,{children:[p!=null&&y.show&&h.jsx(CC,{handler:y,rowIndex:p}),d&&h.jsx(Ut,{className:"my-4",variant:"danger",children:d}),r&&h.jsx("div",{className:ae.tableLoading,children:"Loading data"}),n&&h.jsxs("table",{className:le(ae.table,s&&ae.semiTransparent),onContextMenu:g,onClick:m,children:[h.jsx(NC,{}),h.jsxs("tbody",{children:[((C=n.result.rows)==null?void 0:C.length)<1&&h.jsx("tr",{className:ae.tableEmpty,children:h.jsx("td",{colSpan:n.result.columns.length+1,children:"No data"})}),(E=n.result.rows)==null?void 0:E.map((A,N)=>h.jsx(AC,{index:N,offset:w,row:A,isLastRow:N===n.result.rows.length-1},N))]})]})]})},RC="_root_1bp0i_2",OC="_root-show_1bp0i_2",DC="_content-desktop_1bp0i_2",MC="_content-mobile_1bp0i_2",UC="_card_1bp0i_2",LC="_cards-list_1bp0i_2",qC="_sub-text_1bp0i_2",zC="_text_1bp0i_2",BC="_section-title_1bp0i_2",kC="_sidebar-action_1bp0i_2",HC="_sidebar-add-action_1bp0i_2",QC="_section-container_1bp0i_2",$C="_close-button_1bp0i_2",YC="_section-open-btn_1bp0i_2",VC="_show_1bp0i_2",re={root:RC,rootShow:OC,contentDesktop:DC,contentMobile:MC,card:UC,cardsList:LC,subText:qC,text:zC,sectionTitle:BC,sidebarAction:kC,sidebarAddAction:HC,sectionContainer:QC,closeButton:$C,sectionOpenBtn:YC,show:VC};function KC(n,l){if(!n&&!l)return!0;if(!n||!l||n.length!==l.length)return!1;for(let r=0;r<n.length;r++)if(n[r]!==l[r])return!1;return!0}const A1=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(o=>{l(u=>({...u,filters:o}))},[l]),s=x.useCallback(o=>{l(u=>({...u,filters:u.filters.filter(d=>!(o.column===d.column&&o.operator===d.operator&&KC(o.value,d.value)))}))},[l]);return{filters:n.filters,removeFilter:s,setFilters:r}},FC=(n,l)=>n.type!==l.type||n.on!==l.on||n.table!==l.table,GC=(n,l)=>n.type===l.type&&n.on===l.on&&n.table===l.table,T1=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(s=>{l(o=>{const u=o.joins;if(u.some(m=>GC(m,s))){const m=s.table+".";return{...o,joins:u.filter(y=>FC(y,s)),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,s]}})},[l]);return{joins:n.joins,toggle:r}},Ru=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"})),[XC,ZC]=fn(!1),ah=()=>ZC(n=>!n),JC="_sidebar_108rh_2",PC="_sidebar-visible_108rh_2",IC="_sidebar-container_108rh_2",WC="_sidebar-invisible_108rh_2",e_="_backdrop_108rh_2",ir={sidebar:JC,sidebarVisible:PC,sidebarContainer:IC,sidebarInvisible:WC,backdrop:e_},R1=({children:n,backdropClose:l,isVisible:r,onClose:s,onClosed:o,contentClassName:u})=>{const[d,m]=x.useState(!1),y=x.useRef(s);y.current=s;const p=()=>{l&&s()},b=g=>{r||getComputedStyle(g.currentTarget).opacity==="0"&&(m(!1),o&&o())};return x.useEffect(()=>{r&&m(!0)},[r]),x.useEffect(()=>{const g=w=>{r&&w.key==="Escape"&&y.current()};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[r]),h.jsxs("div",{onTransitionEnd:b,className:le(ir.sidebar,r?ir.sidebarVisible:ir.sidebarInvisible),children:[h.jsx("div",{onClick:p,className:ir.backdrop}),h.jsx("div",{className:le(ir.sidebarContainer,u),children:d&&n})]})},[Ou,lh]=fn({filters:!1,joins:!1,columns:!1,groupBy:!1,aggregate:!1}),Ln=n=>lh(l=>({...l,[n]:!0})),Du=n=>lh(l=>({...l,[n]:!1})),hu=n=>lh(l=>({...l,[n]:!l[n]})),O1=()=>{const n=eh(),l=N4();return{rename:async s=>{if(n){const o=await _r("New tab name",s);o&&await l.mutateAsync({id:n,payload:{name:o}})}return Promise.resolve()}}},t_=()=>{const n=XC();return nh(Tu.laptop)?h.jsx("div",{className:le(re.root,n&&re.rootShow),children:h.jsxs("div",{className:le(re.contentDesktop,"no-scrollbar"),children:[h.jsx(Uy,{}),h.jsx(My,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(qy,{}),h.jsx(zy,{}),h.jsx(Ly,{})]})}):h.jsx(R1,{isVisible:n,onClose:ah,backdropClose:!0,children:h.jsxs("div",{className:re.contentMobile,children:[h.jsx(Uy,{}),h.jsx(My,{}),h.jsx(Hy,{}),h.jsx(ky,{}),h.jsx(By,{}),h.jsx(qy,{}),h.jsx(zy,{}),h.jsx(Ly,{})]})})};function Nr({onShow:n,show:l,title:r,items:s}){return h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("p",{className:re.sectionTitle,children:r}),s>0&&h.jsxs("button",{className:le(re.sectionOpenBtn,l&&re.show),onClick:n,children:[h.jsx("span",{children:s}),h.jsx(Ru,{width:16,height:16})]})]})}function My(){const{name:n}=x.useContext(ia),{data:l}=x.useContext(Qn),{rename:r}=O1(),s=()=>{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:s,children:h.jsx("span",{children:"🖋️ Copy SQL"})})]})}function Uy(){const{state:n}=x.useContext(mt),{data:l}=Au(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:le(re.text,"text-blue-600"),children:n.table})]})}),h.jsx("div",{className:le(re.card,"mt-2"),children:h.jsxs("div",{children:[h.jsx("p",{className:re.subText,children:"📦 Data source"}),h.jsx("p",{className:le(re.text,"text-blue-600"),children:l==null?void 0:l.name})]})})]})}function Ly(){const{state:n,setState:l}=x.useContext(mt),[r,s]=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(Nr,{title:"📚 Group by",show:r,onShow:()=>s(!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(Hn,{width:20,height:20})})]},Wn(u)))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ln("groupBy"),children:[h.jsx("span",{className:"hotkey",children:"G"}),h.jsx("span",{children:"Add group by"})]})]})}function qy(){const{state:n,setState:l}=x.useContext(mt),[r,s]=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(Nr,{title:"👀 Columns",show:r,onShow:()=>s(!r),items:u?0:n.columns.length}),u&&h.jsx(Ut,{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(Hn,{width:20,height:20})})]}))}),!u&&h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ln("columns"),children:[h.jsx("span",{className:"hotkey",children:"C"}),h.jsx("span",{children:"Show/Hide columns"})]})]})}function zy(){const{state:n,setState:l}=x.useContext(mt),[r,s]=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(Nr,{title:"🔢 Aggregations",show:r,onShow:()=>s(!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(Hn,{width:20,height:20})})]}))}),h.jsxs("button",{className:re.sidebarAddAction,onClick:()=>Ln("aggregate"),children:[h.jsx("span",{className:"hotkey",children:"A"}),h.jsx("span",{children:"Aggregate data"})]})]})}const n_=n=>(n==null?void 0:n.map(l=>l.value).join(", "))||"";function By(){const{state:n}=x.useContext(mt),{removeFilter:l}=A1(),[r,s]=x.useState(!0),o=()=>{Ln("filters")};return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"🎚️ Filters",show:r,onShow:()=>s(!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:le(re.subText,"truncate"),children:u.column}),h.jsxs("p",{className:le(re.text,"truncate"),children:[Gd[u.operator]," ",n_(u.value)]})]}),h.jsx("button",{className:re.closeButton,onClick:()=>l(u),children:h.jsx(Hn,{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 ky(){const{toggle:n}=T1(),{availableJoins:l}=x.useContext(ia),{state:r}=x.useContext(mt),[s,o]=x.useState(!0);return h.jsxs("div",{className:re.sectionContainer,children:[h.jsx(Nr,{title:"📄 Joins",show:s,onShow:()=>o(!s),items:r.joins.length}),s&&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:le(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(Hn,{width:20,height:20})})]},u.table+u.on))}),l.length>0&&h.jsxs("button",{onClick:()=>Ln("joins"),className:re.sidebarAddAction,children:[h.jsx("span",{className:"hotkey",children:"J"}),h.jsx("span",{children:"Join table"})]})]})}function Hy(){const{state:n,setState:l}=x.useContext(mt);if(!n.orderBy.length)return null;const r=s=>{l(o=>({...o,orderBy:o.orderBy.filter(u=>u.column!==s.column&&u.direction!==s.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((s,o)=>h.jsxs("div",{className:re.card,children:[h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:le(re.subText,"truncate"),children:s.direction}),h.jsx("p",{className:re.text,children:s.column})]}),h.jsx("button",{className:re.closeButton,onClick:()=>r(s),children:h.jsx(Hn,{width:20,height:20})})]},o))})]})}const D1=()=>{const{state:n,setState:l}=x.useContext(mt),r=x.useCallback(o=>{l(u=>({...u,page:o}))},[l]),s=x.useCallback(o=>{l(u=>({...u,size:o}))},[l]);return{page:n.page,size:n.size,setSize:s,setPage:r}},a_=()=>qt({mutationFn:async n=>{const{data:l}=await Ue.post("/saved-queries",n);return l.data},onSuccess:()=>{ht.invalidateQueries(["queries"]),Is()}}),l_=()=>qt({mutationFn:async n=>Ue.delete("/saved-queries/"+n),onSuccess:()=>{Is()}}),s_=()=>qt({mutationFn:async({id:n,payload:l})=>{const{data:r}=await Ue.patch("/queries/"+n,l);return r.data},onSuccess:n=>{ht.invalidateQueries(["query",n.id]),Is(),X3(),n.isTrash}}),Ys=Math.min,Gl=Math.max,mu=Math.round,Yo=Math.floor,ea=n=>({x:n,y:n}),i_={left:"right",right:"left",bottom:"top",top:"bottom"},r_={start:"end",end:"start"};function jd(n,l,r){return Gl(n,Ys(l,r))}function jr(n,l){return typeof n=="function"?n(l):n}function Zl(n){return n.split("-")[0]}function Ar(n){return n.split("-")[1]}function M1(n){return n==="x"?"y":"x"}function sh(n){return n==="y"?"height":"width"}function dl(n){return["top","bottom"].includes(Zl(n))?"y":"x"}function ih(n){return M1(dl(n))}function o_(n,l,r){r===void 0&&(r=!1);const s=Ar(n),o=ih(n),u=sh(o);let d=o==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return l.reference[u]>l.floating[u]&&(d=pu(d)),[d,pu(d)]}function u_(n){const l=pu(n);return[Ad(n),l,Ad(l)]}function Ad(n){return n.replace(/start|end/g,l=>r_[l])}function c_(n,l,r){const s=["left","right"],o=["right","left"],u=["top","bottom"],d=["bottom","top"];switch(n){case"top":case"bottom":return r?l?o:s:l?s:o;case"left":case"right":return l?u:d;default:return[]}}function f_(n,l,r,s){const o=Ar(n);let u=c_(Zl(n),r==="start",s);return o&&(u=u.map(d=>d+"-"+o),l&&(u=u.concat(u.map(Ad)))),u}function pu(n){return n.replace(/left|right|bottom|top/g,l=>i_[l])}function d_(n){return{top:0,right:0,bottom:0,left:0,...n}}function U1(n){return typeof n!="number"?d_(n):{top:n,right:n,bottom:n,left:n}}function yu(n){const{x:l,y:r,width:s,height:o}=n;return{width:s,height:o,top:r,left:l,right:l+s,bottom:r+o,x:l,y:r}}function Qy(n,l,r){let{reference:s,floating:o}=n;const u=dl(l),d=ih(l),m=sh(d),y=Zl(l),p=u==="y",b=s.x+s.width/2-o.width/2,g=s.y+s.height/2-o.height/2,w=s[m]/2-o[m]/2;let C;switch(y){case"top":C={x:b,y:s.y-o.height};break;case"bottom":C={x:b,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:g};break;case"left":C={x:s.x-o.width,y:g};break;default:C={x:s.x,y:s.y}}switch(Ar(l)){case"start":C[d]-=w*(r&&p?-1:1);break;case"end":C[d]+=w*(r&&p?-1:1);break}return C}const h_=async(n,l,r)=>{const{placement:s="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:b,y:g}=Qy(p,s,y),w=s,C={},E=0;for(let A=0;A<m.length;A++){const{name:N,fn:_}=m[A],{x:O,y:T,data:$,reset:V}=await _({x:b,y:g,initialPlacement:s,placement:w,strategy:o,middlewareData:C,rects:p,platform:d,elements:{reference:n,floating:l}});b=O??b,g=T??g,C={...C,[N]:{...C[N],...$}},V&&E<=50&&(E++,typeof V=="object"&&(V.placement&&(w=V.placement),V.rects&&(p=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:o}):V.rects),{x:b,y:g}=Qy(p,w,y)),A=-1)}return{x:b,y:g,placement:w,strategy:o,middlewareData:C}};async function L1(n,l){var r;l===void 0&&(l={});const{x:s,y:o,platform:u,rects:d,elements:m,strategy:y}=n,{boundary:p="clippingAncestors",rootBoundary:b="viewport",elementContext:g="floating",altBoundary:w=!1,padding:C=0}=jr(l,n),E=U1(C),N=m[w?g==="floating"?"reference":"floating":g],_=yu(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:b,strategy:y})),O=g==="floating"?{x:s,y:o,width:d.floating.width,height:d.floating.height}:d.reference,T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),$=await(u.isElement==null?void 0:u.isElement(T))?await(u.getScale==null?void 0:u.getScale(T))||{x:1,y:1}:{x:1,y:1},V=yu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:T,strategy:y}):O);return{top:(_.top-V.top+E.top)/$.y,bottom:(V.bottom-_.bottom+E.bottom)/$.y,left:(_.left-V.left+E.left)/$.x,right:(V.right-_.right+E.right)/$.x}}const m_=n=>({name:"arrow",options:n,async fn(l){const{x:r,y:s,placement:o,rects:u,platform:d,elements:m,middlewareData:y}=l,{element:p,padding:b=0}=jr(n,l)||{};if(p==null)return{};const g=U1(b),w={x:r,y:s},C=ih(o),E=sh(C),A=await d.getDimensions(p),N=C==="y",_=N?"top":"left",O=N?"bottom":"right",T=N?"clientHeight":"clientWidth",$=u.reference[E]+u.reference[C]-w[C]-u.floating[E],V=w[C]-u.reference[C],H=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let G=H?H[T]:0;(!G||!await(d.isElement==null?void 0:d.isElement(H)))&&(G=m.floating[T]||u.floating[E]);const Z=$/2-V/2,te=G/2-A[E]/2-1,pe=Ys(g[_],te),Re=Ys(g[O],te),ge=pe,Le=G-A[E]-Re,ye=G/2-A[E]/2+Z,Se=jd(ge,ye,Le),B=!y.arrow&&Ar(o)!=null&&ye!==Se&&u.reference[E]/2-(ye<ge?pe:Re)-A[E]/2<0,X=B?ye<ge?ye-ge:ye-Le:0;return{[C]:w[C]+X,data:{[C]:Se,centerOffset:ye-Se-X,...B&&{alignmentOffset:X}},reset:B}}}),p_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var r,s;const{placement:o,middlewareData:u,rects:d,initialPlacement:m,platform:y,elements:p}=l,{mainAxis:b=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:A=!0,...N}=jr(n,l);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const _=Zl(o),O=dl(m),T=Zl(m)===m,$=await(y.isRTL==null?void 0:y.isRTL(p.floating)),V=w||(T||!A?[pu(m)]:u_(m)),H=E!=="none";!w&&H&&V.push(...f_(m,A,E,$));const G=[m,...V],Z=await L1(l,N),te=[];let pe=((s=u.flip)==null?void 0:s.overflows)||[];if(b&&te.push(Z[_]),g){const ye=o_(o,d,$);te.push(Z[ye[0]],Z[ye[1]])}if(pe=[...pe,{placement:o,overflows:te}],!te.every(ye=>ye<=0)){var Re,ge;const ye=(((Re=u.flip)==null?void 0:Re.index)||0)+1,Se=G[ye];if(Se&&(!(g==="alignment"?O!==dl(Se):!1)||pe.every(P=>P.overflows[0]>0&&dl(P.placement)===O)))return{data:{index:ye,overflows:pe},reset:{placement:Se}};let B=(ge=pe.filter(X=>X.overflows[0]<=0).sort((X,P)=>X.overflows[1]-P.overflows[1])[0])==null?void 0:ge.placement;if(!B)switch(C){case"bestFit":{var Le;const X=(Le=pe.filter(P=>{if(H){const ue=dl(P.placement);return ue===O||ue==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(ue=>ue>0).reduce((ue,R)=>ue+R,0)]).sort((P,ue)=>P[1]-ue[1])[0])==null?void 0:Le[0];X&&(B=X);break}case"initialPlacement":B=m;break}if(o!==B)return{reset:{placement:B}}}return{}}}};async function y_(n,l){const{placement:r,platform:s,elements:o}=n,u=await(s.isRTL==null?void 0:s.isRTL(o.floating)),d=Zl(r),m=Ar(r),y=dl(r)==="y",p=["left","top"].includes(d)?-1:1,b=u&&y?-1:1,g=jr(l,n);let{mainAxis:w,crossAxis:C,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return m&&typeof E=="number"&&(C=m==="end"?E*-1:E),y?{x:C*b,y:w*p}:{x:w*p,y:C*b}}const v_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var r,s;const{x:o,y:u,placement:d,middlewareData:m}=l,y=await y_(l,n);return d===((r=m.offset)==null?void 0:r.placement)&&(s=m.arrow)!=null&&s.alignmentOffset?{}:{x:o+y.x,y:u+y.y,data:{...y,placement:d}}}}},b_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:r,y:s,placement:o}=l,{mainAxis:u=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:_,y:O}=N;return{x:_,y:O}}},...y}=jr(n,l),p={x:r,y:s},b=await L1(l,y),g=dl(Zl(o)),w=M1(g);let C=p[w],E=p[g];if(u){const N=w==="y"?"top":"left",_=w==="y"?"bottom":"right",O=C+b[N],T=C-b[_];C=jd(O,C,T)}if(d){const N=g==="y"?"top":"left",_=g==="y"?"bottom":"right",O=E+b[N],T=E-b[_];E=jd(O,E,T)}const A=m.fn({...l,[w]:C,[g]:E});return{...A,data:{x:A.x-r,y:A.y-s,enabled:{[w]:u,[g]:d}}}}}};function Mu(){return typeof window<"u"}function ni(n){return q1(n)?(n.nodeName||"").toLowerCase():"#document"}function cn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function ra(n){var l;return(l=(q1(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function q1(n){return Mu()?n instanceof Node||n instanceof cn(n).Node:!1}function zn(n){return Mu()?n instanceof Element||n instanceof cn(n).Element:!1}function ta(n){return Mu()?n instanceof HTMLElement||n instanceof cn(n).HTMLElement:!1}function $y(n){return!Mu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof cn(n).ShadowRoot}function Tr(n){const{overflow:l,overflowX:r,overflowY:s,display:o}=Bn(n);return/auto|scroll|overlay|hidden|clip/.test(l+s+r)&&!["inline","contents"].includes(o)}function g_(n){return["table","td","th"].includes(ni(n))}function Uu(n){return[":popover-open",":modal"].some(l=>{try{return n.matches(l)}catch{return!1}})}function rh(n){const l=oh(),r=zn(n)?Bn(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>r[s]?r[s]!=="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(s=>(r.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(r.contain||"").includes(s))}function x_(n){let l=yl(n);for(;ta(l)&&!Vs(l);){if(rh(l))return l;if(Uu(l))return null;l=yl(l)}return null}function oh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vs(n){return["html","body","#document"].includes(ni(n))}function Bn(n){return cn(n).getComputedStyle(n)}function Lu(n){return zn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function yl(n){if(ni(n)==="html")return n;const l=n.assignedSlot||n.parentNode||$y(n)&&n.host||ra(n);return $y(l)?l.host:l}function z1(n){const l=yl(n);return Vs(l)?n.ownerDocument?n.ownerDocument.body:n.body:ta(l)&&Tr(l)?l:z1(l)}function hr(n,l,r){var s;l===void 0&&(l=[]),r===void 0&&(r=!0);const o=z1(n),u=o===((s=n.ownerDocument)==null?void 0:s.body),d=cn(o);if(u){const m=Td(d);return l.concat(d,d.visualViewport||[],Tr(o)?o:[],m&&r?hr(m):[])}return l.concat(o,hr(o,[],r))}function Td(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function B1(n){const l=Bn(n);let r=parseFloat(l.width)||0,s=parseFloat(l.height)||0;const o=ta(n),u=o?n.offsetWidth:r,d=o?n.offsetHeight:s,m=mu(r)!==u||mu(s)!==d;return m&&(r=u,s=d),{width:r,height:s,$:m}}function uh(n){return zn(n)?n:n.contextElement}function Hs(n){const l=uh(n);if(!ta(l))return ea(1);const r=l.getBoundingClientRect(),{width:s,height:o,$:u}=B1(l);let d=(u?mu(r.width):r.width)/s,m=(u?mu(r.height):r.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const S_=ea(0);function k1(n){const l=cn(n);return!oh()||!l.visualViewport?S_:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function w_(n,l,r){return l===void 0&&(l=!1),!r||l&&r!==cn(n)?!1:l}function Jl(n,l,r,s){l===void 0&&(l=!1),r===void 0&&(r=!1);const o=n.getBoundingClientRect(),u=uh(n);let d=ea(1);l&&(s?zn(s)&&(d=Hs(s)):d=Hs(n));const m=w_(u,r,s)?k1(u):ea(0);let y=(o.left+m.x)/d.x,p=(o.top+m.y)/d.y,b=o.width/d.x,g=o.height/d.y;if(u){const w=cn(u),C=s&&zn(s)?cn(s):s;let E=w,A=Td(E);for(;A&&s&&C!==E;){const N=Hs(A),_=A.getBoundingClientRect(),O=Bn(A),T=_.left+(A.clientLeft+parseFloat(O.paddingLeft))*N.x,$=_.top+(A.clientTop+parseFloat(O.paddingTop))*N.y;y*=N.x,p*=N.y,b*=N.x,g*=N.y,y+=T,p+=$,E=cn(A),A=Td(E)}}return yu({width:b,height:g,x:y,y:p})}function ch(n,l){const r=Lu(n).scrollLeft;return l?l.left+r:Jl(ra(n)).left+r}function H1(n,l,r){r===void 0&&(r=!1);const s=n.getBoundingClientRect(),o=s.left+l.scrollLeft-(r?0:ch(n,s)),u=s.top+l.scrollTop;return{x:o,y:u}}function E_(n){let{elements:l,rect:r,offsetParent:s,strategy:o}=n;const u=o==="fixed",d=ra(s),m=l?Uu(l.floating):!1;if(s===d||m&&u)return r;let y={scrollLeft:0,scrollTop:0},p=ea(1);const b=ea(0),g=ta(s);if((g||!g&&!u)&&((ni(s)!=="body"||Tr(d))&&(y=Lu(s)),ta(s))){const C=Jl(s);p=Hs(s),b.x=C.x+s.clientLeft,b.y=C.y+s.clientTop}const w=d&&!g&&!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+b.x+w.x,y:r.y*p.y-y.scrollTop*p.y+b.y+w.y}}function C_(n){return Array.from(n.getClientRects())}function __(n){const l=ra(n),r=Lu(n),s=n.ownerDocument.body,o=Gl(l.scrollWidth,l.clientWidth,s.scrollWidth,s.clientWidth),u=Gl(l.scrollHeight,l.clientHeight,s.scrollHeight,s.clientHeight);let d=-r.scrollLeft+ch(n);const m=-r.scrollTop;return Bn(s).direction==="rtl"&&(d+=Gl(l.clientWidth,s.clientWidth)-o),{width:o,height:u,x:d,y:m}}function N_(n,l){const r=cn(n),s=ra(n),o=r.visualViewport;let u=s.clientWidth,d=s.clientHeight,m=0,y=0;if(o){u=o.width,d=o.height;const p=oh();(!p||p&&l==="fixed")&&(m=o.offsetLeft,y=o.offsetTop)}return{width:u,height:d,x:m,y}}function j_(n,l){const r=Jl(n,!0,l==="fixed"),s=r.top+n.clientTop,o=r.left+n.clientLeft,u=ta(n)?Hs(n):ea(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,y=o*u.x,p=s*u.y;return{width:d,height:m,x:y,y:p}}function Yy(n,l,r){let s;if(l==="viewport")s=N_(n,r);else if(l==="document")s=__(ra(n));else if(zn(l))s=j_(l,r);else{const o=k1(n);s={x:l.x-o.x,y:l.y-o.y,width:l.width,height:l.height}}return yu(s)}function Q1(n,l){const r=yl(n);return r===l||!zn(r)||Vs(r)?!1:Bn(r).position==="fixed"||Q1(r,l)}function A_(n,l){const r=l.get(n);if(r)return r;let s=hr(n,[],!1).filter(m=>zn(m)&&ni(m)!=="body"),o=null;const u=Bn(n).position==="fixed";let d=u?yl(n):n;for(;zn(d)&&!Vs(d);){const m=Bn(d),y=rh(d);!y&&m.position==="fixed"&&(o=null),(u?!y&&!o:!y&&m.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Tr(d)&&!y&&Q1(n,d))?s=s.filter(b=>b!==d):o=m,d=yl(d)}return l.set(n,s),s}function T_(n){let{element:l,boundary:r,rootBoundary:s,strategy:o}=n;const d=[...r==="clippingAncestors"?Uu(l)?[]:A_(l,this._c):[].concat(r),s],m=d[0],y=d.reduce((p,b)=>{const g=Yy(l,b,o);return p.top=Gl(g.top,p.top),p.right=Ys(g.right,p.right),p.bottom=Ys(g.bottom,p.bottom),p.left=Gl(g.left,p.left),p},Yy(l,m,o));return{width:y.right-y.left,height:y.bottom-y.top,x:y.left,y:y.top}}function R_(n){const{width:l,height:r}=B1(n);return{width:l,height:r}}function O_(n,l,r){const s=ta(l),o=ra(l),u=r==="fixed",d=Jl(n,!0,u,l);let m={scrollLeft:0,scrollTop:0};const y=ea(0);function p(){y.x=ch(o)}if(s||!s&&!u)if((ni(l)!=="body"||Tr(o))&&(m=Lu(l)),s){const C=Jl(l,!0,u,l);y.x=C.x+l.clientLeft,y.y=C.y+l.clientTop}else o&&p();u&&!s&&o&&p();const b=o&&!s&&!u?H1(o,m):ea(0),g=d.left+m.scrollLeft-y.x-b.x,w=d.top+m.scrollTop-y.y-b.y;return{x:g,y:w,width:d.width,height:d.height}}function ld(n){return Bn(n).position==="static"}function Vy(n,l){if(!ta(n)||Bn(n).position==="fixed")return null;if(l)return l(n);let r=n.offsetParent;return ra(n)===r&&(r=r.ownerDocument.body),r}function $1(n,l){const r=cn(n);if(Uu(n))return r;if(!ta(n)){let o=yl(n);for(;o&&!Vs(o);){if(zn(o)&&!ld(o))return o;o=yl(o)}return r}let s=Vy(n,l);for(;s&&g_(s)&&ld(s);)s=Vy(s,l);return s&&Vs(s)&&ld(s)&&!rh(s)?r:s||x_(n)||r}const D_=async function(n){const l=this.getOffsetParent||$1,r=this.getDimensions,s=await r(n.floating);return{reference:O_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function M_(n){return Bn(n).direction==="rtl"}const U_={convertOffsetParentRelativeRectToViewportRelativeRect:E_,getDocumentElement:ra,getClippingRect:T_,getOffsetParent:$1,getElementRects:D_,getClientRects:C_,getDimensions:R_,getScale:Hs,isElement:zn,isRTL:M_};function Y1(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function L_(n,l){let r=null,s;const o=ra(n);function u(){var m;clearTimeout(s),(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:b,top:g,width:w,height:C}=p;if(m||l(),!w||!C)return;const E=Yo(g),A=Yo(o.clientWidth-(b+w)),N=Yo(o.clientHeight-(g+C)),_=Yo(b),T={rootMargin:-E+"px "+-A+"px "+-N+"px "+-_+"px",threshold:Gl(0,Ys(1,y))||1};let $=!0;function V(H){const G=H[0].intersectionRatio;if(G!==y){if(!$)return d();G?d(!1,G):s=setTimeout(()=>{d(!1,1e-7)},1e3)}G===1&&!Y1(p,n.getBoundingClientRect())&&d(),$=!1}try{r=new IntersectionObserver(V,{...T,root:o.ownerDocument})}catch{r=new IntersectionObserver(V,T)}r.observe(n)}return d(!0),u}function q_(n,l,r,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:y=!1}=s,p=uh(n),b=o||u?[...p?hr(p):[],...hr(l)]:[];b.forEach(_=>{o&&_.addEventListener("scroll",r,{passive:!0}),u&&_.addEventListener("resize",r)});const g=p&&m?L_(p,r):null;let w=-1,C=null;d&&(C=new ResizeObserver(_=>{let[O]=_;O&&O.target===p&&C&&(C.unobserve(l),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var T;(T=C)==null||T.observe(l)})),r()}),p&&!y&&C.observe(p),C.observe(l));let E,A=y?Jl(n):null;y&&N();function N(){const _=Jl(n);A&&!Y1(A,_)&&r(),A=_,E=requestAnimationFrame(N)}return r(),()=>{var _;b.forEach(O=>{o&&O.removeEventListener("scroll",r),u&&O.removeEventListener("resize",r)}),g==null||g(),(_=C)==null||_.disconnect(),C=null,y&&cancelAnimationFrame(E)}}const z_=v_,B_=b_,k_=p_,H_=m_,Ky=(n,l,r)=>{const s=new Map,o={platform:U_,...r},u={...o.platform,_c:s};return h_(n,l,{...o,platform:u})};var sd={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 Fy;function H_(){return Fy||(Fy=1,function(n){(function(){var l={}.hasOwnProperty;function r(){for(var o="",d=0;d<arguments.length;d++){var m=arguments[d];m&&(o=u(o,s(m)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var d="";for(var m in o)l.call(o,m)&&o[m]&&(d=u(d,m));return d}function u(o,d){return d?o?o+" "+d:o+d:o}n.exports?(r.default=r,n.exports=r):window.classNames=r})()}(sd)),sd.exports}var Q_=H_();const Rd=vo(Q_);var Gy={};const $_="react-tooltip-core-styles",Y_="react-tooltip-base-styles",Xy={core:!1,base:!1};function Zy({css:n,id:l=Y_,type:r="base",ref:s}){var u,o;if(!n||typeof document>"u"||Xy[r]||r==="core"&&typeof process<"u"&&(!((u=process==null?void 0:Gy)===null||u===void 0)&&u.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="base"&&typeof process<"u"&&(!((o=process==null?void 0:Gy)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(l=$_),s||(s={});const{insertAt:d}=s;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)),Xy[r]=!0}const Jy=async({elementReference:n=null,tooltipReference:l=null,tooltipArrowReference:r=null,place:s="top",offset:u=10,strategy:o="absolute",middlewares:d=[q_(Number(u)),B_({fallbackAxisSideDirection:"start"}),z_({padding:5})],border:m,arrowSize:y=8})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:s};if(l===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:s};const p=d;return r?(p.push(k_({element:r,padding:5})),Ky(n,l,{placement:s,strategy:o,middleware:p}).then(({x:b,y:g,placement:w,middlewareData:C})=>{var E,A;const N={left:`${b}px`,top:`${g}px`,border:m},{x:_,y:O}=(E=C.arrow)!==null&&E!==void 0?E:{x:0,y:0},T=(A={top:"bottom",right:"left",bottom:"top",left:"right"}[w.split("-")[0]])!==null&&A!==void 0?A:"bottom",$=m&&{borderBottom:m,borderRight:m};let V=0;if(m){const H=`${m}`.match(/(\d+)px/);V=H!=null&&H[1]?Number(H[1]):1}return{tooltipStyles:N,tooltipArrowStyles:{left:_!=null?`${_}px`:"",top:O!=null?`${O}px`:"",right:"",bottom:"",...$,[T]:`-${y/2+V}px`},place:w}})):Ky(n,l,{placement:"bottom",strategy:o,middleware:p}).then(({x:b,y:g,placement:w})=>({tooltipStyles:{left:`${b}px`,top:`${g}px`},tooltipArrowStyles:{},place:w}))},Py=(n,l)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,l),Iy=(n,l,r)=>{let s=null;const u=function(...o){const d=()=>{s=null};!s&&(n.apply(this,o),s=setTimeout(d,l))};return u.cancel=()=>{s&&(clearTimeout(s),s=null)},u},Wy=n=>n!==null&&!Array.isArray(n)&&typeof n=="object",Od=(n,l)=>{if(n===l)return!0;if(Array.isArray(n)&&Array.isArray(l))return n.length===l.length&&n.every((u,o)=>Od(u,l[o]));if(Array.isArray(n)!==Array.isArray(l))return!1;if(!Wy(n)||!Wy(l))return n===l;const r=Object.keys(n),s=Object.keys(l);return r.length===s.length&&r.every(u=>Od(n[u],l[u]))},V_=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const l=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(r=>{const s=l.getPropertyValue(r);return s==="auto"||s==="scroll"})},ev=n=>{if(!n)return null;let l=n.parentElement;for(;l;){if(V_(l))return l;l=l.parentElement}return document.scrollingElement||document.documentElement},K_=typeof window<"u"?x.useLayoutEffect:x.useEffect,Tn=n=>{n.current&&(clearTimeout(n.current),n.current=null)},F_="DEFAULT_TOOLTIP_ID",G_={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},X_=x.createContext({getTooltipData:()=>G_});function V1(n=F_){return x.useContext(X_).getTooltipData(n)}var Bs={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"},id={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 Z_=({forwardRef:n,id:l,className:r,classNameArrow:s,variant:u="dark",anchorId:o,anchorSelect:d,place:m="top",offset:y=10,events:p=["hover"],openOnClick:b=!1,positionStrategy:g="absolute",middlewares:w,wrapper:C,delayShow:E=0,delayHide:A=0,float:N=!1,hidden:_=!1,noArrow:O=!1,clickable:T=!1,closeOnEsc:$=!1,closeOnScroll:V=!1,closeOnResize:H=!1,openEvents:G,closeEvents:Z,globalCloseEvents:te,imperativeModeOnly:pe,style:Re,position:ge,afterShow:Le,afterHide:ye,disableTooltip:Se,content:B,contentWrapperRef:X,isOpen:P,defaultIsOpen:oe=!1,setIsOpen:R,activeAnchor:Q,setActiveAnchor:W,border:I,opacity:ie,arrowColor:Ce,arrowSize:ce=8,role:St="tooltip"})=>{var qe;const Ze=x.useRef(null),$n=x.useRef(null),Nt=x.useRef(null),hn=x.useRef(null),ua=x.useRef(null),[mn,ai]=x.useState({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[zt,Bt]=x.useState(!1),[oa,Yn]=x.useState(!1),[Fe,Vn]=x.useState(null),bl=x.useRef(!1),Ua=x.useRef(null),{anchorRefs:gl,setActiveAnchor:Il}=V1(l),pn=x.useRef(!1),[tt,Vt]=x.useState([]),st=x.useRef(!1),La=b||p.includes("click"),li=La||(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&&La&&Object.assign(qa,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const yn=Z?{...Z}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!Z&&La&&Object.assign(yn,{mouseleave:!1,blur:!1,mouseout:!1});const jt=te?{...te}:{escape:$||!1,scroll:V||!1,resize:H||!1,clickOutsideAnchor:li||!1};pe&&(Object.assign(qa,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(yn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(jt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),K_(()=>(st.current=!0,()=>{st.current=!1}),[]);const He=J=>{st.current&&(J&&Yn(!0),setTimeout(()=>{st.current&&(R==null||R(J),P===void 0&&Bt(J))},10))};x.useEffect(()=>{if(P===void 0)return()=>null;P&&Yn(!0);const J=setTimeout(()=>{Bt(P)},10);return()=>{clearTimeout(J)}},[P]),x.useEffect(()=>{if(zt!==bl.current)if(Tn(ua),bl.current=zt,zt)Le==null||Le();else{const J=(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(()=>{Yn(!1),Vn(null),ye==null||ye()},J+25)}},[zt]);const ca=J=>{ai(ne=>Od(ne,J)?ne:J)},On=(J=E)=>{Tn(Nt),oa?He(!0):Nt.current=setTimeout(()=>{He(!0)},J)},za=(J=A)=>{Tn(hn),hn.current=setTimeout(()=>{pn.current||He(!1)},J)},Ba=J=>{var ne;if(!J)return;const de=(ne=J.currentTarget)!==null&&ne!==void 0?ne:J.target;if(!(de!=null&&de.isConnected))return W(null),void Il({current:null});E?On():He(!0),W(de),Il({current:de}),Tn(hn)},fa=()=>{T?za(A||100):A?za():He(!1),Tn(Nt)},Kn=({x:J,y:ne})=>{var de;const Ie={getBoundingClientRect:()=>({x:J,y:ne,width:0,height:0,top:ne,left:J,right:J,bottom:ne})};Jy({place:(de=Fe==null?void 0:Fe.place)!==null&&de!==void 0?de:m,offset:y,elementReference:Ie,tooltipReference:Ze.current,tooltipArrowReference:$n.current,strategy:g,middlewares:w,border:I,arrowSize:ce}).then(vt=>{ca(vt)})},vn=J=>{if(!J)return;const ne=J,de={x:ne.clientX,y:ne.clientY};Kn(de),Ua.current=de},xl=J=>{var ne;if(!zt)return;const de=J.target;de.isConnected&&(!((ne=Ze.current)===null||ne===void 0)&&ne.contains(de)||[document.querySelector(`[id='${o}']`),...tt].some(Ie=>Ie==null?void 0:Ie.contains(de))||(He(!1),Tn(Nt)))},Sl=Iy(Ba,50),it=Iy(fa,50),At=J=>{it.cancel(),Sl(J)},ue=()=>{Sl.cancel(),it()},_e=x.useCallback(()=>{var J,ne;const de=(J=Fe==null?void 0:Fe.position)!==null&&J!==void 0?J:ge;de?Kn(de):N?Ua.current&&Kn(Ua.current):Q!=null&&Q.isConnected&&Jy({place:(ne=Fe==null?void 0:Fe.place)!==null&&ne!==void 0?ne:m,offset:y,elementReference:Q,tooltipReference:Ze.current,tooltipArrowReference:$n.current,strategy:g,middlewares:w,border:I,arrowSize:ce}).then(Ie=>{st.current&&ca(Ie)})},[zt,Q,B,Re,m,Fe==null?void 0:Fe.place,y,g,ge,Fe==null?void 0:Fe.position,N,ce]);x.useEffect(()=>{var J,ne;const de=new Set(gl);tt.forEach(De=>{Se!=null&&Se(De)||de.add({current:De})});const Ie=document.querySelector(`[id='${o}']`);Ie&&!(Se!=null&&Se(Ie))&&de.add({current:Ie});const vt=()=>{He(!1)},bn=ev(Q),en=ev(Ze.current);jt.scroll&&(window.addEventListener("scroll",vt),bn==null||bn.addEventListener("scroll",vt),en==null||en.addEventListener("scroll",vt));let rt=null;jt.resize?window.addEventListener("resize",vt):Q&&Ze.current&&(rt=L_(Q,Ze.current,_e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Rt=De=>{De.key==="Escape"&&He(!1)};jt.escape&&window.addEventListener("keydown",Rt),jt.clickOutsideAnchor&&window.addEventListener("click",xl);const Oe=[],tn=De=>!!(De!=null&&De.target&&(Q!=null&&Q.contains(De.target))),wl=De=>{zt&&tn(De)||Ba(De)},ka=De=>{zt&&tn(De)&&fa()},ut=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],si=["click","dblclick","mousedown","mouseup"];Object.entries(qa).forEach(([De,gn])=>{gn&&(ut.includes(De)?Oe.push({event:De,listener:At}):si.includes(De)&&Oe.push({event:De,listener:wl}))}),Object.entries(yn).forEach(([De,gn])=>{gn&&(ut.includes(De)?Oe.push({event:De,listener:ue}):si.includes(De)&&Oe.push({event:De,listener:ka}))}),N&&Oe.push({event:"pointermove",listener:vn});const ii=()=>{pn.current=!0},Fn=()=>{pn.current=!1,fa()},da=T&&(yn.mouseout||yn.mouseleave);return da&&((J=Ze.current)===null||J===void 0||J.addEventListener("mouseover",ii),(ne=Ze.current)===null||ne===void 0||ne.addEventListener("mouseout",Fn)),Oe.forEach(({event:De,listener:gn})=>{de.forEach(Wl=>{var El;(El=Wl.current)===null||El===void 0||El.addEventListener(De,gn)})}),()=>{var De,gn;jt.scroll&&(window.removeEventListener("scroll",vt),bn==null||bn.removeEventListener("scroll",vt),en==null||en.removeEventListener("scroll",vt)),jt.resize?window.removeEventListener("resize",vt):rt==null||rt(),jt.clickOutsideAnchor&&window.removeEventListener("click",xl),jt.escape&&window.removeEventListener("keydown",Rt),da&&((De=Ze.current)===null||De===void 0||De.removeEventListener("mouseover",ii),(gn=Ze.current)===null||gn===void 0||gn.removeEventListener("mouseout",Fn)),Oe.forEach(({event:Wl,listener:El})=>{de.forEach(es=>{var Ha;(Ha=es.current)===null||Ha===void 0||Ha.removeEventListener(Wl,El)})})}},[Q,_e,oa,gl,tt,G,Z,te,La,E,A]),x.useEffect(()=>{var J,ne;let de=(ne=(J=Fe==null?void 0:Fe.anchorSelect)!==null&&J!==void 0?J:d)!==null&&ne!==void 0?ne:"";!de&&l&&(de=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const Ie=new MutationObserver(vt=>{const bn=[],en=[];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&&en.push(rt.target)),rt.type==="childList"){if(Q){const Rt=[...rt.removedNodes].filter(Oe=>Oe.nodeType===1);if(de)try{en.push(...Rt.filter(Oe=>Oe.matches(de))),en.push(...Rt.flatMap(Oe=>[...Oe.querySelectorAll(de)]))}catch{}Rt.some(Oe=>{var tn;return!!(!((tn=Oe==null?void 0:Oe.contains)===null||tn===void 0)&&tn.call(Oe,Q))&&(Yn(!1),He(!1),W(null),Tn(Nt),Tn(hn),!0)})}if(de)try{const Rt=[...rt.addedNodes].filter(Oe=>Oe.nodeType===1);bn.push(...Rt.filter(Oe=>Oe.matches(de))),bn.push(...Rt.flatMap(Oe=>[...Oe.querySelectorAll(de)]))}catch{}}}),(bn.length||en.length)&&Vt(rt=>[...rt.filter(Rt=>!en.includes(Rt)),...bn])});return Ie.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{Ie.disconnect()}},[l,d,Fe==null?void 0:Fe.anchorSelect,Q]),x.useEffect(()=>{_e()},[_e]),x.useEffect(()=>{if(!(X!=null&&X.current))return()=>null;const J=new ResizeObserver(()=>{setTimeout(()=>_e())});return J.observe(X.current),()=>{J.disconnect()}},[B,X==null?void 0:X.current]),x.useEffect(()=>{var J;const ne=document.querySelector(`[id='${o}']`),de=[...tt,ne];Q&&de.includes(Q)||W((J=tt[0])!==null&&J!==void 0?J:ne)},[o,tt,Q]),x.useEffect(()=>(oe&&He(!0),()=>{Tn(Nt),Tn(hn)}),[]),x.useEffect(()=>{var J;let ne=(J=Fe==null?void 0:Fe.anchorSelect)!==null&&J!==void 0?J: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,Fe==null?void 0:Fe.anchorSelect]),x.useEffect(()=>{Nt.current&&(Tn(Nt),On(E))},[E]);const kt=(qe=Fe==null?void 0:Fe.content)!==null&&qe!==void 0?qe:B,Tt=zt&&Object.keys(mn.tooltipStyles).length>0;return x.useImperativeHandle(n,()=>({open:J=>{if(J!=null&&J.anchorSelect)try{document.querySelector(J.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${J.anchorSelect}" is not a valid CSS selector`)}Vn(J??null),J!=null&&J.delay?On(J.delay):He(!0)},close:J=>{J!=null&&J.delay?za(J.delay):He(!1)},activeAnchor:Q,place:mn.place,isOpen:!!(oa&&!_&&kt&&Tt)})),oa&&!_&&kt?Ke.createElement(C,{id:l,role:St,className:Rd("react-tooltip",Bs.tooltip,id.tooltip,id[u],r,`react-tooltip__place-${mn.place}`,Bs[Tt?"show":"closing"],Tt?"react-tooltip__show":"react-tooltip__closing",g==="fixed"&&Bs.fixed,T&&Bs.clickable),onTransitionEnd:J=>{Tn(ua),zt||J.propertyName!=="opacity"||(Yn(!1),Vn(null),ye==null||ye())},style:{...Re,...mn.tooltipStyles,opacity:ie!==void 0&&Tt?ie:void 0},ref:Ze},kt,Ke.createElement(C,{className:Rd("react-tooltip-arrow",Bs.arrow,id.arrow,s,O&&Bs.noArrow),style:{...mn.tooltipArrowStyles,background:Ce?`linear-gradient(to right bottom, transparent 50%, ${Ce} 50%)`:void 0,"--rt-arrow-size":`${ce}px`},ref:$n})):null},J_=({content:n})=>Ke.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),fh=Ke.forwardRef(({id:n,anchorId:l,anchorSelect:r,content:s,html:u,render:o,className:d,classNameArrow:m,variant:y="dark",place:p="top",offset:b=10,wrapper:g="div",children:w=null,events:C=["hover"],openOnClick:E=!1,positionStrategy:A="absolute",middlewares:N,delayShow:_=0,delayHide:O=0,float:T=!1,hidden:$=!1,noArrow:V=!1,clickable:H=!1,closeOnEsc:G=!1,closeOnScroll:Z=!1,closeOnResize:te=!1,openEvents:pe,closeEvents:Re,globalCloseEvents:ge,imperativeModeOnly:Le=!1,style:ye,position:Se,isOpen:B,defaultIsOpen:X=!1,disableStyleInjection:P=!1,border:oe,opacity:R,arrowColor:Q,arrowSize:W,setIsOpen:I,afterShow:ie,afterHide:Ce,disableTooltip:ce,role:St="tooltip"},qe)=>{const[Ze,$n]=x.useState(s),[Nt,hn]=x.useState(u),[ua,mn]=x.useState(p),[ai,zt]=x.useState(y),[Bt,oa]=x.useState(b),[Yn,Fe]=x.useState(_),[Vn,bl]=x.useState(O),[Ua,gl]=x.useState(T),[Il,pn]=x.useState($),[tt,Vt]=x.useState(g),[st,La]=x.useState(C),[li,qa]=x.useState(A),[yn,jt]=x.useState(null),[He,ca]=x.useState(null),On=x.useRef(P),{anchorRefs:za,activeAnchor:Ba}=V1(n),fa=it=>it==null?void 0:it.getAttributeNames().reduce((At,ue)=>{var _e;return ue.startsWith("data-tooltip-")&&(At[ue.replace(/^data-tooltip-/,"")]=(_e=it==null?void 0:it.getAttribute(ue))!==null&&_e!==void 0?_e:null),At},{}),Kn=it=>{const At={place:ue=>{var _e;mn((_e=ue)!==null&&_e!==void 0?_e:p)},content:ue=>{$n(ue??s)},html:ue=>{hn(ue??u)},variant:ue=>{var _e;zt((_e=ue)!==null&&_e!==void 0?_e:y)},offset:ue=>{oa(ue===null?b:Number(ue))},wrapper:ue=>{var _e;Vt((_e=ue)!==null&&_e!==void 0?_e:g)},events:ue=>{const _e=ue==null?void 0:ue.split(" ");La(_e??C)},"position-strategy":ue=>{var _e;qa((_e=ue)!==null&&_e!==void 0?_e:A)},"delay-show":ue=>{Fe(ue===null?_:Number(ue))},"delay-hide":ue=>{bl(ue===null?O:Number(ue))},float:ue=>{gl(ue===null?T:ue==="true")},hidden:ue=>{pn(ue===null?$:ue==="true")},"class-name":ue=>{jt(ue)}};Object.values(At).forEach(ue=>ue(null)),Object.entries(it).forEach(([ue,_e])=>{var kt;(kt=At[ue])===null||kt===void 0||kt.call(At,_e)})};x.useEffect(()=>{$n(s)},[s]),x.useEffect(()=>{hn(u)},[u]),x.useEffect(()=>{mn(p)},[p]),x.useEffect(()=>{zt(y)},[y]),x.useEffect(()=>{oa(b)},[b]),x.useEffect(()=>{Fe(_)},[_]),x.useEffect(()=>{bl(O)},[O]),x.useEffect(()=>{gl(T)},[T]),x.useEffect(()=>{pn($)},[$]),x.useEffect(()=>{qa(A)},[A]),x.useEffect(()=>{On.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[P]),x.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:P==="core",disableBase:P}}))},[]),x.useEffect(()=>{var it;const At=new Set(za);let ue=r;if(!ue&&n&&(ue=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),ue)try{document.querySelectorAll(ue).forEach(ne=>{At.add({current:ne})})}catch{console.warn(`[react-tooltip] "${ue}" is not a valid CSS selector`)}const _e=document.querySelector(`[id='${l}']`);if(_e&&At.add({current:_e}),!At.size)return()=>null;const kt=(it=He??_e)!==null&&it!==void 0?it:Ba.current,Tt=new MutationObserver(ne=>{ne.forEach(de=>{var Ie;if(!kt||de.type!=="attributes"||!(!((Ie=de.attributeName)===null||Ie===void 0)&&Ie.startsWith("data-tooltip-")))return;const vt=fa(kt);Kn(vt)})}),J={attributes:!0,childList:!1,subtree:!1};if(kt){const ne=fa(kt);Kn(ne),Tt.observe(kt,J)}return()=>{Tt.disconnect()}},[za,Ba,He,l,r]),x.useEffect(()=>{ye!=null&&ye.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),oe&&!Py("border",`${oe}`)&&console.warn(`[react-tooltip] "${oe}" is not a valid \`border\`.`),ye!=null&&ye.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),R&&!Py("opacity",`${R}`)&&console.warn(`[react-tooltip] "${R}" is not a valid \`opacity\`.`)},[]);let vn=w;const xl=x.useRef(null);if(o){const it=o({content:(He==null?void 0:He.getAttribute("data-tooltip-content"))||Ze||null,activeAnchor:He});vn=it?Ke.createElement("div",{ref:xl,className:"react-tooltip-content-wrapper"},it):null}else Ze&&(vn=Ze);Nt&&(vn=Ke.createElement(J_,{content:Nt}));const Sl={forwardRef:qe,id:n,anchorId:l,anchorSelect:r,className:Rd(d,yn),classNameArrow:m,content:vn,contentWrapperRef:xl,place:ua,variant:ai,offset:Bt,wrapper:tt,events:st,openOnClick:E,positionStrategy:li,middlewares:N,delayShow:Yn,delayHide:Vn,float:Ua,hidden:Il,noArrow:V,clickable:H,closeOnEsc:G,closeOnScroll:Z,closeOnResize:te,openEvents:pe,closeEvents:Re,globalCloseEvents:ge,imperativeModeOnly:Le,style:ye,position:Se,isOpen:B,defaultIsOpen:X,border:oe,opacity:R,arrowColor:Q,arrowSize:W,setIsOpen:I,afterShow:ie,afterHide:Ce,disableTooltip:ce,activeAnchor:He,setActiveAnchor:it=>ca(it),role:St};return Ke.createElement(Z_,{...Sl})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||Zy({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||Zy({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 K1=["shift","alt","meta","mod","ctrl","control"],P_={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 hl(n){return(P_[n.trim()]||n.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function F1(n){return K1.includes(n)}function rd(n,l=","){return n.toLowerCase().split(l)}function ud(n,l="+",r=">",s=!1,u){let o=[],d=!1;n=n.trim(),n.includes(r)?(d=!0,o=n.toLocaleLowerCase().split(r).map(p=>hl(p))):o=n.toLocaleLowerCase().split(l).map(p=>hl(p));const m={alt:o.includes("alt"),ctrl:o.includes("ctrl")||o.includes("control"),shift:o.includes("shift"),meta:o.includes("meta"),mod:o.includes("mod"),useKey:s},y=o.filter(p=>!K1.includes(p));return{...m,keys:y,description:u,isSequence:d,hotkey:n}}typeof document<"u"&&(document.addEventListener("keydown",n=>{n.code!==void 0&&G1([hl(n.code)])}),document.addEventListener("keyup",n=>{n.code!==void 0&&X1([hl(n.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Ra.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Ra.clear()},0)}));const Ra=new Set;function dh(n){return Array.isArray(n)}function I_(n,l=","){return(dh(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 W_(n,l,r){(typeof r=="function"&&r(n,l)||r===!0)&&n.preventDefault()}function e6(n,l,r){return typeof r=="function"?r(n,l):r===!0||r===void 0}const t6=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function n6(n){return Z1(n,t6)}function Z1(n,l=!1){const{target:r,composed:s}=n;let u,o;return a6(r)&&s?(u=n.composedPath()[0]&&n.composedPath()[0].tagName,o=n.composedPath()[0]&&n.composedPath()[0].role):(u=r&&r.tagName,o=r&&r.role),dh(l)?!!(u&&l&&l.some(d=>d.toLowerCase()===u.toLowerCase()||d===o)):!!(u&&l&&l)}function a6(n){return!!n.tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")}function l6(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 s6=(n,l,r=!1)=>{const{alt:s,meta:u,mod:o,shift:d,ctrl:m,keys:y,useKey:p}=l,{code:b,key:g,ctrlKey:w,metaKey:C,shiftKey:E,altKey:A}=n,N=hl(b);if(p&&(y==null?void 0:y.length)===1&&y.includes(g))return!0;if(!(y!=null&&y.includes(N))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!r){if(s!==A&&N!=="alt"||d!==E&&N!=="shift")return!1;if(o){if(!C&&!w)return!1}else if(u!==C&&N!=="meta"&&N!=="os"||m!==w&&N!=="ctrl"&&N!=="control")return!1}return y&&y.length===1&&y.includes(N)?!0:y?I_(y):!y},i6=x.createContext(void 0),r6=()=>x.useContext(i6);function J1(n,l){return n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(n).length===Object.keys(l).length&&Object.keys(n).reduce((r,s)=>r&&J1(n[s],l[s]),!0):n===l}const u6=x.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),o6=()=>x.useContext(u6);function c6(n){const l=x.useRef(void 0);return J1(l.current,n)||(l.current=n),l.current}const tv=n=>{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()},f6=typeof window<"u"?x.useLayoutEffect:x.useEffect;function $t(n,l,r,s){const u=x.useRef(null),o=x.useRef(!1),d=Array.isArray(r)?Array.isArray(s)?void 0:s:r,m=dh(n)?n.join(d==null?void 0:d.delimiter):n,y=Array.isArray(r)?r:Array.isArray(s)?s:void 0,p=x.useCallback(l,y??[]),b=x.useRef(p);y?b.current=p:b.current=l;const g=c6(d),{activeScopes:w}=o6(),C=r6();return f6(()=>{if((g==null?void 0:g.enabled)===!1||!l6(w,g==null?void 0:g.scopes))return;let E=[],A;const N=($,V=!1)=>{var H;if(!(n6($)&&!Z1($,g==null?void 0:g.enableOnFormTags))){if(u.current!==null){const G=u.current.getRootNode();if((G instanceof Document||G instanceof ShadowRoot)&&G.activeElement!==u.current&&!u.current.contains(G.activeElement)){tv($);return}}(H=$.target)!=null&&H.isContentEditable&&!(g!=null&&g.enableOnContentEditable)||rd(m,g==null?void 0:g.delimiter).forEach(G=>{var te,pe,Re,ge;if(G.includes((g==null?void 0:g.splitKey)??"+")&&G.includes((g==null?void 0:g.sequenceSplitKey)??">")){console.warn(`Hotkey ${G} contains both ${(g==null?void 0:g.splitKey)??"+"} and ${(g==null?void 0:g.sequenceSplitKey)??">"} which is not supported.`);return}const Z=ud(G,g==null?void 0:g.splitKey,g==null?void 0:g.sequenceSplitKey,g==null?void 0:g.useKey,g==null?void 0:g.description);if(Z.isSequence){A=setTimeout(()=>{E=[]},(g==null?void 0:g.sequenceTimeoutMs)??1e3);const Le=Z.useKey?$.key:hl($.code);if(F1(Le.toLowerCase()))return;E.push(Le);const ye=(te=Z.keys)==null?void 0:te[E.length-1];if(Le!==ye){E=[],A&&clearTimeout(A);return}E.length===((pe=Z.keys)==null?void 0:pe.length)&&(b.current($,Z),A&&clearTimeout(A),E=[])}else if(s6($,Z,g==null?void 0:g.ignoreModifiers)||(Re=Z.keys)!=null&&Re.includes("*")){if((ge=g==null?void 0:g.ignoreEventWhen)!=null&&ge.call(g,$)||V&&o.current)return;if(W_($,Z,g==null?void 0:g.preventDefault),!e6($,Z,g==null?void 0:g.enabled)){tv($);return}b.current($,Z),V||(o.current=!0)}})}},_=$=>{$.code!==void 0&&(G1(hl($.code)),((g==null?void 0:g.keydown)===void 0&&(g==null?void 0:g.keyup)!==!0||g!=null&&g.keydown)&&N($))},O=$=>{$.code!==void 0&&(X1(hl($.code)),o.current=!1,g!=null&&g.keyup&&N($,!0))},T=u.current||(d==null?void 0:d.document)||document;return T.addEventListener("keyup",O,d==null?void 0:d.eventListenerOptions),T.addEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&rd(m,g==null?void 0:g.delimiter).forEach($=>C.addHotkey(ud($,g==null?void 0:g.splitKey,g==null?void 0:g.sequenceSplitKey,g==null?void 0:g.useKey,g==null?void 0:g.description))),()=>{T.removeEventListener("keyup",O,d==null?void 0:d.eventListenerOptions),T.removeEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&rd(m,g==null?void 0:g.delimiter).forEach($=>C.removeHotkey(ud($,g==null?void 0:g.splitKey,g==null?void 0:g.sequenceSplitKey,g==null?void 0:g.useKey,g==null?void 0:g.description))),E=[],A&&clearTimeout(A)}},[m,g,w]),u}function d6(){return h.jsxs("div",{className:"flex items-center bg-white border-b border-gray-200 overflow-auto no-scrollbar",children:[h.jsx(h6,{}),h.jsx(p6,{}),h.jsx(y6,{})]})}function h6(){const{dataSourceId:n,name:l}=x.useContext(ia),{data:r}=Ao(n),{data:s}=x.useContext(Qn),u=Er(Zt.EDITOR),o=n_(),d=()=>{var y,p;(y=s==null?void 0:s.result.columns)!=null&&y[0].table&&Id({table:(p=s==null?void 0:s.result.columns)==null?void 0:p[0].table,dataSourceId:n})},m=async()=>{const y=await _r("Query name",l);!y||!(s!=null&&s.result.queryHistoryId)||o.mutate({name:y,queryId:s.result.queryHistoryId})};return $t("s",m),h.jsxs("div",{className:ae.tableConfig,children:[h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Manage filters",onClick:()=>Ln("filters"),className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Filter"}),h.jsx("span",{className:"hotkey",children:"F"})]}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Join tables",onClick:()=>Ln("joins"),className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Join"}),h.jsx("span",{className:"hotkey",children:"J"})]}),h.jsx(v6,{}),h.jsxs("button",{"data-tooltip-id":"explorer-more-actions",className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{className:"whitespace-nowrap",children:"More actions"}),h.jsx(Ro,{width:16,height:16,className:"rotate-90"})]}),h.jsxs(fh,{id:"explorer-more-actions",className:"z-10 shadow-md flex flex-col",clickable:!0,variant:"light",opacity:1,children:[h.jsxs("button",{onClick:()=>Ln("columns"),className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Columns"}),h.jsx("span",{className:"hotkey",children:"C"})]}),h.jsxs("button",{onClick:()=>Ln("groupBy"),className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Group by"}),h.jsx("span",{className:"hotkey",children:"G"})]}),h.jsxs("button",{onClick:()=>Ln("aggregate"),className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Aggregate"}),h.jsx("span",{className:"hotkey",children:"A"})]}),h.jsxs("button",{onClick:ah,className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Query editor"}),h.jsx("span",{className:"hotkey",children:"E"})]}),u&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-0.5 my-2 bg-gray-100"}),h.jsxs("button",{onClick:m,className:le(ae.tableAction,ae.modal,ae.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:d,className:le(ae.tableAction,ae.modal,ae.blue),children:"Insert new row"})]})]})]})}const m6=[5,10,20,50,100,200];function p6(){const{name:n}=x.useContext(ia),{state:l}=x.useContext(mt),{refetch:r,data:s}=x.useContext(Qn),{size:u,setSize:o}=D1(),d=ti(),m=Lt(),{rename:y}=O1(),p=(window==null?void 0:window.location.hostname)!=="localhost",b=()=>{d.mutateAsync({name:n,opts:l}).then(C=>{m(`${Xe.workbench.path}/tab/${C.id}`)})},g=()=>{if(s!=null&&s.result.queryHistoryId){const C=new URL(window.location.href);C.pathname=Xe.share.path,C.searchParams.set("shareId",s.result.queryHistoryId),navigator.clipboard.writeText(C.toString()),It.success("Share link copied to clipboard")}},w=()=>y(n);return $t("e",ah),$t("d",b),$t("r",w),h.jsxs("div",{className:ae.tableConfig,children:[h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Refresh data",onClick:r,className:le(ae.tableAction,ae.blue),children:"Refresh"}),p&&h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Share query",onClick:g,className:le(ae.tableAction,ae.blue),children:"Share"}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Clone in a new tab",onClick:b,className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Clone"}),h.jsx("span",{className:"hotkey",children:"D"})]}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Clone in a new tab",onClick:w,className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Rename"}),h.jsx("span",{className:"hotkey",children:"R"})]}),h.jsxs("button",{"data-tooltip-id":"rows-num",className:le(ae.tableAction,ae.size,ae.blue),children:[h.jsxs("span",{className:"whitespace-nowrap",children:[u," rows"]}),h.jsx(Ro,{width:16,height:16,className:"rotate-90"})]}),h.jsx(fh,{id:"rows-num",className:"z-10 shadow-md flex",clickable:!0,variant:"light",opacity:1,children:m6.map(C=>h.jsx("button",{onClick:()=>o(C),className:le(ae.tableAction,ae.blue),children:h.jsx("span",{children:C})}))})]})}function y6(){const{page:n,size:l,setPage:r}=D1(),{data:s}=x.useContext(Qn),u=(s==null?void 0:s.result.rows.length)===l;return h.jsxs("div",{className:ae.tableConfig,children:[h.jsx("button",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",disabled:n<=0,className:le(ae.tableAction,ae.blue),onClick:()=>r(n-1),children:"Prev"}),h.jsx("span",{className:"text-sm bg-gray-50 rounded-md px-2 border border-gray-200",children:n+1}),h.jsx("button",{"data-tooltip-content":"Next page","data-tooltip-id":"default",disabled:!u,className:le(ae.tableAction,ae.blue),onClick:()=>r(n+1),children:"Next"})]})}function v6(){const{state:n,setState:l}=x.useContext(mt),r=()=>{l(u=>({...u,searchAll:void 0}))},s=()=>{_r("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(o=>({...o,searchAll:u.length>0?u:void 0}))})};return $t("k",s),n.searchAll?h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Remove search all filter",onClick:r,className:le(ae.tableAction,ae.red),children:h.jsxs("span",{className:"truncate px-1",children:["❌ ",n.searchAll]})}):h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Search text in all columns",onClick:s,className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{className:"whitespace-nowrap",children:"Search text"}),h.jsx("span",{className:"hotkey",children:"K"})]})}const b6="_drop-container_1l2kt_2",g6="_item_1l2kt_2",nv={dropContainer:b6,item:g6},Dd=({dataSourceId:n,focusId:l,placeholder:r="Column",onChange:s,value:u,autoFocus:o,allowTables:d})=>{const{data:m}=Ws(n),y=x.useRef(null),p=x.useMemo(()=>{if(!m)return[];let _=m;return d&&(_=m.filter(O=>d.includes(O.tableName))),_.flatMap(O=>O.columns.map(T=>({value:O.tableName+"."+T.name,label:T.name,table:O.tableName,searchValue:T.name.toLowerCase()})))},[m,d]),b=x.useMemo(()=>{const _=u.toLowerCase()||"",O=[];for(let T=0;T<p.length&&O.length<10;T++)p[T].searchValue.includes(_)&&O.push(p[T]);return O},[p,u]),[g,w]=x.useState(!1),[C,E]=x.useState(0),A=_=>{var O;if(_.key==="ArrowDown")_.preventDefault(),E(T=>(T+1)%b.length);else if(_.key==="ArrowUp")_.preventDefault(),E(T=>(T-1+b.length)%b.length);else if(_.key==="Enter"&&C>=0&&C<b.length){_.preventDefault();const T=b[C].value;w(!1);const $=p.findIndex(V=>V.value===T)>-1;s(((O=b[C])==null?void 0:O.value)||T,$,!0)}};x.useEffect(()=>{var O;const _=(O=y.current)==null?void 0:O.querySelector('[data-is-active="true"]');_&&_.scrollIntoView({behavior:"smooth",block:"nearest"})},[C]);const N=_=>{const O=_.currentTarget.value,T=p.findIndex($=>$.value===O)>-1;s(O,T,!1)};return h.jsxs("div",{className:"relative",onFocus:()=>w(!0),onBlur:()=>w(!1),children:[h.jsx("input",{autoFocus:o,onKeyDown:A,value:u,onChange:N,className:"input w-full",placeholder:r,"data-focus":l}),g&&b.length>0&&h.jsx("div",{className:nv.dropContainer,ref:y,tabIndex:-1,children:b.map((_,O)=>h.jsxs("div",{className:nv.item,"data-is-active":C===O,onMouseDownCapture:T=>{T.preventDefault(),w(!1),s(_.value,!0,!0)},children:[h.jsx("span",{className:"text-xs font-semibold truncate",children:_.table}),h.jsx("p",{className:"truncate text-sm",children:_.label})]},O))})]})},x6="_drop-container_kst64_2",S6="_item_kst64_2",av={dropContainer:x6,item:S6};function w6(n){return y4.includes(n)?h4:v4.includes(n)?d4:b4.includes(n)?m4:Fd}const E6=({value:n,onChange:l,autoFocus:r,focusId:s,colType:u})=>{const o=x.useMemo(()=>{const w=n.toLowerCase()||"";return w6(u||"").filter(C=>C.label.includes(w))},[n,u]),d=x.useRef(null),[m,y]=x.useState(!1),[p,b]=x.useState(0),g=w=>{var C;w.key==="ArrowDown"?(w.preventDefault(),b(E=>(E+1)%o.length)):w.key==="ArrowUp"?(w.preventDefault(),b(E=>(E-1+o.length)%o.length)):w.key==="Enter"&&(p>=0&&p<o.length?(w.preventDefault(),y(!1),l(((C=o[p])==null?void 0:C.label)||"",!0)):l(n,!0))};return x.useEffect(()=>{var C;const w=(C=d.current)==null?void 0:C.querySelector('[data-is-active="true"]');w&&w.scrollIntoView({behavior:"smooth",block:"nearest"})},[p]),h.jsxs("div",{className:"relative",children:[h.jsx("input",{onKeyDown:g,value:n,onChange:w=>l(w.target.value,!1),className:"input w-full",placeholder:"Operator",autoFocus:r,onFocus:()=>y(!0),onBlur:()=>y(!1),"data-focus":s}),m&&o.length>0&&h.jsx("ul",{className:av.dropContainer,ref:d,tabIndex:-1,children:o.map((w,C)=>h.jsx("li",{className:av.item,"data-is-active":p===C,onMouseDownCapture:E=>{E.preventDefault(),y(!1),l(w.label,!0)},children:w.label},C))})]})},C6="_actions_xi02s_2",_6="_filter-actions_xi02s_2",P1={actions:C6,filterActions:_6},N6=["=","<",">",">=","<>","!=","<="];function j6(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 s=Xd[r.operator];if(!s)return It.error(`Filter #${l+1} has invalid operator`),!1;if(r.isColumnRef&&!N6.includes(s))return It.error(`Filter #${l+1} cannot reference another column because it uses '${r.operator}' operator`),!1}return!0}function A6(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 s=Xd[r.operator];l.push({id:r.id,value:r.isColumnRef?[{value:r.value,isColumn:!0}]:p4(s,r.value),operator:s,column:r.column,isEnabled:r.isEnabled,connector:"AND"})}),l}function T6(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 R6=({filter:n,dataSourceId:l,allowedTables:r,inspections:s,autoFocus:u,onChangeColumn:o,onChangeOperator:d,onChangeValue:m,onRemoveFilter:y,triggerIsEnabled:p,onIsColumnChange:b})=>{const g=x.useMemo(()=>{if(!s)return"";let w=null;for(const C of s)for(const E of C.columns)C.tableName+"."+E.name===n.column&&(w=E);return w!=null&&w.type?w.type:""},[n.column,s]);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(Dd,{dataSourceId:l,onChange:w=>o(n.id,w),value:n.column,allowTables:r,focusId:"column",autoFocus:u})}),h.jsx("label",{children:h.jsx(E6,{onChange:w=>d(n.id,w),focusId:"operator",colType:g,value:n.operator})}),g1(Xd[n.operator])&&h.jsx("label",{className:"w-full",children:n.isColumnRef?h.jsx(Dd,{dataSourceId:l,onChange:w=>m(n.id,w),value:n.value,allowTables:r,focusId:"value",placeholder:"Search column"}):h.jsx("input",{className:"input w-full",placeholder:"Filter value",value:n.value,onChange:w=>m(n.id,w.currentTarget.value),"data-focus":"value"})}),h.jsxs("div",{className:P1.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:le("p-0.5 cursor-pointer rounded-lg border",n.isColumnRef?"bg-blue-50 border-blue-200":"bg-white border-white"),onClick:()=>b(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(Hn,{width:20,height:20,className:"text-red-600"})})]})]})},O6=()=>{const{state:n}=x.useContext(mt),{setFilters:l}=A1(),r=Oo(N=>N.filters),{data:s}=Ws(n.dataSourceId),u=x.useMemo(()=>[n.table,...n.joins.map(N=>N.table)],[n.table,n.joins]),[o,d]=x.useState([]),m=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,column:_}:T)])},y=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,operator:_}:T)])},p=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,value:_}:T)])},b=()=>{d(N=>[...N,{id:ml(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}])},g=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,isColumnRef:_}:T)])},w=N=>{d(_=>_.filter(O=>O.id!==N))},C=()=>Do("filters"),E=()=>{j6(o)&&(l(A6(o)),C())},A=N=>{d(_=>_.map(O=>O.id===N?{...O,isEnabled:!O.isEnabled}:O))};return x.useEffect(()=>{if(!r){d([]);return}d(()=>{const N=n.filters.map(_=>{var O,T;return{id:_.id,value:T6(_),column:_.column,operator:Gd[_.operator],isColumnRef:!!((T=(O=_.value)==null?void 0:O[0])!=null&&T.isColumn),isEnabled:_.isEnabled}});return N.push({id:ml(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}),N})},[r]),$t("f",()=>{ho("filters")}),$t("ctrl+f",()=>{alert("Save filters")}),h.jsxs(dn,{isVisible:r,onClose:C,portal:!0,children:[h.jsx(sa,{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:[o.length<1&&h.jsx("p",{className:"p-1 text-center rounded-lg bg-gray-50 border border-gray-200",children:"No filters"}),o.map((N,_)=>h.jsx(R6,{filter:N,dataSourceId:n.dataSourceId,allowedTables:u,inspections:s||[],onChangeColumn:m,onChangeOperator:y,onChangeValue:p,onRemoveFilter:w,onIsColumnChange:g,triggerIsEnabled:A,autoFocus:_===o.length-1},N.id))]}),h.jsxs("div",{className:P1.actions,children:[h.jsx("button",{className:"button tertiary",onClick:b,children:"Add filter"}),h.jsx("button",{className:"button primary",onClick:E,children:"Apply filters"})]})]})},D6="_card_cceq5_2",M6="_cards-list_cceq5_2",U6="_join-modal_cceq5_2",L6="_close-button_cceq5_2",Yu={card:D6,cardsList:M6,joinModal:U6,closeButton:L6},q6=()=>{const{isFetching:n}=x.useContext(Qn),l=Oo(p=>p.joins),{toggle:r,joins:s}=T1(),{availableJoins:u}=x.useContext(ia),[o,d]=x.useState(""),m=x.useMemo(()=>{const p=o.toLowerCase();return u.filter(b=>b.on.toTable.toLowerCase().includes(p))},[u,o]),y=()=>Do("joins");return $t("j",()=>{u.length>0?Ln("joins"):It.error("No available tables to join")}),h.jsxs(dn,{isVisible:l,onClose:y,portal:!0,children:[h.jsx(sa,{onClick:y}),h.jsxs("div",{className:Yu.joinModal,children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),s.length>0&&h.jsx("div",{className:Yu.cardsList,children:s.map((p,b)=>h.jsxs("div",{className:Yu.card,children:[h.jsxs("p",{className:"text-sm truncate",children:[p.table," on ",p.on]}),b===s.length-1&&h.jsx("button",{className:Yu.closeButton,onClick:()=>r(p),disabled:n,children:h.jsx(Hn,{width:20,height:20})})]},p.table+p.on))}),u.length>0?h.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:p=>d(p.target.value),value:o,disabled:n}):h.jsx(Ut,{variant:"warning",children:h.jsx("p",{className:"text-sm truncate",children:"No more tables to join"})}),h.jsx("div",{className:`flex flex-col mt-2 overflow-y-auto ${n?"opacity-40":""}`,children:m.map(p=>h.jsx(j1,{hook:p,onClick:()=>{n||(r({table:p.on.toTable,type:"LEFT",on:p.where}),d(""))}},p.where))})]})]})};function z6(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}function lv(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}const B6="_container_18ys9_2",k6="_column-label_18ys9_2",H6="_not-active_18ys9_2",to={container:B6,columnLabel:k6,notActive:H6};function Q6(n){if(!n)return[];const l={};return n.forEach(r=>{l[r.table]?l[r.table].push({value:r.full,ogColumn:r.column,label:fl(r.column),type:r.type}):l[r.table]=[{value:r.full,ogColumn:r.column,label:fl(r.column),type:r.type}],g4[r.type]&&["YEAR","MONTH","DAY"].forEach(s=>{l[r.table].push({value:s+" "+r.full,ogColumn:r.column,label:s+" "+fl(r.column),type:"number",nested:!0})})}),Object.entries(l).reduce((r,[s,u])=>(r.push({name:fl(s),columns:u}),r),[])}function $6(n,l){const r=l.toLowerCase();return n.map(s=>{const u=s.columns.filter(o=>o.label.toLowerCase().includes(r)||o.ogColumn.toLowerCase().includes(r));return{...s,columns:u}}).filter(s=>s.columns.length>0)}const Y6=({column:n,selected:l,onCheck:r})=>h.jsxs("label",{className:le(to.columnLabel,l?to.active:to.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),V6={columns:"c",groupBy:"g"},sv=({mode:n})=>{const l=Oo(_=>_[n]),{allColumns:r}=x.useContext(ia),{state:s,setState:u}=x.useContext(mt),[o,d]=x.useState({}),[m,y]=x.useState(""),p=x.useMemo(()=>Q6(r),[r]),b=s.aggregations.length>0||s.groupBy.length>0,g=x.useMemo(()=>m?$6(p,m):p,[m,p]),w=_=>{d(O=>({...O,[_.target.name]:_.target.checked}))},C=_=>{const O=_.target.checked;d(T=>{for(const $ of r)T[$.full]=O;return{...T}})},E=()=>{Do(n)},A=()=>{const _=[];for(const[O,T]of Object.entries(o))if(T){const[$,V]=O.split(" ");_.push({value:V||$,fn:V?$:void 0})}u(O=>({...O,[n]:_})),E()},N=x.useMemo(()=>{for(const _ of r)if(!o[_.full])return!1;return!0},[o,r]);return $t(V6[n],()=>{n==="columns"?b?It.error("Columns are ignored when there is at least one aggregation or group by"):ho("columns"):ho("groupBy")}),x.useEffect(()=>{if(!l){d({});return}d(()=>z6(s[n].map(_=>_.fn?_.fn+" "+_.value:_.value)))},[l,d]),h.jsxs(dn,{isVisible:l,onClose:E,portal:!0,children:[h.jsx(sa,{onClick:E}),h.jsxs("div",{className:to.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:g.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(O=>h.jsx(Y6,{column:O,selected:o,onCheck:w},O.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:E,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:A,children:"Apply"})]})]})]})},K6="_options-container_11n3h_2",F6={optionsContainer:K6},od="COUNT all",G6=n=>n.distinct?[n.fn,"DISTINCT",n.value].join(" "):[n.fn,n.value].join(" "),X6=()=>{const n=Oo(E=>E.aggregate),{dataSourceId:l}=x.useContext(ia),{setState:r,state:s}=x.useContext(mt),{data:u}=x.useContext(Qn),[o,d]=x.useState({fn:"",col:""}),m=E=>d({...o,fn:E.currentTarget.value}),y=E=>d({...o,col:E}),p=()=>Do("aggregate"),b=()=>{const E=o.fn===od?{value:"*",fn:"COUNT"}:{fn:o.fn,value:o.col,distinct:o.fn==="COUNT"};r(A=>({...A,aggregations:[...A.aggregations,E]}))},g=o.fn===od,w=g?!1:!o.col||!o.fn,C=E=>{const A=Wn(E);r(N=>({...N,aggregations:N.aggregations.filter(_=>_.fn!==E.fn||_.value!==E.value),orderBy:N.orderBy.filter(_=>_.column!==A)}))};return $t("a",()=>{ho("aggregate")}),h.jsxs(dn,{isVisible:n,onClose:p,backdropClose:!0,portal:!0,children:[h.jsx(sa,{onClick:p}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),Xl(s.aggregations.length,0)&&h.jsx("div",{className:"flex flex-col gap-1 mt-4",children:s.aggregations.map((E,A)=>h.jsxs("p",{className:"p-2 rounded-md bg-gray-50 flex items-center justify-between",children:[h.jsx("span",{children:G6(E)}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove aggregation",className:"p-0.5 text-sm cursor-pointer",onClick:()=>C(E),children:h.jsx(Hn,{width:20,height:20,className:"text-red-600"})})]},A))}),h.jsxs("div",{className:F6.optionsContainer,children:[h.jsxs("label",{className:le(g&&"col-span-2"),children:[h.jsx("p",{className:"font-semibold text-xs",children:"Function"}),h.jsxs("select",{className:"input w-full",value:o.fn,onChange:m,autoFocus:!0,children:[h.jsx("option",{value:"",disabled:!0,children:"Select function"}),h.jsx("option",{value:od,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"})]})]}),!g&&h.jsxs("label",{children:[h.jsx("p",{className:"font-semibold text-xs",children:"Column"}),h.jsx(Dd,{dataSourceId:l,allowTables:(u==null?void 0:u.result.tables)||[],onChange:y,value:o.col})]}),h.jsx("button",{className:"button primary",disabled:w,onClick:b,children:"Add"})]})]})]})},Z6=({options:n,updater:l,name:r,tabId:s})=>{const u=w4(n,l),o=j4(s,u.state),d=S4(o.data,u.state.dataSourceId,r,s);return h.jsx(ia,{value:d,children:h.jsx(mt,{value:u,children:h.jsxs(Qn,{value:o,children:[h.jsx(d6,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[h.jsxs("div",{className:"m-2 flex-1 overflow-auto pb-24 lg:pb-12 no-scrollbar",children:[h.jsx("div",{className:"pb-0.5 sticky bottom-0"}),h.jsx(AC,{})]}),h.jsx(O6,{}),h.jsx(q6,{}),h.jsx(sv,{mode:"columns"}),h.jsx(sv,{mode:"groupBy"}),h.jsx(X6,{}),h.jsx(e_,{})]})]})})})},I1=()=>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..."})]}),J6=({id:n})=>{const{data:l}=C4(n),r=x.useCallback(s=>{if(!l)return;const u=s(Qs(l.opts));ht.setQueryData(["workbench-tabs",l.id],{...l,opts:{...l.opts,...u}})},[l]);return l?h.jsx(Z6,{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(I1,{})})},P6=()=>{const{id:n}=Jx(),l=Lt(),{data:r}=Jd(),s=_4(),u=nh(To.laptop),o=y=>{if(y===n&&r){if(r.length===1)return l(Xe.home.path);if(r.length>1){const p=r.find(b=>b.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&&(s.mutate(p),o(p))},m=y=>{if(y.button===1){const p=y.currentTarget.dataset.tabId;s.mutate(p),o(p)}};return $t("ctrl+w",()=>{n&&(s.mutate(n),o(n))},{preventDefault:!0}),h.jsxs("div",{className:"h-screen max-h-screen bg-(--bg) flex flex-col",children:[n&&h.jsx(J6,{id:n}),h.jsx("div",{className:le(sr.tabs,"no-scrollbar",!u&&sr.mobile),children:r==null?void 0:r.map(y=>h.jsxs("div",{onClick:()=>l(`${Xe.workbench.path}/tab/${y.id}`),className:le(sr.tab,y.id===n&&sr.active),"data-tab-id":y.id,"data-tooltip-id":"tab","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:sr.closeButton,onClick:d,children:h.jsx(Hn,{width:20,height:20})})]},y.id))})]})},I6="_root_1xp7h_2",W6="_down_1xp7h_2",eN="_chevron_1xp7h_2",tN="_table-name-container_1xp7h_2",nN="_link_1xp7h_2",aN="_table-name_1xp7h_2",lN="_ul_1xp7h_2",sN="_column-type_1xp7h_2",Ta={root:I6,down:W6,chevron:eN,tableNameContainer:tN,link:nN,tableName:aN,ul:lN,columnType:sN},[xj,iN]=fn(!1),W1=()=>iN(!1),rN=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"});function uN(n,l){if(l&&n.toLowerCase().includes(l))return"bg-yellow-200"}const oN=({insp:n,filter:l,expanded:r})=>{const s=x.useMemo(()=>r?n.columns:l.length<1?[]:n.columns.filter(u=>u.name.toLowerCase().includes(l)),[n,l,r]);return h.jsx("ul",{className:Ta.ul,children:s.map(u=>h.jsx(h.Fragment,{children:h.jsxs("li",{children:[u.isPrimary?"🔐":"🏷️"," ",h.jsx("span",{className:uN(u.name,l),children:u.name})," ",h.jsxs("span",{className:Ta.columnType,children:["[",u.type,"]"]}),u.ref&&h.jsxs("span",{children:[" ➡️ ",h.jsx("span",{className:Ta.columnType,children:u.ref.table}),".",u.ref.field]})]},u.name+u.type)}))},n.id)};function cN({id:n}){const{data:l}=Ao(n),{data:r}=Ws(n),s=Lt(),u=e4(),o=y1(),d=t4(),m=ti(),y=x.useMemo(()=>l!=null&&l.lastInspected?rN.format(new Date(l.lastInspected)):"--",[l]),[p,b]=x.useState({}),[g,w]=x.useState(""),[C,E]=x.useState("table"),A=Er(Zt.EDITOR),N=g.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]),O=Z=>{b(te=>({...te,[Z]:!te[Z]}))},T=Z=>{m.mutateAsync({name:Z,opts:Qs({table:Z,dataSourceId:n})}).then(te=>{$s(void 0),W1(),s(`${Xe.workbench.path}/tab/${te.id}`)})},$=()=>{o.mutate(n)},V=async()=>{const Z=await _r("Enter name",l==null?void 0:l.name);Z&&u.mutate({id:n,dataSource:{name:Z}})},H=async()=>{await w1("Are you sure you want to delete this data source?")&&(d.mutate(n),$s(void 0))},G=C==="column";return h.jsxs("div",{className:Ta.root,children:[h.jsxs("h3",{className:"page-head flex gap-2",children:[l&&h.jsx(Pd,{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}),A&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsx("button",{disabled:o.isLoading,onClick:$,className:"button tertiary flex items-center gap-1",children:"Refresh schema"}),h.jsx("button",{disabled:o.isLoading,onClick:V,className:"button tertiary",children:"Rename"}),h.jsx("button",{disabled:o.isLoading,onClick:H,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=>E(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:g,onChange:Z=>w(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:Ta.tableNameContainer,children:[h.jsx("button",{className:le(Ta.chevron,p[Z.id]&&Ta.down),onClick:()=>O(Z.id),children:h.jsx(Ro,{width:16,height:16})}),h.jsx("button",{className:le(Ta.tableName,"flex-1"),onClick:()=>O(Z.id),children:Z.tableName}),h.jsx("button",{className:Ta.link,onClick:()=>T(Z.tableName),children:"↗️"})]}),(p[Z.id]||g.length>0)&&h.jsx(oN,{insp:Z,filter:G?N:"",expanded:p[Z.id]})]},Z.id))})]})}const fN=()=>{const n=I4(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const s=()=>$s(void 0);return h.jsx(R1,{isVisible:n!=null,onClose:s,onClosed:()=>r(void 0),backdropClose:!0,children:l&&h.jsx(cN,{id:l})})};function dN(n,l=500){const[r,s]=x.useState(n);return x.useEffect(()=>{const u=setTimeout(()=>s(n),l);return()=>clearTimeout(u)},[n,l]),r}const hN="_search_1xud1_2",mN="_entry_1xud1_2",pN="_ds_1xud1_2",yN="_ds-entry_1xud1_2",Vu={search:hN,entry:mN,ds:pN,dsEntry:yN};function vN(n,l,r){try{const s=r.getItem(n);if(s)return JSON.parse(s)}catch(s){console.warn("Failed to restore tabs",s)}return l}const bN=({storage:n=localStorage,localStorageKey:l,initialData:r})=>{const s=fn(vN(l,r,n));return s[2].subscribe(u=>{n.setItem(l,JSON.stringify(u))}),s},[gN,xN]=bN({initialData:[],localStorageKey:"selected-data-sources-v1"}),SN=n=>xN(l=>{const r=l.indexOf(n);return r>-1?(l.splice(r,1),[...l]):[...l,n]}),wN={table:"📄",query:"📖"},EN=({onTable:n,onQuery:l,autoFocus:r})=>{const[s,u]=x.useState(""),[o,d]=x.useState(-1),m=dN(s,200),y=gN(),{data:p}=la(),{data:b}=Kd({teamId:p==null?void 0:p.teamId}),g=x.useMemo(()=>{const _=[],O=lv(y);if(!b||b.length===0)return[];for(const T of b)O[T.id]&&_.push(T.id);return _},[y,b]),{data:w}=Z3(m,{teamId:p==null?void 0:p.teamId,selectedDataSources:g}),C=_=>{_.type==="table"?n(_.name,_.dataSourceId):_.type==="query"&&l(_.id,_.dataSourceId)},E=_=>{var O;w&&(_.key==="ArrowDown"?(_.preventDefault(),d(T=>(T+1)%w.length)):_.key==="ArrowUp"?(_.preventDefault(),d(T=>(T-1+w.length)%w.length)):_.key==="Enter"&&o>=0&&(O=w[o])!=null&&O.name&&(_.preventDefault(),C(w[o])))},A=_=>{const O=_.currentTarget.dataset.tableId,T=w==null?void 0:w.find($=>$.id===O);T&&C(T)},N=x.useMemo(()=>lv(y),[y]);return h.jsxs("div",{className:"overflow-hidden flex flex-col w-full lg:w-lg",children:[Xl(b==null?void 0:b.length,0)&&h.jsx("div",{className:"flex overflow-x-auto mb-2 gap-2 no-scrollbar",children:b.map(_=>h.jsxs("label",{className:Vu.dsEntry,children:[h.jsx("input",{type:"checkbox",checked:N[_.id]===!0,onChange:()=>SN(_.id)}),h.jsx("span",{children:_.name})]},_.id))}),h.jsx("input",{className:Vu.search,placeholder:"Search table or saved query to start from",value:s,onChange:_=>u(_.target.value),onKeyDown:E,autoFocus:r}),Xl(w==null?void 0:w.length,0)&&h.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:w.map((_,O)=>h.jsxs("button",{className:Vu.entry,"data-is-active":o===O,"data-table-id":_.id,onClick:A,children:[h.jsxs("p",{className:"font-semibold",children:[wN[_.type]," ",_.name]}),h.jsxs("p",{className:Vu.ds,children:["📦 ",_.dataSourceName]})]},_.id))})]})},CN=()=>{const n=A4(),l=(u,o)=>{n==null||n.onConfirm("table",u,o)},r=(u,o)=>{n==null||n.onConfirm("query",u,o)},s=()=>{n==null||n.onCancel()};return h.jsxs(dn,{isVisible:!!n,onClose:s,children:[h.jsx(sa,{onClick:s}),h.jsx(EN,{autoFocus:!0,onTable:l,onQuery:r})]})},_N=()=>{const n=wr("Hotkey"),l=Lt(),{pathname:r}=Yt(),{data:s}=la(),{data:u}=Jd(),o=r===Xe.home.path;$t("n",()=>{s&&n()}),$t("w",()=>{s&&(u&&u.length>0?l(`${Xe.workbench.path}/tab/${u[0].id}`):n())},{enabled:o}),$t("h",()=>{l(Xe.home.path)},{enabled:!o})},NN=()=>{const n=Yt();x.useEffect(()=>{},[n.pathname])},[jN,eb]=fn(!1),cd=()=>eb(!1),tb=()=>eb(!0),AN=({repeatPassword:n,password:l})=>l.length<1?null:l.length<8?h.jsx(Ut,{variant:"warning",children:"New password should be at least 8 characters long"}):l!==n?h.jsx(Ut,{variant:"warning",children:"Repeat password should match new password"}):null,TN=()=>{const n=jN(),{data:l}=la(),{mutateAsync:r,isLoading:s}=n4(),u=Lt(),[{password:o,repeatPassword:d},{change:m,touched:y,reset:p}]=Cr({password:"",repeatPassword:""}),b=()=>{u("/"),Sr.logout().then(()=>{cd()})},g=()=>{r({password:o}).then(()=>{p(),It.success("Password successfully updated!")})},w=o.length<8||o!==d||s,C=y.includes("password");return h.jsxs(dn,{isVisible:n,onClose:cd,children:[h.jsx(sa,{onClick:cd}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[h.jsx(S1,{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:o,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(AN,{password:o,repeatPassword:d}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsx("button",{className:"button tertiary",disabled:w,onClick:g,children:"Update password"}),h.jsx("button",{className:"button danger",onClick:b,children:"Log out"})]})]})]})},[RN,nb]=fn(!1),ab=()=>nb(!0),iv=()=>nb(!1),ON=n=>Wt({queryKey:["team-users"],queryFn:async()=>{const{data:l}=await Ue.get("/teams/"+n+"/users");return l.data},enabled:!!n}),DN=()=>qt({mutationFn:async({role:n,teamId:l,userId:r})=>(await Ue.patch("/teams/"+l+"/user-role",{role:n,userId:r}),!0),onSuccess:()=>{ht.invalidateQueries({queryKey:["team-users"]})}}),MN=()=>qt({mutationFn:async({teamId:n,userId:l})=>(await Ue.delete("/teams/"+n,{params:{userId:l}}),!0),onSuccess:()=>{ht.invalidateQueries({queryKey:["team-users"]})}}),UN="_user-entry_lf251_2",LN="_select-container_lf251_2",rv={userEntry:UN,selectContainer:LN},qN=()=>{const n=RN(),{data:l}=la(),{data:r}=ON(l==null?void 0:l.teamId),{mutate:s,isLoading:u}=a4(),{mutate:o,isLoading:d}=DN(),{mutate:m,isLoading:y}=MN(),[p,{change:b,reset:g}]=Cr({password:"",username:""}),w=()=>{s({username:p.username,password:p.password,teamId:(l==null?void 0:l.teamId)||""}),g()},C=(_,O)=>{o({teamId:l.teamId,role:O,userId:_})},E=_=>{w1("Are you sure you want to remove this user?").then(O=>{O&&m({userId:_,teamId:l.teamId})})},A=Er(Zt.ADMIN),N=u||d||y;return h.jsxs(dn,{isVisible:n,onClose:iv,backdropClose:!0,children:[h.jsx(sa,{onClick:iv}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[h.jsx(S1,{children:"Manage users"}),Xl(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:rv.userEntry,children:[h.jsx("div",{className:rv.selectContainer,children:h.jsxs("select",{value:_.role,disabled:!A||N,onChange:O=>C(_.id,O.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}),A&&h.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>E(_.id),children:"❌"})]},_.id))}),A&&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:b("username"),value:p.username,placeholder:"Username",disabled:N}),h.jsx("input",{className:"input",onChange:b("password"),value:p.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:N}),h.jsx("button",{className:"button primary",onClick:w,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."})]})]})]})},zN=()=>{const[n,l]=x.useState(""),[r,s]=x.useState(""),[u,o]=x.useState(),[d,m]=x.useState(!1),y=Lt(),p=b=>{b.preventDefault(),o(void 0),Sr.login({password:r,username:n}).then(()=>{y("/",{replace:!0})}).catch(o)};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"}),u&&h.jsx(Ut,{variant:"danger",children:"Failed to login. Please verify your credentials"}),h.jsx("input",{value:n,onChange:b=>l(b.currentTarget.value),className:"input",placeholder:"User name"}),h.jsx("input",{value:r,onChange:b=>s(b.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),h.jsx("button",{type:"submit",className:"button primary",children:"Login"}),d?h.jsxs(Ut,{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?"})]})})})},BN=()=>{const n=Lt(),{pathname:l}=Yt(),{data:r,isLoading:s}=v1();x.useEffect(()=>{!r&&!s&&l!==Xe.login.path&&n(Xe.login.path)},[r,s,n,l])},kN=()=>{const[n]=Q2(),l=Lt(),r=ti(),s=n.get("shareId");return x.useEffect(()=>{s&&r.mutateAsync({queryId:s}).then(u=>{l(`${Xe.workbench.path}/tab/${u.id}`,{replace:!0})})},[s]),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(I1,{}),h.jsx("p",{children:"Fetching query information"})]}),r.isError&&h.jsx(Ut,{variant:"danger",children:"Failed to load query information"})]})};function HN(){return _N(),NN(),BN(),h.jsxs(h.Fragment,{children:[h.jsxs(f2,{children:[h.jsx(rr,{path:Xe.home.path,element:h.jsx(lE,{})}),h.jsx(rr,{path:`${Xe.workbench.path}/tab/:id`,element:h.jsx(P6,{})}),h.jsx(rr,{path:Xe.login.path,element:h.jsx(zN,{})}),h.jsx(rr,{path:Xe.share.path,element:h.jsx(kN,{})})]}),h.jsx(yE,{}),h.jsx(NE,{}),h.jsx(kE,{}),h.jsx(fN,{}),h.jsx(CN,{}),h.jsx(TN,{}),h.jsx(qN,{}),h.jsx(UE,{}),h.jsx(TE,{})]})}const QN="_desktop-layout_1yyeg_2",$N="_mobile-layout_1yyeg_2",YN="_nav_1yyeg_2",VN="_main_1yyeg_2",KN="_header_1yyeg_2",Ks={desktopLayout:QN,mobileLayout:$N,nav:YN,main:VN,header:KN},FN="_container_ccsml_2",GN="_menu_ccsml_2",hh={container:FN,menu:GN},XN=({name:n,id:l,onRename:r,onDelete:s,onOpen:u})=>{const o=_1();return h.jsxs("button",{className:hh.menu,onContextMenu:o.open,onClick:()=>u(l),children:[h.jsx(N1,{handler:o,children:h.jsxs("div",{className:"context-menu-container",children:[h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),o.close(),r(l)},className:"context-menu-item",children:"✏️ Rename"}),h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),o.close(),s(l)},className:"context-menu-item",children:"🗑️ Delete"})]})}),h.jsxs("span",{children:["📖 ",n]})]})},ZN=({dataSource:n,index:l})=>{const r=()=>{$s(n.id)};return $t(l.toString(),()=>{$s(s=>{if(s!==n.id)return n.id})}),h.jsxs("button",{className:hh.menu,onClick:r,children:[h.jsx(Pd,{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})]})},JN=()=>{const n=Lt(),{data:l}=la(),{data:r}=F3(l==null?void 0:l.teamId),{data:s}=G3(l==null?void 0:l.teamId),u=ti(),o=l_(),d=a_(),m=b=>{u.mutateAsync({queryId:b}).then(g=>{n(`${Xe.workbench.path}/tab/${g.id}`)})},y=async b=>{const g=s==null?void 0:s.find(C=>C.id===b),w=await _r("New name?",g==null?void 0:g.name);w&&o.mutate({id:b,payload:{name:w}})},p=b=>{var w;const g=(w=s==null?void 0:s.find(C=>C.id===b))==null?void 0:w.savedQueryId;g&&d.mutate(g)};return h.jsx("div",{className:hh.container,children:h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[Xl(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((b,g)=>h.jsx(ZN,{dataSource:b,index:g+1},b.id))]}),Xl(s==null?void 0:s.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"}),s.map(b=>h.jsx(XN,{onDelete:p,onRename:y,onOpen:m,name:b.name,id:b.id},b.savedQueryId))]})]})})},PN=()=>{const n=Lt(),{pathname:l}=Yt(),{data:r}=la(),s=wr("Desktop nav"),u=()=>{W1(),l!==Xe.home.path&&n(Xe.home.path)};return h.jsxs("nav",{className:Ks.nav,children:[r&&h.jsxs("div",{className:Ks.header,children:[h.jsxs("button",{onClick:u,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🏠 Home"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsxs("button",{onClick:s,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🔎 New query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsxs("button",{onClick:tb,children:["🪪 ",r.username]}),h.jsx("button",{onClick:ab,children:"👥 Manage users"})]}),h.jsx(JN,{})]})},IN="_root_8cijr_2",WN={root:IN},ej=()=>{const{pathname:n}=Yt(),l=Lt(),r=wr("Mobile nav"),s=()=>{n!==Xe.home.path&&l(Xe.home.path)};return h.jsxs("div",{className:WN.root,children:[h.jsxs("button",{onClick:s,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:tb,children:[h.jsx("p",{children:"🪪"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Account"})]}),h.jsxs("button",{onClick:ab,children:[h.jsx("p",{children:"👥"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Users"})]})]})},tj=({children:n,isLogin:l})=>h.jsxs("div",{className:Ks.desktopLayout,children:[h.jsx(fh,{id:"default",className:"z-100"}),!l&&h.jsx(PN,{}),h.jsx("main",{className:Ks.main,children:n})]}),nj=({children:n,isLogin:l})=>h.jsxs("div",{className:Ks.mobileLayout,children:[h.jsx("main",{className:Ks.main,children:n}),!l&&h.jsx(ej,{})]}),aj=({children:n})=>{const l=nh(To.laptop),{pathname:r}=Yt(),s=r===Xe.login.path;return l?h.jsx(tj,{isLogin:s,children:n}):h.jsx(nj,{isLogin:s,children:n})};gx.createRoot(document.getElementById("root")).render(h.jsxs(Ke.StrictMode,{children:[h.jsx(Y3,{}),h.jsx(vS,{client:ht,children:h.jsx(q2,{children:h.jsx(aj,{children:h.jsx(HN,{})})})})]}));
236
+ */var Fy;function Q_(){return Fy||(Fy=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,s(m)))}return u}function s(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})()}(sd)),sd.exports}var $_=Q_();const Rd=vu($_);var Gy={};const Y_="react-tooltip-core-styles",V_="react-tooltip-base-styles",Xy={core:!1,base:!1};function Zy({css:n,id:l=V_,type:r="base",ref:s}){var o,u;if(!n||typeof document>"u"||Xy[r]||r==="core"&&typeof process<"u"&&(!((o=process==null?void 0:Gy)===null||o===void 0)&&o.REACT_TOOLTIP_DISABLE_CORE_STYLES)||r!=="base"&&typeof process<"u"&&(!((u=process==null?void 0:Gy)===null||u===void 0)&&u.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;r==="core"&&(l=Y_),s||(s={});const{insertAt:d}=s;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)),Xy[r]=!0}const Jy=async({elementReference:n=null,tooltipReference:l=null,tooltipArrowReference:r=null,place:s="top",offset:o=10,strategy:u="absolute",middlewares:d=[z_(Number(o)),k_({fallbackAxisSideDirection:"start"}),B_({padding:5})],border:m,arrowSize:y=8})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:s};if(l===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:s};const p=d;return r?(p.push(H_({element:r,padding:5})),Ky(n,l,{placement:s,strategy:u,middleware:p}).then(({x:b,y:g,placement:w,middlewareData:C})=>{var E,A;const N={left:`${b}px`,top:`${g}px`,border:m},{x:_,y:O}=(E=C.arrow)!==null&&E!==void 0?E:{x:0,y:0},T=(A={top:"bottom",right:"left",bottom:"top",left:"right"}[w.split("-")[0]])!==null&&A!==void 0?A:"bottom",$=m&&{borderBottom:m,borderRight:m};let V=0;if(m){const H=`${m}`.match(/(\d+)px/);V=H!=null&&H[1]?Number(H[1]):1}return{tooltipStyles:N,tooltipArrowStyles:{left:_!=null?`${_}px`:"",top:O!=null?`${O}px`:"",right:"",bottom:"",...$,[T]:`-${y/2+V}px`},place:w}})):Ky(n,l,{placement:"bottom",strategy:u,middleware:p}).then(({x:b,y:g,placement:w})=>({tooltipStyles:{left:`${b}px`,top:`${g}px`},tooltipArrowStyles:{},place:w}))},Py=(n,l)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,l),Iy=(n,l,r)=>{let s=null;const o=function(...u){const d=()=>{s=null};!s&&(n.apply(this,u),s=setTimeout(d,l))};return o.cancel=()=>{s&&(clearTimeout(s),s=null)},o},Wy=n=>n!==null&&!Array.isArray(n)&&typeof n=="object",Od=(n,l)=>{if(n===l)return!0;if(Array.isArray(n)&&Array.isArray(l))return n.length===l.length&&n.every((o,u)=>Od(o,l[u]));if(Array.isArray(n)!==Array.isArray(l))return!1;if(!Wy(n)||!Wy(l))return n===l;const r=Object.keys(n),s=Object.keys(l);return r.length===s.length&&r.every(o=>Od(n[o],l[o]))},K_=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const l=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(r=>{const s=l.getPropertyValue(r);return s==="auto"||s==="scroll"})},ev=n=>{if(!n)return null;let l=n.parentElement;for(;l;){if(K_(l))return l;l=l.parentElement}return document.scrollingElement||document.documentElement},F_=typeof window<"u"?x.useLayoutEffect:x.useEffect,Tn=n=>{n.current&&(clearTimeout(n.current),n.current=null)},G_="DEFAULT_TOOLTIP_ID",X_={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Z_=x.createContext({getTooltipData:()=>X_});function V1(n=G_){return x.useContext(Z_).getTooltipData(n)}var Bs={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"},id={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 J_=({forwardRef:n,id:l,className:r,classNameArrow:s,variant:o="dark",anchorId:u,anchorSelect:d,place:m="top",offset:y=10,events:p=["hover"],openOnClick:b=!1,positionStrategy:g="absolute",middlewares:w,wrapper:C,delayShow:E=0,delayHide:A=0,float:N=!1,hidden:_=!1,noArrow:O=!1,clickable:T=!1,closeOnEsc:$=!1,closeOnScroll:V=!1,closeOnResize:H=!1,openEvents:G,closeEvents:Z,globalCloseEvents:te,imperativeModeOnly:pe,style:Re,position:ge,afterShow:Le,afterHide:ye,disableTooltip:Se,content:B,contentWrapperRef:X,isOpen:P,defaultIsOpen:ue=!1,setIsOpen:R,activeAnchor:Q,setActiveAnchor:W,border:I,opacity:ie,arrowColor:Ce,arrowSize:ce=8,role:St="tooltip"})=>{var qe;const Ze=x.useRef(null),$n=x.useRef(null),Nt=x.useRef(null),hn=x.useRef(null),oa=x.useRef(null),[mn,ai]=x.useState({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[zt,Bt]=x.useState(!1),[ua,Yn]=x.useState(!1),[Fe,Vn]=x.useState(null),gl=x.useRef(!1),Ua=x.useRef(null),{anchorRefs:xl,setActiveAnchor:Il}=V1(l),pn=x.useRef(!1),[tt,Vt]=x.useState([]),st=x.useRef(!1),La=b||p.includes("click"),li=La||(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&&La&&Object.assign(qa,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const yn=Z?{...Z}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!Z&&La&&Object.assign(yn,{mouseleave:!1,blur:!1,mouseout:!1});const jt=te?{...te}:{escape:$||!1,scroll:V||!1,resize:H||!1,clickOutsideAnchor:li||!1};pe&&(Object.assign(qa,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(yn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(jt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),F_(()=>(st.current=!0,()=>{st.current=!1}),[]);const He=J=>{st.current&&(J&&Yn(!0),setTimeout(()=>{st.current&&(R==null||R(J),P===void 0&&Bt(J))},10))};x.useEffect(()=>{if(P===void 0)return()=>null;P&&Yn(!0);const J=setTimeout(()=>{Bt(P)},10);return()=>{clearTimeout(J)}},[P]),x.useEffect(()=>{if(zt!==gl.current)if(Tn(oa),gl.current=zt,zt)Le==null||Le();else{const J=(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"));oa.current=setTimeout(()=>{Yn(!1),Vn(null),ye==null||ye()},J+25)}},[zt]);const ca=J=>{ai(ne=>Od(ne,J)?ne:J)},On=(J=E)=>{Tn(Nt),ua?He(!0):Nt.current=setTimeout(()=>{He(!0)},J)},za=(J=A)=>{Tn(hn),hn.current=setTimeout(()=>{pn.current||He(!1)},J)},Ba=J=>{var ne;if(!J)return;const de=(ne=J.currentTarget)!==null&&ne!==void 0?ne:J.target;if(!(de!=null&&de.isConnected))return W(null),void Il({current:null});E?On():He(!0),W(de),Il({current:de}),Tn(hn)},fa=()=>{T?za(A||100):A?za():He(!1),Tn(Nt)},Kn=({x:J,y:ne})=>{var de;const Ie={getBoundingClientRect:()=>({x:J,y:ne,width:0,height:0,top:ne,left:J,right:J,bottom:ne})};Jy({place:(de=Fe==null?void 0:Fe.place)!==null&&de!==void 0?de:m,offset:y,elementReference:Ie,tooltipReference:Ze.current,tooltipArrowReference:$n.current,strategy:g,middlewares:w,border:I,arrowSize:ce}).then(vt=>{ca(vt)})},vn=J=>{if(!J)return;const ne=J,de={x:ne.clientX,y:ne.clientY};Kn(de),Ua.current=de},Sl=J=>{var ne;if(!zt)return;const de=J.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),Tn(Nt)))},wl=Iy(Ba,50),it=Iy(fa,50),At=J=>{it.cancel(),wl(J)},oe=()=>{wl.cancel(),it()},_e=x.useCallback(()=>{var J,ne;const de=(J=Fe==null?void 0:Fe.position)!==null&&J!==void 0?J:ge;de?Kn(de):N?Ua.current&&Kn(Ua.current):Q!=null&&Q.isConnected&&Jy({place:(ne=Fe==null?void 0:Fe.place)!==null&&ne!==void 0?ne:m,offset:y,elementReference:Q,tooltipReference:Ze.current,tooltipArrowReference:$n.current,strategy:g,middlewares:w,border:I,arrowSize:ce}).then(Ie=>{st.current&&ca(Ie)})},[zt,Q,B,Re,m,Fe==null?void 0:Fe.place,y,g,ge,Fe==null?void 0:Fe.position,N,ce]);x.useEffect(()=>{var J,ne;const de=new Set(xl);tt.forEach(De=>{Se!=null&&Se(De)||de.add({current:De})});const Ie=document.querySelector(`[id='${u}']`);Ie&&!(Se!=null&&Se(Ie))&&de.add({current:Ie});const vt=()=>{He(!1)},bn=ev(Q),en=ev(Ze.current);jt.scroll&&(window.addEventListener("scroll",vt),bn==null||bn.addEventListener("scroll",vt),en==null||en.addEventListener("scroll",vt));let rt=null;jt.resize?window.addEventListener("resize",vt):Q&&Ze.current&&(rt=q_(Q,Ze.current,_e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Rt=De=>{De.key==="Escape"&&He(!1)};jt.escape&&window.addEventListener("keydown",Rt),jt.clickOutsideAnchor&&window.addEventListener("click",Sl);const Oe=[],tn=De=>!!(De!=null&&De.target&&(Q!=null&&Q.contains(De.target))),El=De=>{zt&&tn(De)||Ba(De)},ka=De=>{zt&&tn(De)&&fa()},ot=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],si=["click","dblclick","mousedown","mouseup"];Object.entries(qa).forEach(([De,gn])=>{gn&&(ot.includes(De)?Oe.push({event:De,listener:At}):si.includes(De)&&Oe.push({event:De,listener:El}))}),Object.entries(yn).forEach(([De,gn])=>{gn&&(ot.includes(De)?Oe.push({event:De,listener:oe}):si.includes(De)&&Oe.push({event:De,listener:ka}))}),N&&Oe.push({event:"pointermove",listener:vn});const ii=()=>{pn.current=!0},Fn=()=>{pn.current=!1,fa()},da=T&&(yn.mouseout||yn.mouseleave);return da&&((J=Ze.current)===null||J===void 0||J.addEventListener("mouseover",ii),(ne=Ze.current)===null||ne===void 0||ne.addEventListener("mouseout",Fn)),Oe.forEach(({event:De,listener:gn})=>{de.forEach(Wl=>{var Cl;(Cl=Wl.current)===null||Cl===void 0||Cl.addEventListener(De,gn)})}),()=>{var De,gn;jt.scroll&&(window.removeEventListener("scroll",vt),bn==null||bn.removeEventListener("scroll",vt),en==null||en.removeEventListener("scroll",vt)),jt.resize?window.removeEventListener("resize",vt):rt==null||rt(),jt.clickOutsideAnchor&&window.removeEventListener("click",Sl),jt.escape&&window.removeEventListener("keydown",Rt),da&&((De=Ze.current)===null||De===void 0||De.removeEventListener("mouseover",ii),(gn=Ze.current)===null||gn===void 0||gn.removeEventListener("mouseout",Fn)),Oe.forEach(({event:Wl,listener:Cl})=>{de.forEach(es=>{var Ha;(Ha=es.current)===null||Ha===void 0||Ha.removeEventListener(Wl,Cl)})})}},[Q,_e,ua,xl,tt,G,Z,te,La,E,A]),x.useEffect(()=>{var J,ne;let de=(ne=(J=Fe==null?void 0:Fe.anchorSelect)!==null&&J!==void 0?J:d)!==null&&ne!==void 0?ne:"";!de&&l&&(de=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const Ie=new MutationObserver(vt=>{const bn=[],en=[];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&&en.push(rt.target)),rt.type==="childList"){if(Q){const Rt=[...rt.removedNodes].filter(Oe=>Oe.nodeType===1);if(de)try{en.push(...Rt.filter(Oe=>Oe.matches(de))),en.push(...Rt.flatMap(Oe=>[...Oe.querySelectorAll(de)]))}catch{}Rt.some(Oe=>{var tn;return!!(!((tn=Oe==null?void 0:Oe.contains)===null||tn===void 0)&&tn.call(Oe,Q))&&(Yn(!1),He(!1),W(null),Tn(Nt),Tn(hn),!0)})}if(de)try{const Rt=[...rt.addedNodes].filter(Oe=>Oe.nodeType===1);bn.push(...Rt.filter(Oe=>Oe.matches(de))),bn.push(...Rt.flatMap(Oe=>[...Oe.querySelectorAll(de)]))}catch{}}}),(bn.length||en.length)&&Vt(rt=>[...rt.filter(Rt=>!en.includes(Rt)),...bn])});return Ie.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{Ie.disconnect()}},[l,d,Fe==null?void 0:Fe.anchorSelect,Q]),x.useEffect(()=>{_e()},[_e]),x.useEffect(()=>{if(!(X!=null&&X.current))return()=>null;const J=new ResizeObserver(()=>{setTimeout(()=>_e())});return J.observe(X.current),()=>{J.disconnect()}},[B,X==null?void 0:X.current]),x.useEffect(()=>{var J;const ne=document.querySelector(`[id='${u}']`),de=[...tt,ne];Q&&de.includes(Q)||W((J=tt[0])!==null&&J!==void 0?J:ne)},[u,tt,Q]),x.useEffect(()=>(ue&&He(!0),()=>{Tn(Nt),Tn(hn)}),[]),x.useEffect(()=>{var J;let ne=(J=Fe==null?void 0:Fe.anchorSelect)!==null&&J!==void 0?J: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,Fe==null?void 0:Fe.anchorSelect]),x.useEffect(()=>{Nt.current&&(Tn(Nt),On(E))},[E]);const kt=(qe=Fe==null?void 0:Fe.content)!==null&&qe!==void 0?qe:B,Tt=zt&&Object.keys(mn.tooltipStyles).length>0;return x.useImperativeHandle(n,()=>({open:J=>{if(J!=null&&J.anchorSelect)try{document.querySelector(J.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${J.anchorSelect}" is not a valid CSS selector`)}Vn(J??null),J!=null&&J.delay?On(J.delay):He(!0)},close:J=>{J!=null&&J.delay?za(J.delay):He(!1)},activeAnchor:Q,place:mn.place,isOpen:!!(ua&&!_&&kt&&Tt)})),ua&&!_&&kt?Ke.createElement(C,{id:l,role:St,className:Rd("react-tooltip",Bs.tooltip,id.tooltip,id[o],r,`react-tooltip__place-${mn.place}`,Bs[Tt?"show":"closing"],Tt?"react-tooltip__show":"react-tooltip__closing",g==="fixed"&&Bs.fixed,T&&Bs.clickable),onTransitionEnd:J=>{Tn(oa),zt||J.propertyName!=="opacity"||(Yn(!1),Vn(null),ye==null||ye())},style:{...Re,...mn.tooltipStyles,opacity:ie!==void 0&&Tt?ie:void 0},ref:Ze},kt,Ke.createElement(C,{className:Rd("react-tooltip-arrow",Bs.arrow,id.arrow,s,O&&Bs.noArrow),style:{...mn.tooltipArrowStyles,background:Ce?`linear-gradient(to right bottom, transparent 50%, ${Ce} 50%)`:void 0,"--rt-arrow-size":`${ce}px`},ref:$n})):null},P_=({content:n})=>Ke.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),fh=Ke.forwardRef(({id:n,anchorId:l,anchorSelect:r,content:s,html:o,render:u,className:d,classNameArrow:m,variant:y="dark",place:p="top",offset:b=10,wrapper:g="div",children:w=null,events:C=["hover"],openOnClick:E=!1,positionStrategy:A="absolute",middlewares:N,delayShow:_=0,delayHide:O=0,float:T=!1,hidden:$=!1,noArrow:V=!1,clickable:H=!1,closeOnEsc:G=!1,closeOnScroll:Z=!1,closeOnResize:te=!1,openEvents:pe,closeEvents:Re,globalCloseEvents:ge,imperativeModeOnly:Le=!1,style:ye,position:Se,isOpen:B,defaultIsOpen:X=!1,disableStyleInjection:P=!1,border:ue,opacity:R,arrowColor:Q,arrowSize:W,setIsOpen:I,afterShow:ie,afterHide:Ce,disableTooltip:ce,role:St="tooltip"},qe)=>{const[Ze,$n]=x.useState(s),[Nt,hn]=x.useState(o),[oa,mn]=x.useState(p),[ai,zt]=x.useState(y),[Bt,ua]=x.useState(b),[Yn,Fe]=x.useState(_),[Vn,gl]=x.useState(O),[Ua,xl]=x.useState(T),[Il,pn]=x.useState($),[tt,Vt]=x.useState(g),[st,La]=x.useState(C),[li,qa]=x.useState(A),[yn,jt]=x.useState(null),[He,ca]=x.useState(null),On=x.useRef(P),{anchorRefs:za,activeAnchor:Ba}=V1(n),fa=it=>it==null?void 0:it.getAttributeNames().reduce((At,oe)=>{var _e;return oe.startsWith("data-tooltip-")&&(At[oe.replace(/^data-tooltip-/,"")]=(_e=it==null?void 0:it.getAttribute(oe))!==null&&_e!==void 0?_e:null),At},{}),Kn=it=>{const At={place:oe=>{var _e;mn((_e=oe)!==null&&_e!==void 0?_e:p)},content:oe=>{$n(oe??s)},html:oe=>{hn(oe??o)},variant:oe=>{var _e;zt((_e=oe)!==null&&_e!==void 0?_e:y)},offset:oe=>{ua(oe===null?b:Number(oe))},wrapper:oe=>{var _e;Vt((_e=oe)!==null&&_e!==void 0?_e:g)},events:oe=>{const _e=oe==null?void 0:oe.split(" ");La(_e??C)},"position-strategy":oe=>{var _e;qa((_e=oe)!==null&&_e!==void 0?_e:A)},"delay-show":oe=>{Fe(oe===null?_:Number(oe))},"delay-hide":oe=>{gl(oe===null?O:Number(oe))},float:oe=>{xl(oe===null?T:oe==="true")},hidden:oe=>{pn(oe===null?$:oe==="true")},"class-name":oe=>{jt(oe)}};Object.values(At).forEach(oe=>oe(null)),Object.entries(it).forEach(([oe,_e])=>{var kt;(kt=At[oe])===null||kt===void 0||kt.call(At,_e)})};x.useEffect(()=>{$n(s)},[s]),x.useEffect(()=>{hn(o)},[o]),x.useEffect(()=>{mn(p)},[p]),x.useEffect(()=>{zt(y)},[y]),x.useEffect(()=>{ua(b)},[b]),x.useEffect(()=>{Fe(_)},[_]),x.useEffect(()=>{gl(O)},[O]),x.useEffect(()=>{xl(T)},[T]),x.useEffect(()=>{pn($)},[$]),x.useEffect(()=>{qa(A)},[A]),x.useEffect(()=>{On.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[P]),x.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:P==="core",disableBase:P}}))},[]),x.useEffect(()=>{var it;const At=new Set(za);let oe=r;if(!oe&&n&&(oe=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),oe)try{document.querySelectorAll(oe).forEach(ne=>{At.add({current:ne})})}catch{console.warn(`[react-tooltip] "${oe}" is not a valid CSS selector`)}const _e=document.querySelector(`[id='${l}']`);if(_e&&At.add({current:_e}),!At.size)return()=>null;const kt=(it=He??_e)!==null&&it!==void 0?it:Ba.current,Tt=new MutationObserver(ne=>{ne.forEach(de=>{var Ie;if(!kt||de.type!=="attributes"||!(!((Ie=de.attributeName)===null||Ie===void 0)&&Ie.startsWith("data-tooltip-")))return;const vt=fa(kt);Kn(vt)})}),J={attributes:!0,childList:!1,subtree:!1};if(kt){const ne=fa(kt);Kn(ne),Tt.observe(kt,J)}return()=>{Tt.disconnect()}},[za,Ba,He,l,r]),x.useEffect(()=>{ye!=null&&ye.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),ue&&!Py("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&&!Py("opacity",`${R}`)&&console.warn(`[react-tooltip] "${R}" is not a valid \`opacity\`.`)},[]);let vn=w;const Sl=x.useRef(null);if(u){const it=u({content:(He==null?void 0:He.getAttribute("data-tooltip-content"))||Ze||null,activeAnchor:He});vn=it?Ke.createElement("div",{ref:Sl,className:"react-tooltip-content-wrapper"},it):null}else Ze&&(vn=Ze);Nt&&(vn=Ke.createElement(P_,{content:Nt}));const wl={forwardRef:qe,id:n,anchorId:l,anchorSelect:r,className:Rd(d,yn),classNameArrow:m,content:vn,contentWrapperRef:Sl,place:oa,variant:ai,offset:Bt,wrapper:tt,events:st,openOnClick:E,positionStrategy:li,middlewares:N,delayShow:Yn,delayHide:Vn,float:Ua,hidden:Il,noArrow:V,clickable:H,closeOnEsc:G,closeOnScroll:Z,closeOnResize:te,openEvents:pe,closeEvents:Re,globalCloseEvents:ge,imperativeModeOnly:Le,style:ye,position:Se,isOpen:B,defaultIsOpen:X,border:ue,opacity:R,arrowColor:Q,arrowSize:W,setIsOpen:I,afterShow:ie,afterHide:Ce,disableTooltip:ce,activeAnchor:He,setActiveAnchor:it=>ca(it),role:St};return Ke.createElement(J_,{...wl})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||Zy({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||Zy({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 K1=["shift","alt","meta","mod","ctrl","control"],I_={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 hl(n){return(I_[n.trim()]||n.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function F1(n){return K1.includes(n)}function rd(n,l=","){return n.toLowerCase().split(l)}function od(n,l="+",r=">",s=!1,o){let u=[],d=!1;n=n.trim(),n.includes(r)?(d=!0,u=n.toLocaleLowerCase().split(r).map(p=>hl(p))):u=n.toLocaleLowerCase().split(l).map(p=>hl(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:s},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([hl(n.code)])}),document.addEventListener("keyup",n=>{n.code!==void 0&&X1([hl(n.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Ra.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Ra.clear()},0)}));const Ra=new Set;function dh(n){return Array.isArray(n)}function W_(n,l=","){return(dh(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 eN(n,l,r){(typeof r=="function"&&r(n,l)||r===!0)&&n.preventDefault()}function tN(n,l,r){return typeof r=="function"?r(n,l):r===!0||r===void 0}const nN=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function aN(n){return Z1(n,nN)}function Z1(n,l=!1){const{target:r,composed:s}=n;let o,u;return lN(r)&&s?(o=n.composedPath()[0]&&n.composedPath()[0].tagName,u=n.composedPath()[0]&&n.composedPath()[0].role):(o=r&&r.tagName,u=r&&r.role),dh(l)?!!(o&&l&&l.some(d=>d.toLowerCase()===o.toLowerCase()||d===u)):!!(o&&l&&l)}function lN(n){return!!n.tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")}function sN(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 iN=(n,l,r=!1)=>{const{alt:s,meta:o,mod:u,shift:d,ctrl:m,keys:y,useKey:p}=l,{code:b,key:g,ctrlKey:w,metaKey:C,shiftKey:E,altKey:A}=n,N=hl(b);if(p&&(y==null?void 0:y.length)===1&&y.includes(g))return!0;if(!(y!=null&&y.includes(N))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!r){if(s!==A&&N!=="alt"||d!==E&&N!=="shift")return!1;if(u){if(!C&&!w)return!1}else if(o!==C&&N!=="meta"&&N!=="os"||m!==w&&N!=="ctrl"&&N!=="control")return!1}return y&&y.length===1&&y.includes(N)?!0:y?W_(y):!y},rN=x.createContext(void 0),oN=()=>x.useContext(rN);function J1(n,l){return n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(n).length===Object.keys(l).length&&Object.keys(n).reduce((r,s)=>r&&J1(n[s],l[s]),!0):n===l}const uN=x.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),cN=()=>x.useContext(uN);function fN(n){const l=x.useRef(void 0);return J1(l.current,n)||(l.current=n),l.current}const tv=n=>{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()},dN=typeof window<"u"?x.useLayoutEffect:x.useEffect;function $t(n,l,r,s){const o=x.useRef(null),u=x.useRef(!1),d=Array.isArray(r)?Array.isArray(s)?void 0:s:r,m=dh(n)?n.join(d==null?void 0:d.delimiter):n,y=Array.isArray(r)?r:Array.isArray(s)?s:void 0,p=x.useCallback(l,y??[]),b=x.useRef(p);y?b.current=p:b.current=l;const g=fN(d),{activeScopes:w}=cN(),C=oN();return dN(()=>{if((g==null?void 0:g.enabled)===!1||!sN(w,g==null?void 0:g.scopes))return;let E=[],A;const N=($,V=!1)=>{var H;if(!(aN($)&&!Z1($,g==null?void 0:g.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)){tv($);return}}(H=$.target)!=null&&H.isContentEditable&&!(g!=null&&g.enableOnContentEditable)||rd(m,g==null?void 0:g.delimiter).forEach(G=>{var te,pe,Re,ge;if(G.includes((g==null?void 0:g.splitKey)??"+")&&G.includes((g==null?void 0:g.sequenceSplitKey)??">")){console.warn(`Hotkey ${G} contains both ${(g==null?void 0:g.splitKey)??"+"} and ${(g==null?void 0:g.sequenceSplitKey)??">"} which is not supported.`);return}const Z=od(G,g==null?void 0:g.splitKey,g==null?void 0:g.sequenceSplitKey,g==null?void 0:g.useKey,g==null?void 0:g.description);if(Z.isSequence){A=setTimeout(()=>{E=[]},(g==null?void 0:g.sequenceTimeoutMs)??1e3);const Le=Z.useKey?$.key:hl($.code);if(F1(Le.toLowerCase()))return;E.push(Le);const ye=(te=Z.keys)==null?void 0:te[E.length-1];if(Le!==ye){E=[],A&&clearTimeout(A);return}E.length===((pe=Z.keys)==null?void 0:pe.length)&&(b.current($,Z),A&&clearTimeout(A),E=[])}else if(iN($,Z,g==null?void 0:g.ignoreModifiers)||(Re=Z.keys)!=null&&Re.includes("*")){if((ge=g==null?void 0:g.ignoreEventWhen)!=null&&ge.call(g,$)||V&&u.current)return;if(eN($,Z,g==null?void 0:g.preventDefault),!tN($,Z,g==null?void 0:g.enabled)){tv($);return}b.current($,Z),V||(u.current=!0)}})}},_=$=>{$.code!==void 0&&(G1(hl($.code)),((g==null?void 0:g.keydown)===void 0&&(g==null?void 0:g.keyup)!==!0||g!=null&&g.keydown)&&N($))},O=$=>{$.code!==void 0&&(X1(hl($.code)),u.current=!1,g!=null&&g.keyup&&N($,!0))},T=o.current||(d==null?void 0:d.document)||document;return T.addEventListener("keyup",O,d==null?void 0:d.eventListenerOptions),T.addEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&rd(m,g==null?void 0:g.delimiter).forEach($=>C.addHotkey(od($,g==null?void 0:g.splitKey,g==null?void 0:g.sequenceSplitKey,g==null?void 0:g.useKey,g==null?void 0:g.description))),()=>{T.removeEventListener("keyup",O,d==null?void 0:d.eventListenerOptions),T.removeEventListener("keydown",_,d==null?void 0:d.eventListenerOptions),C&&rd(m,g==null?void 0:g.delimiter).forEach($=>C.removeHotkey(od($,g==null?void 0:g.splitKey,g==null?void 0:g.sequenceSplitKey,g==null?void 0:g.useKey,g==null?void 0:g.description))),E=[],A&&clearTimeout(A)}},[m,g,w]),o}function hN(){return h.jsxs("div",{className:"flex items-center bg-white border-b border-gray-200 overflow-auto no-scrollbar",children:[h.jsx(mN,{}),h.jsx(yN,{}),h.jsx(vN,{})]})}function mN(){const{dataSourceId:n,name:l}=x.useContext(ia),{data:r}=Au(n),{data:s}=x.useContext(Qn),o=Er(Zt.EDITOR),u=a_(),d=()=>{var y,p;(y=s==null?void 0:s.result.columns)!=null&&y[0].table&&Id({table:(p=s==null?void 0:s.result.columns)==null?void 0:p[0].table,dataSourceId:n})},m=async()=>{const y=await _r("Query name",l);!y||!(s!=null&&s.result.queryHistoryId)||u.mutate({name:y,queryId:s.result.queryHistoryId})};return $t("s",m),h.jsxs("div",{className:ae.tableConfig,children:[h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Manage filters",onClick:()=>Ln("filters"),className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Filter"}),h.jsx("span",{className:"hotkey",children:"F"})]}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Join tables",onClick:()=>Ln("joins"),className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Join"}),h.jsx("span",{className:"hotkey",children:"J"})]}),h.jsx(bN,{}),h.jsxs("button",{"data-tooltip-id":"explorer-more-actions",className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{className:"whitespace-nowrap",children:"More actions"}),h.jsx(Ru,{width:16,height:16,className:"rotate-90"})]}),h.jsxs(fh,{id:"explorer-more-actions",className:"z-10 shadow-md flex flex-col",clickable:!0,variant:"light",opacity:1,children:[h.jsxs("button",{onClick:()=>Ln("columns"),className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Columns"}),h.jsx("span",{className:"hotkey",children:"C"})]}),h.jsxs("button",{onClick:()=>Ln("groupBy"),className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Group by"}),h.jsx("span",{className:"hotkey",children:"G"})]}),h.jsxs("button",{onClick:()=>Ln("aggregate"),className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Aggregate"}),h.jsx("span",{className:"hotkey",children:"A"})]}),h.jsxs("button",{onClick:ah,className:le(ae.tableAction,ae.modal,ae.blue,"justify-between"),children:[h.jsx("span",{children:"Query editor"}),h.jsx("span",{className:"hotkey",children:"E"})]}),o&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-0.5 my-2 bg-gray-100"}),h.jsxs("button",{onClick:m,className:le(ae.tableAction,ae.modal,ae.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:d,className:le(ae.tableAction,ae.modal,ae.blue),children:"Insert new row"})]})]})]})}const pN=[5,10,20,50,100,200];function yN(){const{name:n}=x.useContext(ia),{state:l}=x.useContext(mt),{refetch:r,data:s}=x.useContext(Qn),{size:o,setSize:u}=D1(),d=ti(),m=Lt(),{rename:y}=O1(),p=(window==null?void 0:window.location.hostname)!=="localhost",b=()=>{d.mutateAsync({name:n,opts:l}).then(C=>{m(`${Xe.workbench.path}/tab/${C.id}`)})},g=()=>{if(s!=null&&s.result.queryHistoryId){const C=new URL(window.location.href);C.pathname=Xe.share.path,C.searchParams.set("shareId",s.result.queryHistoryId),navigator.clipboard.writeText(C.toString()),It.success("Share link copied to clipboard")}},w=()=>y(n);return $t("e",ah),$t("d",b),$t("r",w),h.jsxs("div",{className:ae.tableConfig,children:[h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Refresh data",onClick:r,className:le(ae.tableAction,ae.blue),children:"Refresh"}),p&&h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Share query",onClick:g,className:le(ae.tableAction,ae.blue),children:"Share"}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Clone in a new tab",onClick:b,className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Clone"}),h.jsx("span",{className:"hotkey",children:"D"})]}),h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Clone in a new tab",onClick:w,className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{children:"Rename"}),h.jsx("span",{className:"hotkey",children:"R"})]}),h.jsxs("button",{"data-tooltip-id":"rows-num",className:le(ae.tableAction,ae.size,ae.blue),children:[h.jsxs("span",{className:"whitespace-nowrap",children:[o," rows"]}),h.jsx(Ru,{width:16,height:16,className:"rotate-90"})]}),h.jsx(fh,{id:"rows-num",className:"z-10 shadow-md flex",clickable:!0,variant:"light",opacity:1,children:pN.map(C=>h.jsx("button",{onClick:()=>u(C),className:le(ae.tableAction,ae.blue),children:h.jsx("span",{children:C})}))})]})}function vN(){const{page:n,size:l,setPage:r}=D1(),{data:s}=x.useContext(Qn),o=(s==null?void 0:s.result.rows.length)===l;return h.jsxs("div",{className:ae.tableConfig,children:[h.jsx("button",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",disabled:n<=0,className:le(ae.tableAction,ae.blue),onClick:()=>r(n-1),children:"Prev"}),h.jsx("span",{className:"text-sm bg-gray-50 rounded-md px-2 border border-gray-200",children:n+1}),h.jsx("button",{"data-tooltip-content":"Next page","data-tooltip-id":"default",disabled:!o,className:le(ae.tableAction,ae.blue),onClick:()=>r(n+1),children:"Next"})]})}function bN(){const{state:n,setState:l}=x.useContext(mt),r=()=>{l(o=>({...o,searchAll:void 0}))},s=()=>{_r("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(o=>{o!==void 0&&l(u=>({...u,searchAll:o.length>0?o:void 0}))})};return $t("k",s),n.searchAll?h.jsx("button",{"data-tooltip-id":"default","data-tooltip-content":"Remove search all filter",onClick:r,className:le(ae.tableAction,ae.red),children:h.jsxs("span",{className:"truncate px-1",children:["❌ ",n.searchAll]})}):h.jsxs("button",{"data-tooltip-id":"default","data-tooltip-content":"Search text in all columns",onClick:s,className:le(ae.tableAction,ae.blue),children:[h.jsx("span",{className:"whitespace-nowrap",children:"Search text"}),h.jsx("span",{className:"hotkey",children:"K"})]})}const gN="_drop-container_q9ymq_2",xN="_item_q9ymq_2",nv={dropContainer:gN,item:xN},Dd=({dataSourceId:n,focusId:l,placeholder:r="Column",onChange:s,value:o,autoFocus:u,allowTables:d})=>{const{data:m}=Ws(n),y=x.useRef(null),p=x.useMemo(()=>{if(!m)return[];let _=m;return d&&(_=m.filter(O=>d.includes(O.tableName))),_.flatMap(O=>O.columns.map(T=>({value:O.tableName+"."+T.name,label:T.name,table:O.tableName,searchValue:T.name.toLowerCase()})))},[m,d]),b=x.useMemo(()=>{const _=o.toLowerCase()||"",O=[];for(let T=0;T<p.length&&O.length<10;T++)p[T].searchValue.includes(_)&&O.push(p[T]);return O},[p,o]),[g,w]=x.useState(!1),[C,E]=x.useState(0),A=_=>{var O;if(_.key==="ArrowDown")_.preventDefault(),E(T=>(T+1)%b.length);else if(_.key==="ArrowUp")_.preventDefault(),E(T=>(T-1+b.length)%b.length);else if(_.key==="Enter"&&C>=0&&C<b.length){_.preventDefault();const T=b[C].value;w(!1);const $=p.findIndex(V=>V.value===T)>-1;s(((O=b[C])==null?void 0:O.value)||T,$,!0)}};x.useEffect(()=>{var O;const _=(O=y.current)==null?void 0:O.querySelector('[data-is-active="true"]');_&&_.scrollIntoView({behavior:"smooth",block:"nearest"})},[C]);const N=_=>{const O=_.currentTarget.value,T=p.findIndex($=>$.value===O)>-1;s(O,T,!1)};return h.jsxs("div",{className:"relative",onFocus:()=>w(!0),onBlur:()=>w(!1),children:[h.jsx("input",{autoFocus:u,onKeyDown:A,value:o,onChange:N,className:"input w-full",placeholder:r,"data-focus":l}),g&&b.length>0&&h.jsx("div",{className:nv.dropContainer,ref:y,tabIndex:-1,children:b.map((_,O)=>h.jsxs("div",{className:nv.item,"data-is-active":C===O,onMouseDownCapture:T=>{T.preventDefault(),w(!1),s(_.value,!0,!0)},children:[h.jsx("span",{className:"text-xs font-semibold truncate",children:_.table}),h.jsx("p",{className:"truncate text-sm",children:_.label})]},O))})]})},SN="_drop-container_199ny_2",wN="_item_199ny_2",av={dropContainer:SN,item:wN};function EN(n){return y4.includes(n)?h4:v4.includes(n)?d4:b4.includes(n)?m4:Fd}const CN=({value:n,onChange:l,autoFocus:r,focusId:s,colType:o})=>{const u=x.useMemo(()=>{const w=n.toLowerCase()||"";return EN(o||"").filter(C=>C.label.includes(w))},[n,o]),d=x.useRef(null),[m,y]=x.useState(!1),[p,b]=x.useState(0),g=w=>{var C;w.key==="ArrowDown"?(w.preventDefault(),b(E=>(E+1)%u.length)):w.key==="ArrowUp"?(w.preventDefault(),b(E=>(E-1+u.length)%u.length)):w.key==="Enter"&&(p>=0&&p<u.length?(w.preventDefault(),y(!1),l(((C=u[p])==null?void 0:C.label)||"",!0)):l(n,!0))};return x.useEffect(()=>{var C;const w=(C=d.current)==null?void 0:C.querySelector('[data-is-active="true"]');w&&w.scrollIntoView({behavior:"smooth",block:"nearest"})},[p]),h.jsxs("div",{className:"relative",children:[h.jsx("input",{onKeyDown:g,value:n,onChange:w=>l(w.target.value,!1),className:"input w-full",placeholder:"Operator",autoFocus:r,onFocus:()=>y(!0),onBlur:()=>y(!1),"data-focus":s}),m&&u.length>0&&h.jsx("ul",{className:av.dropContainer,ref:d,tabIndex:-1,children:u.map((w,C)=>h.jsx("li",{className:av.item,"data-is-active":p===C,onMouseDownCapture:E=>{E.preventDefault(),y(!1),l(w.label,!0)},children:w.label},C))})]})},_N="_actions_clc3q_2",NN="_filter-actions_clc3q_2",P1={actions:_N,filterActions:NN},jN=["=","<",">",">=","<>","!=","<="];function AN(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 s=Xd[r.operator];if(!s)return It.error(`Filter #${l+1} has invalid operator`),!1;if(r.isColumnRef&&!jN.includes(s))return It.error(`Filter #${l+1} cannot reference another column because it uses '${r.operator}' operator`),!1}return!0}function TN(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 s=Xd[r.operator];l.push({id:r.id,value:r.isColumnRef?[{value:r.value,isColumn:!0}]:p4(s,r.value),operator:s,column:r.column,isEnabled:r.isEnabled,connector:"AND"})}),l}function RN(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 ON=({filter:n,dataSourceId:l,allowedTables:r,inspections:s,autoFocus:o,onChangeColumn:u,onChangeOperator:d,onChangeValue:m,onRemoveFilter:y,triggerIsEnabled:p,onIsColumnChange:b})=>{const g=x.useMemo(()=>{if(!s)return"";let w=null;for(const C of s)for(const E of C.columns)C.tableName+"."+E.name===n.column&&(w=E);return w!=null&&w.type?w.type:""},[n.column,s]);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(Dd,{dataSourceId:l,onChange:w=>u(n.id,w),value:n.column,allowTables:r,focusId:"column",autoFocus:o})}),h.jsx("label",{children:h.jsx(CN,{onChange:w=>d(n.id,w),focusId:"operator",colType:g,value:n.operator})}),g1(Xd[n.operator])&&h.jsx("label",{className:"w-full",children:n.isColumnRef?h.jsx(Dd,{dataSourceId:l,onChange:w=>m(n.id,w),value:n.value,allowTables:r,focusId:"value",placeholder:"Search column"}):h.jsx("input",{className:"input w-full",placeholder:"Filter value",value:n.value,onChange:w=>m(n.id,w.currentTarget.value),"data-focus":"value"})}),h.jsxs("div",{className:P1.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:le("p-0.5 cursor-pointer rounded-lg border",n.isColumnRef?"bg-blue-50 border-blue-200":"bg-white border-white"),onClick:()=>b(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(Hn,{width:20,height:20,className:"text-red-600"})})]})]})},DN=()=>{const{state:n}=x.useContext(mt),{setFilters:l}=A1(),r=Ou(N=>N.filters),{data:s}=Ws(n.dataSourceId),o=x.useMemo(()=>[n.table,...n.joins.map(N=>N.table)],[n.table,n.joins]),[u,d]=x.useState([]),m=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,column:_}:T)])},y=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,operator:_}:T)])},p=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,value:_}:T)])},b=()=>{d(N=>[...N,{id:ml(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}])},g=(N,_)=>{d(O=>[...O.map(T=>T.id===N?{...T,isColumnRef:_}:T)])},w=N=>{d(_=>_.filter(O=>O.id!==N))},C=()=>Du("filters"),E=()=>{AN(u)&&(l(TN(u)),C())},A=N=>{d(_=>_.map(O=>O.id===N?{...O,isEnabled:!O.isEnabled}:O))};return x.useEffect(()=>{r&&d(()=>{const N=n.filters.map(_=>{var O,T;return{id:_.id,value:RN(_),column:_.column,operator:Gd[_.operator],isColumnRef:!!((T=(O=_.value)==null?void 0:O[0])!=null&&T.isColumn),isEnabled:_.isEnabled}});return N.push({id:ml(),value:"",column:"",operator:"",isColumnRef:!1,isEnabled:!0}),N})},[r]),$t("f",()=>{hu("filters")}),$t("ctrl+f",()=>{alert("Save filters")}),h.jsxs(dn,{isVisible:r,onClose:C,portal:!0,onClosed:()=>d([]),children:[h.jsx(sa,{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(ON,{filter:N,dataSourceId:n.dataSourceId,allowedTables:o,inspections:s||[],onChangeColumn:m,onChangeOperator:y,onChangeValue:p,onRemoveFilter:w,onIsColumnChange:g,triggerIsEnabled:A,autoFocus:_===u.length-1},N.id))]}),h.jsxs("div",{className:P1.actions,children:[h.jsx("button",{className:"button tertiary",onClick:b,children:"Add filter"}),h.jsx("button",{className:"button primary",onClick:E,children:"Apply filters"})]})]})},MN="_card_8hqgg_2",UN="_cards-list_8hqgg_2",LN="_join-modal_8hqgg_2",qN="_close-button_8hqgg_2",Vo={card:MN,cardsList:UN,joinModal:LN,closeButton:qN},zN=()=>{const{isFetching:n}=x.useContext(Qn),l=Ou(p=>p.joins),{toggle:r,joins:s}=T1(),{availableJoins:o}=x.useContext(ia),[u,d]=x.useState(""),m=x.useMemo(()=>{const p=u.toLowerCase();return o.filter(b=>b.on.toTable.toLowerCase().includes(p))},[o,u]),y=()=>Du("joins");return $t("j",()=>{o.length>0?Ln("joins"):It.error("No available tables to join")}),h.jsxs(dn,{isVisible:l,onClose:y,portal:!0,children:[h.jsx(sa,{onClick:y}),h.jsxs("div",{className:Vo.joinModal,children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),s.length>0&&h.jsx("div",{className:Vo.cardsList,children:s.map((p,b)=>h.jsxs("div",{className:Vo.card,children:[h.jsxs("p",{className:"text-sm truncate",children:[p.table," on ",p.on]}),b===s.length-1&&h.jsx("button",{className:Vo.closeButton,onClick:()=>r(p),disabled:n,children:h.jsx(Hn,{width:20,height:20})})]},p.table+p.on))}),o.length>0?h.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:p=>d(p.target.value),value:u,disabled:n}):h.jsx(Ut,{variant:"warning",children:h.jsx("p",{className:"text-sm truncate",children:"No more tables to join"})}),h.jsx("div",{className:`flex flex-col mt-2 overflow-y-auto ${n?"opacity-40":""}`,children:m.map(p=>h.jsx(j1,{hook:p,onClick:()=>{n||(r({table:p.on.toTable,type:"LEFT",on:p.where}),d(""))}},p.where))})]})]})};function BN(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}function lv(n){return n.reduce((l,r)=>(l[r]=!0,l),{})}const kN="_container_1wi49_2",HN="_column-label_1wi49_2",QN="_not-active_1wi49_2",nu={container:kN,columnLabel:HN,notActive:QN};function $N(n){if(!n)return[];const l={};return n.forEach(r=>{l[r.table]?l[r.table].push({value:r.full,ogColumn:r.column,label:fl(r.column),type:r.type}):l[r.table]=[{value:r.full,ogColumn:r.column,label:fl(r.column),type:r.type}],g4[r.type]&&["YEAR","MONTH","DAY"].forEach(s=>{l[r.table].push({value:s+" "+r.full,ogColumn:r.column,label:s+" "+fl(r.column),type:"number",nested:!0})})}),Object.entries(l).reduce((r,[s,o])=>(r.push({name:fl(s),columns:o}),r),[])}function YN(n,l){const r=l.toLowerCase();return n.map(s=>{const o=s.columns.filter(u=>u.label.toLowerCase().includes(r)||u.ogColumn.toLowerCase().includes(r));return{...s,columns:o}}).filter(s=>s.columns.length>0)}const VN=({column:n,selected:l,onCheck:r})=>h.jsxs("label",{className:le(nu.columnLabel,l?nu.active:nu.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),KN={columns:"c",groupBy:"g"},sv=({mode:n})=>{const l=Ou(_=>_[n]),{allColumns:r}=x.useContext(ia),{state:s,setState:o}=x.useContext(mt),[u,d]=x.useState({}),[m,y]=x.useState(""),p=x.useMemo(()=>$N(r),[r]),b=s.aggregations.length>0||s.groupBy.length>0,g=x.useMemo(()=>m?YN(p,m):p,[m,p]),w=_=>{d(O=>({...O,[_.target.name]:_.target.checked}))},C=_=>{const O=_.target.checked;d(T=>{for(const $ of r)T[$.full]=O;return{...T}})},E=()=>{Du(n)},A=()=>{const _=[];for(const[O,T]of Object.entries(u))if(T){const[$,V]=O.split(" ");_.push({value:V||$,fn:V?$:void 0})}o(O=>({...O,[n]:_})),E()},N=x.useMemo(()=>{for(const _ of r)if(!u[_.full])return!1;return!0},[u,r]);return $t(KN[n],()=>{n==="columns"?b?It.error("Columns are ignored when there is at least one aggregation or group by"):hu("columns"):hu("groupBy")}),x.useEffect(()=>{if(!l){d({});return}d(()=>BN(s[n].map(_=>_.fn?_.fn+" "+_.value:_.value)))},[l,d]),h.jsxs(dn,{isVisible:l,onClose:E,portal:!0,children:[h.jsx(sa,{onClick:E}),h.jsxs("div",{className:nu.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:g.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(O=>h.jsx(VN,{column:O,selected:u,onCheck:w},O.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:E,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:A,children:"Apply"})]})]})]})},FN="_options-container_11q8j_2",GN={optionsContainer:FN},ud="COUNT all",XN=n=>n.distinct?[n.fn,"DISTINCT",n.value].join(" "):[n.fn,n.value].join(" "),ZN=()=>{const n=Ou(E=>E.aggregate),{dataSourceId:l}=x.useContext(ia),{setState:r,state:s}=x.useContext(mt),{data:o}=x.useContext(Qn),[u,d]=x.useState({fn:"",col:""}),m=E=>d({...u,fn:E.currentTarget.value}),y=E=>d({...u,col:E}),p=()=>Du("aggregate"),b=()=>{const E=u.fn===ud?{value:"*",fn:"COUNT"}:{fn:u.fn,value:u.col,distinct:u.fn==="COUNT"};r(A=>({...A,aggregations:[...A.aggregations,E]}))},g=u.fn===ud,w=g?!1:!u.col||!u.fn,C=E=>{const A=Wn(E);r(N=>({...N,aggregations:N.aggregations.filter(_=>_.fn!==E.fn||_.value!==E.value),orderBy:N.orderBy.filter(_=>_.column!==A)}))};return $t("a",()=>{hu("aggregate")}),h.jsxs(dn,{isVisible:n,onClose:p,backdropClose:!0,portal:!0,children:[h.jsx(sa,{onClick:p}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),pl(s.aggregations.length,0)&&h.jsx("div",{className:"flex flex-col gap-1 mt-4",children:s.aggregations.map((E,A)=>h.jsxs("p",{className:"p-2 rounded-md bg-gray-50 flex items-center justify-between",children:[h.jsx("span",{children:XN(E)}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove aggregation",className:"p-0.5 text-sm cursor-pointer",onClick:()=>C(E),children:h.jsx(Hn,{width:20,height:20,className:"text-red-600"})})]},A))}),h.jsxs("div",{className:GN.optionsContainer,children:[h.jsxs("label",{className:le(g&&"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:ud,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"})]})]}),!g&&h.jsxs("label",{children:[h.jsx("p",{className:"font-semibold text-xs",children:"Column"}),h.jsx(Dd,{dataSourceId:l,allowTables:(o==null?void 0:o.result.tables)||[],onChange:y,value:u.col})]}),h.jsx("button",{className:"button primary",disabled:w,onClick:b,children:"Add"})]})]})]})},JN=({options:n,updater:l,name:r,tabId:s})=>{const o=w4(n,l),u=j4(s,o.state),d=S4(u.data,o.state.dataSourceId,r,s);return h.jsx(ia,{value:d,children:h.jsx(mt,{value:o,children:h.jsxs(Qn,{value:u,children:[h.jsx(hN,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[h.jsx("div",{className:"flex-1 overflow-auto pb-24 lg:pb-12 no-scrollbar",children:h.jsx(TC,{})}),h.jsx(DN,{}),h.jsx(zN,{}),h.jsx(sv,{mode:"columns"}),h.jsx(sv,{mode:"groupBy"}),h.jsx(ZN,{}),h.jsx(t_,{})]})]})})})},I1=()=>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}=C4(n),r=x.useCallback(s=>{if(!l)return;const o=s(Qs(l.opts));ht.setQueryData(["workbench-tabs",l.id],{...l,opts:{...l.opts,...o}})},[l]);return l?h.jsx(JN,{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(I1,{})})},IN=()=>{const{id:n}=Jx(),l=Lt(),{data:r}=Jd(),s=_4(),o=nh(Tu.laptop),u=y=>{if(y===n&&r){if(r.length===1)return l(Xe.home.path);if(r.length>1){const p=r.find(b=>b.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&&(s.mutate(p),u(p))},m=y=>{if(y.button===1){const p=y.currentTarget.dataset.tabId;s.mutate(p),u(p)}};return $t("ctrl+w",()=>{n&&(s.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:le(sr.tabs,"no-scrollbar",!o&&sr.mobile),children:r==null?void 0:r.map(y=>h.jsxs("div",{onClick:()=>l(`${Xe.workbench.path}/tab/${y.id}`),className:le(sr.tab,y.id===n&&sr.active),"data-tab-id":y.id,"data-tooltip-id":"tab","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:sr.closeButton,onClick:d,children:h.jsx(Hn,{width:20,height:20})})]},y.id))})]})},WN="_root_1ukw8_2",e6="_down_1ukw8_2",t6="_chevron_1ukw8_2",n6="_table-name-container_1ukw8_2",a6="_link_1ukw8_2",l6="_table-name_1ukw8_2",s6="_ul_1ukw8_2",i6="_column-type_1ukw8_2",Ta={root:WN,down:e6,chevron:t6,tableNameContainer:n6,link:a6,tableName:l6,ul:s6,columnType:i6},[Sj,r6]=fn(!1),W1=()=>r6(!1),o6=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"});function u6(n,l){if(l&&n.toLowerCase().includes(l))return"bg-yellow-200"}const c6=({insp:n,filter:l,expanded:r})=>{const s=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:Ta.ul,children:s.map(o=>h.jsx(h.Fragment,{children:h.jsxs("li",{children:[o.isPrimary?"🔐":"🏷️"," ",h.jsx("span",{className:u6(o.name,l),children:o.name})," ",h.jsxs("span",{className:Ta.columnType,children:["[",o.type,"]"]}),o.ref&&h.jsxs("span",{children:[" ➡️ ",h.jsx("span",{className:Ta.columnType,children:o.ref.table}),".",o.ref.field]})]},o.name+o.type)}))},n.id)};function f6({id:n}){const{data:l}=Au(n),{data:r}=Ws(n),s=Lt(),o=e4(),u=y1(),d=t4(),m=ti(),y=x.useMemo(()=>l!=null&&l.lastInspected?o6.format(new Date(l.lastInspected)):"--",[l]),[p,b]=x.useState({}),[g,w]=x.useState(""),[C,E]=x.useState("table"),A=Er(Zt.EDITOR),N=g.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]),O=Z=>{b(te=>({...te,[Z]:!te[Z]}))},T=Z=>{m.mutateAsync({name:Z,opts:Qs({table:Z,dataSourceId:n})}).then(te=>{$s(void 0),W1(),s(`${Xe.workbench.path}/tab/${te.id}`)})},$=()=>{u.mutate(n)},V=async()=>{const Z=await _r("Enter name",l==null?void 0:l.name);Z&&o.mutate({id:n,dataSource:{name:Z}})},H=async()=>{await w1("Are you sure you want to delete this data source?")&&(d.mutate(n),$s(void 0))},G=C==="column";return h.jsxs("div",{className:Ta.root,children:[h.jsxs("h3",{className:"page-head flex gap-2",children:[l&&h.jsx(Pd,{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}),A&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsx("button",{disabled:u.isLoading,onClick:$,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:H,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=>E(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:g,onChange:Z=>w(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:Ta.tableNameContainer,children:[h.jsx("button",{className:le(Ta.chevron,p[Z.id]&&Ta.down),onClick:()=>O(Z.id),children:h.jsx(Ru,{width:16,height:16})}),h.jsx("button",{className:le(Ta.tableName,"flex-1"),onClick:()=>O(Z.id),children:Z.tableName}),h.jsx("button",{className:Ta.link,onClick:()=>T(Z.tableName),children:"↗️"})]}),(p[Z.id]||g.length>0)&&h.jsx(c6,{insp:Z,filter:G?N:"",expanded:p[Z.id]})]},Z.id))})]})}const d6=()=>{const n=I4(),[l,r]=x.useState(void 0);x.useEffect(()=>{n&&r(n)},[n]);const s=()=>$s(void 0);return h.jsx(R1,{isVisible:n!=null,onClose:s,onClosed:()=>r(void 0),backdropClose:!0,children:l&&h.jsx(f6,{id:l})})};function h6(n,l=500){const[r,s]=x.useState(n);return x.useEffect(()=>{const o=setTimeout(()=>s(n),l);return()=>clearTimeout(o)},[n,l]),r}const m6="_search_1thei_2",p6="_entry_1thei_2",y6="_ds_1thei_2",v6="_ds-entry_1thei_2",Ko={search:m6,entry:p6,ds:y6,dsEntry:v6};function b6(n,l,r){try{const s=r.getItem(n);if(s)return JSON.parse(s)}catch(s){console.warn("Failed to restore tabs",s)}return l}const g6=({storage:n=localStorage,localStorageKey:l,initialData:r})=>{const s=fn(b6(l,r,n));return s[2].subscribe(o=>{n.setItem(l,JSON.stringify(o))}),s},[x6,S6]=g6({initialData:[],localStorageKey:"selected-data-sources-v1"}),w6=n=>S6(l=>{const r=l.indexOf(n);return r>-1?(l.splice(r,1),[...l]):[...l,n]}),E6={table:"📄",query:"📖"},C6=({onTable:n,onQuery:l,autoFocus:r})=>{const[s,o]=x.useState(""),[u,d]=x.useState(-1),m=h6(s,200),y=x6(),{data:p}=la(),{data:b}=Kd({teamId:p==null?void 0:p.teamId}),g=x.useMemo(()=>{const _=[],O=lv(y);if(!b||b.length===0)return[];for(const T of b)O[T.id]&&_.push(T.id);return _},[y,b]),{data:w}=Z3(m,{teamId:p==null?void 0:p.teamId,selectedDataSources:g}),C=_=>{_.type==="table"?n(_.name,_.dataSourceId):_.type==="query"&&l(_.id,_.dataSourceId)},E=_=>{var O;w&&(_.key==="ArrowDown"?(_.preventDefault(),d(T=>(T+1)%w.length)):_.key==="ArrowUp"?(_.preventDefault(),d(T=>(T-1+w.length)%w.length)):_.key==="Enter"&&u>=0&&(O=w[u])!=null&&O.name&&(_.preventDefault(),C(w[u])))},A=_=>{const O=_.currentTarget.dataset.tableId,T=w==null?void 0:w.find($=>$.id===O);T&&C(T)},N=x.useMemo(()=>lv(y),[y]);return h.jsxs("div",{className:"overflow-hidden flex flex-col w-full lg:w-lg",children:[pl(b==null?void 0:b.length,0)&&h.jsx("div",{className:"flex overflow-x-auto mb-2 gap-2 no-scrollbar",children:b.map(_=>h.jsxs("label",{className:Ko.dsEntry,children:[h.jsx("input",{type:"checkbox",checked:N[_.id]===!0,onChange:()=>w6(_.id)}),h.jsx("span",{children:_.name})]},_.id))}),h.jsx("input",{className:Ko.search,placeholder:"Search table or saved query to start from",value:s,onChange:_=>o(_.target.value),onKeyDown:E,autoFocus:r}),pl(w==null?void 0:w.length,0)&&h.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:w.map((_,O)=>h.jsxs("button",{className:Ko.entry,"data-is-active":u===O,"data-table-id":_.id,onClick:A,children:[h.jsxs("p",{className:"font-semibold",children:[E6[_.type]," ",_.name]}),h.jsxs("p",{className:Ko.ds,children:["📦 ",_.dataSourceName]})]},_.id))})]})},_6=()=>{const n=A4(),l=(o,u)=>{n==null||n.onConfirm("table",o,u)},r=(o,u)=>{n==null||n.onConfirm("query",o,u)},s=()=>{n==null||n.onCancel()};return h.jsxs(dn,{isVisible:!!n,onClose:s,children:[h.jsx(sa,{onClick:s}),h.jsx(C6,{autoFocus:!0,onTable:l,onQuery:r})]})},N6=()=>{const n=wr("Hotkey"),l=Lt(),{pathname:r}=Yt(),{data:s}=la(),{data:o}=Jd(),u=r===Xe.home.path;$t("n",()=>{s&&n()}),$t("w",()=>{s&&(o&&o.length>0?l(`${Xe.workbench.path}/tab/${o[0].id}`):n())},{enabled:u}),$t("h",()=>{l(Xe.home.path)},{enabled:!u})},j6=()=>{const n=Yt();x.useEffect(()=>{},[n.pathname])},[A6,eb]=fn(!1),cd=()=>eb(!1),tb=()=>eb(!0),T6=({repeatPassword:n,password:l})=>l.length<1?null:l.length<8?h.jsx(Ut,{variant:"warning",children:"New password should be at least 8 characters long"}):l!==n?h.jsx(Ut,{variant:"warning",children:"Repeat password should match new password"}):null,R6=()=>{const n=A6(),{data:l}=la(),{mutateAsync:r,isLoading:s}=n4(),o=Lt(),[{password:u,repeatPassword:d},{change:m,touched:y,reset:p}]=Cr({password:"",repeatPassword:""}),b=()=>{o("/"),Sr.logout().then(()=>{cd()})},g=()=>{r({password:u}).then(()=>{p(),It.success("Password successfully updated!")})},w=u.length<8||u!==d||s,C=y.includes("password");return h.jsxs(dn,{isVisible:n,onClose:cd,children:[h.jsx(sa,{onClick:cd}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[h.jsx(S1,{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(T6,{password:u,repeatPassword:d}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsx("button",{className:"button tertiary",disabled:w,onClick:g,children:"Update password"}),h.jsx("button",{className:"button danger",onClick:b,children:"Log out"})]})]})]})},[O6,nb]=fn(!1),ab=()=>nb(!0),iv=()=>nb(!1),D6=n=>Wt({queryKey:["team-users"],queryFn:async()=>{const{data:l}=await Ue.get("/teams/"+n+"/users");return l.data},enabled:!!n}),M6=()=>qt({mutationFn:async({role:n,teamId:l,userId:r})=>(await Ue.patch("/teams/"+l+"/user-role",{role:n,userId:r}),!0),onSuccess:()=>{ht.invalidateQueries({queryKey:["team-users"]})}}),U6=()=>qt({mutationFn:async({teamId:n,userId:l})=>(await Ue.delete("/teams/"+n,{params:{userId:l}}),!0),onSuccess:()=>{ht.invalidateQueries({queryKey:["team-users"]})}}),L6="_user-entry_ucc71_2",q6="_select-container_ucc71_2",rv={userEntry:L6,selectContainer:q6},z6=()=>{const n=O6(),{data:l}=la(),{data:r}=D6(l==null?void 0:l.teamId),{mutate:s,isLoading:o}=a4(),{mutate:u,isLoading:d}=M6(),{mutate:m,isLoading:y}=U6(),[p,{change:b,reset:g}]=Cr({password:"",username:""}),w=()=>{s({username:p.username,password:p.password,teamId:(l==null?void 0:l.teamId)||""}),g()},C=(_,O)=>{u({teamId:l.teamId,role:O,userId:_})},E=_=>{w1("Are you sure you want to remove this user?").then(O=>{O&&m({userId:_,teamId:l.teamId})})},A=Er(Zt.ADMIN),N=o||d||y;return h.jsxs(dn,{isVisible:n,onClose:iv,backdropClose:!0,children:[h.jsx(sa,{onClick:iv}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[h.jsx(S1,{children:"Manage users"}),pl(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:rv.userEntry,children:[h.jsx("div",{className:rv.selectContainer,children:h.jsxs("select",{value:_.role,disabled:!A||N,onChange:O=>C(_.id,O.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}),A&&h.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>E(_.id),children:"❌"})]},_.id))}),A&&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:b("username"),value:p.username,placeholder:"Username",disabled:N}),h.jsx("input",{className:"input",onChange:b("password"),value:p.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:N}),h.jsx("button",{className:"button primary",onClick:w,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."})]})]})]})},B6=()=>{const[n,l]=x.useState(""),[r,s]=x.useState(""),[o,u]=x.useState(),[d,m]=x.useState(!1),y=Lt(),p=b=>{b.preventDefault(),u(void 0),Sr.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(Ut,{variant:"danger",children:"Failed to login. Please verify your credentials"}),h.jsx("input",{value:n,onChange:b=>l(b.currentTarget.value),className:"input",placeholder:"User name"}),h.jsx("input",{value:r,onChange:b=>s(b.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),h.jsx("button",{type:"submit",className:"button primary",children:"Login"}),d?h.jsxs(Ut,{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?"})]})})})},k6=()=>{const n=Lt(),{pathname:l}=Yt(),{data:r,isLoading:s}=v1();x.useEffect(()=>{!r&&!s&&l!==Xe.login.path&&n(Xe.login.path)},[r,s,n,l])},H6=()=>{const[n]=Q2(),l=Lt(),r=ti(),s=n.get("shareId");return x.useEffect(()=>{s&&r.mutateAsync({queryId:s}).then(o=>{l(`${Xe.workbench.path}/tab/${o.id}`,{replace:!0})})},[s]),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(I1,{}),h.jsx("p",{children:"Fetching query information"})]}),r.isError&&h.jsx(Ut,{variant:"danger",children:"Failed to load query information"})]})};function Q6(){return N6(),j6(),k6(),h.jsxs(h.Fragment,{children:[h.jsxs(f2,{children:[h.jsx(rr,{path:Xe.home.path,element:h.jsx(lE,{})}),h.jsx(rr,{path:`${Xe.workbench.path}/tab/:id`,element:h.jsx(IN,{})}),h.jsx(rr,{path:Xe.login.path,element:h.jsx(B6,{})}),h.jsx(rr,{path:Xe.share.path,element:h.jsx(H6,{})})]}),h.jsx(yE,{}),h.jsx(NE,{}),h.jsx(kE,{}),h.jsx(d6,{}),h.jsx(_6,{}),h.jsx(R6,{}),h.jsx(z6,{}),h.jsx(UE,{}),h.jsx(TE,{})]})}const $6="_desktop-layout_1pmvv_2",Y6="_mobile-layout_1pmvv_2",V6="_nav_1pmvv_2",K6="_main_1pmvv_2",F6="_header_1pmvv_2",Ks={desktopLayout:$6,mobileLayout:Y6,nav:V6,main:K6,header:F6},G6="_container_w0kqq_2",X6="_menu_w0kqq_2",hh={container:G6,menu:X6},Z6=({name:n,id:l,onRename:r,onDelete:s,onOpen:o})=>{const u=_1();return h.jsxs("button",{className:hh.menu,onContextMenu:u.open,onClick:()=>o(l),children:[h.jsx(N1,{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(),s(l)},className:"context-menu-item",children:"🗑️ Delete"})]})}),h.jsxs("span",{children:["📖 ",n]})]})},J6=({dataSource:n,index:l})=>{const r=()=>{$s(n.id)};return $t(l.toString(),()=>{$s(s=>{if(s!==n.id)return n.id})}),h.jsxs("button",{className:hh.menu,onClick:r,children:[h.jsx(Pd,{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})]})},P6=()=>{const n=Lt(),{data:l}=la(),{data:r}=F3(l==null?void 0:l.teamId),{data:s}=G3(l==null?void 0:l.teamId),o=ti(),u=s_(),d=l_(),m=b=>{o.mutateAsync({queryId:b}).then(g=>{n(`${Xe.workbench.path}/tab/${g.id}`)})},y=async b=>{const g=s==null?void 0:s.find(C=>C.id===b),w=await _r("New name?",g==null?void 0:g.name);w&&u.mutate({id:b,payload:{name:w}})},p=b=>{var w;const g=(w=s==null?void 0:s.find(C=>C.id===b))==null?void 0:w.savedQueryId;g&&d.mutate(g)};return h.jsx("div",{className:hh.container,children:h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[pl(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((b,g)=>h.jsx(J6,{dataSource:b,index:g+1},b.id))]}),pl(s==null?void 0:s.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"}),s.map(b=>h.jsx(Z6,{onDelete:p,onRename:y,onOpen:m,name:b.name,id:b.id},b.savedQueryId))]})]})})},I6=()=>{const n=Lt(),{pathname:l}=Yt(),{data:r}=la(),s=wr("Desktop nav"),o=()=>{W1(),l!==Xe.home.path&&n(Xe.home.path)};return h.jsxs("nav",{className:Ks.nav,children:[r&&h.jsxs("div",{className:Ks.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:s,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🔎 New query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsxs("button",{onClick:tb,children:["🪪 ",r.username]}),h.jsx("button",{onClick:ab,children:"👥 Manage users"})]}),h.jsx(P6,{})]})},W6="_root_13nnk_2",ej={root:W6},tj=()=>{const{pathname:n}=Yt(),l=Lt(),r=wr("Mobile nav"),s=()=>{n!==Xe.home.path&&l(Xe.home.path)};return h.jsxs("div",{className:ej.root,children:[h.jsxs("button",{onClick:s,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:tb,children:[h.jsx("p",{children:"🪪"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Account"})]}),h.jsxs("button",{onClick:ab,children:[h.jsx("p",{children:"👥"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Users"})]})]})},nj=({children:n,isLogin:l})=>h.jsxs("div",{className:Ks.desktopLayout,children:[h.jsx(fh,{id:"default",className:"z-100"}),!l&&h.jsx(I6,{}),h.jsx("main",{className:Ks.main,children:n})]}),aj=({children:n,isLogin:l})=>h.jsxs("div",{className:Ks.mobileLayout,children:[h.jsx("main",{className:Ks.main,children:n}),!l&&h.jsx(tj,{})]}),lj=({children:n})=>{const l=nh(Tu.laptop),{pathname:r}=Yt(),s=r===Xe.login.path;return l?h.jsx(nj,{isLogin:s,children:n}):h.jsx(aj,{isLogin:s,children:n})};gx.createRoot(document.getElementById("root")).render(h.jsxs(Ke.StrictMode,{children:[h.jsx(Y3,{}),h.jsx(vS,{client:ht,children:h.jsx(q2,{children:h.jsx(lj,{children:h.jsx(Q6,{})})})})]}));